Source code for astropy.io.misc.pickle_helpers
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains simple input/output related functionality that is not
part of a larger framework or standard.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from ...extern import six
__all__ = ['fnpickle', 'fnunpickle']
[docs]def fnunpickle(fileorname, number=0, usecPickle=True):
""" Unpickle pickled objects from a specified file and return the contents.
Parameters
----------
fileorname : str or `file`-like
The file name or file from which to unpickle objects. If a file object,
it should have been opened in binary mode.
number : int
If 0, a single object will be returned (the first in the file). If >0,
this specifies the number of objects to be unpickled, and a list will
be returned with exactly that many objects. If <0, all objects in the
file will be unpickled and returned as a list.
usecPickle : bool
If True, the :mod:`cPickle` module is to be used in place of
:mod:`pickle` (cPickle is faster). This only applies for python 2.x.
Raises
------
EOFError
If ``number`` is >0 and there are fewer than ``number`` objects in the
pickled file.
Returns
-------
contents : obj or list
If ``number`` is 0, this is a individual object - the first one unpickled
from the file. Otherwise, it is a list of objects unpickled from the
file.
"""
if usecPickle and six.PY2:
import cPickle as pickle
else:
import pickle
if isinstance(fileorname, six.string_types):
f = open(fileorname, 'rb')
close = True
else:
f = fileorname
close = False
try:
if number > 0: # get that number
res = []
for i in range(number):
res.append(pickle.load(f))
elif number < 0: # get all objects
res = []
eof = False
while not eof:
try:
res.append(pickle.load(f))
except EOFError:
eof = True
else: # number==0
res = pickle.load(f)
finally:
if close:
f.close()
return res
[docs]def fnpickle(object, fileorname, usecPickle=True, protocol=None, append=False):
"""Pickle an object to a specified file.
Parameters
----------
object
The python object to pickle.
fileorname : str or `file`-like
The filename or file into which the `object` should be pickled. If a
file object, it should have been opened in binary mode.
usecPickle : bool
If True (default), the :mod:`cPickle` module is to be used in place of
:mod:`pickle` (cPickle is faster). This only applies for python 2.x.
protocol : int or None
Pickle protocol to use - see the :mod:`pickle` module for details on
these options. If None, the most recent protocol will be used.
append : bool
If True, the object is appended to the end of the file, otherwise the
file will be overwritten (if a file object is given instead of a
file name, this has no effect).
"""
if usecPickle and six.PY2:
import cPickle as pickle
else:
import pickle
if protocol is None:
protocol = pickle.HIGHEST_PROTOCOL
if isinstance(fileorname, six.string_types):
f = open(fileorname, 'ab' if append else 'wb')
close = True
else:
f = fileorname
close = False
try:
pickle.dump(object, f, protocol=protocol)
finally:
if close:
f.close()


{{ with .Site.Params.backgroundCredit }} Image Credit: {{ . | markdownify -}} {{ end }}
Powered by Hugo
and Foundation
{{- if and (isset .Site.Params "ip") (isset .Site.Params.ip "copyright") -}} {{- .Site.Params.ip.copyright | safeHTML -}} {{- else -}} Site design {{- end -}}
Based on ESPM 157, by Carl Boettiger.


This is expresses some of the elements of the MacArthur Foundation 100 Change challenge in prose object format. https://www.macfound.org/programs/100change/.
Currently, we have only a stub: the Challenge criteria.


An extension to batch generate fonts.
Drag and drop or open a one or multiple UFO's. If a folder is provided Batch will search in that folder for UFO's. Binary fonts are also supported (otf, ttf), they will be imported and generated.
Output settings:
A suffix can be added to the file name. The suffix can contain date time formatting.
The woff option will create metadata based on the info in the font, if it is available. (openTypeNameManufacturer, openTypeNameManufacturerURL, openTypeNameDesigner, openType)NameDesignerURL, openTypeNameDescription, openTypeNameLicenseURL, openTypeNameLicense, copyright, trademark).
The woff2 option will not create any metadata, the fonts will just be compressed.
The option to preserve hints, only optional when a TTF is provided, will not autohint the binary TTF font.
Full support for ttfautohint
and all of the different settings.
A suffix can be added to the file name. The suffix can contain date time formatting.
Batch will also generate a HTML preview that with some simple presents.
The html preview can replace %(familyName)s
and %(styleName)s
by the values retrieved from the corresponding font.
Will merge specific tables from a source. Only avaialbe when when a UFO is provided and when the UFO has the source path in the font.lib
.
Binary Merge is using the output settings as in Generate.


Municipality of Tirana, the biggest municipality in Albania, has agreed to donate geospatial data to OpenStreetMap using an open license.
After several communications with local and international OpenStreetMap contributors and following the memorandum of understanding signed in 2017 between the Municipality of Tirana and Open Labs hackerspace, the donated data have already started being added at OSM through geoportal.openlabs.cc.
The available data include, but are not limited to, buildings, height of buildings, roads and their names and will help the Albanian open source community contribute even more to the OpenStreetMap platform.
Read our blogpost : Announcing the OpenStreetMap based Geoportal for Albania
Thank you to the Municipality of Tirana, and the OpenStreetMap community !
https://www.openstreetmap.org/edit?editor=id
<EMAIL_ADDRESS>https://josm.openstreetmap.de/
The layers are available in the default "Imagery preferences" as :
| Type | URL |
|---|---|
| WMS | https://geoportal.openlabs.cc/mapcache/ |
| TMS - Full |<EMAIL_ADDRESS>|
| TMS - Public Transport only |<EMAIL_ADDRESS>|
| Type | URL |
|---|---|
| WMS | https://geoportal.openlabs.cc/mapcache/ |
| TMS - Full |<EMAIL_ADDRESS>|
| TMS - Public Transport only |<EMAIL_ADDRESS>|
Developed by Jonathan Beliën, Open Labs member and OpenStreetMap Belgium board member.
All the "source code" is available on GitHub : https://github.com/OpenLabsHackerspace/openlabs-geoportal


Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form. Markdown is widely used in blogging, instant messaging, online forums, collaborative software, documentation pages, and readme files.
we will take those courses ( ordered list )
1. ## Code 102 - Intro to Software Development
2.
Code 201 - Foundations of Software
4. ## Code 301 - Intermediate Software 5. Development
5. ## Code 401 - Advanced Software Development
this is bold **bold** in mark down
this is italic *italic* in mark down
and this is ***bold and italic***
[ this is my Github ](https://github.com/maysaahourani)


{% extends 'main/_base.html' %} {% load static %} {% block title %} Home {% endblock %} {% block header %} {% include "main/_header.html" %} {% endblock %} {% block content %}
If you are looking for a roommate to live in your house or someone to split an apartment with.  Find the perfect place by search rooms on RoomScout
Start your searchDo you split utilities with the other people living in your house / apartment? If so it can be a huge burden to manage expenses and make sure you get paid. RoomScout relieves that headache by splitting and managing it all for you.


In November of 2002, I was a college senior and quite the chemical sponge. I was experimenting with many different combinations of substances and settings, as I was free to do so at that stage in my life. Most of my experiences started with research on Erowid, and ended in a pleasant nights sleep. With graduation on the horizon, and that inevitable search for my first internship, I knew I had to keep my body clean of illegal substances, or at least less riddled with them. For the past few weeks, I had been experimenting with legal highs with mixed results. Passion Flower, Salvia, Nutmeg, and Catnip, my choice for this particular night.
My setting should sound familiar to most people. A 10” by 15” college dorm, lit with clear Christmas tree lights. Comfy chair, computer, and soft music. My mind, as with every time I indulge, was very excited, eager, and slightly nervous. By this time, I knew what preparations to take, environment wise, to ensure I would not be caught doing whatever I was doing, so that eased my mind slightly. This included taping doors to prevent smoke from escaping, a fan in the window, and help if something bad happened, like having a friend only two doors down. However, I was trying something new, so I was more excited than normal.
I had read weeks earlier that Catnip could be used to alter a persons mental state to some degree. I had purchased and smoked some a few days before, but with no results to speak of. However, I've read enough experiences to know if at first you don't succeed, try mixing things. This night I just happened to have a six pack of Smirnoff Ice to go along with my Catnip. I chugged the first bottle, and started a second. I could feel the warm sensation in my belly that alcohol causes, then packed and quickly smoked a bowl of Catnip using my water bong.
At this point I must say that Catnip is by no means smooth or pleasant. It's harsh, it stinks, and tastes pretty bad. This only caused me to drink more. This pattern continued for about 10 minutes until I had smoked two full bowls and drank two and a half bottles of the sugary brew. At first I noticed nothing out of the ordinary. I decided to visit a friend of mine at work (he worked unsupervised at a computer lab) to kill some time.
Over the next 15 minutes, I noticed that my vision became much sharper, almost pixilated. As I walked to the computer lab, passing people, I felt very paranoid. However it was a very fun paranoid, like “I know something you don't”. When I reached the computer lab, my friend noted that I was grinning. After sitting down, I realized that I felt much more drunk than I should have, considering the small amount of alcohol I actually consumed. I was somewhat giddy, drunk, and slightly euphoric all at the same time. I had never had alcohol effect me in this way, so it must have been the addition of the catnip. Colors were slightly more vivid, my vision was sharper, and everything sounded tinny. These effects lasted for about an hour, which is about how long that much alcohol could possibly effect my body.
His shift ended, we got some food, and headed to his dorm and invited some friends. Within 30 minutes, I was very tired. I drifted off to sleep for about 30 minutes, then woke, and returned to my own room where I slept very deeply for 9 hours. I woke up the next day tired, but it was a pleasant tired, like I had just made love. After getting around, I felt no negative side effects from either the alcohol or catnip and was able to function normally.
I feel that, had I continued both drinking and smoking the catnip, I could have maintained those sensations I described. In a bar setting, I could see catnip being a very nice friend. I must note one possible negative effect of catnip outside of its bad taste. I've read from several sources that catnip stimulates the bowels. I myself experienced this, it was similar to a normal dose of laxative the day after I smoked it. Not enough to cause discomfort, but it was noticeable.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


There is distinct effort made
to make the Lever language itself easier to develop. The grammar
language described here has a big role in there.
Here's
the context-free attribute grammar for the grammar language, described
in itself:
use alias()
a = [symbol]
on = ['constructive', 'use', 'terminal', 'append', 'concat']
use indentation(indent, dedent, newline)
can_close = [')', ']', '}']
file: sep(decl, newline)
decl:
'use' symbol '(' sep(symbol, ',') ')' (indent join(option, newline) dedent)? / use
'constructive'? 'terminal' join(symbol, ',') / terminal
symbol '(' sep(symbol, ',') ')' ':' body / template
symbol ':' body / rule
option: symbol '=' '[' sep(primitive, ',') ']'
primitive:
symbol / symbol
string / string
body:
prod / [.]
indent join(prod, newline) dedent
prod: expr* ('/' [annotation, symbol / shorthand])? / prod
expr:
term
'(' arg_block(prod) ')' '+' / plus
'(' arg_block(prod) ')' '*' / star
'(' arg_block(prod) ')' '?' / opt
symbol '(' arg_block(prod) ')' / expand
term:
term '+' / plus
term '*' / star
term '?' / opt
symbol / symbol
string / string
'[' arg_block(prod) ']' / prod_set
annotation:
annotation_term
annotation 'append' annotation_term / append
annotation 'concat' annotation_term / concat
annotation_term:
'(' annotation ')'
int / index
'.' / dot
'..' / dotdot
'null' / a_null
symbol '(' sep(annotation, ',') ')' / label
'[' sep(annotation, ',') ']' / a_list
arg_block(x):
sep(x, ',', ',')
indent sep_concat(x, newline) dedent
sep_concat(x, y):
sep(x, ',', ',')
seq_b(x) y sep(x, ',', ',') / (. concat .)
01. Structure
The 'lhs: rhs' part in the
grammar is the production rule, the '/ thing' is an
annotation that the rule maps into.
01.1. How to
read the attribute
The annotation coming after the rule may
consists of a single symbol or even just an expression.
The
annotation is a template that is filled by deducting the details from
the expression.
01.2. Capturing elements
Some pieces of the right hand side rule are ignored. These are
the keyword string tokens and tokens that have been marked as
'constructive', such as indentation and dedentation tokens.
If there is not a single element that is captured, the ignored
elements are retrieved in whole, otherwise only the capturing elements
are captured.
When there is no annotation provided: If there is
only one element captured, it is captured 'as it', otherwise
the captured elements are inserted into a list.
When there is a
single symbol, the elements are captured into an attribute that holds
the name in that symbol.
01.3. Index and dot
annotations
The index and dot annotations are read such that
the elements captured by the index are marked as retrieved and not
double-captured by the dot annotations.
Every item, captured or
not captured, has an unique index. These indices start from 1, which
is merely a convention of the grammar language. You can think of the
index '0' as a symbol on the left hand side if you're a
programmer, although the left-hand side cannot be captured.
The
single dot '.' captures an one symbol, whereas the double
dot '..' captures all remaining symbols. The double dot may
only occur once, and the single dot may appear before and after the
double dot.
01.4. Annotation expressions
In
the annotation you may denote that the contents are placed into a
list, or that something gets appended into a list or that lists are
concatenated together.
You may also denote that a null is
explicitly passed into an annotation.
02. Extensions
Extensions do not change how the source grammar is parsed, but
they will provide additional hints about how it will be used.
The use of an extension is described with the 'use'
-directive, and the ordering of the extensions determines in which
order they are invoked during parsing.
The symbols passed as
'arguments' are defined as constructive terminals, which
means they are not gathered during parsing. These are used
02.1. indentation -extension
The
'indentation' extension allows you to define
layout-sensitive grammars. The terminals provided as input provide
tokens that may be used to trigger the layout sensitivity.
The
indent/dedent/newline is implemented by feeding such a token
whenever it may appear and when the parsing state expects it.
Therefore the current implementation of layout sensitivity may result
in surprising results at ambiguous grammars.
The can_close
-option lets you select tokens that allow the indentation level to
decrease without reaching the end of the line first.
02.2. alias -extension
The 'alias'
extension is meant for situations when you want to have keywords, but
do not want them to mess up with user code.
The effect of
'alias' is that whenever the parsing cannot proceed with one
of the terminals in the 'on' -list, but it could proceed
with one of the terminals in the 'a' -list, the alias
extension will rename the terminal to allow the parsing to pass.
Similarly to the indentation extension, the details are still a
bit vague on these ones, and may be subject to change.
03. A Simple Example
Here's a complicated way
to print '4' with the grammar library:
The
'calc.grammar':
addition: term '+' term / add
term: int / int
The
'calc.lc':
import grammar
main = (args):
calc_lang = grammar.read_file(dir ++ 'calc.grammar')
result = calc_lange.read_string("1 + 3")
result = result.traverse(traverse)
print(result)
traverse = (name, args, loc):
if name == 'int'
return parse_int(args[0])
elif name == 'add'
return args[0] + args[1]
else
assert false, [name, args, loc]


Built in 1910 during the Belle Epoque period, this hotel is located in the center of
Paris, with easy access to the city’s tourist attractions. It offers tastefully
decorated rooms.
20% Off On Accommodation.
Complimentary Daily Breakfast
3 Pcs Laundry Per Day
Free Wifi.
Discount 20% On F&B
Restaurants Services
Travel & Camping
Event & Party
Discover Our Hotel & Services.
It S Hurricane Season But We Are Visiting Hilton Head Island


If you can see me, than you should be logged in B-)
Where are you?
- Context: {{context}}
- Realm: {{realm}}
Who are you?
- Token expires: {{tokenExpires}}
- Tick: {{ticks}}
- Debug: {{debug}}
Your realm permissions are
Your resource permissions are
- {{item.txt}}: {{item.values}}


Engine to Backup, Clean, Restore. Work for Firebase.Firestore, Firebase.Storage, Firebase.Auth
npm i firebase-engine -g
| Name | Short name | Description |
|---|---|---|
| operations | o | backup (b), restore (r) or clean (c). Default: backup |
| path | p | Path to service account JSON file |
| services | s | firestore (f), storage (s), auth (a), can be separated by commas. Default: all |
| backup | b | Path to backup or restore file. Default: ./{$PROJECT_ID + $TIMESTAMP}.backup |
| collections | coll | Apply to Collections (in Firestore service). Default: all, if it is not set |
| buckets | buck | Apply to Buckets (in Storage service). Default: all, if it is not set |
| --nocompress | -nc | Do not use data compression |
| --emulators | -em | Use firebase emulators (work for firestore) |
| Name | Short name | Description |
|---|---|---|
| algorithm | alg | The password hashing information (algorithm, only SCRYPT). Default: SCRYPT |
| base64_signer_key | bsk | The password hashing information (key in base64 encoding). Default: user passwords are not restored if not set. |
| base64_salt_separator | bss | The password hashing information (salt separator in base64). Default: Bw== |
| rounds | rnd | The password hashing information (rounds). Default: 8 |
| mem_cost | mc | The password hashing information (memory cost). Default: 14 |
With full names
firebase-engine operations="clean, restore" path="./test.json" services="firestore, storage" backup="test.backup"
With one bucket
firebase-engine operations="clean" path="./test.json" services="storage" buckets="test.appspott.com"
With collection & subcollection
firebase-engine operations="backup" path="./test.json" services="firestore" collections="authors,books.pages"
With short names and use emulators
firebase-engine o="b, c" s="f" p="./test.json" b="test.backup" -em
With password recovery for users
firebase-engine operations="restore" path="./test.json" services="firestore, auth" backup="test.backup" bsk="nMyNs6sFWp0GZ/JSW2tsNGvGZ70oiv13gxO7ub7rxPwK271P945BiZmjrdsBRbgZmzPPgwATLR6FaXq3rUspVg=="
| Name | Short name | Description |
|---|---|---|
| --to-emulators | -to | Copy data from project to emulators (only firestore) |
| --from-emulators | -from | Copy data from emulators to project (only firestore) |
| path | p | Path to service account JSON file |
With full names
firebase-engine-emulators path="./test.json" --to-emulators
With short names
firebase-engine-emulators p="./test.json" -from
Get your service account key from IAM Open google IAM
Or from the FIREBASE project Open official firebase docs
Firebase API also returns the passwordSalt and passwordHash hashed by the Firebase Auth backend for password users if the user/service account used to generate the request OAuth access token has the firebaseauth.configs.getHashConfig permission. Otherwise the passwordHash and passwordSalt will not be set. Open official firebase docs
I recommend using only the top collection level in the collections parameter. Because you can get shadow document by restoring a subcollection in a non-existent document. To a full database cleanup, including shadow documents, use the command in firebase tools
firebase firestore:delete -r
Apache-2.0


Woo, yet another weak parser implementation.
I'm having a lot of fun porting my old JQuery code to ClojureScript, inspite of my setbacks. It's nothing very exciting though, so I'm going to write about something else today. A few weeks ago I was asked by Corp. CAD IS to have a look at some stuff. The stuff was a zip file containing the accumulated AutoCAD® customization files of an entire firm we acquired recently. The vague task I was given was to "convert" the files to be compatible with the latest version of AutoCAD.
The former firm had a CAD standards document that enumerated some of the tools they had collected, but there wasn't any obvious structure to their collection, or any central entry point. Since they had built a CUIX file I decided that was the best place to find out what they were actually using. In case you didn't know, a CUIX file is really just a zip file full of CUI files (xml), images, and other resource files. The naming convention seems odd, but it aligns with all the OpenOffice convention (doc -> docx, xls -> xlsx, etc. which are also zipped XML files).
I started by just browsing some of the XML, and I noticed an interesting
pattern: most of the command macros had the form roughly:
(if (not c:foo) (load "some.lsp"));foo
which has the effect of demand loading
a lisp file when the user tries to use a command. While I had recently been
using the Python ElementTree XML library to process AutoCAD tool palettes on
another task, for this I just wrote a script to dump any contiguous string
containing ".lsp". I didn't need a parser because I wasn't making modifications
to, or trying to understand the structure of, the CUI files.
I then wrote another script to copy all lisp files in the found list into one directory (used), and report on any missing files, and copy everything else to another (unused). About half of the lisp files they had were not apparently used. There still existed the possibility that the unused lisps were libraries required by the used lisps though.
I decided I needed to have more information about the contents of the lisps, but there were dozens in each folder ranging in length from a few lines to hundreds. I decided that I would just write a script to analyze the contents of all the lisps. First I looked around online for a Python module to either do the parsing for me or at least make building a parser simple. My main problems where that I only wanted specific information, and I didn't need the full parse results. Everything I found was either too complex, or didn't suit my needs.
So I decided to write my own parser. It's only lisp, how hard could it be?
Honestly it wasn't that hard. It probably isn't that good either, but it did what I wanted. I wrote it in a few hours across two days time, while doing other work. In this post I'll just show the tokenizer portion, since the parser (like this post) ran a bit long.
I started out "tokenizing" just by reading a line at a time, doing some text replacements, then splitting on whitespace:
substitutions = (
# Expand quote literal to quote fn
("'(", "(quote "),
# Expand parens with white-space for splitting
(')', ' ) '),
('(', ' ( '),
)
def modify(line):
"""Perform replacements listed in global dictionary."""
for k, v in substitutions:
if k in line:
line = line.replace(k, v)
return line
def tokenize(infile):
"""Cheaty str.split tokenization."""
tokens = list()
# Clean and append all lines into one big string
for line in infile:
# Strip empty lines and comments
line = line.strip()
if not line or line[0] == ';':
continue
# Tokenize the line
tokens.extend([token for token in
# AutoLisp is case-insensitive
modify(line).lower().split()
if token])
return tokens
It was surprisingly fast, and worked well enough on simple examples, but made
garbage out of real code. The problem was that comments don't just appear on
lines by themselves. They can, and in typical Autolisp style usually do, appear
at the ends of lines. The comment character in lisp is the semi-colon ;
, which
is also sometimes used in text. But people also sometimes put text quotes in
comments (especially when commenting out code). What I needed was a more
sophisticated way to pre-process each line to remove all comments.
I built the following function to do the job. Sophisticated would be an over-statement, but it does use one cute trick. There are three cases I want to cover:
- The line is empty or starts with a
;
- skip line - The line is non-empty and has a
;
but no quote - trim tail including;
- The line contains quotes, and one or more
;
- do special stuff
Case 2 can actually also handle quotes on the condition that the last quote is
before the first ;
. For special stuff I first break the line into parts on
each ;
, then starting with the first part collect parts until all quotes are
matched. The trick is given an example line:
(foo "evil;string" "an;other") ; badness
it is broken into
[(foo "evil
, string" "an
, other")
, badness
]. We start with one quote in
the first part, then add two in the second giving 3 (which is not even). As soon
as the number of quotes does become even whatever is left is the comment.
def scrub_comment(line):
"""Carefully clean comments from line."""
if not line or line[0] == ';':
# Just skip blank lines and comments
return
semi = line.find(';')
if semi > 0:
if '"' not in line or line.rfind('"') < semi:
# Keep everything up to but not including semi
line = line[:semi]
else:
# Find left most semi not in a string literal...
parts = line.split(';')
first, rest = parts[0], parts[1:]
accepted = [first]
quotes = 0
while rest:
quotes += first.count('"')
# If we have collected an even number of quotes on left
if quotes%2 == 0:
break
first, rest = rest[0], rest[1:]
accepted.append(first)
# Put back all the semis that belonged there
line = ';'.join(accepted)
return line
def tokenize(infile):
"""Cheaty str.split tokenization."""
tokens = list()
# Clean and append all lines into one big string
for line in infile:
# Modified line filter
line = scrub_comment(line.strip())
if not line:
continue
# Tokenize the line
tokens.extend([token for token in
# AutoLisp is case-insensitive
modify(line).lower().split()
if token])
return tokens
Don't worry, the "parser" implementation has even more wat.


Namespace x2net
Classes
AbstractTcpClient
Abstract base class for TCP/IP client links.
AbstractTcpServer
Abstract base class for TCP/IP server links.
AbstractTcpSession
Abstract base class for TCP/IP link sessions.
AbstractUdpLink
Abstract base class for non-reliable UDP/IP links.
AsyncTcpClient
TCP/IP client link based on the SocketAsyncEventArgs pattern.
AsyncTcpServer
TCP/IP server link based on the SocketAsyncEventArgs pattern.
AsyncTcpSession
TCP/IP link session based on the SocketAsyncEventArgs pattern.
AsyncUdpLink
Non-reliable UDP/IP link based on the SocketAsyncEventArgs pattern.
Binding
Manages evnet-handler bindings.
Binding.Diagnostics
Internal diagnostics helper class.
BlockCipher
A simple example of BufferTransform that performs block encryption and decryption based on the keys exchanged by an asymmetric algorithm.
BlockCipher.Settings
BlockCipher.SettingsBuilder
Buffer
A variable-length byte buffer class whose capacity is limited to a multiple of a power of 2.
BufferTransformSessionStrategy
BufferTransformStack
BufferTransformStrategy
BuiltinEventType
Event type identifiers for built-in events.
Case
Represents a finite set of application logic.
CaseStack
Cell
Common base class for all custom types.
Cell.Tag
Supports light-weight custom type hierarchy for Cell and its subclasses.
ChannelStrategy
Common abstract base class for communication channel strategies.
ChannelStrategy.SubStrategy
ClientKeepaliveStrategy
ClientLink
Common base class for single-session client links.
ConcurrentEventQueue
Unbounded event queue based on .NET 4 concurrent (lock-free) queue.
ConditionalCoroutineHandler<T>
Represents a conditional coroutine method handler.
ConditionalMethodHandler<T>
Represents a conditional generic method handler.
Config
Provides the global configuration properties.
Config.Buffer
Config.Buffer.RoomFactor
Config.Buffer.SizeExponent
Config.Coroutine
Config.Flow
Config.Flow.Logging
Config.Flow.Logging.LongQueue
Config.Flow.Logging.SlowHandler
Config.Flow.Logging.SlowScope
ConstsInfo<T>
Provides the common housekeeping methods for static constants.
Coroutine
Provides the core programming interface for x2 coroutines.
CoroutineHandler<T>
Represents a coroutine method handler.
Deserializer
Binary wire format deserializer.
Event
Common base class for all events.
Event.Tag
Supports light-weight custom type hierarchy for Event and its subclasses.
EventBasedFlow<T>
Abstract base class for event-based (blocking) execution flows.
EventEquivalent
An event proxy to support hash table matching based on equivalence.
EventFactory
Manages a map of retrievable event type identifiers and their factory method delegates.
EventQueue
Abstract base class for blocking event queue implementations.
EventSink
Cleanup helper base class for any event-consuming classes.
Extensions
Extension method holder class.
Fingerprint
Manages a fixed-length compact array of bit values. index ranges over from 0 to length - 1.
Flow
Represents a logically independent execution flow.
FlowStart
A local event enqueued when a flow starts.
FlowStop
A local event enqueued when a flow stops.
FrameBasedFlow<T>
Abstract base class for frame-based (looping) execution flows.
Getopt
Getopt is a clone of the GNU C getopt.
Getopt.Option
Handler
Abstract base class for concrete event handlers.
HandshakeAck
HandshakeReq
HandshakeResp
HeartbeatEvent
x2 subsystem heartbeat event.
HeartbeatStrategy
Common abstract base class for heartbeat strategies.
HeartbeatStrategy.SubStrategy
Link session strategy
Hub
Represents the singleton event distribution bus.
Hub.Case
Represents a hub-scope case that are initialized and terminated along with startup/shutdown of the hub.
Hub.Flows
Represents the set of attached flows for convenient cleanup.
InvalidEncodingException
The exception that is thrown when a data stream is in an invalid format.
Inverse
A trivial example of BufferTransform that just invert every bit.
KeepaliveSessionStrategy
KeepaliveStrategy
Link
Common abstract base class for link cases.
Link.Diagnostics
Link diagnostics helper class.
LinkEventType
LinkHandlePool
LinkSession
Abstract base class for concrete link sessions.
LinkSession.Diagnostics
Link session diagnostics helper class.
LinkSessionConnected
LinkSessionDisconnected
LinkSessionStrategy
Common abstract base class for link session strategies.
LinkStrategy
Common abstract base class for link strategies.
MethodHandler<T>
Represents a generic method handler.
MultiThreadFlow
MultiThreadFlow<T>
OutOfResourceException
The exception that is thrown when there is not enough resource to fulfill the request.
PeriodicEvent
A local periodically recurring event.
Pool<T>
Thread-safe minimal generic object pool.
PriorityQueue<TPriority, TItem>
RangedIntPool
Compact pool of consecutive integer values in a finite range.
ReadLock
Provides a disposable read lock.
Scope
Helps code block scope based cleanup.
SegmentedBuffer
Manages a single large buffer block as if it's a pool of smaller segments.
SegmentPool
Manages a pool of fixed-length (2^n) byte array segments.
SendBuffer
Serializer
Binary wire format serializer.
ServerKeepaliveStrategy
ServerLink
Common base class for multi-session server links.
SessionBasedLink
Common abstract base class for session-based links.
SessionBasedLinkStrategy
Common abstract base class for session-based link strategies.
SignalPool
SimpleCipher
A simple example of BufferTransform that performs block encryption and decryption based on the predefined key.
SimpleCipher.Settings
SingleThreadFlow
SingleThreadFlow<T>
SynchronizedEventQueue
Unbounded event queue based on lock and Monitor Wait/Pulse.
TcpClient
TCP/IP client link based on the Begin/End pattern.
TcpServer
TCP/IP server link based on the Begin/End pattern.
TcpSession
TCP/IP link session based on the Begin/End pattern.
ThreadlessFlow
ThreadlessFlow<Q>
ThreadPoolFlow
ThreadPoolFlow<T>
Time
Utility class to handle time information within a frame-based flow.
TimeFlow
TimeoutEvent
A local timeout event.
Timer
Trace
Represents the tracing helper class.
UdpLink
Non-reliable UDP/IP link based on the Begin/End pattern.
UpgradeableReadLock
Provides a disposable read lock that is upgradable.
WaitForAllEvents
YieldInstruction that waits for all of multiple events.
WaitForAllResponses
YieldInstruction that posts requests and waits for multiple responses.
WaitForAnyEvent
YieldInstruction that waits for any of multiple events.
WaitForAnyResponse
YieldInstruction that posts requests and waits for multiple responses.
WaitForCompletion
YieldInstruction that waits for the completion of another coroutine.
WaitForCompletion<T>
YieldInstruction that waits for the completion of another coroutine with a single additional argument.
WaitForCompletion<T1, T2>
YieldInstruction that waits for the completion of another coroutine with two additional arguments.
WaitForCompletion<T1, T2, T3>
YieldInstruction that waits for the completion of another coroutine with three additional arguments.
WaitForCompletion<T1, T2, T3, T4>
YieldInstruction that waits for the completion of another coroutine with three additional arguments.
WaitForEvent
YieldInstruction that waits for a single event.
WaitForNext
YieldInstruction that waits for the next execution frame.
WaitForResponse
YieldInstruction that posts a request and waits for a single response.
WaitForSeconds
YieldInstruction that waits for the specified time in seconds.
WaitForTask
YieldInstruction that waits for the specified task.
WaitForTask<T>
YieldInstruction that waits for the specified task.
WaitHandlePool
WriteLock
Provides a disposable write lock.
Yield
This thin wrapper of IEnumerator serves as an iterator on which x2 coroutine works.
Structs
Binding.Token
Capo<T>
Provides an offset-based indexer for the underlying IIndexable(T) object.
Hash
Utility struct for hash code generation.
Segment
A reduced form of the ArraySegment(byte) struct, assuming a known constant count value.
Timer.Token
Interfaces
IBufferTransform
Defines methods to be implemented by concrete buffer transforms.
ICase
Defines methods to initialize/finalize a case.
IIndexable<T>
Represents a read-only collection in which each item of type T can be accessed with an integer index.
Enums
CoroutineStatus
Represents coroutine executions status.
TraceLevel
Specifies the trace level.
Delegates
Scope.CleanupHandler
A delegate type for hooking up Dispose notifications.
SessionBasedLink.PreprocessEventHandler
A delegate type for hooking up event proprocess notifications.
TraceHandler
Represents the method that handles trace calls.


Mailbox¶
-
class
O365.mailbox.
Folder
(*, parent=None, con=None, **kwargs)[source]¶ Bases:
O365.utils.utils.ApiComponent
A Mail Folder representation
-
__init__
(*, parent=None, con=None, **kwargs)[source]¶ Object initialization :param protocol: A protocol class or instance to be used with this connection :param main_resource: main_resource to be used in these API comunications :param kwargs: Extra arguments
-
copy_folder
(to_folder)[source]¶ Copy this folder and it’s contents to into another folder :param to_folder: the destination Folder instance or a string folder_id :return The copied folder object
-
create_child_folder
(folder_name)[source]¶ Creates a new child folder :return the new Folder Object or None
-
get_folder
(*, folder_id=None, folder_name=None)[source]¶ Returns a folder by it’s id or name :param folder_id: the folder_id to be retrieved. Can be any folder Id (child or not) :param folder_name: the folder name to be retrieved. Must be a child of this folder.
-
get_folders
(limit=None, *, query=None, order_by=None, batch=None)[source]¶ Returns a list of child folders
Parameters: - limit – limits the result set. Over 999 uses batch.
- query – applies a filter to the request such as “displayName eq ‘HelloFolder’”
- order_by – orders the result set based on this condition
- batch – Returns a custom iterator that retrieves items in batches allowing to retrieve more items than the limit.
-
get_message
(query=None, *, download_attachments=False)[source]¶ A shorcut to get_messages with limit=1
-
get_messages
(limit=25, *, query=None, order_by=None, batch=None, download_attachments=False)[source]¶ Downloads messages from this folder
Parameters: - limit – limits the result set. Over 999 uses batch.
- query – applies a filter to the request such as ‘displayName:HelloFolder’
- order_by – orders the result set based on this condition
- batch – Returns a custom iterator that retrieves items in batches allowing to retrieve more items than the limit. Download_attachments is ignored.
- download_attachments – downloads message attachments
-
get_parent_folder
()[source]¶ Returns the parent folder from attribute self.parent or getting it from the cloud
-
message_constructor
¶ alias of
O365.message.Message
-
move_folder
(to_folder, *, update_parent_if_changed=False)[source]¶ Move this folder to another folder :param to_folder: the destination Folder instance or a string folder_id :param update_parent_if_changed: updates self.parent with the new parent Folder if changed
-
-
class
O365.mailbox.
MailBox
(*, parent=None, con=None, **kwargs)[source]¶ Bases:
O365.mailbox.Folder


Settings
Host (required)
You need to enter your shool host. Like:
myschool.com
No URL, only the domain.
Username (required)
Password (required)
Path (Optional)
Default is:
iserv/plan/show/raw/DSB%20Schueler
Auto Start
Hidden Auto Start
Check for Update
Cancel
Save


Our Team
Sugam Kumar Singh
Team Member
Nishant Singh Yadav
Team Member
Kushal Sinh Vaghela
Team Member
Maulik Bhatnagar
Team Member
Varnit Singh
Team Member
Saurabh Pal
Team Member


BATMAN FOREVER A film review by Mark R. Leeper Copyright 1995 Mark R. Leeper
Capsule: Biff! Pow! Style delivers the inevitable knockout punch to substance in the "Batman" series. Joel Schumacher takes over the directing reins and gives us the poorest film yet in the series. Poorly-constructed scenes total to a story of two thinly-motivated villains warring on a badly-paired new Batman and Robin. Bat guano! Rating: -1 (-4 to +4)
You can tell that a series is transforming to a product when the original creative people start having less and less to do with the new chapters. You get substitute directors and maybe there are substitute actors trying to look like the originals. For BATMAN FOREVER Tim Burton still produces but Joel Schumacher (FLATLINERS) directs and Michael Keaton is replaced by Val Kilmer in the title role. Now don't get me wrong. I am not going to hold up the previous "Batman" films as being anything admirable. The second film did achieve a Fellini-esque bizarreness at times, but neither is really good cinema in any sense. BATMAN FOREVER has a new director and a new star and a new, even thinner feel. The new MTV-generation priorities say that the image on the screen is everything. Intelligence behind that image is as useless as the new rubber nipples on the Batman suit.
As long as something looks good on the screen it doesn't matter any more how much sense it makes or in this case doesn't make. We have two totally nonsensical villains. The slightly better-motivated villain is The Riddler (played by Jim Carrey). His grudge against Bruce Wayne/Batman seems to be that Wayne Industries was not sufficiently interested in his new broadcast entertainment system. I suppose he doesn't like the idea of getting rich all by himself. Harvey Dent (played by Tommy Lee Jones) turned into the villain Two- Face because a baddie threw acid in his face. Batman tried to save him but his bat-reflexes were just instants too slow to protect Dent. The grudge against Batman makes absolutely no sense in either case, but the writers are apparently afraid that better motivation would slow the action. Another new character is Dr. Chase Meridian (Nicole Kidman), supposedly a respected psychologist. Do real psychologists actually call people "wacko?" Do they really psychoanalyze people on the basis of two or three sentences? I doubt it, somehow.  Now Robin may be a wonder of sorts, but he is a bit beyond the "boy" stage. He rides a motorcycle and occasionally needs a shave. Just why someone his age needs a court- appointed guardian is not clear, particularly because the guardian looks to be only about five years his senior. Robin, as comic readers expect, becomes Batman's partner, hiding his identity by choosing a costume that is almost exactly like the one that thousands of people saw him wear as Dick Grayson, circus acrobat. However Robin seems a perfect match in some ways and instantly knows how to operate all the Bat-gear.
The problem with the script is that there is so much that happens with little explanation. This is a film that seems to have been shot from the first draft of a script. Meridian makes a date with Batman, then has second thoughts about dating him and on the date tells him that she is does not want to date him. The message would have been less confusing if she had not waited for Batman in bed and had not met Batman wearing only a sheet. Meeting a man dressed in only a sheet sends signals that are likely to be misinterpreted. While the police and Batman are combing the city for Harvey Dent, the Riddler decides to team up with him and instantly finds him. How? Don't ask questions like "how." One plot situation after another happens with no logic. Even the old 1940s Batman serials had more thought about the logic of their scenes.
Val Kilmer as Bruce Wayne and the Batman seems younger than Michael Keaton. He seems too young for the role, in fact. And he is not the most effective actor one could wish in the role. Admitted neither was Keaton and Kilmer at least has a prominent jawline. Jim Carrey is his usual weird self which makes him much more convincing once he dons the Riddler suit than he was as a mere mortal. His Riddler is a reasonable facsimile of the comic book villain, but his E. Nygma is a bit too much of a Jim Carrey comedy act. Tommy Lee Jones does adequately by Two-Face, but never manages to bring the additional flamboyance to his role that would be needed to stand out from all the noise and the weirdness that is going on.
Visually the style has taken over the film. There just isn't enough cathedral here for all the gargoyles. The skyline of Gotham City, which had an interesting baroque look in BATMAN now has just too many statues and building decorations to be credible--art nouveau ad nauseum. But the worst mistake is to have too many spectacular but incoherent action scenes. Burton's fight scenes have been accused of being unexciting, but at least the viewer knows what Burton is trying to say. Too often you are seeing big objects crashing into other huge thingamabobs and falling into big holes without enough of an idea of why or what is supposed to be happening. Think about it too long and you miss the next big crash. Scenes are choreographed for things to work out too perfectly too much of the time. Objects swing from cables that are just exactly the right length for something else to happen. Even an incredible story needs credible underpinnings and there are just not enough. The real super-villain is The Director who breaks more laws of physics than The Riddler can break laws of Gotham. Visually the effects are generally more believable than the action, though there are some exceptions. The new Batplane looks like a toy, but overall the effects are quite good.
There are certainly times during the endless sequences of senseless action that the film does achieve the feel of the title. Or maybe it is more like BATMAN INTERMINABLE. But I think for me that a better title would be BATMAN NEVER AGAIN. This film gets a -1 on the -4 to +4 scale.
Mark R. Leeper<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Philosophy
Gluonjs is designed for developers who like to work with vanilla web components and platform-based tools. It takes care of most boilerplate when writing native web components, allowing you to focus more on the content, and write leaner code.
Gluonjs is
- Designed to work like native web components. No library-specific semantics
- Super lightweight. Only 1.8Kb unzipped
- So fast it's silly. Easily the fastest component library out there
- Compatible with everything. Adheres to web component standards
- Easy to install and deploy. Use Bower, NPM, or just download the zip
Gluonjs is great for
- Developers who like to work with standards
- Quick prototypes
- Internal projects
- Highly portable components
- Websites that don't care about IE
Features
The main feature of Gluonjs is simplicity. A minimal element definition with Gluonjs is exactly like using native web components.
On top of that, it adds a few useful features that solve common issues with web components.
Template stamping
When your web component requires a template, all you need to do is set the static _source
property on your element. Gluonjs will prepare the template for your element, and stamp it to the Shadow DOM of each instance.
Element lookup map
Gluonjs automatically creates this.$
which maps all elements in the template with an ID.
URL resolver
Easily resolve URLs relative to your element's source with this.resolveUrl()
.
Browser support
Gluonjs is supported by all evergreen browsers. To keep the codebase lean and fast, IE is not supported.
| IE |
Edge |
Chrome |
Firefox |
Safari |
| ✗ |
✔* |
✔ |
✔* |
✔* |
*With web component polyfill


Huck Fairman Reveal
About
Close
I am Concerned
about our Planet
Huck Fairman is
a Princeton
based
poet
and
novelist
worried
We are now face to face with a crucial point in the history of our planet and the future of civilization. We have no alternative but immediate and drastic action to save civilization.


com.lkdz.lib.rfwirelessmoduleprotocol
类
Request
Request.Builder
Response
Response.MeterTime
Response.MeterValue
注释类型
Request.Frequency
Request.Operation
Response.ValveState


title=Bootiful Livelessons date=2013-04-02 type=page status=published ~~~~~~
I've got a number of videos available on Safari. These videos are available a la carte or (I feel preferably) as part of the all-you-can-eat buffet-style monthly subscription.
Click on the video title to be taken to the video's page.


Comments
-
Greg Hurrell
Can you please tell me where the broken download link is? It must be on an old page somewhere and I'd like to fix it.
If I recall correctly, the
Info.plist
is for informative purposes only (ie. it says who the author of the button set was etc) but it's not strictly required so you can just ignore or remove that.As for the rest of the set, it is probably a better idea to rename your modified set so that it doesn't have the same name as the original. It may be that the original is installed (at
~/Library/Application Support/Synergy/Button Sets/reflex.synergyButtons
) and when you double-click your modified set to install it, the original is not getting replaced because Synergy believes it is already installed.To avoid confusion, you should just be able to pick a new name (eg.
reflex2.synergyButtons
or whatever) and double-click it to install it in theButton Sets
folder mentioned above, and Synergy should switch to show your new set immediately.
Add a comment
Comments are now closed for this issue.


08 546 308 10
<EMAIL_ADDRESS>Svenska
MENU
HOME
ROOMS
ALL ROOMS
Single Room
Studio Room
Studio Extra
Double Room
Family Room
APARTMENTS
ALL APARTMENTS
The loft
Etageapartments
STHLM Apartments...
ABOUT US
About us
Contact
FAQ
LOCATION
BOOK NOW
Contact
Home
Contact
Contact Us
Name
Phone nr
E-mail
Subject
Message
Send Message
Contact Info
ADDRESS:
Sollentunavägen 133, 191 44 Sollentuna
E-mail:
<EMAIL_ADDRESS>WEBSITE:
www.ettsmart.se
Phone:
08 546 308 10


SANLOCK
Section: Maintenance Commands (8)Updated: 2011-08-05
Index Return to Main Contents
NAME
sanlock - shared storage lock managerSYNOPSIS
sanlock [COMMAND] [ACTION] ...DESCRIPTION
The sanlock daemon manages leases for applications running on a cluster of hosts with shared storage. All lease management and coordination is done through reading and writing blocks on the shared storage. Two types of leases are used, each based on a different algorithm:
"delta leases" are slow to acquire and require regular i/o to shared storage. A delta lease exists in a single sector of storage. Acquiring a delta lease involves reads and writes to that sector separated by specific delays. Once acquired, a lease must be renewed by updating a timestamp in the sector regularly. sanlock uses a delta lease internally to hold a lease on a host_id. host_id leases prevent two hosts from using the same host_id and provide basic host liveness information based on the renewals.
"paxos leases" are generally fast to acquire and sanlock makes them available to applications as general purpose resource leases. A paxos lease exists in 1MB of shared storage (8MB for 4k sectors). Acquiring a paxos lease involves reads and writes to max_hosts (2000) sectors in a specific sequence specified by the Disk Paxos algorithm. paxos leases use host_id's internally to indicate the owner of the lease, and the algorithm fails if different hosts use the same host_id. So, delta leases provide the unique host_id's used in paxos leases. paxos leases also refer to delta leases to check if a host_id is alive.
Before sanlock can be used, the user must assign each host a host_id, which is a number between 1 and 2000. Two hosts should not be given the same host_id (even though delta leases attempt to detect this mistake.)
sanlock views a pool of storage as a "lockspace". Each distinct pool of storage, e.g. from different sources, would typically be defined as a separate lockspace, with a unique lockspace name.
Part of this storage space must be reserved and initialized for sanlock to store delta leases. Each host that wants to use the lockspace must first acquire a delta lease on its host_id number within the lockspace. (See the add_lockspace action/api.) The space required for 2000 delta leases in the lockspace (for 2000 possible host_id's) is 1MB (8MB for 4k sectors). (This is the same size required for a single paxos lease.)
More storage space must be reserved and initialized for paxos leases, according to the needs of the applications using sanlock.
The following steps illustrate these concepts using the command line. Applications may choose to do these same steps through libsanlock.
1. Create storage pools and reserve and initialize host_id leases
two different LUNs on a SAN: /dev/sdb, /dev/sdc
# vgcreate pool1 /dev/sdb
# vgcreate pool2 /dev/sdc
# lvcreate -n hostid_leases -L 1MB pool1
# lvcreate -n hostid_leases -L 1MB pool2
# sanlock direct init -s LS1:0:/dev/pool1/hostid_leases:0
# sanlock direct init -s LS2:0:/dev/pool2/hostid_leases:0
2. Start the sanlock daemon on each host
# sanlock daemon
3. Add each lockspace to be used
host1:
# sanlock client add_lockspace -s LS1:1:/dev/pool1/hostid_leases:0
# sanlock client add_lockspace -s LS2:1:/dev/pool2/hostid_leases:0
host2:
# sanlock client add_lockspace -s LS1:2:/dev/pool1/hostid_leases:0
# sanlock client add_lockspace -s LS2:2:/dev/pool2/hostid_leases:0
4. Applications can now reserve/initialize space for resource leases, and then acquire the leases as they need to access the resources.
The resource leases that are created and how they are used depends on the application. For example, say application A, running on host1 and host2, needs to synchronize access to data it stores on /dev/pool1/Adata. A could use a resource lease as follows:
5. Reserve and initialize a single resource lease for Adata
# lvcreate -n Adata_lease -L 1MB pool1
# sanlock direct init -r LS1:Adata:/dev/pool1/Adata_lease:0
6. Acquire the lease from the app using libsanlock (see sanlock_register,
sanlock_acquire). If the app is already running as pid 123, and has
registered with the sanlock daemon, the lease can be added for it
manually.
# sanlock client acquire -r LS1:Adata:/dev/pool1/Adata_lease:0 -p 123
offsets
offsets must be 1MB aligned for disks with 512 byte sectors, and 8MB aligned for disks with 4096 byte sectors.
offsets may be used to place leases on the same device rather than using
separate devices and offset 0 as shown in examples above, e.g. these
commands above:
# sanlock direct init -s LS1:0:/dev/pool1/hostid_leases:0
# sanlock direct init -r LS1:Adata:/dev/pool1/Adata_lease:0
could be replaced by:
# sanlock direct init -s LS1:0:/dev/pool1/leases:0
# sanlock direct init -r LS1:Adata:/dev/pool1/leases:1048576
failures
If a process holding resource leases fails or exits without releasing its leases, sanlock will release the leases for it automatically.
If the sanlock daemon cannot renew a lockspace host_id for a specific period of time (usually because storage access is lost), sanlock will kill any process holding a resource lease within the lockspace.
If the sanlock daemon crashes or gets stuck, it will no longer renew the expiry time of its per-host_id connections to the wdmd daemon, and the watchdog device will reset the host.
watchdog
sanlock uses the wdmd(8) daemon to access /dev/watchdog. A separate wdmd connection is maintained with wdmd for each host_id being renewed. Each host_id connection has an expiry time for some seconds in the future. After each successful host_id renewal, sanlock updates the associated expiry time in wdmd. If wdmd finds any connection expired, it will not pet /dev/watchdog. After enough successive expired/failed checks, the watchdog device will fire and reset the host.
After a number of failed attempts to renew a host_id, sanlock kills any process using that lockspace. Once all those processes have exited, sanlock will unregister the associated wdmd connection. wdmd will no longer find the expired connection, and will resume petting /dev/watchdog (assuming it finds no other failed/expired tests.) If the killed processes did not exit quickly enough, the expired wdmd connection will not be unregistered, and /dev/watchdog will reset the host.
Based on these known timeout values, sanlock on another host can calculate, based on the last host_id renewal, when the failed host will have been reset by its watchdog (or killed all the necessary processes).
If the sanlock daemon itself fails, crashes, get stuck, it will no longer update the expiry time for its host_id connections to wdmd, which will also lead to the watchdog resetting the host.
safety
sanlock leases are meant to guarantee that two process on two hosts are never allowed to hold the same resource lease at once. If they were, the resource being protected may be corrupted. There are three levels of protection built into sanlock itself:
1. The paxos leases and delta leases themselves.
2. If the leases cannot function because storage access is lost (host_id's cannot be renewed), the sanlock daemon kills any pids using resource leases in the lockspace.
3. If the pids do not exit after being killed, or if the sanlock daemon fails, the watchdog device resets the host.
OPTIONS
COMMAND can be one of three primary top level choices
sanlock daemon start daemon
sanlock client send request to daemon (default command if none given)
sanlock direct access storage directly (no coordination with daemon)
sanlock daemon [options]
-D no fork and print all logging to stderr
-Q 0|1 quiet error messages for common lock contention
-R 0|1 renewal debugging, log debug info for each renewal
-L pri write logging at priority level and up to logfile (-1 none)
-S pri write logging at priority level and up to syslog (-1 none)
-U uid user id
-G gid group id
-t num max worker threads
-w 0|1 use watchdog through wdmd
-h 0|1 use high priority features (realtime scheduling, mlockall)
-a 0|1 use async i/o
-o sec io timeout in seconds
sanlock client action [options]
sanlock client status
Print processes, lockspaces, and resources being manged by the sanlock daemon. Add -D to show extra internal daemon status for debugging. Add -o p to show resources by pid, or -o s to show resources by lockspace.
sanlock client host_status -s LOCKSPACE
Print state of host_id delta leases read during the last renewal. Only lockspace_name is used from the LOCKSPACE argument. Add -D to show extra internal daemon status for debugging.
sanlock client log_dump
Print the sanlock daemon internal debug log.
sanlock client shutdown
Ask the sanlock daemon to exit. Without the force option (-f 0), the command will be ignored if any lockspaces exist. With the force option (-f 1), any registered processes will be killed, their resource leases released, and lockspaces removed.
sanlock client init -s LOCKSPACE
sanlock client init -r RESOURCE
Tell the sanlock daemon to initialize storage for lease areas. (See sanlock direct init.)
sanlock client align -s LOCKSPACE
Tell the sanlock daemon to report the required lease alignment for a storage path. Only path is used from the LOCKSPACE argument.
sanlock client add_lockspace -s LOCKSPACE
Tell the sanlock daemon to acquire the specified host_id in the lockspace. This will allow resources to be acquired in the lockspace.
sanlock client inq_lockspace -s LOCKSPACE
Ask to the sanlock daemon weather the lockspace is acquired or not.
sanlock client rem_lockspace -s LOCKSPACE
Tell the sanlock daemon to release the specified host_id in the lockspace. Any processes holding resource leases in this lockspace will be killed, and the resource leases not released.
sanlock client command -r RESOURCE -c path args
Register with the sanlock daemon, acquire the specified resource lease, and exec the command at path with args. When the command exits, the sanlock daemon will release the lease. -c must be the final option.
sanlock client acquire -r RESOURCE -p pid
sanlock client release -r RESOURCE -p pid
Tell the sanlock daemon to acquire or release the specified resource lease for the given pid. The pid must be registered with the sanlock daemon. acquire can optionally take a versioned RESOURCE string RESOURCE:lver, where lver is the version of the lease that must be acquired, or fail.
sanlock client inquire -p pid
Print the resource leases held the given pid. The format is a versioned RESOURCE string "RESOURCE:lver" where lver is the version of the lease held.
sanlock client request -r RESOURCE -f force_mode
Request the owner of a resource do something specified by force_mode. A versioned RESOURCE:lver string must be used with a greater version than is presently held. Zero lver and force_mode clears the request.
sanlock client examine -r RESOURCE
Examine the request record for the currently held resource lease and carry out the action specified by the requested force_mode.
sanlock client examine -s LOCKSPACE
Examine requests for all resource leases currently held in the named lockspace. Only lockspace_name is used from the LOCKSPACE argument.
sanlock direct action [options]
-a 0|1 use async i/o
-o sec io timeout in seconds
sanlock direct init -s LOCKSPACE
sanlock direct init -r RESOURCE
Initialize storage for 2000 host_id (delta) leases for the given lockspace, or initialize storage for one resource (paxos) lease. Both options require 1MB of space. The host_id in the LOCKSPACE string is not relevant to initialization, so the value is ignored. (The default of 2000 host_ids can be changed for special cases using the -n num_hosts and -m max_hosts options.)
sanlock direct read_leader -s LOCKSPACE
sanlock direct read_leader -r RESOURCE
Read a leader record from disk and print the fields. The leader record is the single sector of a delta lease, or the first sector of a paxos lease.
sanlock direct read_id -s LOCKSPACE
sanlock direct live_id -s LOCKSPACE
read_id reads a host_id and prints the owner. live_id reads a host_id once a second until it the timestamp or owner change (prints live 1), or until host_dead_seconds (prints live 0). (host_dead_seconds is derived from the io_timeout option. The live 0|1 conclusion will not match the sanlock daemon's conclusion unless the configured timeouts match.)
sanlock direct dump path[:offset]
Read disk sectors and print leader records for delta or paxos leases. Add -f 1 to print the request record values for paxos leases, and host_ids set in delta lease bitmaps.
LOCKSPACE option string
-s lockspace_name:host_id:path:offset
lockspace_name name of lockspace
host_id local host identifier in lockspace
path path to storage reserved for leases
offset offset on path (bytes)
RESOURCE option string
-r lockspace_name:resource_name:path:offset
lockspace_name name of lockspace
resource_name name of resource
path path to storage reserved for leases
offset offset on path (bytes)
RESOURCE option string with version
-r lockspace_name:resource_name:path:offset:lver lver leader version or SH for shared lease
Defaults
sanlock help shows the default values for the options above.
sanlock version shows the build version.
USAGE
Request/Examine
The first part of making a request for a resource is writing the request record of the resource (the sector following the leader record). To make a successful request:
- *
- RESOURCE:lver must be greater than the lver presently held by the other host. This implies the leader record must be read to discover the lver, prior to making a request.
- *
- RESOURCE:lver must be greater than or equal to the lver presently written to the request record. Two hosts may write a new request at the same time for the same lver, in which case both would succeed, but the force_mode from the last would win.
- *
- The force_mode must be greater than zero.
- *
- To unconditionally clear the request record (set both lver and force_mode to 0), make request with RESOURCE:0 and force_mode 0.
The owner of the requested resource will not know of the request unless it is explicitly told to examine its resources via the "examine" api/command, or otherwise notfied.
The second part of making a request is notifying the resource lease owner that it should examine the request records of its resource leases. The notification will cause the lease owner to automatically run the equivalent of "sanlock client examine -s LOCKSPACE" for the lockspace of the requested resource.
The notification is made using a bitmap in each host_id delta lease. Each bit represents each of the possible host_ids (1-2000). If host A wants to notify host B to examine its resources, A sets the bit in its own bitmap that corresponds to the host_id of B. When B next renews its delta lease, it reads the delta leases for all hosts and checks each bitmap to see if its own host_id has been set. It finds the bit for its own host_id set in A's bitmap, and examines its resource request records. (The bit remains set in A's bitmap for request_finish_seconds.)
force_mode determines the action the resource lease owner should take:
1 (KILL_PID): kill the process holding the resource lease. When the process has exited, the resource lease will be released, and can then be acquired by anyone.
SEE ALSO
wdmd(8)
Index
This document was created by man2html, using the manual pages.
Time: 05:34:29 GMT, December 24, 2015


THE GOVERNESS A movie review by Joe Barlow (c) Copyright 1998
STARRING: Minnie Driver, Tom Wilkinson, Florence Hoath DIRECTOR: Sandra Goldbacher WRITER: Sandra Goldbacher RATED: R (for nudity and adult situations) YEAR: 1998 SEEN AT: The Studio, Raleigh NC
RATING: *** 1/2 (out of a possible *****)
Sandra Goldbacher's "The Governess" is, like Minnie Driver herself, a creation of uncommon beauty. Every frame of the film shimmers with color and exquisite visuals, thanks to Ashley Rowe's incredible cinematography and keen eye for detail. The lovely score from Edward Shearmur finds the proper tone for every scene, never once intruding into the dialogue or serving as a phony emotional cue (ie, "This is a sad moment, so we'll beat you over the head with weepy violins now.") Even if it contained nothing but these items, the movie would still be worth a peek.
Fortunately for us, it also contains one of the year's best performances. Rosina da Silva (Ms. Driver) is the educated, spirited daughter of a wealthy Jewish merchant, living with her family in one of London's Sephardic communities during the early nineteenth century. Although content with life, Rosina sometimes feels constrained by the demands imposed on her by Victorian etiquette ("Try not to look so tall, dear," frets her mother). Although she has no training, she dreams of one day leaving home to become an actress, exposing her soul on the stage for all the world to see.
Her dream soon becomes reality, though not in the way she'd hoped. After her father passes away unexpectedly, the family finds itself in desperate need of money. Rosina, the eldest daughter, decides to look for a domestic service job to help the family struggle by, and she eventually receives an offer to act as governess to young Christina Cavendish (Florence Hoath) at the Cavendish family home in Scotland. The only catch: the devoutly Christian Cavendishs don't know that Rosina is Jewish; if they did, she'd never be allowed to work for them. Needing the job, Rosina buries her heritage and invents a Gentile persona named Mary Blackchurch. If questioned about her heritage, she plans to tell her employers that her olive skin is the result of the (fictional) Italian blood she received from her mother's side of the family. Thus begins Rosina's acting career... though it's far from what she originally had in mind.
After arriving at the Cavendish home, Mary quickly becomes enamored with her employer, Charles (Tom Wilkinson, last seen as the grumpy foreman in "The Full Monty"). Highly intelligent, and charming in his own fumbling way, Charles is working in an exciting new field known as "photography," though he has not yet figured out how to keep an image from fading mere moments after the picture is developed. Rosina/Mary, possessing an extensive knowledge of chemistry, begins to assist him in his work. Soon a strong bond forms between them, the ramifications of which will change both of them forever.
As usual, Minnie Driver devours her role, acting with such skill and charisma that I forgot about everything in the world except the story I was watching. I wasn't looking at a movie screen; I was gazing through a window into the nineteenth century, watching a beautiful, intelligent young woman trying to sort out her own tormented emotions. Ms. Driver was nominated for "Best Supporting Actress" for her work in last year's "Good Will Hunting," though the award ultimately went to Kim Basinger ("LA Confidential"). I predict another Oscar nomination, and quite possibly a win, for her performance in "The Governess."
The material could have been approached in a number of ways: as a Great Statement about prejudice, a commentary on nineteenth-century social classes, a depiction of the maternal relationship Rosina/Mary develops with young Christina, a journey of female self-discovery, a steamy historical romance, etc. Director Sandra Goldbacher, however, has chosen to include ALL these things in her film. It's both the movie's strength and biggest hindrance.
Quite simply, there's a little too much story contained in "The Governess"; at its conclusion, we're left with as many questions as answers. In particular, the final scene is maddeningly vague, and we're left to ponder its meaning as the end credits roll. It's not a fatal flaw; the film still resonates with enough simple truth that it can't be derailed so easily, but the less interesting subplots (such as the ones involving Charles' son Henry) do cause the pace to drag from time to time.
One other (admittedly petty) thing concerned me: why does Rosina/Mary need to go to Scotland for a job? Is no one in London hiring? Or England, for that matter? There may well be a good reason for this; my knowledge of Victorian Europe is basically non-existant, but the question nagged at me while watching the film. If the script hadn't made it so clear that Rosina was uncomfortable about taking a job so far away from her family, I would've simply chalked it up to her spirit of adventure.
With that said, "The Governess" remains a film of rare beauty. Its wonderful acting, cinematography and music place it a notch above the usual historical costume drama. Only an overly long running time and a slightly unfocused script detract from its visual elegance. This is a fine debut; if Sandra Goldbacher can learn to prune her future work a bit more liberally while keeping her direction and photography at this level, she could very well emerge as one of Europe's most interesting female directors.
E-Mail<EMAIL_ADDRESS>Joe Barlow on Film: http://www.ipass.net/~jbarlow/film.htm
If you'd like to receive new film reviews by e-mail, please write to the above address and ask to be put on my mailing list.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% load static %}
Add book
{% csrf_token %}
Title:
Description:
What this book is about
Add
ID
Name
Action
{% for book in bookz %}
{{ book.id }}
{{ book.title }}
View
{% endfor %}


Thousands of Brits fall for fake Morrisons page trying to steal their details
The fake page is promising free £50 vouchers and thousands of Brits are sharing it on Facebook - but it is nothing to do with Morrisons and the supermarket is warning customers to steer clear
by James Andrews, Paige Freshwater, http://www.facebook.com/jameswritesmoney/A fake Facebook page pretending to be the supermarket Morrisons has been shared by thousands of Brits on social media.
The convincing page - calling itself "Morrisons UK" - promises people vouchers if they like and share it.
"We're informing every customer that, To celebrate our anniversary, Each person who shares & Comment below will receive FREE £50 Voucher from us," the fake page reads.
It then asks people to validate their entry on a separate website.
At the time of writing, it's had almost 7,000 shares while more than 2,500 people currently like it.
But it's nothing to do with the actual supermarket Morrisons - whose real Facebook page doesn't have "UK" on the end and does have a blue tick to show it's verified.
"This is a scam nothing to do with Morrisons," the supermarket said when asked about the fake page on Twitter.
Some Facebook users have taken matters into their own hands, replying to people who appear to be taken in by the fake page.
Some posted flashing messages reading "Fraud alert" while others have been more blunt - letting people who have shared the message know they're promoting scammers.
In the past, Morrisons has made its position on voucher giveaways very clear.
"We would never ask for your personal details in order to redeem a voucher," it said talking about a past scam.
"If you believe you have been contacted please contact us on 0345 611 6111 or call Action Fraud on 0300 123 2040.
"You can also visit www.actionfraud.police.uk to report fraudulent activity to the authorities."


Parameter Grid
The Parameter Grid provides the user with option to edit/add new parameters to the job.
All the parameters that have been created or used in the job within component properties, get displayed in the parameter grid. The user can add additional parameters using the add(+) button on the parameter grid
The parameter grid displays the name of the parameters and allows user to edit/add values to them. Parameter names present in the job appear disabled for delete operation. If a parameter is not in use within the job components, option to delete it gets enabled. Also, additional parameters added using the grid add(+) option appear enabled for delete as long as they are not used in the job.
On saving the job, the parameters are saved into a properties file that get saved under the "param" folder
For same parameters defined in multiple parameter files, the lower most file will be given precendence over others. Use up or down arrow to change the preference of parameter file
User can also import a properties file browsing the file system into the parameter grid.
Option to edit the Parameter Grid is present in the tool bar. Also, the Parameter grid opens up when user runs the job using the Run button.


Useful tutorials for developing a feel for some of scikit-learn's applications in the machine learning field.
Glossary
The main documentation. This contains an in-depth description of all algorithms and how to apply them.
API
The exact API of all functions and classes, as given by the docstrings. The API documents expected types and allowed features for all functions, and all parameters available for the algorithms.
Development
Information on how to contribute. This also contains useful information for advanced users, for example how to build their own estimators.
FAQ
Frequently asked questions about the project and contributing.
Related packages
Other machine learning packages for Python and related projects. Also algorithms that are slightly out of scope or not well established enough for scikit-learn.


As a wife and a mother, my family always comes first but whenever, i have time for myself i am always thinking about improving my knowledge in so many different topics. Recently i have enrolled in a coding bootcamp through UCONN in Full-Stack development. It has been very challenging yet, very rewarding.
As an English Literature and History Major, this could not be more challenging for me to learn, but i am very eager and i am surprised that i have been looking foreward to classes and sitting by myself and just browsing and trying different things for myself.


Pending Leave Approval
Upcoming Birthday
Empty Alert
Document Not Submitted
Job Opening
Attandance Not Mark


http://j.mp/gitterC - use github USERID and visit chat-room and say “hello!” and greet everyone else
Complete the below problems using pointer variables instead of indexing or other approaches.


Hello, my name is Stefan, I am 3rd year Beng Computing (Hons) student at Edinburgh Napier University, school of Computing, city of Edinburgh.
The purpose of this web app is purely educational, to explore Flask-microframe by creating basic CRUD functionality and experience the server-side.


Tools
Navigation with Mouse/Keyboard
-
SHIFT + Drag the mouse to zoom in
-
SHIFT + CTRL + Drag the mouse to zoom out
-
SHIFT + Click to recenter
-
Double Click to Center and Zoom in
-
Use arrow keys to pan
-
Right Click on the map to get coordinates
Editor
-
To start Editing: a editable Layer has to be checked in the Layerlist
-
To create features: click a template then start drawing on the map
-
To move features: click and drag the feature to a new location
-
To edit features: click the feature to display the vertices and the attributes


This cookbook provides a means to enable apparmor and load your own profiles
Ubuntu 12.04 is the only tested platform, but it may work on other Ubuntu versions and Debian. Reports of success or failure are appreciated.
If all you want to do is enable apparmor with the stock Ubuntu profiles, include apparmor
in your node's run_list
:
{
"run_list": [
"recipe[apparmor::default]"
]
}
This definition is used to load your own apparmor profile.
name
- Name of the apparmor profile. Apparmor requires the name be the path of the executable to be confined, with the / replaced by ..restart_service
- Optional name of a service to restart after the profile is loaded. Defaults to nothing,source
- Source for the apparmor profile file. Defaults to name
.cookbook
- Cookbook that the source
is in. Defaults to the cookbook you use the definition in.If you have a profile in files/default/usr.bin.httpd in your cookbook, and you want to restart httpd after it is applied:
apparmor_profile 'usr.sbin.httpd' do
restart_service 'httpd'
end
add-new-recipe
)Author:: Brian Pitts ()
Copyright 2014, Lonely Planet
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


The Raspberry Pi is a small single-board computer that is fairly cheap and easily accessible from anywhere.
We currently use the Pi for a variety of projects on Pino, as it takes little power, and seems to be resistant to corrosion. Our Pi Computers(the Computer are currently used only as experimental development tools, but could readily be turned into a complete development platform, would our principal computers fail.
Download Raspbian Lite, and with Etcher flash the SD card. Once Etcher has finished, re-insert it and type:
touch /Volumes/boot/ssh # Enable SSH touch /Volumes/boot/wpa_supplicant.conf # Auto-connect to wifi nano /Volumes/boot/wpa_supplicant.conf
Edit wpa_supplicant.conf
country=CA ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="network_name" psk="network_password" }
Connect to the Pi
ping raspberrypi.local # Find its IP address ssh<EMAIL_ADDRESS># Use password "raspberry" sudo raspi-config # Interface/SSH & Advanced/Expand FS sudo nano /etc/hostname # Rename sudo nano /etc/hosts # Rename passwd # Change Password sudo reboot
Update everything
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade
dtoverlay=dwc2 # Append in config.txt modules-load=dwc2,g_ether # Append in cmdline.txt, or after rootwait
If you enjoy our content...
Support Us On Patreon


{% extends "horizon/common/_modal_form.html" %} {% load i18n %} {% block modal-body-right %}
{% trans "From here you can modify name, description, extra specs and visibility of a share type." %}
Extra specs field:
{% trans "Here can be modified extra-specs for share type." %}
{% trans "One line - one action. Empty strings will be ignored." %}
{% trans "To add extra-specs use:" %}
key=value{% trans "To unset extra-specs use:" %}
key{% trans "All pairs that are in field for left are set for this share type." %} {% trans "Extra spec 'driver_handles_share_servers' is required and should have boolean value." %}


1. Create a function to reverse any word that you type in.
2. Create a function that takes an input number, and prints a table with the first 20 multiples of the number, in order 5x4.


{% extends 'base.html' %} {% block content %} Edit Organization Edit the organization in this page Edit Organization {{form.csrf_token}} {{form.description(class_="textarea", placeholder="About the org")}} {{form.photo(class_="file-input")}} Upload Org Photo Select File Submit {% endblock %}


The [@@iterator]()
method returns a new Iterator
object that iterates over the code points of a String value, returning each code point as a String value.
string[Symbol.iterator]
[@@iterator]()
var string = 'A\uD835\uDC68'; var strIter = string[Symbol.iterator](); console.log(strIter.next().value); // "A" console.log(strIter.next().value); // "\uD835\uDC68"
[@@iterator]()
with for..of
var string = 'A\uD835\uDC68B\uD835\uDC69C\uD835\uDC6A'; for (var v of string) { console.log(v); } // "A" // "\uD835\uDC68" // "B" // "\uD835\uDC69" // "C" // "\uD835\uDC6A"
[1] From Gecko 17 (Firefox 17 / Thunderbird 17 / SeaMonkey 2.14) to Gecko 26 (Firefox 26 / Thunderbird 26 / SeaMonkey 2.23 / Firefox OS 1.2) the iterator
property was used (bug 907077), and from Gecko 27 to Gecko 35 the "@@iterator"
placeholder was used. In Gecko 36 (Firefox 36 / Thunderbird 36 / SeaMonkey 2.33), the @@iterator
symbol got implemented (bug 918828).
Created by Mozilla Contributors, license: CC-BY-SA 2.5


The characteristics that influence more in the victory are: Hero Damage, Siege Damage, Healing, Highest Kill Streak.
There is a relationship between the teams focused on the aggressive game and the number of mercenary camps they did, where teams with Hero Damage are more likely to win if those camps are held.
An aggressive game pattern was found by the players who usually play in the afternoon, can be seen in the Horizon Chart by sliding halfway on any day.
Finally since the departure of the new hero Garrosh the metagame changed to a more passive game oriented to the sustenance of the heroes (Self Healing, Damage Taken) where games are usually defined by who opted for a game more linked to endurance of damage.


# -*- coding: utf-8 -*-
r""" Manipulate posteriors of Bernoulli/Beta experiments.
Rewards not in :math:`{0, 1}` are handled with a trick, see :func:`bernoulliBinarization`, with a "random binarization", cf., [Agrawal12]_ (algorithm 2).
When reward :math:`r_t \in [0, 1]` is observed, the player receives the result of a Bernoulli sample of average :math:`r_t`: :math:`r_t \sim \mathrm{Bernoulli}(r_t)` so it is well in :math:`{0, 1}`.
- See https://en.wikipedia.org/wiki/Bernoulli_distribution#Related_distributions
- And https://en.wikipedia.org/wiki/Conjugate_prior#Discrete_distributions
.. [Agrawal12] http://jmlr.org/proceedings/papers/v23/agrawal12/agrawal12.pdf
"""
from __future__ import division, print_function # Python 2 compatibility
__author__ = "Olivier Cappé, Aurélien Garivier, Emilie Kaufmann, Lilian Besson"
__version__ = "0.9"
from random import random
try:
from numpy.random import beta as betavariate # Faster! Yes!
except ImportError:
from random import betavariate
from scipy.special import btdtri
# Local imports
try:
from .Posterior import Posterior
from .with_proba import with_proba
except (ImportError, SystemError):
from Posterior import Posterior
from with_proba import with_proba
# --- Utility functions
[docs]def bernoulliBinarization(r_t):
r""" Return a (random) binarization of a reward :math:`r_t`, in the continuous interval :math:`[0, 1]` as an observation in discrete :math:`{0, 1}`.
- Useful to allow to use a Beta posterior for non-Bernoulli experiments,
- That way, :class:`Thompson` sampling can be used for any continuous-valued bounded rewards.
Examples:
>>> import random
>>> random.seed(0)
>>> bernoulliBinarization(0.3)
1
>>> bernoulliBinarization(0.3)
0
>>> bernoulliBinarization(0.3)
0
>>> bernoulliBinarization(0.3)
0
>>> bernoulliBinarization(0.9)
1
>>> bernoulliBinarization(0.9)
1
>>> bernoulliBinarization(0.9)
1
>>> bernoulliBinarization(0.9)
0
"""
if r_t == 0:
return 0 # Returns a int!
elif r_t == 1:
return 1 # Returns a int!
else:
assert 0 <= r_t <= 1, "Error: only bounded rewards in [0, 1] are supported by this Beta posterior right now."
return int(with_proba(r_t))
# --- Class
[docs]class Beta(Posterior):
""" Manipulate posteriors of Bernoulli/Beta experiments."""
[docs] def __init__(self, a=1, b=1):
r""" Create a Beta posterior :math:`\mathrm{Beta}(\alpha, \beta)` with no observation, i.e., :math:`\alpha = 1` and :math:`\beta = 1` by default."""
assert a >= 0, "Error: parameter 'a' for Beta posterior has to be >= 0." # DEBUG
self._a = a
assert b >= 0, "Error: parameter 'b' for Beta posterior has to be >= 0." # DEBUG
self._b = b
self.N = [a, b] #: List of two parameters [a, b]
[docs] def __str__(self):
return r"Beta(\alpha={:.3g}, \beta={:.3g})".format(self.N[1], self.N[0])
[docs] def reset(self, a=None, b=None):
"""Reset alpha and beta, both to 1 as when creating a new default Beta."""
if a is None:
a = self._a
if b is None:
b = self._b
self.N = [a, b]
[docs] def sample(self):
"""Get a random sample from the Beta posterior (using :func:`numpy.random.betavariate`).
- Used only by :class:`Thompson` Sampling and :class:`AdBandits` so far.
"""
return betavariate(self.N[1], self.N[0])
[docs] def quantile(self, p):
"""Return the p quantile of the Beta posterior (using :func:`scipy.stats.btdtri`).
- Used only by :class:`BayesUCB` and :class:`AdBandits` so far.
"""
return btdtri(self.N[1], self.N[0], p)
# Bug: do not call btdtri with (0.5,0.5,0.5) in scipy version < 0.9 (old)
[docs] def mean(self):
"""Compute the mean of the Beta posterior (should be useless)."""
return self.N[1] / float(sum(self.N))
[docs] def forget(self, obs):
"""Forget the last observation."""
# print("Info: calling Beta.forget() with obs = {} ...".format(obs)) # DEBUG
# FIXED update this code, to accept obs that are FLOAT in [0, 1] and not just in {0, 1}...
self.N[bernoulliBinarization(obs)] -= 1
[docs] def update(self, obs):
r"""Add an observation.
- If obs is 1, update :math:`\alpha` the count of positive observations,
- If it is 0, update :math:`\beta` the count of negative observations.
.. note:: Otherwise, a trick with :func:`bernoulliBinarization` has to be used.
"""
# print("Info: calling Beta.update() with obs = {} ...".format(obs)) # DEBUG
# FIXED update this code, to accept obs that are FLOAT in [0, 1] and not just in {0, 1}...
self.N[bernoulliBinarization(obs)] += 1


MOAL.maths.applied.optimization package¶
Submodules¶
MOAL.maths.applied.optimization.memoization module¶
-
MOAL.maths.applied.optimization.memoization.
dolongthing
(*args, **kwargs)[source]¶ Does a nested loop - running time is O(n^2)
- Args:
- max_x (int) - An integer for max outer loop max_y (int) - An integer for max inner loop
- Returns:
- res (int) - The resultant calculation
MOAL.maths.applied.optimization.strength_reduction module¶
-
MOAL.maths.applied.optimization.strength_reduction.
DEBUG
= False¶ Strength reduction is an optimization technique that involves taking a more ‘advanced’ math technique and breaking it down into simple ‘dumb’ tasks that can be repeated.
For example, multiplication can be converted to lots of addition.


Using Websockets to Establish a Two-Way Communication Between Client and Server
To run example, start the Node server in a separate terminal tab:
cd server npm start


image name:{{photo.Image_Name}}
image description:{{photo.Image_Description}}
image category:{{photo.Image_Category}}
image date posted:{{photo.Image_date}}
{%extends 'photos/base.html'%} {% block content %}
image name:{{photo.Image_Name}}
image description:{{photo.Image_Description}}
image category:{{photo.Image_Category}}
image date posted:{{photo.Image_date}}


latency = []
for _ in tqdm(range(5200)):
start = time.perf_counter()
resp = requests.get(url)
end = time.perf_counter()
latency.append(end - start)
// Remove initial samples
latency = latency[200:]
time.sleep(5)
if __name__ == "__main__":
main()


Pittsburgh Steelers LB Mark Barron gives away 1,500 turkeys for Thanksgiving
by Bob D'Angelo, Cox Media Group National Content DeskPittsburgh Steelers inside linebacker Mark Barron gave back to people in his home state for the fourth consecutive year, sponsoring the distribution of 1,500 turkeys Saturday.
Barron's representatives gave away the Thanksgiving birds at Prichard City Hall and in Toulminville, AL.com reported.
Barron, who starred at the University of Alabama and was drafted by the Tampa Bay Buccaneers in the 2012 NFL draft, signed with the Steelers as a free agent in 2019.
Barron was unable to attend Saturday's giveaway, as he was in Cincinnati as the Steelers prepared to face the Bengals on Sunday.
Michelle Barron, his mother, said it was "a great honor" to pass out turkeys again, AL.com reported.
"When the kids were younger, we had to go to the Catholic Social Services or the Salvation Army," Michelle Barron told AL.com. "When we first started, I was like, 'Mark, do you think a turkey's going to be enough?' He said, 'Yeah, Mama, when I was small, I was looking for that turkey.'
"I think it's a real privilege for him, and I think a lot of my son for doing this, because he don't have to, so it's a real privilege."
Together Assisting People Inc. coordinated the event and tapped into the Mobile Kappa League to do much of the heavy lifting in loading and unloading the turkeys.
"We're able to be hands on the ground, boots on the ground for him," Chris Rogers, the organization's founder, told AL.com, "and create his vision, what he wants to do for his community. And that's the biggest thing that he wanted -- to make sure his people know that he loves him. And we love doing this."
© 2019 Cox Media Group.


Jack Carneal was born in Richmond, Virginia and has lived in Tennessee, Charlottesville, Virginia, Washington, DC, Tallahassee, Florida and Mali, West Africa. In 1989 he graduated with distinction from Sewanee, The University of the South, and was a Henry Hoyns fellow in the MFA program at the University of Virginia, where he received his MFA in fiction in 1993.
For much of the next decade, he played the drums in various projects lead by brothers Ned and Will Oldham, including Palace, the Anomoanon and Bonnie Prince Billy. He has lived in Baltimore with his wife and two sons since 2001, and teaches in the English department at Towson University. His fiction and non-fiction have appeared in a few places like the Chattahoochee Review, Bluepenny Quarterly, Vice and Lucky Peach.
Listening to music on his hifi system is still a huge part of his daily life but he has not picked up drumsticks since the night detailed on the last page of his book Destroy Your Safe and Happy Lives. Soon afterwards, he sold his Rogers Holiday drum kit for a lot less than he thought it was worth. To his great regret, he has not won any interesting awards or prizes, but assumes there is still time.
To reach Jack send him an email at contact@jackcarneal.com


Search
Preparing search index...
The search index is not available
@sheetbase/models
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Globals
Lib
Class Lib
Hierarchy
Lib
Index
Constructors
constructor
Properties
audio
Service
author
Service
bundle
Service
category
Service
notification
Service
option
Service
order
Service
page
Service
post
Service
product
Service
promotion
Service
property
Service
tag
Service
thread
Service
user
Service
video
Service
Constructors
constructor
new
Lib
(
)
:
Lib
Returns
Lib
Properties
audio
Service
audio
Service
:
AudioService
author
Service
author
Service
:
AuthorService
bundle
Service
bundle
Service
:
BundleService
category
Service
category
Service
:
CategoryService
notification
Service
notification
Service
:
NotificationService
option
Service
option
Service
:
OptionService
order
Service
order
Service
:
OrderService
page
Service
page
Service
:
PageService
post
Service
post
Service
:
PostService
product
Service
product
Service
:
ProductService
promotion
Service
promotion
Service
:
PromotionService
property
Service
property
Service
:
PropertyService
tag
Service
tag
Service
:
TagService
thread
Service
thread
Service
:
ThreadService
user
Service
user
Service
:
UserService
video
Service
video
Service
:
VideoService
Globals
Lib
constructor
audio
Service
author
Service
bundle
Service
category
Service
notification
Service
option
Service
order
Service
page
Service
post
Service
product
Service
promotion
Service
property
Service
tag
Service
thread
Service
user
Service
video
Service
Generated using
TypeDoc


Qi b Chen
vs
Wu Wenjin
"Chen Qi's Pawn"
(game of the day 2020-07-10)
Longtou Cup (2019.04.20), Qinhuangdao CHN
Philidor Defense(C41)
·
1-0
«
<
>
»
+
ANALYSIS
[
x
]
Light
Squares
Dark
Squares
Flip
Board
Labels
ON
Shrink
Grow
Copy
SETTINGS
ENGINE
FEN COPIED


The Tang Empire was the most prosperous dynasty throughout China's history. It featured an open and equal social environment, the matured trading system with the rest of the world, and dazzling artistic achievements.
This visualization's topic is the Tang Poem, the brightest jewelry on the dynasty's artistic crown. Tang poems stand for the highest poetry achievement throughout China's history, and the poem collection, Three Hundred Tang Poems, is known by everyone in the Greater China reign.
The Tang poems have also been translated into many languages and are well-known in western countries. So, I believe the book is a bridge that connects my background to the world and enables more individuals to glimpse the prosperity of poetry in the 7-10th century's oriental world.
This English edition of Three Hundred Tang Poems is translated by Betty Tseng, who also translated the 310 Song Lyrics into English and the Stray Birds by Rabindranath into Traditional Chinese. Here is the link to all of her translation: https://28utscprojects.wordpress.com/
Tang Dynasty was founded and ruled under the Li family from 618 to 904, then collapsed and succeeded by the chaotic "Five Dynasty and Ten Kingdoms." Tang was prosperous during 626 A.C. and 756 A.C. and was in its heyday under Emperor LI Shiming, WU Zetian (the first and the only Empress in ancient China's history), and LI Longji's reign.
There are eleven types of poems included in Three Hundred Tang Poems. However, the types are not completely different from each other; they are actually varied combinations of five poetry categories, they are Five-character, Seven-character, Folk-song, Verse, Octonary, and Quatrain.
Around 2,200 Tang poets' names were found in the historic archive, and more than 200 poets were females. This book, Three Hundred Tang Poems, only includes poems from 77 poets with only one female, Du Qiuniang. The book was published in 1763 by Sun Zhu, targeted at the general public; a complete version of tang poems prepared for scholars is The Complete Tang Poems.
Please Hoverover The Bars To Read Each Poet's Introduction
Poem Selector


TIL: Creating Animated Meme GIFs on the Command-Line
Got sick of navigating the limitations of various online services to create animated gif memes, finally figured out how to do it manually. Not a universal process, just what worked for my situation. (Which is Ubuntu 21.10, "Impish".)
All of of the ffmpeg invocations could probably be combined into one, but I show the commands as I used them, as I was figuring each step out.
1. Download a video
Starting from a video on YouTube:
To download this locally,
install youtube-dl
,
hit the YouTube share button to grab the video's encoded URL,
and:
youtube-dl https://youtu.be/6-gJMs6DwuE -o Ash.mp4
This gives me an 850KB .mp4 video file.
2. Split
I only want the final few seconds. To remove the start of the video, keeping from 6.5 seconds until the end:
ffmpeg -hide_banner -i Ash.mp4 -acodec copy -vcodec libx264 -ss 00:00:06.5 Ash-split.mp4
Args to ffmpeg are position sensitive. Specifying '-ss' (to split the file) before the input ('-i') can't create the split at an accurate location, since it has to guess whereabouts in the file the given timestamp will occur. But putting it after the input (as done here) means it can split accurately on the given timestamp, since the file has been processed by the time this arg gets actioned, so accurate timestamp/frame conversion is known, at the cost of having had to process even the parts of the video that are then discarded.
Vcodec of libx264 is specified because, according to stackoverflow, "scenes in mp4 are broken", whatever that means, and specifying "copy", as most people do, gives me an output with no video, only audio.
This results in a three second, 217KB .mp4 video file. (the following is just an image of it).
3. Crop
To crop out the black bars from the top and bottom:
ffmpeg -hide_banner -i Ash-split.mp4 -vf 'crop=iw:365' Ash-split-crop.mp4
Here, we crop it to the input width "iw", and 365 high. In the absense of any offset ordinates for the crop, ffmpeg defaults to centering them, so this 365 pixels are taken from the (spatial, vertical) middle of the video, which is exactly what we want.
This results in a three second, 220KB .mp4 video file.
4. Resize and convert to gif
ffmpeg -hide_banner -i Ash-split-crop.mp4 -vf 'scale=512:-1' Ash-split-crop-resize.gif
This results in a grainy-but-passable three second 750KB animated .gif:
The file size can be smaller, if you care, most easily by splitting a shorter video clip, reducing the frame rate, or reducing the 'scale' in this step.
Alternately, this could be done using ImageMagik's 'convert', but the result of that was a very large (10MB) file and played very slowly, and I wasn't immediately sure how to fix that.
5.  Without this dance, the text is all twitchy and messy.
Voilà. Imagine sending it to a co-worker who is taking on a difficult task, like making changes to that thorny section of the codebase that nobody likes:


bxslider
FlexSlider
swiper
slick
RhinoSlider
Windy
ElasticSlideshow
CircleNavigationEffect
Slicebox
Modern-slide-in
Windy
Title
Description
Title
Description
Title
Description
prev
next