Now, it's time to make the web page dynamic — with AngularJS. We will also add a test that verifies the code for the controller we are going to add.
There are many ways to structure the code for an application. For AngularJS applications, we encourage the use of the Model-View-Controller (MVC) design pattern to decouple the code and separate concerns. With that in mind, let's use a little AngularJS and JavaScript to add models, views, and controllers to our app.
In AngularJS, the view is a projection of the model through the HTML template. This means that whenever the model changes, AngularJS refreshes the appropriate binding points, which updates the view.
The view is constructed by AngularJS from this template.
app/index.html
:

...

{{phone.name}}

{{phone.snippet}}

We replaced the hard-coded phone list with the ngRepeat directive and two AngularJS expressions:
ng-repeat="phone in phones"
attribute on the

tag is an AngularJS repeater directive.
The repeater tells AngularJS to create a

element for each phone in the list, using the

tag as the template.{{phone.name}}
and {{phone.snippet}}
) will be
replaced by the values of the expressions.We have also added a new directive, called ngController, which attaches a
PhoneListController
controller to the
tag. At this point:
PhoneListController
is in charge of the DOM sub-tree under (and including) the
element.{{phone.name}}
and {{phone.snippet}}
) denote bindings, which
are referring to our application model, which is set up in our PhoneListController
controller.ng-app="phonecatApp"
, where phonecatApp
is the name of our module. This module will contain
the PhoneListController
.
The data model (a simple array of phones in object literal notation) is now instantiated within
the PhoneListController
controller. The controller is simply a constructor function that
takes a $scope
parameter:
app/app.js
:
// Define the `phonecatApp` module
var phonecatApp = angular.module('phonecatApp', []);
// Define the `PhoneListController` controller on the `phonecatApp` module
phonecatApp.controller('PhoneListController', function PhoneListController($scope) {
$scope.phones = [
{
name: 'Nexus S',
snippet: 'Fast just got faster with Nexus S.'
}, {
name: 'Motorola XOOM™ with Wi-Fi',
snippet: 'The Next, Next Generation tablet.'
}, {
name: 'MOTOROLA XOOM™',
snippet: 'The Next, Next Generation tablet.'
}
];
});
Here we declared a controller called PhoneListController
and registered it in an AngularJS module,
phonecatApp
. Notice that our ngApp
directive (on the
tag) now specifies the
phonecatApp
module name as the module to load when bootstrapping the application.
Although the controller is not yet doing very much, it plays a crucial role. By providing context for our data model, the controller allows us to establish data-binding between the model and the view. We connected the dots between the presentation, data, and logic components as follows:
The ngController directive, located on the
tag, references the name
of our controller, PhoneListController
(located in the JavaScript file app.js
).
The PhoneListController
controller attaches the phone data to the $scope
that was injected
into our controller function. This scope is a prototypal descendant of the root scope that was
created when the application was defined. This controller scope is available to all bindings
located within the
tag.
The concept of a scope in AngularJS is crucial. A scope can be seen as the glue which allows the template, model, and controller to work together. AngularJS uses scopes, along with the information contained in the template, data model, and controller, to keep models and views separate, but in sync. Any changes made to the model are reflected in the view; any changes that occur in the view are reflected in the model.
To learn more about AngularJS scopes, see the AngularJS scope documentation.
AngularJS scopes prototypically inherit from their parent scope, all the way up to the root scope of the application. As a result, assigning values directly on the scope makes it easy to share data across different parts of the page and create interactive applications. While this approach works for prototypes and smaller applications, it quickly leads to tight coupling and difficulty to reason about changes in our data model.
In the next step, we will learn how to better organize our code, by "packaging" related pieces of application and presentation logic into isolated, reusable entities, called components.
The "AngularJS way" of separating the controller from the view makes it easy to test code as it is being
developed. In the section "Model and Controller" we have registered our controller via a constructor
function on the phonecatApp
module.
In tests, we use an AngularJS service, $controller
, which will retrieve a controller by name. It
also takes a second argument - a map of dependencies that should be injected.
The following test instantiates PhoneListController
with a mock scope object,
and verifies that the phones array property on the scope contains three records.
This example demonstrates how easy it is to create a unit test for code in AngularJS. Since testing is such a critical part of software development, we make it easy to create tests in AngularJS so that developers are encouraged to write them.
app/app.spec.js
:
describe('PhoneListController', function() {
beforeEach(module('phonecatApp'));
it('should create a `phones` model with 3 phones', inject(function($controller) {
var scope = {};
var ctrl = $controller('PhoneListController', {$scope: scope});
expect(scope.phones.length).toBe(3);
}));
});
phonecatApp
module.inject
the $controller
service into our test function.$controller
to create an instance of the PhoneListController
.A note on file naming:
As already mentioned in the introduction, the unit test files
(specs) are kept side-by-side with the application code. We name our specs after the file
containing the code to be tested plus a specific suffix to distinguish them from files
containing application code. Note that test files are still plain JavaScript files, so they have
a .js
file extension.
In this tutorial, we are using the .spec
suffix. So the test file corresponding to
something.js
would be called something.spec.js
.
(Another common convention is to use a _spec
or _test
suffix.)
Many AngularJS developers prefer the syntax of Jasmine's Behavior-Driven Development (BDD) framework, when writing tests. Although AngularJS does not require you to use Jasmine, we wrote all of the tests in this tutorial in Jasmine v2.4. You can learn about Jasmine on the Jasmine home page and at the Jasmine docs.
The angular-seed project is pre-configured to run unit tests using Karma, but you will need
to ensure that Karma and its necessary plugins are installed. You can do this by running
npm install
.
To run the tests, and then watch the files for changes execute: npm test
If you only have one of the browsers installed on your machine (either Chrome or Firefox), make
sure to update the karma configuration file (karma.conf.js
), before running the test. Locate the
configuration file in the root directory and update the browsers
property.
E.g. if you only have Chrome installed:
... browsers: ['Chrome'], ...
You should see the following or similar output in the terminal:
INFO [karma]: Karma server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome INFO [Chrome 49.0]: Connected on socket ... with id ... Chrome 49.0: Executed 1 of 1 SUCCESS (0.05 secs / 0.04 secs)
Yay! The test passed! Or not...
To rerun the tests, just change any of the source or test .js
files. Karma will notice the change
and will rerun the tests for you. Now isn't that sweet?
Add another binding to index.html
. For example:

Total number of phones: {{phones.length}}

Create a new model property in the controller and bind to it from the template. For example:
$scope.name = 'world';
Then add a new binding to index.html
:

Hello, {{name}}!

Refresh your browser and verify that it says 'Hello, world!'.
Update the unit test for the controller in app/app.spec.js
to reflect the previous change.
For example by adding:
expect(scope.name).toBe('world');
Create a repeater in index.html
that constructs a simple table:

Row number

{{i}}

Now, make the list 1-based by incrementing i
by one in the binding:

Row number

{{i+1}}

Extra points: Try and make an 8x8 table using an additional ng-repeat
.
Make the unit test fail by changing expect(scope.phones.length).toBe(3)
to instead use
toBe(4)
.
We now have a dynamic application which separates models, views, and controllers, and we are testing as we go. Let's go to step 3 to learn how to improve our application's architecture, by utilizing components.


---
layout: post
title: RxJava completable and single
categories: [RxJava, Completable, Single, Reactive]
tags: [RxJava, Completable, Single, Reactive]
image: rxjava.jpeg
---
Completable and Single are new types introduced exclusively at RxJava that represent reduced types of Observable.
The Completable represents a deferred computation without any value but only indication of completion or exception.
Sample Completable emitter :
{% highlight java %}
public static void main(String[] args) throws Exception {
Completable.fromAction(() -> {
System.out.println("Test Completable");
}).doOnComplete(()->{
System.out.println("Completable complete");
}).subscribe();
Thread.sleep(2000);
}
{% endhighlight %}
The Single represents Reactive Pattern for a single value response, behaves similarly to Observable except that it can only emit either a single successful value or an error
Sample Single emitter :
{% highlight java %}
public static void main(String[] args) throws Exception {
Single.create(singleEmitter -> {
singleEmitter.onSuccess("Single success");
}).doOnSuccess(System.out::println).doOnTerminate(()->{
System.out.println("Single completed either with success or error");
}).subscribe();
Thread.sleep(2000);
}
{% endhighlight %}
Single error emitter example:
{% highlight java %}
Single.create(singleEmitter -> {
throw new Exception("Test");
}).doOnError(System.out::println).doOnTerminate(() -> {
System.out.println("Single completed either with success or error");
}).subscribe();
{% endhighlight %}


{% extends "base.html" %} {% block title %}Kharcha kam{% endblock %} {% block content %}
Note: Comparing may take upto 4-5 min depending on your internet speed.
If you don't see desired output try changing keyword.
Hello there, Welcome to kharcha kam.
We are here to save you some money, just enter the name of product that you want to buy
we will search your product on Amazon and flipkart then show them at the same place.
| # | Flipkart product | flipkart price | Amazon product | Amazon price |
|---|---|---|---|---|
| {{ value[0] }} | {{ value[1] }} | {{ value[2] }} | {{ value[3] }} | {{ value[4] }} |


generate_message/3
[extendible]:- multifile 'SU_messages':generate_message/3.
'SU_messages':generate_message(
+MessageTerm,
-S0,
-S)
For a given MessageTerm, generates a list composed of
Control-Arg pairs and the atom nl
. This can be translated into a
nested list of Control-Arg pairs, which can be used as input to
print_message_lines/3
.
May be any term.
The resulting list of Control-Args pairs.
The remaining list.
Clauses for 'SU_messages':generate_message/3
underly all messages from Prolog. They may
be examined and altered. They are found in library('SU_messages')
.
The purpose of this predicate is to allow you to redefine the displayal of Prolog's messages. For example, to translate all the messages from English into some other language.
This predicate should not be modified if all you want to do is modify or
add a few messages: user:generate_message_hook/3
is provided for that purpose.
The Prolog system uses the built-in predicate print_message/2
to print all its messages. When print_message/2
is called, it
calls user:generate_message_hook(Message,L,[])
to generate the
message. If that fails,
'SU_messages':generate_message(Message,L,[])
is called instead.
If that succeeds, L is assumed to have been bound to a list whose
elements are either Control-Args pairs or the atom nl
. Each Control-Arg
pair should be such that the call
format(user_error, Control, Args)
is valid. The atom nl
is used for breaking the message into
lines. Using the format specification `~n' (new-line) is
discouraged, since the routine that actually prints the message (see
user:message_hook/3
and print_message_lines/3
) may need
to have control over newlines.
'SU_messages':generate_message/3
is not included by default in runtime systems,
since end-users of application programs should probably not be seeing any
messages from the Prolog system.
If there is a call to print_message/2
when
when 'SU_messages':generate_message/3
does not succeed
for some reason, the message term itself is printed, for example:
| ?- print_message(error,unexpected_error(37)). ! unexpected_error(37)
'SU_messages':generate_message/3
failed because the message term was not recognized. In
the following example print_message/2
is being called by the default
exception handler:
| ?- write(A,B). ! Instantiation error in argument 1 of write/2 ! goal: write(_2107,_2108)
:- multifile user:generate_message_hook/3. user:generate_message_hook(hello_world) --> ['hello world'-[],nl].
Note that the terminating nl
is required.


The International Obfuscated C Code Contest
The 18th IOCCC Winners
[ The judges
|
IOCCC home page |
How
to enter |
FAQ |
IOCCC news
|
People who have won |
Winning
entries ]
Here are the names and categories for the winners of the 18th
IOCCC. The source code has not been released yet. The winners will
be notified by EMail soon. They will be given a chance to review the
write-up of their entry. Once this process is complete the source code
will be made available on the winning entries
web page. We anticipate that this will be in mid-December.
The winners are,
Mauro Persano - Animated GIF of rotating torus knots
Country unknown
sample (2.5 Mb)
Stephen Sykes - Commodore PET emulator
Helsinki, Finland
Gil Dogon - Block moving puzzle solver
Jerusalem, Israel
Daniel Vik - X Windows 3D maze renderer
La Jolla, CA USA
Oscar G. Toledo - Chess program
Mexico
Francois Boutines - XML Voronoi diagrams generator
Toulouse, France
screenshot
Jetro Lauha - Sound generation with SDL audio
Helsinki, Finland
Anonymous - Block shuffling 3D puzzle
Debian
Anthony Howe - Text WWW browser
Cannes, France
Arne "Timwi" Heizmann - Brainfuck interpreter
Cambridge, United Kingdom
Peter Klausler - Anagram generator
Minneapolis, MN USA
Vincent Weaver - OpenGL demo
Ithaca, NY USA
Aidan Thornton - Sudoku solver and generator
United Kingdom
Michael Ash - Self-printing LISP interpreter
USA
V.Chia - Is it Java or C?
Singapore
Copyright © 2005, Landon Curt Noll, Simon Cooper, Peter Seebach and
Leonid A. Broukhis. All Rights Reserved.
Permission for personal, education or non-profit use is
granted provided this copyright and notice are included in its entirety
and remains unaltered. All other uses must receive prior permission in writing
from the contest judges.


Namespace GoRogue
Classes
AdjacencyRule
Class representing a method for determining which coordinates are adjacent to a given coordinate, and in which directions those neighbors are. Cannot be instantiated -- premade static instances are provided.
AdvancedLayeredSpatialMap<T>
Advanced version of LayeredSpatialMap that allows for use of a custom IEqualityComparer for hashing and comparison of type T. May be useful for cases where one does not want to implement IHasID, or if you need to use a value type in a LayeredSpatialMap. For simple cases, it is recommended to use LayeredSpatialMap instead.
AdvancedMultiSpatialMap<T>
Advanced version of MultiSpatialMap that allows for use of a custom IEqualityComparer for hashing and comparison of type T. May be useful for cases where one does not want to implement IHasID, or if you need to use a value type in a MultiSpatialMap. For simple cases, it is recommended to use MultiSpatialMap instead.
AdvancedSpatialMap<T>
Advanced version of SpatialMap that allows for use of a custom IEqualityComparer for hashing and comparison of type T. May be useful for cases where one does not want to implement IHasID, or if you need to use a value type in a SpatialMap. For simple cases, it is recommended to use SpatialMap instead.
BoundedRectangle
A class that contains a rectangle Area that is automatically "locked" to being inside the BoundingBox. A typical use might be keeping track of a camera view area.
ComponentContainer
A class implementing a flexible, type-based system for adding components to objects. To utilize it, you can either give your object that you want to have components a ComponentContainer field, or if you wish to avoid the extra field to access components, you may either inherit from ComponentContainer, or have your object implement IHasComponents via a backing field of type ComponentContainer.
Direction
Utility class to handle Directions on a grid map. The built-in variables hold the dx and dy for that direction, at unit scale.
DisjointSet
Basic representation of a Disjoint set data structure. Assumes it is holding integers between 0 and size - 1.
Distance
Class representing a method of calculating distance. You cannot create instances of this class using a constructor -- instead this class contains static instances representing the applicable types of distance calculations.
Effect<TriggerArgs>
Class designed to represent any sort of in-game effect. This could be anything from a simple physical damage effect to a heal effect, including area of effects, damage over time effects, or even potentially a special effect that simply boosts a stat.
EffectArgs
Default argument for any effect. Any class that is used as the template argument for an effect must either be this or a class that inherits from this.
EffectTrigger<TriggerArgs>
Represents an "event" that can trigger one or more Effects of the appropriate type. Typically instnaces of this class can simply be created, however a subclass may be required for custom add/remove actions and ordering.
FOV
Class responsible for caculating basic FOV (see SenseMap for more advanced lighting). It can calculate the FOV with a finite or infinite max radius, and can use a variety of radius types, as specified in Radius class. It also supports both 360 degree FOV and an angle-restricted (directional) FOV. One may access this class like a 2D array of doubles (FOV values), wherein the values will range from 0.0 to 1.0, where 1.0 means the corresponding map grid coordinate is at maximum visibility, and 0.0 means the corresponding coordinate is outside of FOV entirely (not visible). Values fall off linearly with respect to radius as distance from the center increases.
IDGenerator
Class designed as a helper for situations where you need to generate and assign a unique integer to each instance of a class, eg. for a class implementing IHasID (see that interface documentation for usage example). One may initialize it with a starting unsigned integer, or 0 if none is specified. Then, every time one wants to use an integer, one should call UseID(), and use the one it returns. It is not thread-safe on its own -- if it needs to be, one might consider using a lock around any UseID calls.
ItemEventArgs<T>
Event args for spatial map events pertaining to an item (item added, item removed, etc.)
ItemMovedEventArgs<T>
Event args for SpatialMap's ItemMoved event.
LayeredSpatialMap<T>
ISpatialMap implementation that can be used to efficiently represent "layers" of objects, with each layer represented as a SpatialMap. It uses layer masking (bit-masking per layer) to allow functions to operate on specific layers. Items must implement IHasID and IHasLayer, be a reference type, and their Layer value MUST NOT change while they are in the data structure.
LayerMasker
Allows convenient interpretation and creation of layer masks (bit-masks) mask layers represented by integers [0-NumberOfLayers - 1].
Lines
Provides implementations of various (line-drawing) algorithms for generating points closest to a line between two points on a grid.
MathHelpers
Static class consisting of mathematical "helper" functions and constants -- things like angle unit conversions, and other helpful functions.
MultiSpatialMap<T>
See SpatialMap documentation -- similar in principle. However, this implementation allows multiple items to exist at one point in the SpatialMap, in exchange for the loss of the convenience functions like GetItem vs GetItems, as well as potential performance differences (although unless the number of objects at any given location is large, the performance is asymptotically the same).
Radius
Class representing different radius types. Similar in architecture to Coord in architecture -- it cannot be instantiated. Instead it simply has pre-allocated static variables for each type of radius, that should be used whenever a variable of type Radius is required.
RadiusAreaProvider
Class capable of getting all unique positions inside of a given radius and (optional) bounds.
SpatialMap<T>
Designed as an more efficient data structure for recording objects on a map. The simple version: if you're about to use a List to store a bunch of objects in your map, consider using this or MultiSpatialMap instead!
Utility
Static class full of miscellaneous helper methods.
Structs
Coord
2d coordinate class. You cannot create instances of this class using a constructor -- instead, use the Get function to create instances. Also provides numerous static functions to deal with grid/Coord-related math, operations, etc.
Rectangle
Represents a rectangle in terms of grid squares. Provides numerous functions pertaining to area.
Interfaces
IHasComponents
Interface for an object that has components that can be added, removed, checked for, and retrieved by type. Typically, you would implement this via a backing field of type ComponentContainer, which implements the logic for these functions. See that class's documentation for details of functionality.
IHasID
Interface for a class that has an ID, typically used for hashing purposes. The ID should be
unique or close to unique over all instances of the class (for efficiency). Typical
implementation could be simply random-genning the ID, or for completely unique IDs can
involve using an IDGenerator, potentially as follows:
class SomeClass : IHasID
{
private static IDGenerator generator = new IDGenerator();
public int ID { get; private set; }
/// public SomeClass(...)
{
ID = generator.UseID();
}
}
IHasLayer
Interface to be implemented by objects that will be used in LayeredSpatialMap/Map classes.
IReadOnlyDisjointSet
Basic read-only representation of a Disjoint set data structure. Assumes it is holding integers between 0 and size - 1.
IReadOnlyFOV
Read-only interface of the FOV class.
IReadOnlyLayeredSpatialMap<T>
Read-only interface for LayeredSpatialMap -- useful for exposing LayeredSpatialMap instances as read-only properties.
IReadOnlyRadiusAreaProvider
Read-only interface of a RadiusAreaProvider.
IReadOnlySpatialMap<T>
See ISpatialMap documentation. Similar in principle to the C# standard IReadOnlyList/IReadOnlyCollection interface. Simply exposes only those functions of the ISpatialMap interface that do not allow direct modification of the data (eg. adding/moving/removing items). This can allow for direct exposure of an ISpatialMap as a property of type IReadOnlySpatialMap, without allowing such an exposure to break data encapsulation principles of something like a game map.
ISpatialMap<T>
General interface for a data structure that records objects on a map.
ISpatialTuple<T>
Interface specifying return type for item-location pairs in a spatial map implementation.
Enums
AdjacencyRule.Types
Enum representing AdjacencyRule types. Useful for easy mapping of AdjacencyRule types to a primitive type (for cases like a switch statement).
Direction.Types
Enum representing Direction types. Useful for easy mapping of Direction types to a primitive type (for cases like a switch statement).
Distance.Types
Enum for types used under the hood in Direction classes -- allows for convenient switch statements to be used with respect to directions.
Lines.Algorithm
Various supported line-drawing algorithms.
Radius.Types
Enum representing Radius types. Useful for easy mapping of radius types to a primitive type (for cases like a switch statement).


title: TODO samplename: todo sampleurl: https://github.com/MikeMitterer/m4d_template/tree/master/samples/m4d_template ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The two lists are here to demonstrate the component-independence.
There is one DataStore. Each component listens to the onChange-Action.
(Empty records are allowed - makes testing faster!)
Open the console. If you click on "Add" you'll see a log-message sent from the Application-Object. It listens to changes on the "ActionBus"


Constructor
new Settings(accountKey, baseUrl, version, contentType)
Instantiate Settings class
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
accountKey |
string | _ | Key used to uniquely identify the account. Use _ as parameter value for your current account or account key for sub accounts. |
baseUrl |
string | https://api.infobip.com | Infobip personal base URL |
version |
number | 1 | API version. The version is overridable on an individual method call level - useful if some methods are still using old version numbers. |
contentType |
string | json | The type of data the API returns. Values: "json" or "xml" |
- Source:
Example
// Instantiate Settings class
let settings = new infobip.Settings()
Methods
authorize(auth)
Authorize API calls
Parameters:
| Name | Type | Description |
|---|---|---|
auth |
Auth | Instance of authorization class |
- Source:
(async) getApiKey(key, version) → {Object}
Get an API key by its key
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
key |
string | Key (unique ID) of the API key. | |
version |
number | 1 | The API version to use. If set to "", will use the instance version. |
- Source:
Throws:
Error
Returns:
- Type
- Object
Example
// Get API key with property key "abc"
console.log(await settings.getApiKey('abc'))
(async) getApiKeyByName(name, version) → {Object}
Get an API key by its name
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
name |
string | Name of the API key. | |
version |
number | 1 | The API version to use. If set to "", will use the instance version. |
- Source:
Throws:
Error
Returns:
- Type
- Object
Example
// Get API key with property name "live-server"
console.log(await settings.getApiKeyByName('live-server'))
(async) getApiKeyByPublicKey(key, version) → {Object}
Get an API key by its public API key
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
key |
string | Public API key of the API key. | |
version |
number | 1 | The API version to use. If set to "", will use the instance version. |
- Source:
Throws:
Error
Returns:
- Type
- Object
Example
// Get API key with property publicApiKey "abc"
console.log(await settings.getApiKeyByPublicKey('abc'))
(async) getApiKeys(enabled, version) → {Object}
List all API keys
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
enabled |
string | Filter enabled keys. Values: "true" or "false". | |
version |
number | 1 | The API version to use. If set to "", will use the instance version. |
- Source:
Throws:
Error
Returns:
- Type
- Object
Example
// List all API keys
console.log(await settings.getApiKeys())
(async) newApiKey(params, version) → {Object}
Create an API key
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
params |
Object | The API key properties | |
version |
number | 1 | The API version to use. If set to "", will use the instance version. |
- Source:
Throws:
Error
Returns:
- Type
- Object
Example
console.log(await settings.newApiKey({
"name": "Api key 1",
"allowedIPs": [],
"permissions": [
"ALL"
]
}))
(async) updateApiKey(key, params, version) → {Object}
Update an API key
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
key |
string | Key (unique ID) of the API key. | |
params |
Object | The API key properties to update | |
version |
number | 1 | The API version to use. If set to "", will use the instance version. |
- Source:
Throws:
Error
Returns:
- Type
- Object
Example
console.log(await settings.updateApiKey('abc', {
"name": "Api key 2",
"allowedIPs": ['<IP_ADDRESS>']
}))


Quantified Self is an immersive theatre performance and interactive art show that leverages the audience's social media data to tailor the experience to each person. Set in the near future, the piece poses crucial questions about the ethics of data collection and the evolving definition of consent in our connected world. Winner of the John S. and James L. Knight Foundation’s Knight News Challenge. More info: IAmADataPoint.com


"di-dah di-di-di-dit di-dah-dah di-dah-dah-dah dah-di-dit dah-di-di-dah",
sound of Morszelizer clanked out loud.
"What're you doing?" Nikola asked curiously.
"I'm sending our time logs for the last expedition to headquarters, but it's not an easy task..."
 Hrmph... what a pain."
He grumbled at the inconvenience.
"Let me look at it." Nikola offered his help, "It looks like a pretty easy solution, we could
automate the process."
"Oh.. you hero of my day." Stephen started excitedly. "So, how do we start
it?"
"With {% if is_js %}JavaScript{% else %}Python{% endif %}!" Nikola exclaimed.


so basically you are required to solve the this puzzle in order for you to get to the cheesy flag!
for you to reach it you need to follow the map (instructions) hidden by Lenny => ( ͡° ͜ʖ ͡°)
The instructions indicates that you should start at your current position
face North. Then, follow the steps:
Either turn left (L) or right (R) 90 degrees, then walk forward the given
number of blocks, ending at a new point.
There's no time to follow such ridiculous instructions to be honest, so i suggest
take a moment and work out the destination. Given that you can only walk on
the street grid of the city, how far is the shortest path to the destination?
Examples:
case1: R2, L3 the correct answer would be 5
case2: R2, R2, R2 leaves you 2 blocks South of your starting position,which makes the shortest path 2.
to submit your destination you need to forward a get request to / with param attemp
To Access your input click here
Any attemp of brute force will add -200 point to your score :)


This system is designed for house hold automation. Control your home just by lying on your bed.
Close the mode selector switch and the page will automatically change.
© 2021 Pratic Chakraborty.


Comparison with other packages¶
There exists other packages implementing similar methods in other languages, but with different goals in mind. To our knowledge, there are 2 software packages with the goal of learning from crowdsourced data:
- Ceka: it is a Java software package based on WEKA, with a great number of methods that can be used to learn from crowdsourced data.
- Truth inference in Crowdsourcing makes available a collection of methods in Python to learn from crowdsourced data.
Both are useful packages when dealing with crowdsourced data, with a focus mainly on research. Differently, spark-crowd is useful not only in research, but also in production. It provides a clear usage interface as well as software tests for all of its methods with a high tests coverage. Moreover, methods have been implemented with a focus on scalability, so it is useful in a wide variety of situations. A comparison of the methods over a set of datasets is provided in this section, taking into account both quality of the models and execution time.
Data¶
For this performance test we use simulated datasets of increasing size:
- binary1-4: simulated binary class datasets with 10K, 100K, 1M and 10M instances respectively. Each of them has 10 simulated annotations per instance, and the ground truth for each example is known (but not used in the learning process). The accuracy shown in the tables is obtained over this known ground truth.
- cont1-4: simulated continuous target variable datasets, with 10k, 100k, 1M and 10M instances respectively. Each of them has 10 simulated annotations per instance, and the ground truth for each example is known (but not used in the learning process). The Mean Absolute Error is obtained over this known ground truth.
- crowdscale. A real multiclass dataset from the Crowdsourcing at Scale challenge. The data is comprised of 98979 instances, evaluated by, at least, 5 annotators, for a total of 569375 answers. We only have ground truth for the 0.3% of the data, which is used for evaluation.
All datasets are available through this link
CEKA¶
To compare our methods with Ceka, we used two of the main methods implemented in both packages, MajorityVoting and DawidSkene. Ceka and
spark-crowd
also implement GLAD and Raykar’s algorithms. However, in Ceka, these algorithms are implemented using wrappers to other libraries.
The library for the GLAD algorithm is not available on our platform, as it is given as an EXE Windows file, and the wrapper for Raykar’s algorithms
does not admit any configuration parameters.
We provide the results of the execution of these methods in terms of accuracy (Acc) and time (in seconds). For our package, we also include the execution time for a cluster (tc) with 3 executor nodes of 10 cores and 30Gb of memory each.
| MajorityVoting | DawidSkene | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Ceka | spark-crowd | Ceka | spark-crowd | |||||||
| Method | Acc | t1 | Acc | t1 | tc | Acc | t1 | Acc | t1 | tc |
| binary1 | 0.931 | 21 | 0.931 | 11 | 7 | 0.994 | 57 | 0.994 | 31 | 32 |
| binary2 | 0.936 | 15983 | 0.936 | 11 | 7 | 0.994 | 49259 | 0.994 | 60 | 51 |
| binary3 | X | X | 0.936 | 21 | 8 | X | X | 0.994 | 111 | 69 |
| binary4 | X | X | 0.936 | 54 | 37 | X | X | 0.994 | ||
| crowdscale | 0.88 | 10458 | 0.9 | 13 | 7 | 0.89 | 30999 | 0.9033 | 447 | 86 |
Regarding accuracy, both packages achieve comparable results. However, regarding execution time, spark-crowd
obtains
significantly better results among all datasets, especially on the bigger datasets, where it can solve problems that
Ceka is not able to.
Truth inference in crowdsourcing¶
Now we compare spark-crowd
with the methods implemented by the authors. Although they
can certainly be used to compare and test algorithms, the integration of these
methods into a large ecosystem might be difficult, as the authors do not provide
a software package structure. Nevertheless, as it is an available package with a great number
of methods, a comparison with them is advisable.
For the experimentation, the same datasets are used as well as the same environments. In this case, a higher number of models can be compared, as most of the methods are written in python. However, the methods can only be applied to binary or continuous target variables. As far as we know, the use of multiclass target variables is not possible. Moreover, the use of feature information for Raykar’s methods it is also unsupported.
First, we compare the algorithms capable of learning from binary classes. In this category, MajorityVoting, DawidSkene, GLAD and IBCC are compared. For each dataset, the results in terms of Accuracy (Acc) and time (in seconds) are obtained. The table below shows the results for MajorityVoting and DawidSkene. Both packages obtain the same results in terms of accuracy. For the smaller datasets, the overhead imposed by parallelism makes Truth-inf a better choice, at least in terms of execution time. However, as the datasets increase, and especially, in the last two instances, the speedup obtained by our algorithm is notable. In the case of DawidSkene, the Truth-inf package is not able to complete the execution because of memory constraints in the largest dataset.
| MajorityVoting | DawidSkene | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Truth-inf | spark-crowd | Truth-inf | spark-crowd | |||||||
| Method | Acc | t1 | Acc | t1 | tc | Acc | t1 | Acc | t1 | tc |
| binary1 | 0.931 | 1 | 0.931 | 11 | 7 | 0.994 | 12 | 0.994 | 31 | 32 |
| binary2 | 0.936 | 8 | 0.936 | 11 | 7 | 0.994 | 161 | 0.994 | 60 | 51 |
| binary3 | 0.936 | 112 | 0.936 | 21 | 8 | 0.994 | 1705 | 0.994 | 111 | 69 |
| binary4 | 0.936 | 2908 | 0.936 | 57 | 37 | M | M | 0.994 | 703 | 426 |
Next we show the results for GLAD and IBCC. As can be seen, both packages obtain similar results
in terms of accuracy. Regarding execution time, they obtain comparable results
in the two smaller datasets (with a slight speedup in binary2
) for the GLAD algorithm. However,
for this algorithm, Truth-inf is not able to complete the execution for the two largest datasets.
In the case of IBCC, the speedup starts to be noticeable from the second dataset on. It is also noticeable
that Truth-Inf did not complete the execution for the last dataset.
| GLAD | IBCC | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Truth-inf | spark-crowd | Truth-inf | spark-crowd | |||||||
| Method | Acc | t1 | Acc | t1 | tc | Acc | t1 | Acc | t1 | tc |
| binary1 | 0.994 | 1185 | 0.994 | 1568 | 1547 | 0.994 | 22 | 0.994 | 74 | 67 |
| binary2 | 0.994 | 4168 | 0.994 | 2959 | 2051 | 0.994 | 372 | 0.994 | 97 | 76 |
| binary3 | X | X | 0.491 | 600 | 226 | 0.994 | 25764 | 0.994 | 203 | 129 |
| binary4 | X | X | 0.974 | 2407 | 1158 | X | X | X | 1529 | 823 |
Note that the performance of GLAD algorithm seems to degrade in the bigger datasets. This may be due to the ammount of parameters the algorithm needs to estimate. A way to improve the estimation goes through decreasing the learning rate, which makes the algorithm slower, as it needs a lot more iterations to obtain a good solution. This makes the algorithm unsuitable for several big data contexts. To tackle this kind of problems, we developed and enhancement, CGLAD, which is included in this package (See the last section of this page for results of other methods in the package, as well as this enhancement).
Next we analize methods that are able to learn from continuous target variables: MajorityVoting (mean), CATD and PM (with mean initialization). We show the results in terms of MAE (Mean absolute error) and time (in seconds). The results for MajorityVoting and CATD can be found in the table below.
| MajorityVoting (mean) | CATD | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Truth-inf | spark-crowd | Truth-inf | spark-crowd | |||||||
| Method | Acc | t1 | Acc | t1 | tc | Acc | t1 | Acc | t1 | tc |
| cont1 | 1.234 | 1 | 1.234 | 6 | 8 | 0.324 | 207 | 0.324 | 25 | 28 |
| cont2 | 1.231 | 8 | 1.231 | 7 | 9 | 0.321 | 10429 | 0.321 | 26 | 24 |
| cont3 | 1.231 | 74 | 1.231 | 12 | 13 | X | X | 0.322 | 42 | 38 |
| cont4 | 1.231 | 581 | 1.231 | 56 | 23 | X | X | 0.322 | 247 | 176 |
As you can see in the table, both packages obtain similar results regarding MAE. Regarding execution time, the implementation of MajorityVoting from the Truth-inf package obtains good results, especially in the smallest dataset. It is worth pointing out that, for the smallest datasets, the overhead imposed by parallelism makes the execution time of our package a little worse in comparison. However, as datasets increase in size, the speedup obtained by our package is notable, even in MajorityVoting, which is less complex computationally. Regarding CATD, Truth-inf seems not to be able to solve the 2 bigger problems in a reasonable time, however, they can be solved by our package in a small ammount of time. Even for the smaller datasets, our package obtains a high speedup in comparison to Truth-inf for CATD.
In the table below you can find the results for PM and PMTI algorithms.
| PM | PMTI | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Truth-inf | spark-crowd | Truth-inf | spark-crowd | |||||||
| Method | Acc | t1 | Acc | t1 | tc | Acc | t1 | Acc | t1 | tc |
| cont1 | 0.495 | 77 | 0.495 | 57 | 51 | 0.388 | 139 | 0.388 | 68 | 61 |
| cont2 | 0.493 | 8079 | 0.495 | 76 | 57 | 0.386 | 14167 | 0.386 | 74 | 58 |
| cont3 | X | X | 0.494 | 130 | 97 | X | X | 0.387 | 143 | 98 |
| cont4 | X | X | 0.494 | 769 | 421 | X | X | 0.387 | 996 | 475 |
Although similar, the modification implemented in Truth-inf from the original algorithm seems to be more accurate. Even in the smallest sizes, our package obtains a slight speedup. However, as the datasets increase in size, our package is able to obtain a much higher speedup.
Other methods¶
To complete our experimentation, next we focus on other methods implemented by our package that are not implemented by Ceka or Truth-Inf. These methods are the full implementation of the Raykar’s algorithms (taking into account the features of the instances) and the enhancement over the GLAD algorithm. As a note, Truth-Inf implements a version of Raykar’s algorithms that does not use the features of the instances. First, we show the results obtained by the Raykar’s methods for discrete target variables.
| RaykarBinary | RaykarMulti | |||||
|---|---|---|---|---|---|---|
| spark-crowd | spark-crowd | |||||
| Method | Acc | t1 | tc | Acc | t1 | tc |
| binary1 | 0.994 | 65 | 63 | 0.994 | 167 | 147 |
| binary2 | 0.994 | 92 | 74 | 0.994 | 241 | 176 |
| binary3 | 0.994 | 181 | 190 | 0.994 | 532 | 339 |
| binary4 | 0.994 | 1149 | 560 | 0.994 | 4860 | 1196 |
Next we show the Raykar method for tackling continous target variables.
| RaykarCont | ||||
|---|---|---|---|---|
| spark-crowd | ||||
| Method | Acc | t1 | tc | |
| cont1 | 0.994 | 31 | 32 | |
| cont2 | 0.994 | 60 | 51 | |
| cont3 | 0.994 | 111 | 69 | |
| cont4 | 0.994 | 703 | 426 |
Finally, we show the results for the CGLAD algorithm. As you can see, it obtains similar results to the GLAD algorithm in the smallest instances but it performs much better in the larger ones. Regarding execution time, CGLAD obtains a high speedup in the cases where accuracy results for both algorithms are similar.
| CGlad | |||
|---|---|---|---|
| spark-crowd | |||
| Method | Acc | t1 | tc |
| binary1 | 0.994 | 128 | 128 |
| binary2 | 0.995 | 233 | 185 |
| binary3 | 0.995 | 1429 | 607 |
| binary4 | 0.995 | 17337 | 6190 |


Command outputs HTML?
Normally, when a command is run Webmin converts all <, > and &
characters so that they are displayed properly. However, if your command
actually outputs HTML you should set this option to Yes to prevent this
conversion from happening.


Test
This is a test for a focus control.
Press Me
City
Province
Winnipeg
Manitoba
Saskatoon
Saskatchewan
Edmonton
Alberta
Calgary
Alberta


{% include meta.html %}
AWS
Services
case studies
About
Blog
Contact us
AWS
Services
case studies
About
Blog
Contact us
Elevate
Cloud adoption
Application modernization
data and analytics
Operate
managed cloud operations
professional services
cloud cost optimization
Innovate
AI and machine learning
Cloud Native Development
IoT Devices
Sharing our experiences and thoughts with the world
{{ content }}
{% include analytics.html %}


if
, while
, do
, or for
statements without braces.
Some code styles, e.g. the Google Java Style guide,
require braces for all control statements.
When adding further statements to control statements without braces, it is important not to forget adding braces. When commenting out a line of code, it is also necessary to be more careful when not using braces, to not inadvertently make the next statement part of the control flow statement. Always using braces makes inserting or commenting out a line of code safer.
It's likely the goto fail vulnerability would not have happened, if an always use braces code style was used. Control statements with braces make the control flow easier to see, without relying on, possibly incorrect, indentation.
Example:
class Strange {
void x(boolean one, boolean two) {
if(one)
if(two)
foo();
else
bar();
}
void foo() {}
void bar() {}
}
The quick-fix wraps the statement body with braces:
class Strange {
void x(boolean one, boolean two) {
if(one) {
if(two) {
foo();
} else {
bar();
}
}
}
void foo() {}
void bar() {}
}


public abstract class CreditDebtGroupPath
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
double |
bilateralCollateralAdjustment()
Compute Path Bilateral Collateral Value Adjustment
|
double |
bilateralCreditAdjustment()
Compute Path Bilateral Credit Adjustment
|
double |
bilateralDebtAdjustment()
Compute Path Bilateral Debt Adjustment
|
double |
bilateralFundingDebtAdjustment()
Compute Path Bilateral Funding Debt Adjustment
|
double |
bilateralFundingValueSpread01()
Compute Path Bilateral Funding Value Spread 01
|
CollateralGroupPath[] |
collateralGroupPaths()
Retrieve the Array of the Position Hypothecation Group Trajectory Paths
|
double |
collateralValueAdjustment()
Compute Path Collateral Value Adjustment
|
double |
contraAssetDebtAdjustment()
Compute Path Contra-Asset Debt Adjustment
|
double |
contraLiabilityCreditAdjustment()
Compute Path Contra-Liability Credit Adjustment
|
abstract double |
creditAdjustment()
Compute Path Credit Adjustment
|
abstract double |
debtAdjustment()
Compute Path Debt Adjustment
|
MarketPath |
marketPath()
Retrieve the Market Path
|
double[] |
periodBilateralCreditAdjustment()
Compute Period-wise Bilateral Credit Adjustment
|
double[] |
periodBilateralDebtAdjustment()
Compute Period-wise Bilateral Debt Adjustment
|
double[] |
periodBilateralFundingDebtAdjustment()
Compute Period Bilateral Funding Debt Adjustment
|
double[] |
periodBilateralFundingValueSpread01()
Compute Period Bilateral Funding Value Spread 01
|
double[] |
periodCollateralSpread01()
Compute Period-wise Path Collateral Spread 01
|
double[] |
periodCollateralValueAdjustment()
Compute Period-wise Path Collateral Value Adjustment
|
double[] |
periodContraLiabilityCreditAdjustment()
Compute Period-wise Contra-Liability Credit Adjustment
|
abstract double[] |
periodCreditAdjustment()
Compute Period-wise Credit Adjustment
|
abstract double[] |
periodDebtAdjustment()
Compute Period-wise Debt Adjustment
|
double[] |
periodSymmetricFundingValueSpread01()
Compute Period-wise Symmetric Funding Value Spread 01
|
double[] |
periodUnilateralCreditAdjustment()
Compute Period-wise Unilateral Credit Adjustment
|
double[] |
periodUnilateralDebtAdjustment()
Compute Period-wise Unilateral Debt Adjustment
|
double[] |
periodUnilateralFundingDebtAdjustment()
Compute Period Unilateral Funding Debt Adjustment
|
double[] |
periodUnilateralFundingValueSpread01()
Compute Period Unilateral Funding Value Spread 01
|
double |
symmetricFundingValueSpread01()
Compute Path Symmetric Funding Value Spread 01
|
double |
unilateralCollateralAdjustment()
Compute Path Unilateral Collateral Value Adjustment
|
double |
unilateralCreditAdjustment()
Compute Path Unilateral Credit Adjustment
|
double |
unilateralDebtAdjustment()
Compute Path Unilateral Debt Adjustment
|
double |
unilateralFundingDebtAdjustment()
Compute Path Unilateral Funding Debt Adjustment
|
double |
unilateralFundingValueSpread01()
Compute Path Unilateral Funding Value Spread 01
|
double[] |
vertexCollateralBalance()
Retrieve the Array of Vertex Collateral Balances
|
double[] |
vertexCollateralBalancePV()
Retrieve the Array of Vertex Collateral Balances PV
|
double[] |
vertexCollateralizedExposure()
Retrieve the Array of Vertex Collateralized Exposures
|
double[] |
vertexCollateralizedExposurePV()
Retrieve the Array of Vertex Collateralized Exposure PV
|
double[] |
vertexCollateralizedNegativeExposure()
Retrieve the Array of Vertex Collateralized Negative Exposures
|
double[] |
vertexCollateralizedNegativeExposurePV()
Retrieve the Array of Vertex Collateralized Negative Exposure PV
|
double[] |
vertexCollateralizedPositiveExposure()
Retrieve the Array of Vertex Collateralized Positive Exposures
|
double[] |
vertexCollateralizedPositiveExposurePV()
Retrieve the Array of Vertex Collateralized Positive Exposure PV
|
double[] |
vertexCreditExposure()
Retrieve the Array of Vertex Credit Exposure
|
double[] |
vertexCreditExposurePV()
Retrieve the Array of Vertex Credit Exposure PV
|
JulianDate[] |
vertexDates()
Retrieve the Array of the Vertex Anchor Dates
|
double[] |
vertexDebtExposure()
Retrieve the Array of Vertex Debt Exposure
|
double[] |
vertexDebtExposurePV()
Retrieve the Array of Vertex Debt Exposure PV
|
double[] |
vertexFundingExposure()
Retrieve the Array of Vertex Funding Exposure
|
double[] |
vertexFundingExposurePV()
Retrieve the Array of Vertex Funding Exposure PV
|
double[] |
vertexUncollateralizedExposure()
Retrieve the Array of Vertex Uncollateralized Exposures
|
double[] |
vertexUncollateralizedExposurePV()
Retrieve the Array of Vertex Uncollateralized Exposure PV
|
double[] |
vertexUncollateralizedNegativeExposure()
Retrieve the Array of Vertex Uncollateralized Negative Exposures
|
double[] |
vertexUncollateralizedNegativeExposurePV()
Retrieve the Array of Vertex Uncollateralized Negative Exposure PV
|
double[] |
vertexUncollateralizedPositiveExposure()
Retrieve the Array of Vertex Uncollateralized Positive Exposures
|
double[] |
vertexUncollateralizedPositiveExposurePV()
Retrieve the Array of Vertex Uncollateralized Positive Exposure PV
|
public CollateralGroupPath[] collateralGroupPaths()
public MarketPath marketPath()
public JulianDate[] vertexDates()
public double[] vertexCollateralizedExposure()
public double[] vertexCollateralizedExposurePV()
public double[] vertexCollateralizedPositiveExposure()
public double[] vertexCollateralizedPositiveExposurePV()
public double[] vertexCollateralizedNegativeExposure()
public double[] vertexCollateralizedNegativeExposurePV()
public double[] vertexUncollateralizedExposure()
public double[] vertexUncollateralizedExposurePV()
public double[] vertexUncollateralizedPositiveExposure()
public double[] vertexUncollateralizedPositiveExposurePV()
public double[] vertexUncollateralizedNegativeExposure()
public double[] vertexUncollateralizedNegativeExposurePV()
public double[] vertexCreditExposure()
public double[] vertexCreditExposurePV()
public double[] vertexDebtExposure()
public double[] vertexDebtExposurePV()
public double[] vertexFundingExposure()
public double[] vertexFundingExposurePV()
public double[] vertexCollateralBalance()
public double[] vertexCollateralBalancePV()
public double[] periodCollateralSpread01()
public double[] periodCollateralValueAdjustment()
public double unilateralCreditAdjustment()
public double bilateralCreditAdjustment()
public double contraLiabilityCreditAdjustment()
public double unilateralDebtAdjustment()
public double bilateralDebtAdjustment()
public double contraAssetDebtAdjustment()
public double symmetricFundingValueSpread01()
public double unilateralFundingValueSpread01()
public double bilateralFundingValueSpread01()
public double unilateralFundingDebtAdjustment()
public double bilateralFundingDebtAdjustment()
public double unilateralCollateralAdjustment()
public double bilateralCollateralAdjustment()
public double collateralValueAdjustment()
public double[] periodSymmetricFundingValueSpread01()
public double[] periodUnilateralCreditAdjustment()
public double[] periodBilateralCreditAdjustment()
public double[] periodContraLiabilityCreditAdjustment()
public double[] periodUnilateralDebtAdjustment()
public double[] periodBilateralDebtAdjustment()
public double[] periodUnilateralFundingValueSpread01()
public double[] periodBilateralFundingValueSpread01()
public double[] periodUnilateralFundingDebtAdjustment()
public double[] periodBilateralFundingDebtAdjustment()
public abstract double creditAdjustment()
public abstract double debtAdjustment()
public abstract double[] periodCreditAdjustment()
public abstract double[] periodDebtAdjustment()


| Host | Port | State | Progress | |
|---|---|---|---|---|
| {{replication.host}} | {{replication.port}} | {{replication.state}} |
{{replication.deliveryChunkKey}} - {{replication.version}} {{replication.status}} {{replication.formattedCurrent}} of {{replication.formattedTotal}} copied Copy Rate: {{replication.formattedCopyRate}} |


Travelers don't carry a lot of gear on the road but making a mistake in getting the gear you are supposed to get can lead to wasted money, carrying too much stuff, and being unable to stay connected on the road. Below are all the articles on my site to getting the right gear, packing right, and staying protected.
It's often hard to know what to look for when picking a backpack that will last a lifetime and in any conditions. What makes a good bag? How much should you spend? This guide will take the worry out of choosing a backpack to travel with.
What should you pack on your trip? Well, there is no one right answer as everyone has their own needs but this list will give you a good place to start. After traveling the world for years, this is my ideal gear/packing list for a long-term trip.
There are my favorite travel apps, gear, and companies that I use when I travel. They keep me on the road longer, make life easier, and help me save money. I believe they are the highest quality sites out there and where you should start all your bookings.
Travel insurance is something I recommend all travelers get.  Here is an in-depth guide to travel insurance demystifying the process and explaining everything you ever need to know about purchasing a plan.
People are usually shocked to hear that I enjoy organized tours, but I think there is a time and place when they are worth the price. Here is the criteria I use to pick an affordable company that gives back to the local community and helps protect the environment.
This article will help you pick the right computer, tablet, and other tech gear for when you are traveling the world or a short vacation so you can stay connected. Our tech expert Dave breaks it all down for you so you can get in and out of that Best Buy!
Knowing how to protect your data when you travel is crucial in our information dependent age, especially when connecting to unsecure hotspots. This article will give you step by step tips to ensure your data is never hacked.
This in-depth guide to unlocked phones, SIM cards,roaming planes, and other alternatives will ensure you don&'t overpay on staying connected and can always text that new found Swedish love of yours.


Top level Floorplan Check
Off-Grid Horizontal Tracks
|
0
|
Off-Grid Vertical Tracks
|
0
|
Placement grid on Mfg. grid
|
FALSE
|
User grid a multiple of Mfg. grid
|
FALSE
|
User grid a multiple of Mfg. grid
|
FALSE
|
Core Row grid not a multiple of Mfg. grid
|
0
|
Horizontal GCell Grid off Mfg. grid
|
0
|
Vertical GCell Grid off Mfg. grid
|
0
|
AreaIO rows not on core-grid
|
0
|
BlackBoxes Off Mfg. Grid
|
0
|
Blocks Off Mfg. Grid
|
0
|
BlackBoxes Off placement Grid
|
0
|
Blocks off placement Grid
|
0
|
Instances not snapped to row site
|
0
|
Instances not on Mfg. Grid
|
0
|
PrePlaced hard-macro pins not on routing grid
|
0
|
Floating/Unconnected IO Pins
|
288
|
Unplaced Io Pins
|
0
|
IO Pin off Mfg. grid
|
0
|
IO Pin outside Die area
|
0
|
Overlapping IO pins
|
0
|
IO Pin off track
|
0
|
Modules with off-grid Constraints
|
0
|
Groups with off-grid Constraints
|
0
|
Floating/Unconnected Ptn Pins
|
0
|
Partition Pin off M. Grid
|
0
|
Unplaced Partition Pins
|
0
|
Partition Pin outside Partition box
|
0
|
Overlapping Partition Pins
|
0
|
Partition Pin Off-Track
|
0
|
PartitionPower Domain off Grid
|
0
|
PreRoute not on Mfg. grid
|
0
|
Off Track Pre-Routes
|
0
|
Off Grid Power/Ground Pre-routes
|
0
|


|
nrf51AdvLogger
1.0
|
This module contains all the peripheral drivers required for the nrf51822 System on Chip. More...
Modules | |
| Clock Setup | |
| Driver to initialize and de-initialize both the HF and LF clock in nrf51822 SoC. | |
| Milli-Second RTC Timer | |
| Driver to use milli-second timers using RTC1 peripheral. | |
| Interrupt Priority | |
| Interrupt priority definitions for all the peripherals. | |
| LED Driver | |
| LED Driver for the PCA1000 board to initialize, switch on, switch off and toggle LEDs. | |
| GPIO abstraction | |
| GPIO pin abstraction and port abstraction for reading and writing byte-wise to GPIO ports. | |
| Profile Timer | |
| Driver to use timer based on TIMER0 for code profiling and time-stamping. | |
| UART Driver | |
| UART Driver for the nrf51822 SoC supports single character printing, stream to printf and a character stream receiver handler. | |
This module contains all the peripheral drivers required for the nrf51822 System on Chip.


[gecode-users] another question about stats
David Przybilla
paranoic.pum at gmail.com
Wed Feb 25 15:05:47 CET 2009
Sorry I just clicked "Answer" Button and didnt notice the email was sent to
your personal email.
I know it is not the latest,however I need to work on 2.1.1..sorry about the
downgrade :) thank you for the fast answer..
here is the whole code, it is just one file:
#include "gecode/minimodel.hh"
>> #include "gecode/examples/support.hh"
>>
>> using namespace Gecode;
>>
>> class MiPropagador: public
>> Gecode::UnaryPropagator<Gecode::Int::IntView,Gecode::Int::PC_INT_DOM>
>> {
>>
>> public:
>>
>> Actor* copy(Space* home,bool share){
>> return new (home) MiPropagador(home,share,*this);
>> }
>>
>> PropCost cost(void) const {
>> return PC_UNARY_LO;
>> }
>>
>>
>> MiPropagador(Space* home, bool share, MiPropagador&
>> p):Gecode::UnaryPropagator<Gecode::Int::IntView,Gecode::Int::PC_INT_DOM>(home,share,p){}
>>
>> MiPropagador(Space* home, Gecode::Int::IntView
>> x):Gecode::UnaryPropagator<Gecode::Int::IntView,Gecode::Int::PC_INT_DOM>(home,x){}
>>
>> Gecode::ExecStatus propagate(Space *home, Gecode::ModEventDelta med){
>> usleep(1000000); // works on linux, it is supposed to delay
>> execution for a second
>> std::cout<<"The propagator has been called!"<<std::endl;
>> GECODE_ME_CHECK(x0.gq(home,0));
>> return Gecode::ES_NOFIX;
>> }
>>
>>
>>
>> };
>>
>>
>> Gecode::ExecStatus positiva(Space* home,Gecode::Int::IntView x)
>> {
>> (void) new (home) MiPropagador(home,x);
>> return Gecode::ES_OK;
>> };
>>
>> class EjemploPropagador: public Example {
>> private:
>> IntVarArray a;
>> public:
>>
>> EjemploPropagador(const Options& opt): a(this,2,-10,10){
>>
>> post(this,a[1]==a[0]+2);
>> positiva(this,a[0]);
>> positiva(this,a[1]);
>>
>> Gecode::branch(this,a,Gecode::INT_VAR_NONE,Gecode::INT_VAL_MIN );
>>
>> }
>>
>> EjemploPropagador(bool share, EjemploPropagador& s) :
>> Example(share,s){
>> a.update(this, share, s.a);
>> }
>>
>> virtual Space*
>> copy(bool share) {
>> return new EjemploPropagador(share,*this);
>> }
>>
>> virtual void
>> print(std::ostream &os) {
>> std::cout << "\a = " << a << std::endl;
>> }
>> };
>>
>>
>>
>> int main(int argc, char** argv) {
>>
>> SizeOptions opt("EjemploPropagador");
>> opt.icl( ICL_DOM);
>> opt.solutions ( 0);
>> opt.parse(argc,argv);
>> Example::run<EjemploPropagador,DFS>(opt);
>>
>> return 0;
>> }
>>
>
The result I get is:
Initial
>> propagators: 3
>> branchings: 1
>>
>> Summary
>> runtime: 0.000 (0.000000 ms)
>> solutions: 9
>> propagations: 54
>> failures: 0
>> clones: 8
>> commits: 16
>> peak memory: 10 KB
>>
>
however it takes more than 0.0ms to complete execution.
Regards, David
2009/2/24 Christian Schulte <cschulte at kth.se>
> Actually, that is weird as in the examples also setup time is measured.
> But I fear you have to chip in some more detail what you do.
>
>
>
> The runtime between 1* and 2* should be roughly the same (why do you
> compare one old version against another old version, 2.1.1 is not the
> latest). But the statistics can be trusted, we use it all the time and we
> know that it does not deviate from the OS measures.
>
>
>
> Christian
>
>
>
> --
>
> Christian Schulte, www.it.kth.se/~cschulte/<http://www.it.kth.se/%7Ecschulte/>
>
>
>
> *From:* users-bounces at gecode.org [mailto:users-bounces at gecode.org] *On
> Behalf Of *David Przybilla
> *Sent:* Tuesday, February 24, 2009 5:24 PM
> *To:* users at gecode.org
> *Subject:* [gecode-users] another question about stats
>
>
>
> I made a small testing sample, I made a simple propagator and some
> variables subscribing to it.
> Inside the propagate method there is a usleep line, which is supposed to
> delay the execution for some seconds.
> When I run the example, the delay is there, however when stats are shown,
> they say the example`s runtime was 0ms.
> what does "runtime" measure? am I doing anything wrong?
> Also, Im making performance comparisons between some programs on Gecode old
> versions and between the same ones on Gecode 2.1.1,
> I wonder whether I should measure the time on my own or just use the
> runtime thrown by gecode`s stats
>
> Thank you in advance!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090225/18e233ea/attachment.htm>
More information about the gecode-users
mailing list


viral IFN obesity type gut immune infections cells microbiota IFNs antiviral []. metabolic persistent response responses infection lipid [,]. human associated metabolism chronic obese production [,,,]. cell interferon signaling {border-style role virus viruses px;} #ffffff;} [,,]. mice host inflammation studies expression prolonged effect adipose animal cellular regulation IFN-β [,,,,]. energy including insulin multiple systemic directly inflammatory patients recent However, III fatty glucose infectobesity intrinsic particularly protein acid adipogenic cells, development increase induce innate persistence ONEe./journal.pone.  Similarly, Viral [,,,,,,]. [,,,,,]. affect animals association bacterial border-color border-width ceramide composition control dendritic different direct diseases drive dysbiosis early effects epithelial especially function hepatitis high immunity indicated infections, interferons key livestock major membrane meta-inflammation microbial molecular mouse natural obesity-associated oxygen pathogenesis pathogenic phases potential prion pro-inflammatory reactive reciprocal response, signal solid; state subtypes weight {font-style {font-weight (Table Ad-, Ad-: Adipogenic Biol. HIV Host IFN-α/β Interferon Interferons Rev. SOCS TCA Therefore, Unknown accompanied actually anti-inflammatory attenuated biological bold cases cause complex components context, courier; cytokine dengue diet differentiation em; hand, however, include induces intestinal local macrophage macrophages macrophages, mass mechanisms needed obesity: obesogenesis produced provide pt;} recently reprograming results shedding showed sustain target taxonomic uptake using virus;


The Risk Map Report is a visual representation of the plausible Risk Profiles defined in each organization.
Each points in the report are influenced by the impact (x-axis) and likelihood (y-axis) assigned in each Risk Profiles plotted in the chart above.
The impact and likelihood of the Risk Profiles are ranked in a scale of 1-10.


Cops hunt heavily-built yob who threatened shop staff in 'frightening' robbery
He threatened them with a weapon before demanding money from the till.
by Kirsten McStayPolice are appealing for information following a robbery at a convenience store in Hamilton last night.
At around 7.20pm on Sunday, November 3, a man entered the McColl’s on Fleming Way.
He threatened staff with a weapon before demanding money from the till.
The man left the scene on foot. Nobody was injured as a result of the incident.
He is described as being of a heavy build with a bright coloured hoody.
Officers investigating the incident are now appealing for witnesses, and anyone who can help the investigation is asked to come forward.
Detective Constable Paul Mooney of Lanarkshire CID said: “This has been a very frightening experience for the staff members working within the store who have understandably been left shaken by the incident.
“The man left the area on foot and we are keen to hear from anyone who was in Fleming Way or the surrounding area on Sunday evening and who saw him, to report this to officers.
“Anyone who has any information that can help to identify and trace him, should contact police as soon as possible.”
Those with information should contact Police Scotland on 101 and quote incident number 3616 of Sunday, 3 November, 2019. Alternatively if you wish to give information anonymously, please contact Crimestoppers on 0800 555 111.


---
layout: post
title: 12/4
date: '2012-12-04T22:15:00.002-07:00'
author: Jacob .
tags:
modified_time: '2012-12-04T22:15:30.002-07:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-4070576113616741943
blogger_orig_url: http://www.svlark.com/2012/12/124.html
---
Audrey and I are on Lesson 26 of TYCTR. She's doing great. One thing that's kind of annoying is the way they clutter up the spaces between words in the stories. She and I both find it pretty confusing.
April and I had a great brainstorming session this evening on our next steps.
Time for a chapter of Your Boat Too...
-17.9 @ 253.3


qualia2.nn.modules package¶
Submodules¶
qualia2.nn.modules.activation module¶
qualia2.nn.modules.conv module¶
-
class
qualia2.nn.modules.conv.
Conv1d
(in_channels, out_channels, kernel_size, stride=1, padding=1, dilation=1, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
‘Applies a 1D convolution over an input signal composed of several input planes.
- Args:
in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (int): Size of the convolving kernel stride (int): Stride of the convolution. Default: 1 padding (int): Zero-padding added to both sides of the input. Default: 0 dilation (int): Spacing between kernel elements. Default: 1 bias (bool): adds a learnable bias to the output. Default: True
- Shape:
Input: [N, in_channels, W]
Output: [N, out_channels, W_out]
-
class
qualia2.nn.modules.conv.
Conv2d
(in_channels, out_channels, kernel_size, stride=1, padding=1, dilation=1, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 2D convolution over an input signal composed of several input planes.
- Args:
in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (tuple of int): Size of the convolving kernel stride (tuple of int): Stride of the convolution. Default: 1 padding (tuple of int): Zero-padding added to both sides of the input. Default: 0 dilation (tuple of int): Spacing between kernel elements. Default: 1 bias (bool): adds a learnable bias to the output. Default: True
- Shape:
Input: [N, in_channels, H, W]
Output: [N, out_channels, H_out, W_out]
H_out = (H+2*padding[0]-dilation[0]*(kernel_size[0]-1)-1)/stride[0]+1 W_out = (W+2*padding[1]-dilation[1]*(kernel_size[1]-1)-1)/stride[1]+1
-
class
qualia2.nn.modules.conv.
Conv3d
(in_channels, out_channels, kernel_size, stride=1, padding=1, dilation=1, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 3D convolution over an input signal composed of several input planes.
- Args:
in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (tuple of int): Size of the convolving kernel stride (tuple of int): Stride of the convolution. Default: 1 padding (tuple of int): Zero-padding added to both sides of the input. Default: 0 dilation (tuple of int): Spacing between kernel elements. Default: 1 bias (bool): adds a learnable bias to the output. Default: True
- Shape:
Input: [N, in_channels, D, H, W]
Output: [N, out_channels, D_out, H_out, W_out]
-
class
qualia2.nn.modules.conv.
ConvTranspose1d
(in_channels, out_channels, kernel_size, stride=1, padding=1, output_padding=0, dilation=1, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 1D transposed convolution over an input signal composed of several input planes.
- Args:
in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (tuple of int): Size of the convolving kernel stride (tuple of int): Stride of the convolution. Default: 1 padding (tuple of int): Zero-padding added to both sides of the input. Default: 1 output_padding (tuple of int): Zero-padding added to both sides of the output. Default: 0 dilation (tuple of int): Spacing between kernel elements. Default: 1 bias (bool): adds a learnable bias to the output. Default: True
- Shape:
Input: [N, in_channels, W]
Output: [N, out_channels, W_out]
-
class
qualia2.nn.modules.conv.
ConvTranspose2d
(in_channels, out_channels, kernel_size, stride=1, padding=1, output_padding=0, dilation=1, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 2D transposed convolution over an input signal composed of several input planes.
- Args:
in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (tuple of int): Size of the convolving kernel stride (tuple of int): Stride of the convolution. Default: 1 padding (tuple of int): Zero-padding added to both sides of the input. Default: 1 output_padding (tuple of int): Zero-padding added to both sides of the output. Default: 0 dilation (tuple of int): Spacing between kernel elements. Default: 1 bias (bool): adds a learnable bias to the output. Default: True
- Shape:
Input: [N, in_channels, H, W]
Output: [N, out_channels, H_out, W_out]
H_out = (H-1)*stride[0]-2*padding[0]+dilation[0]*(kernel_size[0]-1)+1+output_padding[0] W_out = (W-1)*stride[1]-2*padding[1]+dilation[1]*(kernel_size[1]-1)+1+output_padding[1]
-
class
qualia2.nn.modules.conv.
ConvTranspose3d
(in_channels, out_channels, kernel_size, stride=1, padding=1, output_padding=0, dilation=1, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 3D transposed convolution over an input signal composed of several input planes.
- Args:
in_channels (int): Number of channels in the input image out_channels (int): Number of channels produced by the convolution kernel_size (tuple of int): Size of the convolving kernel stride (tuple of int): Stride of the convolution. Default: 1 padding (tuple of int): Zero-padding added to both sides of the input. Default: 1 output_padding (tuple of int): Zero-padding added to both sides of the output. Default: 0 dilation (tuple of int): Spacing between kernel elements. Default: 1 bias (bool): adds a learnable bias to the output. Default: True
- Shape:
Input: [N, in_channels, D, H, W]
Output: [N, out_channels, D_out, H_out, W_out]
qualia2.nn.modules.dropout module¶
-
class
qualia2.nn.modules.dropout.
Dropout
(p=0.5)[source]¶ Bases:
qualia2.nn.modules.module.Module
During training, randomly zeroes some of the elements of the input tensor with probability p using samples from a Bernoulli distribution. Each channel will be zeroed out independently on every forward call.
- Args:
p (float): probability of an element to be zeroed. Default: 0.5
- Shape:
Input: Any
Output: same as input
qualia2.nn.modules.linear module¶
-
class
qualia2.nn.modules.linear.
Bilinear
(in_features1, in_features2, out_features, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a bilinear transformation to the incoming data
- Model:
y = x1*w*x2 + b
- Args:
in_features1 (int): size of each input sample in_features2 (int): size of each second input sample out_features (int): size of each output sample bias (bool): whether to use bias. Default: True
- Shape:
-
class
qualia2.nn.modules.linear.
CLinear
(in_features, out_features, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a complex linear transformation to the incoming data
- Model:
y = x*w.T + b
- Args:
in_features (int): size of each input sample out_features (int): size of each output sample bias (bool): whether to use bias. Default: True
- Shape:
-
class
qualia2.nn.modules.linear.
Linear
(in_features, out_features, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a linear transformation to the incoming data
- Model:
y = x*w.T + b
- Args:
in_features (int): size of each input sample out_features (int): size of each output sample bias (bool): whether to use bias. Default: True
- Shape:
-
class
qualia2.nn.modules.linear.
NoisyLinear
(in_features, out_features, std_init=0.4, factorised_noise=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a linear transformation with parametric noise added to its weights
- Model:
y = (w+sig_w*eps_w)*x+(b+sig_b*eps_b)
- Args:
in_features (int): size of each input sample out_features (int): size of each output sample std_init (float): std for initializing weights factorised_noise (bool):
- Shape:
- Reference:
qualia2.nn.modules.module module¶
-
class
qualia2.nn.modules.module.
Module
[source]¶ Bases:
object
Base class for all neural network modules in qualia.
Module can incoporate Modules, allowing to nest them in a tree structure. Note that a user-defined model must have super().__init__() in the __init__ of the model.
- Examples::
>>> # define a module >>> class Model(nn.Module): >>> def __init__(self): >>> super().__init__() >>> self.conv1 = nn.Conv2d(1, 10, kernel_size=5) >>> self.conv2 = nn.Conv2d(10, 20, kernel_size=5) >>> self.fc1 = nn.Linear(500, 50) >>> self.fc2 = nn.Linear(50, 10) >>> def forward(self, x): >>> x = F.relu(F.maxpool2d(self.conv1(x), (2,2))) >>> x = F.relu(F.maxpool2d(self.conv2(x), (2,2))) >>> x = F.reshape(x,(-1, 500)) >>> x = F.relu(self.fc1(x)) >>> x = self.fc2(x) >>> return x
-
load
(filename, version=0)[source]¶ Loads parameters saved in HDF5 format to the Module.
- Args:
filename (str): specify the filename as well as the path to the file with the file extension. (ex) path/to/filename.qla version (int): version for the way of saving.
-
load_state_dict
(state_dict, name='')[source]¶ Copies parameters from the state_dict into this module.
-
load_state_dict_from_url
(url, version=1)[source]¶ Downloads and copies parameters from the state_dict at the url into this module.
-
save
(filename, dtype='float16', protocol=-1, version=0)[source]¶ Saves internal parameters of the Module.
- Args:
filename (str): specify the filename as well as the saving path without the file extension. (ex) path/to/filename dtype (str): data type to save protocol (int): pickle protocol version (int): version for the way of saving. version 1 takes less disk space.
-
class
qualia2.nn.modules.module.
Sequential
(*args, **kwargs)[source]¶ Bases:
qualia2.nn.modules.module.Module
A sequential container.n Modules will be added to it in the order they are passed in the constructor.
- Examples::
>>> # model can be defiened by adding Modules >>> model = Sequential( >>> nn.Conv2d(1,20,5), >>> nn.ReLU(), >>> nn.Conv2d(20,64,5), >>> nn.ReLU() >>> ) >>> # name for each layers can also be specified >>> model = Sequential( >>> conv1 = nn.Conv2d(1,20,5), >>> relu1 = nn.ReLU(), >>> conv2 = nn.Conv2d(20,64,5), >>> relu2 = nn.ReLU() >>> )
qualia2.nn.modules.normalize module¶
-
class
qualia2.nn.modules.normalize.
BatchNorm1d
(num_features, eps=1e-05, momentum=0.1, track_running_stats=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies Batch Normalization over a 2D or 3D input.
- Args:
num_features (int): C from an expected input of size [N,C] or [N,C,L] eps (float): a value added to the denominator for numerical stability. Default: 1e-5 momentum (float): the value used for the running_mean and running_std computation. Default:0.1 track_running_stats (bool): if True, this module tracks the running mean and std, else this module always uses batch statistics in both training and eval modes.
- Shape:
Input: [N,C] or [N,C,L]
Output: same as input
-
class
qualia2.nn.modules.normalize.
BatchNorm2d
(num_features, eps=1e-05, momentum=0.1, track_running_stats=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies Batch Normalization over a 4D input
- Args:
num_features (int): C from an expected input of size [N,C,H,W] eps (float): a value added to the denominator for numerical stability. Default: 1e-5 momentum (float): the value used for the running_mean and running_std computation. Default:0.1 track_running_stats (bool): if True, this module tracks the running mean and std, else this module always uses batch statistics in both training and eval modes.
- Shape:
Input: [N,C,H,W]
Output: same as input
-
class
qualia2.nn.modules.normalize.
BatchNorm3d
(num_features, eps=1e-05, momentum=0.1, track_running_stats=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies Batch Normalization over a 5D input
- Args:
num_features (int): C from an expected input of size [N,C,D,H,W] eps (float): a value added to the denominator for numerical stability. Default: 1e-5 momentum (float): the value used for the running_mean and running_std computation. Default:0.1 track_running_stats (bool): if True, this module tracks the running mean and std, else this module always uses batch statistics in both training and eval modes.
- Shape:
Input: [N,C,D,H,W]
Output: same as input
qualia2.nn.modules.pool module¶
-
class
qualia2.nn.modules.pool.
AvgPool1d
(kernel_size=2, stride=2, padding=0, dilation=1)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 1D average pooling over an input signal composed of several input planes.
- Args:
kernel_size (int): the size of the window to take a max over stride (int): the stride of the window. Default value is kernel_size padding (int): implicit zero padding to be added on all three sides dilation (int): a parameter that controls the stride of elements in the window
- Shape:
Input: [N,C,W]
Output: [N,C,W_out]
W_out = (W+2*padding-dilation*(kernel_size-1)-1)/stride + 1
-
class
qualia2.nn.modules.pool.
AvgPool2d
(kernel_size=(2, 2), stride=(2, 2), padding=0, dilation=1)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 2D average pooling over an input signal composed of several input planes.
- Args:
kernel_size (tuple of int): the size of the window to take a max over stride (tuple of int): the stride of the window. Default value is kernel_size padding (tuple of int): implicit zero padding to be added on all three sides dilation (tuple of int): a parameter that controls the stride of elements in the window
- Shape:
Input: [N,C,H,W]
Output: [N,C,H_out,W_out]
H_out = (H+2*padding[0]-dilation[0]*(kernel_size[0]-1)-1)/stride[0] + 1 W_out = (W+2*padding[1]-dilation[1]*(kernel_size[1]-1)-1)/stride[1] + 1
-
class
qualia2.nn.modules.pool.
AvgPool3d
(kernel_size=(2, 2, 2), stride=(2, 2, 2), padding=0, dilation=1)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 3D average pooling over an input signal composed of several input planes.
- Args:
kernel_size (tuple of int): the size of the window to take a max over stride (tuple of int): the stride of the window. Default value is kernel_size padding (tuple of int): implicit zero padding to be added on all three sides dilation (tuple of int): a parameter that controls the stride of elements in the window
- Shape:
Input: [N,C,H,W,D]
Output: [N,C,H_out,W_out,D_out]
H_out = (H+2*padding[0]-dilation[0]*(kernel_size[0]-1)-1)/stride[0] + 1 W_out = (W+2*padding[1]-dilation[1]*(kernel_size[1]-1)-1)/stride[1] + 1 D_out = (D+2*padding[2]-dilation[2]*(kernel_size[2]-1)-1)/stride[2] + 1
-
class
qualia2.nn.modules.pool.
GlobalAvgPool1d
[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 1D globl average pooling over an input signal composed of several input planes.
- Shape:
Input: [N,C,W]
Output: [N,C,1]
-
class
qualia2.nn.modules.pool.
GlobalAvgPool2d
[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 2D globl average pooling over an input signal composed of several input planes.
- Shape:
Input: [N,C,H,W]
Output: [N,C,1,1]
-
class
qualia2.nn.modules.pool.
GlobalAvgPool3d
[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 3D globl average pooling over an input signal composed of several input planes.
- Shape:
Input: [N,C,H,W,D]
Output: [N,C,1,1,1]
-
class
qualia2.nn.modules.pool.
MaxPool1d
(kernel_size=2, stride=2, padding=0, dilation=1, return_indices=False)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 1D max pooling over an input signal composed of several input planes.
- Args:
kernel_size (int): the size of the window to take a max over stride (int): the stride of the window. Default value is kernel_size padding (int): implicit zero padding to be added on all three sides dilation (int): a parameter that controls the stride of elements in the window return_indices (bool): if True, will return the max indices along with the outputs.
- Shape:
Input: [N,C,W]
Output: [N,C,W_out]
W_out = (W+2*padding-dilation*(kernel_size-1)-1)/stride + 1
-
class
qualia2.nn.modules.pool.
MaxPool2d
(kernel_size=(2, 2), stride=(2, 2), padding=0, dilation=1, return_indices=False)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 2D max pooling over an input signal composed of several input planes.
- Args:
kernel_size (tuple of int): the size of the window to take a max over stride (tuple of int): the stride of the window. Default value is kernel_size padding (tuple of int): implicit zero padding to be added on all three sides dilation (tuple of int): a parameter that controls the stride of elements in the window return_indices (bool): if True, will return the max indices along with the outputs.
- Shape:
Input: [N,C,H,W]
Output: [N,C,H_out,W_out]
H_out = (H+2*padding[0]-dilation[0]*(kernel_size[0]-1)-1)/stride[0] + 1 W_out = (W+2*padding[1]-dilation[1]*(kernel_size[1]-1)-1)/stride[1] + 1
-
class
qualia2.nn.modules.pool.
MaxPool3d
(kernel_size=(2, 2, 2), stride=(2, 2, 2), padding=0, dilation=1, return_indices=False)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 3D max pooling over an input signal composed of several input planes.
- Args:
kernel_size (tuple of int): the size of the window to take a max over stride (tuple of int): the stride of the window. Default value is kernel_size padding (tuple of int): implicit zero padding to be added on all three sides dilation (tuple of int): a parameter that controls the stride of elements in the window return_indices (bool): if True, will return the max indices along with the outputs.
- Shape:
Input: [N,C,H,W,D]
Output: [N,C,H_out,W_out,D_out]
H_out = (H+2*padding[0]-dilation[0]*(kernel_size[0]-1)-1)/stride[0] + 1 W_out = (W+2*padding[1]-dilation[1]*(kernel_size[1]-1)-1)/stride[1] + 1 D_out = (D+2*padding[2]-dilation[2]*(kernel_size[2]-1)-1)/stride[2] + 1
-
class
qualia2.nn.modules.pool.
MaxUnpool1d
(kernel_size=2, stride=2, padding=0, dilation=1)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 1D max unpooling over an input signal composed of several input planes.
- Args:
kernel_size (int): the size of the window to take a max over stride (int): the stride of the window. Default value is kernel_size padding (int): implicit zero padding to be added on all three sides dilation (int): a parameter that controls the stride of elements in the window
- Shape:
Input: [N,C,W]
Output: [N,C,W_out]
W_out = (W-1)*stride+dilation*(kernel_size-1)+1-2*padding
-
class
qualia2.nn.modules.pool.
MaxUnpool2d
(kernel_size=(2, 2), stride=(2, 2), padding=0, dilation=1)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 2D max unpooling over an input signal composed of several input planes.
- Args:
kernel_size (tuple of int): the size of the window to take a max over stride (tuple of int): the stride of the window. Default value is kernel_size padding (tuple of int): implicit zero padding to be added on all three sides dilation (tuple of int): a parameter that controls the stride of elements in the window
- Shape:
Input: [N,C,H,W]
Output: [N,C,H_out,W_out]
H_out = (H-1)*stride[0]+dilation[0]*(kernel_size[0]-1)+1-2*padding[0] W_out = (W-1)*stride[1]+dilation[1]*(kernel_size[1]-1)+1-2*padding[1]
-
class
qualia2.nn.modules.pool.
MaxUnpool3d
(kernel_size=(2, 2, 2), stride=(2, 2, 2), padding=0, dilation=1)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a 3D max unpooling over an input signal composed of several input planes.
- Args:
kernel_size (tuple of int): the size of the window to take a max over stride (tuple of int): the stride of the window. Default value is kernel_size padding (tuple of int): implicit zero padding to be added on all three sides dilation (tuple of int): a parameter that controls the stride of elements in the window
- Shape:
Input: Input: [N,C,H,W,D]
Output: [N,C,H_out,W_out,D_out]
H_out = (H-1)*stride[0]+dilation[0]*(kernel_size[0]-1)+1-2*padding[0] W_out = (W-1)*stride[1]+dilation[1]*(kernel_size[1]-1)+1-2*padding[1] D_out = (D-1)*stride[2]+dilation[2]*(kernel_size[2]-1)+1-2*padding[2]
qualia2.nn.modules.recurrent module¶
-
class
qualia2.nn.modules.recurrent.
GRU
(input_size, hidden_size, num_layers, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a multi-layer gated recurrent unit (GRU) RNN to an input sequence. Args:
input_size (int): The number of expected features in the input hidden_size (int): The number of features in the hidden state num_layers (int): Number of recurrent layers. bias (bool):adds a learnable bias to the output. Default: True
- Shape:
Input: [seq_len, N, input_size]
Hidden: [num_layers, N, hidden_size]
Output: [seq_len, N, hidden_size]
Hidden: [num_layers, N, hidden_size]
-
class
qualia2.nn.modules.recurrent.
GRUCell
(input_size, hidden_size, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
A gated recurrent unit
- Args:
input_size (int): The number of expected features in the input hidden_size (int): The number of features in the hidden state bias (bool):adds a learnable bias to the output. Default: True
- Shape:
Input: [N, input_size]
Hidden: [N, hidden_size]
Output: [N, hidden_size]
-
class
qualia2.nn.modules.recurrent.
LSTM
(input_size, hidden_size, num_layers, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Long Short Term Memoty
- Args:
input_size (int): The number of expected features in the input hidden_size (int): The number of features in the hidden state num_layers (int): Number of recurrent layers. bias (bool):adds a learnable bias to the output. Default: True
- Shape:
Input: [seq_len, N, input_size]
Hidden_h: [num_layers, N, hidden_size]
Hidden_c: [num_layers, N, hidden_size]
Output: [seq_len, N, hidden_size]
Hidden_h: [num_layers, N, hidden_size]
Hidden_c: [num_layers, N, hidden_size]
-
class
qualia2.nn.modules.recurrent.
LSTMCell
(input_size, hidden_size, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
A Long Short Term Memoty cell
- Args:
input_size (int): The number of expected features in the input hidden_size (int): The number of features in the hidden state bias (bool):adds a learnable bias to the output. Default: True
- Shape:
Input: [N, input_size]
Hidden_h: [N, hidden_size]
Hidden_c: [N, hidden_size]
Output_h: [N, hidden_size]
Output_c: [N, hidden_size]
-
class
qualia2.nn.modules.recurrent.
RNN
(input_size, hidden_size, num_layers, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
Applies a multi-layer Elman RNN with tanh Args:
input_size (int): The number of expected features in the input hidden_size (int): The number of features in the hidden state num_layers (int): Number of recurrent layers. bias (bool):adds a learnable bias to the output. Default: True
- Shape:
Input: [seq_len, N, input_size]
Hidden: [num_layers, N, hidden_size]
Output: [seq_len, N, hidden_size]
Hidden: [num_layers, N, hidden_size]
-
class
qualia2.nn.modules.recurrent.
RNNCell
(input_size, hidden_size, bias=True)[source]¶ Bases:
qualia2.nn.modules.module.Module
An Elman RNN cell with tanh
- Args:
input_size (int): The number of expected features in the input hidden_size (int): The number of features in the hidden state bias (bool):adds a learnable bias to the output. Default: True
- Shape:
Input: [N, input_size]
Hidden: [N, hidden_size]
Output: [N, hidden_size]
qualia2.nn.modules.sparse module¶
-
class
qualia2.nn.modules.sparse.
Embedding
(num_embeddings, embedding_dim)[source]¶ Bases:
qualia2.nn.modules.module.Module
A simple lookup table that stores embeddings of a fixed dictionary and size. Args:
num_embeddings (int): size of the dictionary of embeddings embedding_dim (int): the size of each embedding vector


Review Excerpt: It's a Wonderful Life (1946) by Joe Barlow (c) Copyright 1999, all rights reserved
With our first glimpse of Bedford Falls, the idyllic, snow-kissed setting of Frank Capra's It's a Wonderful Life, we know something is amiss. It's Christmas Eve, but there's no joy in the air--only a sense of tension and foreboding. There are voices in the night; from every home we hear the prayers of townsfolk, requesting salvation for one of their own--George Bailey, the beloved secretary of the town's Savings and Loan office. His name is chanted like a mantra, hovering on the lips of every resident. "Please, Lord," they plead, "help George Bailey."
Bailey (James Stewart) is a man whose life hasn't turned out the way he envisioned it. He's no longer the wide-eyed boy who dreamed of travel, exploration, and--most importantly--making a difference in the world; now in his late twenties, he's deeply entrenched in a job he despises. George is kind to everyone, a trait responsible for his current predicament. He simply can't say no. To anyone. For any reason. He loans money to friends when he can barely afford to buy clothes for his children. He finds himself deaf in one ear after risking his life to save his brother from drowning. He abandons his dream of going to college when his father's business needs him. Everyone, it seems, owes at least a portion of their well-being to George's selflessness.
To see the complete review, please visit: http://www.ipass.net/~jbarlow/cc101.htm
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


Hey, Google, pick me!
That's a sorry attempt at SEO.
This is part of an assignment over at Mozilla's
Webmaking 101
.
This is only the beginning...


15 February 2016
This is a relatively short tutorial to JMeter tool
The aim is to give an overview of the tool - it will not cover everything
We will focus here on using the GUI, it is still possible to use CLI only
It is possible to record scenarios: simply browse your website with your web browser configured with JMeter, and replay your recorded scenarios with hundreds of VUSers.
Official website: jmeter.apache.org/download_jmeter.cgi
Download the latest binary in zip / tgz format
user : ~ > mkdir ~/Sandbox
user : ~ > cp Downloads/apache-jmeter-*.tgz ~/Sandbox/
user : ~ > cd Sandbox/
user : ~/Sandbox > tar -xvf apache-jmeter-*.tgz
user : ~/Sandbox > cd apache-jmeter-*/
user : ~/Sandbox > chmod 755 ./bin/jmeter
user : ~/Sandbox > ./bin/jmeter #if you are using JMeter without proxy
user : ~/Sandbox > ./bin/jmeter -H proxy-addr -P proxy-port #with proxy
Note: if your proxy is localhost, just use -H localhost
(http://<IP_ADDRESS> & http://localhost won't actually work...)
"jmeter.bat"
If you are using a proxy:
jmeter.bat -H proxy-addr -P proxy-port
Troubleshooting: see jmeter.apache.org/usermanual/get-started.html
Need more configuration ? See: configuration details
Basically, we will hit an url with a certain number of VUsers to test the application
We will use this app to run our first JMeter test
curl http://localhost:8888/primesui/check
http://<IP_ADDRESS>:8888/primesui/
with your favorite browser, you should see the following webpage (see below)You will now setup a proxy with JMeter and this proxy will record any action you have on PrimesUI:
You will be able afterward to replay all the recorded actions with VUsers
First, create a "Thread Group" by clicking right on "Test Plan"
Click on the Start button on the Script Recorder to start the recorder
%JMETER_HOME%/bin/
Good news everyone, your browser is now ready! Simply hit "http://<IP_ADDRESS>:8888/primesui/", browse the page, hit several times "http://<IP_ADDRESS>:8888/primesui/check", have some fun with urls...
See screenshot below
In this configuration, each VUsers will basically hit /primesui/check a hundred times!
Take a look at:
Better interfaces & reports sexier, but theses tools are based on JMeter - no big news
The report generated is very precise and dynamic
Gatling is asynchronous => it is able to simulate a lot of VUs!
I hope you'll find this tutorial useful!


Hardin:
Ha! An adventurer after my own heart... Don't try to satisfy your curiosity in one gulp, though.
If we make progress with these experiments, I'm sure all of your questions will be answered.
At this stage in my research, I absolutely require Stabilized Ectoplasm.
I have learned that it can be obtained from Dark Elf Magister Errickin in Hunters Village, but I cannot leave my experiment at the moment.
Will you go in my place, obtain it and bring it back here?


Open-source collaboration to improve a community-beloved real-time strategy game, Built in C++ and C.
A graphical Android client and its server (both built in Java) for interactive family history events and relationships.
An ant colony optimization approach (built in C#) to approximate solutions to the TSP problem, using fine-tuned heuristic coefficient schemes found through extensive comparative permutation testing. Analysis against other approaches.


Derek Eder
@derekeder
Whaaa 150 people on http://ClearStreets.org right now. Where did you come from????
2/2/2015, 11:18:03 AM
Favs: 6
Retweets: 0
link← @derekeder Twitter archive
Derek Eder
@derekeder
Whaaa 150 people on http://ClearStreets.org right now. Where did you come from????
2/2/2015, 11:18:03 AM
Favs: 6
Retweets: 0
link


Alexandra Stricklin
Alexandra Stricklin
About
(current)
Portfolio
Contact
Contact
Name
Email address
Message
Submit
Connect with Me


You have a comment textarea below, and want to mimic a social network’s mentions functionality.
The comment that the user types, may contain mentions of other users. We would like to store, not only the mentions but the mentioned user’s email as well in the comment text in the server. This way later on, when building search functionality we can search the comments by username or email, and any device that calls the server asking for comments, can get all the mention data in one request. Therefore, your task is to convert the comment typed by the user into a comment with mentions and emails.
In the index.js
file, we have subscribed the function updateCommentText
to the input
event in the comment textarea. Therefore, this function will be called everytime the user changes the input in the comment textarea.
This updateCommentText
function calls parseCommentText
everytime, and writes the result of that function as innerText in the <div id="parsed-server-comment">
.
We also have a global variable called data
, which is an object simulating our database.
It contains { 'mention_key': 'mention_email' }
Your mission, if you choose to accept it (:P), is to change the code in parseCommentText
so that it returns the comment text enriched with the email data of each user mentioned like so:
After you have done the last part, you should see 2 boxes being filled with your “server” data. In this task, you will change the code of the parseServerCommentData
function so that the innerHTML that is being set in the #parsed-server-comment
div shows the comment text just as the user typed it, but with the mentions in blue as links to “mailto:email”.
Tips: