|
| static string | GetOutputFilename (string baseName="InputAnimation", bool appendTimestamp=true) |
| | Generate a file name for export. More...
|
| |
| static void | WriteHeader (BinaryWriter writer) |
| | Write a header for the input animation file format into the stream. More...
|
| |
| static void | ReadHeader (BinaryReader reader, out int fileVersionMajor, out int fileVersionMinor) |
| | Write a header for the input animation file format into the stream. More...
|
| |
| static void | WriteFloatCurve (BinaryWriter writer, AnimationCurve curve, float startTime) |
| | Serialize an animation curve with tangents as binary data. More...
|
| |
| static void | ReadFloatCurve (BinaryReader reader, AnimationCurve curve) |
| | Deserialize an animation curve with tangents from binary data. More...
|
| |
| static void | WriteBoolCurve (BinaryWriter writer, AnimationCurve curve, float startTime) |
| | Serialize an animation curve as binary data, ignoring tangents. More...
|
| |
| static void | ReadBoolCurve (BinaryReader reader, AnimationCurve curve) |
| | Deserialize an animation curve from binary data, ignoring tangents. More...
|
| |
| static void | WriteFloatCurveArray (BinaryWriter writer, AnimationCurve[] curves, float startTime) |
| | Serialize an array of animation curves with tangents as binary data. More...
|
| |
| static void | ReadFloatCurveArray (BinaryReader reader, AnimationCurve[] curves) |
| | Deserialize an array of animation curves with tangents from binary data. More...
|
| |
| static void | WriteBoolCurveArray (BinaryWriter writer, AnimationCurve[] curves, float startTime) |
| | Serialize an array of animation curves as binary data, ignoring tangents. More...
|
| |
| static void | ReadBoolCurveArray (BinaryReader reader, AnimationCurve[] curves) |
| | Deserialize an array of animation curves from binary data, ignoring tangents. More...
|
| |
| static void | WriteMarkerList (BinaryWriter writer, List< InputAnimationMarker > markers, float startTime) |
| | Serialize a list of markers. More...
|
| |
| static void | ReadMarkerList (BinaryReader reader, List< InputAnimationMarker > markers) |
| | Deserialize a list of markers. More...
|
| |
Functions for serializing input animation data to and from binary files.


OBReadDirectDebit1_Data_DirectDebit
- DirectDebitId : String
A unique and immutable identifier used to identify the direct debit resource. This identifier has no meaning to the account owner.
- DirectDebitStatusCode : String
Specifies the status of the direct debit in code form.
- Enum:
- Active
- Inactive
- MandateIdentification : String
Direct Debit reference. For AUDDIS service users provide Core Reference. For non AUDDIS service users provide Core reference if possible or last used reference.
- Name : String
Name of Service User.
- PreviousPaymentAmount : OBReadDirectDebit1_Data_PreviousPaymentAmount
- PreviousPaymentDateTime : Date
Date of most recent direct debit collection.All dates in the JSON payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00


Spec
MMap StringString that is stored in external memory using direct memory mapping.
String that is stored in external memory using direct memory mapping.
| Extends | String |
|---|---|
| All Extended | String |
| All Impl'd | AssignableConcept, ContainerConcept, DestructibleConcept, ForwardContainerConcept, RandomAccessContainerConcept, ReversibleContainerConcept, SegmentableConcept, StringConcept, TextConcept |
| Defined in | <seqan/file.h> |
| Signature |
template <typename TValue[, typename TConfig]>
class String<TValue, MMap<TConfig> >;
|
Template Parameters
TValue |
The value type to use for the items/characters. |
|---|---|
TConfig |
The configuration to use for the underlying file. Default: MMapConfig. |
Member Function Overview
Member Functions Inherited From String
Member Functions Inherited From AssignableConcept
Member Functions Inherited From RandomAccessContainerConcept
Interface Function Overview
-
bool close(str);
Close the MMapString. -
void flush(str);
Waits for all open read/write requests to complete. -
bool mmapAdvise(str, scheme[, beginPos, size]);
Call advise function for memory mapped files. -
bool open(str, fileName[, openMode]);
Open the MMapString's underlying file from a path. -
bool openTemp(str);
Open an MMapString using an temporary file.
Interface Functions Inherited From String
Interface Functions Inherited From AssignableConcept
Interface Functions Inherited From ContainerConcept
writeValue
write
begin
end
length
empty
swap
getObjectId
moveValue
append
appendValue
shrinkToFit
directionIterator
Interface Functions Inherited From RandomAccessContainerConcept
Interface Functions Inherited From SegmentableConcept
Interface Functions Inherited From StringConcept
iter
append
appendValue
front
back
resize
clear
erase
eraseFront
eraseBack
capacity
computeGenerousCapacity
insert
insertValue
replace
Interface Functions Inherited From TextConcept
Interface Metafunction Overview
Interface Metafunctions Inherited From ContainerConcept
DefaultGetIteratorSpec
DefaultIteratorSpec
Difference
DirectionIterator
GetValue
Iterator
Position
Reference
Size
Value
Interface Metafunctions Inherited From SegmentableConcept
Interface Metafunctions Inherited From TextConcept
Detailed Description
The MMap String enables to access sequences larger than the available physical memory (RAM) by using external memory (e.g. Hard disk, Network storage, ...) mapped into memory. The size of the string is limited by external memory and the logical address space (4GB on a 32bit OS). See the String constructor for more details.
This string also supports fast appending and removing of values at the end.
Member Functions Detail
String::String();
String::String(file);
String::String(fileName[, openMode]);
Constructor.
Parameters
file
|
The File to use for reading and writing. You must ensture that file is open as the string will not call open and close on the file. |
|---|---|
fileName
|
The path to open. Type: char const * |
openMode
|
The open mode. |
Data Races
Thread safety unknown!
Interface Functions Detail
bool close(str);
Close the MMapString.
Parameters
str
|
The MMapString to close the file of. |
|---|
Returns
bool |
true if the closing succeeded, false otherwise. |
|---|
Data Races
Thread safety unknown!
void flush(str);
Waits for all open read/write requests to complete.
Parameters
str
|
The MMapString to flush. |
|---|
Data Races
Thread safety unknown!
bool mmapAdvise(str, scheme[, beginPos, size]);
Call advise function for memory mapped files.
Parameters
str
|
The MMapString to call advise in. |
|---|---|
scheme
|
The memory access scheme to use. Type: FileMappingAdvise. |
beginPos
|
Begin position in the string for the advise call. |
size
|
Size of the range used for the advise call. |
Returns
bool |
true if the advise was successful, false otherwise. |
|---|
Data Races
Thread safety unknown!
bool open(str, fileName[, openMode]);
Open the MMapString's underlying file from a path.
Parameters
str
|
The MMapString to open. |
|---|---|
fileName
|
Path to the file to open. Type: char const *. |
openMode
|
The open mode. Type: int. |
Returns
bool |
true if the operation succeeded and false otherwise. |
|---|
Data Races
Thread safety unknown!
bool openTemp(str);
Open an MMapString using an temporary file.
Parameters
str
|
The MMapString to open using temporary file. |
|---|
Returns
bool |
true if opening succeeded, false otherwise. |
|---|
Data Races
Thread safety unknown!


{% extends 'base.html' %} {% load static %} {% block head_title %}500 Oops {% endblock %} {% block body %}
It seems like you found an error. Please reach us out at {{ h_contact_email|urlize }} if the problem persists.
{% if h_repo %}Or you can open an issue here.
{% endif %}


Saket holds a superior knowledge of Constitution related matters, including service disputes. He has a vast experience in criminal cases, which includes economic offences and corruption cases. His other areas of practice lie in property disputes, essential commodities, matrimonial and family disputes. He has the experience of appearing before Patna High Court, Debt Recovery Tribunal, various District & Sessions Courts, various District Consumer Forums and Bihar State Consumer Disputes Redressal Commission.
Shantanu has a wide array of expertise in matters related to corporate and banking law. He has an extensive experience in commercial contracts, due diligence, consumer disputes and Alternative Disputes Resolution including arbitration. He appears regularly before Patna High Court, various District & Sessions Courts, Debt Recovery Tribunal, various District Consumer Forums and Bihar State Consumer Disputes Redressal Commission. In addition to the above, he has worked under several legal luminaries in Supreme Court, Jharkhand High Court, Madras High Court, Karnataka High Court and Jabalpur High Court. He has presented his research in several conferences including ICLAE, 2016, organized by IIT Kanpur, IIM Ahm and GNLU, and YSI Plenary, 2016 held at Budapest, Hungary. At present, he is on leave to pursue his LLM in Comparative Law, Economics and Finance at IUC Turin, Italy.
Baua specializes are in Intellectual Property Laws and Environment Laws. He appears before various District & Sessions Courts, various District Consumer Forums, Bihar State Consumer Disputes Redressal Commission and Patna High Court. Also, he has the exposure of Supreme Court, Debt Recovery Tribunal, National Green Tribunal, National Consumer Disputes Redressal Commission, Delhi High Court and Odisha High Court.


New note
Save
Cancel
What did we do well?
{{ note.title }}
{{ note.text }}
What did we learn?
{{ note.title }}
{{ note.text }}
What should we do differently next time?
{{ note.title }}
{{ note.text }}
What still puzzles us?
{{ note.title }}
{{ note.text }}


--- layout: post title: "Peano catamorphism" description: "The catamorphism for Peano numbers involves a base value and a successor function." date: 2019-05-13 5:10 UTC tags: [Software Design, Haskell] --- {% include JB/setup %}
{{ page.description }}
This article is part of an article series about catamorphisms. A catamorphism is a universal abstraction that describes how to digest a data structure into a potentially more compact value.
This article presents the catamorphism for natural numbers, as well as how to identify it. The beginning of the article presents the catamorphism in C#, with examples. The rest of the article describes how I deduced the catamorphism. This part of the article presents my work in Haskell. Readers not comfortable with Haskell can just read the first part, and consider the rest of the article as an optional appendix.
In this article, I model natural numbers using Peano's model, and I'll reuse the Church-encoded implementation you've seen before. The catamorphism for INaturalNumber
is:
public static T Cata<T>(this INaturalNumber n, T zero, Func<T, T> succ) { return n.Match(zero, p => p.Cata(succ(zero), succ)); }
Notice that this is an extension method on INaturalNumber
, taking two other arguments: a zero
argument which will be returned when the number is zero, and a successor function to return the 'next' value based on a previous value.
The zero
argument is the easiest to understand. It's simply passed to Match
so that this is the value that Cata
returns when n
is zero.
The other argument to Match
must be a Func<INaturalNumber, T>
; that is, a function that takes an INaturalNumber
as input and returns a value of the type T
. You can supply such a function by using a lambda expression. This expression receives a predecessor p
as input, and has to return a value of the type T
. The only function available in this context, however, is succ
, which has the type Func<T, T>
. How can you make that work?
As is often the case when programming with generics, it pays to follow the types. A Func<T, T>
requires an input of the type T
. Do you have any T
objects around?
The only available T
object is zero
, so you could call succ(zero)
to produce another T
value. While you could return that immediately, that'd ignore the predecessor p
, so that's not going to work. Another option, which is the one that works, is to recursively call Cata
with succ(zero)
as the zero
value, and succ
as the second argument.
What this accomplishes is that Cata
keeps recursively calling itself until n
is zero. The zero
object, however, will be the result of repeated applications of succ(zero)
. In other words, succ
will be called as many times as the natural number. If n
is 7, then succ
will be called seven times, the first time with the original zero
value, the next time with the result of succ(zero)
, the third time with the result of succ(succ(zero))
, and so on. If the number is 42, succ
will be called 42 times.
You can implement all the functionality you saw in the article on Church-encoded natural numbers. You can start gently by converting a Peano number into a normal C# int
:
public static int Count(this INaturalNumber n) { return n.Cata(0, x => 1 + x); }
You can play with the functionality in C# Interactive to get a feel for how it works:
> NaturalNumber.Eight.Count() 8 > NaturalNumber.Five.Count() 5
The Count
extension method uses Cata
to count the level of recursion. The zero
value is, not surprisingly, 0
, and the successor function simply adds one to the previous number. Since the successor function runs as many times as encoded by the Peano number, and since the initial value is 0
, you get the integer value of the number when Cata
exits.
A useful building block you can write using Cata
is a function to increment a natural number by one:
public static INaturalNumber Increment(this INaturalNumber n) { return n.Cata(One, p => new Successor(p)); }
This, again, works as you'd expect:
> NaturalNumber.Zero.Increment().Count() 1 > NaturalNumber.Eight.Increment().Count() 9
With the Increment
method and Cata
, you can easily implement addition:
public static INaturalNumber Add(this INaturalNumber x, INaturalNumber y) { return x.Cata(y, p => p.Increment()); }
The trick here is to use y
as the zero
case for x
. In other words, if x
is zero, then Add
should return y
. If x
isn't zero, then Increment
it as many times as the number encodes, but starting at y
. In other words, start with y
and Increment
x
times.
The catamorphism makes it much easier to implement arithmetic operation. Just consider multiplication, which wasn't the simplest implementation in the previous article. Now, it's as simple as this:
public static INaturalNumber Multiply(this INaturalNumber x, INaturalNumber y) { return x.Cata(Zero, p => p.Add(y)); }
Start at 0
and simply Add(y)
x
times.
> NaturalNumber.Nine.Multiply(NaturalNumber.Four).Count() 36
Finally, you can also implement some common predicates:
public static IChurchBoolean IsZero(this INaturalNumber n) { return n.Cata<IChurchBoolean>(new ChurchTrue(), _ => new ChurchFalse()); } public static IChurchBoolean IsEven(this INaturalNumber n) { return n.Cata<IChurchBoolean>(new ChurchTrue(), b => new ChurchNot(b)); } public static IChurchBoolean IsOdd(this INaturalNumber n) { return new ChurchNot(n.IsEven()); }
Particularly IsEven
is elegant: It considers zero
even, so simply uses a new ChurchTrue()
object for that case. In all other cases, it alternates between false and true by negating the predecessor.
> NaturalNumber.Three.IsEven().ToBool()
false
It seems convincing that we can use Cata
to implement all the other functionality we need. That seems to be a characteristic of a catamorphism. Still, how do we know that Cata
is, in fact, the catamorphism for natural numbers?
As in the previous article, I'll use Fix
and cata
as explained in Bartosz Milewski's excellent article on F-Algebras. The NatF
type comes from his article as well:
data NatF a = ZeroF | SuccF a deriving (Show, Eq, Read) instance Functor NatF where fmap _ ZeroF = ZeroF fmap f (SuccF x) = SuccF $ f x
You can use the fixed point of this functor to define numbers with a shared type.
At this point, you have two out of three elements of an F-Algebra. You have an endofunctor (NatF
), and an object a
, but you still need to find a morphism NatF a -> a
.
As in the previous article, start by writing a function that will become the catamorphism, based on cata
:
natF = cata alg where alg ZeroF = undefined alg (SuccF predecessor) = undefined
While this compiles, with its undefined
implementations, it obviously doesn't do anything useful. I find, however, that it helps me think. How can you return a value of the type a
from the ZeroF
case? You could pass an argument to the natF
function:
natF z = cata alg where alg ZeroF = z alg (SuccF predecessor) = undefined
In the SuccF
case, predecessor
is already of the polymorphic type a
, so instead of returning a constant value, you can supply a function as an argument to natF
and use it in that case:
natF :: a -> (a -> a) -> Fix NatF -> a natF z next = cata alg where alg ZeroF = z alg (SuccF predecessor) = next predecessor
This works. Since cata
has the type Functor f => (f a -> a) -> Fix f -> a
, that means that alg
has the type f a -> a
. In the case of NatF
, the compiler infers that the alg
function has the type NatF a -> a
, which is just what you need!
For good measure, I should point out that, as usual, the above natF
function isn't the only possible catamorphism. Trivially, you can flip the order of the arguments, and this would also be a catamorphism. These two alternatives are isomorphic.
The natF
function identifies the Peano number catamorphism, which is equivalent to the C# representation in the beginning of the article. I called the function natF
, because there's a tendency in Haskell to name the 'case analysis' or catamorphism after the type, just with a lower-case initial letter.
A catamorphism can be used to implement most (if not all) other useful functionality, like all of the above C# functionality. In fact, I wrote the Haskell code first, and then translated my implementations into the above C# extension methods. This means that the following functions apply the same reasoning:
evenF :: Fix NatF -> Fix BoolF evenF = natF trueF notF oddF :: Fix NatF -> Fix BoolF oddF = notF . evenF incF :: Fix NatF -> Fix NatF incF = natF oneF $ Fix . SuccF addF :: Fix NatF -> Fix NatF -> Fix NatF addF x y = natF y incF x multiplyF :: Fix NatF -> Fix NatF -> Fix NatF multiplyF x y = natF zeroF (addF y) x
Here are some GHCi usage examples:
Prelude Boolean Nat> evenF eightF Fix TrueF Prelude Boolean Nat> toNum $ multiplyF sevenF sixF 42
The toNum
function corresponds to the above Count
C# method. It is, again, based on cata
. You can use ana
to convert the other way:
toNum :: Num a => Fix NatF -> a toNum = natF 0 (+ 1) fromNum :: (Eq a, Num a) => a -> Fix NatF fromNum = ana coalg where coalg 0 = ZeroF coalg x = SuccF $ x - 1
This demonstrates that Fix NatF
is isomorphic to Num
instances, such as Integer
.
The catamorphism for Peano numbers is a pair consisting of a zero value and a successor function. The most common description of catamorphisms that I've found emphasise how a catamorphism is like a fold; an operation you can use to reduce a data structure like a list or a tree to a single value. This is what happens here, but even so, the Fix NatF
type isn't a Foldable
instance. The reason is that while NatF
is a polymorphic type, its fixed point Fix NatF
isn't. Haskell's Foldable
type class requires foldable containers to be polymorphic (what C# programmers would call 'generic').
When I first ran into the concept of a catamorphism, it was invariably described as a 'generalisation of fold'. The examples shown were always how the catamorphism for linked list is the same as its fold. I found such explanations unhelpful, because I couldn't understand how those two concepts differ.
The purpose with this article series is to show just how much more general the abstraction of a catamorphism is. In this article you saw how an infinitely recursive data structure like Peano numbers have a catamorphism, even though it isn't a parametrically polymorphic type. In the next article, though, you'll see the first example of a polymorphic type where the catamorphism coincides with the fold.
Next: Maybe catamorphism.


Geocoder.us can now calculate distances between two coordinates, or between two zip codes::
http://username:password@geocoder.us/member/service/distance?lat1=38&lat2=39&lng1=-122&lng2=-123
or with the free service (but throttled to one request per 15 seconds):
http://geocoder.us/service/distance?lat1=38&lat2=39&lng1=-122&lng2=-123
Fetching the above URL (go ahead, click on it!) yields the following:
(38, -122) to (39, -123) = 87.7188 miles
http://username:password@geocoder.us/member/service/distance?zip1=95472&zip2=94305
or with the free service (but throttled to one request per 15 seconds):
http://geocoder.us/service/distance?zip1=95472&zip2=94305
Fetching the above URL (go ahead, click on it!) yields the following:
95472, Sebastopol, CA, (38.393314, -122.83666) to 94305, Stanford, CA, (37.427039, -122.16496) = 76.13 miles
This is just a reworking of code I first wrote on Jan 29, 1998. You Can run that old code. It allows you to enter multiple zip codes. That was ten years and a day ago.
Please let me know<EMAIL_ADDRESS>if you'd like this in a different format, or if you have other needs for 'utility' type geo functions


Register an Account
Email address
WalaAlarm Id
Password
Confirm password
Login Page
Forgot Password?


pipeline.common¶
Common Pipelines for easy reuse.
-
class
pipeline.common.
AbortIfTrue
(*args, **kwargs)[source]¶ Aborts the entire pipeline if the supplied argument is True.
-
class
pipeline.common.
All
(*args, **kwargs)[source]¶ Returns True if all of the values are True.
Returns False if there are no values present.
-
class
pipeline.common.
Append
(*args, **kwargs)[source]¶ Combine together values into a list.
- Args:
- *args: One or more values.
- Returns:
- A single list of all values appended to the same list. Length of the output list matches the length of the input list.
-
class
pipeline.common.
Complement
(*args, **kwargs)[source]¶ Returns the boolean complement of the values.
-
class
pipeline.common.
Concat
(*args, **kwargs)[source]¶ Concatenates strings together using a join character.
- Args:
- *args: One or more strings. separator: Keyword argument only; the string to use to join the args.
- Returns:
- The joined string.
-
class
pipeline.common.
Delay
(*args, **kwargs)[source]¶ Waits N seconds before completion.
- Args:
- seconds: Keyword argument only. The number of seconds to wait. Will be
- rounded to the nearest whole second.
- Returns:
- How long this delay waited.
-
class
pipeline.common.
Dict
(*args, **kwargs)[source]¶ Returns a dictionary with the supplied keyword arguments.
-
class
pipeline.common.
EmailToContinue
(**kwargs)[source]¶ Emails someone asking if the pipeline should continue.
When the user clicks “Approve”, the pipeline will return True. When the user clicks “Disapprove”, the pipeline will return False.
Supply normal mail.EmailMessage parameters, plus two additional parameters:
approve_html: HTML to show to the user after clicking approve. disapprove_html: HTML to show to the user after clicking disapprove.Additionally, the ‘body’ and ‘html’ keyword arguments are treated as Python dictionary templates with the keywords ‘approval_url’ and ‘disapprove_url’, which let you place those links in your email however you want (as long as clicking the links results in a GET request). The approve/disapprove URLs are relative paths (e.g., ‘/relative/foo/bar’), so you must connect them to whatever hostname you actually want users to access the callback on with an absolute URL.
A random token is used to secure the asynchronous action.
-
class
pipeline.common.
Extend
(*args, **kwargs)[source]¶ Combine together lists and tuples into a single list.
- Args:
- *args: One or more lists or tuples.
- Returns:
- A single list of all supplied lists merged together in order. Length of the output list is the sum of the lengths of all input lists.
-
class
pipeline.common.
Format
(*args, **kwargs)[source]¶ Formats a string with formatting arguments.
-
class
pipeline.common.
Ignore
(*args, **kwargs)[source]¶ Mark the supplied parameters as unused outputs of sibling pipelines.
-
class
pipeline.common.
Intersection
(*args, **kwargs)[source]¶ Returns only those items belonging to all of the supplied lists.
Each argument must be a list. No individual items are permitted.
-
class
pipeline.common.
List
(*args, **kwargs)[source]¶ Returns a list with the supplied positional arguments.
-
class
pipeline.common.
Log
(*args, **kwargs)[source]¶ Logs a message, just like the Python logging module.
-
class
pipeline.common.
Return
(*args, **kwargs)[source]¶ Causes calling generator to have the supplied default output value.
Only works when yielded last!


The widget is a detailed model implementation of the 2D parallax effect. It is not limited by the count of the layers, nor their type, size or speed.
The parallax effect can be applied on any level in the DOM-tree. For best results in terms of smoothness, please use it within a "scrollable" widget which is part of the main JCCUI.
The parallax layers are not limited to be only images, they can be anything HTML5 supports including canvas, video and even widgets or complete forms.
The prallax implementation consists of a parallax viewport and parallax layers. Thus, this documentation will cover the parallax and parallax-layer widgets together as they form the effect and cannot exclude each other.

All options are accessible throught the getOption and setOptions method of the widget [topmostMarkupElement.WIDGET] object. After setting any of the options for the WIDGET widget, it will be unenhanced and enhanced to apply the newly set options.
Please use the theme method of the widget to read the current theme.
HTML-Markup notation: data-theme
JavaScript notation: theme
The theme name as string to be used for the widget. Possible values 'a' or 'b'. By default, 'a' stays for dark theme, while 'b' for the bright theme. If omitted, the widget will inherit the theme from its parent. Not used by the parallax itself, but can be eventually used by widgets placed in the parallax layers.
HTML-Markup notation: data-direction
JavaScript notation: direction
Possible values:
The parallax will handle only the horizontal positioning of the viewport.
The parallax will handle only the vertical positioning of the viewport.
The parallax will handle the positioning of the viewport in all directions.
Default is: vertical
HTML-Markup notation: data-ortho-center
JavaScript notation: orthoCenter
The HTML-window (viewport) coordinates (for the x- and y-axes) at which all the layers have no position offset e.g. are located according to the pure HTML-rules provided and NOT moved by the parallax engine. Different value types can be combined e.g. "center 20%", "150 top", ect. Please note that if you resize the browser window, the ortho center will change as well if using relational values - predefined or percentage - and will NOT change if the ortho center uses absolute values. Negative values are allowed.
Possible values for each axis (space delimited) e.g. "center center", "50% 10%", "5 100" and so on:
The x-axis of the ortho center is the left most part of the HTML-window.
The x-axis of the ortho center is the right most part of the HTML-window.
The y-axis of the ortho center is the top most part of the HTML-window.
The y-axis of the ortho center is the bottom most part of the HTML-window.
The corresponding axis of the ortho center is at the middle of the HTML-window width or height respectively.
The corresponding axis of the ortho center is a percentage fraction of the HTML-window width or height respectively.
The corresponding axis of the ortho center is at absolute position within the HTML-window width or height respectively.
Default is: center center
HTML-Markup notation: data-ortho-offset
JavaScript notation: orthoOffset
An absolute value offset for the ortho center - sort of fine tunning for the ortho offset. For example, let's take orthoOffset = "center center" and orthoOffset = "5 10". This means that the final ortho center will be 5 pixels right from half the width of the HTML-window and 10 pixels down from the half height of the HTML-window. Negative values are allowed.
Default is: 0 0
HTML-Markup notation: data-speed
JavaScript notation: speed
A percentage representation how fast the particular layer should move according to the parallax viewport. A value of 0 means that the particular layer will not move at all when the parallax viewport moves. A value of 100 means that the particular layer will move exactly the same distance as the parallax viewport moved. Values greater than 100 will force the particular layer to move faster than the parallax viewport. Negative values will force the particular layer to move in the opposite direction of the movement of the parallax viewport.
The general rule is that if a layer is defined later in the HTML-code, it is optically closer to the observer and thus should have larger speed value.
Default is: 0 0
HTML-Markup notation: data-position
JavaScript notation: position
The HTML-window (viewport) coordinates (for the x- and y-axes) at which the particular layer is initially located. You can use the ortho center of the parallax as a reference point (zero point) when you define your parallax model so that at the given ortho center and position the layer is located without offset - as if observed perpendicularly. Different value types can be combined e.g. "center 20%", "150 top", ect. Negative values are allowed.
Possible values for each axis (space delimited) e.g. "center center", "50% 10%", "5 100" and so on:
The x-axis of the position (the left edge of the layer DIV) is at the left most part of the HTML-window.
The x-axis of the position (the right edge of the layer DIV) is at the right most part of the HTML-window.
The y-axis of the position (the top edge of the layer DIV) is at the top most part of the HTML-window.
The y-axis of the position (the bottom edge of the layer DIV) is at the bottom most part of the HTML-window.
The center of the layer DIV is the center of the HTML-window width or height respectively/
The position of the corresponding edge (left or top) of the layer DIV is a percentage fraction of the HTML-window width or height respectively.
The position of the corresponding edge (left or top) of the layer DIV is at absolute position within the HTML-window width or height respectively.
Default is: center center
HTML-Markup notation: data-offset
JavaScript notation: offset
An absolute value offset for the layer position - sort of fine tunning for the layer position. For example, let's take position = "center center" and offset = "5 10". This means that the final layer position will be 5 pixels right from half the width of the HTML-window and 10 pixels down from the half height of the HTML-window. Negative values are allowed.
Default is: 0 0
HTML-Markup notation: data-size
JavaScript notation: size
Size of the corresponding layer (in terms of HTML-window coordinates). Depending on the size value specified, the layer DIV may be scaled to match the desired criteria.
Possible values can be single or space delimited per axis. Omitted values (except contain and cover) fot the y-axis default to auto. List of the possible values:
The whole layer DIV is maximized as much as possible to fit the HTML-window and preserve the original aspect ratio.
The longest side of the layer DIV is stretched to match the HTML-window width or height respectively. The aspect ratio is preserved. Thus, the other edge if the layer DIV is scaled accordingly. However, it might not be always visible depending on the original layer DIV and HTML-window sizes. This value ensures that the whole HTML-window are is covered.
When specified for the corresponding axis, the original size of the layer DIV (as difined in the HTML code) will be used.
Width or height of the layer DIV percentage fraction referred to the HTML-window width or height respectively.
Width or height of the layer DIV in pixels. Please note that the layer DIV should already have non-zero dimensions (width and height).
Default is: 100% 100%
The method is exposed for overriding - if one wants to add more effects over the parallax layer like extra scaling, opacity, rotations and so on.
The layers, which are not loaded (enhanced by the JCC engine) yet, will not be affected.
Fired by each parallax layer once it has been enhanced by the JCC engine.
Fired by the parallax once all parallax layers are loaded.
Please click on the links bellow to see the different live examples. All links will open in a new window. Once a link has opened, you can view the source code of the example.


2 pedestrians struck, 1 dies in early morning accident
by EndPlaySEEKONK, Mass. (AP) - A man has died after being struck by a vehicle in Seekonk, Massachusetts.
Police and emergency medical responders were called shortly after midnight on Sunday morning for a report of two pedestrians struck on Oak Hill Avenue. One man was taken to Rhode Island Hospital, where he was pronounced dead.
Police say the second man refused to be transported to a hospital from the scene and later sought medical treatment on his own.
No charges have been filed in the case. Police say the driver of the vehicle is cooperating with investigators.
The identities of those involved in the incident have not yet been released.


Interface IOnlineEftposClient
Primary interface for the OnlineEftposClient.
Inherited Members
Namespace: Yort.OnlineEftpos
Assembly: Yort.OnlineEftpos.dll
Syntax
public interface IOnlineEftposClient : IDisposable
Remarks
Use of this interface makes it possible to mock/stub/fake out the OnlineEftposClient instance in application code for testing purposes.
Properties
| Improve this Doc View SourceApiEnvironment
Returns a value indicating the sandbox or production environment of the Online Eftpos API this client will connect to.
Declaration
OnlineEftposApiEnvironment ApiEnvironment { get; }
Property Value
| Type | Description |
|---|---|
| OnlineEftposApiEnvironment |
Remarks
This property is read only, the value is provided when the object is instantiated via the constructor.
ApiVersion
Returns a value indicating the version of the Online Eftpos API this client will connect to.
Declaration
OnlineEftposApiVersion ApiVersion { get; }
Property Value
| Type | Description |
|---|---|
| OnlineEftposApiVersion |
Remarks
This property is read only, the value is provided when the object is instantiated via the constructor.
Methods
| Improve this Doc View SourceCheckPaymentStatus(String)
Returns updated status information for a previously submitted payment request.
Declaration
Task<OnlineEftposPaymentStatus> CheckPaymentStatus(string transactionId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | transactionId | The unique id of a payment to retrieve the status of. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<OnlineEftposPaymentStatus> | A task whose result is an instance of OnlineEftposPaymentStatus which describes the result of a successfully submitted payment. |
Exceptions
| Type | Condition |
|---|---|
| OnlineEftposAuthenticationException | Thrown if a token cannot be obtained from the API. Usually this indicates incorrect credentials. |
| OnlineEftposException | Thrown if an exception occurs or error information is returned from the API. |
See Also
| Improve this Doc View SourceCheckRefundStatus(String)
Returns updated status information for a previously submitted refund.
Declaration
Task<OnlineEftposRefundStatus> CheckRefundStatus(string transactionId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | transactionId | The unique id of a refund to retrieve the status of. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<OnlineEftposRefundStatus> | A task whose result is an instance of OnlineEftposRefundStatus which describes the result of a successfully submitted refund. |
Exceptions
| Type | Condition |
|---|---|
| OnlineEftposAuthenticationException | Thrown if a token cannot be obtained from the API. Usually this indicates incorrect credentials. |
| OnlineEftposException | Thrown if an exception occurs or error information is returned from the API. |
See Also
| Improve this Doc View SourcePaymentSearch(OnlineEftposPaymentSearchOptions)
Searches for payments based on one or more provided criteria and returns a OnlineEftposPaymentSearchResult containing any found transactions.
Declaration
Task<OnlineEftposPaymentSearchResult> PaymentSearch(OnlineEftposPaymentSearchOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| OnlineEftposPaymentSearchOptions | options | A OnlineEftposPaymentSearchOptions instance containing the search criteria and options for the search. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<OnlineEftposPaymentSearchResult> | An OnlineEftposPaymentSearchResult instance containing the initial search results and any related meta-data. |
Remarks
The OnlineEftposPaymentSearchResult returned also contains information such as pagination url's for searches with many results.
RefundSearch(OnlineEftposRefundSearchOptions)
Searches for refunds based on one or more provided criteria and returns a OnlineEftposRefundSearchResult containing any found transactions.
Declaration
Task<OnlineEftposRefundSearchResult> RefundSearch(OnlineEftposRefundSearchOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| OnlineEftposRefundSearchOptions | options | A OnlineEftposRefundSearchOptions instance containing the search criteria and options for the search. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<OnlineEftposRefundSearchResult> | An OnlineEftposRefundSearchResult instance containing the initial search results and any related meta-data. |
Remarks
The OnlineEftposRefundSearchResult returned also contains information such as pagination url's for searches with many results.
RequestPayment(OnlineEftposPaymentRequest)
Starts a payment transaction. Sends a request for payment to the API, which will be forwarded to the payer for approval.
Declaration
Task<OnlineEftposPaymentStatus> RequestPayment(OnlineEftposPaymentRequest paymentRequest)
Parameters
| Type | Name | Description |
|---|---|---|
| OnlineEftposPaymentRequest | paymentRequest | An instance of the OnlineEftposPaymentRequest class that provides details of the requested payment. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<OnlineEftposPaymentStatus> | A task whose result is an instance of OnlineEftposPaymentStatus which describes the result of a successfully submitted payment. |
Remarks
Use the CheckPaymentStatus(String) method to obtain updated status information after the request has been submitted. Usually this is done in response to an HTTP callback from the API.
Exceptions
| Type | Condition |
|---|---|
| OnlineEftposAuthenticationException | Thrown if a token cannot be obtained from the API. Usually this indicates incorrect credentials. |
| OnlineEftposException | Thrown if an exception occurs or error information is returned from the API. |
See Also
| Improve this Doc View SourceSendRefund(OnlineEftposRefundRequest)
Sends a refund for a previous payment to the original payer.
Declaration
Task<OnlineEftposRefundStatus> SendRefund(OnlineEftposRefundRequest refundRequest)
Parameters
| Type | Name | Description |
|---|---|---|
| OnlineEftposRefundRequest | refundRequest | An instance of the OnlineEftposRefundRequest class that provides details of the refund to issue. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<OnlineEftposRefundStatus> | A task whose result is an instance of OnlineEftposRefundRequest which describes the result of a successfull submitted refund. |
Exceptions
| Type | Condition |
|---|---|
| OnlineEftposAuthenticationException | Thrown if a token cannot be obtained from the API. Usually this indicates incorrect credentials. |
| OnlineEftposException | Thrown if an exception occurs or error information is returned from the API. |


This package hosts ideal models for quasi stationary multiphase circuits. Quasi stationary theory can be found in the references.
| Name | Description |
|---|---|
| Idle | Idle branch |
| Short | Short cut branch |
| IdealCommutingSwitch | Multiphase ideal commuting switch |
| IdealIntermediateSwitch | Multiphase ideal intermediate switch |
| IdealOpeningSwitch | Multiphase ideal opener |
| IdealClosingSwitch | Multiphase ideal closer |


Gilt CIO Steve Jacobs @ the Columbia/NYC Tech Talent Draft
Last night Gilt CIO and Columbia alum Steve Jacobs (PhD, Electrical Engineering) visited his alma mater to participate in a lively panel discussion hosted by the NYC Tech Talent Draft. Steve joined representatives from Buzzfeed, Adobe, Fog Creek Software and other top NYC tech companies in answering questions about how to land a tech job in NYC, the kinds of exciting challenges that professional engineers get to work on and solve every day, and other career-related topics. Gilt Product Manager and fellow Columbia alum Jeff Bobula also attended the panel to answer questions about career opportunities at Gilt and the skills one needs to build a successful career in product management.
For more information about Gilt’s involvement in the Tech Talent Draft program, click here!


|
Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
|
Public Member Functions | |
| virtual void | setupVertices () override |
| Setup the internal structure of the class (allocate memories). More... | |
| virtual void | printParameters () const override |
| virtual void | createAllVertices (Layout *layout) override |
| virtual string | toString (const int index) const override |
| virtual void | deserialize (istream &input) override |
| virtual void | serialize (ostream &output) const override |
| Public Member Functions inherited from AllIFNeurons | |
| virtual void | loadParameters () |
| The membrane time constant | f (R_m \cdot C_m)\f$ BGFLOAT *Tau_ |
| Public Member Functions inherited from AllSpikingNeurons | |
| void | clearSpikeCounts () |
| Clear the spike counts out of all Neurons. | |
| virtual void | advanceVertices (AllEdges &synapses, const EdgeIndexMap *edgeIndexMap) |
| uint64_t | getSpikeHistory (int index, int offIndex) |
Static Public Member Functions | |
| static IAllVertices * | Create () |
Public Attributes | |
| BGFLOAT * | Aconst_ |
| A constant (0.02, 01) describing the coupling of variable u to Vm. | |
| BGFLOAT * | Bconst_ |
| A constant controlling sensitivity of u. | |
| BGFLOAT * | Cconst_ |
| A constant controlling reset of Vm. | |
| BGFLOAT * | Dconst_ |
| A constant controlling reset of u. | |
| BGFLOAT * | u_ |
| internal variable. | |
| BGFLOAT * | C3_ |
| Internal constant for the exponential Euler integration. | |
| Public Attributes inherited from AllIFNeurons | |
| BGFLOAT * | Trefract_ |
| The length of the absolute refractory period. [units=sec; range=(0,1);]. | |
| BGFLOAT * | Vthresh_ |
| If exceeds a spike is emmited. [units=V; range=(-10,100);]. | |
| BGFLOAT * | Vrest_ |
| The resting membrane voltage. [units=V; range=(-1,1);]. | |
| BGFLOAT * | Vreset_ |
| The voltage to reset to after a spike. [units=V; range=(-1,1);]. | |
| BGFLOAT * | Vinit_ |
| The initial condition for at time . [units=V; range=(-1,1);]. | |
| BGFLOAT * | Cm_ |
| BGFLOAT * | Rm_ |
| The membrane resistance [units=Ohm; range=(0,1e30)]. | |
| BGFLOAT * | Inoise_ |
| The standard deviation of the noise to be added each integration time constant. [range=(0,1); units=A;]. | |
| BGFLOAT * | Iinject_ |
| A constant current to be injected into the LIF neuron. [units=A; range=(-1,1);]. | |
| BGFLOAT * | Isyn_ |
| int * | numStepsInRefractoryPeriod_ |
| The remaining number of time steps for the absolute refractory period. | |
| BGFLOAT * | C1_ |
| Internal constant for the exponential Euler integration of f$V_m. | |
| Internal constant for the exponential Euler integration of f $V_m f BGFLOAT * | C2_ |
| Internal constant for the exponential Euler integration of f $V_m f BGFLOAT * | I0_ |
| The membrane voltage f $V_m f[readonly;units=V;] BGFLOAT * | Vm_ |
| Public Attributes inherited from AllSpikingNeurons | |
| bool * | hasFired_ |
| The booleans which track whether the neuron has fired. | |
| int * | spikeCount_ |
| The number of spikes since the last growth cycle. | |
| int * | spikeCountOffset_ |
| Offset of the spike_history buffer. | |
| uint64_t ** | spikeHistory_ |
| Public Attributes inherited from AllVertices | |
| BGFLOAT * | summationMap_ |
Protected Member Functions | |
| virtual void | advanceNeuron (const int index) |
| virtual void | fire (const int index) const |
| void | createNeuron (int neuronIndex, Layout *layout) |
| void | setNeuronDefaults (const int index) |
| virtual void | initNeuronConstsFromParamValues (int neuronIndex, const BGFLOAT deltaT) override |
| void | readNeuron (istream &input, int index) |
| void | writeNeuron (ostream &output, int index) const |
| Protected Member Functions inherited from AllIFNeurons | |
| void | createNeuron (int neuronIndex, Layout *layout) |
| void | setNeuronDefaults (const int index) |
| void | readNeuron (istream &input, int i) |
| void | writeNeuron (ostream &output, int i) const |
Additional Inherited Members | |
| Protected Attributes inherited from AllSpikingNeurons | |
| bool | fAllowBackPropagation_ |
| Protected Attributes inherited from AllVertices | |
| int | size_ |
| Total number of vertices. | |
| log4cplus::Logger | fileLogger_ |
| log4cplus::Logger | vertexLogger_ |
Definition at line 80 of file AllIZHNeurons.h.
|
protectedvirtual |
Helper for advanceNeuron. Updates state of a single neuron.
| index | Index of the neuron to update. |
Update internal state of the indexed Neuron (called by every simulation step).
| index | Index of the Neuron to update. |
Implements AllSpikingNeurons.
Definition at line 236 of file AllIZHNeurons.cpp.
|
overridevirtual |
Creates all the Neurons and assigns initial data for them.
| layout | Layout information of the neural network. |
Creates all the Neurons and generates data for them.
| layout | Layout information of the neural network. |
Reimplemented from AllIFNeurons.
Definition at line 88 of file AllIZHNeurons.cpp.
|
protected |
Creates a single Neuron and generates data for it.
| neuronIndex | Index of the neuron to create. |
| layout | Layout information of the neural network. |
Creates a single Neuron and generates data for it.
| i | Index of the neuron to create. |
| layout | Layout information of the neural network. |
Definition at line 102 of file AllIZHNeurons.cpp.
|
overridevirtual |
Reads and sets the data for all neurons from input stream.
| input | istream to read from. |
Sets the data for Neurons to input's data.
| input | istream to read from. |
Reimplemented from AllIFNeurons.
Definition at line 180 of file AllIZHNeurons.cpp.
|
protectedvirtual |
Initiates a firing of a neuron to connected neurons.
| index | Index of the neuron to fire. |
Fire the selected Neuron and calculate the result.
| index | Index of the Neuron to update. |
Reimplemented from AllSpikingNeurons.
Definition at line 299 of file AllIZHNeurons.cpp.
|
overrideprotectedvirtual |
Initializes the Neuron constants at the indexed location.
| neuronIndex | Index of the Neuron. |
| deltaT | Inner simulation step duration |
Initializes the Neuron constants at the indexed location.
| i | Index of the Neuron. |
| deltaT | Inner simulation step duration |
Reimplemented from AllIFNeurons.
Definition at line 152 of file AllIZHNeurons.cpp.
|
overridevirtual |
Prints out all parameters of the neurons to logging file. Registered to OperationManager as Operation::printParameters
Reimplemented from AllIFNeurons.
Definition at line 54 of file AllIZHNeurons.cpp.
|
protected |
Sets the data for Neuron #index to input's data.
| input | istream to read from. |
| index | index of the neuron (in neurons). |
Definition at line 190 of file AllIZHNeurons.cpp.
|
overridevirtual |
Writes out the data in all neurons to output stream.
| output | stream to write out to. |
Writes out the data in Neurons.
| output | stream to write out to. |
Reimplemented from AllIFNeurons.
Definition at line 210 of file AllIZHNeurons.cpp.
|
protected |
Set the Neuron at the indexed location to default values.
| index | Index of the Neuron that the synapse belongs to. |
Set the Neuron at the indexed location to default values.
| i | Index of the Neuron to refer. |
Definition at line 136 of file AllIZHNeurons.cpp.
|
overridevirtual |
Setup the internal structure of the class (allocate memories).
Setup the internal structure of the class. Allocate memories to store all neurons' state.
Reimplemented from AllIFNeurons.
Definition at line 41 of file AllIZHNeurons.cpp.
|
overridevirtual |
Outputs state of the neuron chosen as a string.
| index | index of the neuron (in neurons) to output info from. |
Reimplemented from AllIFNeurons.
Definition at line 163 of file AllIZHNeurons.cpp.
|
protected |
Writes out the data in the selected Neuron.
| output | stream to write out to. |
| index | index of the neuron (in neurons). |
Definition at line 220 of file AllIZHNeurons.cpp.


About
This project is maintained by Pablo Cingolani
Community: bds
user's group
Acknowledgements
Acknowledgements and special thanks to (in order of appearance)
- Hernan Gonzalez: Bug fixes.
- Fernando Garcia Sanz (FGS): Writing a nice introduction, feedback and beta testing.
- Kyle Hernandez: Create the
bds
group - Jin Lee: Several bug fixes, HTML progress report, improved 'help' commnand options, optional checkpoints, configurable tail size, optional full command when reporting tasks, improved HTML reports, etc.
Bug reports
Please send any bug reports using GitHub
Important: Try bds
latest version. bds
is updated often, may be the bug has already been corrected.
Note: A bug report should include at least
- An explanation of the bug condition
- bds version and sub-version numbers you are using
- A minimal bug-demonstrating test case (i.e. a
bds
source file that clearly shows the bug condition).
IMPORTANT: The example should be minimal and self contained. This means that:
- There should be only a few lines of code specifically showing the problem (please do not send hundreds of lines of code or your complete pipeline).
- No additional packages should be required to run your example (e.g. I should not need to install programs on my computer to run your example).
- No additional data should be required to run your example (e.g. I should not need you to send me 10TB data files to run the script).
- Full command line used to run the script
- Additional conditions for the bug to occur (e.g. additional config lines)
Asking for help
You can ask question to the [bds user's group
A few guidelines when asking for help:
- Read the documentation first. Please make sure you've read the documentation before asking fo help. I know this is obvious, but ...
- Be polite. Again, it may be obvious, but ...
- If I don't get back to you... Do remind me if I don't get back to you within a few days. Sometimes I'm swamped with work or just out of town, a polite reminder helps.


This is a Cordova application that measures device orientation using the Accelerometer API. Click the "Refresh Orientation" button to read the accelerometer.
Waiting for Cordova to initialize.


Before Change
start_time = time.time()
for text in texts:
tokens = tokenizeAndFilter(text)
result = model.analyze(tokens)
print(json.dumps(result, indent=4, sort_keys=True))
if result["entities"] is not None:
entities = result["entities"]
annotations.append(entities)
runtime = round(time.time() - start_time, 3)
if output_format is "json":
annotations["runtime"] = runtime
After Change
annotations.append(entities)
"""
annotations = model.analyze(texts, output_format)
runtime = round(time.time() - start_time, 3)
if output_format is "json":
annotations["runtime"] = runtime


We had a nice Christmas. We all got together over on the
boat Day Dreamer. Yes, all 20 of us. Us,
Pollux, Elin, Emily Grace, and Day Dreamer got together for
Christmas Eve. The kids did Secret Santa gift exchange,
and everyone was very happy with their treasures.
The next morning, we had the normal gift ripping party on "What
If", and we all got some surprises and nice treats for
Christmas.
Later Christmas day, we moved from the Pigeon Point anchorage in
Guadeloupe, back up to the Deshaies anchorage because Pigeon
Point was rolly again. The rest of Christmas was relaxing
and eating - like any other normal Christmas.
The day after Christmas (Boxing day), we left and had a pleasant
48 mile sail up to Antigua. We even spotted a couple of
whales.
The next morning we checked in, and spent a week at the Falmouth
Harbor anchorage in Antigua. It was nice and calm in
there, and our friends on Pollux joined us, as well as Emily
Grace. The next day, we saw Day Dreamer, Elin and Spirit
of Argo pull in as well.
Pollux bought a one week membership at the local yacht club, and
that entitled them to use of the small sailboats the yacht club
has as well. The boys off Pollux were kind enough to
share, and Derek had a good time sailing around the anchorage.
Kris got to play Mexican train dominoes on the beach one last
time with the gang, which was fun, even though she lost yet
again.
The weather was looking good for a trip. The wind had been
over 25 knots for over a week, and finally we were getting a
break, and we decided it was time to move while the weather was
good. We left Falmouth harbor, and moved around to Jolly
Harbor to get groceries and check out. Then headed out at
3:00 a.m. to make the 80 nautical mile run to St. Barts.
We did OK, and passed Gustavia Harbor in St. Barts with our
mouths hanging open at all the Mega Yachts. We kept going
and took a mooring at a small island to the west of St. Bart's
called Ile Fourche.
The next morning we hiked around on the island, which is
uninhabited, and had lots of trails and great rocks to climb.
However the weather was picking up again, and a decidedly
unpleasant roll was occurring in the anchorage, so around noon,
we hoisted anchor and headed for St. Martin where we began to
tackle the "Big Boat Project"
01/01/14; Happy New Year
Our Christmas Eve spread |
The parking lot |
The gang at Christmas Eve |
This boat probably did not have as good as
food
as us on Christmas Eve. :) |
Christmas morning on "What If" |
Kris got a new cup for tea - looks like she
needs some |
Dean with his pizza cutter and towel |
Derek is always happy when cash shows up |
Whale sighting on the way to Antigua |
Derek sailing in the anchorage |
Mexican train dominoes on the beach |
Near the top of Ile Fourche, looking at
anchorage |
Windy day at top of island |
Derek and Dean are king of the rock |


Deriving Machine Learning Cost Functions using Maximum Likelihood Estimation (MLE) - Part II
In Part I of this article, we introduced Maximum Likelihood Estimation (MLE), Likelihood function, and derived Mean Squared Error (MSE) using Maximum likelihood estimation. In this article, we will use Maximum likelihood estimation to derive Cross-Entropy cost function, which is commonly used for binary classification problems.
Background
Binary logistic regression is used to model the relationship between a categorical target variable $Y$ and a predictor vector $X = (X_1, X_2, \cdots, X_p)$. The target variable will have two possible values, such as whether a student passes an exam or not, or whether a visitor to a website subscribes to the website’s newsletter or not. The two possible categories are coded as ‘1’, called the positive class, and ‘0’, called the negative class. Binary logistic regression estimates the probability that the response variable $Y$ belongs to the positive class given $X$.
$$ \tag{1} \begin{aligned} p(X) = Pr(Y = 1 | X) \end{aligned} $$
In linear regression, we model the expected value (the mean $\mu$) of the continuous target variable $Y$ as a linear combination of the predictor vector $X$ and estimate the weight parameters $\beta_1, \beta_2, \cdots, \beta_p$ using our training data.
$$ \tag{2} \begin{aligned} \mathbb{E}(Y|X) = \beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p \end{aligned} $$
In this case where our target variable $Y$ is categorical and has two possible values coded as 0 and 1, the expected value or mean of $Y$ is the probability $p(X)$ of observing the positive class1. It seems sensible then to model the expected value of our categorical $Y$ variable using equation (2), as in linear regression.
$$ \tag{3} \begin{aligned} \mathbb{E}(Y|X) = p(X) = \beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p \end{aligned} $$
The problem with modelling the probability $p(X)$ as a linear combination of the predictor variables is that probability $p(X)$ has a range $[0, 1]$, but the right-hand side of the equation outputs values in the range $(-\infty, +\infty)$. In other words, we will get meaningless estimates of the probability if we use that equation.
The solution is to use a function of probability $p(X)$ that provides a suitable relationship between the linear combination of the predictor variables $X$ and $p(X)$, the mean of the response variable. This function is called a link function, and it maps the probability range $[0, 1]$ to $(-\infty, +\infty)$.
The most commonly used link function for binary logistic regression is the logit function (or log-odds2), given as:
$$ \tag{4} \begin{aligned} \text{logit}\bigg(p(X)\bigg) = \text{log}\bigg(\frac{p(X)}{1-p(X)}\bigg) = \beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p \end{aligned} $$
How do we then go from the logit function to getting the estimate of the probability p(X) of observing the positive class? Because logit is a function of probability, we can take its inverse to map arbitrary values in the range $(-\infty, +\infty)$ back to the probability range $[0, 1]$.
Recall that the inverse function of the natural logarithm function is the exponential function, so if we take the inverse of equation (4), we get:
$$ \tag{5} \begin{aligned} \frac{p(X)}{1-p(X)} = e^{(\beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p)} \end{aligned} $$
If we solve for $p(X)$ in equation (5), we get3:
$$ \tag{6} \begin{aligned} p(X) & = \frac{e^{(\beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p)}}{e^{(\beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p)} + 1} \\ & = \frac{1}{1 + e^{(-\beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p)}} \end{aligned} $$
Equation (6) is the logistic (or sigmoid) function, and it maps values in the logit range $(-\infty, +\infty)$ back into the range $[0, 1]$ of probabilities.
Deriving Cost Entropy using MLE
Given a set of $n$ training examples $\{(x^{(1)}, y^{(1)}), (x^{(2)}, y^{(2)}), \cdots, (x^{(n)}, y^{(n)})\}$, binary cross-entropy is given by:
$$ \tag{7} \begin{aligned} \text{Cross-Entropy} = -\bigg[\frac{1}{n} \sum_{i=1}^n\bigg(y^{(i)}\text{log} p^{(i)} + (1- y^{(i)})\text{log}(1 - p^{(i)})\bigg)\bigg] \end{aligned} $$
where $x^{(i)}$ is the feature vector, $y^{(i)}$ is the true label (0 or 1) for the $i^{th}$ training example, and $p^{(i)}$ is the predicted probability that the $i^{th}$ training example belongs to the positive class, that is, $Pr(Y = 1 | X = x^{(i)})$.
In this section, we will derive cross-entropy using MLE. If you are not already familiar with MLE and likelihood function, I will advise that you read the section that explains both concepts in Part I of this article.
The derivation of cross-entropy follows from using MLE to estimate the parameters $\beta_0, \beta_1, \cdots, \beta_p$ of our logistic model on our training data.
We start by describing the random process that generated $y^{(i)}$.
$y^{(i)}$ is a realisation of the Bernoulli random variable4 $Y$. The Bernoulli distribution is parameterised by $p$, and its probability mass function (pmf) is given by:
$$ \tag{8} \begin{aligned} Pr(Y = y^{(i)}) = \begin{cases} p & \text{if } y^{(i)} = 1, \\ 1-p & \text {if } y^{(i)} = 0. \end{cases} \end{aligned} $$
which can be written in the more compact form:
$$ \tag{9} \begin{aligned} Pr(Y = y^{(i)}) = p^{y^{(i)}}(1-p)^{1 - y^{(i)}} \ \text{for} \ y^{(i)} \in \{0,1\} \end{aligned} $$
We then define our Likelihood function. The estimates of $\beta_0, \beta_1, \cdots, \beta_p$ we choose will be the ones that maximise the likelihood function. The likelihood function is a function of our parameter $p$ given our training data:
$$ \tag{10} \begin{aligned} \mathcal{L}(p | (x^{(1)}, y^{(1)}), (x^{(2)}, y^{(2)}), \cdots, (x^{(n)}, y^{(n)})) & = \prod_{i=1}^n f(y^{(i)}|p) \\ & = \prod_{i=1}^n p^{y^{(i)}}(1-p)^{1 - y^{(i)}} \end{aligned} $$
It is easier to work with the log of the likelihood function5, called the log-likelihood, so if we take the natural logarithm of equation (10), we get:
$$ \tag{11} \begin{aligned} \log \bigg(\mathcal{L}(p | y^{(1)}, y^{(2)}, \cdots, y^{(n)})\bigg) & = \log\bigg( \prod_{i=1}^n p^{y^{(i)}}(1-p)^{1 - y^{(i)}} \bigg) \\ & = \sum_{i=1}^n \log \bigg(p^{y^{(i)}}(1-p)^{1 - y^{(i)}}\bigg) \\ & = \sum_{i=1}^n \bigg(y^{(i)}\text{log}p^{(i)} + (1-y^{(i)})\text{log}(1-p^{(i)})\bigg) \end{aligned} $$
Recall that for our training data, $p^{(i)}$ in equation (11) is the predicted probability of the $i^{th}$ training example gotten from the logisitic function, so it is a function of the parameters $\beta_0, \beta_1, \cdots, \beta_p$. The maximum likelihood estimate $\hat \beta$ is therefore the value of the parameters that maximises the log-likelihood function.
$$ \tag{12} \begin{aligned} \hat \beta = \underset{\beta}{\operatorname{arg\,max}} \bigg[ \sum_{i=1}^n \bigg(y^{(i)}\text{log}p^{(i)} + (1-y^{(i)})\text{log}(1-p^{(i)})\bigg) \bigg] \end{aligned} $$
We also know that maximising a function is the same as minimising its negative.
$$ \tag{13} \begin{aligned} \hat \beta = \underset{\beta}{\operatorname{arg\,min}} \bigg[ -\sum_{i=1}^n \bigg(y^{(i)}\text{log}p^{(i)} + (1-y^{(i)})\text{log}(1-p^{(i)})\bigg) \bigg] \end{aligned} $$
Taking the average across our $n$ training examples, we get:
$$ \tag{14} \begin{aligned} \hat \beta = \underset{\beta}{\operatorname{arg\,min}} \bigg[\color{red}-\frac{1}{n}\sum_{i=1}^n \bigg(y^{(i)}\text{log}p^{(i)} + (1-y^{(i)})\text{log}(1-p^{(i)})\bigg) \color{black}\bigg] \end{aligned} $$
which is the cross-entropy as defined in equation (7).
Footnotes
-
$Y$ is a Bernoulli random variable. The Bernoulli distribution is a discrete probability distribution that describes processes that have only two possible outcomes: 1, with a probability of $p$ and 0, with a probability of $1 - p$. The expectation (or mean) of the Bernoulli distribution is $p$. [Proof] ↩
-
The odds is defined as the ratio of the probability $p$ of observing an event to the probability $1-p$ of not observing that event. $\text{odds} = \frac{p}{1-p}$. If, for example, the odds of an event happening is $o$:1, it means that the event happened $o$ times out of a total of $o+1$ occurrences. The log-odds is simply the natural logarithm of the odds. ↩
-
Bernoulli distribution is the discrete probability distribution of a random variable that takes on two possible values: 1 with probability $p$ and 0 with probability $1-p$. An experiment modelled by the Bernoulli distribution is called a Bernoull trial. Examples of Bernoulli trials include: tossing a coin (head/tail), playing a game (winning/not winning). ↩
-
The reasons why this is the case is explained clearly in Part I. Check the ‘What is Maximum Likelihood Estimation?’ section. ↩


Asian Kitchen's Menu
All
Korea
Japan
China
Tteokbokki
10.99
Spicy rice cakes, serving with fish cake.
Chicken Ramen
7.99
Chicken noodle soup, serving with vegetables such as soy bean, green onion. In an optional you can ask for egg.
Bibimbap
8.99
Boiling vegetables, serving with special hot sauce
Dan Dan Mian
5.99
Dan dan noodle, serving with green onion
Yangzhou Fried Rice
12.99
Yangzhou style fried rice, serving with bean and pickles
Onigiri
9.99
Rice Sandwich, serving with soy sauce
Jajangmyeon
15.99
Black bean sauce noodle, serving with green onion
Ma Yi Shang Shu
12.99
Hot pepper sauce noodle, serving with soy bean and onion
..


{% extends "tutorial.html" %} {% load mixin from templatefilters %} {% block pagebreadcrumb %}{{ tut.title }}{% endblock %} {% block head %} {% endblock %} {% block iscompatible %} {% endblock %} {% block html5badge %} {% endblock %} {% block share_image %} {% endblock %} {% block content %}
Antialiasing is something of an unsung hero in web graphics; it’s the reason we have clear text and smooth vector shapes on our screens. There are actually a couple of approaches to antialiasing used in browsers today which are most obvious when it comes to text rendering. When the algorithm used for antialising switches it can lead to unexpected visual results. In this article we’ll take a look at the approaches to antialiasing and see how the pixels get drawn.
All of our screens are made up, as we all know, of pixels. It’s a giant grid of blocks, and each one contains red, green and blue (RGB) components. At a distance we see images, text and icons, but up close we can actually see the grid of RGB components and how everything is made up.
So what happens when we’re drawing a vector shape and it passes through “part” of a pixel? Let’s assume that the shape we’re drawing is black and the background is white. Should we color that pixel at all? If we color it, what color should it be? Black, gray, something else?
The process of antialiasing determines which color we should use when we’re filling in pixels. The simplest version of it is called grayscale antialiasing, and it treats the three components of the pixels equally. So if the pixel is half covered — and let's assume black text on white for a second to keep it simple — you'd think each component will be set to half brightness (I know I certainly did), but actually it's more complex than that: you have to account for gamma, which means you'll likely never set it to that exact value. That of course makes things a little trickier, but since this is an introduction to the topic I won't dive into that here. The important thing to know is that grayscale antialiasing is dealt with at the pixel level and we can, in fact, do much better.
In Figure 2 you can see the same triangle being drawn, but on the left it has antialiasing enabled and on the right it’s been disabled. As you can see, when antialiasing is enabled the pixels are shades of gray when the triangle only passes through part of the pixel. When disabled, however, the pixel is filled in as either solid black or solid white and the shape looks jagged.
Whenever a browser is rendering text, which is essentially a vector shape, we will come up against the same problem: the characters of text will only partially fill some pixels so we will want to have a strategy for how to fill in those pixels. Ideally we want the text to be antialiased as it will make it easier and more pleasant to read.
It turns out, however, that the grayscale approach to antialiasing is only one way to handle it. An approach that is often taken is to be a bit more selective with how we enable the RGB components of the pixels. The process is called subpixel antialiasing and over the years the ClearType team at Microsoft in particular have invested a great deal of time and effort to make progress on it. It’s now much more widely used, and all the major browsers use it to a greater or lesser degree.
Firstly, since we know that each pixel is in fact made up of separate red, green and blue components we detect how much of each of those components should be “switched on” for the pixel in question. So if a pixel is “half covered” from the left hand side then we might switch on the red component totally, the green component to half way, and keep the blue switched off. This process is often described as “tripling the horizontal resolution of the screen”, and relies on the fact that each pixel is really the three separate components side by side rather than a single unit.
In figure 3 above you can see that on the left we treat each component equally and each is turned on or off equally (grayscale). On the right hand side, however, we use the subpixel approach, enabling each component (red, green and blue) differently depending on how much it overlaps with the shape being drawn.
With all that said, however, human vision doesn’t actually weigh red, green and blue light equally. We are far more sensitive to green than either red or blue, and this means that while there is definite benefit over grayscale antialiasing, as Darel Rex Finley notes, enabling each component separately is not actually going to yield a 3x improvement in clarity. Subpixel antialiasing is definitely helpful, though, and it does mean that we see text more clearly than if grayscale antialiasing is used.
What does all this mean for us as developers? Well, from a Chrome perspective at least there is a mix of both grayscale and subpixel antialiasing used to render text, and which one you get depends on a few criteria. To begin with, however, we need to understand a little about layers, since that’s the main criterion at play. If you’ve not come across layers and how they are used internally by Chrome, Tom Wiltzius has written a fantastic introduction to the topic that you should read first.
Assuming you’re familiar with layers, or you’ve just read about them, let’s continue on. If hardware compositing is enabled for the page, and you have text content on a layer that isn’t the root layer it will, by default, be rendered using grayscale antialiasing. Developers often notice that if they apply hacks to elements to get them into their own (non-root) layers (such as using translateZ) that they see text being rendered differently. Often times developers apply “new layer” triggers on the fly through JavaScript or CSS causing the text rendering to switch from subpixel to grayscale; it can be confusing if you don’t know what triggered the rendering change. If your text resides in the root layer, however, it should be rendered with subpixel antialiasing, and consequently it will be much clearer to read.
But, like all things web, it’s changing. Subpixel antialiasing is being enabled in Chrome for text in non-root layers, provided the layer satisfies three criteria. It’s worth saying that these criteria apply today, but it’s likely they will change and you should expect to see more cases covered over time. Today those criteria are:
border-radius
or a non-default background-clip
value results in the layer being treated as non-opaque and text rendering reverts to grayscale antialiasing.translate(20.2px, 30px)
would result in grayscale antialiasing since the x component, 20.2px
, is non-integral. The identity transform simply means that there is no additional rotation, translation, or scaling applied beyond its default.One final thing of note is that applying a CSS animation may cause a new layer to be created, whereas using requestAnimationFrame
does not. For some developers the text rendering differences that implies has precluded the use of CSS animations. So if you’ve been using JavaScript to animate elements because of text rendering differences, check to see if this update fixes things for you!
So that’s Chrome covered. As far as other browsers go, Opera, as it moves to Chromium, should match Chrome’s behaviours closely. Internet Explorer seems to use subpixel antialiasing for virtually all text (if you’ve enabled ClearType, of course!), although seemingly not in Windows 8’s Metro mode. Safari, given WebKit’s proximity to Blink, behaves very similarly to Chrome, albeit without these newer improvements that allow for more subpixel antialiasing. Firefox largely behaves in the same way as Internet Explorer insofar as it uses subpixel antialiasing for virtually all text. Of course this isn’t an exhaustive list, and there are likely to be cases in all browsers where grayscale antialiasing is used instead of subpixel, but it’s good to know that subpixel antialiasing is widely used across the main set of browsers.
So now you know a little about how antialiasing works, and why you might see text rendering differences in your sites and applications today, especially on lower DPI devices. If you’re interested in following along with Chrome’s implementation with respect to text rendering you should star the following bugs:


Neural Network Fundamentals
DeepIntro
Part 1: The Computational Perspective
Cartoon Neurons
Cartoon Neurons
Binary Threshold Neurons
NAND
Universality
Neural Networks are Universal
(True more broadly; see Michael's visual proof.)
But how can we train them?
We want a differentiable model.

(MNIST is practically famous!)
These might seem simple because your brain is really good at this.
But it's actually complicated.
We can think of these images as matrices.
Or flatten them into vectors.
Images are high-dimensional vectors.
A 28x28 grayscale image is a 784-dimensional vector!
Neural Nets also bend MNIST
Part 3: Training Neural Networks
Cost functions
How bad is our model?
Usually in relation to some training data
\[\{(x_0, y_0),~ (x_1, y_1)...~~ (x_i, y_i)\}\]
A function of parameters:
$$C(\theta) = \sum_{(x_i, y_i)} \left[y_i - f(x_i)\right]^2$$
Optimize to find good parameters.
Hard because of high-dimensional space.
\(C\) is differentiable, so we can use gradient descent.
Problems
Lots of data points (solution: batches).
Lots of derivatives (solution: backprop).
A Long History Of Reinvention
Why learn backprop? (Why learn compilers?)
Conceptual understanding.
Genearlizations.
$$c=a+b$$
$$d=b+1$$
$$e=c∗d$$
Computational Graphs
Evaluation
Derivatives on edges
Sum Over Paths
$$\frac{\partial Z}{\partial X} = \alpha\delta + \alpha\epsilon + \alpha\zeta + \beta\delta + \beta\epsilon + \beta\zeta + \gamma\delta + \gamma\epsilon + \gamma\zeta$$
$$\frac{\partial Z}{\partial X} = (\alpha + \beta + \gamma)(\delta + \epsilon + \zeta)$$
Recall...
Forward from \(b\)
Backpropagation
Computational Victories
Many orders of magnitude


DfE enquiries
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Press release
Details of new plans to improve teacher training.
Extra bursaries for primary maths teachers and trainee teachers who work in the most challenging schools
Weeding out poor teacher training providers
Schools will soon get more of a say in how teachers are trained, including taking on new trainee teachers themselves, under new plans to be unveiled today (Thursday 14 June).
The new School Direct programme, starting this September, will allow schools to train top graduates as teachers in the subjects and phases they need, in the way they want them trained. They will also be able to choose which accredited provider - such as top universities or Teaching School partnerships - they want to work with.
This will give schools greater control of how new teachers are recruited and trained, encourage more school-led partnerships for teacher training, and will help drive up the quality of teacher training.
The plans include:
Speaking at the National College annual conference in Birmingham, Education Secretary Michael Gove will say:
The idea is a simple one: take the very best schools, ones that are already working to improve other schools, and put them in charge of teacher training and professional development for the whole system
The impact of these changes on initial teacher training will be revolutionary. By the end of this Parliament well over half of all training places will be delivered by schools
Each year around 30,000 teacher training places are allocated to a network of ITT providers for qualification-based courses. School involvement in the way the courses are designed or managed is limited and varies between providers. Schools do not always have an influence over who is recruited and how they are trained. Too many trainees are also on courses which Ofsted considers as only ‘satisfactory’.
From this September there will be more than 900 places on the new school-led School Direct programme - nearly double the expected level. The programme will be expanded massively over the next few years as it is opened to all schools. It is expected that Teaching Schools, academy chains and outstanding schools will take the lead, working with other schools in their area.
By the end of the Parliament we expect that as many as 10,000 students a year could be trained by schools that are either offering Schools Direct places or are full providers of teacher training.
Starting in September 2013, around 5000 teacher training places will be made available for high-calibre career changers, through a new employment-based strand of School Direct. This scheme will replace the current Graduate Teacher Programme (GTP) which has been in place since 1998.
Whilst the GTP has delivered some superb training, and recruited some brilliant teachers, it has also suffered from serious flaws. Recruitment has not always been targeted at high-fliers, it has been difficult to access and apply to the programme, and some schools have been left frustrated by restrictions over salary and training.
The new School Direct route will build on the GTP’s strengths and give schools greater control. Those who have already gained at least 3 years’ valuable experience in the world of work will be able to apply for the programme via a single website.
Other plans include:
Providers rated as ‘requires improvement’ under the new Ofsted framework will not get any central government places and if they receive two consecutive ratings in this category, they will be closed down.
Further details about ‘School Direct’ , including the guide to the training programme is on the Department for Education’s website.
The Government’s Initial Teaching Training strategy - ‘Training our next generation of outstanding teachers’ - published last year, sets out a series of reforms to recruit the very best into teaching and a greater role for schools in training. This includes:
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Published: 14 June 2012


Parameters¶
Parameters in Pyro are basically thin wrappers around PyTorch Variables that carry unique names. As such Parameters are the primary stateful objects in Pyro. Users typically interact with parameters via the Pyro primitive pyro.param. Parameters play a central role in stochastic variational inference, where they are used to represent point estimates for the parameters in parameterized families of models and guides.
ParamStore¶
-
class
ParamStoreDict
¶ Bases:
object
Global store for parameters in Pyro. This is basically a key-value store. The typical user interacts with the ParamStore primarily through the primitive pyro.param. See the introductory tutorial Hello World for a discussion.
Some things to bear in mind when using parameters in Pyro:
- parameters must be assigned unique names
- the init_tensor argument to pyro.param is only used the first time that a given (named) parameter is registered with Pyro.
- for this reason, a user may need to use the clear() method if working in a REPL in order to get the desired behavior. this method can also be inved with pyro.clear_param_store().
- the internal name of a parameter within a PyTorch nn.Module that has been registered with Pyro is prepended with the Pyro name of the module. so nothing prevents the user from having two different modules each of which contains a parameter named weight. by contrast, a user can only have one top-level parameter named weight (outside of any module).
- parameters can be ‘tagged’ with (string) tags. by default each parameter is tagged with the ‘default’ tag. this mechanism allows the user to group parameters together and e.g. customize learning rates for different tags. for an example where this is useful see the tutorial SVI Part III.
- parameters can be saved and loaded from disk using save and load.
-
clear
()¶ Clear the ParamStore
-
delete_tag
(tag)¶ Parameters: tag (str) – tag to remove Removes the tag; any parameters with that tag are unaffected but are no longer associated with that tag.
-
get_active_params
(tags=None)¶ Parameters: tag – optional argument specifying that only active params carrying a particular tag or any of several tags should be returned Returns: all active params in the ParamStore, possibly filtered to a particular tag or tags Return type: set
-
get_all_param_names
()¶ Get all parameter names in the ParamStore
-
get_param
(name, init_tensor=None, tags=’default’)¶ Parameters: - name (str) – parameter name
- init_tensor (torch.autograd.Variable) – initial tensor
- tags (a string or iterable of strings) – the tag(s) to assign to the parameter
Returns: parameter
Return type: torch.autograd.Variable
Get parameter from its name. If it does not yet exist in the ParamStore, it will be created and stored. The Pyro primitive pyro.param dispatches to this method.
Parameters: param_name (str) – a (single) parameter name Return type: set Return the tags associated with the parameter
-
get_state
()¶ Get the ParamStore state.
-
load
(filename)¶ Parameters: filename – file name to load from Loads parameters from disk
-
mark_params_active
(params)¶ Parameters: params – iterable of params the user wishes to mark as active in the ParamStore. this information is used to determine which parameters are being optimized, e.g. in the context of pyro.infer.SVI
-
mark_params_inactive
(params)¶ Parameters: params – iterable of params the user wishes to mark as inactive in the ParamStore. this information is used to determine which parameters are being optimized, e.g. in the context of pyro.infer.SVI
-
named_parameters
()¶ Returns an iterator over tuples of the form (name, parameter) for each parameter in the ParamStore
-
param_name
(p)¶ Parameters: p – parameter Returns: parameter name Get parameter name from parameter
-
replace_param
(param_name, new_param, old_param)¶ Parameters: - param_name (str) – parameter name
- new_param (torch.autograd.Variable) – the paramater to be put into the ParamStore
- old_param – the paramater to be removed from the ParamStore
Replace the param param_name with current value old_param with the new value new_param
-
save
(filename)¶ Parameters: filename – file name to save to Save parameters to disk
-
set_state
(state)¶ Set the ParamStore state using state from a previous get_state() call
-
tag_params
(param_names, tags)¶ Parameters: - param_name – either a single parameter name or an iterable of parameter names
- tags – either a single string or an iterable of strings
Tags the parameter(s) specified by param_names with the tag(s) specified by tags.
-
untag_params
(param_names, tags)¶ Parameters: - param_name – either a single parameter name or an iterable of parameter names
- tags – either a single string or an iterable of strings
Disassociates the parameter(s) specified by param_names with the tag(s) specified by tags.


Plugin Information |
|---|
View Smart Jenkins on the plugin site for more information. |
This plugin reduces the electricity consumption by shutting down idle slaves and re-schedules jobs to avoid the rush hours of electricity.
Abstract
This plugin schedules jobs to avoid rush hours, shuts down idle computers, and boots them remotely when necessary. In this plugin, OK time (when jobs will be built by Jenkins) and NG time (when jobs will be blocked by this plugin) are being defined. If it is in NG time, idle slaves which are controlled by this plugin will shut down. At the same time, jobs which are controlled by this plugin will be blocked and re-scheduled. However, jobs which are configured to be built with another slave (which is always online) will be built at once. If it is in OK time, all slaves controlled by this plugin will boot. Meanwhile, jobs which are blocked will be built in this time.
About this plugin
This plugin allows:
- Setting “OK” time1 and “NG” time2.
- Selecting slaves which will be controlled by this plugin
- Selecting jobs which will be controlled by this plugin
- Shutting down slaves when necessary even it is in OK time
- Waking up slaves when necessary even it is in NG time
User guide
To use this plugin, users need to do some setting in their slave machines.
- If the OS of a slave machine is Linux, users need to set the permission of “shutdown” command to make it can be used by every user of this machine.
- Users need to make slave machines launch when system starts up.
- Users need to make master machine’s number of built greater than 1.
- Users need to install “wake-on-lan” on master.
Note: there are four jobs (shutdown-linux, shutdown-win, wol-linux, wol-win) will be created by this plugin.
When you install this plugin, your side menu will have table like picture1.  And when the slave machine is online, it will show the IP and MAC address in this table.
To activate this plugin, just check the smart Jenkins link and check enable Smart-Jenkins Scheduler. You then get the following fields:
OK Time Slot is where you define your own OK time. You just need to input the time you want to do your jobs. For example, from 23o’clock to 7o’clock next day, it is not rush time of electricity, so you want to do your jobs in the time. Also, if you only need do your tests on weekdays, you can input the day you want to do your jobs.
In this case, you can set your OK time like “1-5@23-7“(the number before @ means the day you want to do your jobs and the number after @ means the time you want to do your jobs in a day).
The green part in picture2 means OK time and the gray part means NG time. The read line in picture2 means current time.
If you check the enable selection in job config page (picture3), jobs which are checked will be controlled by this plugin. It means the checked jobs will be blocked in NG time unless its config1 says it can be built with the slave which is always online.
If you check the enable selection in slave config page (picture4), slaves which are checked will be controlled by this plugin. It means that the checked slave will shut down when it is NG time and will boot when it is OK time. And the un-checked slave will always online.
For example, you make job config in picture3 and slave config in picture4. And you set “ruby-test” job’s matrix label_exp as “slave1 || master_VM”. When it is NG time, slave1 is power off and master_VM is online. So the ruby-test job will be built with master_VM machine.
Attachments:
SmartJenkins-2.png (image/png)
SmartJenkins-3.png (image/png)
SmartJenkins-4.png (image/png)


The EuroPython 2014 conference will take place from July 21 - 27, 2014 at the BCC Berlin, Germany.
Get informed, as soon as more information is available.
Join the EuroPython mailing list
EuroPython 2014
Berlin 21 - 27 July
The EuroPython 2014 conference will take place from July 21 - 27, 2014 at the BCC Berlin, Germany.
Get informed, as soon as more information is available.
Join the EuroPython mailing list
Join the conversation:


$template{name="sample-readme-html-header" title="Network Interceptor demo"}$
This sample demonstrates the use of a Network interceptor in a very simple authentication scheme.
The authentication consists in the client side of each connection sending a user name that must match the user name on the server side. The server then sends a response, either "OK" or an error message. If the repsonse is "OK" then client will proceed with the conenction, otherwise it will exit.
The user name is set as a system property -Djppf.user.name=<user_name> on all JPPF processes (client, server, nodes), and the interceptor encrypts it before send it over the network. As in the Network Data Encryption demo, the network data is encrypted using a DES cipher with a 56 bits symetric secret key. This secret key is kept in a keystore included in the resulting jar file deployed to the nodes, servers and clients. Therefore, the jar file is the weakest point in the security chain. This design should not be used in production, but it is sufficient for the needs of this demo.
The actual authentication is performed through a JAAS Login Module which is invoked from our network interceptor's onConnect() method.
jppf.jvm.options = -server -Xmx256m -Djppf.user.name=jppf_user
successful client authentication successful server authenticationNote: we see client and server messages in the driver output, because the driver actually connects to the JMX remote server of each node.
If you need more insight into the code of this demo, you can consult the Java source files located in the NetworkInterceptor/src folder.
In addition, There are 2 privileged places you can go to:
$template{name="sample-readme-html-footer"}$


{% extends "home.html" %} {% load staticfiles %} {% block splash %}
PLease fill your Details we will show you whether you will have diabeties or not .


|
"To be or..." genetic
0.1
This script creates random population and evolves it to reach predefined sentense.
|
Namespaces | |
| tobeornottobe | |
Functions | |
| def | tobeornottobe.fit (_g) |
| def | tobeornottobe.fitPopulation (_pop) |
| def | tobeornottobe.sortRanking (_pop, _fit) |
| def | tobeornottobe.compPropability (_poplen, _lr=0.0) |
| def | tobeornottobe.pickPairs (_pop, _prop, _numpairs=None) |
| def | tobeornottobe.crosover (_pairs) |
| def | tobeornottobe.mutate (_pop, _mr=0.001) |
| def | tobeornottobe.generateStart (_count) |
Variables | |
| string | tobeornottobe.patern = "To be or not to be..." |
| Sentence that is the target, should be between 5 and 40 characters. More... | |
| int | tobeornottobe.poplen = 25 |
| Length of population. More... | |
| int | tobeornottobe.log = 10000 |
| Maximum number of iteration before loging out data. More... | |
| bool | tobeornottobe.debug = False |
| True if all steps should be loged out. More... | |
| string | tobeornottobe.key = "" |
| Holds keyboard input. More... | |
| int | tobeornottobe.it = 0 |
| Iteration counter. More... | |
| bool | tobeornottobe.best = False |
| Best individual and its fit value. More... | |
| def | tobeornottobe.popul = generateStart(poplen) |
| List of individuals in population. More... | |
| def | tobeornottobe.prop = compPropability(poplen) |
| Propability values for population. More... | |
| def | tobeornottobe.fitVal = fitPopulation(popul) |
| def | tobeornottobe.pairs = pickPairs(popul, prop) |


sed_eval
- Evaluation toolbox for Sound Event Detection¶
- Toni Heittola<EMAIL_ADDRESS>GitHub, Home)
- Annamaria Mesaros<EMAIL_ADDRESS>Home)
sed_eval
is an open source Python toolbox which provides a standardized, and transparent way to evaluate
sound event detection systems (see Sound Event Detection). In addition to this, it provides tools for evaluating acoustic
scene classification systems, as the fields are closely related (see Acoustic Scene Classification).
The toolbox can be used in any of the following ways:
- By using the included evaluator scripts directly (see Installation instructions and Quickstart: Using the evaluators). This is suitable if the system to be evaluated is implemented using some other platform than Python.
- By importing it and calling it from your own Python code (see Installation instructions and Quickstart: Using sed_eval in Python code)
Citing¶
If you use sed_eval
in a research project, please cite the following paper:
Annamaria Mesaros, Toni Heittola, and Tuomas Virtanen, “Metrics for polyphonic sound event detection”, Applied Sciences, 6(6):162, 2016 [HTML][PDF]


ERCOT: Nodal Market/Nodal Operation
|
|
In December 2008 ERCOT will implement the most profound changes in its wholesale electricity market and electric grid operations since 2001. This change will implement much more granular and complex systems and processes to move to a Nodal market from the current Zonal market operation. It will include a first of its kind electric network modeling system that will combine operating and planning models. This presentation will highlight the major components of the ERCOT Nodal systems and how they will affect the market and how the electric system is operated. |
|
MetroCon 2007 |
|
“Innovating for Society” |
|
Power Engineering |
|
Kent Saathoff joined ERCOT in 1988 as Principal Engineer and in 1996 became Transmission Market Operations Manager. In 2000, he became Director of Technical Operations in preparation for retail electric competition in Texas. He supervised the design, implementation and enhancement of grid operating and wholesale market systems necessary to open the Texas retail market in 2002. He subsequently became Director and then Vice President of ERCOT System Operations, responsible for overseeing real time system and wholesale market operations in ERCOT. Saathoff is an Electrical Engineering graduate of the University of Texas at Austin and a registered professional engineer in Texas. He started his career at Houston Lighting and Power Company in distribution system protection. He then went to the Public Utility Commission of Texas (PUCT) where he was responsible for review and testimony in proceedings regarding transmission and generation project certification, plant depreciation and rate design, and ultimately became Director of the Electric Division. While at the PUCT, he was instrumental in developing initial rules for open transmission access in ERCOT. In 1986 he went to the City of Austin Electric Department where he became Manager of Generation Planning, and remained in this capacity until he joined ERCOT. |
|
About the Speaker: |


This topic introduces the out-of-the-box visualization tools provided by Apicatus. These tools let you view a broad range of API metrics, make comparisons, assess anomalies in API data, and drill down into specific data points.
Video: Check out this brief video to learn about new Edge Analytics Services visualization features and see how you can view trends, spot anomalies, see top performers, and compare different metrics in an API ecosystem.For a quick overview of Analytics Services, who uses them, and why, see Analytics Services overview.