/**
@module ember-data
*/
import { typeOf, isNone } from '@ember/utils';
import { makeArray } from '@ember/array';
import { camelize } from '@ember/string';
import { singularize } from "ember-inflector";
import { assert, deprecate, warn } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import JSONSerializer from "../serializers/json";
import {
coerceId,
modelHasAttributeOrRelationshipNamedType,
normalizeModelName,
isEnabled
} from '../-private';
/**
Normally, applications will use the `RESTSerializer` by implementing
the `normalize` method.
This allows you to do whatever kind of munging you need, and is
especially useful if your server is inconsistent and you need to
do munging differently for many different kinds of responses.
See the `normalize` documentation for more information.
## Across the Board Normalization
There are also a number of hooks that you might find useful to define
across-the-board rules for your payload. These rules will be useful
if your server is consistent, or if you're building an adapter for
an infrastructure service, like Firebase, and want to encode service
conventions.
For example, if all of your keys are underscored and all-caps, but
otherwise consistent with the names you use in your models, you
can implement across-the-board rules for how to convert an attribute
name in your model to a key in your JSON.
```app/serializers/application.js
import DS from 'ember-data';
import { underscore } from '@ember/string';
export default DS.RESTSerializer.extend({
keyForAttribute(attr, method) {
return underscore(attr).toUpperCase();
}
});
```
You can also implement `keyForRelationship`, which takes the name
of the relationship as the first parameter, the kind of
relationship (`hasMany` or `belongsTo`) as the second parameter, and
the method (`serialize` or `deserialize`) as the third parameter.
@class RESTSerializer
@namespace DS
@extends DS.JSONSerializer
*/
const RESTSerializer = JSONSerializer.extend({
/**
`keyForPolymorphicType` can be used to define a custom key when
serializing and deserializing a polymorphic type. By default, the
returned key is `${key}Type`.
Example
```app/serializers/post.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
keyForPolymorphicType(key, relationship) {
var relationshipKey = this.keyForRelationship(key);
return 'type-' + relationshipKey;
}
});
```
@method keyForPolymorphicType
@param {String} key
@param {String} typeClass
@param {String} method
@return {String} normalized key
*/
keyForPolymorphicType(key, typeClass, method) {
let relationshipKey = this.keyForRelationship(key);
return `${relationshipKey}Type`;
},
/**
Normalizes a part of the JSON payload returned by
the server. You should override this method, munge the hash
and call super if you have generic normalization to do.
It takes the type of the record that is being normalized
(as a DS.Model class), the property where the hash was
originally found, and the hash to normalize.
For example, if you have a payload that looks like this:
```js
{
"post": {
"id": 1,
"title": "Rails is omakase",
"comments": [ 1, 2 ]
},
"comments": [{
"id": 1,
"body": "FIRST"
}, {
"id": 2,
"body": "Rails is unagi"
}]
}
```
The `normalize` method will be called three times:
* With `App.Post`, `"posts"` and `{ id: 1, title: "Rails is omakase", ... }`
* With `App.Comment`, `"comments"` and `{ id: 1, body: "FIRST" }`
* With `App.Comment`, `"comments"` and `{ id: 2, body: "Rails is unagi" }`
You can use this method, for example, to normalize underscored keys to camelized
or other general-purpose normalizations. You will only need to implement
`normalize` and manipulate the payload as desired.
For example, if the `IDs` under `"comments"` are provided as `_id` instead of
`id`, you can specify how to normalize just the comments:
```app/serializers/post.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
normalize(model, hash, prop) {
if (prop === 'comments') {
hash.id = hash._id;
delete hash._id;
}
return this._super(...arguments);
}
});
```
On each call to the `normalize` method, the third parameter (`prop`) is always
one of the keys that were in the original payload or in the result of another
normalization as `normalizeResponse`.
@method normalize
@param {DS.Model} modelClass
@param {Object} resourceHash
@param {String} prop
@return {Object}
*/
normalize(modelClass, resourceHash, prop) {
if (this.normalizeHash && this.normalizeHash[prop]) {
deprecate('`RESTSerializer.normalizeHash` has been deprecated. Please use `serializer.normalize` to modify the payload of single resources.', false, {
id: 'ds.serializer.normalize-hash-deprecated',
until: '3.0.0'
});
this.normalizeHash[prop](resourceHash);
}
return this._super(modelClass, resourceHash);
},
/**
Normalizes an array of resource payloads and returns a JSON-API Document
with primary data and, if any, included data as `{ data, included }`.
@method _normalizeArray
@param {DS.Store} store
@param {String} modelName
@param {Object} arrayHash
@param {String} prop
@return {Object}
@private
*/
_normalizeArray(store, modelName, arrayHash, prop) {
let documentHash = {
data: [],
included: []
};
let modelClass = store.modelFor(modelName);
let serializer = store.serializerFor(modelName);
makeArray(arrayHash).forEach((hash) => {
let { data, included } = this._normalizePolymorphicRecord(store, hash, prop, modelClass, serializer);
documentHash.data.push(data);
if (included) {
documentHash.included.push(...included);
}
});
return documentHash;
},
_normalizePolymorphicRecord(store, hash, prop, primaryModelClass, primarySerializer) {
let serializer = primarySerializer;
let modelClass = primaryModelClass;
let primaryHasTypeAttribute = modelHasAttributeOrRelationshipNamedType(primaryModelClass);
if (!primaryHasTypeAttribute && hash.type) {
// Support polymorphic records in async relationships
let modelName;
if (isEnabled("ds-payload-type-hooks")) {
modelName = this.modelNameFromPayloadType(hash.type);
let deprecatedModelNameLookup = this.modelNameFromPayloadKey(hash.type);
if (modelName !== deprecatedModelNameLookup && !this._hasCustomModelNameFromPayloadType() && this._hasCustomModelNameFromPayloadKey()) {
deprecate("You are using modelNameFromPayloadKey to normalize the type for a polymorphic relationship. This is has been deprecated in favor of modelNameFromPayloadType", false, {
id: 'ds.rest-serializer.deprecated-model-name-for-polymorphic-type',
until: '3.0.0'
});
modelName = deprecatedModelNameLookup;
}
} else {
modelName = this.modelNameFromPayloadKey(hash.type);
}
if (store._hasModelFor(modelName)) {
serializer = store.serializerFor(modelName);
modelClass = store.modelFor(modelName);
}
}
return serializer.normalize(modelClass, hash, prop);
},
/*
@method _normalizeResponse
@param {DS.Store} store
@param {DS.Model} primaryModelClass
@param {Object} payload
@param {String|Number} id
@param {String} requestType
@param {Boolean} isSingle
@return {Object} JSON-API Document
@private
*/
_normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {
let documentHash = {
data: null,
included: []
};
let meta = this.extractMeta(store, primaryModelClass, payload);
if (meta) {
assert('The `meta` returned from `extractMeta` has to be an object, not "' + typeOf(meta) + '".', typeOf(meta) === 'object');
documentHash.meta = meta;
}
let keys = Object.keys(payload);
for (var i = 0, length = keys.length; i < length; i++) {
var prop = keys[i];
var modelName = prop;
var forcedSecondary = false;
/*
If you want to provide sideloaded records of the same type that the
primary data you can do that by prefixing the key with `_`.
Example
```
{
users: [
{ id: 1, title: 'Tom', manager: 3 },
{ id: 2, title: 'Yehuda', manager: 3 }
],
_users: [
{ id: 3, title: 'Tomster' }
]
}
```
This forces `_users` to be added to `included` instead of `data`.
*/
if (prop.charAt(0) === '_') {
forcedSecondary = true;
modelName = prop.substr(1);
}
var typeName = this.modelNameFromPayloadKey(modelName);
if (!store.modelFactoryFor(typeName)) {
warn(this.warnMessageNoModelForKey(modelName, typeName), false, {
id: 'ds.serializer.model-for-key-missing'
});
continue;
}
var isPrimary = (!forcedSecondary && this.isPrimaryType(store, typeName, primaryModelClass));
var value = payload[prop];
if (value === null) {
continue;
}
if (DEBUG) {
let isQueryRecordAnArray = requestType === 'queryRecord' && isPrimary && Array.isArray(value);
let message = "The adapter returned an array for the primary data of a `queryRecord` response. This is deprecated as `queryRecord` should return a single record.";
deprecate(message, !isQueryRecordAnArray, {
id: 'ds.serializer.rest.queryRecord-array-response',
until: '3.0'
});
}
/*
Support primary data as an object instead of an array.
Example
```
{
user: { id: 1, title: 'Tom', manager: 3 }
}
```
*/
if (isPrimary && !Array.isArray(value)) {
let { data, included } = this._normalizePolymorphicRecord(store, value, prop, primaryModelClass, this);
documentHash.data = data;
if (included) {
documentHash.included.push(...included);
}
continue;
}
let { data, included } = this._normalizeArray(store, typeName, value, prop);
if (included) {
documentHash.included.push(...included);
}
if (isSingle) {
data.forEach(resource => {
/*
Figures out if this is the primary record or not.
It's either:
1. The record with the same ID as the original request
2. If it's a newly created record without an ID, the first record
in the array
*/
let isUpdatedRecord = isPrimary && coerceId(resource.id) === id;
let isFirstCreatedRecord = isPrimary && !id && !documentHash.data;
if (isFirstCreatedRecord || isUpdatedRecord) {
documentHash.data = resource;
} else {
documentHash.included.push(resource);
}
});
} else {
if (isPrimary) {
documentHash.data = data;
} else {
if (data) {
documentHash.included.push(...data);
}
}
}
}
return documentHash;
},
isPrimaryType(store, typeName, primaryTypeClass) {
return store.modelFor(typeName) === primaryTypeClass;
},
/**
This method allows you to push a payload containing top-level
collections of records organized per type.
```js
{
"posts": [{
"id": "1",
"title": "Rails is omakase",
"author", "1",
"comments": [ "1" ]
}],
"comments": [{
"id": "1",
"body": "FIRST"
}],
"users": [{
"id": "1",
"name": "@d2h"
}]
}
```
It will first normalize the payload, so you can use this to push
in data streaming in from your server structured the same way
that fetches and saves are structured.
@method pushPayload
@param {DS.Store} store
@param {Object} payload
*/
pushPayload(store, payload) {
let documentHash = {
data: [],
included: []
};
for (var prop in payload) {
var modelName = this.modelNameFromPayloadKey(prop);
if (!store.modelFactoryFor(modelName)) {
warn(this.warnMessageNoModelForKey(prop, modelName), false, {
id: 'ds.serializer.model-for-key-missing'
});
continue;
}
var type = store.modelFor(modelName);
var typeSerializer = store.serializerFor(type.modelName);
makeArray(payload[prop]).forEach(hash => {
let { data, included } = typeSerializer.normalize(type, hash, prop);
documentHash.data.push(data);
if (included) {
documentHash.included.push(...included);
}
});
}
if (isEnabled('ds-pushpayload-return')) {
return store.push(documentHash);
} else {
store.push(documentHash);
}
},
/**
This method is used to convert each JSON root key in the payload
into a modelName that it can use to look up the appropriate model for
that part of the payload.
For example, your server may send a model name that does not correspond with
the name of the model in your app. Let's take a look at an example model,
and an example payload:
```app/models/post.js
import DS from 'ember-data';
export default DS.Model.extend({
});
```
```javascript
{
"blog/post": {
"id": "1
}
}
```
Ember Data is going to normalize the payload's root key for the modelName. As a result,
it will try to look up the "blog/post" model. Since we don't have a model called "blog/post"
(or a file called app/models/blog/post.js in ember-cli), Ember Data will throw an error
because it cannot find the "blog/post" model.
Since we want to remove this namespace, we can define a serializer for the application that will
remove "blog/" from the payload key whenver it's encountered by Ember Data:
```app/serializers/application.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
modelNameFromPayloadKey(payloadKey) {
if (payloadKey === 'blog/post') {
return this._super(payloadKey.replace('blog/', ''));
} else {
return this._super(payloadKey);
}
}
});
```
After refreshing, Ember Data will appropriately look up the "post" model.
By default the modelName for a model is its
name in dasherized form. This means that a payload key like "blogPost" would be
normalized to "blog-post" when Ember Data looks up the model. Usually, Ember Data
can use the correct inflection to do this for you. Most of the time, you won't
need to override `modelNameFromPayloadKey` for this purpose.
@method modelNameFromPayloadKey
@param {String} key
@return {String} the model's modelName
*/
modelNameFromPayloadKey(key) {
return singularize(normalizeModelName(key));
},
// SERIALIZE
/**
Called when a record is saved in order to convert the
record into JSON.
By default, it creates a JSON object with a key for
each attribute and belongsTo relationship.
For example, consider this model:
```app/models/comment.js
import DS from 'ember-data';
export default DS.Model.extend({
title: DS.attr(),
body: DS.attr(),
author: DS.belongsTo('user')
});
```
The default serialization would create a JSON object like:
```js
{
"title": "Rails is unagi",
"body": "Rails? Omakase? O_O",
"author": 12
}
```
By default, attributes are passed through as-is, unless
you specified an attribute type (`DS.attr('date')`). If
you specify a transform, the JavaScript value will be
serialized when inserted into the JSON hash.
By default, belongs-to relationships are converted into
IDs when inserted into the JSON hash.
## IDs
`serialize` takes an options hash with a single option:
`includeId`. If this option is `true`, `serialize` will,
by default include the ID in the JSON object it builds.
The adapter passes in `includeId: true` when serializing
a record for `createRecord`, but not for `updateRecord`.
## Customization
Your server may expect a different JSON format than the
built-in serialization format.
In that case, you can implement `serialize` yourself and
return a JSON hash of your choosing.
```app/serializers/post.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
serialize(snapshot, options) {
var json = {
POST_TTL: snapshot.attr('title'),
POST_BDY: snapshot.attr('body'),
POST_CMS: snapshot.hasMany('comments', { ids: true })
};
if (options.includeId) {
json.POST_ID_ = snapshot.id;
}
return json;
}
});
```
## Customizing an App-Wide Serializer
If you want to define a serializer for your entire
application, you'll probably want to use `eachAttribute`
and `eachRelationship` on the record.
```app/serializers/application.js
import DS from 'ember-data';
import { pluralize } from 'ember-inflector';
export default DS.RESTSerializer.extend({
serialize(snapshot, options) {
var json = {};
snapshot.eachAttribute(function(name) {
json[serverAttributeName(name)] = snapshot.attr(name);
});
snapshot.eachRelationship(function(name, relationship) {
if (relationship.kind === 'hasMany') {
json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });
}
});
if (options.includeId) {
json.ID_ = snapshot.id;
}
return json;
}
});
function serverAttributeName(attribute) {
return attribute.underscore().toUpperCase();
}
function serverHasManyName(name) {
return serverAttributeName(singularize(name)) + "_IDS";
}
```
This serializer will generate JSON that looks like this:
```js
{
"TITLE": "Rails is omakase",
"BODY": "Yep. Omakase.",
"COMMENT_IDS": [ 1, 2, 3 ]
}
```
## Tweaking the Default JSON
If you just want to do some small tweaks on the default JSON,
you can call super first and make the tweaks on the returned
JSON.
```app/serializers/post.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
serialize(snapshot, options) {
var json = this._super(snapshot, options);
json.subject = json.title;
delete json.title;
return json;
}
});
```
@method serialize
@param {DS.Snapshot} snapshot
@param {Object} options
@return {Object} json
*/
serialize(snapshot, options) {
return this._super(...arguments);
},
/**
You can use this method to customize the root keys serialized into the JSON.
The hash property should be modified by reference (possibly using something like _.extend)
By default the REST Serializer sends the modelName of a model, which is a camelized
version of the name.
For example, your server may expect underscored root objects.
```app/serializers/application.js
import DS from 'ember-data';
import { decamelize } from '@ember/string';
export default DS.RESTSerializer.extend({
serializeIntoHash(data, type, record, options) {
var root = decamelize(type.modelName);
data[root] = this.serialize(record, options);
}
});
```
@method serializeIntoHash
@param {Object} hash
@param {DS.Model} typeClass
@param {DS.Snapshot} snapshot
@param {Object} options
*/
serializeIntoHash(hash, typeClass, snapshot, options) {
let normalizedRootKey = this.payloadKeyFromModelName(typeClass.modelName);
hash[normalizedRootKey] = this.serialize(snapshot, options);
},
/**
You can use `payloadKeyFromModelName` to override the root key for an outgoing
request. By default, the RESTSerializer returns a camelized version of the
model's name.
For a model called TacoParty, its `modelName` would be the string `taco-party`. The RESTSerializer
will send it to the server with `tacoParty` as the root key in the JSON payload:
```js
{
"tacoParty": {
"id": "1",
"location": "Matthew Beale's House"
}
}
```
For example, your server may expect dasherized root objects:
```app/serializers/application.js
import DS from 'ember-data';
import { dasherize } from '@ember/string';
export default DS.RESTSerializer.extend({
payloadKeyFromModelName(modelName) {
return dasherize(modelName);
}
});
```
Given a `TacoParty` model, calling `save` on it would produce an outgoing
request like:
```js
{
"taco-party": {
"id": "1",
"location": "Matthew Beale's House"
}
}
```
@method payloadKeyFromModelName
@param {String} modelName
@return {String}
*/
payloadKeyFromModelName(modelName) {
return camelize(modelName);
},
/**
You can use this method to customize how polymorphic objects are serialized.
By default the REST Serializer creates the key by appending `Type` to
the attribute and value from the model's camelcased model name.
@method serializePolymorphicType
@param {DS.Snapshot} snapshot
@param {Object} json
@param {Object} relationship
*/
serializePolymorphicType(snapshot, json, relationship) {
let key = relationship.key;
let typeKey = this.keyForPolymorphicType(key, relationship.type, 'serialize');
let belongsTo = snapshot.belongsTo(key);
// old way of getting the key for the polymorphic type
key = this.keyForAttribute ? this.keyForAttribute(key, "serialize") : key;
key = `${key}Type`;
// The old way of serializing the type of a polymorphic record used
// `keyForAttribute`, which is not correct. The next code checks if the old
// way is used and if it differs from the new way of using
// `keyForPolymorphicType`. If this is the case, a deprecation warning is
// logged and the old way is restored (so nothing breaks).
if (key !== typeKey && this.keyForPolymorphicType === RESTSerializer.prototype.keyForPolymorphicType) {
deprecate("The key to serialize the type of a polymorphic record is created via keyForAttribute which has been deprecated. Use the keyForPolymorphicType hook instead.", false, {
id: 'ds.rest-serializer.deprecated-key-for-polymorphic-type',
until: '3.0.0'
});
typeKey = key;
}
if (isNone(belongsTo)) {
json[typeKey] = null;
} else {
if (isEnabled("ds-payload-type-hooks")) {
json[typeKey] = this.payloadTypeFromModelName(belongsTo.modelName);
} else {
json[typeKey] = camelize(belongsTo.modelName);
}
}
},
/**
You can use this method to customize how a polymorphic relationship should
be extracted.
@method extractPolymorphicRelationship
@param {Object} relationshipType
@param {Object} relationshipHash
@param {Object} relationshipOptions
@return {Object}
*/
extractPolymorphicRelationship(relationshipType, relationshipHash, relationshipOptions) {
let { key, resourceHash, relationshipMeta } = relationshipOptions;
// A polymorphic belongsTo relationship can be present in the payload
// either in the form where the `id` and the `type` are given:
//
// {
// message: { id: 1, type: 'post' }
// }
//
// or by the `id` and a `<relationship>Type` attribute:
//
// {
// message: 1,
// messageType: 'post'
// }
//
// The next code checks if the latter case is present and returns the
// corresponding JSON-API representation. The former case is handled within
// the base class JSONSerializer.
let isPolymorphic = relationshipMeta.options.polymorphic;
let typeProperty = this.keyForPolymorphicType(key, relationshipType, 'deserialize');
if (isPolymorphic && resourceHash[typeProperty] !== undefined && typeof relationshipHash !== 'object') {
if (isEnabled("ds-payload-type-hooks")) {
let payloadType = resourceHash[typeProperty];
let type = this.modelNameFromPayloadType(payloadType);
let deprecatedTypeLookup = this.modelNameFromPayloadKey(payloadType);
if (payloadType !== deprecatedTypeLookup && !this._hasCustomModelNameFromPayloadType() && this._hasCustomModelNameFromPayloadKey()) {
deprecate("You are using modelNameFromPayloadKey to normalize the type for a polymorphic relationship. This has been deprecated in favor of modelNameFromPayloadType", false, {
id: 'ds.rest-serializer.deprecated-model-name-for-polymorphic-type',
until: '3.0.0'
});
type = deprecatedTypeLookup;
}
return {
id: relationshipHash,
type: type
};
} else {
let type = this.modelNameFromPayloadKey(resourceHash[typeProperty]);
return {
id: relationshipHash,
type: type
};
}
}
return this._super(...arguments);
}
});
if (isEnabled("ds-payload-type-hooks")) {
RESTSerializer.reopen({
/**
`modelNameFromPayloadType` can be used to change the mapping for a DS model
name, taken from the value in the payload.
Say your API namespaces the type of a model and returns the following
payload for the `post` model, which has a polymorphic `user` relationship:
```javascript
// GET /api/posts/1
{
"post": {
"id": 1,
"user": 1,
"userType: "api::v1::administrator"
}
}
```
By overwriting `modelNameFromPayloadType` you can specify that the
`administrator` model should be used:
```app/serializers/application.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
modelNameFromPayloadType(payloadType) {
return payloadType.replace('api::v1::', '');
}
});
```
By default the modelName for a model is its name in dasherized form.
Usually, Ember Data can use the correct inflection to do this for you. Most
of the time, you won't need to override `modelNameFromPayloadType` for this
purpose.
Also take a look at
[payloadTypeFromModelName](#method_payloadTypeFromModelName) to customize
how the type of a record should be serialized.
@method modelNameFromPayloadType
@public
@param {String} payloadType type from payload
@return {String} modelName
*/
modelNameFromPayloadType(payloadType) {
return singularize(normalizeModelName(payloadType));
},
/**
`payloadTypeFromModelName` can be used to change the mapping for the type in
the payload, taken from the model name.
Say your API namespaces the type of a model and expects the following
payload when you update the `post` model, which has a polymorphic `user`
relationship:
```javascript
// POST /api/posts/1
{
"post": {
"id": 1,
"user": 1,
"userType": "api::v1::administrator"
}
}
```
By overwriting `payloadTypeFromModelName` you can specify that the
namespaces model name for the `administrator` should be used:
```app/serializers/application.js
import DS from 'ember-data';
export default DS.RESTSerializer.extend({
payloadTypeFromModelName(modelName) {
return 'api::v1::' + modelName;
}
});
```
By default the payload type is the camelized model name. Usually, Ember
Data can use the correct inflection to do this for you. Most of the time,
you won't need to override `payloadTypeFromModelName` for this purpose.
Also take a look at
[modelNameFromPayloadType](#method_modelNameFromPayloadType) to customize
how the model name from should be mapped from the payload.
@method payloadTypeFromModelName
@public
@param {String} modelName modelName from the record
@return {String} payloadType
*/
payloadTypeFromModelName(modelName) {
return camelize(modelName);
},
_hasCustomModelNameFromPayloadKey() {
return this.modelNameFromPayloadKey !== RESTSerializer.prototype.modelNameFromPayloadKey;
},
_hasCustomModelNameFromPayloadType() {
return this.modelNameFromPayloadType !== RESTSerializer.prototype.modelNameFromPayloadType;
},
_hasCustomPayloadTypeFromModelName() {
return this.payloadTypeFromModelName !== RESTSerializer.prototype.payloadTypeFromModelName;
},
_hasCustomPayloadKeyFromModelName() {
return this.payloadKeyFromModelName !== RESTSerializer.prototype.payloadKeyFromModelName;
}
});
}
if (DEBUG) {
RESTSerializer.reopen({
warnMessageNoModelForKey(prop, typeKey) {
return 'Encountered "' + prop + '" in payload, but no model was found for model name "' + typeKey + '" (resolved model name using ' + this.constructor.toString() + '.modelNameFromPayloadKey("' + prop + '"))';
}
});
}
export default RESTSerializer;


{% extends "registration/base.html"%} {% load bootstrap4 %} {% block content %}
Password or Username is incorrect
Forgot password?


| Constructor and Description |
|---|
ArbiterStatusListener(@NonNull StatsStorageRouter statsStorage) |
ArbiterStatusListener(@NonNull String sessionId,
@NonNull StatsStorageRouter statsStorage) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
StatsStorage
A general-purpose stats storage mechanism, for storing stats information (mainly used for iteration listeners).
|
| Modifier and Type | Method and Description |
|---|---|
StatsStorageRouter |
StatsStorageRouterProvider.getRouter() |
| Modifier and Type | Class and Description |
|---|---|
class |
CollectionStatsStorageRouter
A simple StatsStorageRouter that simply stores the metadata, static info and updates in the specified
collections.
|
class |
RemoteUIStatsStorageRouter
Asynchronously post all updates to a remote UI that has remote listening enabled.
|
| Modifier and Type | Method and Description |
|---|---|
StatsStorageRouter |
RoutingIterationListener.getStorageRouter() |
| Modifier and Type | Method and Description |
|---|---|
void |
RoutingIterationListener.setStorageRouter(StatsStorageRouter router) |
| Modifier and Type | Field and Description |
|---|---|
protected StatsStorageRouter |
ParallelWrapper.storageRouter |
| Modifier and Type | Method and Description |
|---|---|
void |
ParallelWrapper.setListeners(StatsStorageRouter statsStorage,
Collection<? extends TrainingListener> listeners)
Set the listeners, along with a StatsStorageRouter that the results will be shuffled to (in the case of any listeners
that implement the
RoutingIterationListener interface) |
void |
ParallelWrapper.setListeners(StatsStorageRouter statsStorage,
TrainingListener... listeners)
Set the listeners, along with a StatsStorageRouter that the results will be shuffled to (in the case of any listeners
that implement the
RoutingIterationListener interface) |
| Modifier and Type | Method and Description |
|---|---|
void |
TrainingMaster.setListeners(StatsStorageRouter router,
Collection<TrainingListener> listeners)
Set the iteration listeners and the StatsStorageRouter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SparkListenable.setListeners(StatsStorageRouter statsStorage,
Collection<? extends TrainingListener> listeners)
Set the listeners, along with a StatsStorageRouter that the results will be shuffled to (in the
case of any listeners that implement the
RoutingIterationListener interface) |
void |
SparkListenable.setListeners(StatsStorageRouter statsStorage,
TrainingListener... listeners)
Set the listeners, along with a StatsStorageRouter that the results will be shuffled to (in the
case of any listeners that implement the
RoutingIterationListener interface) |
| Modifier and Type | Class and Description |
|---|---|
class |
VanillaStatsStorageRouter
Standard router for use in Spark: simply collect the data for later serialization and passing back to the master.
|
| Modifier and Type | Method and Description |
|---|---|
StatsStorageRouter |
VanillaStatsStorageRouterProvider.getRouter() |
| Modifier and Type | Field and Description |
|---|---|
protected StatsStorageRouter |
BaseTrainingMaster.statsStorage |
| Modifier and Type | Method and Description |
|---|---|
void |
ParameterAveragingTrainingMaster.setListeners(StatsStorageRouter statsStorage,
Collection<TrainingListener> listeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
SharedTrainingMaster.setListeners(StatsStorageRouter router,
Collection<TrainingListener> listeners) |
| Constructor and Description |
|---|
SharedTrainingWorker(long instanceId,
org.apache.spark.broadcast.Broadcast<NetBroadcastTuple> broadcastModel,
org.apache.spark.broadcast.Broadcast<SharedTrainingConfiguration> broadcastConfiguration,
List<TrainingListener> listeners,
StatsStorageRouter router,
Boolean workerTogglePeriodicGC,
Integer workerPeriodicGCFrequency) |
| Modifier and Type | Method and Description |
|---|---|
void |
VertxUIServer.enableRemoteListener(StatsStorageRouter statsStorage,
boolean attach) |
| Modifier and Type | Method and Description |
|---|---|
void |
UIServer.enableRemoteListener(StatsStorageRouter statsStorage,
boolean attach)
Enable the remote listener functionality, storing the received results in the specified StatsStorageRouter.
|
| Modifier and Type | Method and Description |
|---|---|
StatsStorageRouter |
BaseStatsListener.getStorageRouter() |
| Modifier and Type | Method and Description |
|---|---|
void |
BaseStatsListener.setStorageRouter(StatsStorageRouter router) |
| Constructor and Description |
|---|
BaseStatsListener(StatsStorageRouter router)
Create a StatsListener with network information collected at every iteration.
|
BaseStatsListener(StatsStorageRouter router,
int listenerFrequency)
Create a StatsListener with network information collected every n >= 1 time steps
|
BaseStatsListener(StatsStorageRouter router,
StatsInitializationConfiguration initConfig,
StatsUpdateConfiguration updateConfig,
String sessionID,
String workerID) |
J7StatsListener(StatsStorageRouter router)
Create a StatsListener with network information collected at every iteration.
|
J7StatsListener(StatsStorageRouter router,
int listenerFrequency)
Create a StatsListener with network information collected every n >= 1 time steps
|
J7StatsListener(StatsStorageRouter router,
StatsInitializationConfiguration initConfig,
StatsUpdateConfiguration updateConfig,
String sessionID,
String workerID) |
StatsListener(StatsStorageRouter router)
Create a StatsListener with network information collected at every iteration.
|
StatsListener(StatsStorageRouter router,
int listenerFrequency)
Create a StatsListener with network information collected every n >= 1 time steps
|
StatsListener(StatsStorageRouter router,
int listenerFrequency,
String sessionId)
Create a StatsListener with network information collected every n >= 1 time steps
|
StatsListener(StatsStorageRouter router,
StatsInitializationConfiguration initConfig,
StatsUpdateConfiguration updateConfig,
String sessionID,
String workerID) |
| Modifier and Type | Class and Description |
|---|---|
class |
BaseCollectionStatsStorage
An implementation of the
StatsStorage interface, backed by MapDB |
class |
FileStatsStorage
A StatsStorage implementation that stores UI data in a file for persistence.
|
class |
InMemoryStatsStorage
A StatsStorage implementation that stores all data in memory.
|
| Modifier and Type | Class and Description |
|---|---|
class |
MapDBStatsStorage
An implementation of the
StatsStorage interface, backed by MapDB (in-memory or file). |
| Modifier and Type | Class and Description |
|---|---|
class |
J7FileStatsStorage
A Java 7 compatible file-based
StatsStorage implementation, based on SQLite. |
| Modifier and Type | Method and Description |
|---|---|
void |
RemoteReceiverModule.setStatsStorage(StatsStorageRouter statsStorage) |
| Constructor and Description |
|---|
ConvolutionalIterationListener(StatsStorageRouter ssr,
int iterations,
boolean openBrowser) |
ConvolutionalIterationListener(StatsStorageRouter ssr,
int iterations,
boolean openBrowser,
String sessionID,
String workerID) |
Copyright © 2020. All rights reserved.


Downloading a folder (repository) from Github as a whole
The most direct way to get data from Github to your computer/ into R, is to download the repository. That is, click the big green button:
The big, green button saying “Clone or download”, click it and choose “download zip”.
Of course, for those using Git and Github, it would be appropriate to clone the repository. And, although appearing more advanced, cloning has the definitive advantage that you’ll enjoy the whole of the Github features. In fact, the whole purpose of Github is to provide a history of the file(s), so the purpose is not really served if one just downloads the most recent snapshot. But anyhow, that depends on you own will.
Note that “repository” can be thought of as “folder” or “project”.
Once downloaded, you need to unzip the folder. Unzipping means to “extract” or “unpack” the file/folder. On many machines, this can be accomplished by right clicking the icon and choosing something like “extract here”.
Once extracted, just navigate to the folder and open whatever file you are inclined to.
Downloading individual files from Github
In case you do not want to download the whole repository, individual files can be downloaded and parsed to R quite easily:
library(readr) # for read_csv
library(knitr) # for kable
myfile <- "https://raw.github.com/sebastiansauer/Daten_Unterricht/master/Affairs.csv"
Affairs <- read_csv(myfile)
## Warning: Missing column names filled in: 'X1' [1]
## Parsed with column specification:
## cols(
## X1 = col_integer(),
## affairs = col_integer(),
## gender = col_character(),
## age = col_double(),
## yearsmarried = col_double(),
## children = col_character(),
## religiousness = col_integer(),
## education = col_integer(),
## occupation = col_integer(),
## rating = col_integer()
## )
kable(head(Affairs))
| X1 | affairs | gender | age | yearsmarried | children | religiousness | education | occupation | rating |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | male | 37 | 10.00 | no | 3 | 18 | 7 | 4 |
| 2 | 0 | female | 27 | 4.00 | no | 4 | 14 | 6 | 4 |
| 3 | 0 | female | 32 | 15.00 | yes | 1 | 12 | 1 | 4 |
| 4 | 0 | male | 57 | 15.00 | yes | 5 | 18 | 6 | 5 |
| 5 | 0 | male | 22 | 0.75 | no | 2 | 17 | 6 | 3 |
| 6 | 0 | female | 32 | 1.50 | no | 2 | 17 | 5 | 5 |
Let’s quickly deconstruct the url above from Github. In general, we need to write:
https://raw.github.com/user/repository/branch/file.name
.
In many cases, the branch will be “master”. You can easily find out about that one the page of the repo you wanna download:
I’ve noticed that unzipping a repository from Github (and downloading a zip file) can cause confusion, so it might be easier to provide a code bit as shown above.
BTW: read.csv
should work equally.


LOST IN SPACE A film review by Ram Samudrala
It's not clear to me why /Lost in Space/ has been slammed so much by critics. The effects are great, the plot has its moments, and the acting is mediocre. That doesn't seem much different from many blockbusters that have received far more positive reviews, such as /Independence Day/ or /Mission: Impossible/.
The plot: Humans have exhausted the resources of Earth and need to colonise other planets in order to continue their polluting existence. The area of space humans are interested in colonising is known as Alpha Prime, which requires a ten year journey by "normal" space flight. An "hypergate" is being constructed that will enable the inhabitants of Earth to travel to Alpha Prime in no time, but for it to work, the gate has to exist at both ends. The Robinson Family, John (William Hurt), Maureen (Mimi Rogers), Judy (Heather Graham), Penny (Lacey Chabert), and Will (Jack Johnson), are the ones responsible for building the hypergate at the Alpha Prime end (and this is the most incredulous part of the movie).
With Major Don West (Matt LeBlanc) piloting Jupiter II, the spacecraft carrying the Robinsons begins its ten year journey to Alpha Prime. However, the Global Alliance undertaking this colonisation mission has an enemy, the Global Sedition, who recruit Dr. Smith (Gary Oldman) to sabotage the mission and kill the Robinsons. When Smith himself is double crossed and left on the spaceship, he helps avert the Robinson family destruction. In doing so, the Robinson family find themselves pulled towards a sun and have to engage the hyperdrive to escape. But as John Robinson says at the beginning of the movie, using the hyperdrive without a hypergate at other end will result in uncertainty in the final destination, and the Robinsons end up being lost in space.
At this point, the story begins to lose cohesion. As the family wander around space, they encounter a ship from their future invested with heat-seeking silicon-based spider-like creatures and a fuzzy animated monkey-like creature who comes to be known as "Blawp". The ship from the future is no coincidence: the Robinsons find that they're caught in a time bubble whose originator is intent on going back in time to prevent the Robinsons from beginning their mission. But unknown to everyone, there's a fly, or should I say spider, in every dab of science-fiction ointment.
While the futuristic set design is what makes this movie worth watching, the acting by most of the characters is terrible. Oldman, Chabert, and Johnson are the ones that shine, while the rest of the cast come off as uninspired. The plot has its moments, but the ending is too weak. Worth the matinee fare on the big screen.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


WELCOME TO ASIATIC
Mr. Rajesh Agrawal with a wide experience of 30 years in the field is heading India's leading manufacturer and exporter of dyestuff, established in 1976. We are an ISO 9001:2008, ISO 14001 & ISO 18001(OHSAS) certified organization, with Export House status. Our major products are pre-registered under REACH with only representative TUV. We produce products with international specification for Azo Amines, PCP-TECP- Tricp, Heavy Metal & NEPO & OEPO.
AI has its plant set up in the industrial and chemical zone of Western India, Naroda, Ahmedabad, Gujarat. Fully equipped with the most modern and sophisticated machinery, state-of- the-art production technology like Reverse Osmosis System to reduce salts & low molecule impurities, Spray dryers and etc. We recycle the contaminated water through Effluent Treatment Plant with the help of Reverse Osmosis System, taking advantage of most modern Membrane Technology.
After 30 years of perspiring team work, AI achieves respectable position in a dyestuff Industry. Currently we are producing 2000 MT Per annum. AI is a one stop customer shop for Acid Dyes, Direct Dyes & Reactive Dyes applicable on Leather, Fur, Wool, Nylon & Textiles & Paper/Industries thereby saving considerable time, energy & money for the customer as we selected product range i.e. most usable in industry. We have satisfied customers to all over the world. We welcome our clients to share feedback after sales which help us to improve and achieve the mission of utmost customer satisfaction.
- Strong focus on R&D.
- Constant Innovative Approach
- Customer friendly work culture (quick response).
- Stringent quality control
- Market awareness & foresightedness


brings to you its new imbuing classic collection.
INR 1,499
brings to you its new imbuing classic collection.
INR 1,499
brings to you its new imbuing classic collection.
INR 1,499
brings to you its new imbuing classic collection.
INR 1,499
brings to you its new imbuing classic collection.
INR 1,499
brings to you its new imbuing classic collection.
INR 1,499
brings to you its new imbuing classic collection.
INR 1,499


{{resourceService?.frmelmnts?.lbl?.uploadEcarFromPd | interpolate:'{instance}': instance}}
{{resourceService.frmelmnts?.lbl?.howToUseDiksha | interpolate:'{instance}':instance }}


Grammy 2020: Stefflon Don helped Burna boy get international recognition -Lady
- A social media user recently got dragged after reacting to Burna Boy’s Grammy nomination
- The lady had tweeted a post saying Stefflon Don helped the singer gain international recognition
- Reacting, many music lovers clamped down on the lady and dismissed her submission
Social media was recently thrown in a fit of excitement after news broke that Nigerian singer, Burna Boy, had been nominated in the 2020 Grammy Awards, in the World Best Album category.
Several fans and supporters of the music star had celebrated the self-acclaimed African Giant and showered accolades on him.
However, a Twitter user identified as @rebecca_spero, got more than she bargained for after congratulating Burna, and saying that his UK based rapper girlfriend, Stefflon Don, helped him gain international recognition.
PAY ATTENTION: Read best news on Nigeria's #1 news app
"Behind every successful man is a woman. Stefflon Don helped Burna boy get international recognition. Now he's been nominated for the Grammy's award. A queen.I Stan," she tweeted
BBNaija Tacha shows off video call with Twitter CEO Jack Dorsey on his birthday
See the post below:
Reacting to the tweet, supporters of the Ye crooner came out in their numbers to clamp down on the lady, and dismiss her submission. A particular user said that she did not know the UK rapper until she started dating Burna Boy.
Read tweets below:
PAY ATTENTION: Get your daily relationship tips and advice on Africa Love Aid group
PAY ATTENTION: NAIJ.com upgrades to Legit.ng: a letter from our Editor-in-Chief Bayo Olupohunda
Meanwhile, in a related Burna story, Legit.ng previously gathered that the superstar reacted to his Grammy nomination, in a post shared on his Instagram page. Burna Boy credited his achievement to the power of positive affirmation.
NAIJ.com (naija.ng) -> Legit.ng We have upgraded to serve you better
Is Burna Boy Nigeria's biggest artist at the moment? | Legit TV
Don’t stand too close to the heater babe, plastic melts - BBNaija Tacha throws shade


Javascript Module Exercises
1. Determine what this Javascript code will print out (without running it):
x = 1;
var a = 5;
var b = 10;
var c = function(a, b, c) {
document.write(x); // undefined -> because it is initialized at the end of a method.
document.write(a); // 8
var f = function(a, b, c) {
b = a; // a=8, b=8, c=10
document.write(b); // 8
b = c; // b=8
var x = 5;
}
f(a,b,c);
document.write(b); // 9
var x = 10;
}
c(8,9,10);
document.write(b); // 10
document.write(x); // 1
}
[Answer]
// output => undefined889101
2. Define Global Scope and Local Scope in Javascript.
[Answer]
Global scope is any variable can be accessible from anywhere.
Local scope is variables declared inside this scope cannot be accessible from outside of that.
3. Consider the following structure of Javascript code:
// Scope A
function XFunc () {
// Scope B
function YFunc () {
// Scope C
};
};
[Answer]
(a) Do statements in Scope A have access to variables defined in Scope B and C? No
(b) Do statements in Scope B have access to variables defined in Scope A? Yes
(c) Do statements in Scope B have access to variables defined in Scope C? No
(d) Do statements in Scope C have access to variables defined in Scope A? Yes
(e) Do statements in Scope C have access to variables defined in Scope B? Yes
4. What will be printed by the following (answer without running it)?
var x = 9;
function myFunction() {
return x * x;
}
document.write(myFunction());
x = 5;
document.write(myFunction());
[Answer]
81, 25
5.
var foo = 1;
function bar() {
if (!foo) {
var foo = 10; // this line will be compiled first because var is function scope. if it was let then alert(foo will be 1)
}
alert(foo);
}
bar();
What will the alert print out? (Answer without running the code. Remember ‘hoisting’.)?
[Answer]
10
6. Consider the following definition of an add( ) function to increment a counter variable:
var add = (function () {
var counter = 0;
return function () {
return counter += 1;
}
})();
Modify the above module to define a count object with two methods: add( ) and reset( ). The count.add( ) method
adds one to the counter (as above). The count.reset( ) method sets the counter to 0.
[Answer]
var count = (function () {
var counter = 0;
return {
'add': function () {
counter += 1;
},
'reset': function () {
counter = 0;
},
'value': function () {
return counter;
},
}
})();
7. In the definition of add( ) shown in question 6, identify the "free" variable. In the context of a function closure,
what is a "free" variable?
[Answer]
counter is free variable.
A free variable is local variable that can be accessible by sub-methods.
8. The add( ) function defined in question 6 always adds 1 to the counter each time it is called. Write a definition
of a function make_adder(inc), whose return value is an add function with increment value inc (instead of 1). Here
is an example of using this function:
add5 = make_adder(5);
add5( ); add5( ); add5( ); // final counter value is 15
add7 = make_adder(7);
add7( ); add7( ); add7( ); // final counter value is 21
[Answer]
var count = (function () {
var counter = 0;
return {
'add': function () {
counter += 1;
},
'reset': function () {
counter = 0;
},
'value': function () {
return counter;
},
'make_adder': function (inc) {
counter += inc;
}
}
})();
9. Suppose you are given a file of Javascript code containing a list of many function and variable declarations. All of
these function and variable names will be added to the Global Javascript namespace. What simple modification to
the Javascript file can remove all the names from the Global namespace?
[Answer]
You can wrap it like below.
(function () {
All the given code
})();
10. Using the Revealing Module Pattern, write a Javascript definition of a Module that creates an Employee Object
with the following fields and methods:
Private Field: name
Private Field: age
Private Field: salary
Public Method: setAge(newAge)
Public Method: setSalary(newSalary)
Public Method: setName(newName)
Private Method: getAge( )
Private Method: getSalary( )
Private Method: getName( )
Public Method: increaseSalary(percentage) // uses private getSalary( )
Public Method: incrementAge( ) // uses private getAge( )
[Answer]
// >>>> Revealing Module Pattern <<<<
var Employee = (function () {
var name;
var age;
var salary;
var getName = () => {return name};
var getAge = () => {return age};
var getSalary = () => {return salary};
var setName = (newName) => {name = newName;},
var setAge = (newAge) => {age = newAge;},
var setSalary = (newSalary) => {salary = newSalary;},
var increaseSalary = (percentage) => {salary = salary * (1 + percentage / 100);},
var incrementAge = () => {age ++ ;},
return {
'setName' : setName,
'setAge' : setAge,
'setSalary' : setSalary,
'increaseSalary' : increaseSalary,
'incrementAge' : incrementAge,
}
})();
Comment: Since name age & salary are free variables we don't need private getter methods.
11. Rewrite your answer to Question 10 using the Anonymous Object Literal Return Pattern.
[Answer]
// >>>> Anonymous Object Literal Return Pattern <<<<
var Employee = (function () {
var name;
var age;
var salary;
var getName = () => {return name};
var getAge = () => {return age};
var getSalary = () => {return salary};
return {
'setName' : (newName) => {name = newName;},
'setAge' : (newAge) => {age = newAge;},
'setSalary' : (newSalary) => {salary = newSalary;},
'increaseSalary' : (percentage) => {salary = salary * (1 + percentage / 100);},
'incrementAge' : () => {age ++ ;},
}
})();
12. Rewrite your answer to Question 10 using the Locally Scoped Object Literal Pattern.
[Answer]
// >>>> Locally Scoped Object Literal Pattern <<<<
var Employee = (function () {
var Contructor = {};
var name;
var age;
var salary;
var getName = () => {return name};
var getAge = () => {return age};
var getSalary = () => {return salary};
Contructor.setName = (newName) => {name = newName;},
Contructor.setAge = (newAge) => {age = newAge;},
Contructor.setSalary = (newSalary) => {salary = newSalary;},
Contructor.increaseSalary = (percentage) => {salary = salary * (1 + percentage / 100);},
Contructor.incrementAge = () => {age ++ ;},
return Contructor;
})();
13. Write a few Javascript instructions to extend the Module of Question 10 to have a public address field and
public methods setAddress(newAddress) and getAddress( ).
[Answer]
var Employee = (function () {
var name;
var age;
var salary;
var getName = () => {return name};
var getAge = () => {return age};
var getSalary = () => {return salary};
var setName = (newName) => {name = newName;},
var setAge = (newAge) => {age = newAge;},
var setSalary = (newSalary) => {salary = newSalary;},
var increaseSalary = (percentage) => {salary = salary * (1 + percentage / 100);},
var incrementAge = () => {age ++ ;},
return {
'address':null,
'getAddress': () => {return address;},
'setAddress': (newAddress) => {address = newAddress;},
'setName' : setName,
'setAge' : setAge,
'setSalary' : setSalary,
'increaseSalary' : increaseSalary,
'incrementAge' : incrementAge,
}
})();
14. What is the output of the following code?
const promise = new Promise((resolve, reject) => {
reject("Hattori");
});
promise.then(val => alert("Success: " + val))
.catch(e => alert("Error: " + e));
[Answer]
It is going to alert => "Error: Hattori"
then it is going to change the state of promise as a `fullfilled`
15. What is the output of the following code?
const promise = new Promise((resolve, reject) => {
resolve("Hattori");
setTimeout(()=> reject("Yoshi"), 500);
});
promise.then(val => alert("Success: " + val))
.catch(e => alert("Error: " + e));
[Answer]
It is going to alert => "Success: Hattori"
16. What is the output of the following code?
function job(state) {
return new Promise(function(resolve, reject) {
if (state) {
resolve('success');
} else {
reject('error');
}
});
}
let promise = job(true);
promise.then(function(data) {
console.log(data);
return job(false);
}).catch(function(error) {
console.log(error);
return 'Error caught';
});
[Answer]
** In console: **
success
error
* promise result will be `Error caught`


{% extends 'base.html' %} {% load static %} {% block content %}
ACLARK.NET has been providing straightforward, best of breed, secure, proven technological solutions since 2004. We have a highly professional approach. Careful, thorough consideration is given to every client's needs. We then maximize and optimize technology to deliver superior results. We never compromise quality or security, focusing solely on a long-term, successful project outcome.
Our experience and expertise include extensive work with corporations, educational systems and institutions, small businesses, non-profits, as well as numerous government agencies. We partner with other proven professionals to provide a turn-key solution to all of your technology needs.
Contact Us


---
layout: default
---
{% include section.html
header="Intro to Neural Networks"
description="Simple implementations of basic neural networks in both Keras and PyTorch" %}
{% include card.html
image="/assets/images/college2.jpg"
title="College Admissions"
description="2-Layer fully connected neural network used to solve binary classification task. Aim is to predict if student is admitted or not based no theirs GPC & GPA scores"
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/0100_MLP_College.html"
link_2_text="PyTorch"
link_2_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/0100_PT_MLP_College.html"
%}
{% include card.html
image="/assets/images/mnist2.jpg"
title="MNIST Handwritten Digits"
description="2-Layer fully connected neural network used to solve popular MNIST dataset. MNIST is set of 60k images. Each one is 28x28 grayscale"
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/0120_MLP_MNIST.html"
link_2_text="PyTorch"
link_2_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/0120_PT_MLP_MNIST.html"
%}
{% include card.html
image="/assets/images/imdb2.jpg"
title="IMDB Movie Reviews"
description="2-layer fully connected neural network used to solve IMDB movie reviews dataset. Uses bag-of-words approach."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/0150_MLP_IMDB.html"
link_2_text="PyTorch"
link_2_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/0150_PT_MLP_IMDB.html"
%}
{% include section.html
header="NumPy Implementations"
description="Quick implementation of basic neural network building blocks in pure NumPy" %}
{% include card.html
image="/assets/images/1layer.jpg"
title="Perceptron - Classification"
description="Single-Layer Perceptron used to solve binary classification task. Trained on college admission dataset."
link_text="NumPy"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/NumpyNN/0010_FC_1Layer.html"
%}
{% include card.html
image="/assets/images/2layer.jpg"
title="Feedforward - Regression"
description="Feedforward Multi-Layer Perceptron used to solve regression task. Trained on bike-rental dataset."
link_text="NumPy"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/Udacity_DL_Nanodegree/011%20Bike%20Project/Bike+Project.html"
%}
{% include card.html
image="/assets/images/2layer.jpg"
title="Feedforward - Classification"
description="Feedforward Multi-Layer Perceptron used to solve image classification task. Trained on Fashion-MNIST dataset."
link_text="NumPy"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/NumpyNN/0020_FC_2LayerClass.html"
%}
{% include card.html
image="/assets/images/rnn.jpg"
title="RNN - Counter"
description="Recurrent Neural Network used as a counter. This RNN has many-to-one arrangement. Dataset is synthetic. Both unfolded and recurrent implementations.
Code not tidied."
link_text="NumPy"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/NumpyNN/1010_Char_RNN_Unfolded.html"
%}
{% include card.html
image="/assets/images/rnn.jpg"
title="RNN - Text Generation"
description="Character-level Recurrent Neural Network used to generate novel text. This RNN has many-to-many arrangement. Dataset is composed of 300 dinosaur names.
Code not tidied."
link_text="NumPy"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/NumpyNN/1020_Char_RNN_Dinosaurs.html"
%}
{% include section.html
header="Computer Vision"
description="Vision Basics" %}
{% include card.html
image="/assets/images/cnn.jpg"
title="Convolutional Network"
description="Small convolutional neural network used for image classification on the CIFAR-10 dataset. Images are RGB 32x32 pixels."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1100_CNN_CIFAR10.html"
%}
{% include card.html
image="/assets/images/batchnorm2.jpg"
title="Batch Normalisation"
description="Small convnet with batch normalisation used on CIFAR-10 dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1200_CNN_BN_CIFAR10.html"
%}
{% include card.html
image="/assets/images/dataaug.jpg"
title="Data Augmentation"
description="Small convnet with data augmentation to reduce overfitting on CIFAR-10 dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1250_Aug_CIFAR10.html"
%}
{% include card.html
image="/assets/images/cnn.jpg"
title="Custom Generator"
description="Small convnet with custom data generator trained on CIFAR-10 dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1270_Gen_CIFAR10.html"
%}
{% include card.html
image="/assets/images/resblock2.jpg"
title="ResNet from Scratch"
description="ResNet-50 implemented from scratch using Keras functional API. Then trained from scratch on Oxford VGG Flowers 17 dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1300_ResNet50_Scratch.html"
%}
{% include card.html
image="/assets/images/densenet.jpg"
title="Bottleneck Features"
description="Pre-trained DenseNet-201 is further trained on Oxford VGG Flowers 102 dataset. Bottleneck features are extracted and only classifier is trained."
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/1450_PT_DenseNet121_Transfer_2.html"
%}
{% include section.html
header=""
description="Mini Projects" %}
{% include card.html
image="/assets/images/deeplearning/vggflower17.png"
title="Image Classification"
description="Keras: ResNet-50 trained on Oxford VGG Flower 17 dataset.
PyTorch: DenseNet-201 trained on Oxford VGG Flower 102 dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1400_ResNet50_Transfer.html"
link_2_text="PyTorch"
link_2_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/1450_PT_DenseNet121_Transfer.html"
%}
{% include card.html
image="/assets/images/deeplearning/svhn.png"
title="Multi-Digit Detection"
description="ConvNet trained to detect variable length house numbers on Street View House Numbers dataset."
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/1350_PT_CNN_SVHN.html"
%}
{% include card.html
image="/assets/images/deeplearning/keypoints.png"
title="Keypoint Detection"
description="Pre-trained MobileNetV2 is used for keypoint detection on CATs dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1480_Keypoints_Cats.html"
link_2_text="PyTorch"
link_2_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/1480_PT_Keypoints_Cats.html"
%}
{% include card.html
image="/assets/images/deeplearning/yolov2.png"
title="Object Detection"
description="YOLOv2 on DarkNet backbone trained on BCCD dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/1510_YOLO.html"
%}
{% include card.html
image="/assets/images/deeplearning/segnet_moto.png"
title="Image Segmentation"
description="Segnet on VGG16 backbone trained on Pascal VOC2007 dataset.
Code not tidied."
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/1630_PT_SegNet_VOC2007.html"
%}
{% include section.html
header="Natural Language Processing"
description="NLP Basics" %}
{% include card.html
image="/assets/images/rnn_m2m2.jpg"
title="Time Series Prediction"
description="Vanilla RNN trained to perform time series prediction on sine wave."
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/2120_PT_Float_RNN_M2M_TimeSeries.html"
%}
{% include card.html
image="/assets/images/rnn_m2m2.jpg"
title="Text Generation"
description="Char-level LSTM trained to generate new text trained on Shakespeare plays."
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/2140_PT_Char_LSTM_M2M_Shakespeare.html"
%}
{% include card.html
image="/assets/images/skipgram2.jpg"
title="Word2Vec Skipgram"
description="Example how to train embedding layer using Word2Vec Skipgram. Trained on popular wiki8 dataset"
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/2050_PT_SkipGram_Text8.html"
%}
{% include section.html
header=""
description="Mini Projects" %}
{% include card.html
image="/assets/images/deeplearning/sentiment.png"
title="Sentiment Analysis"
description="Word-level LSTM trained to generate predict if movie review is positive or negative. Uses IMDB Movie Reviews dataset"
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/2210_PT_Word_LSTM_M2O_IMBD.html"
%}
{% include card.html
image="/assets/images/deeplearning/translation.png"
title="Language Translation"
description="Two models are trained to perform English to French translation.
• Many-to-Many (m2m)
• Sequence-to-Sequence (s2s)"
link_text="Keras (m2m)"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/2210_Many2Many_EngFr.html"
link_2_text="Keras (s2s)"
link_2_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/2310_Seq2Seq_EngFr.html"
%}
{% include section.html
header="Generative Adversarial Networks"
description="Implementaitons of simple GAN architectures" %}
{% include card.html
image="/assets/images/autoencoder3.jpg"
title="Autoencoder"
description="Simple autoencoder trained on MNIST dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/3010_AE_MNIST.html"
%}
{% include card.html
image="/assets/images/gan2.jpg"
title="GAN"
description="Fully connected Generative Adversarial Network trained on MNIST dataset."
link_text="Keras"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/KerasNN/3110_GAN_FC_MNIST.html"
%}
{% include card.html
image="/assets/images/deeplearning/ganfaces2.png"
title="DCGAN"
description="Deep Convolutional GAN trained on CelebA dataset."
link_text="PyTorch"
link_href="https://marcinbogdanski.github.io/ai-sketchpad/PyTorchNN/3210_PT_DCGAN.html"
%}


Health
Health education is essential to understanding how to live a happy and hearty life. Many topics that fall under the umbrella of health are hard to talk about, which makes them seem dangerous and mysterious, because there is nothing scarier than the unknown. The purpose of this page is to help educate, so that you are equipped with the tools to make decisions that are best for you. Click on one of the buttons next to the text to go to another page, and learn more about health.


|
OmEspHelpers
|
#include <OmNtp.h>
Classes | |
| class | OmNtpStats |
Public Member Functions | |
| void | setWifiAvailable (bool wifiAvailable) |
| void | tick (unsigned int deltaMillis) |
| void | setTimeZone (int hourOffset) |
| int | getTimeZone () |
| void | getLocalTime () |
| void | setTimeUrl (const char *timeUrl) |
| void | setTimeUrlOffset (int hoursFromTimeUrl) |
| bool | getTime (int &hourOut, int &minuteOut, int &secondOut) |
| bool | getTime (int &hourOut, int &minuteOut, float &secondOut) |
| const char * | getTimeString () |
| bool | getUTime (uint32_t &uTimeOut, int &uFracOut) |
| uint32_t | getUTime () |
Static Public Member Functions | |
| static OmNtp * | ntp () |
| static void | sGetTimeOfDay (int &minuteWithinDayOut, float &secondWithinMinuteOut) |
| Static methods to get the time, and return -1's if time does not exist in space. | |
Public Attributes | |
| OmNtpStats | stats |
| WiFiClient | client |
class to keep a local clock synchronized from a server
| void OmNtp::getLocalTime | ( | ) |
Issue a request to an http service, the url you set with setTimeUrl().
| bool OmNtp::getTime | ( | int & | hourOut, |
| int & | minuteOut, | ||
| float & | secondOut | ||
| ) |
Get the time of day in two handy integers and a float.
| bool OmNtp::getTime | ( | int & | hourOut, |
| int & | minuteOut, | ||
| int & | secondOut | ||
| ) |
Get the time of day in three handy integers.
| const char * OmNtp::getTimeString | ( | ) |
Get the time of day in a handy string like HH:MM:SS.
(It's a static char[], by the way.)
|
static |
Get the last-created ntp instance, if any
| void OmNtp::setTimeUrl | ( | const char * | timeUrl | ) |
URL to a server under your control that gives the current time.
OmNtp will deduce the timezone relative to NTP from it, also.
Https not supported, just http.
| void OmNtp::setTimeUrlOffset | ( | int | hoursFromTimeUrl | ) |
if the time is calculated from a TimeUrl, add this offset to it.
for example, I use a CA timeUrl for my lamps in Arkansas so I set
it to 2.
| void OmNtp::setTimeZone | ( | int | hourOffset | ) |
This number gets added to UTC for your time zone. It ranges
from -12 to +12. California in December needs -8.
| void OmNtp::setWifiAvailable | ( | bool | wifiAvailable | ) |
Call this after wifi properly established
| void OmNtp::tick | ( | unsigned int | deltaMillis | ) |
Call this in your loop(). Assumes about 20-50 ms interval.


Hello dear user,
Forgot your password?
No problem, your coins will always remain secure at Mobile Money Coin.
To reset your %EMAIL% account password, click on the following button and follow the instructions.
If you didn’t ask to reset your password, you can ignore this email.
Thanks,
Your MoMo-Coin Team


Connect to this Region’s endpoint. Returns an connection object pointing to the endpoint associated with this region. You may pass any of the arguments accepted by the connection class’s constructor as keyword arguments and they will be passed along to the connection object.
| Return type: | Connection object |
|---|---|
| Returns: | The connection to this regions endpoint |
Given a valid region name, return a boto.iam.connection.IAMConnection.
| Type: | str |
|---|---|
| Parameters: | region_name – The name of the region to connect to. |
| Return type: | boto.iam.connection.IAMConnection or None |
| Returns: | A connection to the given region, or None if an invalid region name is given |
Get all available regions for the IAM service.
| Return type: | list |
|---|---|
| Returns: | A list of boto.regioninfo.RegionInfo instances |
Adds the specified role to the specified instance profile.
| Parameters: |
|---|
Add a user to a group
| Parameters: |
|---|
Create a new AWS Secret Access Key and corresponding AWS Access Key ID for the specified user. The default status for new keys is Active
If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: | user_name (string) – The username of the user |
|---|
Creates a new alias for the AWS account.
For more information on account id aliases, please see http://goo.gl/ToB7G
| Parameters: | alias (string) – The alias to attach to the account. |
|---|
Create a group.
| Parameters: |
|---|
Creates a new instance profile.
| Parameters: |
|---|
Creates a login profile for the specified user, give the user the ability to access AWS services and the AWS Management Console.
| Parameters: |
|---|
Creates a new role for your AWS account.
The policy grants permission to an EC2 instance to assume the role. The policy is URL-encoded according to RFC 3986. Currently, only EC2 instances can assume roles.
| Parameters: |
|---|
Creates an IAM entity to describe an identity provider (IdP) that supports SAML 2.0.
The SAML provider that you create with this operation can be used as a principal in a role’s trust policy to establish a trust relationship between AWS and a SAML identity provider. You can create an IAM role that supports Web-based single sign-on (SSO) to the AWS Management Console or one that supports API access to AWS.
When you create the SAML provider, you upload an a SAML metadata document that you get from your IdP and that includes the issuer’s name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization’s IdP. This operation requires `Signature Version 4`_. For more information, see `Giving Console Access Using SAML`_ and `Creating Temporary Security Credentials for SAML Federation`_ in the Using Temporary Credentials guide.
| Parameters: | saml_metadata_document (string) – An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer’s name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization’s IdP. |
|---|
| Parameters: | name (string) – The name of the provider to create. |
|---|
Create a user.
| Parameters: |
|---|
Deactivates the specified MFA device and removes it from association with the user.
| Parameters: |
|---|
Delete an access key associated with a user.
If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: |
|---|
Deletes an alias for the AWS account.
For more information on account id aliases, please see http://goo.gl/ToB7G
| Parameters: | alias (string) – The alias to remove from the account. |
|---|
Delete a group. The group must not contain any Users or have any attached policies
| Parameters: | group_name (string) – The name of the group to delete. |
|---|
Deletes the specified policy document for the specified group.
| Parameters: |
|---|
Deletes the specified instance profile. The instance profile must not have an associated role.
| Parameters: | instance_profile_name (string) – Name of the instance profile to delete. |
|---|
Deletes the login profile associated with the specified user.
| Parameters: | user_name (string) – The name of the user to delete. |
|---|
Deletes the specified role. The role must not have any policies attached.
| Parameters: | role_name (string) – Name of the role to delete. |
|---|
Deletes the specified policy associated with the specified role.
| Parameters: |
|---|
Deletes a SAML provider.
Deleting the provider does not update any roles that reference the SAML provider as a principal in their trust policies. Any attempt to assume a role that references a SAML provider that has been deleted will fail. This operation requires `Signature Version 4`_.
| Parameters: | saml_provider_arn (string) – The Amazon Resource Name (ARN) of the SAML provider to delete. |
|---|
Delete the specified server certificate.
| Parameters: | cert_name (string) – The name of the server certificate you want to delete. |
|---|
Delete a signing certificate associated with a user.
If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: |
|---|
Delete a user including the user’s path, GUID and ARN.
If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: | user_name (string) – The name of the user to delete. |
|---|
Deletes the specified policy document for the specified user.
| Parameters: |
|---|
Enables the specified MFA device and associates it with the specified user.
| Parameters: |
|---|
Generates a credential report for an account
A new credential report can only be generated every 4 hours. If one hasn’t been generated in the last 4 hours then get_credential_report will error when called
Get the alias for the current account.
This is referred to in the docs as list_account_aliases, but it seems you can only have one account alias currently.
For more information on account id aliases, please see http://goo.gl/ToB7G
Get the alias for the current account.
This is referred to in the docs as list_account_aliases, but it seems you can only have one account alias currently.
For more information on account id aliases, please see http://goo.gl/ToB7G
Get all access keys associated with an account.
| Parameters: |
|
|---|
List the names of the policies associated with the specified group.
| Parameters: |
|
|---|
List the groups that have the specified path prefix.
| Parameters: |
|
|---|
Get all MFA devices associated with an account.
| Parameters: |
|
|---|
Lists the server certificates that have the specified path prefix. If none exist, the action returns an empty list.
| Parameters: |
|
|---|
Get all signing certificates associated with an account.
If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: |
|
|---|
List the names of the policies associated with the specified user.
| Parameters: |
|
|---|
List the users that have the specified path prefix.
| Parameters: |
|
|---|
Retrieves a credential report for an account
A report must have been generated in the last 4 hours to succeed. The report is returned as a base64 encoded blob within the response.
Return a list of users that are in the specified group.
| Parameters: |
|
|---|
Retrieves the specified policy document for the specified group.
| Parameters: |
|---|
List the groups that a specified user belongs to.
| Parameters: |
|
|---|
Retrieves information about the specified instance profile, including the instance profile’s path, GUID, ARN, and role.
| Parameters: | instance_profile_name (string) – Name of the instance profile to get information about. |
|---|
Retrieves the login profile for the specified user.
| Parameters: | user_name (string) – The username of the user |
|---|
Utility method to handle calls to IAM and parsing of responses.
Retrieves information about the specified role, including the role’s path, GUID, ARN, and the policy granting permission to EC2 to assume the role.
| Parameters: | role_name (string) – Name of the role associated with the policy. |
|---|
Retrieves the specified policy document for the specified role.
| Parameters: |
|---|
Returns the SAML provider metadocument that was uploaded when the provider was created or updated. This operation requires `Signature Version 4`_.
| Parameters: | saml_provider_arn (string) – The Amazon Resource Name (ARN) of the SAML provider to get information about. |
|---|
Retrieves information about the specified server certificate.
| Parameters: | cert_name (string) – The name of the server certificate you want to retrieve information about. |
|---|
Get the URL where IAM users can use their login profile to sign in to this account’s console.
| Parameters: | service (string) – Default service to go to in the console. |
|---|
Retrieve information about the specified user.
If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: | user_name (string) – The name of the user to retrieve. If not specified, defaults to user making request. |
|---|
Retrieves the specified policy document for the specified user.
| Parameters: |
|---|
Lists the instance profiles that have the specified path prefix. If there are none, the action returns an empty list.
| Parameters: |
|
|---|
Lists the instance profiles that have the specified associated role. If there are none, the action returns an empty list.
| Parameters: |
|
|---|
Lists the names of the policies associated with the specified role. If there are none, the action returns an empty list.
| Parameters: |
|
|---|
Lists the roles that have the specified path prefix. If there are none, the action returns an empty list.
| Parameters: |
|
|---|
Lists the SAML providers in the account. This operation requires `Signature Version 4`_.
Lists the server certificates that have the specified path prefix. If none exist, the action returns an empty list.
| Parameters: |
|
|---|
Adds or updates the specified policy document for the specified group.
| Parameters: |
|---|
Adds (or updates) a policy document associated with the specified role.
| Parameters: |
|---|
Adds or updates the specified policy document for the specified user.
| Parameters: |
|---|
Removes the specified role from the specified instance profile.
| Parameters: |
|---|
Remove a user from a group.
| Parameters: |
|---|
Syncronizes the specified MFA device with the AWS servers.
| Parameters: |
|---|
Changes the status of the specified access key from Active to Inactive or vice versa. This action can be used to disable a user’s key as part of a key rotation workflow.
If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: |
|---|
Updates the policy that grants an entity permission to assume a role. Currently, only an Amazon EC2 instance can assume a role.
| Parameters: |
|---|
Updates name and/or path of the specified group.
| Parameters: |
|---|
Resets the password associated with the user’s login profile.
| Parameters: |
|---|
Updates the metadata document for an existing SAML provider. This operation requires `Signature Version 4`_.
| Parameters: |
|
|---|
Updates the name and/or the path of the specified server certificate.
| Parameters: |
|
|---|
Change the status of the specified signing certificate from Active to Inactive or vice versa.
If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: |
|---|
Updates name and/or path of the specified user.
| Parameters: |
|---|
Uploads a server certificate entity for the AWS Account. The server certificate entity includes a public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded.
| Parameters: |
|
|---|
Uploads an X.509 signing certificate and associates it with the specified user.
If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request.
| Parameters: |
|---|


Politics And The Markets 11/19/19
by Political CommentsThis is the forum for daily political discussion on Seeking Alpha.
Please don't leave political comments on other articles or news, and please avoid personal insults!
This is the forum for daily political discussion on Seeking Alpha.
Please don't leave political comments on other articles or news, and please avoid personal insults!


Fic Recommend finds stories with a high percentage of users who both favorited, or kudoed a provided story. Supports FanFiction.net, FictionPress.com, and Archive of Our Own. For more focused results you can enter two URLs separated by a "|".
Copyright (c) 2015 Tristan Rice
Fic Recommend is licensed under the MIT license.


{{anotherMessage}}
Free of emissions. Full of passion. Discover the first all-electric MINI and charge ahead into a brighter tomorrow.
Explore our full range of MINI models with virtual walkarounds featuring our MINI product specialist.
MINI Certified Technicians use specialized equipment and Original MINI Parts. being serviced right the first time, every time.


CARTway
Your Order has been sent.
Please wait for approvel of your order by shopkeeper.
your order id is : #
You will get notification when you order approved or packed.Thank you for your order.
Track Order


--- layout: post status: publish published: true title: '"Javier Baez is OK" - Podcast Episode 6.29' author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 10376 wordpress_url: http://ivyenvy.com/?p=10376 date: '2014-08-10 23:36:27 +0000' date_gmt: '2014-08-11 04:36:27 +0000' categories: - Infield - Starting Pitching - Trades tags: - Javier Baez - Theo Epstein - Nate Schierholtz - Kris Bryant - Jacob Turner - Cole Hammels comments: - id: 12298 author: Taylor Krebs author_email: '' author_url: '' date: '2014-08-11 10:33:18 +0000' date_gmt: '2014-08-11 15:33:18 +0000' content: Nice episode title! ---
On the 266th episode of The Ivy Envy Podcast, we talk about Javier Baez's first two series in Major League Baseball.
We comment on what we've seen in the first six games of his career. What is he doing well? What does he need to improve on? Are the Cubs letting him be who he is? When will adjustments and the tinkering with his approach begin?
We also look at the final two months of the 2014 season for the Cubs. We talk about our expectations, what we'd like to see and how the Cubs can build on these few months for 2015 and beyond.
The Cubs added a new pitcher to the staff by acquiring Jacob Turner from the Marlins. Kurt tells us how this deal happened and that Chris Bosio looks to get another reclamation project.
There were rumors flying after the Cubs claimed Cole Hammels off revocable waivers, but Andy tells us why the deal didn't happen and we speculate as to what it would have taken for that deal to go through.
Nate Schierholtz was DFA'd and we look at his horrific 2014 campaign and find comfort in that these place-holders like Schierholtz and Barney are being moved away for the more talented players coming up through the system.
One player that will not be moving anyone aside in 2014 is Kris Bryant. Theo Epstein says that Bryant will not be promoted to the Cubs this season. We talk about this issue, look at the timing of the inevitable call-up and look at a few scenarios that the Cubs could face.
We have a slew of listener questions to answer, Kurt gives us his Scary Stat of the Week and we read a few Internet Muscle Flexes.


Workflow
This page describes the set of tools we use to generate these data and present them in this site.
GitHub
We use GitHub’s pages feature to serve the web site files.
At present, we are using a repository associated with Rick Gilmore’s lab group (https://github.com/gilmore-lab/databrary-analytics/).
Once the migration to the bookdown
package is complete, we will move the repo to the Databrary organization on GitHub.
That will result in the analytics site having the following url: https://databrary.github.io/analytics/.
The site is built locally by Rick Gilmore or Andrea Seisler, then pushed to GitHub.
RStudio
We use RStudio as the integrated development environment for the site. Most of the code is in R Markdown and R, with some CSS and JavaScript.
We use a number of R packages in the workflow.
Databrary API
The databraryapi
package provides a set of tools for interacting with the Databrary API and gathering data from the site.
This package may be useful to some analysts whether or not they care about Databrary-specific analytics.
Most data and metadata used in these reports can be accessed by the public, but specific data about individual participants requires that the user be authorized and logged in to the site using the databraryapi::db_login()
function.
The package may be installed via devtools::install_github(repo="PLAY-behaviorome/databraryapi")
.
See https://play-behaviorome.github.io/databraryapi/ for documentation about the package.
Targets
We use the targets
package to generate data and metadata files that are used to create the visualizations and summaries.
Some of the components are rendered on a regular, time-determined basis, like the weekly report. Others are rendered less often, typically quarterly.
Most of the targets call functions in R/functions.R
. The specific targets can be viewed in the _targets.R
file in the root directory of the repository.
A typical workflow to ‘make’ or update the data files, is as follows:
library(targets)
tar_make()
Bookdown
To generate the site, we use the bookdown
package.
A typical sequence of commands to regenerate the site is the following:
bookdown::render_book('src')
Configuration files using the YAML markup language control the rendering process.
These files and the source R Markdown (.Rmd) files used to generate the site are in the src/
directory.
The rendering command creates a full website in the docs/
directory.
Package Reproducibility
We use the renv
package to track package dependencies.
Strategy
Some of the data elements in the report change often, but others do not.
We have found it is faster and more convenient in many cases to download various data files from Databrary and store copies as comma-separated value (CSV) text files in src/csv
.
Some of the CSVs contain potentially identifiable human subjects data, so we use a special .gitignore
file to keep those files out of the git tracking scheme and prevent uploading them to GitHub.
These data analyses and visualizations have developed piecemeal over several years. They could undoubtedly be optimized and improved.
The primary developer (Rick Gilmore) has had a ‘git-er-done’ attitude toward the project, especially with the latest refactoring to bookdown, targets, and renv.
Gilmore takes some solace in the following quotation from the father of literate programming, Donald Knuth:
…the real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.
Roadmap
- Migrate ARS to
bookdown
branch; merge into main (March 2023). - Fix when targets are run for which flows.
- This is a work in-progress.
- Separate functions in
R/functions.R
into separate files based on their context. The currentR/functions.R
contains mostly old code from the pre-bookdown
version of the site. The styles are inconsistent and the large file is hard to maintain.- This is in-process as of 2023-02-24.
- Devise visualizations of assets by investigator/institution.
-
Function to determine max party_id and max volume_id interactively. - Eliminate YAML params from
index.Rmd
. - Create JSON lat, lon file for Databrary home page.
-
Add state, country summaries to demographics. - Allow user to show code.
- Move from old pipe
%>%
to new|>
.-
Done for, but not*.Rmd
files*.R
files as of 2023-02-24.
-


I have experience with Machine Learning, Computer Vision, Natural Language Processing, Operating Systems, and Computer Graphics across multiple languages and frameworks. I am interested in Machine Learning, AI, Software & Backend Development.
I graduated with a Dual Degree (Bachelors in Engineering Physics + Masters in Computer Science) from the Indian Institute of Technology, Delhi and am currently pursuing my MS in Computer Science at Columbia University
If you would like to know anything more about me, feel free to contact me!Development.
GPA: 4.0
GPA: 8.4
GPA: 8.9
Developed complex datasets for algorithmic trading and contributed 20+ datasets
Analyzed conference calls to predict stock movement with sentiment analysis
Developed k-means clusters groups, led to a 25% performance increase
Produced 250+ signals using deep learning datasets, adding value to firm
Devised operations for intraday strategies to reduce risk & regulate market impact
Improved value addition to trade signals using technical market indicators
Transformed signals using style factors based expose, minimizing market risk
Implemented the Johansen test for cointegration, used for equity pair trading
Worked on 2 client and 4 business development projects in a span of 2 months.
Conducted due diligence for Energy Provider to tap into Bangladesh power sector.
Performed business development in multiple sectors (Transport, Govt. & Pharma.)
Received PPO for excellent performance & significant contribution to projects
Model the Training Time & Cost on GCP based on model parameters without no memory and disk considerations.
Find correlations between various model parameters linking them to Cost
Extendable to multiple GPUs to create a larger database of the model parameterizations vs. training time
Cost & Availability of GPUs is a big concern which can be resolved using a benchmarking calculator
Developed a novel multi-modal Deep model for 3D Tracking; outperforms state of the art (1.3% better)
Improvement on natural (Human3.6M) & synthetic (SURREAL) datasets; using Coord Conv. & Seq. Models
Successfully tracked Yoga (own dataset) with occlusions and body extensions not possible with SotA
Submitted a paper titled Improved 3D Human Pose Estimation using RGB & Depth Data to WACV '20
Developed novel algorithms for liver segmentation in T1 MRI using layer based region growing (70% D.C.)
Used statistical analysis (histograms, skewness, kurtosis) to develop a toolbox for early cancer detection
Clinical prospects include early diagnosis & monitoring of Hepatocellular Carcinoma prone patients
Authored abstract titled Automated Segmentation of Lesions in Liver Using T1 MR Imaging presented at ISMRM Workshop on Quantitative Body Imaging, 2018
Developed embedding space based, random forest based and one-vs-all based extreme classifiers on Ads9M dataset (9M labels, 2M features), with 0.11 mean propensity F1 score
Developed a sentence selection & rewriting tool, to generate fast abstractive summaries using an encoder-abstractor-decoder Reinforced Learning based network. Improved abstractiveness score (5% more novel n-grams) on CNN/Dailymail Dataset, using multi-sentence input to abstractor
Created a version of the 1980s arcade game Zaxxon in Unity 3D with modern graphics and animations
Incorporated terrains, obstacles, enemies & powerups. Designed and implemented a graphical HUD
Increased difficulty with patrolling sentries and homing missiles (using 1st-order intercepts)
Pseudo-random distribution for obstacle placement and selection, no two playthroughs the same
Modelled the rendering pipeline (quadric, plane, polygon objects etc.), material properties & light conditions
Incorporated a Local & Global Illumination Model (Phong Model) with reflections, refractions and shadows
Implemented spatial anti-aliasing using square-grid supersampling, to reduce jaggies in output image
Modelled skier as hierarchical model using OpenGL primitives, defining key frames and animation of skier using interpolation. Intractably changed speeds, camera positions & path models. Added support terrain objects, multiple skiers and collisions
Analysed the performance of WebAssembly vs Native code (Polybench suite compiled with emscripten)
Analysis using Wasabi Toolkit (execution time, instruction mix & count and hot code identification)
Experimented with modern browsers (Chrome, Firefox, Safari) as well as multiple Optimization Levels
Generated the dynamic instruction trace of WebAssembly and translated it to it's equivalent x86 format
Extended functionality of Xv6 to include IPCs (unicast & multicast) and created a distributed algorithm
Implemented Maekawa's algorithm for mutual exclusion; Jacobi's algorithm for steady heat distribution
Virtualization using a container with process, memory & file system isolation & a virtual process scheduler
Created a document parser to convert a given HTML document into its equivalent LaTeX document
Wrote a lexer (using ply-lex) to generate a string of tokens from a given HTML document
Parsed these tokens using Yacc grammar (ply-yacc) to generate an Abstract Syntax Tree of HTML
Converted to an equivalent LaTeX AST, to generates a LaTeX document, which can compile to a PDF
Implemented a fast algorithm to create a KD-Tree with large amounts of data and a query mechanism
Incorporated search techniques (Point, Range & k-Nearest Neighbour) using a Min Bounding Rectangle
|
|
|


At least four soldiers and two civilian porters have been killed after an avalanche hit the Siachen Glacier in Indian-administered Kashmir.
The avalanche struck a group of eight soldiers patrolling near a post at a height of 5,485 metres (17,995 feet) in the northern part of the Himalayan glacier on Monday, Indian army spokesmen said.
More:
A search and rescue mission pulled eight people from the snow and they were later airlifted to a military hospital, according to the local media.
"Despite best efforts, six casualties, which includes four soldiers and two civilian porters, succumbed to extreme hypothermia," spokesman Colonel Rajesh Kalia told the AFP news agency.
Lieutenant Colonel Abhinav Navneet, another army spokesman, said the two surviving soldiers were undergoing treatment.
He added that an army post was also hit by the avalanche but no fatalities were reported there.
The world's highest battlefield
India's Defence Minister Rajnath Singh said he was "deeply pained" by the incident.
"Deeply pained by the demise of soldiers and porters due to avalanche in Siachen. I salute their courage and service to the nation. My heartfelt condolences to their families," Singh tweeted.
The glacier is on the northern tip of the Line of Control that divides India and Pakistan-administered Kashmir. The two countries, which claim the Kashmir region in full, have deployed troops at Siachen.
On August 5, New Delhi stripped the Muslim-majority region of its special status and deployed additional troops, escalating tensions in one of the most militarised zones in the world.
Avalanches are common on the 700-square-kilometre (270-square-mile) glacier, where temperatures regularly fall to minus 60 degrees Celsius (-76 Fahrenheit).
The region has witnessed intermittent skirmishes for decades, but more soldiers have died from the harsh weather than combat at the world's highest battlefield.
In 2017, at least 24 people, including 20 soldiers, were killed in a series of avalanches, while in 2012, a massive avalanche in Pakistani-administered Kashmir killed 140 people, including 129 Pakistani soldiers.


|
ActiveTcl User Guide
|
||
update - Process pending events and idle callbacks
update ?idletasks?
This command is used to bring the application ``up to date'' by entering the event loop repeatedly until all pending events (including idle callbacks) have been processed.
If the idletasks keyword is specified as an argument to the command, then no new events or errors are processed; only idle callbacks are invoked. This causes operations that are normally deferred, such as display updates and window layout calculations, to be performed immediately.
The update idletasks command is useful in scripts where changes have been made to the application's state and you want those changes to appear on the display immediately, rather than waiting for the script to complete. Most display updates are performed as idle callbacks, so update idletasks will cause them to run. However, there are some kinds of updates that only happen in response to events, such as those triggered by window size changes; these updates will not occur in update idletasks.
The update command with no options is useful in scripts where you are performing a long-running computation but you still want the application to respond to events such as user interactions; if you occasionally call update then user input will be processed during the next call to update.
event, flush, handler, idle, update
Copyright © 1990-1992 The Regents of the University of California. Copyright © 1994-1996 Sun Microsystems, Inc. Copyright © 1995-1997 Roger E. Critchlow Jr.


| ${'Channel Type:' @ i18n, locale=request.locale} | ${helper.type @ i18n, locale=request.locale} | |
|---|---|---|
| ${'Offline:' @ i18n, locale=request.locale} | ${'Channel is not configured to be used offline.' @ i18n, locale=request.locale} |
${helper.properties.forceRemoteContent ? 'Disabled' : 'Enabled' @ i18n, locale=request.locale}
${'No content found. Use the "Update Cache" button to create content and make it available to the screens.' @ i18n, locale=request.locale} ${'New updates found. Use the "Update Cache" button to make new content available to the screens.' @ i18n, locale=request.locale} ${'Most recent channel content is available to the screens.' @ i18n, locale=request.locale} |


Thank you for registering with us! We may send a confirmation email shortly.
In the meantime, feel free to log in with your new credentials!
Go back