midgard.dev
midgard.dev.__marked_for_deletion_cache
Midgard library module for caching
Description:
Adds caching to properties on classes, using the recipe explained in Python Cookbook, 3rd ed. Recipe 8.10.
Also, adds a cached property that may depend on other data, with the possibility to reset the cache if the dependencies change.
dependent_property
Full name: midgard.dev.__marked_for_deletion_cache.dependent_property
Signature: ()
Decorator for cached properties that can be reset when dependencies change
forget_dependent_values()
Full name: midgard.dev.__marked_for_deletion_cache.forget_dependent_values
Signature: (obj:object, *dependencies:str) -> None
Reset cache when given dependencies change
property
Full name: midgard.dev.__marked_for_deletion_cache.property
Signature: (fget:Callable) -> None
Cached property, see Python Cookbook, 3rd ed. Recipe 8.10.
register_dependencies
Full name: midgard.dev.__marked_for_deletion_cache.register_dependencies
Signature: ()
Metaclass for registering dependencies using dot notation
midgard.dev.__marked_for_deletion_optional
Midgard library module for handling optional dependencies
Description:
Import dependencies that are only necessary for specific parts of Midgard. Using this module will delay raising an ImportError until the dependency is actually used. This means that if one for instance only wants to run a GNSS analysis (or only use a Rinex-parser) installing special libraries only used for VLBI is not necessary.
Examples:
The optional import is typically used as follows::
from midgard.lib import optional
netCDF4 = optional.optional_import('netCDF4')
Delete this?
EmptyStringMock
Full name: midgard.dev.__marked_for_deletion_optional.EmptyStringMock
Signature: (name:str, raise_error:bool=True, attrs:Union[Dict[str, Any], NoneType]=None, error_msg:Union[str, NoneType]=None) -> None
A mock object whose properties are all empty strings
SimpleMock
Full name: midgard.dev.__marked_for_deletion_optional.SimpleMock
Signature: (name:str, raise_error:bool=True, attrs:Union[Dict[str, Any], NoneType]=None, error_msg:Union[str, NoneType]=None) -> None
Class that can stand in for any other object
The SimpleMock is used to stand in for any library that can not be imported. The mock object simply returns itself whenever it is called, or any attributes are looked up on the object. This is done, to avoid ImportErrors when a library is imported, but never used (for instance if a plugin is loaded but never called).
Instead the ImportError is raised when the SimpleMock is used in any way. The ImportError will only be raised once for any SimpleMock-object (which is only important if the ImportError is caught and the program carries on).
The exception is if any attributes (attrs
) are explicitly defined on the mock. No exception is raised if those
attributes are looked up.
optional_import()
Full name: midgard.dev.__marked_for_deletion_optional.optional_import
Signature: (module_name:str, raise_error:bool=True, mock_cls:type=<class 'midgard.dev.__marked_for_deletion_optional.SimpleMock'>, attrs:Union[Dict[str, Any], NoneType]=None) -> Union[Any, midgard.dev.__marked_for_deletion_optional.SimpleMock]
Try to import an optional module
If the module does not exist, a SimpleMock-object is returned instead. If this SimpleMock-object is later used, an
ImportError will be raised then (if raise_error
is True, which is default).
Args:
module_name
: Name of module to import.raise_error
: Whether an ImportError should be raised if the module does not exist, but is used.attrs
: Attributes that should be added to the SimpleMock used if the module does not exist.
Returns:
Imported module object, or a SimpleMock-object if the module can not be imported.
midgard.dev.console
Simpler dealing with the console
Description:
Utilities for using the console. Mainly wrappers around other libraries to make them easier and more intuitive to use.
Size of console: The two functions lines()
and columns()
report the current size of the console.
Textwrapping: The function fill()
can be used to rewrap a text-string so that it fits inside the console.
Examples:
>>> from midgard.dev import console
>>> console.columns() # doctest: +SKIP
86
>>> print(console.fill(a_very_long_string)) # doctest: +SKIP
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras tempus eleifend feugiat.
Maecenas vitae posuere metus. Sed sit amet fermentum velit. Aenean vitae turpis at
risus sollicitudin fringilla in in nisi. Maecenas vitae ante libero. Aenean ut eros
consequat, ornare erat at, tempus arcu. Suspendisse velit leo, eleifend eget mi non,
vehicula ultricies erat. Vestibulum id nisi eget nisl venenatis dignissim. Duis cursus
quam dui, vel hendrerit nibh lacinia id.
>>> print(console.color.Fore.YELLOW + console.color.Back.BLUE + 'I am YELLOW text on BLUE backdrop!') # doctest: +SKIP
I am YELLOW text on a BLUE background!
columns()
Full name: midgard.dev.console.columns
Signature: () -> int
The width of the console
Returns:
The width of the console in characters.
dedent()
Full name: midgard.dev.console.dedent
Signature: (text:str, num_spaces:Union[int, NoneType]=None) -> str
Wrapper around textwrap.dedent
Dedents at most num_spaces. If num_spaces is not specified, dedents as much as possible.
Args:
text
: Text that will be dedented.num_spaces
: Number of spaces that will be used for dedentation.
Returns:
Dedented string.
fill()
Full name: midgard.dev.console.fill
Signature: (text:str, *, width:Union[int, NoneType]=None, hanging:Union[int, NoneType]=None, **tw_args:Any) -> str
Wrapper around textwrap.fill
The tw_args
are passed on to textwrap.fill. See textwrap.TextWrapper for available keyword arguments.
The default value for width
is console.columns(), while the new argument hanging
, if defined, will try
to set (although not override) the textwrap-arguments initial_indent
and subsequent_indent
to create a hanging
indent (no indent on the first line) of hanging
spaces.
Args:
text
: Text that will be wrapped.width
: The maximum width (in characters) of wrapped lines.hanging
: Number of characters used for hanging indent.tw_args
: Arguments passed on totextwrap.fill
.
Returns:
Wrapped string.
indent()
Full name: midgard.dev.console.indent
Signature: (text:str, num_spaces:int, **tw_args:Any) -> str
Wrapper around textwrap.indent
The tw_args
are passed on to textwrap.indent.
Args:
text
: Text that will be indented.num_spaces
: Number of spaces that will be used for indentation.
Returns:
Indented string.
lines()
Full name: midgard.dev.console.lines
Signature: () -> int
The height of the console
Returns:
The heigth of the console in characters.
num_leading_spaces()
Full name: midgard.dev.console.num_leading_spaces
Signature: (text:str, space_char:str=' ') -> int
Count number of leading spaces in a string
Args:
text
: String to count.space_char
: Which characters count as spaces.
Returns:
Number of leading spaces.
midgard.dev.exceptions
Definition of Midgard-specific exceptions
Description:
Custom exceptions used by Midgard for more specific error messages and handling.
FieldDoesNotExistError
Full name: midgard.dev.exceptions.FieldDoesNotExistError
Signature: ()
FieldExistsError
Full name: midgard.dev.exceptions.FieldExistsError
Signature: ()
InitializationError
Full name: midgard.dev.exceptions.InitializationError
Signature: ()
MidgardException
Full name: midgard.dev.exceptions.MidgardException
Signature: ()
MidgardExit
Full name: midgard.dev.exceptions.MidgardExit
Signature: ()
MissingConfigurationError
Full name: midgard.dev.exceptions.MissingConfigurationError
Signature: ()
MissingDataError
Full name: midgard.dev.exceptions.MissingDataError
Signature: ()
MissingEntryError
Full name: midgard.dev.exceptions.MissingEntryError
Signature: ()
MissingSectionError
Full name: midgard.dev.exceptions.MissingSectionError
Signature: ()
ParserError
Full name: midgard.dev.exceptions.ParserError
Signature: ()
TimerNotRunning
Full name: midgard.dev.exceptions.TimerNotRunning
Signature: ()
TimerRunning
Full name: midgard.dev.exceptions.TimerRunning
Signature: ()
UnitError
Full name: midgard.dev.exceptions.UnitError
Signature: ()
UnknownConstantError
Full name: midgard.dev.exceptions.UnknownConstantError
Signature: ()
UnknownConversionError
Full name: midgard.dev.exceptions.UnknownConversionError
Signature: ()
UnknownEnumError
Full name: midgard.dev.exceptions.UnknownEnumError
Signature: ()
UnknownPackageError
Full name: midgard.dev.exceptions.UnknownPackageError
Signature: ()
UnknownPluginError
Full name: midgard.dev.exceptions.UnknownPluginError
Signature: ()
UnknownSystemError
Full name: midgard.dev.exceptions.UnknownSystemError
Signature: ()
midgard.dev.library
Python wrapper around C-libraries
Description:
Loads a C-library. If a library is missing, a mock library is returned. If this mock is used for anything, a warning will be printed. This is done to avoid dependencies to all the C/C++-libraries for Python programs only using some of them.
SimpleMock
Full name: midgard.dev.library.SimpleMock
Signature: (name, raise_error=True)
Class that can stand in for any other object
The SimpleMock is used to stand in for any library that can not be imported. The mock object simply returns itself whenever it is called, or any attributes are looked up on the object. This is done, to avoid ImportErrors when a library is imported, but never used (typically because a plugin is loaded but never called).
Instead the ImportError is raised when the SimpleMock is used in any way. The ImportError will only be raised once for any SimpleMock-object (which is only important if the ImportError is caught and the program carries on).
load_name()
Full name: midgard.dev.library.load_name
Signature: (library_name, func_specs=None, name_patterns=None)
Load the given shared C-library
See load_path
for an explanation of the func_specs
and
name_patterns
-arguments.
Args:
library_name (String): The name of the library. func_specs (Dict): Specification of types in lib (see load_path). name_patterns (List): Name mangling patterns (see load_path).
Returns:
ctypes.CDLL: Representation of the shared library.
load_path()
Full name: midgard.dev.library.load_path
Signature: (library_path, func_specs=None, name_patterns=None)
Load the given shared C-library
The optional func_specs-dictionary can be used to specify argument and return types of functions in the library (see the ctypes documentation for information about argtypes and restype). The dictionary should be on the form::
func_spec = {'func_1': dict(func_name='name_of_func_1_in_lib',
argtypes=[ ... argtypes of func_1 ... ],
restype=... restype of func_1 ...),
'func_2': ...
}
If the library is not found, a mock library is returned instead. The mock library will print a warning if it is used.
For some libraries, name mangling is used and this might be different
depending on operating system and how the library is compiled. For
instance, in a Fortran library the function Test
might be represented as
__Test
on a Windows system and test_
(with lower-case t
) on a Linux
system. This can be handled by providing a list of possible patterns. The
above example can be handled by::
name_patterns = ('__{func_name}', '{func_name_lower}_')
In this case, each function in func_specs is looked up by testing each pattern in turn until a match is found.
Args:
library_path (String): The path to the library. func_specs (Dict): Specification of types in library (see above). name_patterns (List): Name mangling patterns (see above).
Returns:
ctypes.CDLL: Representation of the shared library.
midgard.dev.log
Midgard library module for logging
Description:
This module provides simple logging inside Midgard.
To use it, you must first add a an active logger. This is typically done using one of the init-functions: init() or file_init().
To write a log message, simply call one of midgard.log.debug, midgard.log.info, midgard.log.warn, midgard.log.error or midgard.log.fatal with a log message.
To add a different logger, you should subclass the Logger abstract class.
Example:
>>> from midgard.dev import log
>>> log.init("info", prefix="My prefix")
>>> n, m = 5, 3
>>> log.info(f"Calculating the inverse of a {n:>2d}x{m:<2d} matrix")
INFO [My prefix] Calculating the inverse of a 5x3 matrix
ConsoleLogger
Full name: midgard.dev.log.ConsoleLogger
Signature: (log_level:Union[str, NoneType]=None, prefix:str='', use_command_line:bool=True) -> None
Log to the console, the log level can also be set using command line parameters
FileLogger
Full name: midgard.dev.log.FileLogger
Signature: (file_path:Union[str, pathlib.Path], log_level:Union[str, NoneType]=None, prefix:str='', rotation:Union[int, NoneType]=None) -> None
Log to a file, the log files can be rotated so that older files are kept
Logger
Full name: midgard.dev.log.Logger
Signature: (log_level:Union[str, NoneType]=None, prefix:str='')
Abstract class that can be specialized to create new loggers
all()
Full name: midgard.dev.log.all
Signature: (log_text:str, *, level:str='all') -> None
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
blank()
Full name: midgard.dev.log.blank
Signature: () -> None
Log blank line
debug()
Full name: midgard.dev.log.debug
Signature: (log_text:str, *, level:str='debug') -> None
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
error()
Full name: midgard.dev.log.error
Signature: (log_text:str, *, level:str='error') -> None
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
fatal()
Full name: midgard.dev.log.fatal
Signature: (log_text:str, *, level:str='fatal') -> None
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
file_init
Full name: midgard.dev.log.file_init
Signature: (file_path:Union[str, pathlib.Path], log_level:Union[str, NoneType]=None, prefix:str='', rotation:Union[int, NoneType]=None) -> None
Log to a file, the log files can be rotated so that older files are kept
info()
Full name: midgard.dev.log.info
Signature: (log_text:str, *, level:str='info') -> None
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
init
Full name: midgard.dev.log.init
Signature: (log_level:Union[str, NoneType]=None, prefix:str='', use_command_line:bool=True) -> None
Log to the console, the log level can also be set using command line parameters
log()
Full name: midgard.dev.log.log
Signature: (log_text:str, level:str) -> None
Log text at the given level
none()
Full name: midgard.dev.log.none
Signature: (log_text:str, *, level:str='none') -> None
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
print_file()
Full name: midgard.dev.log.print_file
Signature: (log_path:Union[str, pathlib.Path], log_level:str='info', print_func:Callable[[str], NoneType]=<built-in function print>) -> None
Print a log file with colors, stripping away any item below log_level
warn()
Full name: midgard.dev.log.warn
Signature: (log_text:str, *, level:str='warn') -> None
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
midgard.dev.plugins
Set up a plug-in architecture for Midgard
Description:
In order to be able to add models, parsers, data sources etc without needing to
hardcode names, but rather pick them from configuration files, we use a simple
plug-in architecture. The plug-in mechanism is based on the different plug-ins
registering themselves using the register
decorator:
from midgard.dev import plugins
@plugins.register
def simple_model(*args, **kwargs):
...
Plug-ins are registered based on the name of the module (file) they are defined
in, as well as the package (directory) which contains them. Typically all
plug-ins of a given type are collected in a package, e.g. models, techniques,
parsers, etc. To list all plug-ins in a package use names
:
> from midgard.dev import plugins
> plugins.names('midgard.models')
['model_one', 'model_three', 'model_two']
If the optional parameter config_key
is given, then only plug-ins listed in
the corresponding section in the current configuration file is listed. For
instance, if the configuration file contains a line saying
ham_models = model_three, model_one
then we can list only the ham_models
as follows:
> from midgard.dev import plugins
> plugins.names('midgard.models', config_key='ham_models')
['model_one', 'model_three']
Note that the plug-ins by default are sorted alphabetically.
To run the plug-ins, use either call_all
or call_one
. The former calls all
plug-ins and returns a dictionary containing the result from each plug-in. As
with names
the optional parameter config_key
may be given:
> from midgard.dev import plugins
> plugins.call_all('midgard.models', config_key='ham_models', arg_to_plugin='hello')
{'model_three': <result from model_three>, 'model_one': <result from model_one>}
Arguments to the plug-ins should be passed as named arguments to call_all
.
Similarly, one plug-in may be called explicitly using call_one
:
> from midgard.dev import plugins
> plugins.call_one('midgard.models', plugin_name='model_one', arg_to_plugin='hello')
<result from model_one>
There may be more than one function in each plug-in that is decorated by
register
. In this case, the default behaviour is that only the first function
will be called. To call the other registered functions one should use the
list_parts
function to get a list of these functions and call them explicitly
using the part
optional parameter to call_one
:
> from midgard.dev import plugins
> plugins.list_parts('midgard.techniques', plugin_name='vlbi')
['read', 'edit', 'calculate', 'estimate', 'write_result'])
> for part in plugins.list_parts('midgard.techniques', plugin_name='vlbi'):
... plugins.call_one('midgard.techniques', plugin_name='vlbi', part=part, ...)
Plugin
Full name: midgard.dev.plugins.Plugin
Signature: (name:str, function:Callable, file_path:pathlib.Path, sort_value:int)
Information about a plug-in
Args:
name
: Name of the plug-in.function
: The plug-in.file_path
: Path to the source code of the plug-in, may be used to add the source as a dependency.sort_value
: Value used when sorting plug-ins in order to control the order they are called.
add_alias()
Full name: midgard.dev.plugins.add_alias
Signature: (package_name:str, alias:str) -> None
Add alias to plug-in package
This allows one package of plug-ins to be spread over several directories
Args:
package_name
: Name of package containing plug-ins.directory
: Additional plug-in directory.
call()
Full name: midgard.dev.plugins.call
Signature: (package_name:str, plugin_name:str, part:Union[str, NoneType]=None, prefix:Union[str, NoneType]=None, plugin_logger:Union[Callable[[str], NoneType], NoneType]=None, **plugin_args:Any) -> Any
Call one plug-in
Args:
package_name
: Name of package containing plug-ins.plugin_name
: Name of the plug-in, i.e. the module containing the plug-in.part
: Name of function to call within the plug-in (optional).prefix
: Prefix of the plug-in name, used if the plug-in name is not found (optional).plugin_logger
: Function used for logging (optional).plugin_args
: Named arguments passed on to the plug-in.
Returns:
Return value of the plug-in.
call_all()
Full name: midgard.dev.plugins.call_all
Signature: (package_name:str, plugins:Union[List[str], NoneType]=None, part:Union[str, NoneType]=None, prefix:Union[str, NoneType]=None, plugin_logger:Union[Callable[[str], NoneType], NoneType]=None, **plugin_args:Any) -> Dict[str, Any]
Call all plug-ins in a package
If plugins
is given, it should be a list of names of plug-ins. If a
plug-in listed in the plugins
-list or in the config file does not exist,
an UnknownPluginError is raised.
If plugins
is not given, all available plugins will be called. Do note,
however, that this will import all python files in the package.
Args:
package_name
: Name of package containing plug-ins.plugins
: List of plug-in names that should be used (optional).part
: Name of function to call within the plug-ins (optional).prefix
: Prefix of the plug-in names, used for a plug-in if it is not found (optional).plugin_logger
: Function used for logging (optional).plugin_args
: Named arguments passed on to all the plug-ins.
Returns:
Dictionary of all results from the plug-ins.
doc()
Full name: midgard.dev.plugins.doc
Signature: (package_name:str, plugin_name:str, part:Union[str, NoneType]=None, prefix:Union[str, NoneType]=None, long_doc:bool=True, include_details:bool=False, use_module:bool=False) -> str
Document one plug-in
If the plug-in is not part of the package an UnknownPluginError is raised.
If there are several functions registered in a plug-in and part
is not
specified, then the first function registered in the plug-in will be
documented.
Args:
package_name
: Name of package containing plug-ins.plugin_name
: Name of the plug-in, i.e. the module containing the plug-in.part
: Name of function to call within the plug-in (optional).prefix
: Prefix of the plug-in name, used if the plug-in name is unknown (optional).long_doc
: Whether to return the long doc-string or the short one-line string (optional).include_details
: Whether to include development details like parameters and return values (optional).use_module
: Whether to use module doc-string instead of plug-in doc-string (optional).
Returns:
Documentation of the plug-in.
doc_all()
Full name: midgard.dev.plugins.doc_all
Signature: (package_name:str, plugins:Union[Iterable[str], NoneType]=None, prefix:Union[str, NoneType]=None, long_doc:bool=True, include_details:bool=False, use_module:bool=False) -> Dict[str, str]
Call all plug-ins in a package
If plugins
is given, it should be a list of names of plug-ins. If a
plug-in listed in the plugins
-list does not exist, an UnknownPluginError
is raised.
If plugins
is not given, all available plugins will be called. Do note,
however, that this will import all python files in the package.
Args:
package_name
: Name of package containing plug-ins.plugins
: List of plug-ins that should be used (optional).prefix
: Prefix of the plug-in names, used if any of the plug-ins are unknown (optional).long_doc
: Whether to return the long doc-string or the short one-line string (optional).include_details
: Whether to include development details like parameters and return values (optional).use_module
: Whether to use module doc-string instead of plug-in doc-string (optional).
Returns:
Dictionary of all doc-strings from the plug-ins.
exists()
Full name: midgard.dev.plugins.exists
Signature: (package_name:str, plugin_name:str) -> bool
Check whether or not a plug-in exists in a package
Tries to import the given plug-in.
Args:
package_name
: Name of package containing plug-ins.plugin_name
: Name of the plug-in (module).
Returns:
True if plug-in exists, False otherwise.
get()
Full name: midgard.dev.plugins.get
Signature: (package_name:str, plugin_name:str, part:Union[str, NoneType]=None, prefix:Union[str, NoneType]=None) -> midgard.dev.plugins.Plugin
Get a specific plugin-object
If the plug-in is not part of the package an UnknownPluginError is raised.
If there are several functions registered in a plug-in and part
is not
specified, then the first function registered in the plug-in will be
called.
Args:
package_name
: Name of package containing plug-ins.plugin_name
: Name of the plug-in, i.e. the module containing the plug-in.part
: Name of function to call within the plug-in (optional).prefix
: Prefix of the plug-in name, used if the plug-in name is not found (optional).
Returns:
Plugin-namedtuple representing the plug-in.
load()
Full name: midgard.dev.plugins.load
Signature: (package_name:str, plugin_name:str, prefix:Union[str, NoneType]=None) -> str
Load one plug-in from a package
First tries to load the plugin with the given name. If that fails, it tries to load {prefix}_{plugin_name} instead.
Args:
package_name
: Name of package containing plug-ins.plugin_name
: Name of the plug-in (module).prefix
: Prefix of the plug-in name, used if the plug-in name is unknown (optional).
Returns:
Actual name of plug-in (with or without prefix).
names()
Full name: midgard.dev.plugins.names
Signature: (package_name:str, plugins:Union[Iterable[str], NoneType]=None, prefix:Union[str, NoneType]=None) -> List[str]
List plug-ins in a package
If plugins
is given, it should be a list of names of plug-ins. If a
plug-in listed in the plugins
-list does not exist, an UnknownPluginError
is raised.
If plugins
is not given, all available plugins will be listed. Do note,
however, that this will import all python files in the package.
Args:
package_name
: Name of package containing plug-ins.plugins
: List of plug-ins that should be used (optional).prefix
: Prefix of the plug-in names, used if any of the plug-in names are unknown (optional).
Returns:
List of strings with names of plug-ins.
parts()
Full name: midgard.dev.plugins.parts
Signature: (package_name:str, plugin_name:str, prefix:Union[str, NoneType]=None) -> List[str]
List all parts of one plug-in
Args:
package_name
: Name of package containing plug-ins.plugin_name
: Name of the plug-in.prefix
: Prefix of the plug-in name, used if the plug-in name is unknown (optional).
Returns:
List
: Strings with names of parts.
register()
Full name: midgard.dev.plugins.register
Signature: (func:Callable, name:Union[str, NoneType]=None, sort_value:int=0) -> Callable
Decorator used to register a plug-in
Plug-ins are registered based on the name of the module (file) they are defined in, as well as the package (directory) which contains them. Typically all plug-ins of a given type are collected in a package, e.g. models, techniques, parsers, etc. The path to the source code file is also stored. This is used to be able to add the source code as a dependency file when the plug-in is called.
If name
is given, the plug-in is registered based on this name instead of
the name of the module. The name of the module is still registered as a
part that can be used to distinguish between similar plug-ins in different
files (see for instance how session
is used in midgard.pipelines
).
Args:
func
: The function that is being registered.name
: Alternative name of plug-in. Used byregister_named
.sort_value
: The value used when sorting plug-ins. Used byregister_ordered
.
Returns:
The function that is being registered.
register_named()
Full name: midgard.dev.plugins.register_named
Signature: (name:str) -> Callable
Decorator used to register a named plug-in
This allows for overriding the name used to register the plug-in. See
register
for more details.
Args:
name
: Name used for plug-in instead of module name.
Returns:
Decorator that registers a named function.
register_ordered()
Full name: midgard.dev.plugins.register_ordered
Signature: (sort_value:int) -> Callable
Decorator used to register a plug-in with a specific sort order
The sort value should be a number. Lower numbers are sorted first, higher numbers last. Plug-ins without an explicit sort_order gets the sort value of 0.
Args:
sort_value
: The value used when sorting plug-ins.
Returns:
Decorator that registers an ordered function.
signature()
Full name: midgard.dev.plugins.signature
Signature: (package_name:str, plugin_name:str, part:Union[str, NoneType]=None, prefix:Union[str, NoneType]=None) -> inspect.Signature
Get signature of a plug-in
If the plug-in is not part of the package an UnknownPluginError is raised.
If there are several functions registered in a plug-in and part
is not
specified, then the first function registered in the plug-in will be
documented.
Args:
package_name
: Name of package containing plug-ins.plugin_name
: Name of the plug-in, i.e. the module containing the plug-in.part
: Name of function to call within the plug-in (optional).prefix
: Prefix of the plug-in name, used if the plug-in name is unknown (optional).
Returns:
Signature of the plugin
midgard.dev.profiler
Add a profiler when running
Supports several profilers including cprofile, line_profiler, memprof and memory_profiler.
CProfile
Full name: midgard.dev.profiler.CProfile
Signature: ()
cprofile is used for profiling the whole program
LineProfiler
Full name: midgard.dev.profiler.LineProfiler
Signature: ()
line_profiler is used to profile one or a few functions in detail
Profiler
Full name: midgard.dev.profiler.Profiler
Signature: ()
Base class for profilers
midgard.dev.timer
Class for timing the running time of functions and code blocks
Description:
The dev.timer
can be used to log the running time of functions and general
code blocks. Typically, you will import the Timer
-class from within the
module:
from midgard.dev.timer import Timer
The Timer can then be used in three different ways:
-
As a decorator to time one function:
@Timer('The time to execute some_function was') def some_function(some_argument, some_other_argument=some_value): pass
-
As a context manager together with
with
to time a code block:with Timer('Finish doing stuff in', logger=logger.debug) as t: do_something() do_something_else()
-
With explicit
start
- andend
-statements:t = Timer() t.start() do_something() do_something_else() t.end()
As can be seen in the examples above, Timer()
may be called with several
optional parameters, including the text to report when the timer ends and which
logger is used to report the timing. See Timer.__init__
for more details.
AccumulatedTimer
Full name: midgard.dev.timer.AccumulatedTimer
Signature: (text:str='Elapsed time:', fmt:str='.4f', logger:Union[Callable[[str], NoneType], NoneType]=functools.partial(<function log at 0x7f800f4530d0>, level='info')) -> None
Timer
Full name: midgard.dev.timer.Timer
Signature: (text:str='Elapsed time:', fmt:str='.4f', logger:Union[Callable[[str], NoneType], NoneType]=functools.partial(<function log at 0x7f800f4530d0>, level='info')) -> None
Class for timing running time of functions and code blocks.


Linda Mary Spear
Democrat
Enrolled Agent (EA)- CFO Colorado; Certified Public Accountant (CPA) - CFO Colorado
AS Business -Three Rivers Community College, Norwich, CT; BS Financial Accounting - University of New Haven, New Haven, CT; CPA (retired)- Colorado; Enrolled Agent since 1985; Fellow National Tax Practice Institute
80224
Denver Press Club - member of the board. Englewood Rotary Club - past president
Donated to Jason Crow and One Colorado.
Englewood Rotary Club; Denver Press Club; National Association of Enrolled Agents, Colorado Association of Enrolled Agents; Colorado Society of CPAs; Be A Tool - day of service.
To create a fair division of representation of people by common address, common cultural identity, and continuous geographic relationship. Democracy requires a voice for all and each person. The point of the census is to make sure the distribution of voice if fair to all concerned.
Consensus is really about listening and not just hearing the words being spoken. I like to repeat questions to make sure I and everyone else knows what is being asked. I like to clear up any misconception around a question prior to debating the question. This method actually creates mutual respect. With mutual respect the committee can then work on consensus. I had a job where I traveled the country giving tax seminars. I could attend the needs of a diverse group of people (all of whom wished to be heard) in a fair and impartial way. Call it crowd control if you will. ; but understand, the only way to fairness and impartiality is through the door of respect of each one involved. I believe both my training and experience have given me the ability to be fair and impartial to all concerned.
I am a retired CPA. The training required is about analytical skills, logic, and reasoning. CPAs are trained to look at the obvious and not so obvious. Who, what, why, where, and when are elements of determining intent and means to reach the desired goal. I have used this training in my work representing taxpayers before the IRS, in my accounting and tax work, on committees for not-for profit organizations, and everyday life.
Female


Poplar tree in Newtown third in national competition
by Sue AustinIt has survived fungal disease and leaf rust, development bulldozers and even having the River Severn diverted around it.
Now Newtown's Black Poplar tree has taken third place in the Woodland Trust Wales Tree of The Year competition.
The town council put forward the magnificent tree for the competition and its deputy mayor, Councillor Richard Griffiths, picked up the award at an event in Cardiff.
He said the town council had entered the tree, which is more than 100 years old, into the Postcode Lottery-sponsored competition
"I was delighted when the tree was placed third out of a short-list of seven," he said.
"We are all aware of the importance of trees to our very existence and third place means we will receive £500 to help look after it."
Thrive
Winning the title was a 400-year-old Sweet Chestnut tree in Pontypool.
In 2017 Newtown’s Brimmon Oak was placed first in the competition and went on to be second in the European tree of the year competition.
The Black Poplar is one of Britain’s rarest and most endangered native species, fighting fungal disease, leaf rusts and poplar scab.
In the 1960s the tree stood on the Llanllwchaiarn side of the river. After the great floods of 1960 and 1964 a flood prevention scheme was needed and the river was diverted - the tree suddenly finding itself on the Newtown side. But it survived and continued to thrive.
It was further threatened in 1990 amid plans to be chopped down to make way for an extension of the car park. Special conditions were put into place to protect it.


Show that the following argument is not valid. "If access to abortion is restricted in a state, then the number of abortions in that state will decrease. The number of abortions decreased in that state. Consequently, access to abortion is restricted in that state.""


I've always been a really good girl. Before my junior year in high school, I never drank alcohol and I certainly never pictured myself smoking weed. I worked at a restaurant with a lot of varying types of people. We had a Christmas party and I decided to go with my friends. It was really blizzardy that year and I remember that we were packed like sardines in the back seat of my friend's car. Everyone met at the restaurant before driving to the bowling alley so that we could eat some of the free food that they made for us.
I was fighting with my boyfriend over his addictive marijuana habit and when we walked into the restaurant, I knew that he had been smoking with his friends even though he tried to deny it. I just sat there in stony silence, angry that he had betrayed my trust. My friend had mentioned something about smoking some weed and I decided that I had to be in on the action. When we went out to the car, my friend rolled a joint and started to pass it around. We sat in the parking lot and finished off the joint. Only myself and two of my friends chose to smoke. We left for the bowling alley and on the way I noticed that the friend sitting next to me was sipping on a cup. I asked what was in it and he told me that it was straight gin. He asked if I wanted a swig and I said sure.
I was feeling a little bit different from the weed, but I've heard that it doesn't affect you that much the first few times that you smoke. I took a deep gulp from my friend's cup and I almost choked on the contents. The alcohol burned my throat and mouth and I wanted to throw it back up until my friend handed me his chaser, a packet of Capri Sun. When we got to the bowling alley parking lot, my friend rolled another joint and when we were finished smoking it, we went inside.
My best friend's little sister was there and she had a drink in her hand. I swiped it from her and took a deep gulp, realizing much too soon that this concoction was half Powerade, half alcohol. She just looked at me as I took two more swigs after that. She asked me if I was trying to get drunk and I said yes. I'd never been drunk before and I didn't even think about being hung over or anything. I wasn't prepared for it and I hadn't eaten anything at all that day. I just knew that I was mad at my boyfriend and that I wanted to forget everything for one night.
By 11:30 I was feeling very light headed. We were glow bowling and so the room was very dark. There were pulsing lights and lasers and there was incredibly loud music. I remember standing on a speaker with M and singing along with one of my favorite songs and dancing. Me, dancing! I was shy...I still am shy. But I was dancing. I had long ago reached the point where I was decently buzzed, but midnight, I was positively wasted. To make matters worse, I kept going outside to partake in the smoking of a joint. I must have gone out four or five times, after a while, I just lost count. I don't smoke cigarettes either, but I went through about half of M's pack.
I remember one moment very vividly, I asked my friend Deb for her lighter and I realized that I was practically slumped on the table. My voice sounded like I was talking with my lips closed. My eyes were reduced to slits.  That's when I felt nauseous.
The nausea hit me while we were still in the bowling alley. I threw up everywhere, it just exploded from deep inside of me. I was running to the bathroom and I remember vomiting on the carpet. The lights slanted and seemed to want to hurl me to the ground. I made it to the bathroom for another round, only this time, I really had nothing left in my stomach. I was dry heaving and it hurt so much. I remember looking into the toilet bowl and seeing green (that was the color of the last Powerade that M and I had shared) and wanting to vomit again. I blacked out over the toilet and was revived by my best friend (L) only to find my hand hanging in the vomit and water. L was crying and I was just laying there on the floor. 'I want to sleep' I said repeatedly. I didn't know it was bad to pass out like that.
They made me leave the bowling alley and I sat outside in the cold with my boyfriend (J) and L on either side of me. When my head dropped, they made me get up and walk the length of the plaza that we were in. I threw up on J's shoes. My manager came out and gave me some 7UP to try and settle my stomach. I threw up on his shoes too. I felt bad. I kept apologizing. I told my boyfriend that I loved him a million times. I hugged him for what seemed like an hour before I left and tried to kiss him (which is disgusting when I think about it now) and he just pushed me into the car. I cried for a minute and then tried to focus on my breathing. I couldn't see anything and my neck felt completely loose. I couldn't lift my head. My arms were plastered to my sides and my legs felt like rocks.
The only good thing about the ride home was that I got the front seat.  Then I turned to my friend R (who was driving) and told him that I had just puked out his window. I blacked out after that and didn't wake up till I was trying to walk through L's house to her room. I passed out on the floor and didn't move all night.
THe next morning, I woke up and wanted to vomit. I held it in because her parents had been asleep and didn't know what happened and I was embarassed. I had to work that day at 4 in the afternoon. I got up at 12. L told me to eat, but the sight of food brought bile to the back of my throat and I refused. All day at work I had a headache and I was really slow. Looking at food and getting nauseous was bad in my line of work, but I made it. That night, I collapsed in my own bed like a ton of bricks.
I recommend not drinking to get wasted. It's not fun to wake up with your head splitting into a million pieces and constant bile in the back of your throat. Make sure that you have time to rest the next day...make sure you eat! DRY HEAVES SUCK!! Don't drink if you're depressed because it only makes you want to drink more and drink it faster in order to get rid of that empty lost feeling that you have inside. And pace yourself. That's all the stuff that I didn't do. But I've learned.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


This uses Firebase and an intention preserving conflict avoidance strategy based on this research to provide a real-time collaboration experience in a textarea element.
It relies on efficient diffs on the text content to produce necessary updates to propagate to other viewers. Offline updates are always able to be applied. Writes by competing viewers will not be interleaved and the algorithm tries to preserve the cursor position that makes sense for each viewer.


KineticGold ICO
Option 2 -
Cryptocurrency input
Cryptocurrency converted to Cash and then Gold purchased
Initial Coin Offering – 1 Million KineticGold Coins
< 1,000 Coins of ICO -
10% discount of Coins
1,000-4,999 Coins of ICO –
12% discount of Coins
5,000-9,999 Coins of ICO -
15% discount of Coins
10,000-49,999 Coins of ICO – 17% discount of Coins
50,000+ Coins of ICO –
20% discount of Coins
ICO investors will receive their coins within 6 months after close of the ICO at the
discount listed.
At this point ICO investors will be 10-20% ahead of their investment amount and may
convert their investment to cash or to a CD savings account in Gold.


We can achieve One Way Data Binding simply by defining the delimiter in the space or attribute we need the value to be.
If we don't want to do it this way, exposing the delimiter in the actual element attribute, we can still use the command e-attribute="{{ expression }}", it creates the attribute after being compiled. This commands is very versatile, we will go into details about it in the commands section.
We can achieve Two Way Data Binding using the command e-bind:attribute="scopeProperty", by default it binds value attribute, it means that if we want to bind the `value` attribute of an input we can define like this e-bind="scopeProperty".


Everything has been submitted. You should expect a response within three business days.
Your submission is incomplete. Please go back and complete the following:
This webpage has been updated to include the latest policy changes that took effect on September 28, 2018
Effective December 31, 2019 this website will be shutting down permanently.


{% extends "sadmin2/site.html" %} {% load crispy_forms_tags %} {% block head %} {% endblock %} {% block content %}
Send e-mails to all of {{ user_email_count }} users who have accepted to receive e-mail.


Interface JObject
-
- All Known Subinterfaces:
Body
,HasSatellites<S>
,Satellite<P>
- All Known Implementing Classes:
AbstractBody
,AbstractHasSatellites
,Moon
,Planet
,Star
,UntypedJObject
public interface JObject
Interface implemented byPermazen
Java model objects.All
Permazen
database objects are instances of runtime-generated sub-classes of user-provided Java model types. These generated subclasses will always implement this interface, providing convenient access to database operations. Therefore, it is convenient to declare Java model classesabstract
andimplements JObject
. However, this is not strictly necessary; all of the methods declared here ultimately delegate to one of theJTransaction
support methods.Object Identity and State
Every
JObject
has a unique 64-bit object identifier, represented as anObjId
. AllJObject
instances are permanently associated with a specific transaction, and are the unique representatives for their correspondingObjId
in that transaction. All field state derives from the associated transaction.There are two types of transactions: normal transactions reflecting an open transaction on the underlying key/value database, and snapshot transactions, which are in-memory containers of object data. Snapshot transactions are fully functional, supporting index queries, object versioning, etc.
Copying Objects
This interface provides methods for copying a graph of objects between transactions, for example, from an open key/value database transaction into an in-memory snapshot transaction ("copy out"), or vice-versa ("copy in"). A graph of objects can be copied by specifying a starting object and either a list of reference paths, or a cascade name (see
@JField
). Object ID's can be remapped during the copy if necessary, e.g., to ensure existing objects are not overwritten (seeCopyState
).- See Also:
JTransaction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default JObject
cascadeCopyIn(String cascadeName, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the transaction associated with the current thread.default JObject
cascadeCopyOut(String cascadeName, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the associated in-memory snapshot transaction.default JObject
cascadeCopyTo(JTransaction dest, String cascadeName, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the specified destination transaction.default JObject
cascadeCopyTo(JTransaction dest, String cascadeName, int recursionLimit, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the specified destination transaction.default JObject
copyIn(String... refPaths)
Copy this instance, and other instances it references through the specifiedrefPaths
(if any), into the transaction associated with the current thread.default JObject
copyOut(String... refPaths)
Copy this instance and other instances it references through the specified reference paths (if any) into the associated in-memory snapshot transaction.default JObject
copyTo(JTransaction dest, CopyState copyState, String... refPaths)
Copy this instance, and other instances it references through the specified reference paths, into the specified destination transaction.default boolean
delete()
Delete this instance, if it exists, in this instance's associated transaction.default boolean
exists()
Determine whether this instance still exists in its associated transaction.default <R> NavigableSet<R>
findReferring(Class<R> type, String fieldName)
Find all objects of the given type referring to this object through the specified reference field.default JClass<?>
getJClass()
Class<?>
getModelClass()
Get the original Java model class of which thisJObject
is an instance.ObjId
getObjId()
Get this instance's unique Permazen object identifier.default int
getSchemaVersion()
Get this instance's current schema version.JTransaction
getTransaction()
Get this instance's associatedJTransaction
.default boolean
isSnapshot()
Determine whether this instance is a normal instance or is an in-memory "snapshot" instance associated with aSnapshotJTransaction
.default boolean
recreate()
Recreate a deleted instance, if it does not exist, in its associated transaction.void
resetCachedFieldValues()
Reset cached simple field values.default void
revalidate(Class<?>... groups)
Add this instance to the validation queue for validation in its associated transaction.default boolean
upgrade()
Update the schema version of this instance, if necessary, so that it matches the schema version of its associated transaction.
-
-
-
Method Detail
-
getObjId
ObjId getObjId()
Get this instance's unique Permazen object identifier.This method always succeeds, even if the object does not exist.
- Returns:
- unique database identifier for this instance
-
getSchemaVersion
default int getSchemaVersion()
Get this instance's current schema version. Does not change this instance's schema version.- Returns:
- the schema version of this instance
- Throws:
DeletedObjectException
- if this object does not exist in theJTransaction
associated with this instanceStaleTransactionException
- if the transaction associated with this instance is no longer usable
-
getTransaction
JTransaction getTransaction()
Get this instance's associatedJTransaction
.- Returns:
- the
JTransaction
that contains this instance's field state
-
delete
default boolean delete()
Delete this instance, if it exists, in this instance's associated transaction.See
Transaction.delete()
for details on secondary deletions fromDeleteAction.DELETE
andJField.cascadeDelete()
.- Returns:
- true if instance was deleted, false if it did not exist
- Throws:
StaleTransactionException
- if the transaction associated with the current thread is no longer usableReferencedObjectException
- if the object is referenced by some other object through a reference field configured forDeleteAction.EXCEPTION
-
exists
default boolean exists()
Determine whether this instance still exists in its associated transaction.- Returns:
- true if instance exists, otherwise false
- Throws:
StaleTransactionException
- if the transaction associated with this instance is no longer usable
-
isSnapshot
default boolean isSnapshot()
Determine whether this instance is a normal instance or is an in-memory "snapshot" instance associated with aSnapshotJTransaction
.Equivalent to
getTransaction().isSnapshot()
.- Returns:
- true if instance is a snapshot instance
-
recreate
default boolean recreate()
Recreate a deleted instance, if it does not exist, in its associated transaction. The fields of a recreated object are set to their initial values. If the object already exists, nothing changes.- Returns:
- true if instance was recreated, false if it already existed
- Throws:
StaleTransactionException
- if the transaction associated with this instance is no longer usable
-
revalidate
default void revalidate(Class<?>... groups)
Add this instance to the validation queue for validation in its associated transaction.The actual validation will occur either during
JTransaction.commit()
or at the next invocation ofJTransaction.validate()
, whichever occurs first. The specified validation groups, if any, will be used.If the associated transaction was opened with
ValidationMode.DISABLED
, no validation will be performed.- Parameters:
groups
- validation group(s) to use for validation; if empty,Default
is assumed- Throws:
DeletedObjectException
- if this object does not exist in theJTransaction
associated with this instanceIllegalStateException
- if transaction commit is already in progressStaleTransactionException
- if the transaction associated with this instance is no longer usableNullPointerException
- ifgroups
is null
-
upgrade
default boolean upgrade()
Update the schema version of this instance, if necessary, so that it matches the schema version of its associated transaction.If a version change occurs, matching
@OnVersionChange
methods will be invoked prior to this method returning.- Returns:
- true if the object's schema version was changed, false if it was already updated
- Throws:
DeletedObjectException
- if this object does not exist in theJTransaction
associated with this instanceStaleTransactionException
- if the transaction associated with this instance is no longer usable
-
copyTo
default JObject copyTo(JTransaction dest, CopyState copyState, String... refPaths)
Copy this instance, and other instances it references through the specified reference paths, into the specified destination transaction.This is a more general method; see
copyIn()
andcopyOut()
for more common and specific use cases.This method copies this object and all other objects reachable from this instance through any of the specified reference paths (including intermediate objects visited).
This instance will first be
upgrade()
ed if necessary. If any copied object already exists indest
, it will have its schema version updated first, if necessary, then be overwritten. Any@OnVersionChange
,@OnCreate
, and@OnChange
methods will be notified accordingly as usual (indest
); however, for@OnCreate
and@OnChange
, the annotation must havesnapshotTransactions = true
ifdest
is aSnapshotJTransaction
.The two transactions must be compatible in that for any schema versions encountered, those schema versions must be identical in both transactions.
Circular references are handled properly: if an object is encountered more than once, it is not copied again. The
copyState
tracks which objects have already been copied and/or traversed along some reference path. For a "fresh" copy operation, pass a newly createdCopyState
; for a copy operation that is a continuation of a previous copy, reuse the previouscopyState
. TheCopyState
may also be configured to remap object ID's.Warning: if two threads attempt to copy objects between the same two transactions at the same time but in opposite directions, deadlock could result.
- Parameters:
dest
- destination transaction for copiescopyState
- tracks which indirectly referenced objects have already been copiedrefPaths
- zero or more reference paths that refer to additional objects to be copied- Returns:
- the copied version of this instance in
dest
- Throws:
DeletedObjectException
- if this object does not exist in theJTransaction
associated with this instance (no exception is thrown however if an indirectly referenced object does not exist unless it is traversed)DeletedObjectException
- if any object to be copied does not actually existDeletedObjectException
- if any copied object ends up with a reference to an object that does not exist indest
through a reference field configured to disallow deleted assignmentSchemaMismatchException
- if the schema corresponding to any copied object is not identical in both theJTransaction
associated with this instance anddest
IllegalArgumentException
- if any parameter is nullIllegalArgumentException
- if any path inrefPaths
is invalid- See Also:
copyIn()
,copyOut()
,JTransaction.copyTo()
,ReferencePath
-
copyOut
default JObject copyOut(String... refPaths)
Copy this instance and other instances it references through the specified reference paths (if any) into the associated in-memory snapshot transaction.Normally this method would only be invoked on a regular database
JObject
. The returned object will always be a snapshotJObject
.This is a convenience method, and is equivalent to invoking:
this.copyTo(this.getTransaction().getSnapshotTransaction(), new CopyState(), refPaths);
- Parameters:
refPaths
- zero or more reference paths that refer to additional objects to be copied- Returns:
- the snapshot
JObject
copy of this instance - Throws:
DeletedObjectException
- if any copied object ends up with a reference to an object that does not exist indest
through a reference field configured to disallow deleted assignment in snapshot transactionsIllegalArgumentException
- if this instance is a snapshot instanceIllegalArgumentException
- if any path inrefPaths
is invalid- See Also:
copyIn()
-
copyIn
default JObject copyIn(String... refPaths)
Copy this instance, and other instances it references through the specifiedrefPaths
(if any), into the transaction associated with the current thread.Normally this method would only be invoked on a snapshot
JObject
. The returned object will be aJObject
in the currently open transaction.This is a convenience method, and is equivalent to invoking:
this.copyTo(JTransaction.getCurrent(), new CopyState(), refPaths)
- Parameters:
refPaths
- zero or more reference paths that refer to additional objects to be copied- Returns:
- the regular database copy of this instance
- Throws:
DeletedObjectException
- if any copied object ends up with a reference to an object that does not exist indest
through a reference field configured to disallow deleted assignmentSchemaMismatchException
- if the schema corresponding to this object's version is not identical in both transactionsIllegalArgumentException
- if any path inrefPaths
is invalid- See Also:
copyOut()
-
cascadeCopyTo
default JObject cascadeCopyTo(JTransaction dest, String cascadeName, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the specified destination transaction.This is a convenience method, and is equivalent to invoking:
this.cascadeCopyTo(dest, cascadeName, -1, clone);
- Parameters:
dest
- destination transaction for copiescascadeName
- cascade name, or null for no cascade (i.e., copy only this instance)clone
- true to clone objects, i.e., assign the copies new, unused object ID's indest
, or false to preserve the same object ID's, overwriting any existing objects indest
- Returns:
- the copied version of this instance in
dest
- Throws:
DeletedObjectException
- if any object to be copied does not existDeletedObjectException
- if any copied object ends up with a reference to an object that does not exist indest
through a reference field configured to disallow deleted assignmentSchemaMismatchException
- if the schema version corresponding to any copied object is not identical in both transactionsIllegalArgumentException
- ifdest
is null- See Also:
cascadeCopyTo(JTransaction, String, int, boolean)
-
cascadeCopyTo
default JObject cascadeCopyTo(JTransaction dest, String cascadeName, int recursionLimit, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the specified destination transaction.This is a more general method; see
cascadeCopyIn()
andcascadeCopyOut()
for more common and specific use cases.This method finds and copies all objects reachable from this object based on
@JField.cascades()
and@JField.inverseCascades()
annotation properties on reference fields: a reference field is traversed in the forward or inverse direction ifcascadeName
is specified in the corresponding annotation property. See@JField
for details.The
recursionLimit
parameter can be used to limit the maximum distance of any copied object, measured in the number of reference field "hops" from this object.This instance will first be
upgrade()
ed if necessary. If any copied object already exists indest
, it will have its schema version updated first, if necessary, then be overwritten. Any@OnVersionChange
,@OnCreate
, and@OnChange
methods will be notified accordingly as usual (indest
); however, for@OnCreate
and@OnChange
, the annotation must havesnapshotTransactions = true
ifdest
is aSnapshotJTransaction
.The two transactions must be compatible in that for any schema versions encountered, those schema versions must be identical in both transactions.
Circular references are handled properly: if an object is encountered more than once, it is not copied again. The
copyState
tracks which objects have already been copied and traversed. For a "fresh" copy operation, pass a newly createdCopyState
; for a copy operation that is a continuation of a previous copy, reuse the previouscopyState
. TheCopyState
may also be configured to remap object ID's.Warning: if two threads attempt to copy objects between the same two transactions at the same time but in opposite directions, deadlock could result.
- Parameters:
dest
- destination transaction for copiescascadeName
- cascade name, or null for no cascade (i.e., copy only this instance)recursionLimit
- the maximum number of references to hop through, or -1 for infinityclone
- true to clone objects, i.e., assign the copies new, unused object ID's indest
, or false to preserve the same object ID's, overwriting any existing objects indest
- Returns:
- the copied version of this instance in
dest
- Throws:
DeletedObjectException
- if any object to be copied does not existDeletedObjectException
- if any copied object ends up with a reference to an object that does not exist indest
through a reference field configured to disallow deleted assignmentSchemaMismatchException
- if the schema version corresponding to any copied object is not identical in both transactionsIllegalArgumentException
- ifrecursionLimit
is less that -1IllegalArgumentException
- ifdest
is null- See Also:
cascadeCopyIn()
,cascadeCopyOut()
,JTransaction.cascadeFindAll()
-
cascadeCopyOut
default JObject cascadeCopyOut(String cascadeName, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the associated in-memory snapshot transaction.Normally this method would only be invoked on a regular database
JObject
. The returned object will always be a snapshotJObject
.This is a convenience method, and is equivalent to invoking:
this.cascadeCopyTo(this.getTransaction().getSnapshotTransaction(), cascadeName, clone);
- Parameters:
cascadeName
- cascade name, or null for no cascade (i.e., copy only this instance)clone
- true to clone objects, i.e., assign the copies new, unused object ID's in the snapshot transaction, or false to preserve the same object ID's, overwriting any existing objects- Returns:
- the snapshot
JObject
copy of this instance - Throws:
DeletedObjectException
- if any object to be copied does not existDeletedObjectException
- if any copied object ends up with a reference to an object that does not exist indest
through a reference field configured to disallow deleted assignment in snapshot transactionsSchemaMismatchException
- if the schema version corresponding to any copied object is not identical in both transactionsIllegalArgumentException
- if this instance is a snapshot instance- See Also:
cascadeCopyIn()
,cascadeCopyTo()
-
cascadeCopyIn
default JObject cascadeCopyIn(String cascadeName, boolean clone)
Copy this instance and all objects reachable from it via the specified cascade into the transaction associated with the current thread.Normally this method would only be invoked on a snapshot
JObject
. The returned object will be aJObject
in the currently open transaction.This is a convenience method, and is equivalent to invoking:
this.cascadeCopyTo(JTransaction.getCurrent(), cascadeName, clone);
- Parameters:
cascadeName
- cascade name, or null for no cascade (i.e., copy only this instance)clone
- true to clone objects, i.e., assign the copies new, unused object ID's in the database transaction, or false to preserve the same object ID's, overwriting any existing objects- Returns:
- the regular database copy of this instance
- Throws:
DeletedObjectException
- if any object to be copied does not existDeletedObjectException
- if any copied object ends up with a reference to an object that does not exist indest
through a reference field configured to disallow deleted assignmentSchemaMismatchException
- if the schema version corresponding to any copied object is not identical in both transactions- See Also:
cascadeCopyOut()
,cascadeCopyTo()
-
resetCachedFieldValues
void resetCachedFieldValues()
Reset cached simple field values.JObject
s instances may cache simple field values after they have been read from the underlying key/value store for efficiency. This method causes any such cached values to be forgotten, so they will be re-read from the underlying key/value store on the next read of the field.Normally this method does not need to be used. It may be needed to maintain consistency in exotic situations, for example, where the underlying key/value store is being modified directly.
-
findReferring
default <R> NavigableSet<R> findReferring(Class<R> type, String fieldName)
Find all objects of the given type referring to this object through the specified reference field.The
fieldName
can be the name of a simple reference field (e.g.,"teacher"
) or a sub-field of a complex field (e.g.,"students.element"
).- Type Parameters:
R
- type of referring objects- Parameters:
type
- type of referring objectsfieldName
- name of reference field- Returns:
- all objects of the specified type referring to this object through the named field
- Throws:
StaleTransactionException
- if the transaction associated with this instance is no longer openIllegalArgumentException
- if either parameter is null
-
getJClass
default JClass<?> getJClass()
- Returns:
- associated
JClass
- Throws:
TypeNotInSchemaVersionException
- if this instance has a type that does not exist in this instance's schema version, i.e., this instance is anUntypedJObject
-
-


zoom:
Click to draw panels.
Press enter to close the panel path.
While drawing shift-click to undo last point.
After drawing Shift-click on a panel to delete it.
Press shift-+/- to zoom in or out.


Preparation time
1-2 hours
Cooking time
30 mins to 1 hour
Serves
Makes 12
Heat the oil in a frying pan over a medium heat. Add the onion, garlic and carrot and fry until softened.
Add the mince and fry for 3-4 minutes, until golden-brown all over.
Add the tomato purée, cumin and chilli powder, stir well and cook for 3-4 minutes.
Add the potatoes and the beer and bring to the boil. Reduce the heat and simmer for 25 minutes, or until potatoes are cooked.
Remove from the heat and leave to cool.
For the pastry, place the flour, turmeric, chilli flakes, butter and salt into a food processor and pulse to a breadcrumb-like consistency.
Add the milk and egg yolk and pulse together until the mixture just comes together as a dough.
Turn the dough out onto a lightly floured work surface and knead for a few minutes, then wrap in cling film and transfer to the fridge to chill for an hour.
Preheat the oven to 200C/400F/Gas 6.
Roll the pastry out onto a lightly floured work surface and cut out 12 circles of 10cm/4in diameter.
Place a spoonful of the filling into the centre of each pastry circle.
Brush the edge of one half of each of the circles with some of the beaten egg, then fold over the other side and seal - make sure you don't trap any air inside.
Mark around the edges of the sealed pastry with the tines of a fork.
Place the empanadas onto a baking tray and transfer to the oven to cook for 10 minutes, or until the pastry is cooked and the filling is hot.
To serve, place the empanadas onto a large serving plate with sweet chilli dipping sauce in a bowl in the centre.


When talking to your customers and users, it is important to synthesize the information to make sure you are not just “delivering faster horses” (and apparently, there is no evidence that Henry Ford actually said it, but I digress. ). When you are working onbrand new features, you likely are talking to a lot of power users and early adopters. Given how well they know about your current product, it is quite likely that they will tell you not only the “what” of the feature but also give you insights on the “how”.
So It becomes important to distinguish between what the user says by way of implementation and what the user’s real intent is. There are a couple of cues that can alert you to this:
- Is the user focusing on the feature or are they talking about the benefit they’d derive from the feature? (To continue the faster horse analogy above, are they asking for shinier new wheels with additional spare wheels (which are features), or are they wishing that they get to a place faster (which is a benefit)
- From the blog Scotch and Code, I found another useful way. When the user is talking about the feature/app, are they saying “IT can do this” or are they saying “I can do this”. This subtle shift in perspective is a cue on whether the user is focusing and more importantly give a sense for whether the user thinks of your app as a tool that empowers them to do what they want to accomplish.
And finally, here is a good example of how the focus is on the user’s intent. The Spilt keyboard in the iPad, accounts for the fact that people are going to tap on the empty spaces near the keys along the edge AND it guesses the user’s intent and magically makes those taps in empty spaces to the adjoining letter. Here is an illustration of this nifty trick:
(Image via http://ios.finerthingsin.com/post/16982049392/ipad-keyboard-phantom-buttons)
Go ahead, try it out in your iPad. This is a classic example of focusing on the user’s intent, and not on the specifics of a given implementation.


Learn Pamoja is a resource center for students in Kenya. Our goal is to provide a safe space equipped with books, the internet, and computers for our students and other community members. We also run mentorship and tutoring programs.
We aim to provide computers and the internet for use with the students who would otherwise not have access to these resources. This promotes our goal of advancing research and innovation in Kenya.
We connect students with tutors who will help them with their school work and other studies.
We also connect students with mentors who provide counsel and guidance to the students on education, career paths, and entrepreneurship.
The students we serve face a lot of challenges as they pursue their education.The challenges range from lack of a conducive study environment to lack of the internet and computers to lack of tutors and mentors.
Learn Pamoja is committed to supporting students with resources that will not only help them do well in their education, but also support them as they innovate and research.
Our goal is to:
(i) have a variety of books for each subject the students need,
(ii) have a variety of non-academic books to motivate students, and
(iii) provide computers with internet access.
This program supports students preparing for the Kenya national exams(KCPE & KCSE) by providing them with tutors for their different subjects.
This program matches students with mentors who keep track of their personal, extracurricular, and academic progress.
This program also provides guidance to High School students who are preparing to join college.
Anyone who has successfully completed their high school education can apply to be a tutor.
Get in TouchYour conytribution will go a long way in supporting our programs and ensuring that we best support our students.
We are currently accepting donations for the following:
You can choose to donate to one or multiple of the projects.


Edit Model: {{model.models[0].name}} (ID:{{ model.models[0].id }})
Home
Back to model detail
Delete Model
Model information:
Name:
Alias (optional):
This alias already exists. Please choose another one.
This alias is valid!
Check validity
Author(s):
Owner(s):
Main collab id:
Private:

no
yes
Organization:
{{o}}
Project:
Species:
{{s}}
Brain region:
{{br}}
Cell type:
{{ct}}
Model scope:
{{mt}}
Abstraction level:
{{mt}}
Description:
{{model.models[0].description}}
Save changes
Images describing the model:
Add an image
Model versions:
Version
Save changes
Not editable
Description
Parameters
Morphology
Download location
Code format
License
Add an image to the model description
Url:
Caption:
Save changes


“Never judge a book by its cover” You never know what kind journey each of us have been on. When people see me most people automatically think that I’m fit, I’m healthy, in shape, and I don’t know what it is like to be over weight or down someone else’s path. One thing that most people don’t know about me is that I’m so far from anything perfect.  In 2015 I was over 210 lbs and in May of this year I got really lazy and gained over 30 lbs. When I say I’ve been down your path, trust me when I say it. I may not have been down your exact path, but I’ve been down mine and mine has been tough, hard, far from easy, and sometimes not even worth it. I sometimes on the daily need to find my inner strength just to get through. One thing I new was in the end it some how would all be worth it. Whether it’s about fitness, life struggles, or just a tough time remember we are all stronger than we think. As long as your dedicated, motivated, determined, and have self discipline I promise it will all be worth it. Remember in everything we do, we don’t gain without pain. You’ll never know what victory feels like without feeling the pain of defeat. This isn’t just your journey it’s ours. So let’s do this and get you to where you want to be.
I promise to give you my best when it comes to helping you achieve your fitness goals. I’ll be here ever step of the way, if your not happy then I’m not happy. Trust in me to push you to your limits, trust me to help motivate and challenge you. This journey won’t be easy, but I do promise it will be worth it. Give me your full dedication and I vow to get you to where you want to be. Remember this isn’t a temporary journey, this is a lifestyle. “Rome wasn’t built in a day, but they worked on it everyday”. If in the end you don’t meet any of your goals after I’ve given you all the tools, Then I promise to reimburse you everything you’ve ever paid. So let’s get you started, pick a date on my calendar and let’s meet to begin your very own fitness journey.


This video shows the new Online Schema Change feature in DB2 9.7 which makes databases more available by allowing definitions of objects like tables and views to be changes on-the-fly without interrupting access by users and applications.


Exactly like JWT.io except it's neither as beautiful nor remotely as useful.
{{jwt.payload | json}}
{{decodedBase64}}


Fall 2014
MASSIVE DATASETS - METADATA AND INTERFACES
Mengpin Dai
Xiaojing Feng
Zhang Zhang
Web developer
Designer
Bootstrap
HTML5/CSS3
Axure
Rapid prototype
Heuristic Evaluation
This map is a manuscript for Alamo historic site, the letter from A to R stands for walls, and number stands for pillars. All the green and red triangles are clickable. However, since there are only picture for WallA, we made WallA green and others red.
This is a second way to go to one specific wall, instead of finding a wall on the map, we can also use this more direct way to go to single wall page.
Visitors can only see the information that have been added to the all, they cannot change any of them.
This page is for administrator, the administrator can add information to this wall, and he can view the information he already added as well.


--- layout: tweet ---
Salad for lunch. Hmm, we need better leftovers.
8/29/2008, 12:21:16 PM
Favs: 0
Retweets: 0


Django FileBrowser Documentation
Media-Management with Grappelli.
This documentation covers version 3.5.1 of the FileBrowser.
Note
FileBrowser 3.5.1 requires Django 1.4 and Grappelli 2.4. FileBrowser is always developed against the lastest stable Django release and is NOT tested with Djangos trunk.
Installation and Setup
FileBrowser Sites
FileBrowser API
Admin Interface
Fields and Widgets
Image Versions
Help
Main Features
- Browse your media files with the admin-interface.
- Multiple Upload, including a progress bar.
- Automatic Thumbnails.
- Image-Versions to fit your websites grid (esp. useful with adaptive/responsive layouts).
- Integration with TinyMCE (AdvImage & AdvLink).
- FileBrowseField to select Images/Documents.
- FileInput and ClearableFileInput with Image-Preview.
- Signals for Upload, Rename and Delete.
- Custom Actions.
- Custom File Storage Engines.
Versions and Compatibility
- FileBrowser 3.5.x: Requires Grappelli 2.4 and Django 1.4 (3.5.1 is also compatible with Django 1.5)
- FileBrowser 3.4.x: Requires Grappelli 2.3 and Django 1.3
Older versions are availabe at GitHub, but are not supported anymore.


Oops, it looks like something went wrong on our end. Please wait a minute and refresh or try again later


HTML5 finally provides a standard way to interact with local files, via the File API specification. As example of its capabilities, the File API could be used to create a thumbnail preview of images as they're being sent to the server, or allow an app to save a file reference while the user is offline. Additionally, you could use client-side logic to verify an upload's mimetype matches its file extension or restrict the size of an upload.
The spec provides several interfaces for accessing files from a 'local' filesystem:
File
- an individual file; provides readonly information such as name, file size, mimetype, and a reference to the file handle.FileList
- an array-like sequence of File
objects. (Think <input type="file" multiple>
or dragging a directory of files from the desktop).Blob
- Allows for slicing a file into byte ranges.When used in conjunction with the above data structures, the FileReader
interface
can be used to asynchronously read a file through familiar JavaScript event handling. Thus, it is possible to monitor the progress of a read, catch errors,
and determine when a load is complete. In many ways the APIs resemble XMLHttpRequest
's event model.
The first thing to do is check that your browser fully supports the File API:
// Check for the various File API support. if (window.File && window.FileReader && window.FileList && window.Blob) { // Great success! All the File APIs are supported. } else { alert('The File APIs are not fully supported in this browser.'); }
Of course, if your app will only use a few of these APIs, modify this snippet accordingly.
The most straightforward way to load a file is to use a standard <input type="file">
element.
JavaScript returns the list of selected File
objects as a FileList
.
Here's an example that uses the 'multiple' attribute to allow selecting several files at once:
<input type="file" id="files" name="files[]" multiple /> <output id="list"></output>
Example: Using form input for selecting. Try it!
Another technique for loading files is native drag and drop from the desktop to the browser. We can modify the previous example slightly to include drag and drop support.

Drop files here
 <output id="list"></output>
Example: Using drag and drop for selecting. Try it!
Note: Some browsers treat <input type="file">
elements as native drop targets.
Try dragging files onto the input field in the previous example.
Now comes the fun part!
After you've obtained a File
reference, instantiate a FileReader
object
to read its contents into memory. When the load finishes, the reader's onload
event is fired
and its result
attribute can be used to access the file data.
FileReader
includes four options for reading a file, asynchronously:
FileReader.readAsBinaryString(Blob|File)
- The result
property will contain the file/blob's data
as a binary string. Every byte is represented by an integer in the range [0..255].FileReader.readAsText(Blob|File, opt_encoding)
- The result
property will contain the
file/blob's data as a text string. By default the string is decoded as 'UTF-8'. Use the optional encoding parameter
can specify a different format.FileReader.readAsDataURL(Blob|File)
- The result
property will contain the file/blob's
data encoded as a data URL.FileReader.readAsArrayBuffer(Blob|File)
- The result
property will contain the file/blob's
data as an ArrayBuffer object.Once one of these read methods is called on your FileReader
object, the onloadstart
,
onprogress
, onload
, onabort
, onerror
, and onloadend
can be used to track its progress.
The example below filters out images from the user's selection, calls reader.readAsDataURL()
on the file, and renders a thumbnail by setting the 'src' attribute to a data URL.
 <input type="file" id="files" name="files[]" multiple /> <output id="list"></output>
Example: Reading files. Try it!
Try this example with a directory of images!
In some cases reading the entire file into memory isn't the best option. For example, say you wanted to write an async file uploader. One possible way to speed up the upload would be to read and send the file in separate byte range chunks. The server component would then be responsible for reconstructing the file content in the correct order.
Lucky for us, the File
interface supports a slice method to support this use case.
The method takes a starting byte as its first argument, ending byte as its second, and
an option content type string as a third.
var blob = file.slice(startingByte, endindByte); reader.readAsBinaryString(blob);
The following example demonstrates reading chunks of a file. Something worth noting is that it uses the
onloadend
and checks the evt.target.readyState
instead of using the
onload
event.
 <input type="file" id="files" name="file" /> Read bytes:  <button data-startbyte="0" data-endbyte="4">1-5</button> <button data-startbyte="5" data-endbyte="14">6-15</button> <button data-startbyte="6" data-endbyte="7">7-8</button> <button>entire file</button>

Example: Slicing a file. Try it!
One of the nice things that we get for free when using async event handling is the ability to monitor the progress of the file read; useful for large files, catching errors, and figuring out when a read is complete.
The onloadstart
and onprogress
events can be used
to monitor the progress of a read.
The example below demonstrates displaying a progress bar to monitor the status of a read. To see the progress indicator in action, try a large file or one from a remote drive.
 <input type="file" id="files" name="file" /> <button onclick="abortRead();">Cancel read</button>

0%

Example: Monitoring the progress of a read. Try it!
Tip: To really see this progress indicator in action, try a large file or a resource on a remote drive.


--- layout: page title: Contact ---
Want to chat? Please send me an Email at ruili4 (at) cmail (dot) carleton (dot) ca.


Query Detailed Report
|
View report:
|
|
| On: | |
| From: | to: |
| Within: | |
|
Test Cases
|
|
|
Choose environment:
|
|


2 Weekly
New volumes
| Volume Name | Date Created | Owner Name | Databrary URL |
|---|---|---|---|
| ManyBabies1: labunam | 2023-07-04 | Arias-Trejo, Natalia | https://nyu.databrary.org/volume/1622 |
| Toy kitchen play data | 2023-06-30 | Pinto, Lerrel | https://nyu.databrary.org/volume/1621 |
| Toy kitchen play data | 2023-06-30 | Adolph, Karen | https://nyu.databrary.org/volume/1621 |
| DatabraryR | 2023-06-29 | Gilmore, Rick O. | https://nyu.databrary.org/volume/1620 |
| DatabraryR | 2023-06-29 | Spies, Jeffrey | https://nyu.databrary.org/volume/1620 |
| RISE Battery | 2023-06-28 | Tenenbaum, Elena | https://nyu.databrary.org/volume/1619 |
| RISE Battery | 2023-06-28 | Stone, Caitlin | https://nyu.databrary.org/volume/1619 |
| AI x Trust | 2023-06-22 | Palmquist, Carolyn | https://nyu.databrary.org/volume/1618 |
| Validation of the StimQ2: A parent-report measure of cognitive stimulation in the home | 2023-06-21 | Cates, Carolyn | https://nyu.databrary.org/volume/1617 |


Webapps, Ecommerce and more
We develop handled the back-end communication between the data engine and the display interfaces. We aided the further development of a platform that integrates data from different sources and systems and delivers them to the client in a smooth and user-friendly way. best screen recording softwares.
- List item lorem ipsum
- List item donec pede justo,
- List item ullamcorper ultricies nisi


MAGGIE PLAY
Celtic-daft Rod Stewart reveals playing football saved him from drink and drugs
by George MairSIR Rod Stewart has revealed playing football saved him from the rocker lifestyle of drink and drugs.
The Celtic-daft singer, 74, said he wasn't committed enough to become a professional footballer, despite having trials with London outfit Brentford FC in his teens.
But he insisted he remained so dedicated to his regular kickabouts that he was always clean before games.
He said: "Football sort of saved me a little bit."
Speaking to BBC Radio Scotland's Billy Sloan, the Maggie May star admitted that he downed copious amounts of alcohol as a young rocker.
But he turned his back on drugs -- and said the most important reason was his twice-weekly football matches.
He said: "Up until seven years ago I was still playing football Sunday mornings and Wednesday nights.
"Especially Sunday mornings, I couldn't do drugs and drink too much, because it would have ruined my game.
"So football sort of saved me a little bit.
"I got arrested in Los Angeles on a Saturday night because they thought I was drink driving. I got taken to the police station and there was nothing in my system.
"Any other night they would have done me but as it was a Saturday night I was going home early, getting rested up for a game at 11am the next morning.
"But football has helped me so much and I miss it so much, not playing."
The Celtic supporter told how his Scottish father, a former amateur player, had wanted him to become a professional footballer.
He famously attended trials with Third Division outfit Brentford -- now in the English Championship -- but admitted he already had a "burning desire" to be a singer.
He said: "I wasn't good enough to be a footballer, although I tried -- I had trials at Brentford but just to keep my dad happy really.
"Music had entered my soul and I couldn't commit to football, and the hours -- as a musician you can stay in bed all day."
Asked if he could wave a magic wand and go back and become a world class footballer -- and play for his beloved Celtic or Scotland -- the music legend admitted he would not change a thing.
He said: "No, not in a million years because I'm 74 -- do you know any footballers that are still playing at 74? The longevity of my career could not have gone on if I was a footballer.
"It's a wonderful notion. I love the Hoops and I love Scotland, but I'm glad. I am dedicated to music. I don't think I ever was when I had my chance to be a footballer and I went for my trial at Brentford. I was never dedicated to it."
Sir Rod, who has enjoyed stunning success over 50 years, will perform at the SSE Hydro in Glasgow this month the P&J Arena in Aberdeen in December. But he insisted he has no plans to retire.
He said: "Not at all because that's when you start thinking 'oh I've got nothing to do'. It's our jobs that drive us on and we should work as long as we can.
"I don't want retirement. I refuse to use the word.
"There will come a time, pretty soon, when I won't be doing all the rock'n'roll stuff, because I want to do the American songbook with a big orchestra, so at the moment I have no plans to retire, or even take it easy."


Register
Username
(max. 15 characters)
E-mail address
(
must
be valid)
Password
Screen name (optional)
Home page
Required information
Optional personal information


We are working on a smart grid pilot project here in Manchester over the next three years which will be based on OEM monitors in every house. As part of this we have 5 x 10kWhr battery storage unit and we are trying to specify what kind of inverter would be best in terms of compatibility with OEM systems. While we might look at a low-voltage ring for lighting in one of the houses the project is really interested in what can be done in terms of supporting the 240v ring during times of heavy load and low production.
Does anyone have any recommendations for inverters they've used or particular things we need to look out for or bear in mind?
Many thanks,
Matt
Re: Inverter recommendations?
Meanwell have got a good range, the trend is towards '2-way' inverters meaning they have a built-in charger, but I favor a more modular approach, and actually keep the Inverter Off when not need, but charger On.
In terms of lighting, look at 230V LED conversions rather that 12V, some amazing new generation products on the market (like the latest Verbatim GU10 dimmable types 4W LED just as bright as 90W halogen). But some rubbish on the market as well. Remember 12V means more fatter wiring to compensate for higher currents (Power loss is I squared R).


Voltage: 11 kV
Capacity at substation: 5000 kW
Capacity 1km from substation: 5000 kW
Substation ID: 512615
Distance from search point: 0.05 Km
Voltage: 11 kV
Capacity at substation: 5000 kW
Capacity 1km from substation: 5000 kW
Substation ID: 513554
Distance from search point: 0.06 Km


This example uses the explore
entrypoint to find places by using categories without typing search queries. It looks for sights and museums (i.e. within the sights-museums
category) , around the Brandenburg Gate (52.5159°N, 13.3777°E) in Berlin. For more information about available parameters and options visit Explore Entrypoint Places API documentation.


Utopia::Path
Represents a path as an array of path components. Useful for efficient URL manipulation.
Nested
Definitions
def self.prefix_length(a, b)
Returns the length of the prefix which is shared by two strings.
Implementation
def self.prefix_length(a, b)
[a.size, b.size].min.times{|i| return i if a[i] != b[i]}
end
def self.shortest_path(path, root)
Return the shortest relative path to get to path from root:
Implementation
def self.shortest_path(path, root)
path = self.create(path)
root = self.create(root).dirname
# Find the common prefix:
i = prefix_length(path.components, root.components) || 0
# The difference between the root path and the required path, taking into account the common prefix:
up = root.components.size - i
return self.create([".."] * up + path.components[i..-1])
end
def self.unescape(string)
Converts '+' into whitespace and hex encoded characters into their equivalent characters.
Implementation
def self.unescape(string)
string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) {
[$1.delete('%')].pack('H*')
}
end
def self.from_string(string)
This constructor takes a string and generates a relative path as efficiently as possible. This is a direct entry point for all controller invocations so it's designed to suit the requirements of that function.
Implementation
def self.from_string(string)
self.new(unescape(string).split(SEPARATOR, -1))
end
def join(other)
Signature
-
parameter
other
Array(String)
The path components to append.
Implementation
def join(other)
# Check whether other is an absolute path:
if other.first == ''
self.class.new(other)
else
self.class.new(@components + other).simplify
end
end
def -(other)
Computes the difference of the path. /a/b/c - /a/b -> c a/b/c - a/b -> c
Implementation
def -(other)
i = 0
while i < other.components.size
break if @components[i] != other.components[i]
i += 1
end
return self.class.new<EMAIL_ADDRESS>end
def first
Returns the first path component.
Implementation
def first
if absolute?
@components[1]
else
@components[0]
end
end
def last
Returns the last path component.
Implementation
def last
if @components != ['']
@components.last
end
end
def pop
Pops the last path component.
Implementation
def pop
# We don't want to convert an absolute path to a relative path.
if @components != ['']
@components.pop
end
end
def basename
Implementation
def basename
basename, _ = @components.last.split('.', 2)
return basename || ''
end
def extension
Implementation
def extension
_, extension = @components.last.split('.', 2)
return extension
end
def []= index, value
Replaces a named component, indexing as per
Implementation
def []= index, value
return @components[component_offset(index)] = value
end
def component_offset(index)
We adjust the index slightly so that indices reference path components rather than the directory markers at the start and end of the path components array.
Implementation
def component_offset(index)
if Range === index
Range.new(adjust_index(index.first), adjust_index(index.last), index.exclude_end?)
else
adjust_index(index)
end
end


Welcome and thank you for participating in this experiment!
Please before we begin:
- Close all other programs and browser tabs.
- If possible, turn off the audio of your computer and mute your phone.
First, we would like to collect a few pieces of information from you.
This information is solely for our data analysis. It cannot be used to identify you.
Please answer truthfully. These answers will NOT impact your HIT approval or payment.
What is your age?
What is your biological sex?
Did you live in the United States from birth until (at least) age 13?
Did both of your parents speak English to you at home?
Which state did you grow up in (two letter abbreviation)?
After clicking the button below, the fullscreen mode will be automatically turned on for the entire duration of the experiment.


From the newsletter ... |
|
What is the hardest question you have ever been asked?What are the key insights of phenomenology? For me I stumbled across my hardest question half way through one of those self answer quizzes found on training courses. The instructions for the Myers-Briggs test were quite clear: 70 simple questions demanding yes or no answers and they all have to be answered in 15 minutes. Question 47: What is more important, mercy or justice? For a moment my hand froze over the tick box. Surely both are equally important but so different. How on earth can anyone say? Just a few seconds left before I had to move onto the next question or risk failing the test altogether. Which box would you have ticked? I know that my wife ticked mercy and I selected justice. And I came out with a personality profile shared with Margaret Thatcher and my wife came out in the same grouping as Mother Teresa! How would God answer? You see if God is perfectly good how can He accept any imperfection in his universe without compromising that perfect goodness? We do not have to look very far to see how every day we humans fall short of the glory of God. Just one unkind word to a loved one compromises God's perfect goodness. Yet God loves each and every one of us and desperately wants a deep and personal relationship. This in spite of all our shortcomings and failings when measured against a standard of perfection. You see justice and mercy are two sides of the same coin and essential characteristics of God. They seem impossible to reconcile but in the life, death and resurrection of Jesus that is exactly what has happened. God so loved the world that he has sent his only Son to one place, Israel, at one time, 2000 years ago, to reconcile mercy and justice. Of his own free will Jesus lived a blameless life of service and love but willingly took upon himself an agonizing death so that, with the demands of justice met, all humanity can be freed to enjoy God's love and mercy. Now and forever. On second thoughts perhaps the hardest question we have to answer is the one posed to us all by Jesus: Who do you think I am? Now how would you answer that one? Cogges Parish | Other articles | Previous issue | Feedback © 2001; Published in Cogges Parish monthly newsletter, number 260, March 2001 |


Class AbstractMap
Interface for Dict.
- _php_adt\Clonable
- _php_adt\Super implements _php_adt\Comparable, Countable, _php_adt\Hashable
- _php_adt\AbstractCollection
- _php_adt\AbstractMap
Direct known subclasses
Methods summary
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public static
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|


Theo
Tags
Healthy, eggs, onions, low-sugar
John
Looking forward !
John
... to see the final dish :)
Julie
I used the same last night. Enjoy it
Theo
John
Decilicous
Julie
Not what I had in mind :(
Manny
John
Dinner tonight
John
Perfect
Julie
Enjoy it


--- notes: This one is the same as the regular input group, but the button never becomes a block level component. ---


Expands signal
's axis
dimension into frames of frame_length
.
tf.compat.v1.signal.frame
tf.compat.v2.signal.frame
tf.signal.frame( signal, frame_length, frame_step, pad_end=False, pad_value=0, axis=-1, name=None )
Slides a window of size frame_length
over signal
's axis
dimension
with a stride of frame_step
, replacing the axis
dimension with
[frames, frame_length]
frames.
If pad_end
is True, window positions that are past the end of the axis
dimension are padded with pad_value
until the window moves fully past the
end of the dimension. Otherwise, only window positions that fully overlap the
axis
dimension are produced.
pcm = tf.compat.v1.placeholder(tf.float32, [None, 9152]) frames = tf.signal.frame(pcm, 512, 180) magspec = tf.abs(tf.signal.rfft(frames, [512])) image = tf.expand_dims(magspec, 3)
signal
: A [..., samples, ...]
Tensor
. The rank and dimensions
may be unknown. Rank must be at least 1.frame_length
: The frame length in samples. An integer or scalar Tensor
.frame_step
: The frame hop size in samples. An integer or scalar Tensor
.pad_end
: Whether to pad the end of signal
with pad_value
.pad_value
: An optional scalar Tensor
to use where the input signal
does not exist when pad_end
is True.axis
: A scalar integer Tensor
indicating the axis to frame. Defaults to
the last axis. Supports negative values for indexing from the end.name
: An optional name for the operation.A Tensor
of frames with shape [..., frames, frame_length, ...]
.
ValueError
: If frame_length
, frame_step
, pad_value
, or axis
are not
scalar.


Our products are designed by a team of experts.  We also provide free returns if you are not satisfied.
Whether you are busy in your office or away in a holiday. You can still watch what's going on in your house or office by only downloading our uniquely designed app.