dazl.client package¶
Submodules¶
dazl.client.api module¶
This module contains the public API for interacting with the ledger from the perspective of a specific party.
-
class
dazl.client.api.
AIOGlobalClient
(impl: dazl.client._network_client_impl._NetworkImpl)[source]¶ Bases:
dazl.client.api.GlobalClient
-
async
ensure_dar
(contents: Union[str, pathlib.Path, bytes, BinaryIO], timeout: Union[int, float, decimal.Decimal, str, datetime.timedelta] = 30) → None[source]¶ Validate that the ledger has the packages specified by the given contents (as a byte array). Throw an exception if the specified DARs do not exist within the specified timeout.
- Parameters
contents – The DAR or DALF to ensure.
timeout – The maximum length of time to wait before giving up.
-
async
ensure_packages
(package_ids: Collection[str], timeout: Union[int, float, decimal.Decimal, str, datetime.timedelta] = 30) → None[source]¶ Validate that packages with the specified package IDs exist on the ledger. Throw an exception if the specified packages do not exist within the specified timeout.
- Parameters
package_ids – The set of package IDs to check for.
timeout – The maximum length of time to wait before giving up.
-
async
-
class
dazl.client.api.
AIOPartyClient
(impl: dazl.client._party_client_impl._PartyClientImpl)[source]¶ Bases:
dazl.client.api.PartyClient
Implementation of a
PartyClient
that exposes an async/await-style API that runs on an event loop.-
add_ledger_archived
(template: Any, handler: Callable[dazl.model.reading.ContractArchiveEvent], match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → None[source]¶ Register a callback to be invoked when the
PartyClient
encounters a newly archived contract instance of a template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
handler – The callback to invoke whenever a matching template is created.
match – An (optional) parameter that filters the templates to be received by the callback.
-
add_ledger_created
(template: Any, handler: Callable[dazl.model.reading.ContractCreateEvent], match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → dazl.client.bots.Bot[source]¶ Register a callback to be invoked when the
PartyClient
encounters a newly created contract instance of a template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
handler – The callback to invoke whenever a matching template is created.
match – An (optional) parameter that filters the templates to be received by the callback.
-
add_ledger_exercised
(template: Any, choice: str, handler: Callable[dazl.model.reading.ContractExercisedEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
encounters an exercised choice event.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
choice – The name of the choice to listen for exercises on.
handler – The callback to invoke whenever a matching template is exercised.
-
add_ledger_init
(handler: Callable[dazl.model.reading.InitEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
has been instructed to begin, but before any network activity is started.- Parameters
handler – The handler to register. This can either be a coroutine or a normal function, and may return anything that can be successfully coerced into a
CommandPayload
.
-
add_ledger_packages_added
(handler: Callable[dazl.model.reading.PackagesAddedEvent], initial: bool = False) → None[source]¶ Register a callback to be invoked when the
PartyClient
has detected new packages added to the ledger.- Parameters
handler – The handler to register. This can either be a coroutine or a normal function, and may return anything that can be successfully coerced into a
CommandPayload
.initial –
True
to call the handler when the client is ready. This can be useful if you want to handle package additions identically whether they were already in the ledger when the client started up or only after a package has been added. The default value isFalse
, which means that this handler is only called on NEW packages that have been uploaded after this client has started.
- Returns
-
add_ledger_ready
(handler: Callable[dazl.model.reading.ReadyEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
has caught up to the head of the ledger, but before anyledger_create()
orledger_archive()
callbacks are invoked.- Parameters
handler – The handler to register. This can either be a coroutine or a normal function, and may return anything that can be successfully coerced into a
CommandPayload
.
-
add_ledger_transaction_end
(handler: Callable[dazl.model.reading.TransactionEndEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
receives a new transaction. Called after individualledger_create()
andledger_archive()
callbacks.- Parameters
handler – The handler to register. This can either be a coroutine or a normal function, and may return anything that can be successfully coerced into a
CommandPayload
.
-
add_ledger_transaction_start
(handler: Callable[dazl.model.reading.TransactionStartEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
receives a new transaction. Called before individualledger_create()
andledger_archive()
callbacks.- Parameters
handler – The handler to register. This can either be a coroutine or a normal function, and may return anything that can be successfully coerced into a
CommandPayload
.
-
find
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None, include_archived: bool = False) → dazl.model.core.ContractContextualDataCollection[source]¶
-
find_active
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → Dict[dazl.model.core.ContractId, Dict[str, Any]][source]¶ Immediately return data from the current active contract set.
The contents of this ACS are guaranteed to be present (or removed) in the current transaction _before_ processing any corresponding
on_created
oron_archived
callbacks for this party. The ACS is populated _before_ processing anyon_ready
callbacks.This method raises an error if ACS tracking has been disabled on this client.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
- Returns
A
dict
whose keys areContractId
and values are corresponding contract data that match the current query.
-
find_by_id
(cid: Union[str, dazl.model.core.ContractId]) → Optional[dazl.model.core.ContractContextualData][source]¶
-
find_historical
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → dazl.model.core.ContractContextualDataCollection[source]¶ Immediately return data from the current active and historical contract set as a contextual data collection
The contents of this set are guaranteed to be up-to-date in the current transaction _before_ processing any corresponding
on_created
oron_archived
callbacks for this party. The set is up-to-date _before_ processing anyon_ready
callbacks.This method raises an error if historical tracking has been disabled on this client.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
- Returns
A
ContractContextualDataCollection
whose values correspond to the contract data for active and archived contracts matching the current query.
-
find_nonempty
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]], min_count: int = 1, timeout: float = 30) → Awaitable[Dict[dazl.model.core.ContractId, Dict[str, Any]]][source]¶ Return data from the current active contract set when at least some amount of rows exist in the active contract set.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
min_count – The minimum number of rows to return. The default value is 1.
timeout – Number of seconds in which to time out the search.
- Returns
A
Future
that is resolved with adict
whose keys areContractId
and values are corresponding contract data that match the current query.
-
find_one
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None, timeout: float = 30) → Awaitable[Tuple[dazl.model.core.ContractId, Dict[str, Any]]][source]¶ Return data from the current active contract set when at least some amount of rows exist in the active contract set.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
timeout – Number of seconds in which to time out the search.
- Returns
A
Future
that is resolved with adict
whose keys areContractId
and values are corresponding contract data that match the current query.
-
get_time
() → Awaitable[datetime.datetime][source]¶ Return the current time on the remote server. Also advance the local notion of time if required.
-
ledger_archived
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → Callable[dazl.model.reading.ContractArchiveEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
encounters a newly archived contract instance of a template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
match – An (optional) parameter that filters the templates to be received by the callback.
-
ledger_created
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → Callable[dazl.model.reading.ContractCreateEvent][source]¶ Register a callback to be invoked when the
PartyClient
encounters a newly created template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
match – An (optional) parameter that filters the templates to be received by the callback.
-
ledger_exercised
(template: Any, choice: str) → Callable[dazl.model.reading.ContractExercisedEvent][source]¶ Register a callback to be invoked when the
PartyClient
encounters an exercised choice event.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
choice – The name of the choice to listen for exercises on.
-
ledger_init
() → Callable[dazl.model.reading.InitEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
has been instructed to begin, but before any network activity is started.
-
ledger_packages_added
(initial: bool = False) → Callable[dazl.model.reading.PackagesAddedEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
has detected new packages added to the ledger.- Parameters
initial –
True
to call the handler when the client is ready. This can be useful if you want to handle package additions identically whether they were already in the ledger when the client started up or only after a package has been added. The default value isFalse
, which means that this handler is only called on NEW packages that have been uploaded after this client has started.- Returns
-
ledger_ready
() → Callable[dazl.model.reading.ReadyEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
has caught up to the head of the ledger, but before anyledger_create()
orledger_archive()
callbacks are invoked.
-
ledger_transaction_end
() → Callable[dazl.model.reading.TransactionEndEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
receives a new transaction. Called after individualledger_create()
andledger_archive()
callbacks.
-
ledger_transaction_start
() → Callable[dazl.model.reading.TransactionStartEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
receives a new transaction. Called before individualledger_create()
andledger_archive()
callbacks.
-
ready
() → Awaitable[None][source]¶ Block until the ledger client has caught up to the current head and is ready to send commands.
-
set_time
(new_datetime: datetime.datetime) → Awaitable[None][source]¶ Set the current time on the ledger. This is only supported if the ledger supports time manipulation.
-
submit
(commands: Union[None, Command, List[Optional[Command]], CommandBuilder, CommandPayload], workflow_id: Optional[str] = None) → Awaitable[None][source]¶ Submit commands to the ledger.
- Parameters
commands – An object that can be converted to a command.
workflow_id – The optional workflow ID to stamp on the outgoing command.
- Returns
A future that resolves when the command has made it to the ledger _or_ an error occurred when trying to process them.
-
submit_create
(template_name: str, arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → Awaitable[None][source]¶ Submit a single create command. Equivalent to calling
submit()
with a singlecreate
.- Parameters
template_name – The name of the template.
arguments – The arguments to the create (as a
dict
).workflow_id – The optional workflow ID to stamp on the outgoing command.
- Returns
A future that resolves when the command has made it to the ledger _or_ an error occurred when trying to process them.
-
submit_create_and_exercise
(template_name: Union[str, dazl.model.types.TypeReference, dazl.model.types.UnresolvedTypeReference, dazl.model.types.Template], arguments: dict, choice_name: str, choice_arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → Awaitable[None][source]¶ Synchronously submit a single create-and-exercise command. Equivalent to calling
submit()
with a singlecreate_and_exercise
.- Parameters
template_name – The name of the template on which to do an exercise-by-key.
arguments – The arguments to the create (as a
dict
).choice_name – The name of the choice to exercise.
choice_arguments – The arguments to the exercise (as a
dict
). Can be omitted (None
) for no-argumentworkflow_id – The optional workflow ID to stamp on the outgoing command.
-
submit_exercise
(cid: dazl.model.core.ContractId, choice_name: str, arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → Awaitable[None][source]¶ Submit a single exercise choice. Equivalent to calling
submit()
with a singleexercise
.- Parameters
cid – The
ContractId
on which a choice is being exercised.choice_name – The name of the choice to exercise.
arguments – The arguments to the exercise (as a
dict
). Can be omitted (None
) for no-argument choices.workflow_id – The optional workflow ID to stamp on the outgoing command.
- Returns
A future that resolves when the command has made it to the ledger _or_ an error occurred when trying to process them.
-
submit_exercise_by_key
(template_name: Union[str, dazl.model.types.TypeReference, dazl.model.types.UnresolvedTypeReference, dazl.model.types.Template], contract_key: Any, choice_name: str, arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → Awaitable[None][source]¶ Synchronously submit a single exercise choice. Equivalent to calling
submit()
with a singleexercise_by_key
.- Parameters
template_name – The name of the template on which to do an exercise-by-key.
contract_key – The value that should uniquely identify a contract for the specified template.
choice_name – The name of the choice to exercise.
arguments – The arguments to the create (as a
dict
). Can be omitted (None
) for no-argument choices.workflow_id – The optional workflow ID to stamp on the outgoing command.
-
-
class
dazl.client.api.
GlobalClient
(impl: dazl.client._network_client_impl._NetworkImpl)[source]¶ Bases:
object
Public interface for either an async-based or a thread-safe version of an API for interacting with a Ledger API implementation that manages global ledger data, such as package store management and current time.
-
class
dazl.client.api.
Network
(metrics: Optional[dazl.metrics.api.MetricEvents] = None)[source]¶ Bases:
object
Manages network connection/scheduling logic on behalf of one or more
PartyClient
instances.-
aio_global
() → dazl.client.api.AIOGlobalClient[source]¶ Return a
GlobalClient
that works on an asyncio event loop.
-
aio_party
(party: Union[str, NewType.<locals>.new_type]) → dazl.client.api.AIOPartyClient[source]¶ Return a
PartyClient
that works on an asyncio event loop.- Parameters
party – The party to get a client for.
-
async
aio_run
(*coroutines, run_state: Optional[dazl.client._run_level.RunState] = None) → None[source]¶ Coroutine where all network activity is scheduled from. This coroutine exits when
shutdown()
is called, and can be used directly as an asyncio-native alternative tostart_in_background()
andjoin()
.You would normally call this method directly only if you are trying to incorporate the client into an already-running event loop. Prefer
run_until_complete()
orrun_forever()
if you can block the current thread, orstart_in_background()
withjoin()
if you wish to run the entire client on background threads.
-
join
(timeout: Optional[float] = None) → None[source]¶ Block the current thread until the client is shut down.
- Parameters
timeout – Number of seconds to wait before timing out the join, or
None
to wait indefinitely.
-
parties
() → Collection[NewType.<locals>.new_type][source]¶ Return a snapshot of the set of parties that exist right now.
-
party_bots
(party: Union[str, NewType.<locals>.new_type], if_missing: typing_extensions.Literal[typing_extensions.Literal[1], typing_extensions.Literal[2], typing_extensions.Literal[3]] = typing_extensions.Literal[1]) → dazl.client.bots.BotCollection[source]¶ Return the collection of bots associated with a party.
- Parameters
party – The party to get bots for.
if_missing – Specify the behavior to use in the case where no client has been yet requested for this party. The default behavior is CREATE_IF_MISSING.
-
resolved_config
() → dazl.client.config.NetworkConfig[source]¶ Calculate the configuration that will be used for this client when it is instantiated.
-
run_forever
(*coroutines, install_signal_handlers: Optional[bool] = None) → None[source]¶ Block the main thread and run the application in an event loop on the main thread. The loop terminates when
shutdown()
is called AND all active command submissions and event handlers’ follow-ups have successfully returned.
-
run_until_complete
(*coroutines, install_signal_handlers: Optional[bool] = None) → None[source]¶ Block the main thread and run the application in an event loop on the main thread. The loop terminates when the given (optional) coroutines terminate OR
shutdown()
is called AND all active command submissions and event handlers’ follow-ups have successfully returned.- Parameters
coroutines – Coroutines to run alongside event handlers and command submissions. When these coroutines are done running and the
install_signal_handlers –
True
to install SIGINT and SIGQUIT event handlers (CTRL+C and CTRL+);False
to skip installation. The default value isNone
, which installs signal handlers only when called from the main thread (default). If signal handlers are requested to be installed and the thread is NOT the main thread, this method throws.
-
shutdown
() → None[source]¶ Gracefully shut down all network connections and notify all clients that they are about to be terminated.
The current thread does NOT block.
-
simple_global
() → dazl.client.api.SimpleGlobalClient[source]¶ Return a
GlobalClient
that exposes thread-safe, synchronous (blocking) methods for communicating with a ledger. Callbacks are dispatched to background threads.
-
simple_party
(party: Union[str, NewType.<locals>.new_type]) → dazl.client.api.SimplePartyClient[source]¶ Return a
PartyClient
that exposes thread-safe, synchronous (blocking) methods for communicating with a ledger. Callbacks are dispatched to background threads.- Parameters
party – The party to get a client for.
-
start_in_background
(daemon: bool = True, install_signal_handlers: Optional[bool] = None) → None[source]¶ Connect to the ledger in a background thread.
The current thread does NOT block. Operations on instances of
SimplePartyClient
are allowed, and operations on instances ofAIOPartyClient
are allowed as long as they are made from the correct thread.
-
-
class
dazl.client.api.
PartyClient
(impl: dazl.client._party_client_impl._PartyClientImpl)[source]¶ Bases:
object
Public interface for either an async-based or a thread-safe version of an API for interacting with a Ledger API implementation from the perspective of a single client.
-
property
party
¶ Return the party serviced by this client.
-
property
-
class
dazl.client.api.
SimpleGlobalClient
(impl: dazl.client._network_client_impl._NetworkImpl)[source]¶ Bases:
dazl.client.api.GlobalClient
-
ensure_dar
(contents: Union[str, pathlib.Path, bytes, BinaryIO], timeout: Union[int, float, decimal.Decimal, str, datetime.timedelta] = 30) → None[source]¶ Validate that the ledger has the packages specified by the given contents (as a byte array). Throw an exception if the specified DARs do not exist within the specified timeout.
- Parameters
contents – The DAR or DALF to ensure.
timeout – The maximum length of time to wait before giving up.
-
ensure_packages
(package_ids: Collection[str], timeout: Union[int, float, decimal.Decimal, str, datetime.timedelta] = 30) → None[source]¶ Validate that packages with the specified package IDs exist on the ledger. Throw an exception if the specified packages do not exist within the specified timeout.
- Parameters
package_ids – The set of package IDs to check for.
timeout – The maximum length of time to wait before giving up.
-
-
class
dazl.client.api.
SimplePartyClient
(impl: dazl.client._party_client_impl._PartyClientImpl)[source]¶ Bases:
dazl.client.api.PartyClient
Implementation of a
PartyClient
that exposes blocking calls, but can be used from any thread.- Use this implementation if any of these apply:
you wish to interact with libraries that do not natively support asyncio
you are comfortable with the trade-off of having to block threads in order to write code
-
add_ledger_archived
(template: Any, handler: Callable[dazl.model.reading.ContractArchiveEvent], match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → None[source]¶ Register a callback to be invoked when the
PartyClient
encounters a newly archived contract instance of a template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
handler – The callback to invoke whenever a matching template is created.
match – An (optional) parameter that filters the templates to be received by the callback.
-
add_ledger_created
(template: Any, handler: Callable[dazl.model.reading.ContractCreateEvent], match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → None[source]¶ Register a callback to be invoked when the
PartyClient
encounters a newly created contract instance of a template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
handler – The callback to invoke whenever a matching template is created.
match – An (optional) parameter that filters the templates to be received by the callback.
-
add_ledger_exercised
(template: Any, choice: str, handler: Callable[dazl.model.reading.ContractExercisedEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
encounters an exercised choice event.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
choice – The name of the choice to listen for exercises on.
handler – The callback to invoke whenever a matching template is exercised.
-
add_ledger_init
(handler: Callable[dazl.model.reading.InitEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
has been instructed to begin, but before any network activity is started.- Parameters
handler – The handler to register. May return anything that can be successfully coerced into a
CommandPayload
.
-
add_ledger_packages_added
(handler: Callable[dazl.model.reading.PackagesAddedEvent], initial: bool = False) → None[source]¶ Register a callback to be invoked when the
PartyClient
has detected new packages added to the ledger.- Parameters
handler – The handler to register. May return anything that can be successfully coerced into a
CommandPayload
.initial –
True
to call the handler when the client is ready. This can be useful if you want to handle package additions identically whether they were already in the ledger when the client started up or only after a package has been added. The default value isFalse
, which means that this handler is only called on NEW packages that have been uploaded after this client has started.
- Returns
-
add_ledger_ready
(handler: Callable[dazl.model.reading.ReadyEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
has caught up to the head of the ledger, but before anyledger_create()
orledger_archive()
callbacks are invoked.- Parameters
handler – The handler to register. May return anything that can be successfully coerced into a
CommandPayload
.
-
add_ledger_transaction_end
(handler: Callable[dazl.model.reading.TransactionEndEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
receives a new transaction. Called after individualledger_create()
andledger_archive()
callbacks.- Parameters
handler – The handler to register. This can either be a coroutine or a normal function, and may return anything that can be successfully coerced into a
CommandPayload
.
-
add_ledger_transaction_start
(handler: Callable[dazl.model.reading.TransactionStartEvent]) → None[source]¶ Register a callback to be invoked when the
PartyClient
receives a new transaction. Called before individualledger_create()
andledger_archive()
callbacks.- Parameters
handler – The handler to register. This can either be a coroutine or a normal function, and may return anything that can be successfully coerced into a
CommandPayload
.
-
find
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None, include_archived: bool = False) → dazl.model.core.ContractContextualDataCollection[source]¶
-
find_active
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → Dict[dazl.model.core.ContractId, Dict[str, Any]][source]¶ Immediately return data from the current active contract set.
The contents of this ACS are guaranteed to be present (or removed) in the current transaction _before_ processing any corresponding
on_created
oron_archived
callbacks for this party. The ACS is populated _before_ processing anyon_ready
callbacks.This method raises an error if ACS tracking has been disabled on this client.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
- Returns
A
dict
whose keys areContractId
and values are corresponding contract data that match the current query.- Returns
A
dict
whose keys areContractId
and values are corresponding contract data that match the current query.
-
find_by_id
(cid: Union[str, dazl.model.core.ContractId]) → Optional[dazl.model.core.ContractContextualData][source]¶
-
find_historical
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → dazl.model.core.ContractContextualDataCollection[source]¶ Immediately return data from the current active and historical contract set.
The contents of this set are guaranteed to be up-to-date in the current transaction _before_ processing any corresponding
on_created
oron_archived
callbacks for this party. The set is up-to-date _before_ processing anyon_ready
callbacks.This method raises an error if historical tracking has been disabled on this client.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
- Returns
A
dict
whose keys areContractId
and values are corresponding contract data that match the current query.- Returns
A
dict
whose keys areContractId
and values are corresponding contract data that match the current query.
-
find_nonempty
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]], min_count: int = 1, timeout: float = 30) → Dict[dazl.model.core.ContractId, Dict[str, Any]][source]¶ Return data from the current active contract set when at least some amount of rows exist in the active contract set.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
min_count – The minimum number of rows to return. The default value is 1.
timeout – Number of seconds in which to time out the search.
- Returns
A
Future
that is resolved with adict
whose keys areContractId
and values are corresponding contract data that match the current query.
-
find_one
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None, timeout: float = 30) → Tuple[dazl.model.core.ContractId, Dict[str, Any]][source]¶ Return data from the current active contract set when at least some amount of rows exist in the active contract set.
- Parameters
template – The name of the template to fetch data from.
match – An optional dictionary whose keys are matched against corresponding field values.
timeout – Number of seconds in which to time out the search.
- Returns
A
Future
that is resolved with adict
whose keys areContractId
and values are corresponding contract data that match the current query.
-
ledger_archived
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → Callable[dazl.model.reading.ContractArchiveEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
encounters a newly archived contract instance of a template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
match – An (optional) parameter that filters the templates to be received by the callback.
-
ledger_created
(template: Any, match: Union[None, Callable[Dict[str, Any], bool], Dict[str, Any]] = None) → Callable[dazl.model.reading.ContractCreateEvent][source]¶ Register a callback to be invoked when the
PartyClient
encounters a newly created template.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
match – An (optional) parameter that filters the templates to be received by the callback.
-
ledger_exercised
(template: Any, choice: str) → Callable[dazl.model.reading.ContractExercisedEvent][source]¶ Register a callback to be invoked when the
PartyClient
encounters an exercised choice event.- Parameters
template – A template name to subscribe to, or ‘*’ to subscribe on all templates.
choice – The name of the choice to listen for exercises on.
-
ledger_init
() → Callable[dazl.model.reading.InitEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
has been instructed to begin, but before any network activity is started.
-
ledger_packages_added
(initial: bool = False) → Callable[dazl.model.reading.PackagesAddedEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
has detected new packages added to the ledger.- Parameters
initial –
True
to call the handler when the client is ready. This can be useful if you want to handle package additions identically whether they were already in the ledger when the client started up or only after a package has been added. The default value isFalse
, which means that this handler is only called on NEW packages that have been uploaded after this client has started.- Returns
-
ledger_ready
() → Callable[dazl.model.reading.ReadyEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
has caught up to the head of the ledger, but before anyledger_create()
orledger_archive()
callbacks are invoked.
-
ledger_transaction_end
() → Callable[dazl.model.reading.TransactionEndEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
receives a new transaction. Called after individualledger_create()
andledger_archive()
callbacks.
-
ledger_transaction_start
() → Callable[dazl.model.reading.TransactionStartEvent][source]¶ Decorator for registering a callback to be invoked when the
PartyClient
receives a new transaction. Called before individualledger_create()
andledger_archive()
callbacks.
-
ready
() → None[source]¶ Block until the underlying infrastructure has connected to all necessary services.
-
submit_create
(template_name: Union[str, dazl.model.types.TypeReference, dazl.model.types.UnresolvedTypeReference, dazl.model.types.Template], arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → None[source]¶ Synchronously submit a single create command. Equivalent to calling
submit()
with a singlecreate
.- Parameters
template_name – The name of the template.
arguments – The arguments to the create (as a
dict
).workflow_id – The optional workflow ID to stamp on the outgoing command.
-
submit_create_and_exercise
(template_name: Union[str, dazl.model.types.TypeReference, dazl.model.types.UnresolvedTypeReference, dazl.model.types.Template], arguments: dict, choice_name: str, choice_arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → None[source]¶ Synchronously submit a single create-and-exercise command. Equivalent to calling
submit()
with a singlecreate_and_exercise
.- Parameters
template_name – The name of the template on which to do an exercise-by-key.
arguments – The arguments to the create (as a
dict
).choice_name – The name of the choice to exercise.
choice_arguments – The arguments to the exercise (as a
dict
). Can be omitted (None
) for no-argumentworkflow_id – The optional workflow ID to stamp on the outgoing command.
-
submit_exercise
(cid: dazl.model.core.ContractId, choice_name: str, arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → None[source]¶ Synchronously submit a single exercise choice. Equivalent to calling
submit()
with a singleexercise
.- Parameters
cid – The
ContractId
on which a choice is being exercised.choice_name – The name of the choice to exercise.
arguments – The arguments to the exercise (as a
dict
). Can be omitted (None
) for no-argument choices.workflow_id – The optional workflow ID to stamp on the outgoing command.
-
submit_exercise_by_key
(template_name: Union[str, dazl.model.types.TypeReference, dazl.model.types.UnresolvedTypeReference, dazl.model.types.Template], contract_key: Any, choice_name: str, arguments: Optional[dict] = None, workflow_id: Optional[str] = None) → None[source]¶ Synchronously submit a single exercise choice. Equivalent to calling
submit()
with a singleexercise_by_key
.- Parameters
template_name – The name of the template on which to do an exercise-by-key.
contract_key – The value that should uniquely identify a contract for the specified template.
choice_name – The name of the choice to exercise.
arguments – The arguments to the create (as a
dict
). Can be omitted (None
) for no-argument choices.workflow_id – The optional workflow ID to stamp on the outgoing command.
-
dazl.client.api.
simple_client
(url: Optional[str] = None, party: Union[None, str, Party] = None, log_level: Optional[int] = 20) → ContextManager[SimplePartyClient][source]¶ Start up a single client connecting to a single specific party.
- Parameters
url – The URL of the client to connect to. Defaults to the value of the
DAML_LEDGER_URL
environment variable (if set).party – The party to connect as. Defaults to the value of the
DAML_LEDGER_PARTY
environment variable if it is set.log_level – If non-
None
, configure a default logger that logs output at the specified level. The default value isINFO
.
- Returns
A
SimplePartyClient
that can be used in a completely blocking, synchronous fashion.
dazl.client.bots module¶
-
class
dazl.client.bots.
Bot
(party_client: Optional[PartyClient], name: str)[source]¶ Bases:
object
-
add_event_handler
(keys: Union[str, Collection[str]], handler: Callable[E, Any], filter_fn: Optional[Callable[E, bool]] = None) → None[source]¶ Add a new event handler to this bot for the specified event.
- Parameters
keys – The key(s) of the event (as returned by
EventKey.from_event()
).filter_fn – An optional callback that returns True or False on whether the corresponding callback should be invoked. This cannot be a coroutine function.
handler – An event handler to be invoked when an event with the specified key is raised.
-
entries
() → Sequence[dazl.client.bots.BotEntry][source]¶ The collection of individual event handlers in a bot, in the order that they will be executed.
-
event_keys
() → AbstractSet[str][source]¶ Return the set of keys that event handlers in this bot are configured to handle.
-
property
id
¶ The ID of this bot, generated at runtime.
-
property
name
¶ The name of this bot. Defaults to the name of the original event handler if unspecified.
-
notify
(event: dazl.model.reading.BaseEvent) → Awaitable[None][source]¶ Notifies handler(s) associated with this bot that the given event has occurred. Note that this notification is asynchronous: in other words, event handlers will not have processed this event by the time this function returns.
- Parameters
event – The event to raise.
-
property
party
¶ Primary party that this bot receives events for (and potentially generates commands for).
-
pause
() → None[source]¶ Immediately change the state of this bot to
PAUSING
, and pause event handler invocations. The event handler currently running is allowed to complete. When that is completed, the state is changed toPAUSED
.
-
resume
() → None[source]¶ Immediately change the state of this bot to
RESUMING
and process any events that have queued up while the bot was paused. When this queue is fully drained, the state is changed toRUNNING
.
-
property
running
¶ Return
True
if this bot is currently processing events.
-
property
state
¶ Current running state of the bot.
-
-
class
dazl.client.bots.
BotCollection
(party: Optional[NewType.<locals>.new_type])[source]¶ Bases:
typing.Sequence
A collection of bots for a party.
This class is thread-safe except for
notify()
and_main()
in order to support adding event handlers from any thread. The most common use of this is forSimplePartyClient
instances, where event registration is done from the main thread (from the perspective of the caller) and event notifications are done on an asyncio event loop thread (hidden from the caller).
-
class
dazl.client.bots.
BotEntry
(event_key:str, callback:Callable[[~E], Any], filter:Union[Callable[[~E], bool], NoneType]=None, source_location:Union[dazl.model.core.SourceLocation, NoneType]=None)[source]¶ Bases:
object
-
filter
= None¶
-
source_location
= None¶
-
-
class
dazl.client.bots.
BotInvocation
(event:dazl.model.reading.BaseEvent, future:_asyncio.Future=<factory>)[source]¶ Bases:
object
-
class
dazl.client.bots.
BotState
[source]¶ Bases:
enum.Enum
Possible states of a
Bot
.-
PAUSED
= 'PAUSED'¶
-
PAUSING
= 'PAUSING'¶ This bot has been told to pause, but has not yet completed processing events in flight.
-
RESUMING
= 'RESUMING'¶
-
RUNNING
= 'RUNNING'¶
-
STARTING
= 'STARTING'¶ The bot is starting (has not yet received the “ready” event).
-
STOPPED
= 'STOPPED'¶
-
STOPPING
= 'STOPPING'¶
-
-
dazl.client.bots.
wrap_as_command_submission
(submit_fn, callback, filter) → Callable[dazl.model.reading.BaseEvent, Awaitable[Any]][source]¶ Normalize a callback to something that takes a single contract ID and contract data, and return an awaitable that is resolved when the underlying command has been fully submitted.
Module contents¶
dazl.client
package¶
The dazl.client
module a high-level view of the Ledger API in a friendly way.
It provides:
a callback-based API for interacting with events on the read-side of the Ledger API
convenient methods for creating arbitrary commands on the write-side of the Ledger API.
For a higher-level, more declarative API, see dazl.query
.


Package souchon.game.entity
Class WaveManager
- java.lang.Object
-
- souchon.game.entity.WaveManager
-
public class WaveManager extends java.lang.Object
Class of entity to represent a manager of Wave. It is represented by an lvl, an idWave, a finnish as well as an currentWave, aWave
list and aString
list orders.
-
-
Constructor Summary
Constructors Constructor Description WaveManager()
Constructor ofWaveManager
without parametersWaveManager(int lvl)
Constructor ofWaveManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWaveOrder(java.lang.String order, int value)
Add an order for the waves.void
displayWaveOrders()
Display all the order in theWaveManager
java.util.ArrayList<java.lang.String>
getCopyWaveOrders()
Method to copy the waveOrderjava.util.ArrayList<java.lang.String>
getWaveOrders()
boolean
isFinnish()
Method to indicate whether True or False all the waves have finished spawning enemiesvoid
nextWave()
Method to move on to the next wave.void
parseFile(int level)
Method for parsing the game wave configuration fileEnemy
spawnEnemy()
Get the first enemy of the current waveboolean
spawnFinnish()
Method to indicate whether True or False the current wave has finished spawning enemies
-
-
-
Constructor Detail
-
WaveManager
public WaveManager(int lvl)
Constructor ofWaveManager
- Parameters:
lvl
- Actual game level ofWaveManager
-
WaveManager
public WaveManager()
Constructor ofWaveManager
without parameters
-
-
Method Detail
-
getWaveOrders
public java.util.ArrayList<java.lang.String> getWaveOrders()
-
getCopyWaveOrders
public java.util.ArrayList<java.lang.String> getCopyWaveOrders()
Method to copy the waveOrder- Returns:
ArrayList
Copy of the waveOrder
-
displayWaveOrders
public void displayWaveOrders()
Display all the order in theWaveManager
-
nextWave
public void nextWave()
Method to move on to the next wave. If we reach the end of the wave list, we indicate that the game is finished by 'finnish = true'.
-
isFinnish
public boolean isFinnish()
Method to indicate whether True or False all the waves have finished spawning enemies- Returns:
- true if finnish, false else
-
spawnEnemy
public Enemy spawnEnemy()
Get the first enemy of the current wave- Returns:
- the
Enemy
at the top of the list of the current wave
-
addWaveOrder
public void addWaveOrder(java.lang.String order, int value)
Add an order for the waves.- Parameters:
order
- Order to addvalue
- Length of pixel where the order is applied.
-
spawnFinnish
public boolean spawnFinnish()
Method to indicate whether True or False the current wave has finished spawning enemies- Returns:
- true if finnish, false else
-
parseFile
public void parseFile(int level)
Method for parsing the game wave configuration file
-
-


honzi.cz/Writings/Chat Etiquette
- Do not assume that anybody can read your mind:
- Say `afk` if you are leaving for a medium+ amount of time, with an optional number of hours and/or minutes.
- Say `brb` if you are leaving for a small amount of time, with an optional number of minutes and/or seconds.
- Treat chat as you would an improv:
- A less restrictive version of `yes, and` keeps the conversation healthy.
- Make every participant `look good`.


Rieul (Wed, 04 Jul 2018 12:32:45 GMT):
Has joined the channel.
Rieul (Wed, 04 Jul 2018 12:33:01 GMT):
User User_1 added by Rieul.
nicolasloubet (Mon, 09 Jul 2018 20:43:46 GMT):
_o/ Ola. Nous voilà lancé dans la contribution de la FabMob au travers d'un chapitre régional :)
Pour la suite des événements, je rappelle l'existence des comptes-rendus (i) la masterclass de Gabriel Plassat à la MYNE le 28/06 (https://pad.lamyne.org/MeetupFabMob_Energies&Mobilites) (ii) la résidence FabMob à la MYNE autour de l'open source hardware les 28 et 29/06 (https://pad.lamyne.org/La-FabMob-a-la-MYNE)
laurent_chevereau (Thu, 06 Dec 2018 14:44:56 GMT):
Has joined the channel.
davidgabriel (Tue, 02 Jul 2019 10:56:50 GMT):
Quelques nouvelles du coté de Grenoble
Un nouveau projet de recherche propose d'étudier la problématique de l’inclusion numérique des seniors en situation de vulnérabilité dans les zones périurbaines et rurales appliquée aux services de mobilité tels que les plateformes de covoiturage ou sous forme de multi-modalité de transport. Plus d'infos : https://mobipa.univ-grenoble-alpes.fr/presentation
Samedi 6 Juillet : inauguration de l'axe Chronovélo su Agutte Sembat Venez fêter le nouvel axe de la ville en transition !
Plus d'infos : https://www.grenoble.fr/agenda/63554/38-agutte-sembat-venez-feter-le-nouvel-axe-de-la-ville-en-transition.htm?fbclid=IwAR0soW8Zg3KtDahK8oyudnyrJF71qUDduPzDw3TPuMaXorNfu-u87xvMpL0
N'hésitez pas à partager vos informations : communaute_grenoble (a) framalistes.org
et contribuer au wiki des communs : https://wiki.lescommuns.org/wiki/Communs_des_Mobilit%C3%A9s
florian.rony (Tue, 02 Jul 2019 14:05:55 GMT):
Has joined the channel.
Caubel (Tue, 10 Mar 2020 16:54:31 GMT):
Has joined the channel.
laura.foglia (Tue, 10 Mar 2020 17:10:10 GMT):
Has joined the channel.
Jean.ROBERT (Tue, 10 Mar 2020 17:59:43 GMT):
Has joined the channel.
yann.tremeac (Thu, 12 Mar 2020 12:19:19 GMT):
Has joined the channel.
jerome-poyet (Mon, 16 Mar 2020 14:16:45 GMT):
Has joined the channel.
laurence.mechin (Mon, 16 Mar 2020 14:32:31 GMT):
Has joined the channel.
mireille (Mon, 16 Mar 2020 14:34:06 GMT):
Has joined the channel.
pierre.taillant (Mon, 16 Mar 2020 14:47:09 GMT):
Has joined the channel.
remy.leboennec (Mon, 16 Mar 2020 15:27:46 GMT):
Has joined the channel.
lara.hoelting (Tue, 17 Mar 2020 13:31:28 GMT):
Has joined the channel.
nicolas.lb (Fri, 20 Mar 2020 10:47:49 GMT):
Has joined the channel.
kmog (Fri, 20 Mar 2020 11:55:28 GMT):
Has joined the channel.
lea.chretien (Fri, 20 Mar 2020 15:19:07 GMT):
Has joined the channel.
paul_bridier (Fri, 20 Mar 2020 16:08:59 GMT):
Has joined the channel.
Yao (Fri, 20 Mar 2020 19:07:50 GMT):
Has joined the channel.
cecile.lavernhe (Mon, 23 Mar 2020 09:37:28 GMT):
Has joined the channel.
marc.cottignies (Mon, 23 Mar 2020 10:30:14 GMT):
Has joined the channel.
sandrine.carballes (Mon, 23 Mar 2020 10:50:22 GMT):
Has joined the channel.
Kiki (Mon, 23 Mar 2020 13:05:51 GMT):
Has joined the channel.
louise.kold-taylor (Mon, 23 Mar 2020 18:31:53 GMT):
Has joined the channel.
ClaraB (Sun, 29 Mar 2020 15:05:13 GMT):
Has joined the channel.
emmanuel.poisson-quinton (Mon, 30 Mar 2020 08:54:32 GMT):
Has joined the channel.
Cath (Mon, 30 Mar 2020 18:46:58 GMT):
Has joined the channel.
pony (Wed, 01 Apr 2020 09:23:40 GMT):
Has joined the channel.
salvatore.cimmino (Fri, 03 Apr 2020 13:51:37 GMT):
Has joined the channel.
karine (Sat, 04 Apr 2020 19:51:30 GMT):
Has joined the channel.
camillem (Sun, 05 Apr 2020 18:35:45 GMT):
Has joined the channel.
jonatan.cloutier (Tue, 07 Apr 2020 20:47:35 GMT):
Has joined the channel.
marie-pierre.gendron (Fri, 10 Apr 2020 14:42:05 GMT):
Has joined the channel.
Jesse (Fri, 10 Apr 2020 20:41:11 GMT):
Has joined the channel.
gontrand.dumont (Fri, 10 Apr 2020 20:55:01 GMT):
Has joined the channel.
xavier.massicotte (Fri, 10 Apr 2020 21:00:36 GMT):
Has joined the channel.
clem (Fri, 10 Apr 2020 21:28:11 GMT):
Has joined the channel.
marie.tack (Fri, 10 Apr 2020 21:52:00 GMT):
Has joined the channel.
Ysaia (Sat, 11 Apr 2020 01:32:32 GMT):
Has joined the channel.
ameliepb (Sat, 11 Apr 2020 14:18:09 GMT):
Has joined the channel.
laurent.lewis (Sun, 12 Apr 2020 16:22:41 GMT):
Has joined the channel.
Amelie (Sun, 12 Apr 2020 22:36:33 GMT):
Has joined the channel.
Amelie (Sun, 12 Apr 2020 22:40:14 GMT):
Has left the channel.
maude.lapointe (Mon, 13 Apr 2020 15:33:30 GMT):
Has joined the channel.
melissa.dlf (Mon, 13 Apr 2020 16:04:06 GMT):
Has joined the channel.
eva.murith (Mon, 13 Apr 2020 18:27:03 GMT):
Has joined the channel.
mathieu.couture (Mon, 13 Apr 2020 19:23:57 GMT):
Has joined the channel.
penelope.stuart (Mon, 13 Apr 2020 19:32:10 GMT):
Has joined the channel.
guillaume.fortin (Mon, 13 Apr 2020 19:34:23 GMT):
Has joined the channel.
chloe.fortier.devin (Mon, 13 Apr 2020 19:36:22 GMT):
Has joined the channel.
Romain_Gayet (Mon, 13 Apr 2020 19:37:26 GMT):
Has joined the channel.
nestel.jeremie (Tue, 14 Apr 2020 09:23:55 GMT):
Has joined the channel.
HeleneCauchoix (Tue, 14 Apr 2020 18:50:35 GMT):
Has joined the channel.
marie-helene.beaudry (Tue, 14 Apr 2020 22:35:31 GMT):
Has joined the channel.
mathieu.couture (Wed, 15 Apr 2020 14:12:48 GMT):
Has left the channel.
alexandre g (Fri, 17 Apr 2020 10:04:31 GMT):
Has joined the channel.
test_du_nouveau_bouton (Fri, 17 Apr 2020 13:01:05 GMT):
Has joined the channel.
ju.tav (Fri, 17 Apr 2020 16:34:01 GMT):
Has joined the channel.
Arthur (Fri, 17 Apr 2020 16:43:01 GMT):
Has joined the channel.
Pierre_Lagrandmaison (Mon, 20 Apr 2020 14:48:33 GMT):
Has joined the channel.
diana.borda (Wed, 22 Apr 2020 02:01:20 GMT):
Has joined the channel.
marie-reine.roy (Thu, 23 Apr 2020 13:00:41 GMT):
Has joined the channel.
ValerieM (Thu, 23 Apr 2020 16:47:02 GMT):
Has joined the channel.
melanie.marceau-d (Fri, 24 Apr 2020 15:33:28 GMT):
Has joined the channel.
cynthia.hamel-kropf (Sun, 26 Apr 2020 20:33:46 GMT):
Has joined the channel.
BENOIT_TROUVE (Mon, 27 Apr 2020 06:16:36 GMT):
Has joined the channel.
ali.saidi (Mon, 27 Apr 2020 20:08:17 GMT):
Has joined the channel.
AnneJulie_AB (Mon, 27 Apr 2020 22:22:55 GMT):
Has joined the channel.
alexandre.barreto (Tue, 28 Apr 2020 07:17:02 GMT):
Has joined the channel.
thierry.lachapelle (Tue, 28 Apr 2020 12:27:37 GMT):
Has joined the channel.
clement (Tue, 28 Apr 2020 17:37:13 GMT):
Has joined the channel.
helene.dimanche (Tue, 28 Apr 2020 20:28:58 GMT):
Has joined the channel.
Julie-Scheid (Wed, 29 Apr 2020 14:27:13 GMT):
Has joined the channel.
veloma (Wed, 29 Apr 2020 18:55:39 GMT):
Has joined the channel.
leandre (Wed, 29 Apr 2020 23:06:08 GMT):
Has joined the channel.
camille.jolain (Fri, 01 May 2020 01:54:00 GMT):
Has joined the channel.
johanne.belle-isle (Fri, 01 May 2020 17:07:03 GMT):
Has joined the channel.
RPP-Ysaia-Melanie-Chloe (Fri, 01 May 2020 18:53:45 GMT):
Has joined the channel.
damien.lhouillier (Mon, 04 May 2020 13:59:59 GMT):
Has joined the channel.
tqmn (Mon, 04 May 2020 16:12:37 GMT):
Has joined the channel.
gabriel.plassat (Tue, 05 May 2020 08:14:54 GMT):
Room name changed to: 0-region_rhone_alpes by gabriel.plassat
HeleneCauchoix (Sun, 07 Jun 2020 21:20:42 GMT):
Bonjour @all ! Je ne sais pas si c'est le bon canal, voici le lien vers une rencontre contributive qui pourrait alimenter ou être alimenté par des contributeurs de la Fabrique des Energies.
HeleneCauchoix (Sun, 07 Jun 2020 21:22:26 GMT):
Clipboard - 7 juin 2020 23:22
gabriel.plassat (Fri, 17 Jul 2020 15:04:27 GMT):
Has joined the channel.
gabriel.plassat (Fri, 17 Jul 2020 15:04:28 GMT):
Nous serons à Lyon du 27 au 30 juillet dans le cadre d'une résidence FabMob / FabEnergies. Tous les adhérents et acteurs de la mobilités sont invités à nous rejoindre. Le programme : https://pad.lamyne.org/fabenergies_residence-corsenat?view#1--Probl%C3%A9matiques
Ce canal https://chat.fabenergies.cc/channel/res_aura-general permet d'avoir accès à toutes les infos et à préparer la résidence :thumbsup:
cc @Rieul @nicolasloubet @amandine.volard
amandine.volard (Fri, 17 Jul 2020 15:04:28 GMT):
Has joined the channel.
Rieul (Fri, 17 Jul 2020 15:20:41 GMT):
Nous vous invitons grandement **à renseigner la section "Participant·e·s"** de ce document https://pad.lamyne.org/fabenergies_residence-corsenat?view#04--Participant-es si vous prévoyez de venir afin que nous soyons en capacité d'assurer les conditions nécessaires pour votre accueil dans le respect des règles sanitaires en vigueur.
gabriel.plassat (Mon, 27 Jul 2020 10:00:01 GMT):
[Cluster Mobilité] à découvrir => https://clustermobilite.wordpress.com/
qui est membre ?


WOMEN SAFETY
Women are used to being worshipped as goddesses; people pray for their blessings. This practice in our country and society is much older than one could imagine. In the Indian society, women have always been portrayed as powerful goddesses, who are the savior of all mankind.
It can be said that because women were always viewed as a deities or an idol, they are confined to their homes and prohibited from going outside. Even if women do step outside, they are always asked or rather ordered to be in the company of a man. Or maybe that's what our society has been teaching us – Man is sole protector.
The incidents of crime against women have risen sharply over the past few years. The latest National Crime Records Bureau data reflects how incidents of rapes have gone up by 12-15%, while other crimes have risen by 3-5%.  In many of the families, it is still believed that an incident where the woman gets harassed, molested, or raped- she brings shame to the family. No one encourages victims of sexual abuse or assault to speak up about it or even register complaints, thanks to the stigma attached to such crimes. Crime against women are on the rise and it makes one wonder- have we become so primitive in our actions, so insensitive and inhumane, that we fail to even recognize the other as mere humans?
Reporting any crime, especially in rural India is not an easy job. The stigma of crimes like sexual assault is so pervasive that the first response to a rape, molestation, stalking etc. is more often than not victim-shaming. Women are ridiculed for their choice of clothes and labelled as someone who were ‘asking for it’, when they are teased, groped or raped. Even politicians, religious Gurus or people holding public office, have gone on record to make statements that make you doubt their sanity in the first place. Westernization is another term used by the patriarchal society which is used as an excuse for harassing women for being too "modern".
Conviction rates in India are very poor. Only one in four rape cases result in a prosecution.
Women must never compromise or adjust in an unhealthy environment, and must always speak up against any inconvenience or passive eve teasing. Not raising their voices against the unjust practices of the society only gives the perpetrators an upper hand and helps them get away with their shameful actions. Active dialogue and debate must be carried out to change our thought process. Proper education and implementation of stricter laws are also required which would certainly help change mindsets.


Posted on August 1, 2016 at 10:45 PM
Yangon International Airport is the main hub for domestic flights, and there are a number of services linking the main centres of the country. Local airlines include Air Bagan (airbagan.com) and Myanmar National Airlines (flymna.com). Note that it is cheaper and easier to book domestic flights via agencies once you are in Myanmar.
There are no international car-rental agencies, but most travel agencies in Yangon, Mandalay and Bagan – as well as guesthouses and hotels elsewhere – can arrange cars and drivers.
In places open to foreigners, Myanmar is relatively safe, with very little crime. Still, you should take the usual precautions of using hotel lockers or safes for your valuables. Female travellers should not experience any harassment or different treatment. No-go zone: Some parts of the country remain closed to foreigners due to ongoing conflict between the government and various ethnic armies clustered in eastern and northern Myanmar. These areas are mostly in Kachin and Shan States, close to the frontiers with China and Thailand, and far from the major tourist destinations. Although some countries – including the UK and Australia – still advise against travel to Rakhine (Rakhaing) State in western Myanmar (following sectarian violence in 2012) Mrauk U is now seeing increasing numbers of tourists. Accurate information on conflicts and closed areas can be difficult to come by. Check your government’s advice prior to travel, and ask about the situation once you are in Myanmar. Lonely Planet’s Thorn Tree travel forum is a good source of news from travellers on the ground.


| Procedure | Location | Procedure Type | Description |
|---|---|---|---|
| allocate | m_allocate | Interface | Allocate an allocatable array. If the array is already allocated, memory is reallocated to the given size, unless no size change will occur. The allocated memory is NOT initialized to any value, so be sure to do so afterwards if you call allocate. |
| allocate_test | m_tests | Subroutine | |
| appendString | m_strings | Function | Append a string |
| arange | m_array1D | Interface | Create a 1D array from start to stop in given increments of 1 or optionally step |
| argInsertionsort | m_sort | Interface | Perform an indirect insertion sort on an array |
| argMedianOf3 | m_medianOf3 | Interface | Sort the indices of three numbers into an array and return the location of the median |
| argPartition | m_partition | Interface | Partitioning used for argQuicksort routines |
| argSelect | m_select | Interface | Use an indirect introspection sort on an array of numbers |
| argSort | m_sort | Interface | Use an indirect introspection sort on an array of numbers |
| array1D_test | m_tests | Subroutine | |
| binarySearch | m_searching | Interface | Perform a binary search. See m_searching for more information on how to use this interface |
| checkIsOpen | m_fileIO | Subroutine | Checks whether a file is open with an error message if not |
| closeFile | m_fileIO | Subroutine | Close a file and perform any necessary checks |
| compact | m_strings | Subroutine | Replace tabs and spaces with a single space str must be a variable and not an explicit 'string'. Otherwise adjustl will fail. |
| compare | m_compare | Interface | |
| compare_d1 | m_compare | Function | |
| copy | m_copy | Interface | Copies an array to new memory (no pointers), The output array size will be changed to match the copy. |
| copy_test | m_tests | Subroutine | |
| countEntries | m_strings | Function | Count the number of entries in a string |
| crossproduct | m_maths | Interface | Compute the cross product between two arrays of length 2 or 3 |
| cumprod | m_maths | Interface | Compute the variance of an array |
| cumsum | m_maths | Interface | Compute the variance of an array |
| dArgDynamicArray | dArgDynamicArray_Class | Interface | |
| dArgDynamicArray_test | m_tests | Subroutine | |
| daysInMonth | m_time | Function | Get the number of days in a month. Accounts for leap years |
| daysInYear | m_time | Function | Get the number of days in a year, accounts for leap years |
| dDynamicArray | dDynamicArray_Class | Interface | |
| dDynamicArray_test | m_tests | Subroutine | |
| deallocate | m_deallocate | Interface | Deallocate an allocatable array. |
| debug | m_debugging | Interface | Interface for printing primitives with a name for debug purposes All may be called using 'call debug(args)' |
| debug_s | m_debugging | Subroutine | |
| deleteFile | m_fileIO | Subroutine | Deletes a file on disk |
| diff | m_array1D | Interface | Compute the difference along an array |
| eMsg | m_errors | Subroutine | Write an Error message. Stops the code |
| fastTwoDiff | m_maths | Interface | Compute the difference two numbers and compute the numerical round-off error. See Shewchuk 1997 Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates This should only be used if you know that the magnitude of a is greater than or equal to b, otherwise, you should use the slower twoDiff routine |
| fastTwoSum | m_maths | Interface | Compute the sum of two numbers and compute the numerical round-off error. See Shewchuk 1997 Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates This should only be used if you know that the magnitude of a is greater than or equal to b, otherwise, you should use the slower twoSum routine |
| fErr | m_errors | Subroutine | Checks for a file error |
| fileExists | m_fileIO | Function | Checks whether the file with name fName exists on disk |
| fileIO_test | m_fileIO | Subroutine | |
| geometricMean | m_maths | Interface | Compute the geometric mean of a vector |
| getExtension | m_fileIO | Function | Get the extension of a file |
| getFileSize | m_fileIO | Function | Get the file size in Bytes |
| getNFileLines | m_fileIO | Function | Counts the number of lines in a file after the number of specified header lines |
| getRandomSeed | Prng_Class | Subroutine | Gets a randomly generated seed by getting the current integer time and then using a splitmix algorithm to generate the necessary number of seeds. |
| hasExtension | m_fileIO | Function | Checks if a file 'fname' is of type 'extension' |
| hasNentries | m_strings | Function | Check that a string has N entries |
| iachar1D | m_strings | Function | Use iachar on a full string |
| iArgDynamicArray | iArgDynamicArray_Class | Interface | |
| iArgDynamicArray_test | m_tests | Subroutine | |
| idArgDynamicArray | idArgDynamicArray_Class | Interface | |
| idArgDynamicArray_test | m_tests | Subroutine | |
| idDynamicArray | idDynamicArray_Class | Interface | |
| idDynamicArray_test | m_tests | Subroutine | |
| iDynamicArray | iDynamicArray_Class | Interface | |
| iDynamicArray_test | m_tests | Subroutine | |
| ind2sub | m_indexing | Function | Compute the indices in each dimension from the global index |
| indexing_test | m_tests | Subroutine | |
| insertionsort | m_sort | Interface | Perform an in-place insertion sort on an array |
| integerBin | m_indexing | Function | |
| intervalSearch | m_searching | Interface | Perform an interval search on an array Returns a length 3 integer(i32) array where the last two entries are the left and right neighbours The first entry of iout is -1 if the value is not present in the vector Assumes this is sorted!See m_searching for more information on how to use this interface |
| isLeapYear | m_time | Function | Determine whether the year is a leap year |
| isOpen | m_fileIO | Function | Is the file open or not |
| isSorted | m_array1D | Interface | Check that a 1D array is sorted |
| isString | m_strings | Function | Match two string together |
| KdTree | m_KdTree | Interface | Overloaded Initializer for a KdTree. |
| KdTree_test | m_tests | Subroutine | |
| lowerCase | m_strings | Function | Convert a string to lowercase |
| maths_test | m_tests | Subroutine | |
| mean | m_maths | Interface | Compute the mean |
| median | m_maths | Interface | Compute the median of a set of numbers |
| medianOf3 | m_medianOf3 | Interface | Sort three numbers in an array and return the location of the median |
| mErr | m_errors | Subroutine | Checks for successful (de)allocation. Stops the code. |
| msg | m_errors | Subroutine | Write a message |
| norm1 | m_maths | Interface | Compute the L1 norm of a set of numbers |
| normI | m_maths | Interface | Compute the Linfinity norm of a set of numbers |
| openBinaryFile | m_fileIO | Subroutine | Open an unformatted binary file stat should be 'new','old','unknown','append' |
| openFile | m_fileIO | Subroutine | Open a file and perform necessary checks for failure stat should be 'new','old','unknown','append' |
| partition | m_partition | Interface | Partitioning used for quickSort and quickSelect routines |
| partition3way | m_partition3way | Interface | Partitioning used for quicksort routines |
| partition3way_d1D | m_partition3way | Subroutine | Interfaced with partition() |
| prependString | m_strings | Function | Prepend a string |
| Prng | Prng_Class | Interface | Overloaded Initializer for a Prng - Pseudo random number generator. Thread safe, xorshift1024* or xorshift128+ generator than can draw from different distributions. See Prng_Class for more information on how to use this class. |
| Prng_test | m_tests | Subroutine | Test the jump capabilities of the xorshift128+ in parallel |
| ProgressBar | ProgressBar_Class | Interface | |
| project | m_maths | Interface | Project a vector a onto vector b |
| random_test | m_tests | Subroutine | |
| rArgDynamicArray | rArgDynamicArray_Class | Interface | |
| rArgDynamicArray_test | m_tests | Subroutine | |
| rDynamicArray | rDynamicArray_Class | Interface | |
| rDynamicArray_test | m_tests | Subroutine | |
| read1Dble | m_strings | Subroutine | |
| read1Integer | m_strings | Subroutine | Get a single integer from a line, returns an error code if there is more than one entry |
| readline | m_readline | Interface | Read in multiple items from a line |
| readline | m_strings | Subroutine | Reads a line from a file, ignoring any comments |
| reallocate | m_reallocate | Interface | Reallocate an allocatable array |
| reallocate_test | m_tests | Subroutine | |
| removeComments | m_strings | Subroutine | Removes the text after the ! mark in a string |
| repeat | m_array1D | Interface | Repeat each element nRepeat times |
| replacedelim | m_strings | Subroutine | Replace a single character length delimiter in a string |
| rngExponential | m_random | Interface | |
| rngExponential_d1 | m_random | Subroutine | Interfaced with rngExponential |
| rngExponential_d1D | m_random | Subroutine | Interfaced with rngExponential |
| rngExponential_d2D | m_random | Subroutine | Interfaced with rngExponential |
| rngExponential_d3D | m_random | Subroutine | Interfaced with rngExponential |
| rngExponential_unscaled_d1 | Prng_Class | Interface | |
| rngInteger | m_random | Interface | Generate size(this) random integers starting from imin |
| rngInteger_i1 | m_random | Subroutine | Interfaced with rngInteger |
| rngInteger_i1D | m_random | Subroutine | Interfaced with rngInteger |
| rngInteger_i2D | m_random | Subroutine | Interfaced with rngInteger |
| rngInteger_i3D | m_random | Subroutine | Interfaced with rngInteger |
| rngNormal | m_random | Interface | |
| rngNormal_d1 | m_random | Subroutine | Interfaced with rngNormal |
| rngNormal_d1D | m_random | Subroutine | Interfaced with rngNormal |
| rngNormal_d2D | m_random | Subroutine | Interfaced with rngNormal |
| rngNormal_d3D | m_random | Subroutine | Interfaced with rngNormal |
| rngUniform | m_random | Interface | |
| rngUniform_d1 | m_random | Subroutine | Interfaced with rngUniform |
| rngUniform_d1D | m_random | Subroutine | Interfaced with rngUniform |
| rngUniform_d2D | m_random | Subroutine | Interfaced with rngUniform |
| rngUniform_d3D | m_random | Subroutine | Interfaced with rngUniform |
| rngUniform_xorshift | Prng_Class | Subroutine | |
| rngWeibull | m_random | Interface | |
| rngWeibull_d1 | m_random | Subroutine | Interfaced with rngWeibull |
| rngWeibull_d1D | m_random | Subroutine | Interfaced with rngWeibull |
| rngWeibull_d2D | m_random | Subroutine | Interfaced with rngWeibull |
| rngWeibull_d3D | m_random | Subroutine | Interfaced with rngWeibull |
| secondsToHMS | m_time | Function | Convert a time in seconds to HH:MM:SS.MSEC |
| select | m_select | Interface | Use an in-place quick select on an array of numbers |
| select_test | m_tests | Subroutine | |
| setPrng | m_random | Interface | |
| setPrng_withSeed | m_random | Subroutine | Interfaced to setPrng() Sets the seed of the random number generator with a specified seed |
| setPrng_WOseed | m_random | Subroutine | Interfaced to setPrng() 'Randomly' sets the seed of the random number generator |
| shuffle | m_array1D | Interface | Perform Knuth shuffling on an array |
| simpleSearch | m_searching | Interface | Carry out a brute force search on an array for a given number. Returns -1 if the value is not found. |
| skipFileLines | m_fileIO | Subroutine | Skip N lines in a file |
| sort | m_sort | Interface | Use an in-place introspection sort on an array of numbers |
| sorting_test | m_tests | Subroutine | |
| std | m_maths | Interface | Compute the standard deviation of an array |
| str | m_strings | Interface | Interface to print a string representation of a number The output format options can be set using the printOptions class |
| strings_test | m_tests | Subroutine | |
| sub2ind | m_indexing | Function | Given component indices, get the global vector location. |
| swap | m_swap | Interface | Swap the values of two variables |
| test | scaleTest_coretran | Subroutine | |
| tester | m_unitTester | Interface | |
| time_test | m_tests | Subroutine | |
| timeInSeconds | m_time | Function | Convert hours minutes seconds etc. to seconds |
| timeToInteger | m_time | Function | Convert hours minutes seconds etc. to an integer. Use 64bit to prevent the 2038 problem. |
| trimExtension | m_fileIO | Function | Trims the extension of a filename |
| trimmedmean | m_maths | Interface | Compute the Trimmed mean of an array, alpha is a percent value to trim from either end |
| twoDiff | m_maths | Interface | Compute the difference between two numbers and compute the numerical round-off error. See Shewchuk 1997 Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates If you know that the magnitude of a is greater than or equal to b, use fastTwoDiff |
| twoSum | m_maths | Interface | Compute the sum of two numbers and compute the numerical round-off error. See Shewchuk 1997 Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates If you know that the magnitude of a is greater than or equal to b, use fastTwoSum |
| upperCase | m_strings | Function | Convert a string to uppercase |
| variance | m_maths | Interface | Compute the variance of an array |
| wMsg | m_errors | Subroutine | Write a Warning message |
| writeline | m_writeline | Interface | Write multiple items to a line |


Floppies
问题描述 :
In this age of Internet, on-line connections, instantaneous email, etc., there are still some people who need to work with floppy disks. John is one of those. Every evening he goes home and continues what he has been doing in his office on his private UNIX system. He copies all the files he needs to floppy disks according to the following procedure:
1. Put all files in one big SHAR file.
2. Compress the file.
3. Uuencode it, such that it is split in nice lines of 62 characters each (including the new-line).
4. Split it in files of 30,000 lines each (about 1.86Mb).
5. Compress each of the files and put it on a floppy by itself.So far, this procedure always worked, since 1.86Mb of uuencoded text, after compression, will nicely fit on a 1.44Mb floppy disk.Now, given that through compression the size of the SHAR file halves and that uuencoding a compressed file adds 50% to its size (each rounded to the nearest integer number of bytes), we would like to know for a given size of the SHAR file how many floppies John needs.
1. Put all files in one big SHAR file.
2. Compress the file.
3. Uuencode it, such that it is split in nice lines of 62 characters each (including the new-line).
4. Split it in files of 30,000 lines each (about 1.86Mb).
5. Compress each of the files and put it on a floppy by itself.So far, this procedure always worked, since 1.86Mb of uuencoded text, after compression, will nicely fit on a 1.44Mb floppy disk.Now, given that through compression the size of the SHAR file halves and that uuencoding a compressed file adds 50% to its size (each rounded to the nearest integer number of bytes), we would like to know for a given size of the SHAR file how many floppies John needs.
输入:
The input contains several test cases. Each test case consists of a single line containing one integer s (0 <= s <= 1,000,000,000), specifying the size of the SHAR file in bytes.The file ends with a file having s = 0. Do not generate output for this file.
输出:
For each test case, first output the number of the test case (‘File #1′, ‘File #2′, etc.), followed by a line that contains the minimal number of floppies needed for the transfer and a blank line. Adhere to the format shown below in the sample output.
样例输入:
1000000 10000000 100000000 0
样例输出:
File #1 John needs 1 floppies. File #2 John needs 5 floppies. File #3 John needs 41 floppies.
这题是个简单题 但是在网上几乎没有人提供AC经验 从题库上看，做出来的人也不多
这道题就是传说中的害人题 关卡全在看懂题目
这句话是关键：
given that through compression the size of the SHAR file halves and that uuencoding a compressed file adds 50% to its size
#include <stdio.h> int main() { double in; int out,count = 1; while(scanf("%lf",&in)!=EOF,in!=0) { in *= 0.75; // 相当于in = in / 2 * 1.5 in /= (1.86*1000000); out = (int)in; if(in - out != 0) { out++; } printf("File #%d\nJohn needs %d floppies.\n\n",count++,out); } return 0; }
解题报告转自：http://hi.baidu.com/balxajneatbmtwd/item/2e48da71a4604d3b7044233f
(adsbygoogle = window.adsbygoogle || []).push({});
作者我永远支持你 新年快乐 我的新年愿望是希望是请你一定要把这部漫画继续做下去
作者我永远支持你 新年快乐 我的新年愿望是希望是请你一定要把这部漫画继续做下去
作者我永远支持你 新年快乐 我的新年愿望是希望是请你一定要把这部漫画继续做下去
作者我永远支持你 新年快乐 我的新年愿望是希望是请你一定要把这部漫画继续做下去
多谢提醒
漏了一个"不"，已修正:)
不同的编译器，printf(),执行的顺序不同，所以结果也就不同，建议不要那么写
位运算真赞
为什么for循环找到的i一定是素数叻，而且约数定理说的是n=p1^a1*p2^a2*p3^a3*…*pk^ak，而你每次取余都用的是原来的m，也就是n
处凡愚而不减，在圣贤而不增；
住烦恼而不乱，居禅定而不寂。
整理的很好，多谢
代码可真够长的！
图像处理那题解题报告在哪儿呢？
Thank you very much
全是智力分析的题
very good solutions.


33
1 Before God's prophet Moses died, he asked God to bless the Israelite people.
2 This is what he said:
"Yahweh came and spoke to us at Mount Sinai;
he came like the sun rises in the region of Edom
and like his light shone on us when we were in the desert near Mount Paran after we left Mount Sinai.
He came with ten thousand angels,
and there was a flaming fire at his right side.
3 Yahweh truly loves his people
and protects all those who belong to him.
So they prostrate themselves in front of him,
and they listen to his instructions.
4 I gave them laws to obey,
laws that would forever be for the descendants of Jacob.
5 So Yahweh became the king of his Israelite people
when all the tribes and their leaders had gathered together.
6 I say this about the tribe of Reuben:
I desire that their tribe will never disappear,
but that they will never become numerous.
7 I say this about the tribe of Judah:
Yahweh, listen to them when they call out for help;
and after they separate from the other tribes, unite them with the other tribes again.
Fight for them,
and help them to fight against their enemies.
8 I say this about the tribe of Levi:
Yahweh, give to those who are dedicated to you the sacred stones that they will use to find out what you want to be done;
You tested them at a spring in the desert, a spring that they named Massah and also named Meribah
to find out if they would remain loyal to you.
9 The tribe of Levi did what you told them to do
and obeyed the covenant that you had made with the Israelite people;
those laws were more important to them
than their siblings and parents and children.
10 The tribe of Levi will teach the Israelite people your decrees and your laws,
and they are the ones who will burn incense and who will completely burn on the altar the offerings that the people bring.
11 Yahweh, bless their work
and accept all that they do.
Crush all their enemies;
do not enable their enemies to be able to fight against them again.
12 I say this about the tribe of Benjamin:
They are the tribe that Yahweh loves;
he keeps them safe.
He protects them continually,
and he lives among their hills .
13 I say this about the tribes of Joseph:
I desire that Yahweh will bless their land
by giving them rain from the sky
and water from deep down in the ground,
14 by giving them good fruit ripened by the sun
and good crops in the right months.
15 I desire that very nice fruit will grow on trees in their ancient mountains.
16 I desire that their land will be filled with many good crops,
blessed by Yahweh, the one who appeared to me in a burning bush.
I desire that Yahweh will bless the tribes of Joseph in all those ways,
because he was his older brothers' leader when they were in Egypt.
17 The descendants of Joseph will be as strong as a bull;
with their weapons they will wound their enemies like a wild ox gores other animals with its horns.
They will push other people groups,
all of them, to the most distant places on the earth.
That is what the descendants of the two sons of Joseph will do,
the ten thousands of the tribe of Ephraim and the thousands of the tribe of Manasseh.
18 I say this about the tribes of Zebulun and Issachar:
I desire that the people of Zebulun will prosper in their travels across the seas,
and that the people of Issachar will prosper while they stay at home and take care of their cattle and crops.
19 They will invite people from the other Israelite tribes to the mountain where they worship Yahweh,
and they will offer correct sacrifices to him.
They will become rich from the trade that they carry out on the seas
and from using the sand along the sea to make things.
20 I say this about the tribe of Gad:
Praise Yahweh, the one who made their territory large.
The people of their tribe will attack their enemies fiercely like a lion that crouches,
waiting to tear off the arm or the scalp of some animal.
21 They chose the best part of the land for themselves;
a large share of the land, a share that should be given to a leader was allotted to them.
When the leaders of the tribes of Israel gathered together,
they decided that the tribe of Gad should have a large share of the land.
The tribe of Gad obeyed the commands of Yahweh and the things that he decided that they should do.
22 I say this about the tribe of Dan:
The people of the tribe of Dan are like a young lion;
they leap out from their caves in the region of Bashan to attack their enemies.
23 I say this about the tribe of Naphtali:
The people of the tribe of Naphtali have been blessed by Yahweh, who has been very kind to them;
their land extends far south from Lake Galilee.
24 I say this about the tribe of Asher:
Yahweh will bless the descendants of Asher more than he will bless the other tribes.
Yahweh will favor them most of all.
I desire that their land will be filled with olive trees that will produce a lot of olives to make olive oil.
25 Their towns will be protected by high walls with gates that have bronze and iron bars;
I desire all the time that they live and not be harmed by anyone.
26 You people of Israel, there is no god like your God,
who rides majestically across the sky to help you.
27 God, who lives forever, is the one who gives you refuge;
it is as though he puts his everlasting arms under you to support you.

There is certainly no nation like your nation,
whom Yahweh has rescued from being slaves in Egypt.


HTTP/1.1
draft, allows persistent connections. These
long-lived HTTP sessions allow multiple requests to be send over the
same TCP connection, and in some cases have been shown to result in an
almost 50% speedup in latency times for HTML documents with lots of
images.
Note: Apache 1.2 uses a different syntax for the KeepAlive directive.
KeepAlive 5
This directive enables Keep-Alive support. Set max-requests
to the maximum number of requests you want Apache to entertain per
connection. A limit is imposed to prevent a client from hogging your
server resources. Set this to 0
to disable support.
KeepAliveTimeout 15
The number of seconds Apache will wait for a subsequent request before
closing the connection. Once a request has been received, the timeout
value specified by the Timeout
directive
applies.
However, Keep-Alive support only is active with files where the length is known beforehand. This means that most CGI scripts, server-side included files and directory listings will not use the Keep-Alive protocol. While this should be completely transparent to the end user, it is something the web-master may want to keep in mind.


Sena-NCP-Congress to 'parade' 162 MLAs in Mumbai hotel to prove majority
"We are all one and together, watch our 162 together for the first time at grand Hyatt at 7 pm, come and watch yourself @maha_governor
by Press Trust of IndiaThe Shiv Sena, the NCP and the Congress will "parade" 162 MLAs in a five-star hotel in Mumbai on Monday evening as a proof of their combined strength in the 288-member Assembly, senior Sena leader Sanjay Raut said.
Announcing the move on his tweeter handle, Raut appealed to state Governor Bhagat Singh Koshyari to witness the "parading" of the legislators of the three parties.
"We are all one and together, watch our 162 together for the first time at grand Hyatt at 7 pm, come and watch yourself @maha_governor.
He tagged the official twitter handle @maha_governor of the Governor.
"The idea is to turn the public perception towards us. Once we parade 162 MLAs in one hall, entire nation will come to know that BJP is playing a dirty game in Maharashtra by misusing office of the governor," said an NCP leader.
The MLAs of the Sena, the NCP and the Congress are currently staying at different hotels in Mumbai.


Sandpiles
About
This document describes how to use the Sandpiles program. It is most definitely a work in progress.
Currently, it walks through the different interface panels, explaining how to use each feature.
Comments, questions, feature requests, and bug reports should be sent to<EMAIL_ADDRESS>More information about sandpiles work can be found here.
Running
The program itself can be found in dist-[your system]. Once, there, you can either double click on SandpilesApp.jar (on most systems), or run "java -jar SandpilesApp.jar" from the command line.
Note:
On some linux systems, you may have to add "." to your LD_LIBRARY_PATH. To do this, from the terminal, run:
$ LD_LIBRARY_PATH = .:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH
Basic Graph and Configuration Editing
When you first open the Sandpiles program, you will notice a big black block (called the canvas), a side panel, and toolbars at the top and bottom of the screen.
We will begin with a simple example to explain basic editing features.
On the sidebar, "edit graph" should be selected and the graph editing tools displayed. They look like this:
With "add vertex" selected, click on the canvas and gray block will appear. If it doesn't, make sure you are just clicking and not dragging the mouse at all. This is a vertex of a graph on which you will be running your sandpile simulation.
To get a closer look, you can zoom in using either the mouse wheel or the zoom controls at the top toolbar. Clicking and dragging moves around the canvas.
Create four more vertices in a kite shape so that you end with something that looks like:
If you make a mistake, ctrl-z/ctrl-y (or cmd-z/cmd-y on a Mac) will undo/redo. This can also be accessed in the "Edit" menu. If you want to start over, press "Del. Graph".
Now, this graph won't do a lot in its current state since none of the vertices are connected.
So we need to create some edges. First, select "Add Edge" on the side panel.
Next, hold down shift, click on the vertex at the top, then let go of shift. This selects the vertex.
Alternatively, you can click on "Select" at the top right and then click on the vertex, but you will have to click on "Edit" afterwards to create the edges. Holding down shift is equivalent to being in "Select" mode.
This should look like:
Now, with "Add Edge" selected, click on the rightmost and leftmost vertices.
You will see white lines appear between your selected vertex and those two vertices.
These are the edges. In fact, these edges are directed and weighted, but you can't currently
see what direction they are pointing or their weight is.
To remedy this, go the "Visual Options" tab and check "Draw Edge Labels".
Little "1"s should appear next to the white lines, closer to the bottom vertices, like so:
They are off by default because on larger graphs, they can really slow things down.
Notice that the vertex changed size when you created the edges.
The size of the vertex is dependent on the amount of sand on it divided by its outgoing degree.
This vertex now has degree 2 and 0 grains of sand on it, so it is quite small.
You can turn this feature off in the "Visual Options" tab.
Also, notice the bottom toolbar:
It contains some useful pieces of information.
- "Center" shows the current coordinates of the center of the canvas.
- The grayed out "None: Cancel" allows you to cancel operations that may take a long time.
- "Sel. Center" shows the coordinates of the center of the selected vertices (vertex in this case). Clicking on it will center the canvas at that point.
- Sand is total amount of sand on the selected vertices.
- Degree is total outgoing degree of the selected vertices.
- Firings is total number of times the selected vertices have fired (you can reset this counter using "Reset Firings Count").
Now, we should add some more edges. To unselect the top vertex, hold down shift (or go into "Select" mode) and click on a blank piece of canvas.
Still holding down shift, click and drag. A green selection box will be drawn. Use this to select the left and right vertices. Let go of shift (or go back to "Edit" mode). With "Add Edge" still selected, click on the second lowest vertex. Notice that an edge is drawn from both selected vertices to the target vertex.
Hold down shift again and click on one of the selected vertices. Clicking on a vertex with shift down both selects and unselects vertices. Switch to "Add Undirected Edge" in the side panel. Click on the vertex you just unselected (without holding down shift). An edge appears with "1"s on either side, indicating that the weight of the edge is 1 in both directions.
Finally, unselect the vertex and select the second lowest one. Create a directed edge from it to the topmost vertex and another one to the bottom most vertex. The result should look like:
Go to the "Config Manager" tab. It looks like this:
A configuration is a distribution of sand on the vertices of a graph.
The list in the config manager contains all stored configurations. At first, it contains only a set of calculated configurations, but if you've found a configuration you would like to keep track of, you can click "Store" to add it to the list.
"Add" and "Subtract" will, respectively, add and substract the selected configuration from the current configuration. "Set" will set the current configuration to the selected one. The "Times" counter will multiply the selected configuration by the number for whatever operation you've chosen. So, to add 1000 grains of sand to the configuration, you would select "Random Grain", set
"Times" to 1000, and press "Add".
To add, remove, or set sand for specific vertices, you select the operation you want under "On click:" and click on the vertex. Go ahead and try it. Notice that the colors change in correspondence to the number of grains you add. By default, the number of grains is not written on the vertices. You can change this in the visual options. You can also see the number of grains by selecting the vertex. You can change the colors in Edit->Preferences. The preferences dialogue is very much a work in progress at this point, though color changing is fully functional and it will remember your preferences between sessions.
Try adding an amount of sand equal to or greater than the degree of a vertex (for any but the bottom vertex). Press "Run". The colors change as the vertices fire. After a couple of steps, the sandpile will stabilize and stop moving. To change the speed at which the simulation runs, change the "Delay" field above (either by using the buttons or directly editing).
If you wish to save your work on a graph, you can use Ctrl-s (or Cmd-s for Mac). Saved Sandpile projects are just folders that contain a graph file (.sg) and any configurations that were stored.
Graph Generators
Hand editing graphs using the edit graph tab allows you to create any directed, weight graph, but it can be very slow going. To make bigger graphs, you can use the programs graph generators.
NOTE: Currently, very large graphs can take up a lot of memory, and may cause Java to run out. Anything less than 100,000 vertices should perform decently. 400,00 will still run, but editing the graph may result in problems. Larger graphs should be possible in the near future.
Also, to speed up the drawing of large graphs, it is highly recommended you turn off "Draw Edges" in visual options.
Make Grid
The make grid tab will create a standard grid graph, with each vertex having degree four. You can change the number of rows and columns of the graph, as well as the type of borders it has. To actually create the grid, simply click on the canvas. The point where you click will be the top left corner of the grid.
The border options include:
- Directed - Sink vertices will be created along the border. This is usually considered the standard sandpile graph.
- Undirected - Vertices will be created along the border, but they will be connected by undirected edges, making them reflectors.
- None - No special border edges or vertices will be generated. The vertices along the side will have degree 3 instead of 4.
- Loop to opposite - Directed edges will be created from the side to its opposite, so that vertices directly across from each other are connected.
- Loop to opposite reverse - Same as above, but, if the side is n vertices long, vertex i will connect to vertex n-i.
The last two may cause some confusion. For reference, some standard shapes they enable are:
- Ring - Set N and S to "loop to opposite". E and W can be directed, undirected, or none.
- Möbius strip - Set N and S to "loop to opposite reverse". E and W can be directed, undirected, or none.
- Torus - Set everything to "loop to opposite".
- Klein Bottle - Set N and S to "loop to opposite reverse", and E and W to "loop to opposite".
- Projective Space - Set everything to "loop to opposite reverse".
Make Honeycomb
The make honeycomb tab will create a graph in the shape of a regular hexagon, with each vertex having degree 6. The border options are the same as above.
Build Lattice
The build lattice tab allows you to create almost any lattice you wish. However, it also takes some getting used to. Also, it is still very much a work in progress. Currently, you cannot save lattice setups or control the borders, but that is coming. The lattice builder looks like:
I've expanded it slightly so you can read each column header in full. The basic idea is that you provide a list of integer vectors with certain parameters. The lattice builder will create a lattice of vertices, putting an edge between any two vertices that differ in position by one of the vectors. The different parameters are as follows (note that the bottom left of the lattice is considered (0,0)):
- x - The x value of the vector.
- y - The y value of the vector.
- x start - No vertex with an x-coordinate (relative to the lattice) lower than this will be affected by this vector.
- x freq - How frequently after x start to apply this vector. For instance, x start=0 and x freq=2 would apply the vector to all vertices with even x-coordinates. If the x freq is zero, the vector will be apply only to vertices with x coordinate equal to x start.
- y start and y freq - Same as x start and x freq, but with respect to the coordinate.
- Dir - Whether or not the resulting edges will be directed. If checked, the edges will point in the direction of the vector.
- Weight - The weight of the resulting edges.
The default lattice is called a Manhattan Lattice; it is made up of one way streets switching direction every other row/column.
The canvas is the giant black block that takes up most of the Sandpiles window.
You create and look at graphs and configurations with the canvas.
To scroll around the canvas, simply left click with your mouse (or just click on a Mac) and drag around. To zoom in and out, you can either use your mouse wheel or the zoom controllers in the top toolbar.
Note that navigating the canvas with the mouse will only work if "edit" is highlighted in the top toolbar.
Coloring
In visual options, you can change what the color (and label) of the vertex is based on.
- Number of Grains - Color depends on the amount of sand.
- Stability - Color depends on whether or not the vertex is stable.
- Total firings - Color depends on how many times the vertex has fired. To reset the counters, click on "Reset Firings Count".
- Difference from Base - Color depends on the amount of sand relative to another configuration. To set the base configuration to the current configuration, click on "Set Base Config".
You can change the colors used by going into Edit->Preferences. Clicking "insert" while no item is selected will append a new item to the end. The preferences dialogue is very much a work in progress.
3d Mode
To display graphs in 3d, the programs draws triangles between the vertices, varying the height of each vertex based on the number of grains on it. Thus, it created a surface in 3 dimensions. It does not currently display edges. You can adjust how the heights and colors are calculated by using "Height Smoothing", "Color Smoothing", and "Height Scalar". You can toggle the surface and a wireframe of the surface on and off using "Draw Shape" and "Draw Wire".
Last modified: Mon Aug 17 15:01:56 PDT 2009


Build this site
Follow this guide to build your own site.
This is a free static blog created and hosted with github. You can very easily and quickly create your own.
- I followed the simple process here to get started - Build A Blog With Jekyll And GitHub Pages
- https://app.forestry.io - Makes managing content a breeze.
- Head over to name silo and grab a domain name
- Spread the word.
Written on July 8, 2020


145 coffins discovered under high school in Fla.
TAMPA, Fla. (WFLA/CNN) - A total of 145 coffins were found on the campus of a Florida high school, part of the forgotten or ignored Ridgewood Cemetery.
The discovery came after weeks of searching in a southern section of property at King High School. They found evidence of coffins buried 3-5 feet deep, using radar to scan the ground.
"We’ve pieced together a bunch of documents, and we kind of anticipated that it would come back this way," said Tamara Shamburger, a school board member. "But I really didn’t anticipate to get a report back this morning that said there were 145 coffins."
Yvette Lewis, president of the Hillsborough County branch of the NAACP, became emotional as she spoke.

Historical records show nearly 270 people were buried in Ridgewood, beginning in the 1940s. As many as 77 of them were infants and children.
Rodney Kite-Powell with Tampa Bay History Center said burials started in 1942 with 34 people and continued through 1954 when the last nine people were interred there.

Francis, 91, said she knew the cemetery was there. She said there had been tombstones or other burial markers on the site.
Planning is underway to memorialize the area. According to Kite-Powell, graves will likely be found at other locations.
"Without a doubt, there will be at least one or two more that will come to light," he said.


§560:2-505 Who may witness. (a) An individual generally competent to be a witness may act as a witness to a will.
(b) The signing of a will by an interested witness does not invalidate the will or any provision of it, including any gift to or appointment of the witness. [L 1996, c 288, pt of §1]


--- layout: post title: Kong category: [] tags: [] summary: "It’s been some time since my last post: I went out of web hosting, got lots of work to do and decided to wait until I remade my site to come back to blogging." status: publish type: post published: true meta: _edit_last: '1' --- Hi! It’s been some time since my last post: I went out of web hosting, got lots of work to do and decided to wait until I remade my site (check it) to come back to blogging. And I miss it! Well, I have some leftover pics to show you, some taken with my revue 400SE, Praktica MTL5B and a crappy-expired-disposable camera. So, the Revue ones:
fmi mood
noir Engineering Dinner – lots of emotions? some happy with the flash even me, so it seems without within Now the crappy disposable camera and the Praktica ones: misfit Java Training on my private photobooth I’ll end this post with a not so frequent format: 120! I had the opportunity to test a Kiev 88CM from Sitio do Cano Amarelo with a Kodak Portra roll and a friend of mine. The results were clear, I really like the definition and the bokeh. The color is great and I have to say that it’s tricky to handle the waist-level-finder focusind. These are the ones that came out right: (These next 3 photos by Daniel Coelho) Aaaand thank god I didn’t pursue a modeling career. More rolls to come. A. Capelo


-- Choose and option --
30% - Excellent service
20% - It was nice
10% - A bit average...
5% - Not coming back!
How many people are sharing the bill?
People
Calculate
$
0.00
each


Nadal draws Spain level with Britain in Davis Cup semi
Madrid - Rafael Nadal sent Spain's Davis Cup semi-final against Britain on Saturday into a deciding doubles rubber with a 6-4, 6-0 thrashing of Dan Evans in Madrid.
Kyle Edmund had earlier seen off Feliciano Lopez in straight sets to give Britain a 1-0 lead against hosts Spain.
World number one Nadal stepped in for Marcel Granollers to partner Lopez in the doubles clash against Jamie Murray and Neal Skupski.
The winners will face Canada in Sunday's final after the North Americans edged out Russia in the first last-four tie.
Nadal took a tight opening set on his third set point in the 10th game, before racing to victory with a run of eight straight games.
World number 69 Edmund claimed a hard-fought 6-3, 7-6 (7/3) win over veteran Lopez, who stepped in as a last-minute replacement for Pablo Carreno Busta.
The 38-year-old Lopez was broken in just the second game of the match as Edmund took the opening set, before seeing two set points come and go in the second.
Edmund clinched his third straight singles victory of the week on his third match point.
Read also
Read More
Canada finally beat US to reach Davis Cup last eight
The United States have won a record 32 Davis Cups but none since 2007.
Read More
India assoc says Kazakhstan to host Pakistan Davis cup tie
The Asia/Oceania Group I tie, originally scheduled for Sept. 14-15, was postponed by the governing body to Nov. 29-30 following a security review amid political tensions between the bitter neighbours.
Read More
Tsitsipas battles back to beat Thiem for ATP Finals title
Thiem broke back to take the showpiece into a deciding tiebreak but it was Tsitsipas, the crowd favourite, who stayed strong, moving 6-4 ahead and clinching victory when Thiem fired a tired forehand wide.