JS Files, by Jason Custer
This program allows users to encode files to data URLs. All files will be stored in a javascript object called jsFiles. By default, the keys to the hash object are the file names, but you can rename these keys.
How it works.
- Use the file uploader to upload files.
- Select a file in the dropdown,
- Change the name in the rename box,
- click "Update" to save the new name.
- Type the name of your base object, the files will be .jsFiles. This helps avoid collisions.
- Finally, click the save button to generate a download link, then right-click and save the file as .js. Note that the .js extension will likely not be added automatically, so be sure to add it.
To use the encoded files in your project:
- include the script you saved in the previous steps. Include it before you need it of course.
- To get a file's data url, use your-base-object.jsFiles["your-file-name"]
- If you feel lost, encode a small file with the previous steps, then look at the resulting script.
Thank you for using JS Files!


Who We Are
BOOKSFORME is the world’s largest site for readers and book recommendations. Our mission is to help people find and share books they love. BOOKSFORME launched in MARCH 2020.
A Few Things You Can Do On BOOKSFORME
Track the books you're reading, have read, and want to read.
Check out your personalized book recommendations. Our recommendation engine analyzes 10 thousand data points to give suggestions tailored to your literary tastes.
Find out if a book is a good fit for you from our community’s reviews.
A Message From Our Co-Founder
When I was in second grade, I discovered the Hardy Boys series. Ever since, I've loved to read — both for fun and to improve my mind. And I'm always looking for the next great book.
One afternoon while I was scanning a friend's bookshelf for ideas, it struck me: when I want to know what books to read, I'd also make a bookshelf.
So I decided to build a website – a place where I could make bookshelves.The team Matrix created this website for our school project but it could much more and reach to the world.
BOOKSFORME is that site. It is a place where you can see what kind of books are more popular than other. You can create "bookshelves" to organize what you've read (or want to read).You can find your next favorite book. And on this journey with your friends you can explore new territory, gather information, and expand your mind.
Know more with less.
Sumit Khanal
Co-Founder


{% extends "layout.html" %} {% block body %}
Hi, I'm Carlan. This is a password generator based on some rules. While this is a very simple application the generated passwords are very strong.
I created this app to learn more about the Flask framework, which was written in Python. It's very similar to bottle tho. And sinatra, written in Ruby. You know what it's reminds me from a far distance too? Spark for Java. I don't know, I love microframeworks, they are so simple to prototype something.


Kami Sarki is guide based in Nepal with over 10 years of guiding experience, and nearly 30 years trekking in the Himalayas. Kami can arrange various types of treks in the Everest, Annapurna, Langtan, Kanchan Junga, and Upper Mustang regions, along with any other custom treks. To find out more please contact him through the channels listed below.


Model Build Information
When you build a model, the contents pane displays information such as the following:
• Model Build Progress displays the progress of the model build.
• Model Build Details displays messages about the model build progress. For information on reading build log messages, see Analyzing Model Build Output.
• A summary of the number of catastrophes, errors, and warnings that occurred during the build.
Clicking an error icon () displays a numbered list of errors that occurred during the build.
From the error list, selecting an error highlights the error in the Model Build Details.
To analyze a build log and debug a model, see Analyzing Logs and Debugging Models.


# -*- coding: utf-8 -*- # # Copyright (C) 2013-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from io import BytesIO import logging import os import re import struct import sys from .compat import sysconfig, detect_encoding, ZipFile from .resources import finder from .util import (FileOperator, get_export_entry, convert_path, get_executable, in_venv) logger = logging.getLogger(__name__) _DEFAULT_MANIFEST = ''' <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="<IP_ADDRESS>" processorArchitecture="X86" name="%s" type="win32"/> <!-- Identify the application security requirements. --> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> </assembly>'''.strip() # check if Python is called on the first line with this expression FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$') SCRIPT_TEMPLATE = r'''# -*- coding: utf-8 -*- import re import sys from %(module)s import %(import_name)s if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(%(func)s()) ''' def _enquote_executable(executable): if ' ' in executable: # make sure we quote only the executable in case of env # for example /usr/bin/env "/dir with spaces/bin/jython" # instead of "/usr/bin/env /dir with spaces/bin/jython" # otherwise whole if executable.startswith('/usr/bin/env '): env, _executable = executable.split(' ', 1) if ' ' in _executable and not _executable.startswith('"'): executable = '%s "%s"' % (env, _executable) else: if not executable.startswith('"'): executable = '"%s"' % executable return executable class ScriptMaker(object): """ A class to copy or create scripts from source scripts or callable specifications. """ script_template = SCRIPT_TEMPLATE executable = None # for shebangs def __init__(self, source_dir, target_dir, add_launchers=True, dry_run=False, fileop=None): self.source_dir = source_dir self.target_dir = target_dir self.add_launchers = add_launchers self.force = False self.clobber = False # It only makes sense to set mode bits on POSIX. self.set_mode = (os.name == 'posix') or (os.name == 'java' and os._name == 'posix') self.variants = set(('', 'X.Y')) self._fileop = fileop or FileOperator(dry_run) self._is_nt = os.name == 'nt' or ( os.name == 'java' and os._name == 'nt') def _get_alternate_executable(self, executable, options): if options.get('gui', False) and self._is_nt: # pragma: no cover dn, fn = os.path.split(executable) fn = fn.replace('python', 'pythonw') executable = os.path.join(dn, fn) return executable if sys.platform.startswith('java'): # pragma: no cover def _is_shell(self, executable): """ Determine if the specified executable is a script (contains a #! line) """ try: with open(executable) as fp: return fp.read(2) == '#!' except (OSError, IOError): logger.warning('Failed to open %s', executable) return False def _fix_jython_executable(self, executable): if self._is_shell(executable): # Workaround for Jython is not needed on Linux systems. import java if java.lang.System.getProperty('os.name') == 'Linux': return executable elif executable.lower().endswith('jython.exe'): # Use wrapper exe for Jython on Windows return executable return '/usr/bin/env %s' % executable def _build_shebang(self, executable, post_interp): """ Build a shebang line. In the simple case (on Windows, or a shebang line which is not too long or contains spaces) use a simple formulation for the shebang. Otherwise, use /bin/sh as the executable, with a contrived shebang which allows the script to run either under Python or sh, using suitable quoting. Thanks to Harald Nordgren for his input. See also: http://www.in-ulm.de/~mascheck/various/shebang/#length https://hg.mozilla.org/mozilla-central/file/tip/mach """ if os.name != 'posix': simple_shebang = True else: # Add 3 for '#!' prefix and newline suffix. shebang_length = len(executable) + len(post_interp) + 3 if sys.platform == 'darwin': max_shebang_length = 512 else: max_shebang_length = 127 simple_shebang = ((b' ' not in executable) and (shebang_length <= max_shebang_length)) if simple_shebang: result = b'#!' + executable + post_interp + b'\n' else: result = b'#!/bin/sh\n' result += b"'''exec' " + executable + post_interp + b' "$0" "$@"\n' result += b"' '''" return result def _get_shebang(self, encoding, post_interp=b'', options=None): enquote = True if self.executable: executable = self.executable enquote = False # assume this will be taken care of elif not sysconfig.is_python_build(): executable = get_executable() elif in_venv(): # pragma: no cover executable = os.path.join(sysconfig.get_path('scripts'), 'python%s' % sysconfig.get_config_var('EXE')) else: # pragma: no cover executable = os.path.join( sysconfig.get_config_var('BINDIR'), 'python%s%s' % (sysconfig.get_config_var('VERSION'), sysconfig.get_config_var('EXE'))) if options: executable = self._get_alternate_executable(executable, options) if sys.platform.startswith('java'): # pragma: no cover executable = self._fix_jython_executable(executable) # Normalise case for Windows - COMMENTED OUT # executable = os.path.normcase(executable) # N.B. The normalising operation above has been commented out: See # issue #124. Although paths in Windows are generally case-insensitive, # they aren't always. For example, a path containing a ẞ (which is a # LATIN CAPITAL LETTER SHARP S - U+1E9E) is normcased to ß (which is a # LATIN SMALL LETTER SHARP S' - U+00DF). The two are not considered by # Windows as equivalent in path names. # If the user didn't specify an executable, it may be necessary to # cater for executable paths with spaces (not uncommon on Windows) if enquote: executable = _enquote_executable(executable) # Issue #51: don't use fsencode, since we later try to # check that the shebang is decodable using utf-8. executable = executable.encode('utf-8') # in case of IronPython, play safe and enable frames support if (sys.platform == 'cli' and '-X:Frames' not in post_interp and '-X:FullFrames' not in post_interp): # pragma: no cover post_interp += b' -X:Frames' shebang = self._build_shebang(executable, post_interp) # Python parser starts to read a script using UTF-8 until # it gets a #coding:xxx cookie. The shebang has to be the # first line of a file, the #coding:xxx cookie cannot be # written before. So the shebang has to be decodable from # UTF-8. try: shebang.decode('utf-8') except UnicodeDecodeError: # pragma: no cover raise ValueError( 'The shebang (%r) is not decodable from utf-8' % shebang) # If the script is encoded to a custom encoding (use a # #coding:xxx cookie), the shebang has to be decodable from # the script encoding too. if encoding != 'utf-8': try: shebang.decode(encoding) except UnicodeDecodeError: # pragma: no cover raise ValueError( 'The shebang (%r) is not decodable ' 'from the script encoding (%r)' % (shebang, encoding)) return shebang def _get_script_text(self, entry): return self.script_template % dict(module=entry.prefix, import_name=entry.suffix.split('.')[0], func=entry.suffix) manifest = _DEFAULT_MANIFEST def get_manifest(self, exename): base = os.path.basename(exename) return self.manifest % base def _write_script(self, names, shebang, script_bytes, filenames, ext): use_launcher = self.add_launchers and self._is_nt linesep = os.linesep.encode('utf-8') if not shebang.endswith(linesep): shebang += linesep if not use_launcher: script_bytes = shebang + script_bytes else: # pragma: no cover if ext == 'py': launcher = self._get_launcher('t') else: launcher = self._get_launcher('w') stream = BytesIO() with ZipFile(stream, 'w') as zf: zf.writestr('__main__.py', script_bytes) zip_data = stream.getvalue() script_bytes = launcher + shebang + zip_data for name in names: outname = os.path.join(self.target_dir, name) if use_launcher: # pragma: no cover n, e = os.path.splitext(outname) if e.startswith('.py'): outname = n outname = '%s.exe' % outname try: self._fileop.write_binary_file(outname, script_bytes) except Exception: # Failed writing an executable - it might be in use. logger.warning('Failed to write executable - trying to ' 'use .deleteme logic') dfname = '%s.deleteme' % outname if os.path.exists(dfname): os.remove(dfname) # Not allowed to fail here os.rename(outname, dfname) # nor here self._fileop.write_binary_file(outname, script_bytes) logger.debug('Able to replace executable using ' '.deleteme logic') try: os.remove(dfname) except Exception: pass # still in use - ignore error else: if self._is_nt and not outname.endswith('.' + ext): # pragma: no cover outname = '%s.%s' % (outname, ext) if os.path.exists(outname) and not self.clobber: logger.warning('Skipping existing file %s', outname) continue self._fileop.write_binary_file(outname, script_bytes) if self.set_mode: self._fileop.set_executable_mode([outname]) filenames.append(outname) def _make_script(self, entry, filenames, options=None): post_interp = b'' if options: args = options.get('interpreter_args', []) if args: args = ' %s' % ' '.join(args) post_interp = args.encode('utf-8') shebang = self._get_shebang('utf-8', post_interp, options=options) script = self._get_script_text(entry).encode('utf-8') name = entry.name scriptnames = set() if '' in self.variants: scriptnames.add(name) if 'X' in self.variants: scriptnames.add('%s%s' % (name, sys.version_info[0])) if 'X.Y' in self.variants: scriptnames.add('%s-%s.%s' % (name, sys.version_info[0], sys.version_info[1])) if options and options.get('gui', False): ext = 'pyw' else: ext = 'py' self._write_script(scriptnames, shebang, script, filenames, ext) def _copy_script(self, script, filenames): adjust = False script = os.path.join(self.source_dir, convert_path(script)) outname = os.path.join(self.target_dir, os.path.basename(script)) if not self.force and not self._fileop.newer(script, outname): logger.debug('not copying %s (up-to-date)', script) return # Always open the file, but ignore failures in dry-run mode -- # that way, we'll get accurate feedback if we can read the # script. try: f = open(script, 'rb') except IOError: # pragma: no cover if not self.dry_run: raise f = None else: first_line = f.readline() if not first_line: # pragma: no cover logger.warning('%s: %s is an empty file (skipping)', self.get_command_name(), script) return match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n')) if match: adjust = True post_interp = match.group(1) or b'' if not adjust: if f: f.close() self._fileop.copy_file(script, outname) if self.set_mode: self._fileop.set_executable_mode([outname]) filenames.append(outname) else: logger.info('copying and adjusting %s -> %s', script, self.target_dir) if not self._fileop.dry_run: encoding, lines = detect_encoding(f.readline) f.seek(0) shebang = self._get_shebang(encoding, post_interp) if b'pythonw' in first_line: # pragma: no cover ext = 'pyw' else: ext = 'py' n = os.path.basename(outname) self._write_script([n], shebang, f.read(), filenames, ext) if f: f.close() @property def dry_run(self): return self._fileop.dry_run @dry_run.setter def dry_run(self, value): self._fileop.dry_run = value if os.name == 'nt' or (os.name == 'java' and os._name == 'nt'): # pragma: no cover # Executable launcher support. # Launchers are from https://bitbucket.org/vinay.sajip/simple_launcher/ def _get_launcher(self, kind): if struct.calcsize('P') == 8: # 64-bit bits = '64' else: bits = '32' name = '%s%s.exe' % (kind, bits) # Issue 31: don't hardcode an absolute package name, but # determine it relative to the current package distlib_package = __name__.rsplit('.', 1)[0] resource = finder(distlib_package).find(name) if not resource: msg = ('Unable to find resource %s in package %s' % (name, distlib_package)) raise ValueError(msg) return resource.bytes # Public API follows def make(self, specification, options=None): """ Make a script. :param specification: The specification, which is either a valid export entry specification (to make a script from a callable) or a filename (to make a script by copying from a source location). :param options: A dictionary of options controlling script generation. :return: A list of all absolute pathnames written to. """ filenames = [] entry = get_export_entry(specification) if entry is None: self._copy_script(specification, filenames) else: self._make_script(entry, filenames, options=options) return filenames def make_multiple(self, specifications, options=None): """ Take a list of specifications and make scripts from them, :param specifications: A list of specifications. :return: A list of all absolute pathnames written to, """ filenames = [] for specification in specifications: filenames.extend(self.make(specification, options)) return filenames


{% extends "_base_nav.html" %} {% load i18n %} {% block post_content %} {% endblock %} {% get_current_language as LANGUAGE_CODE %} {% block content %}
{% blocktrans %}PaddlePaddle powers hundreds of Baidu's and its partners' products.{% endblocktrans %}
{% blocktrans %}Using a Convolutional Neural Network (CNN) for Image Recognition and Object Detection.{% endblocktrans %}
{% blocktrans %}Using a Recurrent Neural Network (RNN) for Sentiment Analysis.{% endblocktrans %}
{% blocktrans %}Using Deep Learning on Recommendation Systems to Help Users Find Interests.{% endblocktrans %}
{% blocktrans %}Download {% endblocktrans %}{% blocktrans %}the trained housing prices model{% endblocktrans %}{% blocktrans %} and then install PaddlePaddle on your computer:{% endblocktrans %}
pip install paddlepaddle
{% blocktrans %}Instructions on installing pip{% endblocktrans %}
{% blocktrans %}Now, create a new file called {% endblocktrans %}housing.py{% blocktrans %}, and paste this Python code{% endblocktrans %} {% blocktrans %}(make sure to set the right path based on the location of fit_a_line.tar on your computer):{% endblocktrans %}
import paddle.v2 as paddle
# Initialize PaddlePaddle.
paddle.init(use_gpu=False, trainer_count=1)
# Configure the neural network.
x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(13))
y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear())
with open('fit_a_line.tar', 'r') as f:
parameters = paddle.parameters.Parameters.from_tar(f)
# Infer using provided test data.
probs = paddle.infer(
output_layer=y_predict, parameters=parameters,
input=[item for item in paddle.dataset.uci_housing.test()()])
for i in xrange(len(probs)):
print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000)
{% blocktrans %}Run {% endblocktrans %}python housing.py
{% blocktrans %} and voila! It should print out a list of predictions for the test housing data.{% endblocktrans %}
Want more real-world tutorials? Read the book!
{% blocktrans %}PaddlePaddle provides an intuitive and flexible interface for loading data and specifying model structures.{% endblocktrans %}
{% blocktrans %}It supports CNN, RNN and various variants and configures complicated deep models easily.{% endblocktrans %}
{% blocktrans %}It also provides extremely optimized operations, memory recycling, and network communication.{% endblocktrans %}
{% blocktrans %}PaddlePaddle makes it easy to scale heterogeneous computing resources and storage to accelerate the training process.{% endblocktrans %}


Recipe 1.16. Interpolating Variables in a StringProblemYou need a simple way to get a copy of a string where specially marked substrings are replaced with the results of looking up the substrings in a dictionary. SolutionHere is a solution that works in Python 2.3 as well as in 2.4: def expand(format, d, marker='"', safe=False): if safe: def lookup(w): return d.get(w, w.join(marker*2)) else: def lookup(w): return d[w] parts = format.split(marker) parts[1::2] = map(lookup, parts[1::2]) return ''.join(parts) if _ _name_ _ == '_ _main_ _': print expand('just "a" test', {'a': 'one'}) # emits: just one test When the parameter safe is False, the default, every marked substring must be found in dictionary d, otherwise expand terminates with a KeyError exception. When parameter safe is explicitly passed as true, marked substrings that are not found in the dictionary are just left intact in the output string. DiscussionThe code in the body of the expand function has some points of interest. It defines one of two different nested functions (with the name of lookup either way), depending on whether the expansion is required to be safe. Safe means no KeyError exception gets raised for marked strings not found in the dictionary. If not required to be safe (the default), lookup just indexes into dictionary d and raises an error if the substring is not found. But, if lookup is required to be "safe", it uses d's method get and supplies as the default the substring being looked up, with a marker on either side. In this way, by passing safe as true, you may choose to have unknown formatting markers come right through to the output rather than raising exceptions. marker+w+marker would be an obvious alternative to the chosen w.join(marker*2), but I've chosen the latter exactly to display a non-obvious but interesting way to construct such a quoted string. With either version of lookup, expand operates according to the split/modify/join idiom that is so important for Python string processing. The modify part, in expand's case, makes use of the possibility of accessing and modifying a list's slice with a "step" or "stride". Specifically, expand accesses and rebinds all of those items of parts that lie at an odd index, because those items are exactly the ones that were enclosed between a pair of markers in the original format string. Therefore, they are the marked substrings that may be looked up in the dictionary. The syntax of format strings accepted by this recipe's function expand is more flexible than the $-based syntax of string.Template. You can specify a different marker when you want your format string to contain double quotes, for example. There is no constraint for each specially marked substring to be an identifier, so you can easily interpolate Python expressions (with a d whose _ _getitem_ _ performs an eval) or any other kind of placeholder. Moreover, you can easily get slightly different, useful effects. For example: print expand('just "a" ""little"" test', {'a' : 'one', '' : '"'}) emits just one "little" test. Advanced users can customize Python 2.4's string.Template class, by inheritance, to match all of these capabilities, and more, but this recipe's little expand function is still simpler to use in some flexible ways. See AlsoLibrary Reference docs for string.Template (Python 2.4, only), the section on sequence types (for string methods split and join, and for slicing operations), and the section on dictionaries (for indexing and the get method). For more information on Python 2.4's string.Template class, see Recipe 1.17. |


DISCLAIMER: bagelcomics.com is not responsible for any trouble you may get in while playing these games during class.
Take orders from a banana named pedro.  [SLIGHT GORE WARNING]
Bloons Tower DefenseKill da ballons with monke
Bagel With a GunThe full version where you play as a bagel shooting things
Stealing The DiamondPlay as henry stickman and steal a diamond, a good ol' classic
Stick Man RPGPlay as a stick man dude in this wonky flash game
Super Mario Flashplay as an italian plumber dude that stomp on turtles but for flash.
  [GORE WARNING]
Esacping The PrisonPlay as Henry Stickman to escape prison
Big AdventureIt sure is a big adventure
Bloxorzput cube in hole
bubble?idk what it is it didnt load for me lol
Castle?idk what it is it didnt load for me lol
Color CombatFight as stickman (why were there so many stickman flash games?)

Retro bowl8 bit football pretty much
SonicPlay as a blue hedgechog (hope I don't get sued)
Papas Pizzapizza time
Duck LifeTrain a duck to become the world champion
Duck Life 2Train a duck to become the world champion pt 2
Duck Life 3Train a duck to become the world champion pt 3
TetrisPut block things in rows, I don't need to explain it, you already know. [GORE WARNING]
Run 2run as an alien pt 2.
Runrun as an alien (it says its not supported, just play anyways, it still works)
BlobbyMy new game I've been working on. Im still working on it though. Play as a slime and shoot monsters.
Diep.ioI stole this from scratch, but it runs much better on the website with an actual full screen and no account needed.
Super Mario 64play as 3D italian plumber that eats mushrooms and stomps on turtles.
OrbitronA fun tower defense game. Create towers to destrou enemies.
Bagel RoyalFight other bagels in this ongoing war of bloodshed and fear.
Marioplay as an italian plumber that eats mushrooms and stomps on turtles.
newtonsurvive a dude throwing bomb at you from a building lol.
Cookie ClickerClick some cookies to get more upgrades to get more cookies to get more upgrades to get more cookies to get more upgrades to get more cookies.

MenjaKinda like fruit ninja, but cube.

Hue JumperA first person runner where you avoid obstacles and gain points.

Jump Game 2I decided to make a second version of the game, and its pretty fun.

ZombiesAnother top down shooter where you kill zombies, but with slightly different game mechanics, and other weapons.
2048The classic web game where you merge blocks to get higher number blocks.
HexglYou drive around as a spaceship and dont crash lol.
Space InvadersIf you don't know what this is get out.
Space Shooter


|
|
SlickGrid styled with Twitter Bootstrap
- No jQueryUI css involved here
- only some jQueryUI js (resizable + sortable + deps)
- Responsiveness, and touch control are not yet targeted in this demo.
- Column resize also works here.
|
|
|
Without a scrollbar
- Currently, we only support scrolling.
- The batch use case is not yet supported.
|
|
|
Sortable and reordarable columns
- column sorting
- column reordering
- column resize
|
|
|
Checkbox select column for row selection
- row selection
- checkbox column
- global checkbox (Select/unselect all)
|


Cyclist rushed to Royal Perth Hospital with life-threatening injuries after being struck by car in Girrawheen
A male cyclist has been rushed to Royal Perth Hospital with life threatening injuries after being hit by a car in Girrawheen.
The 20-year-old was riding along Marangaroo Drive around 7.30pm when the accident happened.
Police have taken one person into custody and are continuing their investigation.


Flip card
card
Total Number of Contractor
{{myresponse}}
Number of Contractors
Today's Employee Check-In
{{myresponse3}}
Todays's Employee CheckIn
Shiftwise Labour CheckIn
Shift1 :
{{myresponse4}}
Shift2 :
{{myresponse5}}
Shift3 :
{{myresponse6}}
Shiftwise Labour CheckIn
Today's Labour requirment
{{myresponse2}}
Today's Labour Requirment
Total Number of Labours
{{myresponse1}}
Total Number Of Labours
CheckIn Count
Weekly :
{{myresponse7}}
Monthly :
{{myresponse8}}
Yearly :
{{myresponse9}}
CheckIn Count


Uses of Package
org.apache.shiro.config
-
Packages that use org.apache.shiro.config Package Description org.apache.shiro.config Components that support configuring Shiro in any application.org.apache.shiro.env Concepts used to represent Shiro's aggregate state in an application.org.apache.shiro.realm.text Realms that acquire security data from text-based data sources such asFile
s or text streams.org.apache.shiro.web.config Web-specific implementation extensions to theorg.apache.shiro.config
components.org.apache.shiro.web.env Web-specificEnvironment
implementation and support.org.apache.shiro.web.filter.mgt The filter 'mgt' (management) package contains components used in managing Filters that are available for filter chain construction, the filter chains themselves, as well as resolving filter chains based by name.org.apache.shiro.web.servlet Shiro-specific implementations of the Servlet API (Servlet Filters, et al). -
Classes in org.apache.shiro.config used by org.apache.shiro.config Class Description ConfigurationException Root exception indicating there was a problem parsing or processing the Shiro configuration.Ini A class representing the INI text configuration format.Ini.Section IniFactorySupport Deprecated.use Shiro'sEnvironment
mechanisms instead.Interpolator Basic String interpolation interface.ReflectionBuilder Object builder that uses reflection and Apache Commons BeanUtils to build objects given a map of "property values". -
Classes in org.apache.shiro.config used by org.apache.shiro.env Class Description Ini A class representing the INI text configuration format. -
Classes in org.apache.shiro.config used by org.apache.shiro.realm.text Class Description Ini A class representing the INI text configuration format. -
Classes in org.apache.shiro.config used by org.apache.shiro.web.config Class Description Ini A class representing the INI text configuration format.Ini.Section IniFactorySupport Deprecated.use Shiro'sEnvironment
mechanisms instead.IniSecurityManagerFactory Deprecated.use Shiro'sEnvironment
mechanisms instead. -
Classes in org.apache.shiro.config used by org.apache.shiro.web.env Class Description ConfigurationException Root exception indicating there was a problem parsing or processing the Shiro configuration.Ini A class representing the INI text configuration format.ResourceConfigurable Interface implemented by components that can be configured by resource locations (paths). -
Classes in org.apache.shiro.config used by org.apache.shiro.web.filter.mgt Class Description ConfigurationException Root exception indicating there was a problem parsing or processing the Shiro configuration. -
Classes in org.apache.shiro.config used by org.apache.shiro.web.servlet Class Description Ini A class representing the INI text configuration format.


The last two devices may be rotated by hovering and clicking the rotate button.
A slideshow concept where different screenshots are shown on morphing devices. One main element and two additional division are used for the parts of the devices, along with some pseudo-elements and the image anchor.


# Simple packet sniffer.
#
# This packet sniffer uses the pcap library to listen for packets in
# transit over the specified interface. The returned packages can be
# filtered according to a BPF filter (see tcpdump(3) for further
# information on BPF filters).
#
# Note that the user might need special permissions to be able to use pcap.
sniff.py --help 1 ↵
0 - eth0
1 - any
2 - lo
3 - nflog
4 - nfqueue
5 - usbmon1
6 - usbmon2


2 writes to _paths
Microsoft.PowerShell.Commands.Management (2)
commands\management\Navigation.cs (2)
3970
set =>
_paths
= value;
3985
_paths
= value;
4 references to _paths
Microsoft.PowerShell.Commands.Management (4)
commands\management\Navigation.cs (4)
3969
get =>
_paths
;
3981
get =>
_paths
;
4043
protected override bool ProviderSupportsShouldProcess => DoesProviderSupportShouldProcess(
_paths
);
4063
foreach (string path in
_paths
)


# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, unicode_literals, division,
print_function)
import numpy as np
from ... import units as u
from ..angles import Angle
from ..representation import CartesianRepresentation, UnitSphericalRepresentation
from ..baseframe import (BaseCoordinateFrame, FrameAttribute,
frame_transform_graph)
from ..transformations import FunctionTransform
from ..errors import ConvertError
from .icrs import ICRS
# Measured by minimizing the difference between a plane of coordinates along
# l=0, b=[-90,90] and the Galactocentric x-z plane
# This is not used directly, but accessed via `get_roll0`. We define it here to
# prevent having to create new Angle objects every time `get_roll0` is called.
_ROLL0 = Angle(58.5986320306*u.degree)
[docs]class Galactocentric(BaseCoordinateFrame):
r"""
A coordinate or frame in the Galactocentric system. This frame
requires specifying the Sun-Galactic center distance, and optionally
the height of the Sun above the Galactic midplane.
The position of the Sun is assumed to be on the x axis of the final,
right-handed system. That is, the x axis points from the position of
the Sun projected to the Galactic midplane to the Galactic center --
roughly towards :math:`(l,b) = (0^\circ,0^\circ)`. For the default
transformation (:math:`{\rm roll}=0^\circ`), the y axis points roughly
towards Galactic longitude :math:`l=90^\circ`, and the z axis points
roughly towards the North Galactic Pole (:math:`b=90^\circ`).
The default position of the Galactic Center in ICRS coordinates is
taken from Reid et al. 2004,
http://adsabs.harvard.edu/abs/2004ApJ...616..872R.
.. math::
{\rm RA} = 17:45:37.224~{\rm hr}\\
{\rm Dec} = -28:56:10.23~{\rm deg}
The default distance to the Galactic Center is 8.3 kpc, e.g.,
Gillessen et al. 2009,
http://adsabs.harvard.edu/abs/2009ApJ...692.1075G.
The default height of the Sun above the Galactic midplane is taken to
be 27 pc, as measured by
http://adsabs.harvard.edu/abs/2001ApJ...553..184C.
For a more detailed look at the math behind this transformation, see
the document :ref:`coordinates-galactocentric`.
Parameters
----------
representation : `BaseRepresentation` or None
A representation object or None to have no data (or use the other
keywords)
galcen_distance : `~astropy.units.Quantity`, optional, must be keyword
The distance from the Sun to the Galactic center.
galcen_ra : `Angle`, optional, must be keyword
The Right Ascension (RA) of the Galactic center in the ICRS frame.
galcen_dec : `Angle`, optional, must be keyword
The Declination (Dec) of the Galactic center in the ICRS frame.
z_sun : `~astropy.units.Quantity`, optional, must be keyword
The distance from the Sun to the Galactic midplane.
roll : `Angle`, optional, must be keyword
The angle to rotate about the final x-axis, relative to the
orientation for Galactic. For example, if this roll angle is 0,
the final x-z plane will align with the Galactic coordinates x-z
plane. Unless you really know what this means, you probably should
not change this!
Examples
--------
To transform to the Galactocentric frame with the default
frame attributes, pass the uninstantiated class name to the
``transform_to()`` method of a coordinate frame or
`~astropy.coordinates.SkyCoord` object::
>>> import astropy.units as u
>>> import astropy.coordinates as coord
>>> c = coord.ICRS(ra=[158.3122, 24.5] * u.degree,
... dec=[-17.3, 81.52] * u.degree,
... distance=[11.5, 24.12] * u.kpc)
>>> c.transform_to(coord.Galactocentric) # doctest: +FLOAT_CMP
<Galactocentric Coordinate (galcen_distance=8.3 kpc, galcen_ra=266d24m18.36s, galcen_dec=-28d56m10.23s, z_sun=27.0 pc, roll=0.0 deg): (x, y, z) in kpc
[(-9.6083818980977, -9.400621883358546, 6.520560663896347),
(-21.283023068029138, 18.763340128812384, 7.846938548636718)]>
To specify a custom set of parameters, you have to include extra keyword
arguments when initializing the Galactocentric frame object::
>>> c.transform_to(coord.Galactocentric(galcen_distance=8.1*u.kpc)) # doctest: +FLOAT_CMP
<Galactocentric Coordinate (galcen_distance=8.1 kpc, galcen_ra=266d24m18.36s, galcen_dec=-28d56m10.23s, z_sun=27.0 pc, roll=0.0 deg): (x, y, z) in kpc
[(-9.407859235565343, -9.400621883358546, 6.520665737962164),
(-21.08239383088295, 18.763340128812384, 7.84798134569032)]>
Similarly, transforming from the Galactocentric frame to another coordinate frame::
>>> c = coord.Galactocentric(x=[-8.3, 4.5] * u.kpc,
... y=[0., 81.52] * u.kpc,
... z=[0.027, 24.12] * u.kpc)
>>> c.transform_to(coord.ICRS) # doctest: +FLOAT_CMP
<ICRS Coordinate: (ra, dec, distance) in (deg, deg, kpc)
[(86.22349058727241, 28.8389413808627, 4.391577882957292e-05),
(289.6680265194508, 49.88763881149547, 85.96407345372828)]>
Or, with custom specification of the Galactic center::
>>> c = coord.Galactocentric(x=[-8.0, 4.5] * u.kpc,
... y=[0., 81.52] * u.kpc,
... z=[21.0, 24120.0] * u.pc,
... z_sun=21 * u.pc, galcen_distance=8. * u.kpc)
>>> c.transform_to(coord.ICRS) # doctest: +FLOAT_CMP
<ICRS Coordinate: (ra, dec, distance) in (deg, deg, kpc)
[(86.25852490164378, 28.85773187391088, 2.7562547481200286e-05),
(289.77285254989323, 50.062904565432014, 85.92160096237191)]>
"""
default_representation = CartesianRepresentation
# TODO: these can all become QuantityFrameAttribute's once #3217 is merged
galcen_distance = FrameAttribute(default=8.3*u.kpc)
galcen_ra = FrameAttribute(default=Angle(266.4051*u.degree))
galcen_dec = FrameAttribute(default=Angle(-28.936175*u.degree))
z_sun = FrameAttribute(default=27.*u.pc)
roll = FrameAttribute(default=0.*u.deg)
@classmethod
[docs] def get_roll0(cls):
"""
The additional roll angle (about the final x axis) necessary to align
the final z axis to match the Galactic yz-plane. Setting the ``roll``
frame attribute to -this method's return value removes this rotation,
allowing the use of the `Galactocentric` frame in more general contexts.
"""
# note that the actual value is defined at the module level. We make at
# a property here because this module isn't actually part of the public
# API, so it's better for it to be accessable from Galactocentric
return _ROLL0
# ICRS to/from Galactocentric ----------------------->
@frame_transform_graph.transform(FunctionTransform, ICRS, Galactocentric)
def icrs_to_galactocentric(icrs_coord, galactocentric_frame):
from ..representation import CartesianRepresentation
from ..angles import rotation_matrix
if isinstance(icrs_coord.data, UnitSphericalRepresentation):
raise ConvertError("Transforming to a Galactocentric frame requires "
"a 3D coordinate, e.g. (angle, angle, distance) or"
" (x, y, z).")
xyz = icrs_coord.cartesian.xyz
# define rotation matrix to align x(ICRS) with the vector to the Galactic center
mat1 = rotation_matrix(-galactocentric_frame.galcen_dec, 'y')
mat2 = rotation_matrix(galactocentric_frame.galcen_ra, 'z')
R1 = mat1 * mat2
# extra roll away from the Galactic x-z plane
R2 = rotation_matrix(galactocentric_frame.get_roll0() - galactocentric_frame.roll, 'x')
# construct transformation matrix
R = R2*R1
# some reshape hacks to handle ND arrays
orig_shape = xyz.shape
xyz = R.dot(xyz.reshape(xyz.shape[0], np.prod(xyz.shape[1:]))).reshape(orig_shape)
# translate by Sun-Galactic center distance along new x axis
xyz[0] = xyz[0] - galactocentric_frame.galcen_distance
# rotate about y' to account for tilt due to Sun's height above the plane
z_d = (galactocentric_frame.z_sun / galactocentric_frame.galcen_distance).decompose()
R = rotation_matrix(-np.arcsin(z_d), 'y')
xyz = R.dot(xyz.reshape(xyz.shape[0], np.prod(xyz.shape[1:]))).reshape(orig_shape)
representation = CartesianRepresentation(xyz)
return galactocentric_frame.realize_frame(representation)
@frame_transform_graph.transform(FunctionTransform, Galactocentric, ICRS)
def galactocentric_to_icrs(galactocentric_coord, icrs_frame):
from ..representation import CartesianRepresentation
from ..angles import rotation_matrix
if isinstance(galactocentric_coord.data, UnitSphericalRepresentation):
raise ConvertError("Transforming from a Galactocentric frame requires "
"a 3D coordinate, e.g. (angle, angle, distance) or"
" (x, y, z).")
xyz = galactocentric_coord.cartesian.xyz
# rotate about y' to account for tilt due to Sun's height above the plane
z_d = (galactocentric_coord.z_sun / galactocentric_coord.galcen_distance).decompose()
R = rotation_matrix(np.arcsin(z_d), 'y')
# some reshape hacks to handle ND arrays
orig_shape = xyz.shape
xyz = R.dot(xyz.reshape(xyz.shape[0], np.prod(xyz.shape[1:]))).reshape(orig_shape)
# translate by Sun-Galactic center distance along x axis
xyz[0] = xyz[0] + galactocentric_coord.galcen_distance
# define inverse rotation matrix that aligns x(ICRS) with the vector to the Galactic center
mat1 = rotation_matrix(-galactocentric_coord.galcen_dec, 'y')
mat2 = rotation_matrix(galactocentric_coord.galcen_ra, 'z')
R1 = mat1 * mat2
# extra roll away from the Galactic x-z plane
R2 = rotation_matrix(galactocentric_coord.get_roll0() - galactocentric_coord.roll, 'x')
# construct transformation matrix
R = R2*R1
# rotate into ICRS frame
xyz = np.linalg.inv(R).dot(xyz.reshape(xyz.shape[0], np.prod(xyz.shape[1:]))).reshape(orig_shape)
representation = CartesianRepresentation(xyz)
return icrs_frame.realize_frame(representation)


---
layout: page
title: FreeRADIUS 'man' pages
subtitle: Documentation from the server
subpage: true
navorder: 200
hero: documentation
subnav:
- text: Programs
link: '/radiusd/man/#programs'
- text: Configuration Files
link: '/radiusd/man/#files'
- text: Modules
link: '/radiusd/man/#modules'
---
RADWHO
Section: FreeRADIUS Daemon (1)
Updated: 17 Feb 2013
Index
Return to Main Contents
NAME
radwho - show online users
SYNOPSIS
radwho
[
-c]
[
-d
raddb_directory]
[
-F
radutmp_file]
[
-i]
[
-n]
[
-N
nas_ip_address]
[
-p]
[
-P
nas_port]
[
-r]
[
-R]
[
-s]
[
-S]
[
-u
user]
[
-U
user]
[
-Z]
DESCRIPTION
The FreeRADIUS server can be configured to maintain an active session
database in a file called
radutmp. This utility shows the
content of that session database.
OPTIONS
- -c
-
Shows caller ID (if available) instead of the full name.
- -d raddb_directory
-
The directory that contains the RADIUS configuration files. Defaults to
/etc/raddb.
- -F radutmp_file
-
The file that contains the radutmp file. If this is specified, -d is
not necessary.
- -i
-
Shows the session ID instead of the full name.
- -n
-
Normally radwho looks up the username in the systems password file,
and shows the full username as well. The -n flags prevents this.
- -N nas_ip_address
-
Show only those entries which match the given NAS IP address.
- -p
-
Adds an extra column for the port type - I for ISDN, A for Analog.
- -P nas_port
-
Show only those entries which match the given NAS port.
- -r
-
Outputs all data in raw format - no headers, no formatting,
fields are comma-separated.
- -R
-
Output all data in RADIUS attribute format. All fields are printed.
- -s
-
Show full name.
- -S
-
Hide shell users. Doesn't show the entries for users that do not
have a SLIP or PPP session.
- -u user
-
Show only those entries which match the given username (case insensitive).
- -U user
-
Show only those entries which match the given username (case sensitive).
- -Z
-
When combined with -R, prints out the contents of an
Accounting-Request packet which can be passed to radclient, in
order to "zap" that users session from radutmp.
For example,
-
$ radwho -ZRN <IP_ADDRESS> | radclient -f - radius.example.net acct testing123
will result in all an Accounting-Request packet being sent to the
RADIUS server, which tells the server that the NAS rebooted. i.e. It
"zaps" all of the users on that NAS.
To "zap" one user, specify NAS, username, and NAS port:
-
$ radwho -ZRN <IP_ADDRESS> -u user -P 10 | radclient -f - radius.example.net acct testing123
Other combinations are also possible.
SEE ALSO
radiusd(8),
radclient(1),
radiusd.conf(5).
AUTHOR
Miquel van Smoorenburg,
<EMAIL_ADDRESS>Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- SEE ALSO
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 17:19:42 GMT, March 12, 2018


Home
Products
Records
profile
Log out
×
Home
Products
Records
Categories
LogOut
Available Products
Category
Vaseline
Snacks
Flavours
Products
Product Name
Quantity
sugar
80kgs
milk
50ltrs
black books
100 dozenss
sweets
4cartons
pens
80cartons
Pencils
75dozens
water
37boxes
sugar
80kgs
salt
67kgs
soap
80bars
vaseline
69t


Must be one of the following: all, none, second, minute, fifteen_minute, thirty_minute, hour, day, week, month, quarter and year
Max Data Points
Dimension
Metric
Threshold
Any non zero integer value
Group By
Limit
Leave 0 for no limit, or specify any integer value
Order
Alias:
Use patterns like $tag_name to replace part of the alias for a tag, and $metric to replace part of the alias for an aggregation name or a post aggregation name.


Fordham vs. Villanova Pregame Reception
Saturday, September 12 at 4 p.m.
Tent in Parking Lot A
Enjoy a pregame reception featuring an open bar and food, and hear insider information on the day's game from head coach Joe Moorhead, FCRH '96.
Kickoff is at 6 p.m. Purchase game tickets online or call 855-RAM-TIXS.
Register for the Reception
|


Some non-visible stuff.
Mouse Gestures
- ⌘-click to add a new caret.
- ⌥-click close buttons to close other tabs.
- Hold ⌃ when dropping file to text view to insert its path.
Holding ⌥ to “close other” also works in the file browser or when using ⌘T (and ⌘T now does multi-select).
One exception to “⌥ closes other” is when single-clicking the icon of a bundle (e.g. .app
) in the file browser. In this case the single-click works as “Show Package Contents”.
Completion (⎋)
The current word suffix is taken into consideration when hitting escape.
For example in this case:
enum mark_t { kErrorMarkType, kWarningMarkType };
mark_t m = ‸MarkType;
The resulting line will become:
mark_t m = kWarning‸MarkType;
Other
Possible to enter e.g. main.{cc,h}
in a Save As dialog for brace expansion (saves as first expansion, background tabs are created for further expansions).
⌘T can filter on full path by including /
, extension by starting with .
, can go to a line by suffixing with a line specification (see elsewhere for syntax)
Using ⌘T with find clipboard containing «file»:«line»
will use that as default text.


function timestamp()
timestamp() returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
It will return the same value during the whole one query, even if the query is a long running one.
Example Query:
RETURN timestamp()


object
logtalk
¶
Built-in object providing message printing, debugging, library, source file, and hacking methods.
static, built_in, context_switching_calls, threaded
(no dependencies on other entities)
Public interface¶
print_message/3
¶
Prints a message of the given kind for the specified component.
static
print_message(Kind,Component,Message)
print_message(+nonvar,+nonvar,+nonvar)
- one
print_message_tokens/3
¶
Print the messages tokens to the given stream, prefixing each line with the specified atom.
static
print_message_tokens(Stream,Prefix,Tokens)
print_message_tokens(@stream_or_alias,+atom,@list(nonvar))
- one
print_message_token/4
¶
User-defined hook predicate for printing a message token (at_same_line, nl, flush, Format-Arguments, term(Term,Options), ansi(Attributes,Format,Arguments), begin(Kind,Variable), and end(Variable)).
dynamic, multifile
print_message_token(Stream,Prefix,Token,Tokens)
print_message_token(@stream_or_alias,@atom,@nonvar,@list(nonvar))
- zero_or_one
message_tokens//2
¶
User-defined hook grammar rule for converting a message into a list of tokens (at_same_line, nl, flush, Format-Arguments, term(Term,Options), ansi(Attributes,Format,Arguments), begin(Kind,Variable), and end(Variable)).
dynamic, multifile
message_tokens(Message,Component)
message_prefix_stream/4
¶
Message line prefix and output stream to be used when printing a message given its kind and component.
dynamic, multifile
message_prefix_stream(Kind,Component,Prefix,Stream)
message_prefix_stream(?nonvar,?nonvar,?atom,?stream_or_alias)
- zero_or_more
message_hook/4
¶
User-defined hook predicate for intercepting message printing calls.
dynamic, multifile
message_hook(Message,Kind,Component,Tokens)
message_hook(+nonvar,+nonvar,+nonvar,+list(nonvar))
- zero_or_one
ask_question/5
¶
Asks a question and reads the answer until the check predicate is true.
static
ask_question(Kind,Component,Question,Check,Answer)
ask_question(*,*,*,1,*)
ask_question(+nonvar,+nonvar,+nonvar,+callable,-term)
- one
question_hook/6
¶
User-defined hook predicate for intercepting question asking calls.
dynamic, multifile
question_hook(Question,Kind,Component,Tokens,Check,Answer)
question_hook(*,*,*,*,1,*)
question_hook(+nonvar,+nonvar,+nonvar,+list(nonvar),+callable,-term)
- zero_or_one
question_prompt_stream/4
¶
Prompt and input stream to be used when asking a question given its kind and component.
dynamic, multifile
question_prompt_stream(Kind,Component,Prompt,Stream)
question_prompt_stream(?nonvar,?nonvar,?atom,?stream_or_alias)
- zero_or_more
trace_event/2
¶
Trace event handler. The runtime calls all trace event handlers using a failure-driven loop before calling the debug event handler.
dynamic, multifile
trace_event(Event,ExecutionContext)
trace_event(@callable,@execution_context)
- zero
debug_handler_provider/1
¶
Declares an object as the debug handler provider. There should be at most one debug handler provider loaded at any given moment.
static, multifile
debug_handler_provider(Provider)
debug_handler_provider(?object_identifier)
- zero_or_one
debug_handler/2
¶
Debug event handler. The defined events are unification events - fact(Entity,Fact,Clause,File,Line) and rule(Entity,Head,Clause,File,Line) - and goal events - top_goal(Goal,CompiledGoal) and goal(Goal,CompiledGoal).
static, multifile
debug_handler(Event,ExecutionContext)
debug_handler(?entity_identifier,?atom)
- zero_or_more
expand_library_path/2
¶
Expands a library alias or a library path into its absolute path. Uses a depth bound to prevent loops.
static
expand_library_path(LibraryPath,AbsolutePath)
expand_library_path(+atom,?atom)
- zero_or_one
expand_library_path(+callable,?atom)
- zero_or_one
loaded_file/1
¶
Enumerates, by backtracking, all loaded files, returning their full paths.
static
loaded_file(Path)
loaded_file(?atom)
- zero_or_more
loaded_file_property/2
¶
Enumerates, by backtracking, all loaded file properties. Valid properties are: basename/1, directory/1, mode/1, flags/1, text_properties/1 (encoding/1 and bom/1), target/1, modified/1, parent/1, includes/1, library/1, object/1, protocol/1, and category/1.
static
loaded_file_property(Path,Property)
loaded_file_property(?atom,?compound)
- zero_or_more
file_type_extension/2
¶
Enumerates, by backtracking, all defined file type extensions. The defined types are: source, object, logtalk, prolog, and tmp. The source type returns both logtalk and prolog type extensions.
static
file_type_extension(Type,Extension)
file_type_extension(?atom,?atom)
- zero_or_more
compile_aux_clauses/1
¶
Compiles a list of auxiliary clauses. Can only be called during source file compilation, usually from term_expansion/2 or goal_expansion/2 hook predicate definitions.
static
compile_aux_clauses(Clauses)
compile_aux_clauses(@list(clause))
- one
entity_prefix/2
¶
Converts between an entity identifier and the entity prefix that is used for its compiled code. When none of the arguments is instantiated, it returns the identifier and the prefix of the entity under compilation, if any.
static
entity_prefix(Entity,Prefix)
entity_prefix(?entity_identifier,?atom)
- zero_or_one
compile_predicate_heads/4
¶
Compiles clause heads. The heads are compiled in the context of the entity under compilation when the entity argument is not instantiated.
static
compile_predicate_heads(Heads,Entity,CompiledHeads,ExecutionContext)
compile_predicate_heads(@list(callable),?entity_identifier,-list(callable),@execution_context)
- zero_or_one
compile_predicate_heads(@conjunction(callable),?entity_identifier,-conjunction(callable),@execution_context)
- zero_or_one
compile_predicate_heads(@callable,?entity_identifier,-callable,@execution_context)
- zero_or_one
compile_predicate_indicators/3
¶
Compiles predicate indicators. The predicate are compiled in the context of the entity under compilation when the entity argument is not instantiated.
static
compile_predicate_indicators(PredicateIndicators,Entity,CompiledPredicateIndicators)
compile_predicate_indicators(@list(predicate_indicator),?entity_identifier,-list(predicate_indicator))
- zero_or_one
compile_predicate_indicators(@conjunction(predicate_indicator),?entity_identifier,-conjunction(predicate_indicator))
- zero_or_one
compile_predicate_indicators(@predicate_indicator,?entity_identifier,-predicate_indicator)
- zero_or_one
decompile_predicate_heads/4
¶
Decompiles clause heads. All compiled clause heads must belong to the same entity, which must be loaded.
static
decompile_predicate_heads(CompiledHeads,Entity,Type,Heads)
decompile_predicate_heads(@list(callable),-entity_identifier,-atom,-list(callable))
- zero_or_one
decompile_predicate_heads(@conjunction(callable),-entity_identifier,-atom,-conjunction(callable))
- zero_or_one
decompile_predicate_heads(@callable,-entity_identifier,-atom,-callable)
- zero_or_one
decompile_predicate_indicators/4
¶
Decompiles predicate indicators. All compiled predicate indicators must belong to the same entity, which must be loaded.
static
decompile_predicate_indicators(CompiledPredicateIndicators,Entity,Type,PredicateIndicators)
decompile_predicate_indicators(@list(predicate_indicator),-entity_identifier,-atom,-list(predicate_indicator))
- zero_or_one
decompile_predicate_indicators(@conjunction(predicate_indicator),-entity_identifier,-atom,-conjunction(predicate_indicator))
- zero_or_one
decompile_predicate_indicators(@predicate_indicator,-entity_identifier,-atom,-predicate_indicator)
- zero_or_one
execution_context/7
¶
Execution context term data. Execution context terms should be considered opaque terms subject to change without notice.
static
execution_context(ExecutionContext,Entity,Sender,This,Self,MetaCallContext,CoinductionStack)
execution_context(?nonvar,?entity_identifier,?object_identifier,?object_identifier,?object_identifier,@list(callable),@list(callable))
- zero_or_one
Protected interface¶
(none)
Private predicates¶
(none)
Operators¶
(none)
Remarks¶
Message kinds: The default set is {silent, silent(Category), banner, help, comment, comment(Category), information, information(Category), warning, warning(Category), error, error(Category), debug, debug(Category), question, question(Category)}.
Printing of silent messages: By default, silent messages are not printed. These messages are only useful when intercepted.
Printing of banner and comment messages: By default, banner and comment messages are only printed when the report flag is turned on.
Printing of help, information, and question messages: These messages are always printed by default as they provide requested output.
Printing of warning messages: By default, warning messages are not printed when the report flag is turned off.
Printing of error messages: These messages are always printed by default.
Printing of debug messages: By default, debug messages are only printed when the debug flag is turned on.
Meta messages: A meta message is a message that have another message as argument and is typically used for debugging messages. Meta messages avoid the need of defining tokenizer rules for every message but can be intercepted as any other message.
@Message meta message: By default, the message is printed as passed to the write/1 predicate followed by a newline.
Key-Value meta message: By default, the message is printed as “Key: Value” followed by a newline. The value is printed as passed to the writeq/1 predicate.
List meta message: By default, the list items are printed indented one per line. The items are preceded by a dash and printed as passed to the writeq/1 predicate.
Title::List meta message: By default, the title is printed followed by a newline and the indented list items, one per line. The items are preceded by a dash and printed as passed to the writeq/1 predicate.


James's Question: I am so big, how can I loose weight? Make a Comment: Adeola's Comment: Its Good to serve the Lord with all ur heart


Secur
iffy
Generate password
Password copied successfully
There was a problem copying the password
Password entered into field successfully
Length
Use lowercase letters
Use uppercase letters
Use numbers
Use special characters
Automatically enter into input on page when generated


Scroller Examples
Entire window scrollable
Preserves the scroll position on refresh
Positions the list based on element data
Independent scrollable lists
li based scrollable lists
table based scrollable lists
datasource on scope (not as a service)
Scroll bubbles up only on eof/bof
Inline blocks demo
Bootstrap well-class demo
Cache within datasource implementation
Adapter (updatable scroller)
Animation
read more...


M3 - A milestone 3 build of alsws
ALS-WS is a lightweight web server designed to be embedded on almost every system.
JS TEST


text_classification_pipeline_r.Rd
Split the data, build and fit the pipeline, produce performance metrics.
text_classification_pipeline_r( filename, target, predictor, test_size = 0.33, ordinal = FALSE, tknz = "spacy", metric = "class_balance_accuracy_score", cv = 2, n_iter = 10, n_jobs = 1, verbose = 3, learners = c("SGDClassifier"), reduce_criticality = FALSE, theme = NULL )
| filename | A data frame with the data (class and text columns), otherwise the dataset name (CSV), including full path to the data folder (if not in the project's working directory), and the data type suffix (".csv"). |
|---|---|
| target | String. The name of the response variable. |
| predictor | String. The name of the predictor variable. |
| test_size | Numeric. Proportion of data that will form the test dataset. |
| ordinal | Whether to fit an ordinal classification model. The ordinal model is the implementation of Frank and Hall (2001) that can use any standard classification model that calculates probabilities. |
| tknz | Tokenizer to use ("spacy" or "wordnet"). |
| metric | String. Scorer to use during pipeline tuning ("accuracy_score", "balanced_accuracy_score", "matthews_corrcoef", "class_balance_accuracy_score"). |
| cv | Number of cross-validation folds. |
| n_iter | Number of parameter settings that are sampled (see
|
| n_jobs | Number of jobs to run in parallel (see |
| verbose | Controls the verbosity (see |
| learners | Vector. |
| reduce_criticality | Logical. For internal use by Nottinghamshire
Healthcare NHS Foundation Trust or other trusts that hold data on
criticality. If |
| theme | String. For internal use by Nottinghamshire Healthcare NHS
Foundation Trust or other trusts that use theme labels ("Access",
"Environment/ facilities" etc.). The column name of the theme variable.
Defaults to |
A list of length 7:
A fitted Scikit-learn
pipeline containing a number of objects
that can be accessed with the $
sign (see examples). For a
partial list see "Atributes" in
sklearn.model_selection.RandomizedSearchCV
.
Do not be surprised if more objects are in the pipeline than
those in the aforementioned "Attributes" list. Python objects can
contain several objects, from numeric results (e.g. the
pipeline's accuracy), to methods (i.e. functions in the R
lingo) and classes. In Python, these are normally accessed with
object.<whatever>
, but in R the command is object$<whatever>
.
For instance, one can access method predict()
to make to make
predictions on unseen data. See Examples.
tuning_results
Data frame. All (hyper)parameter values
and models tried during fitting.
pred
Vector. The predictions on the test set.
accuracy_per_class
Data frame. Accuracies per class.
p_compare_models_bar
A bar plot comparing the mean scores (of
the user-supplied metric
parameter) from the cross-validation
on the training set, for the best (hyper)parameter values for
each learner.
index_training_data
The row names/indices of the training
data. Note that, in Python, indices start from 0 and go up to
number_of_records - 1. See Examples.
index_test_data
The row names/indices of the test data. Note
that, in Python, indices start from 0 and go up to
number_of_records - 1. See Examples.
This function brings together the three functions that run chunks of
the process independently, namely splitting data into training and test
sets (factory_data_load_and_split_r
), building and fitting
the pipeline (factory_pipeline_r
) on the whole dataset
(train and test), and assessing pipeline performance
(factory_model_performance_r
).
For details on what the pipeline does/how it works, see
factory_pipeline_r
's
Details
section.
Frank E. & Hall M. (2001). A Simple Approach to Ordinal Classification. Machine Learning: ECML 2001 145--156.
Pedregosa F., Varoquaux G., Gramfort A., Michel V., Thirion B., Grisel O., Blondel M., Prettenhofer P., Weiss R., Dubourg V., Vanderplas J., Passos A., Cournapeau D., Brucher M., Perrot M. & Duchesnay E. (2011), Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 12:2825–-2830.
# We can prepare the data, build and fit the pipeline, and get performance # metrics, in two ways. One way is to run the factory_* functions independently # The commented out script right below would do exactly that. # Prepare training and test sets # data_splits <- pxtextmineR::factory_data_load_and_split_r( # filename = pxtextmineR::text_data, # target = "label", # predictor = "feedback", # test_size = 0.90) # Make a small training set for a faster run in this example # # # Fit the pipeline # pipe <- pxtextmineR::factory_pipeline_r( # x = data_splits$x_train, # y = data_splits$y_train, # tknz = "spacy", # ordinal = FALSE, # metric = "class_balance_accuracy_score", # cv = 2, n_iter = 10, n_jobs = 1, verbose = 3, # learners = c("SGDClassifier", "MultinomialNB") # ) # (SGDClassifier represents both logistic regression and linear SVM. This # depends on the value of the "loss" hyperparameter, which can be "log" or # "hinge". This is set internally in factory_pipeline_r). # # # Assess model performance # pipe_performance <- pxtextmineR::factory_model_performance_r( # pipe = pipe, # x_train = data_splits$x_train, # y_train = data_splits$y_train, # x_test = data_splits$x_test, # y_test = data_splits$y_test, # metric = "accuracy_score") # Alternatively, we can use text_classification_pipeline_r() to do everything in # one go. text_pipe <- pxtextmineR::text_classification_pipeline_r( filename = pxtextmineR::text_data, target = 'label', predictor = 'feedback', test_size = 0.33, ordinal = FALSE, tknz = "spacy", metric = "class_balance_accuracy_score", cv = 2, n_iter = 10, n_jobs = 1, verbose = 3, learners = c("SGDClassifier", "MultinomialNB"), reduce_criticality = FALSE, theme = NULL ) names(text_pipe)#> [1] "pipe" "tuning_results" "pred" #> [4] "accuracy_per_class" "p_compare_models_bar" "index_training_data" #> [7] "index_test_data"# Let's compare pipeline performance for different tunings with a range of # metrics averaging the cross-validation metrics for each fold. text_pipe$ tuning_results %>% dplyr::select(learner, dplyr::contains("mean_test"))#> learner mean_test_Accuracy mean_test_Balanced Accuracy #> 2 Logistic 0.6692195 0.4642124 #> 0 Linear SVM 0.5575606 0.4020137 #> 6 Logistic 0.5090311 0.3634837 #> 5 Linear SVM 0.5855842 0.3474347 #> 8 MultinomialNB 0.4810045 0.3219231 #> 9 Linear SVM 0.4170098 0.3080414 #> 1 MultinomialNB 0.4805708 0.2927007 #> 4 MultinomialNB 0.5646388 0.2881532 #> 7 Logistic 0.4552871 0.2632449 #> 3 Logistic 0.4135429 0.2520484 #> mean_test_Matthews Correlation Coefficient mean_test_Class Balance Accuracy #> 2 0.5679886 0.4312644 #> 0 0.4386832 0.3549740 #> 6 0.3785785 0.3066306 #> 5 0.4573056 0.3014037 #> 8 0.3360435 0.2718537 #> 9 0.2858717 0.2535001 #> 1 0.3198254 0.2445776 #> 4 0.4183560 0.2346988 #> 7 0.2877204 0.2207833 #> 3 0.2491383 0.1815914# A glance at the (hyper)parameters and their tuned values text_pipe$ tuning_results %>% dplyr::select(learner, dplyr::contains("param_")) %>% str()#> 'data.frame': 10 obs. of 22 variables: #> $ learner : chr "Logistic" "Linear SVM" "Logistic" "Linear SVM" ... #> $ param_sampling__kw_args : chr "{'up_balancing_counts': 800}" "{'up_balancing_counts': 300}" "{'up_balancing_counts': 800}" "{'up_balancing_counts': 800}" ... #> $ param_preprocessor__texttr__text__transformer__use_idf :List of 10 #> ..$ : logi FALSE #> ..$ : logi FALSE #> ..$ : logi FALSE #> ..$ : logi FALSE #> ..$ : logi TRUE #> ..$ : logi TRUE #> ..$ : logi TRUE #> ..$ : logi FALSE #> ..$ : logi FALSE #> ..$ : logi TRUE #> $ param_preprocessor__texttr__text__transformer__tokenizer : chr "<pxtextmining.helpers.tokenization.LemmaTokenizer object at 0x0000000016D661C0>" "<pxtextmining.helpers.tokenization.LemmaTokenizer object at 0x0000000016D661C0>" "<pxtextmining.helpers.tokenization.LemmaTokenizer object at 0x0000000016D661C0>" "<pxtextmining.helpers.tokenization.LemmaTokenizer object at 0x0000000016D661C0>" ... #> $ param_preprocessor__texttr__text__transformer__preprocessor: chr "<function text_preprocessor at 0x00000000665D93A0>" "<function text_preprocessor at 0x00000000665D93A0>" "<function text_preprocessor at 0x00000000665D93A0>" "<function text_preprocessor at 0x00000000665D93A0>" ... #> $ param_preprocessor__texttr__text__transformer__norm :List of 10 #> ..$ : NULL #> ..$ : chr "l2" #> ..$ : chr "l2" #> ..$ : NULL #> ..$ : chr "l2" #> ..$ : chr "l2" #> ..$ : chr "l2" #> ..$ : NULL #> ..$ : NULL #> ..$ : chr "l2" #> $ param_preprocessor__texttr__text__transformer__ngram_range : chr "(1, 3)" "(2, 3)" "(2, 3)" "(2, 3)" ... #> $ param_preprocessor__texttr__text__transformer__min_df :List of 10 #> ..$ : int 1 #> ..$ : int 3 #> ..$ : int 1 #> ..$ : int 1 #> ..$ : int 3 #> ..$ : int 3 #> ..$ : int 3 #> ..$ : int 3 #> ..$ : int 3 #> ..$ : int 3 #> $ param_preprocessor__texttr__text__transformer__max_df :List of 10 #> ..$ : num 0.95 #> ..$ : num 0.7 #> ..$ : num 0.95 #> ..$ : num 0.95 #> ..$ : num 0.95 #> ..$ : num 0.7 #> ..$ : num 0.7 #> ..$ : num 0.7 #> ..$ : num 0.7 #> ..$ : num 0.7 #> $ param_preprocessor__texttr__text__transformer : chr "TfidfVectorizer(max_df=0.95, ngram_range=(1, 3), norm=None,\n preprocessor=<function text_prepro"| __truncated__ "TfidfVectorizer(max_df=0.95, ngram_range=(1, 3), norm=None,\n preprocessor=<function text_prepro"| __truncated__ "TfidfVectorizer(max_df=0.95, ngram_range=(1, 3), norm=None,\n preprocessor=<function text_prepro"| __truncated__ "TfidfVectorizer(max_df=0.95, ngram_range=(1, 3), norm=None,\n preprocessor=<function text_prepro"| __truncated__ ... #> $ param_preprocessor__sentimenttr__scaler__scaler__n_bins :List of 10 #> ..$ : int 4 #> ..$ : int 4 #> ..$ : int 4 #> ..$ : int 4 #> ..$ : int 8 #> ..$ : int 8 #> ..$ : int 4 #> ..$ : int 4 #> ..$ : int 8 #> ..$ : int 4 #> $ param_preprocessor__sentimenttr__scaler__scaler : chr "KBinsDiscretizer(n_bins=4, strategy='kmeans')" "KBinsDiscretizer(n_bins=4, strategy='kmeans')" "KBinsDiscretizer(n_bins=4, strategy='kmeans')" "KBinsDiscretizer(n_bins=4, strategy='kmeans')" ... #> $ param_preprocessor__lengthtr__scaler__scaler : chr "KBinsDiscretizer(n_bins=3, strategy='kmeans')" "KBinsDiscretizer(n_bins=3, strategy='kmeans')" "KBinsDiscretizer(n_bins=3, strategy='kmeans')" "KBinsDiscretizer(n_bins=3, strategy='kmeans')" ... #> $ param_featsel__selector__score_func : chr "<function chi2 at 0x00000000665C14C0>" "<function chi2 at 0x00000000665C14C0>" "<function chi2 at 0x00000000665C14C0>" "<function chi2 at 0x00000000665C14C0>" ... #> $ param_featsel__selector__percentile :List of 10 #> ..$ : int 70 #> ..$ : int 70 #> ..$ : int 85 #> ..$ : int 70 #> ..$ : int 85 #> ..$ : int 85 #> ..$ : int 100 #> ..$ : int 100 #> ..$ : int 85 #> ..$ : int 85 #> $ param_featsel__selector : chr "SelectPercentile(percentile=70,\n score_func=<function chi2 at 0x00000000665C14C0>)" "SelectPercentile(percentile=70,\n score_func=<function chi2 at 0x00000000665C14C0>)" "SelectPercentile(percentile=70,\n score_func=<function chi2 at 0x00000000665C14C0>)" "SelectPercentile(percentile=70,\n score_func=<function chi2 at 0x00000000665C14C0>)" ... #> $ param_clf__estimator__penalty :List of 10 #> ..$ : chr "elasticnet" #> ..$ : chr "l2" #> ..$ : chr "elasticnet" #> ..$ : chr "l2" #> ..$ : num NaN #> ..$ : chr "elasticnet" #> ..$ : num NaN #> ..$ : num NaN #> ..$ : chr "elasticnet" #> ..$ : chr "l2" #> $ param_clf__estimator__max_iter :List of 10 #> ..$ : int 10000 #> ..$ : int 10000 #> ..$ : int 10000 #> ..$ : int 10000 #> ..$ : num NaN #> ..$ : int 10000 #> ..$ : num NaN #> ..$ : num NaN #> ..$ : int 10000 #> ..$ : int 10000 #> $ param_clf__estimator__loss :List of 10 #> ..$ : chr "log" #> ..$ : chr "hinge" #> ..$ : chr "log" #> ..$ : chr "hinge" #> ..$ : num NaN #> ..$ : chr "hinge" #> ..$ : num NaN #> ..$ : num NaN #> ..$ : chr "log" #> ..$ : chr "log" #> $ param_clf__estimator__class_weight :List of 10 #> ..$ : chr "balanced" #> ..$ : chr "balanced" #> ..$ : chr "balanced" #> ..$ : chr "balanced" #> ..$ : num NaN #> ..$ : chr "balanced" #> ..$ : num NaN #> ..$ : num NaN #> ..$ : NULL #> ..$ : NULL #> $ param_clf__estimator : chr "SGDClassifier(class_weight='balanced', loss='log', max_iter=10000,\n penalty='elasticnet')" "SGDClassifier(class_weight='balanced', loss='log', max_iter=10000,\n penalty='elasticnet')" "SGDClassifier(class_weight='balanced', loss='log', max_iter=10000,\n penalty='elasticnet')" "SGDClassifier(class_weight='balanced', loss='log', max_iter=10000,\n penalty='elasticnet')" ... #> $ param_clf__estimator__alpha :List of 10 #> ..$ : num NaN #> ..$ : num NaN #> ..$ : num NaN #> ..$ : num NaN #> ..$ : num 0.1 #> ..$ : num NaN #> ..$ : num 0.5 #> ..$ : int 1 #> ..$ : num NaN #> ..$ : num NaN #> - attr(*, "pandas.index")=Int64Index([2, 0, 6, 5, 8, 9, 1, 4, 7, 3], dtype='int64')# Learner performance barplot text_pipe$p_compare_models_bar#> [1] "Care received" "Care received" "Couldn't be improved" #> [4] "Staff" "Care received" "Staff"# We can also get the row indices of the train and test data. Note that, in # Python, indices start from 0. For example, the row indices of a data frame # with 5 rows would be 0, 1, 2, 3 & 4. head(sort(text_pipe$index_training_data))#> [1] 0 1 2 3 4 5#> [1] 7 11 12 19 23 26# Let's subset the original data set text_dataset <- pxtextmineR::text_data rownames(text_dataset) <- 0:(nrow(text_dataset) - 1) data_train <- text_dataset[text_pipe$index_training_data, ] data_test <- text_dataset[text_pipe$index_test_data, ] str(data_train)#> 'data.frame': 6922 obs. of 3 variables: #> $ label : chr "Staff" "Care received" "Communication" "Couldn't be improved" ... #> $ criticality: chr "1" "0" "0" "3" ... #> $ feedback : chr "It’s because that doctors, nurses help me" "What was very good was the fact the Physiotherapist called to see my mother when she was in the area just to se"| __truncated__ "XXXX was a good listener." "Nothing" ...#> 'data.frame': 3411 obs. of 3 variables: #> $ label : chr "Communication" "Care received" "Couldn't be improved" "Staff" ... #> $ criticality: chr "0" "0" "3" "0" ... #> $ feedback : chr "Patient, listened carefully and very helpful advice. Positive advice and exercises to do.\n" "I found the service very beneficial." "No, I was very with it all." "I find the staff welcoming and caring, making me feel more comfortable in discussing things." ...


libtorrent DHT has some desireable properties: it is wide and well-maintained, which improves reliability of communication in a general case.
But there are certain well-known situations where the libtorrent DHT doesn't perform as well.
1) The size of the libtorrent DHT network means there is a routing overhead, we need more UDP traffic in order to find our way around, which might be a hurdle when the connection quality is at its lowest.
2) Some providers, particularly the ones tr...


Class: ActiveRecord::Validations::UniquenessValidator
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
|
|
|
Instance Chain:
|
|
| Inherits: |
ActiveModel::EachValidator
|
| Defined in: | activerecord/lib/active_record/validations/uniqueness.rb |
Class Method Summary
- .new(options) ⇒ UniquenessValidator constructor
::ActiveModel::EachValidator
- Inherited
| .new | Returns a new validator instance. |
::ActiveModel::Validator
- Inherited
Instance Attribute Summary
Instance Method Summary
- #validate_each(record, attribute, value)
- #build_relation(klass, attribute, value) private
-
#find_finder_class_for(record)
private
The check for an existing value should be run from a class that isn’t abstract.
- #map_enum_attribute(klass, attribute, value) private
- #scope_relation(record, relation) private
::ActiveModel::EachValidator
- Inherited
| #check_validity! | Hook method that gets called by the initializer allowing verification that the arguments supplied are valid. |
| #validate | Performs validation on the supplied record. |
| #validate_each | Override this method in subclasses with the validation logic, adding errors to the records |
| #prepare_value_for_validation |
::ActiveModel::Validator
- Inherited
Constructor Details
.new(options) ⇒ UniquenessValidator
# File 'activerecord/lib/active_record/validations/uniqueness.rb', line 6
def initialize( ) if [:conditions] && ! [:conditions].respond_to?(:call) raise ArgumentError, "#{ [:conditions]} was passed as :conditions but is not callable. " \ "Pass a callable instead: `conditions: -> { where(approved: true) }`" end unless Array( [:scope]).all? { |scope| scope.respond_to?(:to_sym) } raise ArgumentError, "#{ [:scope]} is not supported format for :scope option. " \ "Pass a symbol or an array of symbols instead: `scope: :user_id`" end super @klass = [:class] end
Instance Method Details
#build_relation(klass, attribute, value) (private)
[ GitHub ]# File 'activerecord/lib/active_record/validations/uniqueness.rb', line 67
def build_relation(klass, attribute, value) relation = klass.unscoped comparison = relation.bind_attribute(attribute, value) do |attr, bind| return relation.none! if bind.unboundable? if ! .key?(:case_sensitive) || bind.nil? klass.connection.default_uniqueness_comparison(attr, bind) elsif [:case_sensitive] klass.connection.case_sensitive_comparison(attr, bind) else # will use SQL LOWER function before comparison, unless it detects a case insensitive collation klass.connection.case_insensitive_comparison(attr, bind) end end relation.where!(comparison) end
#find_finder_class_for(record) (private)
The check for an existing value should be run from a class that isn’t abstract. This means working down from the current class (self), to the first non-abstract class. Since classes don’t know their subclasses, we have to build the hierarchy between self and the record’s class.
# File 'activerecord/lib/active_record/validations/uniqueness.rb', line 57
def find_finder_class_for(record) class_hierarchy = [record.class] while class_hierarchy.first != @klass class_hierarchy.unshift(class_hierarchy.first.superclass) end class_hierarchy.detect { |klass| !klass.abstract_class? } end
#map_enum_attribute(klass, attribute, value) (private)
[ GitHub ]# File 'activerecord/lib/active_record/validations/uniqueness.rb', line 98
def map_enum_attribute(klass, attribute, value) mapping = klass.defined_enums[attribute.to_s] value = mapping[value] if value && mapping value end
#scope_relation(record, relation) (private)
[ GitHub ]# File 'activerecord/lib/active_record/validations/uniqueness.rb', line 85
def scope_relation(record, relation) Array( [:scope]).each do |scope_item| scope_value = if record.class._reflect_on_association(scope_item) record.association(scope_item).reader else record.read_attribute(scope_item) end relation = relation.where(scope_item => scope_value) end relation end
#validate_each(record, attribute, value)
[ GitHub ]# File 'activerecord/lib/active_record/validations/uniqueness.rb', line 19
def validate_each(record, attribute, value) finder_class = find_finder_class_for(record) value = map_enum_attribute(finder_class, attribute, value) relation = build_relation(finder_class, attribute, value) if record.persisted? if finder_class.primary_key relation = relation.where.not(finder_class.primary_key => record.id_in_database) else raise UnknownPrimaryKey.new(finder_class, "Cannot validate uniqueness for persisted record without primary key.") end end relation = scope_relation(record, relation) if [:conditions] conditions = [:conditions] relation = if conditions.arity.zero? relation.instance_exec(&conditions) else relation.instance_exec(record, &conditions) end end if relation.exists? = .except(:case_sensitive, :scope, :conditions) [:value] = value record.errors.add(attribute, :taken, ** ) end end


Done
You have set up a Direct Debit to pay your penalty charge
What happens next?
-
1
You will receive a letter confirming your Direct Debit details.
-
2
Your first payment of £XX.XX will be taken on XX January 2019.
-
3
Your next X payments will be taken on or just after the date you have chosen.
As long as you keep up payments there will be no further charges added to your account.
How to avoid penalties in the future
- Make sure that your GP and dentist have your correct home address
- If you receive benefits or have an exemption certificate, make sure that the relevant organisations have your correct home address
- If you have an exemption certificate, make sure it does not expire
- For more information visit www.nhsbsa.nhs.uk/penaltycharges
Feedback
Help us improve the service by answering some questions about it.
{{hasmail}}


Alternate email address<EMAIL_ADDRESS>Dear friend, Greetings to you and your family! This mail might come to you as a surprise and the temptation to ignore it as unserious could come into your mind; but please consider it a divine wish and accept it with a deep sense of humility. My name is Jose Martinez Guzman. I am a 65 years old man, I am Cuban currently residing in Madrid (Spain). I was formerly living in Cuba and served under Castro`s government but had to run into self exile after the ruling Government of Fidel Castro closed in on my family on accusations of anti-government statements, I was once married with two children but my family could not escape before the deadly hands of Castro`s goons fell on them. l did made a lot of money serving Castro and on getting to Spain, I have been a merchant here in Madrid dealing in Ornamentals, Oriental Carpets and Artifacts and life was very smooth for me until about three(3) years ago when I was first diagnosed of Cancer of the Larynx. Before this happened my business and concern for making money was all I lived for, I never really cared about other values in life. But since the loss of my family and hometown, I have found a new desire to assist helpless families. I have been helping orphans in orphanage/motherless homes. I have once donated some money to orphans in war ravaged Eritrea, Somalia, Sudan and some East European Countries. Before I became ill, I kept $US 5.5 Million in a long-term deposit vault of a bank and I didn`t state any next of kin when the money was deposited and if I died without stating any the money will automatically go into the coffers of the bank and I don`t want this to happen. I have left the hospital and presently receiving treatment in an acupuncture clinic, I have been undergoing treatment for Oesophageal Cancer at the hospital. I have since lost my ability to talk and my doctors have told me that I have only a few months to live. It is my last wish to see this money distributed to charity organizations, because relatives and friends have plundered so much of my wealth since my illness, I cannot live with the agony of entrusting this huge responsibility to any of them. Please, I beg you in the name of God to help me collect the deposit and distribute it amongst charity organizations and the incident that happened in Asia too. Use your judgement to distribute the money and feel free to reimburse yourself when you have the money for any cost you incur during the process of collecting and distributing the money to charity organizations. I am going to send you vital documents to back my claims and I am willing to offer you a reward If you are willing to help, please reply as soon as you can on my alternate email address<EMAIL_ADDRESS>Looking forward to hearing from you soonest. Regards, Jose Martinez Guzman


public class Player
Represents a player who has joined the game
| Constructor and Description |
|---|
Player(InputDevice input,
java.lang.String name,
com.badlogic.gdx.graphics.Color color,
com.badlogic.gdx.graphics.Color color2)
Represents a player who has joined the game
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Player other)
Compares players to see who has highest score
|
com.badlogic.gdx.graphics.Color |
getColor()
A custom colour chosen by player in options
|
com.badlogic.gdx.graphics.Color |
getColor2() |
int |
getDeaths()
If your game tracks lives, you can store how many times the player has died here
(rather than lives remaining)
|
float |
getHealthLost()
If your game tracks health, you can store how much health the player has lost here
(rather than storing the remaining health)
|
InputDevice |
getInput()
The keyboard/controller etc he is using
|
int |
getMetaScore()
When game is part of a multi-round tournment this represents the overall score in
the tournament
|
java.lang.String |
getName()
The name to display for this player.
|
int |
getScore()
If your game keeps score you can store it here
|
float |
getStartingHealth()
How much health the player started with
|
java.lang.String |
healthDisplayString(float startingHealth) |
void |
incMetaScore(int i) |
boolean |
isOutOfLives(int lives)
Gameover, man, gameover.
|
java.lang.String |
livesDisplayString(int startingLives) |
void |
reset()
Resets score, lives and health for a new round
|
void |
setDeaths(int p)
If your game tracks lives, you can store how many times the player has died here
(rather than lives remaining)
|
void |
setHealthLost(float p)
If your game tracks health, you can store how much health the player has lost here
(rather than storing the remaining health)
|
void |
setScore(int p)
If your game keeps score you can store it here
|
void |
setStartingHealth(float p)
How much health the player started with
|
public Player(InputDevice input, java.lang.String name, com.badlogic.gdx.graphics.Color color, com.badlogic.gdx.graphics.Color color2)
Represents a player who has joined the game
input
- The keyboard/controller etc he is usingname
- The name to display for this player. Defaults to 'PLAYERx' but may be customized in optionscolor
- A custom colour chosen by player in optionsinput
- The keyboard/controller etc he is usingname
- The name to display for this player. Defaults to 'PLAYERx' but may be customized in optionscolor
- A custom colour chosen by player in optionscolor
- Another custom colourpublic int compareTo(Player other)
Compares players to see who has highest score
public int getScore()
If your game keeps score you can store it here
public void setScore(int p)
If your game keeps score you can store it here
public int getDeaths()
If your game tracks lives, you can store how many times the player has died here (rather than lives remaining)
public void setDeaths(int p)
If your game tracks lives, you can store how many times the player has died here (rather than lives remaining)
public float getHealthLost()
If your game tracks health, you can store how much health the player has lost here (rather than storing the remaining health)
public void setHealthLost(float p)
If your game tracks health, you can store how much health the player has lost here (rather than storing the remaining health)
public int getMetaScore()
When game is part of a multi-round tournment this represents the overall score in the tournament
public void incMetaScore(int i)
public float getStartingHealth()
How much health the player started with
public void setStartingHealth(float p)
How much health the player started with
public java.lang.String healthDisplayString(float startingHealth)
public java.lang.String livesDisplayString(int startingLives)
public boolean isOutOfLives(int lives)
Gameover, man, gameover.
public void reset()
Resets score, lives and health for a new round
public InputDevice getInput()
The keyboard/controller etc he is using
public java.lang.String getName()
The name to display for this player.
Defaults to 'PLAYERx' but may be customized in options
public com.badlogic.gdx.graphics.Color getColor()
A custom colour chosen by player in options
public com.badlogic.gdx.graphics.Color getColor2()


Sociolyzer
beta
Accelerate Your Social Growth
Login with Facebook
Sociolyzer
Welcome,
{{user.name}}
Home
User Demographic
Page Fans
Page Fans By Country
Page Fans By Gender/Age
Page Fans Add
Page Impressions
Total Page Paid/Unpaid Impressions
Total Organic Page Impressions
Page Impressions By Story Type
Page Impressions By City
Page Impressions By Country
Page Engagements
Page Engaged Users
Page Consumption By Type
Page Place Checkin
Page Negetive Feedback By Type
Page Post Stories
Page Stories
Page Stories Tellers
Page Stories Type
Page Story Tellers By Age
Page Stories teller by City
Post Stories
Post Stories Tellers
Post Reactions
Total Post Reaction
Page CTA Clicks
Page call phone button clicks
Page get direction button clicks
Page Views
Total Page Views When User Logged In
Total Page Views When User Logged Out
Page Views By Profile Tab
Additional Pages
About Us
Privacy Policy
Logout
Change Page
Number of pages: {{length}}
{{page}}
Until
Since
Refresh
{{initpage}}
Page Fans By Gender/Age
Pie Chart
Line Chart
Page Fans Add
Pie Chart
Line Chart
Page Fans By Country
Pie Chart
Line Chart
Page Fans Distribution
Pie Chart
Line Chart
Page Impressions By Country
Pie Chart
Line Chart
Page Impressions By City
Pie Chart
Line Chart
Page Impressions By Story Type
Pie Chart
Line Chart
Total Organic Page Impressions
Pie Chart
Line Chart
Total Page Paid/Unpaid Impressions
Pie Chart
Line Chart
{{values5.total}}
{{values5.paid}}
{{values5.unpaid}}
Page Negetive Feedback By Type
Pie Chart
Line Chart
Page Place Checkin
Pie Chart
Line Chart
Page Consumption By Type
Pie Chart
Line Chart
Page Engaged Users
Pie Chart
Line Chart
Page Fans Distribution
Pie Chart
Line Chart
Post Stories Tellers
Pie Chart
Line Chart
Post Stories
Pie Chart
Line Chart
Page Stories teller by City
Pie Chart
Line Chart
Page Story Tellers By Age
Pie Chart
Line Chart
Page Stories Type
Pie Chart
Line Chart
Page Stories Tellers
Pie Chart
Line Chart
Page Stories
Pie Chart
Line Chart
Total Post Reaction
Pie Chart
Line Chart
Page get direction button clicks
Pie Chart
Line Chart
Page call phone button clicks
Pie Chart
Line Chart
Total Page Views When User Logged In
Pie Chart
Line Chart
Total Page Views When User Logged Out
Pie Chart
Line Chart
Page Views By Profile Tab
Pie Chart
Line Chart


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/heq.20hell.20again.html ---
My current goal looks like eq.mpr comm_ring._proof_2 (quotient_ring.comm_ring (closure (is_ideal.trivial α))) == quotient_ring.comm_ring (closure (is_ideal.trivial α))
I'm ready to believe this is a rightful punishment for an earlier sin, but I'd like to know whether there is any hope to escape, or I should go back and think about what I'm doing
Does this lemma help?
universe u lemma for_patrick {α β : Sort u} (h : β = α) (x : α) : eq.mpr h x == x := by subst h; refl
YES!
Can you explain what's going on here?
@Mario Carneiro should this be added as a simp lemma in mathlib?
Let's see how bad things are. What I wanted to write was:
instance [comm_ring α] [uniform_space α] [uniform_add_group α] [topological_ring α] : topological_ring (quotient (separation_setoid α)) := by rw ring_sep_rel ; apply_instance
What I actually wrote (after adding Chris's simp lemma):
instance [comm_ring α] [uniform_space α] [uniform_add_group α] [topological_ring α] : topological_ring (quotient (separation_setoid α)) := begin convert topological_ring_quotient (closure (is_ideal.trivial α)), { apply ring_sep_rel }, { dsimp [topological_ring_quotient_topology, quotient.topological_space, to_topological_space], congr, apply ring_sep_rel, apply ring_sep_rel }, { apply ring_sep_rel }, { simp [uniform_space.comm_ring] }, end
Like: come one Lean: apply ring_sep_rel!
where lemma ring_sep_rel (α) [comm_ring α] [uniform_space α] [uniform_add_group α] [topological_ring α] :
separation_setoid α = quotient_ring.quotient_rel (closure $ is_ideal.trivial α)
subst
is a better version of rw
, that can rw
the types of proofs as well. before subst h
the goal is @eq.mpr β α h x == x
, after subst h
the goal is @eq.mpr β β (@eq.refl (Sort u) β) x == x
, and now the types are the same on each sude of the equality, and eq.mpr
can iota-reduce, since eq.refl
is a constructor, so it's just refl
.
The trouble with subst
is it only works with local constants, so these proofs often require you to turn your goal into a lemma where you can use subst
on local constants. A good version of subst
that handles things other than local constants is something that needs to be written I think.
eq_rec_heq
is exactly the same as the lemma I wrote by the way.
not quite
Chris, do you know if there is some more documentation about this magic subst
? It sounds like it could be very useful. Lately I've been fighting that kind of rw
issues a lot
I don't think there's any documentation. The strategy to use it is to make sure that the expression you're substituting is a local constant, and if it isn't, then make an intermediate lemma. In the example I gave, only α
had to be a local constant.
I always assumed subst
was just induction on eq
, is it actually something different?
@Reid Barton That's a useful way to see it. The thing is that by doing induction on eq, you're substitution everywhere at once so when your variable is used as a parameter for a function with a dependent type, it can help do the substitution in every term and type at once so that the goal remains type correct
Looking at the definition it appears to not be based on the induction tactic. cases
also works in this example, but basically subst
is for when the motive is hard to compute due to dependent arguments. The proof terms use eq.drec
instead of eq.rec
It sounds exactly like what I've needed for one week
What is a local constant?
It's a free variable in your goal, not a definition and not a bound variable.
I think it's basically a variable in your local context, so α
is, but not ℕ
or f α
"something you could substitute something else for"
It's hard to see how such a restrictive condition can be satisfied
Only one side has to be a variable. e.g. x = 1 |- P x
reduces to P 1
You turn your goal into a lemma about local constants, and then substitute your expression into that lemma, like I did with for_patrick
A bit messy, but reliable.
Also, rcases e with rfl
will do subst on terms
What?!
and rcases e with <>
will do cases instead, which has slightly different effects wrt unfolding
All this becomes more and more obscure to me
it's super useful to use rfl
in rcases patterns
If your assumption is f x = g y
then it's difficult to eliminate the equality once and for all, it could make lots of things equal to other things in an unpredictable way (see: word problem)
but when one side is a fresh variable, like x = g y
, then we can just replace x
with g y
everywhere in the context to eliminate x
The nice thing is that this works regardless of any dependencies, which is a big plus compared to rw
with this equality everywhere
Basically all facts about eq
and heq
are proved using this trick
I think I need to see examples to understand this
I have no idea where to start
Patrick I have heard Chris moaning about this heq
stuff. But I have never once had to use it? Why is that? Am I avoiding a certain kind of mathematics? Why do you need it?
When you didn't use the identity map as a map from F (id '' U)
to F U
, this is the kind of thing you avoided.
Yes I just went back to that thread.
I found a pretty good summary of all the different types of equality here: https://jozefg.bitbucket.io/posts/2014-08-06-equality.html
I have no idea what heq is. I can only tell you that when arguments of a term depend on other arguments then rw
and simp
often don't work. convert
works but spawns heq
goals. I understand nothing about Mario's explanations unfortunately
do we have some general tips to avoid heq hell? @Mario Carneiro
If congr'
produced them, then consider doing cases on an equality instead.
Last updated: Apr 24 2020 at 19:02 UTC


| Hero | Current Level |
Target Level |
EXP | Gold | Essence | ExpTime | GoldTime | EssenceTime | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | |||||||||
| Total: |
| Income per Min | |
|---|---|
| exp/min | |
| gold/min | |
| essence/2hour* |
| Total Needed | |
|---|---|
| exp | |
| gold | |
| essence |
*Approximately how many essence every 2 hours. Use fast collect then enter the amount of essence you get from it


a b c
1 2 3
2 3 4
3 4 5
firstName lastName age desc
"Susan" "Doyle" 32 "mother"
"John" "Doyle" 33 "father"
"Lily" "Doyle" 5 undefined
"Mike" "Doyle" 8 undefined
Object Properties
"propA"
"propB"
"propC"
My family
looking like the one of step 5.
1
2
2
3
3
4
4
5
2nd
and 3rd
as headers.
Object Properties Values
"firstName" "Susan"
"lastName" "Doyle"
"age" 32
"desc" "mother"
Object Properties
Values
0
1
1
2
2
3


Go to Settings
Transition Example
When a button is clicked/tapped, the JavaScript merely assigns class names to the panels. The CSS then jumps into action based on the new class names.
Go to Home


- Reverse Guitar Scale Finder -
Clear Fretboard
Tuning:
Flat (b)
Sharp (#)
select three or more distinct notes


{% extends 'core/base.html' %} {% load static from staticfiles %} {% block head_title %}This service has been removed{% endblock %} {% block content %} This service has been removed You can still read our advice on how to sell your goods and services overseas. Read about how to: {% for listing in page.child_pages %} {{ listing.title }} {% endfor %} {% endblock %}
You can still read our advice on how to sell your goods and services overseas.
Read about how to:


| Test | Base (Not Compiled) | Compiled |
|
augCompileAll() // compiles augmented elements on the next animation frame that have "compile" in their aug list, returns a promise
Should have compiled 13 augmented elements, inlays, borders, and delegates: 0
|
||
| No Inlay or Border |
TEST
|
TEST This element ^ is |
| Jusy Inlay |
TEST
|
TEST This element ^ is |
| Just Border |
TEST
|
TEST This element ^ is |
| Inlay and Border |
TEST
|
TEST This element ^ is |
| Delegated Inlay |
delegate is
|
delegate is This element ^ is |
| Delegated Border, normal inlay |
delegate is
|
delegate is This element ^ is |
|
Run animation speed test: |
result: 0 fps | result: 0 fps |
| revert and compile one el | removed rules: | added rules: |


Video firstexplore it.
Video secondexplore it.
Video thirdexplore it.
Video fourthexplore it.
Video fiveexplore it.
Video sixexplore it.
Video sevenexplore it.
Video eight explore it.
Video nineexplore it.


CipherSchemeMetadata |
Service which provides metadata about cipher suite, such as available signature schemes, digests and security providers. interface CipherSchemeMetadata : KeyEncodingService |
CipherSchemeMetadataProvider |
Factory to create new instances of the cipher scheme map service. interface CipherSchemeMetadataProvider |
CipherSuiteFactory |
The CipherSuiteFactory provides operations to create various cipher suite's services. interface CipherSuiteFactory |
CryptoService |
Crypto service which can sign as well as create new key pairs. interface CryptoService |
CryptoServiceContext |
class CryptoServiceContext<T> |
CryptoServiceProvider |
Factory to create new instances of the crypto service. interface CryptoServiceProvider<T : Any> |
CryptoServiceTestSupport |
The optional interface which can be implemented to clear up the HSM when running TCK tests. interface CryptoServiceTestSupport |
DigestServiceProvider |
Factory to create new instances of the basic hashing service. interface DigestServiceProvider |
KeyEncodingService |
Encoding service which can encode and decode keys to or from byte arrays or strings using PEM encoding format. interface KeyEncodingService |
SchemeTemplates |
open class SchemeTemplates |
SignatureVerificationServiceProvider |
Factory to create new instances of the key encoding service. interface SignatureVerificationServiceProvider |
WrappedKeyPair |
Holding class for the returned by teh CryptoService wrapped key pair. class WrappedKeyPair |
WrappedPrivateKey |
Holding class for the private key material. The interpretation what is stored in the key material is up to the CryptoService implementing class - it could be the encrypted private key or its alias in case if the HSM natively supports large number of keys. class WrappedPrivateKey |


---
layout: post
title: Playing With Googol
date: '2008-07-12T14:36:00.006+02:00'
author: Babji Prashanth, Chetty
categories:
- algos
- programming
tags:
- Babji
- Java
- play with googol
- europe
- Google
- chetty
- Prashanth
- bigdecimal
modified_time: '2013-06-03T18:52:25.784+02:00'
blogger_id: tag:blogger.com,1999:blog-8063665696479699369.post-9115064129023197004
blogger_orig_url: http://google-tale.blogspot.com/2008/07/playing-with-googol.html
---
Sample program, which shows how to deal with large numbers like Googol:
Here's the output of this program:
Googol1 :<PHONE_NUMBER>854775807
Max Value of Long :<PHONE_NUMBER>854775807
Googol2 : 1.0E+100
Googol Multiplied By PI : 3.1415926535897930E+100


result_type function::operator()(
T1 t1, T2 t2, ..., TN tN) const;
The member function throws an exception object of type bad_function_-call if *this is empty; otherwise, it returns INVOKE_R (fn, t1, t2, ..., tN, Ret), where fn is the callable object held by *this.