UKCloud Limited (“UKC”) and Virtual Infrastructure Group Limited (“VIG”) (together “the Companies”) – in Compulsory Liquidation
On 25 October 2022, the Companies were placed into Liquidation with the Official Receiver appointed as Liquidator and J Robinson and A M Hudson simultaneously appointed as Special Managers to manage the liquidation process on behalf of the Official Receiver.
Further information regarding the Liquidations can be found here: https://www.gov.uk/government/news/virtual-infrastructure-group-limited-and-ukcloud-limited-information-for-creditors-and-interested-parties
Contact details:
For any general queries relating to the Liquidations please email<EMAIL_ADDRESS>For customer related queries please email<EMAIL_ADDRESS>For supplier related queries please email<EMAIL_ADDRESS>How to use NetworkPolicy objects to connect services between projects
Overview
By default you'll find NetworkPolicy objects, named allow-from-same-namespace
and allow-from-ingress-routers
in every project created after the cluster is deployed (in clusters deployed since May 2021). The effect of these is to ensure that pod IPs and services are only accessible from pods inside that same project, or via routes.
This document refers to namespaces and projects. A project is an OpenShift construct on top of a Kubernetes namespace. For the purpose of this guide you can think of them as the same thing, however, you must apply the oc label
commands that you perform on a namespace to the namespace object; they will not work if you attempt to apply them to the project object.
Note
If your OpenShift v4 cluster was deployed before May 2021 and you'd like the NetworkPolicy objects added to the default project template, raise a service request via the My Calls section of the UKCloud Portal.
Interacting with NetworkPolicy objects
You can interact with NetworkPolicy objects from the command line using the full name NetworkPolicy or short name netpol, for example:
oc get netpol
- List NetworkPolicy objects in the current project.
oc describe netpol <name>
- Provides more detailed information on the named NetworkPolicy object.
oc get netpol <name> -o yaml
- Provides yaml output of the named NetworkPolicy object. Useful to reference existing rules when creating new objects.
Note
If you delete the default NetworkPolicy objects from a project, that project's Pod IPs and services will be accessible from all other projects. This is not recommended; it's preferable to explicitly specify additional NetworkPolicy objects to enable the required cross-project communication. Only users with cluster-admin priviledges can add, edit or delete NetworkPolicies from a project.
Example of connecting services from two different projects
NetworkPolicy objects are scoped at the project level. This means if you create a NetworkPolicy object using a template it will be created inside the project you're in and the rules will apply to pods within that project. The object without any rules will look like the following:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: <desired_name_of_networkpolicy>
namespace: <desired_project> #(if not provided this will default to the project you are in when you run oc create)
spec:
Inside the spec key, you can pass in rules that determine what the NetworkPolicy object does.
Matching specific pods using podSelector clauses
You can use this to match all pods in a project, or alternatively to match all pods with a certain label. You can leave the key blank to match all pods in a project or you can match all pods with a certain label. In our example, we want to match pods with the label role=webserver
:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: webserver-ingess
namespace: database
spec:
podSelector:
matchLabels:
role: webserver
Matching all pods in specific projects using namespaceSelector clauses
Alternatively, you may want to allow all pods in one or more project(s) to connect to a service inside the "database" project. To do this, use a namespace selector, which evaluates projects based on a label. In our example, we're going to be looking for the namespace label webserveraccess=true
. First, we need to ensure that this label is applied to one or more project(s) using the following command:
Note
Your user must have cluster-admin privileges to add labels to namespaces and to create NetworkPolicies.
oc label namespace exampleproject webserveraccess=true
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: webserver-namespace-access
namespace: database
spec:
namespaceSelector:
matchLabels:
webserveraccess: true
In our example, we've saved our templates in files called netpol.yaml
. Use the following command to create the object, substituting in the relevant filename:
oc create -f netpol.yaml
Note
You can test connectivity by curling the desired target service from the terminal of a pod that has been allowed access to the service. You can find the terminal in the UI or use oc rsh
to enter the pod.
Further information
To get a full understanding of NetworkPolicy objects in OpenShift v4 we recommend reading: https://docs.openshift.com/container-platform/4.9/networking/network_policy/about-network-policy.html
Feedback
If you find a problem with this article, click Improve this Doc to make the change yourself or raise an issue in GitHub. If you have an idea for how we could improve any of our services, send an email to feedback@ukcloud.com.


Your login or password was entered incorrectly.
Please try again or call the OSU Medical Library at<PHONE_NUMBER>.
Off Campus Login
O-Key email address:
O-Key password:
O-Key Account Activation


Toggle navigation
Mars Admin
5
Notifications
17
Dashboard
Charts
12
Forms
UI Elements
Elements
Icons
24
Tables
Data Tables
Regular Tables
11
Calendar
Login Page
User Alerts
Settings
Logout
Forms
Home
Bread
Crumbs
Example
Basic Form
First Column
Second Column
Regular Input
Password
Disabled
Select Box
France
Italy
Brazil
Portugal
Sweden
Checkboxes
1
2
3
Radio Buttons
United Kingdom
Australia
Primary Button
Cancel Button
Horizontal Form
Text Field
Password
Disabled
Select Box
France
Italy
Brazil
Portugal
Sweden
Remember me
Primary Button


John James Audubon, born April 26, 1785 in Les Cayes, in what is now Haiti, was an American naturalist and a painter, known for his extensive studies and documenting all types of American birds. At the age of eighteen, the son of a French sea captain, John James Audubon came to United States because of the war that broke out between France and England.
Learn MoreJohn James Audubon, also known as Jean-Jacques Audobon, was one of the major contributors of masterpieces to American art. With an avid interest in birds and drawing right from his childhood days, Audubon went on to be the most distinguished illustrator of the 19th century. Venturing into nature and observing, he explored different American birds and documented them.
Learn MoreHis most well-known work is a color-plate book named The Birds of America that contains illustrations of a various species of American birds. In order to print The Birds of America, Audubon had to sail from New Orleans to Liverpool with his portfolio of more than 300 drawings.As a result, in 1826, he raised enough money to publish his Birds of America which consists of 435 hand-colored, life-size prints of 497 bird species which were made from engraved copper plates of different sizes.
Learn MoreWhat is this Exhibition about?
This exhibition is dedicated to the memory of John James Audubon, organized by Meghan Doherty, and is taking place at the Berea College library. The purpose of this exhibition is to show off the artwork and plates of the naturalist, John James Audubon. Bringing together materials from the College Art Collection and Special Collections and Archives, this exhibition explores the work of John James Audubon within the larger context of the history of natural history. Beginning with one of the first accounts of the fauna of the Americas and ending with a print made on Berea College’s campus, this exhibition situates Audubon’s monumental work into a larger conversation about the natural history of North America.
Learn More


John is a senior at UCSD. He is a software engineer at XY Find It. He specializes in web and app design. He plays multiple instruments such as piano, saxophone, and guitar.


[gecode-users] fzn-gecode and float_lin_eq
Tommy Persson
tommy.persson at liu.se
Wed Sep 17 10:16:32 CEST 2014
On 2014-09-17 01:48, Guido Tack wrote:
> The constraint float_lin_eq is a linear constraint, i.e. you can't
> use it to multiply to float variables. You have to use float_times
> instead, which has the following signature:
>
> predicate float_times(var float: x, var float: y, var float: z)
>
> and which posts the constraint z = x*y.
>
Thanks for that information.
I really tried to read flatzinc documentation, read gecode documentation
and google to find what was supported in fzn-gecode but could not find
float_times.
E.g:
https://www.minizinc.org/downloads/doc-1.3/flatzinc-spec.pdf
does not mention it.
So where should I look to find a complete list of supported predicates?
/Tommy Persson
More information about the users
mailing list


It is pretty rare to actually have to dive into the objc-runtime for any day to day coding. Most developers wont have to touch the runtime, however it is helpful to know what is possible and be able to use it if required. The objective-c runtime is written in C and is how the underlying parts of the objective-c language work including message sending, ivars and properties. This post shows an example of where I have used the Objective-C runtime in one of my projects.
One example of where I have used the runtime in my projects is the validation code in DBValidator
. The validation code is implemented as a category on NSObject
called NSObject+DBValidator
. This is so we can add validation rules to any objective-c object. The only problem with this approach is that you can’t add any properties or ivars to an object using a category.
We can work around this limitation by using the objective-c runtime directly.
Below is the implementation of the NSObject+DBValidator
category:
We have a @property
defined in the header called validationRules
and we override both the setter and getter in the implementation. In the setValidationRules:
method we use a C function from the objective-c runtime called objc_setAssociatedObject
. This function allows us to set a reference on the self
object. We give it a key, the object (in this case the validationRules
passed to the method) and the association policy.
The valid options for the association policy are:
enum {
OBJC_ASSOCIATION_ASSIGN = 0,
OBJC_ASSOCIATION_RETAIN_NONATOMIC = 1,
OBJC_ASSOCIATION_COPY_NONATOMIC = 3,
OBJC_ASSOCIATION_RETAIN = 01401,
OBJC_ASSOCIATION_COPY = 01403
};
Notice how these options map directly to @property
storage options! We are using OBJC_ASSOCIATION_RETAIN_NONATOMIC
because we want our NSObject
to retain the validation rules that are set on it.
In our validationRules
method, we use a similar call from the objective-c runtime called objc_getAssociatedObject
. This allows us to retrieve the object we set a reference to in the preious method. We have to pass the parent object and the key for the associated object we want. We return an empty array if validation rules are not yet set for this object.
Check out the full source code in the DBValidator GitHub Project


The Custom element ColorPicker widget allows you to easily pick a color.
Color Modes
Saturation Color Mode
Hue Color Mode


%inherit file="base.html"/> <%def name="title()"> Welcome to Extrasolar! %def> <%def name="head()"> %def> <%include file="signup_form_dialogs.html"/>
|
With the reach of the Internet, the eXoplanetary Research Institute (XRI) is crowdsourcing exploration of Epsilon Prime. With your assistance, we can unlock the secrets of this alien world, one photo at a time.
% if gift_error is not UNDEFINED:
${gift_error}
% endif
% if invite is not UNDEFINED: You have received an exclusive invitation from ${invite.sender.first_name} ${invite.sender.last_name}. Please complete the form below to confirm your participation. You must use a valid email address. % endif
% if signup_error is not UNDEFINED:
${signup_error}
% endif
|


Robot of Jihad? A Guide to Tipu’s Tiger
An eighteenth-century automaton in the image of a tiger mauling a British soldier, whose groans mingle with his killer’s roar, has thrilled millions of tourists and inspired some of the English language’s finest poets. It is one of the British Empire’s most celebrated prizes, stolen in 1799 from the court of Tipu Sultan, ruler of Mysore. Over the previous half-century, Tipu and his father Haider Ali had repeatedly trounced British armies and flaunted ties to France, Britain’s rival superpower. Although France refused to grant Mysore a formal alliance, it filled the Mysorean capital of Srirangapatnam with European mercenaries, artisans, and mechanics, some of whom seem to have contributed to the creation of the machine now known as Tipu’s Tiger.
From his rise to power in 1783, and even after his death beneath the walls of his citadel in 1799, Tipu was an iconic figure in Europe, parodied or glorified in cartoons, paintings, and a forged set of memoirs. In South Asia, however, he was the master of his own celebrity. Tipu stamped nearly every conceivable sort of object with the features of his reign’s symbol: the tiger. No other rulers in the Subcontinent represented their authority with such flamboyance and insistence. A mechanical man-eating tiger was only the most astonishing example of Tipu’s commitment to his brand.
Now Tipu’s Tiger is a brand in its own right, with all of the YouTube clips and apps requisite of modern celebrity. An anchor of London’s Victoria and Albert Museum, it attracts crowds and the attention of scholars from diverse fields. But however seen and studied, the Tiger remains mysterious. Unlike the countless tiger-headed or tiger-striped swords, guns, and thrones of Tipu’s palace, the Tiger bears no inscription. Its pedestal, if it had one, was left behind by British looters, perhaps not valuable or not light enough to be taken.
Little written evidence exists to suggest where the Tiger might have been placed originally, how it might have been used, or why it was built. Did it stand in one of Tipu’s private chambers, to amuse the sultan? In an entrance hall, to amaze dignitaries? Or in a storage room, to await its destiny? No one knows—which hasn’t kept anyone from speculating. For two centuries, Western writers have guessed the meaning of the spectacular machine. Their answers reveal less about the Tiger than about the persistence of Orientalist clichés and Islamophobia from the Victorian era to our own.
Despite the variety of personalities weighing in, from poets to art historians, two interpretations of the Tiger have predominated. The first holds that it was a monstrous device dreamed up by a tyrannous madman; the second, that it was the plaything of an obsessional man-child. For variety, the two interpretations are sometimes combined.
The earliest British observers maintained that Tipu’s Tiger was a vicious simulacrum capable of entertaining only a depraved and cruel mind. Colonel Mark Wood, co-author of an 1800 book on the British defeat of Tipu Sultan the year prior, described the Tiger as a “characteristic emblem of the ferocious animosity of Tippoo.”
Wood was referring to Tipu’s notorious treatment of his British prisoners of war. Hundreds of British soldiers had been captured by Mysorean forces during the Second Anglo-Mysore War (1780-1784). Tipu kept them imprisoned in the dungeons of Srirangapatnam for years longer than originally stipulated, and subjected them to humiliating and excruciating circumcisions. Circumcision was rare in Europe, and generally associated with ‘turning Turk’: conversion to Islam. Although Tipu, a pious Muslim, doesn’t seem to have had the forced conversion of his hostages in mind, his slighting of British manhood was interpreted as an act of sectarian as well as personal violence. Upon their return to Britain, a number of the former prisoners published widely-read accounts of their indignities, bolstering Tipu’s image as a depraved fanatic.
This image was a powerful weapon of British propaganda during the next wars against Mysore, which culminated in Tipu’s defeat and death in 1799. Colonel Wood’s reaction to Tipu’s Tiger was a symptom of Britain’s war-time vision of the machine’s former owner. Yet as the British came to love watching the Tiger themselves, commentators toned down their rhetoric about such amusement being fit only for bestial minds. The Tiger went on display in London’s East India House in 1808 (where it remained until its transfer to the V&A in 1879), and proved an immediate hit. The museum’s 1851 guidebook advanced the same thesis as Colonel Wood, but with a cool, light irony: “We may conceive” it sniffed, “how refined must have been the mind which designed such an invention.” No telling how refined must have been the British minds that crowded to see it.
As time passed and memories of the Anglo-Mysore Wars grew hazy, Western interpretations of the Tiger might have moved ever farther away from the views of Colonel Wood. Instead they have circled back.
Not that there isn’t fine, careful writing about the Tiger. In her 2009 book on tiger-imagery at Tipu’s court, for example, art historian Susan Stronge has contributed more than any single person to what we can objectively say about the device, proving it to be a variant of broader Indo-Iranian artistic and literary styles that identified kingship and heroism with big cats. She observes that most rulers used lions to represent themselves, and suggests that Tipu’s idiosyncratic choice of the tiger reflected a commitment to the Shia martyr Ali, who was often compared to tigers in Persian literature. In the midst of this, however, she proposes that the tiger motif expressed the sultan’s “constant preoccupation with jihad.”
But perhaps we are the ones preoccupied with it. The importance of Islam to Tipu’s reign continues to be debated, often viciously, in South Asian academia and popular culture. Certain Hindu fundamentalists and conservatives portray him as a Muslim bigot who does not deserve the reputation for anti-colonial nationalism he has been given in an influential strain of nationalist history-writing. Without a doubt, Tipu oppressed some native Christian and Hindu communities, which he suspected of collaborating with his British enemies. But ‘jihad’ is a poor, and politically dangerous, way to characterize his policies. He fought Muslim rulers like the Nizam of Hyderabad, and sought alliances with non-Muslim states such as France. He may have been ruthless, but he was hardly the archetypal Islamist war-monger of neo-con nightmares.
Asking what kind of fanatical man created this machine, many observers forget to ask about the violent men who made it a museum piece. But others fail to see violence in the automaton at all, and find only a big toy made for Tipu’s entertainment. In an essay for a 1990 exhibition guide on the treasures of Tipu’s court, art historian Mildred Archer managed to call the Tiger a toy three times in two paragraphs, saying twice that Tipu must have loved playing with it. Literary figures have endorsed the toy-thesis as well. Marianne Moore anticipated Archer in her poem “Tippoo’s Tiger.” After several stanzas listing all the things Tipu owned printed with tiger stripes or capped with tigers’ feet, she came at last to the Tiger “a vast toy, a curious automaton.”
John Keats, who had seen the sultan’s automaton in person while working on his unfinished narrative poem “The Cap and Bells,” played the Tiger for laughs. He smuggled a description of it into his poem, calling the machine “a play-thing of the Emperor’s choice … a Man-Tiger-Organ, prettiest of his toys” and comparing its noise to a snore. This jocular reaction is perhaps preferable to seeing the tiger as a kind of mechanical mujahadeen—but if the tiger is a toy, what does that say about Tipu? He must have been, as scholar W. J. G. Ord-Hume puts it, a man with a “warped and almost childlike mentality.” Who else could have such a “pronounced and bizarre … preoccupation” with childish things?
Nor are the two interpretations really so far apart. Creative minds have always found ways to combine them. In his 1837 poem “Le joujou du Sultan” (The Sultan’s bauble) French writer Auguste Barbier managed to depict Tipu’s Tiger both as the amusement of an infantile tyrant and as a herald of jihad:
As day’s divine glimmer lit up the sky;
One of his servants cranked the machine
And the master, awoken, passed his eyes
Over the hellish plaything; its horrid noise
Relit his fury and raised up his hate
Against the conquerors of India.
Barbier’s portrait of Tipu is reflected even on the website of the Tiger’s current home, the Victoria and Albert Museum. In an extensive webpage devoted to its star attraction, the V&A claims that “the toy tiger” bears witness to “Tipu’s much publicized tiger-mania and anglophobia” (Tipu of course was ‘anglophobic’ in the sense that a man watching his house burn is afraid of fire). Rather than see Tipu as a rational sovereign trying, like his European counterparts, to remain in power and resist his enemies, the Museum treats Tipu as a fervent Muslim with serious psychological problems, evidence for which, it claims, can be found in his dream journal.
Tipu did indeed record a number of his dreams in a Persian-language diary, translated into English in 1957. But this record hardly reveals, as the V&A claims, “his preoccupation with tigers, and his association of the cult animal with the extermination, or at least the driving out, of infidels.” Tipu dreamed of tigers, but also of bears, cows, elephants, beryl, mangoes, dates, almonds, and plaintains—a treasury of things animal, vegetable, and mineral. He fantasized about defeating the British, but also about making peace with the Nizam and allying with French. His dream-self went on pilgrimage to Mecca and crushed the unbelievers, but also rebuilt a Hindu temple. As in waking life, the dreaming Tipu was a complex man too large for our clichés.


| Package | Description |
|---|---|
| com.mongodb | |
| com.mongodb.client.model | |
| com.mongodb.gridfs |
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
|
| Class and Description |
|---|
| AggregationOptions
The options to apply to an aggregate operation.
|
| AggregationOptions.Builder
Builder for creating
AggregationOptions . |
| AggregationOptions.OutputMode
Enumeration to define where the results of the aggregation will be output.
|
| AggregationOutput
Container for the result of aggregation operation.
|
| BasicDBObject
A basic implementation of BSON object that is MongoDB specific.
|
| BasicDBObjectBuilder
Utility for building complex objects.
|
| BulkUpdateRequestBuilder
A builder for a single update request.
|
| BulkWriteError
Represents an error for an item included in a bulk write operation, e.g.
|
| BulkWriteOperation
A bulk write operation.
|
| BulkWriteRequestBuilder
A builder for a single write request.
|
| BulkWriteResult
The result of a successful bulk write operation.
|
| BulkWriteUpsert
Represents an upsert request in a bulk write operation that resulted in an insert.
|
| CommandResult
A simple wrapper to hold the result of a command.
|
| Cursor
Interface for providing consistent behaviour between different Cursor implementations.
|
| DB
A thread-safe client view of a logical database in a MongoDB cluster.
|
| DBAddress
Deprecated.
This class is no longer needed, as the driver does not rely on it for anything anymore. Use
ServerAddress instead. |
| DBCallback
The DB callback interface.
|
| DBCallbackFactory
Factory for creating concrete implementations of DBCallback.
|
| DBCollection
Implementation of a database collection.
|
| DBCursor
An iterator over database results.
|
| DBDecoder
An interface for decoders of BSON into instances of DBObject that belong to a DBCollection.
|
| DBDecoderFactory
Creates concrete DBDecoder instances.
|
| DBEncoder
An interface for encoders of BSONObject to BSON.
|
| DBEncoderFactory
Creates concrete DBEncoder instances.
|
| DBObject
This interface adds some specific behaviour to
BSONObject for MongoDB documents. |
| DBRef
A representation of a database reference.
|
| GroupCommand
This class groups the argument for a group operation and can build the underlying command object
|
| InsertOptions
Options related to insertion of documents into MongoDB.
|
| MapReduceCommand
This class groups the argument for a map/reduce operation and can build the underlying command object
|
| MapReduceCommand.OutputType
Represents the different options available for outputting the results of a map-reduce operation.
|
| MapReduceOutput
Represents the result of a map/reduce operation.
|
| Mongo
A database connection with internal connection pooling.
|
| Mongo.Holder
Mongo.Holder can be used as a static place to hold several instances of Mongo.
|
| MongoClientOptions
Various settings to control the behavior of a
MongoClient . |
| MongoClientOptions.Builder
A builder for MongoClientOptions so that MongoClientOptions can be immutable, and to support easier construction through chaining.
|
| MongoClientURI
Represents a URI
which can be used to create a MongoClient instance.
|
| MongoOptions
Deprecated.
Please use
MongoClientOptions instead. |
| MongoURI
Deprecated.
Replaced by
MongoClientURI |
| ParallelScanOptions
The options to use for a parallel collection scan.
|
| ParallelScanOptions.Builder
A builder for the options
|
| QueryBuilder
Utility for creating DBObject queries
|
| ReflectionDBObject
This class enables to map simple Class fields to a BSON object fields
|
| ReflectionDBObject.JavaWrapper
Represents a wrapper around the DBObject to interface with the Class fields
|
| ReplicaSetStatus
Keeps replica set status.
|
| WriteConcernError
An error representing a failure by the server to apply the requested write concern to the bulk operation.
|
| WriteResult
This class lets you access the results of the previous acknowledged write.
|
| Class and Description |
|---|
| DBEncoder
An interface for encoders of BSONObject to BSON.
|
| DBObject
This interface adds some specific behaviour to
BSONObject for MongoDB documents. |
| Class and Description |
|---|
| DB
A thread-safe client view of a logical database in a MongoDB cluster.
|
| DBCollection
Implementation of a database collection.
|
| DBCursor
An iterator over database results.
|
| DBObject
This interface adds some specific behaviour to
BSONObject for MongoDB documents. |
Copyright © 2017. All rights reserved.


# orm/scoping.py
# Copyright (C) 2005-2019 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from . import class_mapper
from . import exc as orm_exc
from .session import Session
from .. import exc as sa_exc
from ..util import ScopedRegistry
from ..util import ThreadLocalRegistry
from ..util import warn
__all__ = ["scoped_session"]
class scoped_session(object):
"""Provides scoped management of :class:`.Session` objects.
See :ref:`unitofwork_contextual` for a tutorial.
"""
session_factory = None
"""The `session_factory` provided to `__init__` is stored in this
attribute and may be accessed at a later time. This can be useful when
a new non-scoped :class:`.Session` or :class:`.Connection` to the
database is needed."""
def __init__(self, session_factory, scopefunc=None):
"""Construct a new :class:`.scoped_session`.
:param session_factory: a factory to create new :class:`.Session`
instances. This is usually, but not necessarily, an instance
of :class:`.sessionmaker`.
:param scopefunc: optional function which defines
the current scope. If not passed, the :class:`.scoped_session`
object assumes "thread-local" scope, and will use
a Python ``threading.local()`` in order to maintain the current
:class:`.Session`. If passed, the function should return
a hashable token; this token will be used as the key in a
dictionary in order to store and retrieve the current
:class:`.Session`.
"""
self.session_factory = session_factory
if scopefunc:
self.registry = ScopedRegistry(session_factory, scopefunc)
else:
self.registry = ThreadLocalRegistry(session_factory)
def __call__(self, **kw):
r"""Return the current :class:`.Session`, creating it
using the :attr:`.scoped_session.session_factory` if not present.
:param \**kw: Keyword arguments will be passed to the
:attr:`.scoped_session.session_factory` callable, if an existing
:class:`.Session` is not present. If the :class:`.Session` is present
and keyword arguments have been passed,
:exc:`~sqlalchemy.exc.InvalidRequestError` is raised.
"""
if kw:
if self.registry.has():
raise sa_exc.InvalidRequestError(
"Scoped session is already present; "
"no new arguments may be specified."
)
else:
sess = self.session_factory(**kw)
self.registry.set(sess)
return sess
else:
return self.registry()
def remove(self):
"""Dispose of the current :class:`.Session`, if present.
This will first call :meth:`.Session.close` method
on the current :class:`.Session`, which releases any existing
transactional/connection resources still being held; transactions
specifically are rolled back. The :class:`.Session` is then
discarded. Upon next usage within the same scope,
the :class:`.scoped_session` will produce a new
:class:`.Session` object.
"""
if self.registry.has():
self.registry().close()
self.registry.clear()
def configure(self, **kwargs):
"""reconfigure the :class:`.sessionmaker` used by this
:class:`.scoped_session`.
See :meth:`.sessionmaker.configure`.
"""
if self.registry.has():
warn(
"At least one scoped session is already present. "
" configure() can not affect sessions that have "
"already been created."
)
self.session_factory.configure(**kwargs)
def query_property(self, query_cls=None):
"""return a class property which produces a :class:`.Query` object
against the class and the current :class:`.Session` when called.
e.g.::
Session = scoped_session(sessionmaker())
class MyClass(object):
query = Session.query_property()
# after mappers are defined
result = MyClass.query.filter(MyClass.name=='foo').all()
Produces instances of the session's configured query class by
default. To override and use a custom implementation, provide
a ``query_cls`` callable. The callable will be invoked with
the class's mapper as a positional argument and a session
keyword argument.
There is no limit to the number of query properties placed on
a class.
"""
class query(object):
def __get__(s, instance, owner):
try:
mapper = class_mapper(owner)
if mapper:
if query_cls:
# custom query class
return query_cls(mapper, session=self.registry())
else:
# session's configured query class
return self.registry().query(mapper)
except orm_exc.UnmappedClassError:
return None
return query()
ScopedSession = scoped_session
"""Old name for backwards compatibility."""
def instrument(name):
def do(self, *args, **kwargs):
return getattr(self.registry(), name)(*args, **kwargs)
return do
for meth in Session.public_methods:
setattr(scoped_session, meth, instrument(meth))
def makeprop(name):
def set_(self, attr):
setattr(self.registry(), name, attr)
def get(self):
return getattr(self.registry(), name)
return property(get, set_)
for prop in (
"bind",
"dirty",
"deleted",
"new",
"identity_map",
"is_active",
"autoflush",
"no_autoflush",
"info",
"autocommit",
):
setattr(scoped_session, prop, makeprop(prop))
def clslevel(name):
def do(cls, *args, **kwargs):
return getattr(Session, name)(*args, **kwargs)
return classmethod(do)
for prop in ("close_all", "object_session", "identity_key"):
setattr(scoped_session, prop, clslevel(prop))


For example, to list a project's name, you might write something like `The project is called {{ site.github.project_title }}` or to list an organization's open source repositories, you might use the following:
``` liquid
{% for repository in site.github.public_repositories %}
* [{{ repository.name }}]({{ repository.html_url }})
{% endfor %}
```


This example shows how to use ngeo-profile to create a D3-based elevation profile graphic.
ngeo-profile


@(
address: Address,
showEmail: Boolean = false
)(implicit lang: Lang)
@import java.util.Locale
@if(address.hasName) {
| @Messages("courtesyName") | @address.firstName @address.lastName |
}
@if(address.hasKanaName) {
| @Messages("furiganaKana") | @address.firstNameKana @address.lastNameKana |
}
@if(showEmail) {
| @Messages("zipMark") | @address.zip1 - @address.zip2 |
}
@if(! address.prefecture.isUnknown) {
@address.prefecture
}
@if(!address.address1.isEmpty) {
@address.address1
}
@if(!address.address2.isEmpty) {
@address.address2
}
@if(!address.address3.isEmpty) {
@address.address3
}
@if(!address.address4.isEmpty) {
@address.address4
}
@if(!address.address5.isEmpty) {
@address.address5
}
|
@if(!address.tel1.isEmpty) {


And he said, What ye shall say, that will I do for you.


A highly curated platform that brings together innovative founders with investors who offer value beyond just money.


|
QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.30
|
basic option arguments More...
#include <ql/option.hpp>
Public Member Functions | |
| arguments ()=default | |
| void | validate () const override |
| Public Member Functions inherited from PricingEngine::arguments | |
| virtual | ~arguments ()=default |
| virtual void | validate () const =0 |
Public Attributes | |
| ext::shared_ptr< Payoff > | payoff |
| ext::shared_ptr< Exercise > | exercise |
basic option arguments
Definition at line 57 of file option.hpp.
|
default |
|
overridevirtual |
Implements PricingEngine::arguments.
Definition at line 60 of file option.hpp.
| ext::shared_ptr<Payoff> payoff |
Definition at line 64 of file option.hpp.
| ext::shared_ptr<Exercise> exercise |
Definition at line 65 of file option.hpp.


Get started¶
This “simple:)” get started guide provides step by step approach to integrate IoT infrastructure in VICINITY.
Install the VICINITY Gateway API¶
We will start with simple VICINITY Gateway API installation.
- Clone the github repository
cd /path/to/the/directory git clone git@github.com:vicinityh2020/vicinity-gateway-api.git
- Compile the VICINITY Gateway API using maven
cd vicinity-gateway-api mvn clean compile assembly:single
- Create dedicated system user for VICINITY Gateway API
adduser --system --group --no-create-home --shell /bin/sh ogwapi
- Put it all in the right place
mkdir /opt/ogwapi mkdir /opt/ogwapi/log mkdir /opt/ogwapi/config cp -r ./config /opt/ogwapi cp target/ogwapi-jar-with-dependencies.jar /opt/ogwapi/gateway.jar chown -R ogwapi:ogwapi /opt/ogwapi chmod u+x /opt/ogwapi/gateway.jar
- Running VICINITY Gateway API.
cd /opt/ogwapi su - ogwapi -c "nohup java -jar gateway.jar &"
- Checking the running API
In nohup.out you should see:
CONFIG: HTTP Basic challenge authentication scheme configured. Sep 08, 2018 2:19:45 PM org.restlet.engine.connector.NetServerHelper start INFO: Starting the internal [HTTP/1.1] server on port 8181 Sep 08, 2018 2:19:45 PM org.restlet.Application start INFO: Starting eu.bavenir.ogwapi.restapi.Api application Sep 08, 2018 2:19:45 PM org.restlet.engine.application.ApplicationHelper start FINE: By default, an application should be attached to a parent component in order to let application's outbound root handle calls properly. Sep 08, 2018 2:19:45 PM eu.bavenir.ogwapi.restapi.RestletThread run FINE: HTTP server component started.
Install the VICINITY Example Adapter¶
We provide very simple Adapter example as a playground for first run and testing. The Adapter example is part of the VICINITY Agent installation.
Download prepared Adapter example from VICINITY Agent GitHub. In releases tab, find last release and download attached file adapter-build-x.y.z.zip, where x.y.z is the version of actual release. Unzip it.
Example Adapter exposes two things: example-thing-1 and example-thing-2. You can find their thing descriptions in file
adapter-build-x.y.z/objects/example-objects.json
Install the VICINITY Agent Service¶
We provide very Agent Service build preconfigured to work with example Adapter. Later, you can reconfigure of Agent Service to work with any other adapters just by changing the Agent configuration file
- 1.) Download prepared Agent Service from VICINITY Agent GitHub
- In releases tab, find last release and download attached file agent-build-x.y.z.zip, where x.y.z is the version of actual release. Unzip it.
- 2.) Register access point of VICINITY Neighbourhood Manager
- Agent needs to be authenticated to perform any registry operations in VICINITY Peer to Peer network. You can simple get credentials from VICINITY Neighbourhood Manager Access point tab
3.) Update Agent Service credentials in configuration file
agent-build-x.y.z/config/agents/example-agent.jsonFill in correct values in:
"credentials": { "agent-id": "agent id goes here", "password": "agent password goes here" }Everything is now prepared for the first run.
Register your things¶
In the first run of complete VICINITY Node instalation, the things exposed by example Adapter will be registered in VICINITY and they will obtain persistent identifiers, under which they will be know to any other thing in VICINITY. The process will go as follows:
- Agent Service will run the startup sequence, which includes discovery of objects exposed by adapters attached to Agent Service.
- New things will be registered into VICINITY, existing will be updated, missing deleted.
- Agent Service ends with actual configuration on VICINITY Node, all things are discovered,
online and available via Neighbourhood Manager.
Lets do this.
1.) Run VICINITY Gateway API** (see above)
2.) Run example Adapter**
cd adapter-build-x.y.z ./adapter.shYour Adapter is now running. In console, you should see:
Oct 23, 2018 2:32:36 PM org.restlet.engine.connector.NetServerHelper start INFO: Starting the internal [HTTP/1.1] server on port 9998 Oct 23, 2018 2:32:36 PM org.restlet.Application start INFO: Starting sk.intersoft.vicinity.adapter.testing.service.TestingAdapterApplication application starting
3.) Run Agent Service**
cd agent-build-x.y.z ./agent.shYour Agent service is now running. In console, you should see:
command: pid: starting agent agent startedAgent Service logs its whole process into file:
agent-build-x.y.z/logs/agent-yyyy-mm-dd.logIn few seconds, the startup sequence and discovery process should be completed. You can check your actual Agent Service configuration at endpoint
GET http://localhost:9997/agent/configurationYou can check it in your browser. You should see similar content
{ "adapters": [{ "adapter-id": "example-adapter", "things": [ { "adapter-infra-id": "example-adapter---!---example-thing-1", "infra-id": "example-thing-1", "password": "R1az6N72N7KfEvGYKVLp5f7PiS3Bv3prIfSkuyb0k+Y=", "agent-id": "f7f63ef6-fd8a-44f6-8a4a-c15f8376edaa", "adapter-id": "example-adapter", "oid": "f9d16d9e-02ec-40bc-ad38-4b814d62ea33", "adapter-oid": "example-adapter---!---f9d16d9e-02ec-40bc-ad38-4b814d62ea33" }, { "adapter-infra-id": "example-adapter---!---example-thing-2", "infra-id": "example-thing-2", "password": "anea2CW6UAPikNfCYp+xZLsERIF0Mxys4hvZvRy9qNk=", "agent-id": "f7f63ef6-fd8a-44f6-8a4a-c15f8376edaa", "adapter-id": "example-adapter", "oid": "10c67501-9536-4b58-937a-804df9bdcde6", "adapter-oid": "example-adapter---!---10c67501-9536-4b58-937a-804df9bdcde6" } ], "subscribe-channels": [], "open-channels": [] }], ...If you see configuration, discovery process was successfull and your example things were registered. Each thing obtained unique VICINITY oid. This is unique persistent identifier of your thing. Any other things in VICINITY can interact with other things using their VICINITY oid.
Following the configuration above, our example things are mapped as follows:
example-thing-1
infrastructure-id: example-thing-1 oid: f9d16d9e-02ec-40bc-ad38-4b814d62ea33example-thing-2
infrastructure-id: example-thing-2 oid: 10c67501-9536-4b58-937a-804df9bdcde6If you will run this step, you will receive unique specific **oid**s for your things.
Now we are ready to interact with our example things.
Read data from your example thing¶
When your things were successfully registered, you need to enable them in Neighbourhood Manager user interface. It is possible to interact only with enabled things.
To simulate interaction between thing behind the adapter and another VICINITY thing, we will use following Agent Service endpoint
GET http://localhost:9997/agent/remote/objects/f9d16d9e-02ec-40bc-ad38-4b814d62ea33/properties/example-property
headers:
adapter-id=example-adapter
infrastructure-id=example-thing-2
This call means, that thing inside example-adapter with its internal identifier example-thing-2 wants to read property of remote thing with VICINITY identifier f9d16d9e-02ec-40bc-ad38-4b814d62ea33.
Use Postman to perform this call. The response to this call will look as follows
{
"error": false,
"statusCode": 200,
"statusCodeReason": "OK",
"message": [
{
"data": {
"echo": "get property",
"pid": "example-property",
"oid": "example-thing-1"
},
"status": "success"
}
]
}
Now you are officially integrated into VICINITY and you can interact with known things.
To correctly stop the Agent Service, run following command
cd agent-build-x.y.z
./agent.sh stop


LG sues TCL over LTE patent infringement
by Manuel VonauLG's smartphone division is known for quirky, gimmicky devices that often don't quite live up to expectations, but the company still does have extensive patents concerning LTE and 4G communication software. The Korean conglomerate aims to protect these assets and has thus decided to file a lawsuit against TCL in Germany, alleging it's infringing three of its patents.
LG says it only decided to take the issue to court after attempts to remedy the concerns failed. The LTE patents in question relate to TCL's smartphone business and cover the minimization of packet loss during transmission as well as interference reduction and timer controlling for uplink synchronization.
The company already had a similar legal dispute with BLU resulting in a licensing deal between the two, and it's currently battling Wiko regarding related issues. It's possible the latest quarrel could lead to a comparable settlement.
Source:
LG


The implementation returns void from
::com::sun::star::task::XJob::execute()
to indicates successful execution. If import is not executed,
because OverwriteExisting =
true was specified,
a ::com::sun::star::lang::IllegalAccessException
is returned.
If void or true is returned, this indicates successful
execution. If an
::com::sun::star::uno::Exception is returned,
it represents an error condition encountered during execution.
The standard arguments to
::com::sun::star::task::XJob::execute()
are all supported by implementations. Additionally the following
argument is required to select the data source:
LayerDataUrl
: string
- A file URL that specifies the location of the source data.
If no Component
is provided, this must be the
location of an OOR Update XML file, which will be imported
directly.
If a Component
is provided, the
LayerDataUrl
is treated as Entity
(i.e. Layer directory base URL) for a local
configuration database and the appropriate component
from that repository is imported.
Implementations may support additional parameters to select
a destination Backend, that is not the
DefaultBackend.


This part of documentation assumes you have at least some basic knowledge of Angular-CLI
, TypeScript
, a reasonable familiarity with Node
and how all of these fit together
and also you already have an angular application up and running.
If you don't have angular application running, continue to follow the steps below:
Angular in it's latest version, Angular 6.0, many of the improvements were to the Angular CLI and a new schematic has been added to help you generate a library.
Let us begin by setting up the workspace.
Our first goal was to create an Angular workspace named content-editor
When we point our browser at:
http://localhost:4200/
we see the starter Angular application


--- title: DevOps is not a technology problem. DevOps is a business problem. layout: post ---
I've spent the past nine months or so overcoming resistance to the DevOps movement in both public forums and inside client companies. During that time, I've begun to notice a common misconception that I think is fueling much of the negative initial reaction that some people have to DevOps ideas. I want to take a shot at clearing it up now:
DevOps is not a technology problem.
Technology plays a key part in enabling solutions to DevOps problems. However, DevOps itself is fundamentally a business problem.


Last updated: 2021-02-22
Checks: 7 0
Knit directory: invitroOA_pilot_repository/
This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20210119)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 3500638. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: code/bulkRNA_preprocessing/.snakemake/conda-archive/
Ignored: code/bulkRNA_preprocessing/.snakemake/conda/
Ignored: code/bulkRNA_preprocessing/.snakemake/locks/
Ignored: code/bulkRNA_preprocessing/.snakemake/shadow/
Ignored: code/bulkRNA_preprocessing/.snakemake/singularity/
Ignored: code/bulkRNA_preprocessing/.snakemake/tmp.3ekfs3n5/
Ignored: code/bulkRNA_preprocessing/fastq/
Ignored: code/bulkRNA_preprocessing/out/
Ignored: code/single_cell_preprocessing/.snakemake/conda-archive/
Ignored: code/single_cell_preprocessing/.snakemake/conda/
Ignored: code/single_cell_preprocessing/.snakemake/locks/
Ignored: code/single_cell_preprocessing/.snakemake/shadow/
Ignored: code/single_cell_preprocessing/.snakemake/singularity/
Ignored: code/single_cell_preprocessing/YG-AH-2S-ANT-1_S1_L008/
Ignored: code/single_cell_preprocessing/YG-AH-2S-ANT-2_S2_L008/
Ignored: code/single_cell_preprocessing/demuxlet/.DS_Store
Ignored: code/single_cell_preprocessing/fastq/
Ignored: data/external_scRNA/Chou_et_al2020/
Ignored: data/external_scRNA/Jietal2018/
Ignored: data/external_scRNA/Wuetal2021/
Ignored: data/external_scRNA/merged_external_scRNA.rds
Ignored: data/poweranalysis/alasoo_et_al/
Ignored: output/GO_terms_enriched.csv
Ignored: output/topicModel_k=6.rds
Ignored: output/topicModel_k=7.rds
Ignored: output/topicModel_k=8.rds
Ignored: output/voom_results.rds
Unstaged changes:
Modified: .gitignore
Deleted: analysis/figure/topicModel_scRNA.Rmd/plot correlations external-1.png
Deleted: analysis/figure/topicModel_scRNA.Rmd/structure plot external-1.png
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/external_scRNA.Rmd
) and HTML (docs/external_scRNA.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | 0d29d56 | Anthony Hung | 2021-02-18 | change colors for structure plots |
| html | 0d29d56 | Anthony Hung | 2021-02-18 | change colors for structure plots |
| html | 98724f0 | Anthony Hung | 2021-01-21 | finish topic model rmd |
| Rmd | 99c70b8 | Anthony Hung | 2021-01-20 | update external data |
| html | 99c70b8 | Anthony Hung | 2021-01-20 | update external data |
| Rmd | 1ec66ea | Anthony Hung | 2021-01-20 | add information desribing preprocessing scran |
| html | 1ec66ea | Anthony Hung | 2021-01-20 | add information desribing preprocessing scran |
| Rmd | af83ab7 | Anthony Hung | 2021-01-20 | knit analysis files |
| html | af83ab7 | Anthony Hung | 2021-01-20 | knit analysis files |
| Rmd | 98e0a1d | Anthony Hung | 2021-01-20 | add note about running the bash code separately |
| Rmd | 5b2d20e | Anthony Hung | 2021-01-20 | Commit before knitting |
| Rmd | 439d194 | Anthony Hung | 2021-01-20 | add liver data |
| Rmd | c49176b | Anthony Hung | 2021-01-20 | add GH data into external datasets folder |
| Rmd | 8b39783 | Anthony Hung | 2021-01-20 | correct typo in directory structure creation in external scRNAseq |
| Rmd | e24a0cd | Anthony Hung | 2021-01-20 | Added download links for external data files |
| Rmd | d6b5b17 | Anthony Hung | 2021-01-20 | Added analysis files |
| Rmd | 28f57fa | Anthony Hung | 2021-01-19 | Add files for analysis |
Some of the data included in this model come from publically available datasets from published studies, housed in GEO. Run the following code from the home directory of this repo to download the necessary datasets.
mkdir data/external_scRNA
cd data/external_scRNA
#download Ji et al 2018 data of Chondrocytes from OA patients run through STRT single cell RNA protocol from GEO (Series GSE104782)
mkdir Jietal2018
cd Jietal2018
wget ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE104nnn/GSE104782/suppl/GSE104782_allcells_UMI_count.txt.gz #raw count data
wget ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE104nnn/GSE104782/suppl/GSE104782_Table_Cell_quality_information_and_clustering_information.xlsx # clustering information for cells in the raw data
#download Wu et al 2021 data of iPSC-Chondrocyte chondrogenic pellet differentiation time course from GEO (Series GSE160625). Data include barcodes, genes, and count matrices from samples taken from iPSCs and samples from 7, 14, 28, and 42 day chondrogenic pellets treated with chondrogenic media containing a WNT and MITF inhibitor
cd ..
mkdir Wuetal2021
cd Wuetal2021
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876128/suppl/GSM4876128_hiPSC_barcodes.tsv.gz # iPSC barcodes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876128/suppl/GSM4876128_hiPSC_genes.tsv.gz # iPSC genes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876128/suppl/GSM4876128_hiPSC_matrix.mtx.gz # iPSC count matrix
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876136/suppl/GSM4876136_C59_D7_barcodes.tsv.gz # day 7 pellet barcodes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876136/suppl/GSM4876136_C59_D7_genes.tsv.gz # day 7 pellet genes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876136/suppl/GSM4876136_C59_D7_matrix.mtx.gz # day 7 pellet count matrix
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876137/suppl/GSM4876137_C59_D14_barcodes.tsv.gz # day 14 pellet barcodes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876137/suppl/GSM4876137_C59_D14_genes.tsv.gz # day 14 pellet genes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876137/suppl/GSM4876137_C59_D14_matrix.mtx.gz # day 14 pellet count matrix
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876138/suppl/GSM4876138_C59_D28_barcodes.tsv.gz # day 28 pellet barcodes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876138/suppl/GSM4876138_C59_D28_genes.tsv.gz # day 28 pellet genes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876138/suppl/GSM4876138_C59_D28_matrix.mtx.gz # day 28 pellet count matrix
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876139/suppl/GSM4876139_C59_D42_barcodes.tsv.gz # day 42 pellet barcodes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876139/suppl/GSM4876139_C59_D42_genes.tsv.gz # day 42 pellet genes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4876nnn/GSM4876139/suppl/GSM4876139_C59_D42_matrix.mtx.gz # day 42 pellet count matrix
#download data for Chou et al 2020 from GEO (Sample GSM4626766) for chondrocytes from Minimally damaged outer lateral tibial (oLT) plateau cartilage isolated from one male individual
cd ..
mkdir Chou_et_al2020
cd Chou_et_al2020
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4626nnn/GSM4626766/suppl/GSM4626766_OA_oLT_113.barcodes.tsv.gz # barcodes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4626nnn/GSM4626766/suppl/GSM4626766_OA_oLT_113.genes.tsv.gz # genes
wget ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM4626nnn/GSM4626766/suppl/GSM4626766_OA_oLT_113.matrix.mtx.gz # count matrix
Load in the datasets and create Seurat objects for each of them. Add metadata about the cell type they were assigned in their original contexts. Merge the Seurat object into one large object.
library(Matrix)
library(Seurat)
library(tidyverse)
Registered S3 method overwritten by 'cli':
method from
print.boxx spatstat
── Attaching packages ────────────────────────────────── tidyverse 1.3.0 ──
✓ ggplot2 3.3.3 ✓ purrr 0.3.4
✓ tibble 3.0.4 ✓ dplyr 1.0.2
✓ tidyr 1.1.2 ✓ stringr 1.4.0
✓ readr 1.3.1 ✓ forcats 0.4.0
── Conflicts ───────────────────────────────────── tidyverse_conflicts() ──
x tidyr::expand() masks Matrix::expand()
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
x tidyr::pack() masks Matrix::pack()
x tidyr::unpack() masks Matrix::unpack()
library(readxl)
#iPSC-Chondrocyte data from the current study
ANT1.2 <- readRDS("data/ANT1_2.rds")
ANT1.2 <- Seurat::AddMetaData(ANT1.2, "iPSC-Chondrocyte", col.name = "Cell.Type")
dim(ANT1.2)
[1] 33538 1815
#Chondrocytes from OA patients (https://www.ncbi.nlm.nih.gov/pubmed/30026257) run through STRT protocol
# load raw count data
ji_chondro <- read.table("data/external_scRNA/Jietal2018/GSE104782_allcells_UMI_count.txt.gz", header = T)
ji_chondro_genes <- ji_chondro[,1]
ji_chondro_data <- ji_chondro[,-1]
ji_chondro <- ji_chondro_data
rownames(ji_chondro) <- ji_chondro_genes
# load clustering assignment data from paper
ji_chondro_metadata <- read_excel("data/external_scRNA/Jietal2018/GSE104782_Table_Cell_quality_information_and_clustering_information.xlsx")
# subset count data to include only those cells that were assigned to a cluster labeled as being a chondrocyte in the original paper
ji_chondro.filtered <- ji_chondro[,!is.na(ji_chondro_metadata$Cluster)]
cluster.ident <- "ji_chondrocyte"
# Create seurat object from chondrocytes data
ji_chondro.seurat <- CreateSeuratObject(ji_chondro.filtered, project="Chondrocytes")
Warning: Feature names cannot have underscores ('_'), replacing with dashes
('-')
ji_chondro.seurat <- Seurat::AddMetaData(ji_chondro.seurat, cluster.ident, col.name = "Cell.Type")
dim(ji_chondro.seurat)
[1] 24153 1464
#iPSC chondrogenic cells from directed differentiation time course from iPSC chondrogenic pellet culture. https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE160625
count_data_wu_d7 <- readMM("data/external_scRNA/Wuetal2021/GSM4876136_C59_D7_matrix.mtx.gz")
genes_wu_d7 <- read_tsv("data/external_scRNA/Wuetal2021/GSM4876136_C59_D7_genes.tsv.gz", col_names = F)
Parsed with column specification:
cols(
X1 = col_character(),
X2 = col_character()
)
barcodes_wu_d7 <- as.data.frame(read_tsv( "data/external_scRNA/Wuetal2021/GSM4876136_C59_D7_barcodes.tsv.gz", col_names = F))
Parsed with column specification:
cols(
X1 = col_character()
)
rownames(count_data_wu_d7) <- genes_wu_d7$X2
colnames(count_data_wu_d7) <- barcodes_wu_d7$X1
wu_d7_seurat <- CreateSeuratObject(counts = count_data_wu_d7, project = "d7")
Warning: Non-unique features (rownames) present in the input matrix, making
unique
Warning: Feature names cannot have underscores ('_'), replacing with dashes
('-')
wu_d7_seurat <- Seurat::AddMetaData(wu_d7_seurat, "Wu_chondrogenic_pellet_d7", col.name = "Cell.Type")
count_data_wu_d14 <- readMM("data/external_scRNA/Wuetal2021/GSM4876137_C59_D14_matrix.mtx.gz")
genes_wu_d14 <- read_tsv("data/external_scRNA/Wuetal2021/GSM4876137_C59_D14_genes.tsv.gz", col_names = F)
Parsed with column specification:
cols(
X1 = col_character(),
X2 = col_character()
)
barcodes_wu_d14 <- as.data.frame(read_tsv( "data/external_scRNA/Wuetal2021/GSM4876137_C59_D14_barcodes.tsv.gz", col_names = F))
Parsed with column specification:
cols(
X1 = col_character()
)
rownames(count_data_wu_d14) <- genes_wu_d14$X2
colnames(count_data_wu_d14) <- barcodes_wu_d14$X1
wu_d14_seurat <- CreateSeuratObject(counts = count_data_wu_d14, project = "d14")
Warning: Non-unique features (rownames) present in the input matrix, making
unique
Warning: Feature names cannot have underscores ('_'), replacing with dashes
('-')
wu_d14_seurat <- Seurat::AddMetaData(wu_d14_seurat, "Wu_chondrogenic_pellet_d14", col.name = "Cell.Type")
count_data_wu_d28 <- readMM("data/external_scRNA/Wuetal2021/GSM4876138_C59_D28_matrix.mtx.gz")
genes_wu_d28 <- read_tsv("data/external_scRNA/Wuetal2021/GSM4876138_C59_D28_genes.tsv.gz", col_names = F)
Parsed with column specification:
cols(
X1 = col_character(),
X2 = col_character()
)
barcodes_wu_d28 <- as.data.frame(read_tsv( "data/external_scRNA/Wuetal2021/GSM4876138_C59_D28_barcodes.tsv.gz", col_names = F))
Parsed with column specification:
cols(
X1 = col_character()
)
rownames(count_data_wu_d28) <- genes_wu_d28$X2
colnames(count_data_wu_d28) <- barcodes_wu_d28$X1
wu_d28_seurat <- CreateSeuratObject(counts = count_data_wu_d28, project = "d28")
Warning: Non-unique features (rownames) present in the input matrix, making
unique
Warning: Feature names cannot have underscores ('_'), replacing with dashes
('-')
wu_d28_seurat <- Seurat::AddMetaData(wu_d28_seurat, "Wu_chondrogenic_pellet_d28", col.name = "Cell.Type")
count_data_wu_d42 <- readMM("data/external_scRNA/Wuetal2021/GSM4876139_C59_D42_matrix.mtx.gz")
genes_wu_d42 <- read_tsv("data/external_scRNA/Wuetal2021/GSM4876139_C59_D42_genes.tsv.gz", col_names = F)
Parsed with column specification:
cols(
X1 = col_character(),
X2 = col_character()
)
barcodes_wu_d42 <- as.data.frame(read_tsv( "data/external_scRNA/Wuetal2021/GSM4876139_C59_D42_barcodes.tsv.gz", col_names = F))
Parsed with column specification:
cols(
X1 = col_character()
)
rownames(count_data_wu_d42) <- genes_wu_d42$X2
colnames(count_data_wu_d42) <- barcodes_wu_d42$X1
wu_d42_seurat <- CreateSeuratObject(counts = count_data_wu_d42, project = "d42")
Warning: Non-unique features (rownames) present in the input matrix, making
unique
Warning: Feature names cannot have underscores ('_'), replacing with dashes
('-')
wu_d42_seurat <- Seurat::AddMetaData(wu_d42_seurat, "Wu_chondrogenic_pellet_d42", col.name = "Cell.Type")
wu_combined <- merge(wu_d7_seurat, y = c(wu_d14_seurat, wu_d28_seurat, wu_d42_seurat), project = "Combined.common")
Warning in CheckDuplicateCellNames(object.list = objects): Some cell names
are duplicated across objects provided. Renaming to enforce unique cell
names.
wu_combined[["percent.mt"]] <- PercentageFeatureSet(wu_combined, pattern = "^MT-")
wu_combined <- subset(wu_combined, subset = percent.mt < 25)
dim(wu_combined)
[1] 45924 9434
#Chondrocytes from healthy oLT of a male human with OA (outer lateral tibia) https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM4626766
chou_chondro_counts <- readMM("data/external_scRNA/Chou_et_al2020/GSM4626766_OA_oLT_113.matrix.mtx.gz")
chou_chondro_genes <- read_tsv("data/external_scRNA/Chou_et_al2020/GSM4626766_OA_oLT_113.genes.tsv.gz", col_names = F)
Parsed with column specification:
cols(
X1 = col_character(),
X2 = col_character()
)
chou_chondro_barcodes <- as.data.frame(read_tsv("data/external_scRNA/Chou_et_al2020/GSM4626766_OA_oLT_113.barcodes.tsv.gz", col_names = F))
Parsed with column specification:
cols(
X1 = col_character()
)
#make Seurat object
rownames(chou_chondro_counts) <- chou_chondro_genes$X2
colnames(chou_chondro_counts) <- chou_chondro_barcodes$X1
chou_chondro_seurat <- CreateSeuratObject(counts = chou_chondro_counts, project = "Chondrocytes") %>%
AddMetaData("chou_chondrocyte", col.name = "Cell.Type")
Warning: Non-unique features (rownames) present in the input matrix, making
unique
Warning: Feature names cannot have underscores ('_'), replacing with dashes
('-')
dim(chou_chondro_seurat)
[1] 32738 6200
#iPSCs/MSCs/ipsc-chondrocytes/ipsc-osteoblasts from Genevieve Housman. Combine all the datasets located in the data directory. Each of these datasets contain single cell data from cells from the same human individual from which iPSCs were created. 10x single cell RNA sequencing data from iPSCs, MSCs, iPSC-Osteoblasts, and iPSC-chondrocytes are included after filtering for barcodes with fewer than 25% reads coming from mitochondria.
GH_iPSC <- readRDS("data/external_scRNA/GH_cells/gh_ipsc.rds")
GH_iPSCMSC <- readRDS("data/external_scRNA/GH_cells/gh_msc.rds")
GH_iPSCChond <- readRDS("data/external_scRNA/GH_cells/gh_ipscChond.rds")
GH_iPSCOsteo <- readRDS("data/external_scRNA/GH_cells/gh_ipscOsteo.rds")
#merge all the datasets into one seurat object
GH_merged <- merge(GH_iPSC, y = c(GH_iPSCMSC, GH_iPSCChond, GH_iPSCOsteo),
add.cell.ids = c("ipsc", "msc", "chondrogh", "osteo"), project = "ghousman")
GH_merged <- Seurat::AddMetaData(GH_merged, "Ghousman", col.name = "orig.ident")
dim(GH_merged)
[1] 19377 10815
#Human Liver samples run through 10x (https://doi.org/10.1038/s41467-018-06318-7). This is a subset of the entire dataset, which is from whole liver homogenate. Following the example from the original paper, scViz was used to subset the data for clusters that were called hepatocytes in the original study (subset contains a total of 3490 cells)
liver_data <- readRDS("data/external_scRNA/humanLiverSubset_hepatocytes.rds")
liver_data <- Seurat::AddMetaData(liver_data, "Hepatocyte", col.name = "Cell.Type")
dim(liver_data)
[1] 20007 3490
# Merge Datasets
# Merge the seurat objects into one large one, keeping metadata about which study they originated in as well as their assigned cell type.
Merged_external_data <- merge(ANT1.2, y = c(ji_chondro.seurat, chou_chondro_seurat, GH_merged, liver_data), project = "Merged_external")
Merged_external_data <- merge(Merged_external_data, wu_combined, project = "Merged_external")
dim(Merged_external_data)
[1] 61987 33218
saveRDS(Merged_external_data, "data/external_scRNA/merged_external_scRNA.rds")
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Scientific Linux 7.4 (Nitrogen)
Matrix products: default
BLAS/LAPACK: /software/openblas-0.2.19-el7-x86_64/lib/libopenblas_haswellp-r0.2.19.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] readxl_1.3.1 forcats_0.4.0 stringr_1.4.0 dplyr_1.0.2
[5] purrr_0.3.4 readr_1.3.1 tidyr_1.1.2 tibble_3.0.4
[9] ggplot2_3.3.3 tidyverse_1.3.0 Seurat_3.2.3 Matrix_1.2-18
loaded via a namespace (and not attached):
[1] Rtsne_0.15 colorspace_2.0-0 deldir_0.1-23
[4] ellipsis_0.3.1 ggridges_0.5.1 rprojroot_2.0.2
[7] fs_1.3.1 rstudioapi_0.13 spatstat.data_1.7-0
[10] leiden_0.3.1 listenv_0.8.0 npsurv_0.4-0
[13] ggrepel_0.9.0 fansi_0.4.1 lubridate_1.7.9
[16] xml2_1.3.2 codetools_0.2-16 splines_3.6.1
[19] lsei_1.2-0 knitr_1.23 polyclip_1.10-0
[22] jsonlite_1.7.2 workflowr_1.6.2 broom_0.7.0
[25] ica_1.0-2 dbplyr_1.4.2 cluster_2.1.0
[28] png_0.1-7 uwot_0.1.10 shiny_1.3.2
[31] sctransform_0.3.2 compiler_3.6.1 httr_1.4.2
[34] backports_1.1.10 assertthat_0.2.1 lazyeval_0.2.2
[37] cli_2.2.0 later_<IP_ADDRESS> htmltools_0.5.0
[40] tools_3.6.1 rsvd_1.0.1 igraph_<IP_ADDRESS>
[43] gtable_0.3.0 glue_1.4.2 RANN_2.6.1
[46] reshape2_1.4.3 rappdirs_0.3.1 Rcpp_1.0.5
[49] spatstat_1.64-1 scattermore_0.7 cellranger_1.1.0
[52] vctrs_0.3.6 gdata_2.18.0 nlme_3.1-140
[55] lmtest_0.9-37 xfun_0.8 globals_0.12.5
[58] rvest_0.3.6 mime_0.9 miniUI_<IP_ADDRESS>
[61] lifecycle_0.2.0 irlba_2.3.3 gtools_3.8.1
[64] goftest_1.2-2 future_1.18.0 MASS_7.3-52
[67] zoo_1.8-8 scales_1.1.1 hms_0.5.3
[70] promises_1.1.1 spatstat.utils_1.17-0 parallel_3.6.1
[73] RColorBrewer_1.1-2 yaml_2.2.1 reticulate_1.16
[76] pbapply_1.4-0 gridExtra_2.3 rpart_4.1-15
[79] stringi_1.4.6 caTools_<IP_ADDRESS> rlang_0.4.10
[82] pkgconfig_2.0.3 matrixStats_0.57.0 bitops_1.0-6
[85] evaluate_0.14 lattice_0.20-41 ROCR_1.0-7
[88] tensor_1.5 patchwork_1.1.0 htmlwidgets_1.5.2
[91] cowplot_1.1.0 tidyselect_1.1.0 RcppAnnoy_0.0.18
[94] plyr_1.8.6 magrittr_2.0.1 R6_2.5.0
[97] gplots_<IP_ADDRESS> generics_0.0.2 DBI_1.1.0
[100] withr_2.3.0 haven_2.3.1 pillar_1.4.7
[103] whisker_0.3-2 mgcv_1.8-28 fitdistrplus_1.0-14
[106] survival_2.44-1.1 abind_1.4-5 future.apply_1.3.0
[109] modelr_0.1.8 crayon_1.3.4 KernSmooth_2.23-15
[112] plotly_<IP_ADDRESS> rmarkdown_1.13 grid_3.6.1
[115] data.table_1.13.0 git2r_0.26.1 reprex_0.3.0
[118] digest_0.6.27 xtable_1.8-4 httpuv_1.5.1
[121] munsell_0.5.0 viridisLite_0.3.0


who
A zero-dependency networking solution for building modern and secure iOS, watchOS, macOS and tvOS applications.
🚀 TermiNetwork has been tested in a production environment with a heavy load of asynchronous requests and tens of thousands of unique clients per day.
This is a high level diagram of TermiNetwork showing how its componets are connected to each other.
Features
- [x] Multi-environment setup
- [x] Model deserialization with Codables
- [x] Async await support
- [x] Decodes response to the given type: Codable, Transformer, UIImage, Data or String
- [x] UIKit/SwiftUI extensions for downloading remote images
- [x] Request grouping with Repositories
- [x] Detects network status with Reachability
- [x] Transformers: convert models from one type to another easily
- [x] Error Handling
- [x] Interceptors
- [x] Request mocking
- [x] Certificate Pinning
- [x] Flexible configuration
- [x] Middleware support
- [x] File/Data Upload/Download support
- [x] Pretty printed debug information
Table of contents
- Installation
- Demo Application
- Usage
- Queue Hooks
- Error Handling
- Cancelling a Request
- Reachability
- Transformers
- Mock responses
- Interceptors
- Image Helpers
- Middleware
- Debug Logging
Installation
You can install TermiNetwork with one of the following ways…
CocoaPods
Add the following line to your Podfile and run pod install in your terminal:
pod 'TermiNetwork', '~> 3.2.0'
Carthage
Add the following line to your Carthage and run carthage update in your terminal:
github "billp/TermiNetwork" ~> 3.2.0
Swift Package Manager
Go to File > Swift Packages > Add Package Dependency and add the following URL:
https://github.com/billp/TermiNetwork
Demo Application
To see all the features of TermiNetwork in action, download the source code and run the TermiNetworkExamples scheme.
Usage
Simple usage (Request)
Let’s say you have the following Codable model:
struct Todo: Codable {
let id: Int
let title: String
}
The following example creates a request that adds a new Todo:
let params = ["title": "Go shopping."]
let headers = ["x-auth": "abcdef1234"]
Request(method: .get,
url: "https://myweb.com/api/todos",
headers: headers,
params: params)
.success(responseType: Todo.self) { todos in
print(todos)
}
.failure { error in
print(error.localizedDescription)
}
or with async await:
let request = Request(method: .get,
url: "https://myweb.com/api/todos",
headers: headers,
params: params)
do {
let todos: [Todo] = try await request.async()
print(todos)
} catch let error {
print(error.localizedDescription)
}
Parameters Explanation
method
One of the following supported HTTP methods:
.get, .head, .post, .put, .delete, .connect, .options, .trace or .patch
responseType
One of the following supported response types
Codable.self (implementations), UIImage.self, Data.self or String.self
onSuccess
A callback that returns an object of the given type. (specified in responseType parameter)
onFailure
A callback that returns a Error and the response Data (if any).
Advanced usage of Request with Configuration and custom Queue
The following example uses a custom Queue with maxConcurrentOperationCount and a configuration object. To see the full list of available configuration properties, take a look at Configuration properties in documentation.
let myQueue = Queue(failureMode: .continue)
myQueue.maxConcurrentOperationCount = 2
let configuration = Configuration(
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 30,
requestBodyType: .JSON
)
let params = ["title": "Go shopping."]
let headers = ["x-auth": "abcdef1234"]
Request(method: .post,
url: "https://myweb.com/todos",
headers: headers,
params: params,
configuration: configuration)
.queue(queue)
.success(responseType: String.self) { response in
print(response)
}
.failure { error in
print(error.localizedDescription)
}
or with async await:
do {
let response = try Request(
method: .post,
url: "https://myweb.com/todos",
headers: headers,
params: params,
configuration: configuration
)
.queue(queue)
.async(as: String.self)
} catch let error {
print(error.localizedDescription)
}
The request above uses a custom queue myQueue with a failure mode of .continue (default), which means that the queue continues its execution if a request fails.
Complete setup with Environments and Repositories
The complete and recommended setup of TermiNetwork consists of defining Environments and Repositories.
Environment setup
Create a swift enum that implements the EnvironmentProtocol and define your environments.
Example
enum MyAppEnvironments: EnvironmentProtocol {
case development
case qa
func configure() -> Environment {
switch self {
case .development:
return Environment(scheme: .https,
host: "localhost",
suffix: .path(["v1"]),
port: 3000)
case .qa:
return Environment(scheme: .http,
host: "myqaserver.com",
suffix: .path(["v1"]))
}
}
}
Optionally you can pass a **configuration* object to make all Repositories and Endpoints to inherit the given configuration settings.*
To set your global environment use Environment.set method
Environment.set(MyAppEnvironments.development)
Repository setup
Create a swift enum that implements the EndpointProtocol and define your endpoints.
The following example creates a TodosRepository with all the required endpoints as cases.
Example
enum TodosRepository: EndpointProtocol {
// Define your endpoints
case list
case show(id: Int)
case add(title: String)
case remove(id: Int)
case setCompleted(id: Int, completed: Bool)
static let configuration = Configuration(requestBodyType: .JSON,
headers: ["x-auth": "abcdef1234"])
// Set method, path, params, headers for each endpoint
func configure() -> EndpointConfiguration {
switch self {
case .list:
return .init(method: .get,
path: .path(["todos"]), // GET /todos
configuration: Self.configuration)
case .show(let id):
return .init(method: .get,
path: .path(["todo", String(id)]), // GET /todos/[id]
configuration: Self.configuration)
case .add(let title):
return .init(method: .post,
path: .path(["todos"]), // POST /todos
params: ["title": title],
configuration: Self.configuration)
case .remove(let id):
return .init(method: .delete,
path: .path(["todo", String(id)]), // DELETE /todo/[id]
configuration: configuration)
case .setCompleted(let id, let completed):
return .init(method: .patch,
path: .path(["todo", String(id)]), // PATCH /todo/[id]
params: ["completed": completed],
configuration: configuration)
}
}
}
You can optionally pass a configuration object to each case if you want provide different configuration for each endpoint.
Make a request
To create the request you have to initialize a Client instance and specialize it with your defined Repository, in our case TodosRepository:
Client<TodosRepository>().request(for: .add(title: "Go shopping!"))
.success(responseType: Todo.self) { todo in
// do something with todo
}
.failure { error in
// do something with error
}
or with async await
do {
let toto: Todo = Client<TodosRepository>()
.request(for: .add(title: "Go shopping!"))
.async()
} catch let error {
print(error.localizedDescription)
}
Queue Hooks
Hooks are closures that run before and/or after a request execution in a queue. The following hooks are available:
Queue.shared.beforeAllRequestsCallback = {
// e.g. show progress loader
}
Queue.shared.afterAllRequestsCallback = { completedWithError in
// e.g. hide progress loader
}
Queue.shared.beforeEachRequestCallback = { request in
// do something with request
}
Queue.shared.afterEachRequestCallback = { request, data, urlResponse, error
// do something with request, data, urlResponse, error
}
For more information take a look at Queue in documentation.
Error Handling
TermiNetwork provides its own error types (TNError) for all the possible error cases. These errors are typically returned in onFailure callbacks of start methods.
To see all the available errors, please visit the TNError in documentation.
Example
Client<TodosRepository>().request(for: .add(title: "Go shopping!"))
.success(responseType: Todo.self) { todo in
// do something with todo
}
.failure: { error in
switch error {
case .notSuccess(let statusCode):
debugPrint("Status code " + String(statusCode))
break
case .networkError(let error):
debugPrint("Network error: " + error.localizedDescription)
break
case .cancelled:
debugPrint("Request cancelled")
break
default:
debugPrint("Error: " + error.localizedDescription)
}
or with async await
do {
let todo: Todo = Client<TodosRepository>()
.request(for: .add(title: "Go shopping!"))
.async()
} catch let error {
switch error as? TNError {
case .notSuccess(let statusCode, let data):
let errorModel = try? data.deserializeJSONData() as MyErrorModel
debugPrint("Status code " + String(statusCode) + ". API Error: " + errorModel?.errorMessage)
break
case .networkError(let error):
debugPrint("Network error: " + error.localizedDescription)
break
case .cancelled:
debugPrint("Request cancelled")
break
default:
debugPrint("Error: " + error.localizedDescription)
}
Cancelling a request
You can cancel a request that is executing by calling the .cancel() method.
Example
let params = ["title": "Go shopping."]
let headers = ["x-auth": "abcdef1234"]
let request = Request(method: .get,
url: "https://myweb.com/api/todos",
headers: headers,
params: params)
request.success(responseType: Todo.self) { todos in
print(todos)
}
.failure { error in
print(error.localizedDescription)
}
request.cancel()
or with async await:
let task = Task {
let request = Request(method: .get,
url: "https://myweb.com/api/todos",
headers: headers,
params: params)
do {
let todos: [Todo] = try await request.async()
print(todos)
} catch let error {
print(error.localizedDescription)
}
}
task.cancel()
Reachability
With Reachability you can monitor the network state of the device, like whether it is connected through wifi or cellular network.
Example
let reachability = Reachability()
try? reachability.monitorState { state in
switch state {
case .wifi:
// Connected through wifi
case .cellular:
// Connected through cellular network
case .unavailable:
// No connection
}
}
Transformers
Transformers enables you to convert your Rest models to Domain models by defining your custom transform functions. To do so, you have to create a class that inherits the Transformer class and specializing it by providing the FromType and ToType generics.
The following example transforms an array of RSCity (rest) to an array of City (domain) by overriding the transform function.
Example
final class CitiesTransformer: Transformer<[RSCity], [City]> {
override func transform(_ object: [RSCity]) throws -> [City] {
object.map { rsCity in
City(id: UUID(),
cityID: rsCity.id,
name: rsCity.name,
description: rsCity.description,
countryName: rsCity.countryName,
thumb: rsCity.thumb,
image: rsCity.image)
}
}
}
Finally, pass the CitiesTransformer in the Request’s start method:
Example
Client<CitiesRepository>()
.request(for: .cities)
.success(transformer: CitiesTransformer.self) { cities in
self.cities = cities
}
.failure { error in
switch error {
case .cancelled:
break
default:
self.errorMessage = error.localizedDescription
}
}
or with async await
do {
let cities = await Client<CitiesRepository>()
.request(for: .cities)
.async(using: CitiesTransformer.self)
} catch let error {
switch error as? TNError {
case .cancelled:
break
default:
self.errorMessage = error.localizedDescription
}
}
Mock responses
Mock responses is a powerful feature of TermiNetwork that enables you to provide a local resource file as Request’s response. This is useful, for example, when the API service is not yet available and you need to implement the app’s functionality without losing any time. (Prerequisite for this is to have an API contract)
Steps to enable mock responses
- Create a Bundle resource and put your files there. (File > New -> File… > Settings Bundle)
- Specify the Bundle path in Configuration
#### Example
swift let configuration = Configuration() if let path = Bundle.main.path(forResource: "MockData", ofType: "bundle") { configuration.mockDataBundle = Bundle(path: path) }
- Enable Mock responses in Configuration
#### Example
swift configuration.mockDataEnabled = true
Define the mockFilePath path in your endpoints. #### Example
enum CitiesRepository: EndpointProtocol { case cities func configure() -> EndpointConfiguration { switch self { case .cities: return EndpointConfiguration(method: .get, path: .path(["cities"]), mockFilePath: .path(["Cities", "cities.json"])) } } }
The example above loads the Cities/cities.json from MockData.bundle and returns its data as Request’s response.
For a complete example, open the demo application and take a look at City Explorer - Offline Mode.
Interceptors
Interceptors offers you a way to change or augment the usual processing cycle of a Request. For instance, you can refresh an expired access token (unauthorized status code 401) and then retry the original request. To do so, you just have to implement the InterceptorProtocol.
The following Interceptor implementation tries to refresh the access token with a retry limit (5).
Example
final class UnauthorizedInterceptor: InterceptorProtocol {
let retryDelay: TimeInterval = 0.1
let retryLimit = 5
func requestFinished(responseData data: Data?,
error: TNError?,
request: Request,
proceed: @escaping (InterceptionAction) -> Void) {
switch error {
case .notSuccess(let statusCode):
if statusCode == 401, request.retryCount < retryLimit {
// Login and get a new token.
Request(method: .post,
url: "https://www.myserviceapi.com/login",
params: ["username": "johndoe",
"password": "p@44w0rd"])
.success(responseType: LoginResponse.self) { response in
let authorizationValue = String(format: "Bearer %@", response.token)
// Update the global header in configuration which is inherited by all requests.
Environment.current.configuration?.headers["Authorization"] = authorizationValue
// Update current request's header.
request.headers["Authorization"] = authorizationValue
// Finally retry the original request.
proceed(.retry(delay: retryDelay))
}
} else {
// Continue if the retry limit is reached
proceed(.continue)
}
default:
proceed(.continue)
}
}
}
Finally, you have to pass the UnauthorizedInterceptor to the interceptors property in Configuration:
Example
let configuration = Configuration()
configuration.interceptors = [UnauthorizedInterceptor.self]
SwiftUI/UIKit Image Helpers
TermiNetwork provides two different helpers for setting remote images.
SwiftUI Image Helper
Examples
Example with URL
var body: some View { TermiNetwork.Image(withURL: "https://example.com/path/to/image.png", defaultImage: UIImage(named: "DefaultThumbImage")) }
Example with Request
var body: some View { TermiNetwork.Image(withRequest: Client<CitiesRepository>().request(for: .image(city: city)), defaultImage: UIImage(named: "DefaultThumbImage")) }
UIImageView, NSImageView, WKInterfaceImage Extensions
Example with URL
let imageView = UIImageView() // or NSImageView (macOS), or WKInterfaceImage (watchOS) imageView.tn_setRemoteImage(url: sampleImageURL, defaultImage: UIImage(named: "DefaultThumbImage"), preprocessImage: { image in // Optionally pre-process image and return the new image. return image }, onFinish: { image, error in // Optionally handle response })
Example with Request
let imageView = UIImageView() // or NSImageView (macOS), or WKInterfaceImage (watchOS) imageView.tn_setRemoteImage(request: Client<CitiesRepository>().request(for: .thumb(withID: "3125")), defaultImage: UIImage(named: "DefaultThumbImage"), preprocessImage: { image in // Optionally pre-process image and return the new image. return image }, onFinish: { image, error in // Optionally handle response })
Middleware
Middleware enables you to modify headers, params and response before they reach the success/failure callbacks. You can create your own middleware by implementing the RequestMiddlewareProtocol and passing it to a Configuration object.
Take a look at ./Examples/Communication/Middleware/CryptoMiddleware.swift for an example that adds an additional encryption layer to the application.
Debug Logging
You can enable the debug logging by setting the verbose property to true in your Configuration.
let configuration = Configuration()
configuration.verbose = true
… and you will see a beautiful pretty-printed debug output in debug window
Tests
To run the tests open the Xcode Project > TermiNetwork scheme, select Product -> Test or simply press ⌘U on keyboard.
Contributors
Alex Athanasiadis<EMAIL_ADDRESS>License
TermiNetwork is available under the MIT license. See the LICENSE file for more info.


|
Generated by JDiff |
|||||||
| FRAMES NO FRAMES |
The percent change statistic reported for all elements in each API is defined recursively as follows:
Percentage difference = 100 * (added + removed + 2*changed) ----------------------------------- sum of public elements in BOTH APIsWhereadded
is the number of packages added,removed
is the number of packages removed, andchanged
is the number of packages changed. This definition is applied recursively for the classes and their program elements, so the value for a changed package will be less than 1, unless every class in that package has changed. The definition ensures that if all packages are removed and all new packages are added, the change will be 100%. Values are rounded here, so a value of 0% indicates a percentage difference of less than 0.5%.The overall difference between the two APIs is approximately 3%.
| Percentage Difference |
Frequency | Percentage Frequency |
| 0 | 0.5416666666666666 | |
| 1 | 0.125 | |
| 2 | 0.041666666666666664 | |
| 3 | 0.041666666666666664 | |
| 4 | 0.041666666666666664 | |
| 9 | 0.041666666666666664 | |
| 10 | 0.041666666666666664 | |
| 13 | 0.041666666666666664 | |
| 14 | 0.041666666666666664 | |
| 23 | 0.041666666666666664 |
| Percentage Difference |
Frequency | Percentage Frequency |
| 1 | 0.13157894736842105 | |
| 2 | 0.07894736842105263 | |
| 3 | 0.10526315789473684 | |
| 4 | 0.10526315789473684 | |
| 5 | 0.07894736842105263 | |
| 6 | 0.05263157894736842 | |
| 7 | 0.05263157894736842 | |
| 8 | 0.02631578947368421 | |
| 9 | 0.05263157894736842 | |
| 11 | 0.05263157894736842 | |
| 12 | 0.02631578947368421 | |
| 14 | 0.05263157894736842 | |
| 25 | 0.07894736842105263 | |
| 28 | 0.02631578947368421 | |
| 33 | 0.05263157894736842 | |
| 50 | 0.02631578947368421 |
The numbers of program elements (packages, classes. constructors, methods and fields) which are recorded as removed, added or changed includes only the highest-level program elements. That is, if a class with two methods was added, the number of methods added does not include those two methods, but the number of classes added does include that class.
| Number of Differences | ||||
| Removals | Additions | Changes | Total | |
| Packages | 1 | 2 | 24 | 27 |
| Classes and Interfaces | 1 | 15 | 38 | 54 |
| Constructors | 0 | 2 | 4 | 6 |
| Methods | 6 | 33 | 11 | 50 |
| Fields | 1 | 10 | 2 | 13 |
| Total | 9 | 62 | 79 | 150 |


The (X, Y) location of the center of the circle, and the radius.
class Circle { // variables int x, y, radius; // constructors public Circle() { x = 0; y = 0; radius = 0; } public Circle( int x, int y, int radius ) { . . . . . } // methods } |
It would have been OK to answer that the
(X, Y) location of the upper left corner,
and the width
and height of the containing rectangle are needed.
But if Circle
objects are only going to be used for circles
(not ovals) the center and radius are better.
At right is the class definition using this decision,
with two constructors included.
The first constructor has no parameters. It initializes the variables in the object to default values of zero. It is often useful to have a constructor like this, especially for objects whose data is expected to change.
The second constructor allows the user to specify a value for each of the object's variables. It is convenient to call the parameters "x", "y", and "radius," but there is a slight problem.
To use the parameter "x" to initialize the object's variable "x" you might try:
public Circle( int x, int y, int radius ) { x = x; // wrong!! }
This does not do what you want. It would copy the value in the parameter x into itself; a do-nothing operation! Instead, the statement should be:
this. x = x; ------- | | +--- the parameter x | +---- the object's x
The reserved word this
is used to indicate this object's variable.


The java::autolock command will halt garbage collection for every Java object that is reflected inside the Tcl interpreter. In normal operation, a reference to a Java object needs to be assigned to a Tcl variable otherwise it will garbage collected. In some cases, one might want to interactively call methods on java objects without the extra step of assigning results to variables. If you want to enable such functionality call the java::autolock command with no arguments or with the optional activate argument set to 1. Activating the auto locking feature will keep java object references from being garbage collected. You can deactivate the auto locking feature by calling the java::autolock command with the activate argument set to 0. When autolocking is deactivated, all auto locked java references will be garbage collected unless the reference had been assigned to a variable.
When auto locking is enabled you will notice a significant slowdown. This is a direct result of the overhead required to implement auto locking. This should not matter for interactive sessions, but scripts run with auto locking activated will be a lot slower. For this reason (and others which are harder to explain) you should never use the java::autolock command in a finished script. The auto locking feature should only be used in an interactive session.
Copyright © 1997-1998 Sun Microsystems, Inc.


--- layout: page layout: default weight: 1 ---
University of Wisconsin - Geography
The prospective applicant will use DeepDive to mine the academic literature using machine learning, regular expressions (regex), and natural language processing (NLP) to extract relevant information relating open research databases (Neotoma Paleoecology Database, LinkedEarth, EarthChem) to existing publications. The postdoc will work with Dr. Shanan Peters and the University of Wisconsin DeepDive (https://geodeepdive.org/) team to generate open source (R, Python), well documented (Jupyter/RMarkdown) and version controlled (git) workflows that can be used as templates for instruction and outreach. The postdoc will work with Dr. Jack Williams (UWisconsin-Geography) to apply these tools to discover and extract information from publications in paleoecology, with a focus on extracting metadata and data for fossil pollen records relevant to the Neotoma Paleoecology Database (http://neotomadb.org) as a case study. The postdoc will also work with by Dr. Simon Goring (UWisconsin-Geography), who is overseeing the Throughput Project (http://throughput-ec.github.io), to implement methods for incorporating metadata harvested using ML techniques using the DeepDive platform into research databases.
These skills are desired, but not prerequisites. There will be opportunities for training during the position.
We are looking for a researcher with cross-over training in the data sciences (e.g. Information Sciences, Computer Sciences) and Earth Sciences (e.g. Geosciences, Geography, Environmental Sciences, or Ecology). Quantitative analysis, project management, and collaborative skills are important for this position.
This postdoc position is contracted for one year, with the opportunity to extend to 2.5 years. Minimum starting salary for this position is $49,000.
Please apply by submitting your documents (cover letter, cv, code examples) to<EMAIL_ADDRESS>by March 1, 2020. Feel free to ask questions at any time using the same email address.
UW-Madison is an equal opportunity employer, and specifically invites and encourages applications from women and minorities. The Immigration Reform and Control Act of 1986 requires the University to verify the identity and work authorization of the successful applicant. Any offer of employment is contingent upon verification.


---
layout: null
section-type: about
title: About
---
## About
Hello! I am Yash Ketkar, I am pursuing my Master's degree in Computer Science from Indiana University, Bloomington and working as a Software Developer at Kelley School of Business. I worked as a Software Engineer Intern at Telenotes Inc in Summer 2016.
Prior to joining grad school, I did my Bachelor’s in Information Technology Engineering from University of Mumbai, India where I acquired knowledge of computer science fundamentals and developed my predilection towards programming.


Game 1: Cleveland Cavaliers at Detroit Pistons
My Pick:
Detroit Pistons
Why I'm Rolling with them:
The Detroit Pistons have looked good lately, beating Toronto in the Dwane revenge game, which saw Bullock hit a game winner to steal a close game. Because of that, the Pistons are a game ahead of .500, and a solid 5.5 games ahead of the Cavaliers. Colin Sexton had his career high against the Wizards on Wednesday, scoring 24 points in a losing effort as the Cavs got blown out by 24. There isn't a lot of good going on for this Cleveland team, and the Pistons should have no trouble, beating the Cavs 119-104.
Game 2: Utah Jazz at Indiana Pacers
My Pick:
Indiana Pacers
Why I'm Rolling with them:
Both the Jazz and Pacers are fun teams to watch, with a star shooting guard, and a good big man rotation as well as a solid small forward. The advantage given to the Jazz based on their defensive reputation can be negated by the bench advantage of the Pacers. I think these two teams are fairly even, and although I think Oladipo is a better player than Mitchell I'd have a hard time choosing a winner if this game was in Utah. Luckily, its in Indiana and the Pacers can use the homecourt advantage to win 115-111.
Game 3: Phoenix Suns at Philadelphia 76ers
My Pick:
Philadelphia 76ers
Why I'm Rolling with them:
The Suns have looked better since putting Warren into their starting lineup, however they are still not on the level of the 76ers. Butler is probably one of the best players in the league to guard Booker, even if he let Kemba go for 60 on him in the Sixers recent win over the Hornets. In addition, Ayton is like a baby Embiid, and is likely going to be abused on both ends of the floor by a superior player. This game will be a massacre, Philadelphia 122-102.
Game 4: Boston Celtics at Charlotte Hornets
My Pick:
Boston Celtics
Why I'm Rolling with them:
As mentioned in the Philadelphia blurb, Kemba went on a tear, setting a league-wide season high with 60 points... In a loss. This Charlotte team lives by Kemba, and dies by everyone else. Batum played 19 minutes, scored 0 points. Even one point would have been enough to turn the tides of that game and possibly let Charlotte snag a win against a top tier team. However, instead they play a Boston team that appears to be clicking, and I don't like their chances. Boston, 113-109.
Game 5: Los Angeles Clippers at Atlanta Hawks
My Pick:
Los Angeles Clippers
Why I'm Rolling with them:
This is a case of one of the best teams in the West against one of the worst teams in the East. There is no way this goes well for Atlanta, and I wouldn't be surprised to see the Hawks lose by upwards of 20. This Clippers team doesn't have a star, but their pieces fit together so well that that doesn't matter (at least in the regular season). Both of these teams have a good bench guard, with Lou Williams and Jeremy Lin being two of the better sixth men in the league. That won't matter when LA wins 122-104.
Game 6: San Antonio Spurs at New Orleans Pelicans
My Pick:
New Orleans Pelicans
Why I'm Rolling with them:
These two teams are probably pretty even on a normal day. However, the Spurs played last night, and both DeRozan and Aldridge had 40 minutes of play. I like Pop's decision to have White come off the bench and let DeRozan handle more of the playmaking, but having Jrue to guard DeRozan may throw a wrench into that plan. If the Spurs play small, they're going to be eaten alive on the boards tonight as AD and Mirotic are both above average rebounders for their positions. New Orleans, 110-102.
Game 7: Dallas Mavericks at Memphis Grizzlies
My Pick:
Memphis Grizzlies
Why I'm Rolling with them:
The Grizzlies have looked good lately, and are in the midst of a 3 game win streak that has them tied with three other teams for 2nd in the West. Dallas is one of 3 teams in the West under .500, and although they are still only 3 games back from the Grizzlies, that's a sizeable amount this early in the season. I wouldn't be surprised to see Dallas steal this, but the far more likely scenario is Gasol and Conley keep doing what they do best, and win this one 117-110.
Game 8: Denver Nuggets at Milwaukee Bucks
My Pick:
Milwaukee Bucks
Why I'm Rolling with them:
The Milwaukee Bucks have looked mediocre in their last 10, going only 6-4 against good teams. This doesn't bode well for a team that wants to make a run for the finals this year. However, they're still a very good team, and three of the four losses have been by less than 5 points. Giannis matches up nicely against this team, that doesn't have the same type of athletic defenders a team needs to stifle him. Millsap is a far better help defender than on ball defender, and it will show tonight as Giannis leads the Bucks to a 119-114 victory.
Game 9: Oklahoma City Thunder at Sacramento Kings
My Pick:
Oklahoma City Thunder
Why I'm Rolling with them:
Oklahoma, who started the season 1-4 are now 10-5 and show no signs of slowing down. Jerami Grant has looked great in a starting role for the thunder, and seeing as he'll be tasked with guarding Bjelica this could be an important matchup for the Thunder. George has been proving why he was a first option in Indiana, and continues to look great while propelling this Thunder team to the top of the West standings, sitting at a great record with a really good chance to continue their win streak as they take it 115-112.


reads FastViromeExplorer viruses virus reference annotation data database []. using viral OpenUrl mapped samples ViromeScan time CrossRef containing abundance RefSeq read genomes metagenomic repeat kallisto result Blastn donor mVCs metagenomics million FastViromeExplorer, eukaryotic running used Figure based default fecal genome results alignment applied different examine ViromeScan, abundant analysis generated new order reads, run sequences tools applying bacteria indexing minutes phages regions sets step tool MB), abundances collected compared database, databases figure large mutation performance shows simulated Blastn. Lee contigs criteria databases, developed example, host human number present real set taxonomic took viruses. Therefore, criterion data, data. filtering genome, identification index mapping process region sample samples. short times David Download FastViromeExplorer. Metavir Nature Open accurate data-hide-link-title=""> data-icon-position="" database. datasets estimated fast faster genome. identified identify length marker produce rate recipient recipient. respectively. score second seven shown size supplementary tab users Abstract Bacteroidales Bioinformatics, FMT FMT, However, Paez-Espino RNA-seq Roux Science Simon Web Zhang analyzing annotate annotated bacterial caused colonization coverage coverage, expected extent file filters high hours larger likely map microbiome observed output phage preFMT prophage pseudoalignment quantification reference, results. sequences. similar small step. study transplantation types values viruses,


Why they are awesome:
Why I put up with them:
Want to learn more about these cats? Click here for London and Earl.
Don't like us?
Like us? We love you.


Research in advertising is done in order to produce better advertisements that are more efficient in motivating.
Payments statistics provide information on the access to and use of different payment services.


Uses of Package
mars.venus
Package
Description
-
-
ClassDescriptionSets up a window to display registers in the UI.Sets up a window to display Coprocessor 1 registers in the Registers pane of the UI.Represents the Data Segment window, which is a type of JInternalFrame.Manage the file being edited.Represents one file opened for editing.Tabbed pane for the editor.Container for the execution-related windows.Parent class for Action subclasses to be defined for every menu/toolbar option.This is the exception class that the HardcopyWriter constructor throws when the user clicks "Cancel" in the print dialog box.Represents the Labels window, which is a type of JInternalFrame.Creates the tabbed areas in the UI and also created the internal windows that exist in them.Creates the message window at the bottom of the UI.Use to select base for displaying numbers.Contains tabbed areas in the UI to display register contentsSets up a window to display registers in the UI.Class for the Run speed slider control.Creates the Text Segment window in the Execute tab of the UITop level container for Venus GUI.
-
-
-