Joseph Sheedy
<EMAIL_ADDRESS>Git repository: https://github.com/UWPCE-PythonCert/Python300-SystemDevelopmentWithPython-Spring-2014
Credit to Cris Ewing of UW PCE for much of this material
http://en.wikipedia.org/wiki/List_of_relational_database_management_systems
This list is by no means exhaustive
Here is an example table which represents people in a system:
+----+------------+------------+-----------+ | id | username | first_name | last_name | +====+============+============+===========+ | 1 | wont_u_b | Fred | Rogers | +----+------------+------------+-----------+ | 4 | neuroman | William | Gibson | +----+------------+------------+-----------+ | 5 | race | Roger | Bannon | +----+------------+------------+-----------+ | 6 | harrywho | Harry | Houdini | +----+------------+------------+-----------+ | 7 | whitequeen | Emma | Frost | +----+------------+------------+-----------+ | 8 | shadowcat | Kitty | Pryde | +----+------------+------------+-----------+
There are three basic types of relationships:
Many-to-one relationships are modelled using Foreign Keys
The many table has a column which holds the primary key of the row from the one table:
Consider the relationship of books to author:
+----+-----------+------------+-----------+
| id | username | first_name | last_name |
+====+===========+============+===========+
| 4 | neuroman | William | Gibson |
+----+-----------+------------+-----------+
| 6 | harrywho | Harry | Houdini |
+----+-----------+------------+-----------+
+----+-----------------------------------+--------+
| id | title | author |
+====+===================================+========+
| 1 | Miracle Mongers and their Methods | 6 |
+----+-----------------------------------+--------+
| 2 | The Right Way to Do Wrong | 6 |
+----+-----------------------------------+--------+
| 3 | Pattern Recognition | 4 |
+----+-----------------------------------+--------+
One-to-one relationships are really just a special case of Many-to-one, and are also modelled with Foreign Keys
In this case, the column on the related table which holds the primary key of the target table has an additional unique constraint, so that only one related record can exist
The classic purpose is for data that doesn't need to be accessed often, and is unique per record
Consider the example of birth records:
+----+-----------+------------+-----------+
| id | username | first_name | last_name |
+====+===========+============+===========+
| 1 | wont_u_b | Fred | Rogers |
+----+-----------+------------+-----------+
| 4 | neuroman | William | Gibson |
+----+-----------+------------+-----------+
| 5 | race | Roger | Bannon |
+----+-----------+------------+-----------+
+----+--------+----------------+--------------+
| id | person | date | place |
+====+========+================+==============+
| 1 | 1 | March 20, 1928 | Latrobe, PA |
+----+--------+----------------+--------------+
| 2 | 4 | March 17, 1948 | Conway, SC |
+----+--------+----------------+--------------+
| 3 | 5 | April 1, 1954 | Wilmette, IL |
+----+--------+----------------+--------------+
Many-to-many relations are a bit trickier
You can't have a multi-valued field in traditional SQL, so there's no way to define a foreign key-like construct that would work
Instead, this relationship is modelled using a join table. This is just a regular table which has two foreign key fields, one for each side of the relation.
Beyond these two, other columns can add data points describing the qualities of the relation itself
+----+------------+------------+-----------+
| id | username | first_name | last_name |
+====+============+============+===========+
| 7 | whitequeen | Emma | Frost |
+----+------------+------------+-----------+
| 8 | shadowcat | Kitty | Pryde |
+----+------------+------------+-----------+
+----+---------------+
| id | name |
+====+===============+
| 1 | Hellfire Club |
+----+---------------+
| 2 | X-Men |
+----+---------------+
+----+--------+-------+--------+
| id | person | group | active |
+====+========+=======+========+
| 1 | 7 | 1 | False |
+----+--------+-------+--------+
| 2 | 7 | 2 | True |
+----+--------+-------+--------+
| 3 | 8 | 2 | True |
+----+--------+-------+--------+
The syntax of SQL can be broken into constructs:
SQL statements can be thought of as belonging to one of several subsets
Statements in this subset concern the structure of the database itself:
CREATE TABLE "groups" (
"group_id" character varying(32) NOT NULL,
"name" character varying(255) NOT NULL,
"description" text NOT NULL
)
DROP TABLE groups;
Statements in this subset concern the altering of data within the database:
UPDATE people
SET first_name='Bill'
WHERE id=4;
DELETE FROM people
WHERE id=4;
Statements in this subset concern the retrieval of data from within the database:
SELECT user_id, COUNT(*) c
FROM (SELECT setting_value AS interests, user_id
FROM user_settings
WHERE setting_name = 'interests') raw_uid
GROUP BY user_id HAVING c > 1;
Despite the norms of SQL, individual databases have lots of differences
Programmers don't want to have to think about implementation details for underlying systems
It would be nice to have a single API to hide these details
Any package implementing this API would then be interchangeable
Finalized in 1996, PEP 248 specified DB-API version 1.0 to fulfill this goal:
This API has been defined to encourage similarity between the Python modules that are used to access databases. By doing this, we hope to achieve a consistency leading to more easily understood modules, code that is generally more portable across databases, and a broader reach of database connectivity from Python.http://www.python.org/dev/peps/pep-0248/
By 2001, PEP 249 brought version 2.0 of the DB-API specification, with improvements:
Discussions are currently underway to push DB-API v3.0, particularly in light of the change to Python 3.0 http://www.python.org/dev/peps/pep-0249/
It is important to remember that PEP 249 is only a specification
There is no code or package for DB-API 2.0 on it's own.
Since 2.5, the Python Standard Library has provided a reference implementation of the api http://docs.python.org/2/library/sqlite3.html based on SQLite3
Before version 2.5, this package was available as pysqlite
To use the DB API with any database other than SQLite3, you must have an underlying API package available.
Implementations are available for:
Common db api packages can be installed using pip
$ pip install psycopg2
$ pip install mysql-python
...
Most api packages will require that the development headers for the underlying database system be available. Without these, the C symbols required for communication with the db are not present and the python interface cannot work.
Some of the db api wrappers have special installation requirements:
The MS SQL package runs only on Windows and requires pywin32. It is included in versions of pywin32 since v211.
The cx_Oracle package has binary installers, or can be installed from source using distutils::
$ python setup.py build
$ python setup.py install
DB-API2 implementations provide the following global values:
These can be used to tailor your program's expectations
DB API provides a constructor, connect(), which returns a Connection object:
connect(parameters)
This can be considered the entry point for the module. Once you've got a connection, everything else flows from there.
The parameters required and accepted by the connect constructor will vary from implementation to implementation, since they are specific to the underlying database.
Some methods may not be supported by all implementations:
You can use a few values to control the rows returned by the cursor:
The final two methods may be implemented as no-ops
The cursor should be used to run operations on the database:
These attributes of Cursor can help you learn about the results of operations:
These methods are the way to get results after an operation:
Or, .execute returns an iterator after a SELECT statement which can be used to iterate over the results
>>> for row in c.execute('SELECT * FROM stocks ORDER BY price'):
print row
(u'2006-01-05', u'BUY', u'RHAT', 100, 35.14)
(u'2006-03-28', u'BUY', u'IBM', 1000, 45.0)
(u'2006-04-06', u'SELL', u'IBM', 500, 53.0)
(u'2006-04-05', u'BUY', u'MSFT', 1000, 72.0)
Note that each of these methods will raise a DB API Error if no operation has been performed (or if no result set was produced)
The DB-API provides types and constructors for data:
Each of the above has a corresponding FromTicks(ticks) which returns the same type given a single integer argument (seconds since the epoch)
SQL NULL values are represented by Python's None
The DB API specification requires implementations to create the following hierarchy of custom Exception classes:
StandardError |__Warning |__Error |__InterfaceError (a problem with the db api) |__DatabaseError (a problem with the database) |__DataError (bad data, values out of range, etc.) |__OperationalError (the db has an issue out of our control) |__IntegrityError |__InternalError |__ProgrammingError (something wrong with the operation) |__NotSupportedError (the operation is not supported)
Aside from some custom extensions not required by the specification, that's it.
So how do you interact with this?
Start by moving to the examples folder, opening a Python interpreter and importing the sqlite3 module:
$ cd examples
$ python
Python 2.7.1 (r271:86832, Apr 4 2011, 22:22:40)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
We can poke the module a bit to learn about it:
>>> sqlite3.sqlite_version
'3.6.12'
>>> sqlite3.apilevel
'2.0'
>>> sqlite3.paramstyle
'qmark'
>>> sqlite3.threadsafety
1
===== =====================================
level meaning
===== =====================================
0 Not safe
1 Safe at Module level only
2 Safe at Module and Connection
3 Safe at Module, Connection and Cursor
===== =====================================
SQLite3 is a file-based system, and it will create the file it needs if one doesn't exist. We can create a sqlite3 database just by attempting to connect to it:
>>> import createdb
>>> createdb.main()
Need to create database and schema
>>> reload(createdb)
>>> createdb.main()
Database exists, assume schema does, too.
Let's see how this works
Open createdb.py in your favorite text editor:
import os
import sqlite3
DB_FILENAME = 'books.db'
DB_IS_NEW = not os.path.exists(DB_FILENAME)
def main():
conn = sqlite3.connect(DB_FILENAME)
if DB_IS_NEW:
print 'Need to create database and schema'
else:
print 'Database exists, assume schema does, too.'
conn.close()
if __name__ == '__main__':
main()
Make the following changes to createdb.py:
import os
import sqlite3
DB_FILENAME = 'books.db'
SCHEMA_FILENAME = 'ddl.sql' # this is new
DB_IS_NEW = not os.path.exists(DB_FILENAME)
def main():
with sqlite3.connect(DB_FILENAME) as conn:
if DB_IS_NEW: # A whole new if clause:
print 'Creating schema'
with open(SCHEMA_FILENAME, 'rt') as f:
schema = f.read()
conn.executescript(schema)
else:
print 'Database exists, assume schema does, too.'
# delete the conn.close() that was here.
Quit your python interpreter and delete the file books.db that should be in the examples folder
Then run the script from the command line to try it out:
$ python createdb.py
Creating schema
$ python createdb.py
Database exists, assume schema does, too.
Add the following to createdb.py:
# in the imports, add this line:
from utils import show_table_metadata
# in the else clause, replace the print statement with this:
print "Database exists, introspecting:"
tablenames = ['author', 'book']
cursor = conn.cursor()
for name in tablenames:
print "\n"
show_table_metadata(cursor, name)
Then try running python createdb.py again
$ python createdb.py
Table Metadata for 'author':
cid | name | type | notnull | dflt_value | pk |
-----------+------------+------------+------------+------------+------------+-
0 | authorid | INTEGER | 1 | None | 1 |
-----------+------------+------------+------------+------------+------------+-
1 | name | TEXT | 0 | None | 0 |
-----------+------------+------------+------------+------------+------------+-
Table Metadata for 'book':
cid | name | type | notnull | dflt_value | pk |
-----------+------------+------------+------------+------------+------------+-
0 | bookid | INTEGER | 1 | None | 1 |
-----------+------------+------------+------------+------------+------------+-
1 | title | TEXT | 0 | None | 0 |
-----------+------------+------------+------------+------------+------------+-
2 | author | INTEGER | 1 | None | 0 |
-----------+------------+------------+------------+------------+------------+-
Let's load up some data. Fire up your interpreter and type:
import sqlite3
insert = """INSERT INTO author (name) VALUES("Iain M. Banks");"""
with sqlite3.connect("books.db") as conn:
cur = conn.cursor()
cur.execute(insert)
cur.rowcount
cur.close()
<sqlite3.Cursor object at 0x10046e880>
1
Did that work?
Let's query our database to find out:
query = """SELECT * from author;"""
with sqlite3.connect("books.db") as conn:
cur = conn.cursor()
cur.execute(query)
rows = cur.fetchall()
for row in rows:
print row
<sqlite3.Cursor object at 0x10046e8f0>
(1, u'Iain M. Banks')
Alright! We've got data in there. Let's make it more efficient.
Queries can be parameterized. The parameter style is database dependent, and can be determined from module.paramstyle
http://www.python.org/dev/peps/pep-0249/#paramstyle
insert = """INSERT INTO author (name) VALUES(?);"""
authors = [["China Mieville"], ["Frank Herbert"], ["J.R.R. Tolkien"], ["Susan Cooper"], ["Madeline L'Engle"]]
with sqlite3.connect("books.db") as conn:
cur = conn.cursor()
cur.executemany(insert, authors)
print cur.rowcount
cur.close()
<sqlite3.Cursor object at 0x10046e8f0>
5
Again, query the database:
query = """SELECT * from author;"""
with sqlite3.connect("books.db") as conn:
cur = conn.cursor()
cur.execute(query)
rows = cur.fetchall()
for row in rows:
print row
<sqlite3.Cursor object at 0x10046e8f0>
(1, u'Iain M. Banks')
...
(4, u'J.R.R. Tolkien')
(5, u'Susan Cooper')
(6, u"Madeline L'Engle")
Transactions let you group a number of operations together, allowing you to make sure they worked before you actually push the results into the database.
In SQLite3, operations that belong to the Data Manipulation subset (INSERT, UPDATE, DELETE) require an explicit commit unless auto-commit has been enabled.
So far, commits have been hidden from us by the with statement. The context manager takes care of committing when the context closes (at the end of the with statement)
Let's add some code so we can see the effect of transactions.
Let's start by seeing what happens when you try to look for newly added data before the insert transaction is committed.
Begin by quitting your interpreter and deleting books.db.
Then re-create the database, empty:
$ python createdb.py
Creating schema
In populatedb.py, add this code at the end of the file:
with sqlite3.connect(DB_FILENAME) as conn1:
print "\nOn conn1, before insert:"
show_authors(conn1)
authors = ([author] for author in AUTHORS_BOOKS.keys())
cur = conn1.cursor()
cur.executemany(author_insert, authors)
print "\nOn conn1, after insert:"
show_authors(conn1)
with sqlite3.connect(DB_FILENAME) as conn2:
print "\nOn conn2, before commit:"
show_authors(conn2)
conn1.commit()
print "\nOn conn2, after commit:"
show_authors(conn2)
Quit your python interpreter and run the populatedb.py script:
$ python populatedb.py
On conn1, before insert:
no rows returned
On conn1, after insert:
(1, u'China Mieville')
(2, u'Frank Herbert')
(3, u'Susan Cooper')
(4, u'J.R.R. Tolkien')
(5, u"Madeline L'Engle")
On conn2, before commit:
no rows returned
On conn2, after commit:
(1, u'China Mieville')
(2, u'Frank Herbert')
(3, u'Susan Cooper')
(4, u'J.R.R. Tolkien')
(5, u"Madeline L'Engle")
That's all well and good, but what happens if an error occurs?
Transactions can be rolled back in order to wipe out partially completed work.
Like with commit, using connect as a context manager in a with statement will automatically rollback for exceptions.
Let's rewrite our populatedb script so it explicitly commits or rolls back a transaction depending on exceptions occurring
First, add the following function above the if __name__ == '__main__' block:
def populate_db(conn):
authors = ([author] for author in AUTHORS_BOOKS.keys())
cur = conn.cursor()
cur.executemany(author_insert, authors)
for author in AUTHORS_BOOKS.keys():
params = ([book, author] for book in AUTHORS_BOOKS[author])
cur.executemany(book_insert, params)
Then, in the runner:
with sqlite3.connect(DB_FILENAME) as conn1:
with sqlite3.connect(DB_FILENAME) as conn2:
try:
populate_db(conn1)
print "\nauthors and books on conn2 before commit:"
show_authors(conn2)
show_books(conn2)
except Exception:
conn1.rollback()
print "\nauthors and books on conn2 after rollback:"
show_authors(conn2)
show_books(conn2)
raise
else:
conn1.commit()
print "\nauthors and books on conn2 after commit:"
show_authors(conn2)
show_books(conn2)
Remove books.db, recreate the database, then run our script:
$ rm books.db
$ python createdb.py
Creating schema
$ python populatedb.py
authors and books on conn2 after rollback:
no rows returned
no rows returned
Traceback (most recent call last):
File "populatedb.py", line 57, in
populate_db(conn1)
File "populatedb.py", line 46, in populate_db
cur.executemany(book_insert, params)
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
Okay, we got an error, and the transaction was rolled back correctly.
Open utils.py and find this:
'Susan Cooper': ["The Dark is Rising", ["The Greenwitch"]],
Fix it like so:
'Susan Cooper': ["The Dark is Rising", "The Greenwitch"],
It appears that we were attempting to bind a list as a parameter. Ooops.
Now that the error in our data is repaired, let's try again:
$ python populatedb.py
Reporting authors and books on conn2 before commit:
no rows returned
no rows returned
Reporting authors and books on conn2 after commit:
(1, u'China Mieville')
(2, u'Frank Herbert')
(3, u'Susan Cooper')
(4, u'J.R.R. Tolkien')
(5, u"Madeline L'Engle")
(1, u'Perdido Street Station', 1)
(2, u'The Scar', 1)
(3, u'King Rat', 1)
(4, u'Dune', 2)
(5, u"Hellstrom's Hive", 2)
(6, u'The Dark is Rising', 3)
(7, u'The Greenwitch', 3)
(8, u'The Hobbit', 4)
(9, u'The Silmarillion', 4)
(10, u'A Wrinkle in Time', 5)
(11, u'A Swiftly Tilting Planet', 5)
So far, our transactions have been managed. Either explicitly by us, or automatically by the context manager statement with
This behavior is the result of an aspect of the database connection called the isolation level. There are three isolation levels available:
The default level is DEFERRED
The isolation level of a connection can be set with a keyword argument provided to the connect constructor:
con = sqlite3.connect('mydb.db', isolation_level="EXCLUSIVE")
If you explicitly set this argument to None, you can enable autocommit behavior.
If autocommit is enabled, then any DML operations that occur on a connection will be immediately committed
First, edit populatedb.py:
with sqlite3.connect(DB_FILENAME, isolation_level=None) as conn1:
with sqlite3.connect(DB_FILENAME, isolation_level=None) as conn2:
Next, undo your changes to utils.py so that the error we had will happen again
Finally, delete books.db, recreate it and test the populate script::
$ rm books.db
$ python createdb.py
Creating schema
$ python populatedb.py
authors and books on conn2 after rollback:
(1, u'China Mieville')
(2, u'Frank Herbert')
(3, u'Susan Cooper')
(4, u'J.R.R. Tolkien')
(5, u"Madeline L'Engle")
(1, u'Perdido Street Station', 1)
(2, u'The Scar', 1)
(3, u'King Rat', 1)
(4, u'Dune', 2)
(5, u"Hellstrom's Hive", 2)
(6, u'The Dark is Rising', 3)
Traceback (most recent call last):
File "populatedb.py", line 57, in
populate_db(conn1)
File "populatedb.py", line 46, in populate_db
cur.executemany(book_insert, params)
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
There's not a whole lot of difference between the default "DEFERRED" isolation level and "IMMEDIATE"
There's quite a large difference, though for the "EXCLUSIVE" level.
Open threaded.py in your editors.
This is an example of using our existing database population setup in a threaded environment. One thread will load the database, the other will read it.
Take a few moments to review the control flow here. What should happen?
First, re-fix the bug in our utils.py file so that we don't get errors when running this test.
Then, kill the old database, recreate it and run our new script:
$ rm books.db
$ python createdb.py
Creating schema
$ python threaded.py
2013-04-30 15:37:37,556 (Writer ) connecting
2013-04-30 15:37:37,556 (Reader ) waiting to sync
2013-04-30 15:37:37,556 (Writer ) connected
2013-04-30 15:37:37,557 (Writer ) changes made
2013-04-30 15:37:37,557 (Writer ) waiting to sync
2013-04-30 15:37:39,556 (MainThread) sending sync event
2013-04-30 15:37:39,557 (Reader ) beginning read
2013-04-30 15:37:39,557 (Reader ) beginning read
2013-04-30 15:37:39,557 (Writer ) PAUSING
2013-04-30 15:37:42,559 (Writer ) CHANGES COMMITTED
2013-04-30 15:37:42,590 (Reader ) selects issued
(1, u'China Mieville')
(2, u'Frank Herbert')
(3, u'Susan Cooper')
(4, u'J.R.R. Tolkien')
(5, u"Madeline L'Engle")
2013-04-30 15:37:42,590 (Reader ) results fetched
2013-04-30 15:37:42,590 (Reader ) beginning read
2013-04-30 15:37:42,590 (Reader ) selects issued
(1, u'Perdido Street Station', 1)
(2, u'The Scar', 1)
(3, u'King Rat', 1)
(4, u'Dune', 2)
(5, u"Hellstrom's Hive", 2)
(6, u'The Dark is Rising', 3)
(7, u'The Greenwitch', 3)
(8, u'The Hobbit', 4)
(9, u'The Silmarillion', 4)
(10, u'A Wrinkle in Time', 5)
(11, u'A Swiftly Tilting Planet', 5)
2013-04-30 15:37:42,591 (Reader ) results fetched
/


While filming Fight Club, director David Fincher
and actor Edward Norton found themselves giggling and rewinding this segment
of Meet Joe Black over and over. Says Norton: "I think [Pitt's]
getting whacked by the car is the best thing I've seen in years."
Stunt specifications: Three life-size, lifelike stunt body castings
built to withstand repeated collisions with cars and asphalt.
Physical materials: Silicone rubber, soft urethane foam, heavy duty steel
armatures, wigs, acrylic eyes, bungees.
The special effects team known as Anatomorphex (with over 20 years'
experience in film and television) was given the job. These are the same
folks who created the oversize Jack in the Box head, and even that
device is complicated. The 14-inch white fiberglass globe contains a mini
lipstick camera embedded in the mask's pointy black nose. The actor who
wears the head is fitted with video-vision goggles which enable him to
walk, run, ride a bike, or drive a car.
Anatomorphex first life-casted the face and body of Brad Pitt. Feeling
confident the structure would survive repeated, punishing blows, they
constructed the head and hands from silicone rubber. The bodies were cast
in a dense, flexible, urethane foam over thick steel armatures. Several
were made, as they would each get bashed around proper.
The stunt employed a whipcord system, consisting of a pneumatic pull
arm firmly anchored to the ground against a large truck.
Like a fake Hollywood punch delivered during a bar room brawl, the oncoming
minivan never hits the dummy - it only drives by, just missing it from
behind. The whipcord itself does all the work. A cable was threaded through
a pulley to a condor 30 feet up in the air, then yanked at the base of
the body double's neck. The cable was airbrushed out during post production.
WHAM! Brad Pitt gets hit by a van.  He flies backwards, up into the air. A sight
to behold, to be sure - but it's hardly sufficient. Instead of just landing
on the concrete, the arc of his path collides hard and fast with a second
vehicle.
BAM! The taxi was already in synchronized
motion, intersecting the dummy's arc and knocking the body double back
into opposing traffic. The effect was violent and scary to
those watching the stunt live on the set. For each shot, the dummy was
lined up in the camera. Views shuttled between the video image of Pitt's
filmed final position in the street, and the live feed of the dummy.
"We were concerned about the potential wear and tear these body
doubles were going to receive," says Anatomorphex. "We built
three full doubles, and an extra head too. We shipped a huge repair kit
with us, figuring we could always work on two body doubles while one was
filming. We did about two dozen takes and after the first, it became obvious
just how durable our 200 lb, steel, silicone and urethane body doubles
were. Aside from dusting off the inevitable shattered windshield glass,
they required very little work, even after slamming into and skidding
across the asphalt. Wow!"
Silicone rubber is still one of the cornerstones of contemporary Hollywood
special effects. Pitt's gray suit showed wear and tear quickly, and the
wardrobe people were kept busy stitching sleeves and mending pants.
During one take, the taxi stunt driver was nearly injured when one of
the dummies slammed into the windshield head first - with all its weight
behind it. The dummy pushed in the front window to within an inch of the
seatbelted driver's face.
After awhile, the silicone began to show a few signs of abrasion, needing
minimal paint touch up. After another take, the team discovered one of
the prosthetic eyeballs had popped out.
They never found the eye - but that's the scene which ended up in the
movie. Astute viewers watching Meet Joe Black on DVD can see the
eyeball bounce off the screen as Pitt's dummy body collapses in a heap
and slides tastefully out of frame.
Recent use of the body-double-smashed-by-car effect was employed in Sweden.
A television commercial campaign aimed at minimizing collisions between
cars and careless pedestrians shows a man idly talking on his cell phone,
then stepping into traffic with disastrous results.
Brad Pitt once worked at El Pollo Loco, where he was asked to
dress up like a chicken.
|


Requires type arguments T and U to have a common type. If they have a common type, that type is bound to CommonType symbol that can be used for example in concepts that refine this concept.
Types T and U have a common type if the types T and U are exactly the same type, type T is implicitly convertible to type U, or type U is implicitly convertible to type U. In the first case the common type will be T, in the second case it will be U and in the third case it will be T.
| T | |
| U |


This document describes the use of the NTP Project's sntp
program,
that can be used to query a Network Time Protocol (NTP) server and
display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
This document applies to version 4.2.6p3 of sntp
.
The program implements the SNTP protocol as defined by RFC 5905, the NTPv4 IETF specification.
By default, sntp
writes the local data and time (i.e., not UTC) to the
standard output in the format:
1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
where the +4.567 +/- 0.089 secs indicates the time offset and error bound of the system clock relative to the server clock.
sntp
can be used as a SNTP client to query a NTP or SNTP server and either display
the time or set the local system's time (given suitable privilege). It can be
run as an interactive command or in a
cron
job.
NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol) are defined and described by RFC 5905.
The default is to write the estimated correct local date and time (i.e. not UTC) to the standard output in a format like
1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
where the
+4.567 +/- 0.089 secs
indicates the local clock is 4.567 seconds behind the correct time
(so 4.567 seconds must be added to the local clock to get it to be correct),
and the (local) time of
1996-10-15 20:17:25.123
can be converted to UTC time by adding 8 hours and 0 minutes, and
is believed to be correct to within
+/- 0.089
seconds.
This section was generated by AutoGen, the aginfo template and the option descriptions for the sntp program. It documents the sntp usage text and option meanings.
This software is released under a specialized copyright license.
This is the automatically generated usage text for sntp:
sntp - standard SNTP program - Ver. 4.2.6p3 USAGE: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... hostname-or-IP ... Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution - prohibits these options: ipv6 -6 no ipv6 Force IPv6 DNS name resolution - prohibits these options: ipv4 -d no normalverbose Normal verbose -K Str kod KoD history filename -p no syslog Logging with syslog - prohibits these options: filelog -l Str filelog Log to specified logfile - prohibits these options: syslog -s no settod Set (step) the time with settimeofday() - prohibits these options: adjtime -j no adjtime Set (slew) the time with adjtime() - prohibits these options: settod -b Str broadcast Use broadcasts to the address specified for synchronisation -t Num timeout Specify the number of seconds to wait for broadcasts -a Num authentication Enable authentication with the key auth-keynumber -k Str keyfile Specify a keyfile. SNTP will look in this file for the key specified with -a opt version Output version information and exit -? no help Display extended usage information and exit -! no more-help Extended usage information passed thru pager -> opt save-opts Save the option state to a config file -< Str load-opts Load options from a config file - disabled as --no-load-opts - may appear multiple times Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. The following option preset mechanisms are supported: - reading file $HOME/.ntprc - reading file ./.ntprc - examining environment variables named SNTP_* sntp implements the Simple Network Time Protocol, and is used to query an NTP or SNTP server and either display the time or set the local system's time (given suitable privilege). It can be run interactively from the command line or as a cron job. NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC 1305. please send bug reports to: http://bugs.ntp.org<EMAIL_ADDRESS>This is the “set (slew) the time with adjtime()” option.
This option has some usage constraints. It:
This is the “enable authentication with the key auth-keynumber” option. This option enables authentication using the key specified in this option's argument. The argument of this option is the keyid, a number specified in the keyfile as this key's identifier. See the keyfile option (-k) for more details.
This is the “use broadcasts to the address specified for synchronisation” option. If specified SNTP will listen to the specified broadcast address for NTP broadcasts. The default maximum wait time, 68 seconds, can be modified with -t.
This is the “log to specified logfile” option.
This option has some usage constraints. It:
This option causes the client to write log messages to the specified logfile.
This is the “force ipv4 dns name resolution” option.
This option has some usage constraints. It:
Force DNS resolution of following host names on the command line to the IPv4 namespace.
This is the “force ipv6 dns name resolution” option.
This option has some usage constraints. It:
Force DNS resolution of following host names on the command line to the IPv6 namespace.
This is the “specify a keyfile. sntp will look in this file for the key specified with -a” option. This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this file. Key files follow the following format:
keyid keytype key
Where keyid is a number identifying this key keytype is one of the follow: S Key in 64 Bit hexadecimal number as specified in in the DES specification. N Key in 64 Bit hexadecimal number as specified in the NTP standard. A Key in a 1-to-8 character ASCII string. M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
For more information see ntp.keys(5).
This is the “kod history filename” option. Modifies the filename to be used to persist the history of KoD responses received from servers. The default is /var/db/ntp-kod.
This is the “normal verbose” option. Diagnostic messages for non-fatal errors and a limited amount of tracing should be written to standard error. Fatal ones always produce a diagnostic. This option should be set when there is a suspected problem with the server, network or the source.
This is the “set (step) the time with settimeofday()” option.
This option has some usage constraints. It:
This is the “logging with syslog” option.
This option has some usage constraints. It:
When this option is set all logging will be done using syslog.
This is the “specify the number of seconds to wait for broadcasts” option. When waiting for a broadcast packet SNTP will wait the number of seconds specified before giving up. Default 68 seconds.
The simplest use of this program is as an unprivileged command to check the current time, offset, and error in the local clock. For example:
sntp ntpserver.somewhere
With suitable privilege, it can be run as a command or in a
crom
job to reset the local clock from a reliable server, like
the ntpdate
and rdate
commands.
For example:
sntp -a ntpserver.somewhere


Robust Interrupted Time Series Toolbox
Assessing the impact of complex policy interventions.
Get StartedFeatures for your analysis
Our software is still under beta testing, and in the meantime, the GitHub repository is not open.
Downloads
Getting started
1. Load the dataset
KRITS can process CSV tables. The file should have three columns: the institute name, the registering date, and the registered value.
2. Choose the date range
The toolbox will plot the time series in the dataset. Sometimes, we will need just a specific interval to analyze. Use the bars to choose the processing start and end dates.
3. Choose the potential change-point intervals
The statistical model requires an interval of theoretical (or potential) change-points. You can select the range using the bars. Remember that longer intervals will need more time to process.
Once you are sure about the intervals, press ”Model the dataset” to start the processing.
4. Data summary
In this table, you will see a brief summary of the processing results: the difference on the slope, levels and noise that appears in your data.
5. Relevant results
Extending the data summary, in this table you will see the difference between the estimated and your theoretical change-point proposal. Details about the slope, intercept and noise estimates are also presented along with the confidence intervals.
6. Explore the dataset: fitting and log-likelihood
Click on Menu View>Estimated mode to see the time series differences between the fitted time series with the change points. If you are wonder about the log-likelihood of the model, scroll down to see the plot.
Each graphic appears in an independent plot that can be zoomed and saved independently.
7. Explore the dataset: residuals and auto-correlation
Click on Menu View>Residuals to see the residuals of the fitted model (after and before the change-point) and their autocorrelation function according to the details expressed in the paper.
8. Read and save the report
Click on Menu Reports>Complete report. The toolbox collects all results data of the model through tables and plots in this large sheet. Click on DOCX report to save it in a MS Word 2017 format.
Note that due to the number of images, it could take a few seconds to load during the first time.
9. Get access to the documentation
The theoretical description of the model is also included in the toolbox. Click on Menu Help>Model description to read the paper and check its theoretical details.
Papers
For additional information, consult the following papers:
Research group
This project is handled by the Biostatistics Research Group at the King Abdullah University of Science and Technology
The software toolbox is developed by OPConsulting.
If you have any doubt about the model, or if you want us to know that the toolbox was useful to you, please contact Prof. Hernando Ombao.
If you have some issue in the installation, or if you discover a bug, please send us an email here<EMAIL_ADDRESS>or report an issue in our GitHub page.


Sehun is Exo's maknae. Sehun has been slaying everyone ever since he was a little boy; he used to be an ulzzang. Sehun is known for his great dancing and iconic rap lines such as "E-X-O," "Shorty Imma party 'till the sundown," and "That's right my type" to name a few. Sehun is very mischevous. Sehun has a dog named Vivi; they look alike.


Anona Winn (born 1994-02-02[ref]) has appeared in 115 episodes between 1965-1970. Anona Winn on IMDB. Anona Winn on Wikipedia.


Prince Charles and Camilla begin week-long New Zealand trip
by PTIBritain’s Prince Charles and his wife Camilla arrived in New Zealand on Sunday for a week-long trip, during which they plan to visit the city of Christchurch and the historic treaty grounds at Waitangi, where the nation’s founding document was signed.
It is the couple’s third joint visit to New Zealand and their first in four years.
Their plane landed in Auckland on Sunday afternoon. Their public duties were due to begin Monday when they planned to lay a wreath at the Mount Roskill War Memorial.
Among other engagements, the couple is due to meet with Prime Minister Jacinda Ardern on Tuesday, visit the Waitangi Treaty Grounds on Wednesday, and on Friday visit Christchurch, where 51 Muslim worshippers were killed during a March massacre and rebuilding continues after a deadly 2011 earthquake.
During the trip, Charles plans to visit several organizations focused on environmental issues while Camilla will focus on groups that support women, including those who have survived domestic violence.
Charles, who last week turned 71, is the heir apparent to the British throne. Camilla, 72, is the Duchess of Cornwall and the prince’s second wife.


|
Little Heroes
|
Class for constants. More...
Public Attributes | |
| const byte | SuppressRoomEvents = 237 |
| (237) Optional parameter to suppress events Join and Leave for a room (which might be used as lobby/chat room then). More... | |
| const byte | EventForward = 234 |
| (234) Optional parameter of OpRaiseEvent to forward the event to some web-service. More... | |
| const byte | IsInactive = (byte)233 |
| (233) Used in EvLeave to describe if a user is inactive (and might come back) or not. In async / Turnbased games, inactive is default. More... | |
| const byte | CheckUserOnJoin = (byte)232 |
| (232) Used when creating rooms to define if any userid can join the room only once. More... | |
| const byte | Address = 230 |
| (230) Address of a (game) server to use. More... | |
| const byte | PeerCount = 229 |
| (229) Count of players in rooms (connected to game servers for this application, used in stats event) More... | |
| const byte | GameCount = 228 |
| (228) Count of games in this application (used in stats event) More... | |
| const byte | MasterPeerCount = 227 |
| (227) Count of players on the master server (connected to master server for this application, looking for games, used in stats event) More... | |
| const byte | UserId = 225 |
| (225) User's ID More... | |
| const byte | ApplicationId = 224 |
| (224) Your application's ID: a name on your own Photon or a GUID on the Photon Cloud More... | |
| const byte | Position = 223 |
| (223) Not used (as "Position" currently). If you get queued before connect, this is your position More... | |
| const byte | MatchMakingType = 223 |
| (223) Modifies the matchmaking algorithm used for OpJoinRandom. Allowed parameter values are defined in enum MatchmakingMode. More... | |
| const byte | GameList = 222 |
| (222) List of RoomInfos about open / listed rooms More... | |
| const byte | Secret = 221 |
| (221) Internally used to establish encryption More... | |
| const byte | AppVersion = 220 |
| (220) Version of your application More... | |
| const byte | RoomName = (byte)LiteOpKey.GameId |
| (255) Code for the gameId/roomName (a unique name per room). Used in OpJoin and similar. More... | |
| const byte | Broadcast = (byte)LiteOpKey.Broadcast |
| (250) Code for broadcast parameter of OpSetProperties method. More... | |
| const byte | ActorList = (byte)LiteOpKey.ActorList |
| (252) Code for list of players in a room. Currently not used. More... | |
| const byte | ActorNr = (byte)LiteOpKey.ActorNr |
| (254) Code of the Actor of an operation. Used for property get and set. More... | |
| const byte | PlayerProperties = (byte)LiteOpKey.ActorProperties |
| (249) Code for property set (Hashtable). More... | |
| const byte | CustomEventContent = (byte)LiteOpKey.Data |
| (245) Code of data/custom content of an event. Used in OpRaiseEvent. More... | |
| const byte | Data = (byte)LiteOpKey.Data |
| (245) Code of data of an event. Used in OpRaiseEvent. More... | |
| const byte | Code = (byte)LiteOpKey.Code |
| (244) Code used when sending some code-related parameter, like OpRaiseEvent's event-code. More... | |
| const byte | GameProperties = (byte)LiteOpKey.GameProperties |
| (248) Code for property set (Hashtable). More... | |
| const byte | Properties = (byte)LiteOpKey.Properties |
| (251) Code for property-set (Hashtable). More... | |
| const byte | TargetActorNr = (byte)LiteOpKey.TargetActorNr |
| (253) Code of the target Actor of an operation. Used for property set. Is 0 for game More... | |
| const byte | ReceiverGroup = (byte)LiteOpKey.ReceiverGroup |
| (246) Code to select the receivers of events (used in Lite, Operation RaiseEvent). More... | |
| const byte | Cache = (byte)LiteOpKey.Cache |
| (247) Code for caching events while raising them. More... | |
| const byte | CleanupCacheOnLeave = (byte)241 |
| (241) Bool parameter of CreateGame Operation. If true, server cleans up roomcache of leaving players (their cached events get removed). More... | |
| const byte | Group = LiteOpKey.Group |
| (240) Code for "group" operation-parameter (as used in Op RaiseEvent). More... | |
| const byte | Remove = LiteOpKey.Remove |
| (239) The "Remove" operation-parameter can be used to remove something from a list. E.g. remove groups from player's interest groups. More... | |
| const byte | Add = LiteOpKey.Add |
| (238) The "Add" operation-parameter can be used to add something to some list or set. E.g. add groups to player's interest groups. More... | |
| const byte | EmptyRoomTTL = 236 |
| (236) Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds. More... | |
| const byte | PlayerTTL = 235 |
| (235) Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds. More... | |
| const byte | ClientAuthenticationType = 217 |
| (217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate More... | |
| const byte | ClientAuthenticationParams = 216 |
| (216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate More... | |
| const byte | CreateIfNotExists = 215 |
| (215) Makes the server create a room if it doesn't exist. OpJoin uses this to always enter a room, unless it exists and is full/closed. More... | |
| const byte | JoinMode = 215 |
| (215) The JoinMode enum defines which variant of joining a room will be executed: Join only if available, create if not exists or re-join. More... | |
| const byte | ClientAuthenticationData = 214 |
| (214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate More... | |
| const byte | LobbyName = (byte)213 |
| (213) Used in matchmaking-related methods and when creating a room to name a lobby (to join or to attach a room to). More... | |
| const byte | LobbyType = (byte)212 |
| (212) Used in matchmaking-related methods and when creating a room to define the type of a lobby. Combined with the lobby name this identifies the lobby. More... | |
| const byte | LobbyStats = (byte)211 |
| (211) This (optional) parameter can be sent in Op Authenticate to turn on Lobby Stats (info about lobby names and their user- and game-counts). See: PhotonNetwork.Lobbies More... | |
| const byte | Region = (byte)210 |
| (210) Used for region values in OpAuth and OpGetRegions. More... | |
| const byte | UriPath = 209 |
| (209) Path of the WebRPC that got called. Also known as "WebRpc Name". Type: string. More... | |
| const byte | WebRpcParameters = 208 |
| (208) Parameters for a WebRPC as: Dictionary<string, object>. This will get serialized to JSon. More... | |
| const byte | WebRpcReturnCode = 207 |
| (207) ReturnCode for the WebRPC, as sent by the web service (not by Photon, which uses ErrorCode). Type: byte. More... | |
| const byte | WebRpcReturnMessage = 206 |
| (206) Message returned by WebRPC server. Analog to Photon's debug message. Type: string. More... | |
| const byte | FindFriendsRequestList = (byte)1 |
| (1) Used in Op FindFriends request. Value must be string[] of friends to look up. More... | |
| const byte | FindFriendsResponseOnlineList = (byte)1 |
| (1) Used in Op FindFriends response. Contains bool[] list of online states (false if not online). More... | |
| const byte | FindFriendsResponseRoomIdList = (byte)2 |
| (2) Used in Op FindFriends response. Contains string[] of room names ("" where not known or no room joined). More... | |
Class for constants.
Codes for parameters of Operations and Events. Pun uses these constants internally.
| const byte ExitGames.Client.Photon.ParameterCode.ActorList = (byte)LiteOpKey.ActorList |
(252) Code for list of players in a room. Currently not used.
| const byte ExitGames.Client.Photon.ParameterCode.ActorNr = (byte)LiteOpKey.ActorNr |
(254) Code of the Actor of an operation. Used for property get and set.
| const byte ExitGames.Client.Photon.ParameterCode.Add = LiteOpKey.Add |
(238) The "Add" operation-parameter can be used to add something to some list or set. E.g. add groups to player's interest groups.
| const byte ExitGames.Client.Photon.ParameterCode.Address = 230 |
(230) Address of a (game) server to use.
| const byte ExitGames.Client.Photon.ParameterCode.ApplicationId = 224 |
| const byte ExitGames.Client.Photon.ParameterCode.AppVersion = 220 |
(220) Version of your application
| const byte ExitGames.Client.Photon.ParameterCode.Broadcast = (byte)LiteOpKey.Broadcast |
(250) Code for broadcast parameter of OpSetProperties method.
| const byte ExitGames.Client.Photon.ParameterCode.Cache = (byte)LiteOpKey.Cache |
(247) Code for caching events while raising them.
| const byte ExitGames.Client.Photon.ParameterCode.CheckUserOnJoin = (byte)232 |
(232) Used when creating rooms to define if any userid can join the room only once.
| const byte ExitGames.Client.Photon.ParameterCode.CleanupCacheOnLeave = (byte)241 |
(241) Bool parameter of CreateGame Operation. If true, server cleans up roomcache of leaving players (their cached events get removed).
| const byte ExitGames.Client.Photon.ParameterCode.ClientAuthenticationData = 214 |
(214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate
| const byte ExitGames.Client.Photon.ParameterCode.ClientAuthenticationParams = 216 |
(216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate
| const byte ExitGames.Client.Photon.ParameterCode.ClientAuthenticationType = 217 |
(217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate
| const byte ExitGames.Client.Photon.ParameterCode.Code = (byte)LiteOpKey.Code |
(244) Code used when sending some code-related parameter, like OpRaiseEvent's event-code.
This is not the same as the Operation's code, which is no longer sent as part of the parameter Dictionary in Photon 3.
| const byte ExitGames.Client.Photon.ParameterCode.CreateIfNotExists = 215 |
(215) Makes the server create a room if it doesn't exist. OpJoin uses this to always enter a room, unless it exists and is full/closed.
| const byte ExitGames.Client.Photon.ParameterCode.CustomEventContent = (byte)LiteOpKey.Data |
(245) Code of data/custom content of an event. Used in OpRaiseEvent.
| const byte ExitGames.Client.Photon.ParameterCode.Data = (byte)LiteOpKey.Data |
(245) Code of data of an event. Used in OpRaiseEvent.
| const byte ExitGames.Client.Photon.ParameterCode.EmptyRoomTTL = 236 |
(236) Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds.
| const byte ExitGames.Client.Photon.ParameterCode.EventForward = 234 |
(234) Optional parameter of OpRaiseEvent to forward the event to some web-service.
| const byte ExitGames.Client.Photon.ParameterCode.FindFriendsRequestList = (byte)1 |
(1) Used in Op FindFriends request. Value must be string[] of friends to look up.
| const byte ExitGames.Client.Photon.ParameterCode.FindFriendsResponseOnlineList = (byte)1 |
(1) Used in Op FindFriends response. Contains bool[] list of online states (false if not online).
| const byte ExitGames.Client.Photon.ParameterCode.FindFriendsResponseRoomIdList = (byte)2 |
(2) Used in Op FindFriends response. Contains string[] of room names ("" where not known or no room joined).
| const byte ExitGames.Client.Photon.ParameterCode.GameCount = 228 |
(228) Count of games in this application (used in stats event)
| const byte ExitGames.Client.Photon.ParameterCode.GameList = 222 |
(222) List of RoomInfos about open / listed rooms
| const byte ExitGames.Client.Photon.ParameterCode.GameProperties = (byte)LiteOpKey.GameProperties |
(248) Code for property set (Hashtable).
| const byte ExitGames.Client.Photon.ParameterCode.Group = LiteOpKey.Group |
(240) Code for "group" operation-parameter (as used in Op RaiseEvent).
| const byte ExitGames.Client.Photon.ParameterCode.IsInactive = (byte)233 |
(233) Used in EvLeave to describe if a user is inactive (and might come back) or not. In async / Turnbased games, inactive is default.
| const byte ExitGames.Client.Photon.ParameterCode.JoinMode = 215 |
(215) The JoinMode enum defines which variant of joining a room will be executed: Join only if available, create if not exists or re-join.
Replaces CreateIfNotExists which was only a bool-value.
| const byte ExitGames.Client.Photon.ParameterCode.LobbyName = (byte)213 |
(213) Used in matchmaking-related methods and when creating a room to name a lobby (to join or to attach a room to).
| const byte ExitGames.Client.Photon.ParameterCode.LobbyStats = (byte)211 |
(211) This (optional) parameter can be sent in Op Authenticate to turn on Lobby Stats (info about lobby names and their user- and game-counts). See: PhotonNetwork.Lobbies
| const byte ExitGames.Client.Photon.ParameterCode.LobbyType = (byte)212 |
(212) Used in matchmaking-related methods and when creating a room to define the type of a lobby. Combined with the lobby name this identifies the lobby.
| const byte ExitGames.Client.Photon.ParameterCode.MasterPeerCount = 227 |
(227) Count of players on the master server (connected to master server for this application, looking for games, used in stats event)
| const byte ExitGames.Client.Photon.ParameterCode.MatchMakingType = 223 |
(223) Modifies the matchmaking algorithm used for OpJoinRandom. Allowed parameter values are defined in enum MatchmakingMode.
| const byte ExitGames.Client.Photon.ParameterCode.PeerCount = 229 |
(229) Count of players in rooms (connected to game servers for this application, used in stats event)
| const byte ExitGames.Client.Photon.ParameterCode.PlayerProperties = (byte)LiteOpKey.ActorProperties |
(249) Code for property set (Hashtable).
| const byte ExitGames.Client.Photon.ParameterCode.PlayerTTL = 235 |
(235) Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds.
| const byte ExitGames.Client.Photon.ParameterCode.Position = 223 |
(223) Not used (as "Position" currently). If you get queued before connect, this is your position
| const byte ExitGames.Client.Photon.ParameterCode.Properties = (byte)LiteOpKey.Properties |
(251) Code for property-set (Hashtable).
This key is used when sending only one set of properties. If either ActorProperties or GameProperties are used (or both), check those keys.
| const byte ExitGames.Client.Photon.ParameterCode.ReceiverGroup = (byte)LiteOpKey.ReceiverGroup |
(246) Code to select the receivers of events (used in Lite, Operation RaiseEvent).
| const byte ExitGames.Client.Photon.ParameterCode.Region = (byte)210 |
(210) Used for region values in OpAuth and OpGetRegions.
| const byte ExitGames.Client.Photon.ParameterCode.Remove = LiteOpKey.Remove |
(239) The "Remove" operation-parameter can be used to remove something from a list. E.g. remove groups from player's interest groups.
| const byte ExitGames.Client.Photon.ParameterCode.RoomName = (byte)LiteOpKey.GameId |
(255) Code for the gameId/roomName (a unique name per room). Used in OpJoin and similar.
| const byte ExitGames.Client.Photon.ParameterCode.Secret = 221 |
(221) Internally used to establish encryption
| const byte ExitGames.Client.Photon.ParameterCode.SuppressRoomEvents = 237 |
(237) Optional parameter to suppress events Join and Leave for a room (which might be used as lobby/chat room then).
| const byte ExitGames.Client.Photon.ParameterCode.TargetActorNr = (byte)LiteOpKey.TargetActorNr |
(253) Code of the target Actor of an operation. Used for property set. Is 0 for game
| const byte ExitGames.Client.Photon.ParameterCode.UriPath = 209 |
(209) Path of the WebRPC that got called. Also known as "WebRpc Name". Type: string.
| const byte ExitGames.Client.Photon.ParameterCode.UserId = 225 |
(225) User's ID
| const byte ExitGames.Client.Photon.ParameterCode.WebRpcParameters = 208 |
(208) Parameters for a WebRPC as: Dictionary<string, object>. This will get serialized to JSon.
| const byte ExitGames.Client.Photon.ParameterCode.WebRpcReturnCode = 207 |
(207) ReturnCode for the WebRPC, as sent by the web service (not by Photon, which uses ErrorCode). Type: byte.
| const byte ExitGames.Client.Photon.ParameterCode.WebRpcReturnMessage = 206 |
(206) Message returned by WebRPC server. Analog to Photon's debug message. Type: string.


--- title: Part II Projects ---
I am happy to supervise Part II projects which are related to my research interests, general software engineering, or my personal interests (games, education, food/cooking, and aviation). While I would encourage anyone to come up with their own idea, this page contains some suggestions for projects below.
If you are interested in one of the projects on this page, a variation of one, or your own, feel free to send me an email. I would also be more than happy to answer any questions about the proposals on this page or to have an informal chat in person.
I have had or am currently having the pleasure of supervising the following Part II projects which might give you a general idea of the sorts of projects I supervise:
Copies of all completed dissertations may be found in the Computer Lab library.


Menu position will allow users to configure how dropdown view should be position when on dropdown expand. the following four types are available to configure dropdown, which are:
For change the default dropdown menu position simply bind, menuPosition
string into ng-dropdown
with any above mention type. default value for this configuration is bottom-left.
{{demoSnippet.menuPosition}}


Shoko
Help
Connection Options
This is the URL leading to where Shoko is running.
This field is auto-generated using the credentials. Only set this manually if that doesn't work!
Title Options
Main Title
Let Shoko decide
Preferred metadata language
Language in country of origin
Titles will fallback to Default if not found for the target language.
Alternate Title
Let Shoko decide
Preferred metadata language
Language in country of origin
Do not use alternate titles
Titles will fallback to Default if not found for the target language.
Synopsis Options
Remove links
Remove the line if it starts with ('* ' / '-- ' / '~ ')
Remove anything after Source, Note or Summary
Collapse excessive empty lines
Library Options
Series grouping
Do not group series
Make series merge-friendly with TvDB/TMDB
Group series based on Shoko's group feature
Warning:
Series merging must be enabled in the
library settings
when using this option.
Season ordering
Let Shoko decide
By release date
Mark special episodes with
SP
and the special number in the seasons they belong to
Box-set grouping
Do not group movies into box-sets
Group movies within Shoko's series only
Group movies in Shoko's groups and series
Movie ordering
Let Shoko decide
By release date
Disallow overlap of Movies and Series library types
Update watched status on Shoko (Scrobble)
Provider Options
Add AniDB Id to all entries
Tag Options
Hide art style related tags
Hide source related tags
Hide misc info tags that may be useful
Hide potentially plot-spoiling tags
Hide any miscellaneous tags
Save


My Movie List
Name
Image
Action
Adventure
Animation
Comedy
Detective
Fantasy
History
HFantasyorror
Musical
Pirate
Romantic
SCI-FI
War
Western
Release
Save


Tailwind Stimulus Components Examples
View on Github
To view examples locally, run yarn build
and then open docs/index.html
in your browser.
Slideovers
Modals
Open Modal
Large Modal Content
This is an example modal dialog box.
Tabs
Tab panel 1
Tab panel 2
Tabs with Anchors
Tab panel 1
Tab panel 2
Radios as Tabs
Tab panel 1
Tab panel 2
Tab panel 3


Using munki-trello with Git
16 Jun 2015So you’re managing your catalogs with munki-trello, but you also want to use git and git-fat to track the changes - what do you do?
If you were using the script that I posted previously, your changes would be mangled when you pull in changes - it turned out the solution was simple. I’m going to assume your Munki server has commit access to your Munki git repository. We’re pulling down the latest version of the git repo before performing any work, and then we’re git adding just the catalogs
and pkgsinfo
directories - the only directories munki-trello will modify.
If we schedule the below script to happen regularly (via cron), we also get our git changes deployed automagically.


Lunar Lander
See you in space, cowboy!
404
An Error Occured!
Looks Like you've reached the edge of space. There are no Easter Eggs out here. Go away.


Introduction: The Entrepreneurial Economy
I. The Practice of Innovation
1. Systematic Entrepreneurship
2. Purposeful Innovation and the Seven Sources for Innovative Opportunity
3. Source: The Unexpected
4. Source: Incongruities
5. Source: Process Need
6. Source: Industry and Market Structures
7. Source: Demographics
8. Source: Changes in Perception
9. Source: New Knowledge
10. The Bright Idea
11. Principles of Innovation
II. The Practice of Entrepreneurship
12. Entrepreneurial Management
13. The Entrepreneurial Business
14. Entrepreneurship in the Service Institution
15. The New Venture
III. Entrepreneurial Strategies
16. “Fustest with the Mostest”
17. “Hit Them Where They Ain’t”
18. Ecological Niches
19. Changing Values and Characteristics
Conclusion: The Entrepreneurial Society


Wade Wilson being held on no bond for Cape Coral murders
by WFTX Digital TeamFORT MYERS, Fla. -- The man accused of murdering two Cape Coral women last month made his first appearance on murder charges Wednesday in Lee County.
The state requested that Wade Wilson be held on no bond, and the judge agreed.
His next court date is scheduled for November 25th.
The judge also said that if he does somehow get out, he should have no contact with ex-girlfriend, MeLisa Montanez.
On Tuesday, a grand jury indicted Wade Wilson for the murders of Diane Ruiz and Kristine Melton.
RELATED: Wade Wilson demanding paid interview


1. Demultiplexing¶
Introduction¶
There are many ways in which metabarcoding libraries may be sequenced. If you are using the example data, we are going to work here with a library preparation pipeline that involved indexing amplicons during initial PCR, such that each sample had a different 6-base index within a library. Once sequenced, we need to use these index sequences to separate out different samples. This process is called demultiplexing. In this case, the amplicons were sequenced using paired-end sequencing, meaning the two ends of each fragment were read, working inwards. We have eight sequence files received from our sequencing facility, one for each read direction for each of four libraries.
I don’t have multiplexed data!
If you are following along with your own data, this step only applies if the sequence files you have contain data from multiple samples. Generally this happens if you multiplex your samples together during first-round PCR as well as the multiplexing that happens as part of library preparation. The sequencer generally demultiplexes library preparation multiplexing, so if you did not multiplex during first round PCR, you can probably skip this step and go straight to 2. Primer removal
Data and software
This tutorial works with raw FASTQ-format sequence data that contains indices at the beginning of the reads. The example data for this can be found in the 0_rawsequences
directory within the sectionA archive. You should copy this directory over to your working directory as follows:
cp -r path/to/exampledata/sectionA/0_rawsequences/ ./
If you are completely new to sequence data, you might at this point want to review the FASTQ format
This tutorial uses the cutadapt software.
Primers and indices¶
Each of these libraries is actually three different metabarcoding samples. Each sample within each library was amplified with a different 6-base index. You can see these indices in the indices.txt
file within the 0_rawsequences/
directory. First, change into the 0_rawsequences/
directory and then view the file:
cd 0_rawsequences/
cat indices.txt
The cat
command simply outputs the entire contents of the files it is given, one after the other. Here we’re using it to just output the content of one file, but look out for this command later!
We can use the grep
command to check for indices in a file (see here for more detail on this). Select any of the starting FASTQ files and run the following on it to search for the AAGAGG
index
head -n 24 file.fastq | grep -E "AAGAGG|$"
You should see the index sequence bolded at the beginning of a sequence. You might also see it elsewhere in sequences - it’s such a short base sequence it’s completely possible that real sequence reads contain this motif. If you see no bolded text, try a different FASTQ file.
When we did PCR, the index was part of the primers used, so that the reaction added this sequence to our amplicons when copying them. The primer binding sequences used for this metabarcoding reaction were (don’t run these!):
Forward(R1)
CCNGAYATRGCNTTYCCNCG
Reverse (R2)
TANACYTCNGGRTGNCCRAARAAYCA
Note the presence of non ATCG bases - these are ambiguities added to the primers to allow them to be less specific and bind to a greater variety of taxa. The indices are not shown here: they would go at the start of the primer binding sequence.
Exercise
- Use the grep command to search for the primer sequence in a file. Note that ambiguities (any base apart from ATCG) should be replaced with a
.
(full stop) which is a special character in Regular Expressions meaning “any character”. - Look at a few different libraries, both forward and reverse, both index and primer.
If you get stuck, look at the solution below.
Solution
head -n 24 input_R1.fastq | grep -E "CC.GA.AT.GC.TT.CC.CG|$" head -n 24 input_R2.fastq | grep -E "TA.AC.TC.GG.TG.CC.AA.AA.CA|$"
You’ll probably see that there are occasions where no index or primer is highlighted on a sequence. This means there was a sequencing error. Look closely and you’ll see that a base is missing or inserted, or just wrong.
Demultiplexing¶
We want to split each of these libraries up by index into a separate pair of files for each of the 12 samples, and remove the index sequences. We will do this using the tool cutadapt. This versatile tool allows separating files by index and removal of these indices and primers. It can allow for some error in the index sequence, and can keep read pairs in sync (more on this later).
As ever with a new tool, first cast your eye over the help, either online or by running:
cutadapt --help
It’s quite long, but at least read the first section to get acquainted with it. Don’t worry, we’re going to give you a command shortly, but before we do it’s helpful to think about exactly what our data is and what we want to do:
- We have paired data
- Our indices are at the beginning of the reads
- We have multiple indices (cutadapt calls them ‘adapters’)
- We want to output a different file for each index
Cutadapt has settings for all of these situations. It will allow reading two files as input, and will ensure that pairs of reads in these files are kept in sync. Indices at the beginning of reads are specified using -g
(or -G
for the second file of reads), we can specify these multiple times, and name different adapters. We also specify that the adapters are right at the beginning, with no gaps, using a ^
symbol. We can specify that we want output files depending on the combination of adapters found using the -o
and -p
options for the first and second files respectively.
To avoid a mess of files, make sure you’re in the parent directory, then create a new directory. Call this new directory something appropriate. If you’re unsure how to do this check the solution box below.
Solution
cd ../ # Change working directory to the parent of the current working directory mkdir 1_demux # Create a new directory called 1_demux
Referring to the indices.txt file, we can now construct a command that demultiplexes our Lib1. The following commands assume that you are in the directory that contains the 0_rawsequences
directory and an empty directory called 1_demux
. Let’s first try and demultiplex a single file. Carefully examine the following command and look at the help file to make sure you’re clear on what each of the arguments is doing.
Then, type in the command. Reminder: we used the \
to split the command over multiple lines. You can either type this and press enter afterwards, or you can just ignore it and continue typing the command all in one long line (without pressing Enter until you’re done). Finally, run the command and inspect the terminal output and make sure you understand what it’s saying.
- List the files in the demux directory, and run the grep command to see the read numbers per file. Check the solution below if you’re not sure how to do this.
Solution
ls 1_demux/* grep -c "^@D00" 1_demux/*
Are there more files than expected? This is because the command has looked for all adapter combinations. When we have 3 different forward indices and 3 different reverse indices, there are 9 different combinations possible. Add on top of this that there are 6 possibilites where only a forward or a reverse index is used, plus the possibility where no indices are used. Hence you should have 16 file pairs.
Note
Some researchers use all of these different combinations to efficiently apply few indices to identify many many different samples. However, this makes it much harder to spot errors. We don’t have any valid sequences that use different forward and reverse indices, yet the demultiplexer has found many: these are errors in the sequencing. The sequencer has mistakenly associated some reads as the same fragment when they aren’t - they actually come from two different samples, hence some files with two different sample names. And in some cases, no index can be found on one or both of a paired read, probably due to a sequencing error. These are marked as unknown.
Happily, all of these errors are in a distinct minority, and the majority of reads have been allocated to files for our samples. If we had used all 9 combinations, we wouldn’t have been able to spot many of these errors!
If you add all of the read counts up, you’ll notice we’re missing some reads from our original files: these had no mate pair and were completely discarded.
Exercise
- Construct three more cutadapt commands to demultiplex the other three libraries, placing the outputs into the same demultiplexing output directory as for the first library.
- List the contents of the directory and check the read numbers per file again
Cleaning up¶
You should now have lots of files in your output directory. It’s good practice to keep track of how demultiplexing performed: you could try to write a command that saves the output of your previous grep command into a file to keep a record (see the solution box below if you’re not sure how to do this).
Solution
grep -c "^@D00" 1_demux/* > output.txt
Let’s get rid of the files we don’t need. You’ve doubled the amount of storage you’re using - here the files aren’t very large but if you were doing this with a standard dataset, directories would fill up quickly. Navigate to the demux folder, very carefully copy the following command and run it. It works through the files, extracting the first and second sample name, then deletes the file if they don’t match. You do not need to type any #comments
, or add the extra spaces - this is just to make it clearer.
for f in *; # loop through files do s1=${f%-*}; s2=${f%_*}; # extract sample names s2=${s2#*-}; if [ $s1 != $s2 ]; # check if different then rm $f; # delete if different else mv $f ${f#*-}; # keep if same, removing first part of name fi; # end if clause done # end loop
This isn’t a crucial bioinformatics step, it’s just to tidy things up. You don’t need to understand everything about this command, although the loop syntax is going to crop up frequently. If you’re keen to try and figure this out, you might want to review the page on loops in bash, making sure to read about parameter substitution
Finally, to remove the files beginning with unknown
, run:
rm unknown*
These files contain the sequences for which no index was identified - we’re not interested in keeping them.
Next steps¶
We have generated a set of paired files, each containing the forward or reverse reads of the sequences we are confident belong to a specific sample.
If you’d like to explore more cutadapt parameters, there are some further cutadapt exercises here, but this isn’t necessary for the next step.
Next we remove the primers from the sequences in these files: 2. Primer removal.


Instructors Online Tools Syllabus (pdf) Students GitHub Slack Projects Showcase Resources Exams ISVC
| Study Net Study.net has some of the reading materials required for the course. |
| GitHub GitHub, Git, & Bash: ; Class Install and configure Git & Bash |
| Anaconda with Jupyter Notebooks & Python3. Python 3 Docs |
| iSchool Virtual Campus (ISVC) |
| Student Google Group Email Use Google Group Email to formally communicate with your instructors and classmates, ask questions, share problems and your successes (but don’t share code). |
| Instructor group email |
| Slack Use Slack to informally communicate with your classmates, ask questions, share problems and your successes (but don’t share code). |
Student Roster:
| Week | Readings | Homeworks | Other |
|---|---|---|---|
| May 7-11 | Lubanovic, Chapter 1, Command Line Notes, Merge Conflict Resolution | On ISVC GitHub Link after the live session. | |
| May 14-18 | Readings: Lubanovic, Ch 2 and beginning of 4 (upto 'cancel with break'); String formatting cookbook | Homework Unit 1 due: 11:59 before live session | |
| May 21-25 | Lucanovic, Ch 3 | Unit 2: Due, 11:59 | Makeup session for Monday section, tba |
| May 28-Jun 1 | Lubanov, Ch 4 | Unit 3: Due 11:59 pm | |
| Jun 4-8 | Lubanovic, Ch 4 (functions) | Unit 4: Due 11:59 pm | |
| Jun 11-15 | Goodrich et al. Data structures | Unit 5: Due 11:59 pm | |
| Jun 18-22 | Lubanovic, 6 (thru “method types”) | Unit 6: Due 11:59 pm | |
| Jun 25-29 | Lubanovic, Ch 6 and Link and Link | Project 1 proposal is due; HW 7 due, 11:59 pm | Exam 1 open window starts for week |
| Jul 2-6 | Lubanovic, ch 7-8 (thru .json) | Exam 1 due before live session | Make-up for Monday section (tba) |
| Jul 9-13 | None | Project 1 presentation | Submit code/materials 11:59 the day after |
| Jul 16-20 | None | Project 2 is assigned | Unit 9 due |
| Jul 23-27 | None | Project 2 proposal due; HW 10 due. | |
| Jul 30-Aug 3 | McKinny, ch 10 | Exam 2 open window starts | HW units 11, 12, and 13 due |
| Aug 6-10 | Lubanovic, Ch 12 | Project 2 presentation in live session; submit work by next day | Exam 2 due: 11:59 pm, Sunday Aug 11. |
| Visit link for latest updates, if any, to calendar dates. |
Intro to Programming,
Command Line, Source Code
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
Homework 1: Due 11:59 pm Pacific Time - the day before your live session
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Homework 2: Due 11:59 pm Pacific Time.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Homework 3: Due 11:59 pm Pacific Time - the day before your live session.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
Functions
Homework 4: Due 11:59 pm Pacific Time - the day before your live session.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Complexity
Homework 5: Due 11:59 pm Pacific Time - the day before your live session.
Start Project 1 is assigned.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Classes
Homework 6: Due 11:59 pm Pacific Time - the day before your live session.
Video AsyncLive session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
8 ?
Object-Oriented Programming
Homework 7: Due 11:59 pm Pacific Time - the day before your live session.
Project 1 proposal - the day before your live session.
Exam 1 starts. One week window once the link is active; a 24-hour window to complete once you start.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Working with text & binary data
Exam 1 is due before your live session.
Monday section: make-up class to be scheduled.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
NumPy
NumPy
Present your project 1 in the live session. Submit your code & presentation materials by 11:59 PDT the day after your live section.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Data Analysis with Pandas
Homework 9: Due 11:59 pm Pacific Time - the day before your live session.
Start: Project 2 is assigned.
Video AsyncLive session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Plotting & Visualization
Homework 10: Due 11:59 pm Pacific Time - the day before your live session.
Project 2 proposal is due - the day before your live session.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
Pandas Aggregation & Group Operation
Exam 2 starts: distributed on ISVC; 24 hours to complete once you start.
Homeworks 11, 12, and 13 are due 11:59 pm - the day before your live session.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
TOPIC
Testing
Project 2 Presentation in your life session.
Project 2 Report is due - 11:59 PDT - the day after your life session.
Exam 2 is due - 11:59 pm PDT, Sunday, Aug 11.
Live session slides.
Zoom Links:
Sec 1.
Sec 2.
Sec 3.
Sec 4.
Dates: Jun 25-29 (1 week window)
Dates: Jul 20-Aug 3
Due before your next class
See this sheet for latest updates, if any, to calendar dates.
Review Sheets: Python, NumPy, Pandas - review sheets.
Other resources [tba]
2019 Contact GB. [Summer ‘19 test version] Generated on .


Pakistan listed in top five at #TechWomen19
by Azifa AyazIf you could solve one problem in your country, what would it be was a question asked at the beginning of #techwomen19 as emerging leaders gathered to present their action plan and the process of strategising the solution to that one problem.
Team Pakistan not only presented but was also listed amongst the top five pitches.  Their mission is to make every child safe which has been on a rise as per the recent report by the Pakistani government.

“We will manufacture wristbands for child protection, create community hubs and an AI chatbot for children, and deliver training for parents and teachers on recognizing and reporting child abuse,” said the team in their interview to TechWomen.
During the action planning process, the teams showcased their projects alongside Impact Coaches and developed their cases over the duration of four weeks. The teams were then given a chance to then win themselves a seed-grant that would support them in implementing their projects back home.
While other teams also presented innovative ideas that were a problem in their relevant countries. Team Kazakhstan was hoping to open their country’s first-ever interactive science exhibition for kids, Team South Africa was looking to educate the young men about gender violence in their country. Team Lebanon addressed the country’s water crisis and wanted to develop science-based groundwater quality management and guidelines. And finally, Team Zimbabwe was looking to support and encourage girls with disabilities to participate in STEM.
Team Pakistan comprised of Asmara Rahat, Asna Javed, Ayesha Mumtaz Khan, Farhat Yasmeen, and Zeenat Anjum with expertise ranging from IT to AI and digital media.
The TechWomen program has seen 10 fellows since 2017 from Pakistan with impactful stories in hopes of empowering women and young girls especially.


Class: Aws::EMRServerless::Types::UpdateApplicationRequest
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb |
Overview
Constant Summary
Instance Attribute Summary
-
#application_id ⇒ String
rw
The ID of the application to update.
-
#architecture ⇒ String
rw
The CPU architecture of an application.
-
#auto_start_configuration ⇒ Types::AutoStartConfig
rw
The configuration for an application to automatically start on job submission.
-
#auto_stop_configuration ⇒ Types::AutoStopConfig
rw
The configuration for an application to automatically stop after a certain amount of time being idle.
-
#client_token ⇒ String
rw
The client idempotency token of the application to update.
-
#image_configuration ⇒ Types::ImageConfigurationInput
rw
The image configuration to be used for all worker types.
-
#initial_capacity ⇒ Hash<String,Types::InitialCapacityConfig>
rw
The capacity to initialize when the application is updated.
-
#maximum_capacity ⇒ Types::MaximumAllowedResources
rw
The maximum capacity to allocate when the application is updated.
-
#network_configuration ⇒ Types::NetworkConfiguration
rw
The network configuration for customer VPC connectivity.
-
#release_label ⇒ String
rw
The Amazon
::Aws::EMR
release label for the application. -
#worker_type_specifications ⇒ Hash<String,Types::WorkerTypeSpecificationInput>
rw
The key-value pairs that specify worker type to
WorkerTypeSpecificationInput
.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#application_id ⇒ String
(rw)
The ID of the application to update.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#architecture ⇒ String
(rw)
The CPU architecture of an application.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#auto_start_configuration ⇒ Types::AutoStartConfig (rw)
The configuration for an application to automatically start on job submission.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#auto_stop_configuration ⇒ Types::AutoStopConfig (rw)
The configuration for an application to automatically stop after a certain amount of time being idle.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#client_token ⇒ String
(rw)
The client idempotency token of the application to update. Its value must be unique for each request.
A suitable default value is auto-generated. You should normally not need to pass this option.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#image_configuration ⇒ Types::ImageConfigurationInput (rw)
The image configuration to be used for all worker types. You can
either set this parameter or imageConfiguration
for each worker
type in WorkerTypeSpecificationInput
.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#initial_capacity ⇒ Hash
<String
,Types::InitialCapacityConfig> (rw)
The capacity to initialize when the application is updated.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#maximum_capacity ⇒ Types::MaximumAllowedResources (rw)
The maximum capacity to allocate when the application is updated. This is cumulative across all workers at any given point in time during the lifespan of the application. No new resources will be created once any one of the defined limits is hit.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#network_configuration ⇒ Types::NetworkConfiguration (rw)
The network configuration for customer VPC connectivity.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#release_label ⇒ String
(rw)
The Amazon ::Aws::EMR
release label for the application. You can change the
release label to use a different release of Amazon EMR.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end
#worker_type_specifications ⇒ Hash
<String
,Types::WorkerTypeSpecificationInput> (rw)
The key-value pairs that specify worker type to
WorkerTypeSpecificationInput
. This parameter must contain all
valid worker types for a Spark or Hive
application. Valid worker
types include Driver
and Executor
for Spark applications and
HiveDriver
and TezTask
for Hive
applications. You can either set
image details in this parameter for each worker type, or in
imageConfiguration
for all worker types.
# File 'gems/aws-sdk-emrserverless/lib/aws-sdk-emrserverless/types.rb', line 1447
class UpdateApplicationRequest < Struct.new( :application_id, :client_token, :initial_capacity, :maximum_capacity, :auto_start_configuration, :auto_stop_configuration, :network_configuration, :architecture, :image_configuration, :worker_type_specifications, :release_label) SENSITIVE = [] include Aws::Structure end


We appreciate our fellow customers and are offering a discount of 10% on online orders for the week!
Happy Customer Appreciation Week!
We appreciate our fellow customers and are offering a discount of 10% on online orders for the week!
Happy Customer Appreciation Week!


4 students charged in bathroom attack on Kentucky schoolmate
by Associated PressLOUISVILLE, Ky. (AP) — An 18-year-old Kentucky high schooler has pleaded not guilty to second-degree assault and criminal mischief in an assault on a reportedly autistic classmate.
News outlets report Damon Simmons is accused of attacking the Iroquois High student on Thursday with the help of three juvenile students. An arrest citation says surveillance video shows Simmons and the other students enter a bathroom at the Louisville school after the victim. Another student later found the victim lying in a pool of blood in the bathroom.
The victim’s sister told WAVE-TV that her brother is on the autism spectrum. The victim told authorities that he didn’t know his attackers. He has since undergone surgery for a fractured jaw and the loss of several teeth. WLKY-TV reports related charges have been filed against the juveniles.


Pablo Escobar’s legacy 25 years on: Tributes and disgust
On December 2, 1993, Pablo Escobar was killed, ending the life of one of the world’s most notorious outlaws
-
25 years ago:
Drug lord Pablo Escobar was killed 25 years ago, ending the life of one of the world’s most notorious outlaws,
responsible for an unprecedented number of deaths and a bomb attack in Colombia.
-
Some good:
But overcoming Escobar’s legacy is not easy and in his hometown of Medellin, residents who live in homes he built for
them are planning heartfelt tributes to mark Sunday’s anniversary.
-
Testimony:
“He was a good person who also had to do bad things, otherwise he would have been killed earlier. He helped many,”
Emanuel Lara Rodriguez, a Mexican tourist in Colombia told Al Jazeera.
-
How he died
Escobar was killed in a rooftop shoot-out with police and army soldiers in Medellin on December 2, 1993, one day after
his 44th birthday and five months after he appeared on Forbes magazine’s list of the world’s richest people for the
seventh time.
“I can replace things, but I could never replace my wife and kids.” - Pablo


View Details
Cluster
Id
Host
Loading...
Topic
Partition
Replicas
ISRs
Loading...
View
Setting
Value
Key
Value
Partitions
Filter
Name
Results per Partition
[[${view.resultsPerPartition}]]
Format Dates


ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
Part Ⅱ 建库与测序信息
2.1方法描述
Total RNA was treated with RQ1 DNase (promega) to remove DNA. The quality and quantity of the purified RNA were determined by measuring the absorbance at 260nm/280nm (A260/A280) using smartspec plus (BioRad). RNA integrity was further verified by 1.5% Agarose gel electrophoresis.
For each sample, 10μg of total RNA was used for RNA-seq library preparation. Polyadenylated mRNAs were purified and concentrated with oligo(dT)-conjugated magnetic beads (invitrogen) before used for directional RNA-seq library preparation. Purified mRNAs were iron fragmented at 95℃ followed by end repair and 5' adaptor ligation. Then reverse transcription was performed with RT primer harboring 3' adaptor sequence and randomized hexamer. The cDNAs were purified and amplified and PCR products corresponding to 200-500 bps were purified, quantified and stored at -80℃ until used for sequencing.
For high-throughput sequencing, the libraries were prepared following the manufacturer's instructions and applied to illumina NextSeq 500 system for 151 nt pair-end sequencing by ABlife. Inc (Wuhan, China).
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
2.2 建库部分结果展示
2.2.1 电泳检测
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
2.2.2 mRNA/ncRNA捕获
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
2.2.3 cDNA文库
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
结果展示:
Table 2.2. Obtain the high-quality clean reads
(表2.2：获得高质量的有效序列)
Sample
Raw data
Clean reads
clean ratio
uniqtag
Normal_5
55935904
34381801
61.47%
29984069 (87.21%)
Acute_11
59933534
37648510
62.82%
31198307 (82.87%)
Acute_13
61600980
46332397
75.21%
32301230 (69.72%)
Acute_14
58965068
41068944
69.65%
26106893 (63.57%)
Acute_15
61463922
39631158
64.48%
25943149 (65.46%)
Normal_3
41506308
33467594
80.63%
25142626 (75.13%)
Chronic_8
45152864
33730612
74.70%
25463607 (75.49%)
Chronic_6
45491400
36597709
80.45%
26039596 (71.15%)
Chronic_7
42037788
32531520
77.39%
23716985 (72.90%)
Chronic_9
57552342
41135625
71.48%
25027170 (60.84%)
Chronic_10
57978028
36103120
62.27%
19130283 (52.99%)
Acute_12
64615906
48212364
74.61%
28851925 (59.84%)
Normal_2
42185520
32961659
78.14%
25326361 (76.84%)
Normal_4
42099614
34261878
81.38%
25171840 (73.47%)
Normal_1
33964190
27064427
79.69%
20998625 (77.59%)
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
Part Ⅲ 转录组测序项目结果-基础分析
3.1 RNA-seq高通量测序数据质量分析
3.1.1 Clean reads测序质量分析
方法描述
Note: Sequencing quality distribution：
y- axis represents the sequencing quality score , it was calculated through the following formula ：
Where p is the probability that the corresponding base call is incorrect, x-axis represents each position of the read(bp), when the Q_(solexa-prior to v.1.3)= 28，the p=0.001582385
Sequence content distribution:
y- axis represents the percentage of each kind of nucleotide, x-axis represents each position of the read(bp)
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
ABLIFE TRANSLATES SEQUENCE TO SCIENCE AND INDUSTRY
3.2.7 基因表达情况
方法描述：
RPKM (Reads per kilo base of a gene per million reads)，表示每百万 reads 中来自于某基因每千碱基长度的 reads 数，表征基因的表达丰度。通过对mRNA长度和测序深度进行均一化(RPKM)，使不同测序样本之间的表达丰度具有可比性，消除了因mRNA长度和不同样本之间测序丰度差异带来的偏差。


Develop: Test and review
Now that your prototype is done, it is time to participate in feedback. You will be assigned a few prototypes to review. Your prototype will also be reviewed by your classmates. This is an opportunity to practice receiving and interpreting feedback. A critique of your work might be stressful at first, but it is one of the most common, and useful processes in design.
Instructions
- Provide feedback to your assigned prototypes based on the following criteria:
- Are you able to clearly understand the relationship between the app and the ritual? Why or why not?
- Does the app seem integral to the ritual? Why?
- What affordances does that app provide for a typical user.
- Read the feedback you have been given. To plan a course of action, you can categorize what was said in four categories: compliment, advice, criticism, and suggestion. Based on which category the feedback lands, you can analyze how to make decisions to improve your work.
Post work to the Studio
Use the file format indicated in each step. You must obtain prior approval to deviate from these upload requirements. Please check that your work has uploaded properly.
- Post the corresponding feedback to your assigned feedback group member's assignment submission as a comment in Studio.
- Combine all the feedback you've written and upload to this assignment's submission text field or upload a MS Word document.


Hi! My name is Akram Hossen. Welcome to my personal page that i have disigned showcase my skill and exprience


Limited edition shipments of Random Shopper. For the holidays.
29 Nov, 2013
It’s Black Friday, the sale that heralds the holiday season. Perhaps you’re eyeing some designer clothing, a fancy new videogame console, or a stand mixer for your kitchen.
But maybe it doesn’t matter what you buy. Maybe it’s the act of buying that’s what’s important.
Random Shopper was a project I ran a year ago. I wrote a computer program that spent $50 each month buying and sending me random books, CDs, and DVDs from Amazon. I sure did get a lot of random stuff.
Now you too can play Russian roulette with your consumerist instincts.
Buy a Print
I am offering 50 limited edition “prints” of the Random Shopper project. Each print costs $400. I will run the Random Shopper algorithm with an address of your choice instead of my own, and a single purchase of random stuff will be sent to that address.
It’s the perfect gift for that certain someone in your life who, when asked what they want for the holidays, responded, “A trenchant critique of consumer culture.”
You’ll get:
$100 (give or take a few bucks) worth of random books, CDs, and DVDs sent to the mainland United States address of your choice, operating on the original Random Shopper algorithm. (The algorithm guarantees at least two items, and you may get many more.)
A numbered certificate, ink-signed by me, along with a list of the shipped items chosen by the algorithm. This comes in a separate shipment, and the list of items will be physically obscured so as not to spoil the surprise.
An email from me with estimated arrival dates for your shipment(s) (there may be more than one shipment).
This is a limited time offer, available between now and Jan 1, 2014. Happy holidays.