Of the Old Breed is a World War II interactive narrative that follows the life of a soldier. Users are able to choose what path the soldier goes on and decides the life decisions of their life. Ultimately, the user controls the fate of the soldier, becomes immersed in his story and understands consequences of their actions, along with the emotional impacts on their family.
World War II veterans are quickly fading from our daily lives as time continues to march on. In order to preserve their legacies, memories and experiences this interactive narrative is designed to target a large audience that encompasses military families, veterans, historical fiction fans, students, and “nostalgiaists”. Military families and veterans expect any creative work to be respectful to the military. Fans of historical fiction and students will expect historical accuracy. Nostalgiaists like being immersed in a different time period. All of these demographic groups are highly educated and perceptive. They will expect a story that is not only truthful but illuminates a greater meaning than the characters and events taking place.
Of the Old Breed intends to immerse the viewer in story that places the life, actions, and happiness of soldier in their hands along with reliving famous battles from World War II. Users will expect the characters to be human and tangible.
Communication Context
This narrative will be a web app that incorporates other visual mediums including photographs, letters, and audio from World War II. Although these other forms of communication are digitized, they will improve the narrative’s tangibility and have kinesthetic effects on the user.
Design Implications
The user interface needs to follow a visual style in order to reflect the time period. The visual style will incorporate grainy images, muted colors, and handwriting. The HBO series Band of Brothers and The Pacific inspired the art direction Of the Old Breed. The films are vividly rich with textures that resemble the photo graininess and the rough canvas feel of a soldier’s uniforms. As well, they use muted colors to set the bleak, harsh environment of a warfront. The UI will incorporate some skeumorphism, mostly replicating the gritty look of a battlefield. As an interactive narrative, the UI will also be following minimalistic design trends. The images and text are primary focus of attention.
Narrative Structure, Performance Objects, Content
Narrative StructureIt has a branching structure from a single point where a single starting point may lead to multiple developments and outcomes. This branching structure creates a divergently depth navigation system that is impacted by the user’s choices. Technically there are two navigational flows, the path of the soldier and the screen menus. The soldier’s path traverses on different points, whereas the screen menus will only show four item selections. Whichever item selection is chosen influences the soldier’s course.
Performance Objectives 1. Present an accurate WWII narrative that immerse the viewer in the story 2. Show how the consequences of our actions impact family. 3. Create an understanding of how soldiers cope with death breathing down their necks. The three objectives above outline the overall performance objectives of this piece. Nonetheless, the objectives of each part of the story will be achieved through a series of menus.


Dragon BASIC, online at Official Website
STOPTIMER
Stops the user-defined timer from firing.
Arguments
No arguments
Results
Halts the user-defined timer. Note: this will not reset the timer to 0. You must use RESETTIMER to do this.
Example
; create an interrupt for the timer interrupt my_timer_int stoptimer ; stop the timer exit start: ; create a timer and let it go maketimer 10 starttimer ; in 1/10 of a second it will stop automatically…
Back to TIMER functions.


Philippians 1:13
So that my bonds in Christ are manifest in all the palace, and in all other places;


--- title: Scheme Neural Network layout: post tags: [lisp] uuid: 1c9cc2f0-aeac-3ce8-244a-8b9204166335 ---
Two months ago I wanted to experiment with artificial neural networks in Scheme. I've written one in C++ before, but I wanted a pure Scheme implementation. So I wrote one.  The neurons are wired up to push orders along backwards, so most of the work from the implementation point of view is on the output neurons.
If I found an application for it I thought it would be neat to save off the network weights, thus storing the "brain", as an s-expression that could be dropped directly in the source code (something Lisp does very nicely). Even better, if it was a programming competition I could obfuscate the neural network implementation a bit — so that no one knew it was a neural network — and have a mysterious, opaque lump of mixed code and data.
Using it is really simple: once the neural network functions are loaded creating a new arbitrary network is as easy as the following. This creates a network with 4 input neurons, a hidden layer of 5 neurons, a hidden layer with 6 neurons, and an output layer with 3 neurons.
{% highlight scheme %} (new-ann '(4 5 6 3)) ; input 4 bits, output 3 bits {% endhighlight %}
Then the functions train-ann
and run-ann
are
used, with a list of bits as arguments, to train and run the neural
network. Included in the repository are two examples showing this in
action, using the provided helper functions int->blist
(integer to bit list) and blist->int
.
Like most of my neural network experiments this is really disappointing. It doesn't seem to work well outside some trivial or contrived situations, and it quickly slows down after adding only a couple more layers. It might just have to do with the type of network I'm using, and perhaps I should look into more advanced and complex neurons.


{% extends 'basics/base.html' %} {% block content %}
Proof that you aren't a robot by solving the reCAPTCHA.


This image is tagged (loading), which is hidden in image listings by
your current filter Image tags: artist:kittyie, drugs, flutterhigh, fluttershy, heroin, high, needle, semi-grimdark
This image is tagged (loading), which is spoilered in image listings by
your current filter Image tags: artist:kittyie, drugs, flutterhigh, fluttershy, heroin, high, needle, semi-grimdark


Create a texture to apply to a surface or as a reflection or refraction map.
Note: After the initial use of a texture, its dimensions, format, and type cannot be changed. Instead, call [page:.dispose]() on the texture and instantiate a new one.
// load a texture, set wrap mode to repeat
const texture = new THREE.TextureLoader().load( "textures/water.jpg" );
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 4, 4 );
Readonly - unique number for this texture instance.
Read-only flag to check if a given object is of type [name].
[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance. This gets automatically assigned, so this shouldn't be edited.
Optional name of the object (doesn't need to be unique). Default is an empty string.
An image object, typically created using the [page:TextureLoader.load]
method. This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g.,
MP4, OGG/OGV) type supported by three.js.
To use video as a texture you need to have a playing HTML5 video element
as a source for your texture image and continuously update this texture as
long as video is playing - the [page:VideoTexture VideoTexture] class
handles this automatically.
Array of user-specified mipmaps (optional).
How the image is applied to the object. An object type of [page:Textures THREE.UVMapping]
is the default, where the U,V coordinates are used to
apply the map.
See the [page:Textures texture constants] page for other mapping types.
Lets you select the uv attribute to map the texture to. `0` for `uv`, `1` for `uv1`, `2` for `uv2` and `3` for `uv3`.
This defines how the texture is wrapped horizontally and corresponds to
*U* in UV mapping.
The default is [page:Textures THREE.ClampToEdgeWrapping], where the edge
is clamped to the outer edge texels. The other two choices are
[page:Textures THREE.RepeatWrapping] and [page:Textures THREE.MirroredRepeatWrapping].
See the [page:Textures texture constants]
page for details.
This defines how the texture is wrapped vertically and corresponds to *V*
in UV mapping.
The same choices are available as for [property:number wrapS].
NOTE: tiling of images in textures only functions if image dimensions are
powers of two (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...) in
terms of pixels. Individual dimensions need not be equal, but each must be
a power of two. This is a limitation of WebGL, not three.js.
How the texture is sampled when a texel covers more than one pixel. The
default is [page:Textures THREE.LinearFilter], which takes the four
closest texels and bilinearly interpolates among them. The other option is
[page:Textures THREE.NearestFilter], which uses the value of the closest
texel.
See the [page:Textures texture constants] page for details.
How the texture is sampled when a texel covers less than one pixel. The
default is [page:Textures THREE.LinearMipmapLinearFilter], which uses
mipmapping and a trilinear filter.
See the [page:Textures texture constants] page for all possible choices.
The number of samples taken along the axis through the pixel that has the highest density of texels. By default, this value is `1`. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use [page:WebGLRenderer.capabilities renderer.capabilities.getMaxAnisotropy]() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.
The default is [page:Textures THREE.RGBAFormat].
See the [page:Textures texture constants] page for details of other
formats.
The default value is obtained using a combination of [page:Texture.format .format] and [page:Texture.type .type].
The GPU format allows the developer to specify how the data is going to be
stored on the GPU.
See the [page:Textures texture constants] page for details regarding all
supported internal formats.
This must correspond to the [page:Texture.format .format]. The default is
[page:Textures THREE.UnsignedByteType], which will be used for most
texture formats.
See the [page:Textures texture constants] page for details of other
formats.
How much a single repetition of the texture is offset from the beginning, in each direction U and V. Typical range is `0.0` to `1.0`.
How many times the texture is repeated across the surface, in each direction U and V. If repeat is set greater than 1 in either direction, the corresponding Wrap parameter should also be set to [page:Textures THREE.RepeatWrapping] or [page:Textures THREE.MirroredRepeatWrapping] to achieve the desired tiling effect.
How much the texture is rotated around the center point, in radians. Positive values are counter-clockwise. Default is `0`.
The point around which rotation occurs. A value of (0.5, 0.5) corresponds to the center of the texture. Default is (0, 0), the lower left.
Whether to update the texture's uv-transform [page:Texture.matrix .matrix] from the texture properties [page:Texture.offset .offset], [page:Texture.repeat .repeat], [page:Texture.rotation .rotation], and [page:Texture.center .center]. True by default. Set this to false if you are specifying the uv-transform matrix directly.
The uv-transform matrix for the texture. Updated by the renderer from the texture properties [page:Texture.offset .offset], [page:Texture.repeat .repeat], [page:Texture.rotation .rotation], and [page:Texture.center .center] when the texture's [page:Texture.matrixAutoUpdate .matrixAutoUpdate] property is true. When [page:Texture.matrixAutoUpdate .matrixAutoUpdate] property is false, this matrix may be set manually. Default is the identity matrix.
Whether to generate mipmaps (if possible) for a texture. True by default. Set this to false if you are creating mipmaps manually.
If set to `true`, the alpha channel, if present, is multiplied into the
color channels when the texture is uploaded to the GPU. Default is
`false`.
Note that this property has no effect for
[link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap ImageBitmap].
You need to configure on bitmap creation instead. See
[page:ImageBitmapLoader].
If set to `true`, the texture is flipped along the vertical axis when
uploaded to the GPU. Default is `true`.
Note that this property has no effect for
[link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap ImageBitmap].
You need to configure on bitmap creation instead. See
[page:ImageBitmapLoader].
4 by default. Specifies the alignment requirements for the start of each pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries). See [link:http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml glPixelStorei] for more information.
[page:Textures THREE.NoColorSpace] is the default. Textures containing color data should be annotated with [page:Textures THREE.SRGBColorSpace] or [page:Textures THREE.LinearSRGBColorSpace].
This starts at `0` and counts how many times [page:Texture.needsUpdate .needsUpdate] is set to `true`.
A callback function, called when the texture is updated (e.g., when needsUpdate has been set to true and then the texture is used).
Set this to `true` to trigger an update next time the texture is used. Particularly important for setting the wrap mode.
An object that can be used to store custom data about the texture. It should not hold references to functions as these will not be cloned.
The data definition of a texture. A reference to the data source can be shared across textures. This is often useful in context of spritesheets where multiple textures render the same data but with different texture transformations.
[page:EventDispatcher EventDispatcher] methods are available on this class.
Update the texture's uv-transform [page:Texture.matrix .matrix] from the texture properties [page:Texture.offset .offset], [page:Texture.repeat .repeat], [page:Texture.rotation .rotation], and [page:Texture.center .center].
Make copy of the texture. Note this is not a "deep copy", the image is shared. Besides, cloning a texture does not automatically mark it for a texture upload. You have to set [page:Texture.needsUpdate .needsUpdate] to true as soon as its image property (the data source) is fully loaded or ready.
meta -- optional object containing metadata.
Convert the texture to three.js
[link:https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 JSON Object/Scene format].
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Transform the uv based on the value of this texture's [page:Texture.offset .offset], [page:Texture.repeat .repeat], [page:Texture.wrapS .wrapS], [page:Texture.wrapT .wrapT] and [page:Texture.flipY .flipY] properties.
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]


IQ is a more traditional way of looking at smartness and you can not tell how you deal with emotions and reading people. It is normally thought the higher your IQ the smarter you are and this is true in one sense but there is much more to it. EI is about how you read people which is the biggest difference because IQ does not touch on how you can deal with people and your own emotions. It is important to have a good EI because it is important almost everywhere you go. For example, if you had a good EI, so you could communicate well and could read how the other person was feeling and showed it you are much more likely to get hired because employers look for people who can work well in teams, and will not conflict with people who are already working there.
People do like people who can read their emotions and react in an appropriate manner, like if someone is feeling sad and you can see it in the way they act then they may want to talk about it or to be treated differently or if you did something and you should be able to tell if you annoyed them and they are now upset with you other than carrying on and making them more annoyed.


Firestorm (1998)
Director: Dean Semler Cast: Howie Long, Scott Glenn, William Forsythe, Suzy Amis, Rated R: Language, violence
by Nathaniel R. Atcheson<EMAIL_ADDRESS>Clocking in at just under 90 minutes, I find it simply astonishing that the makers of Firestorm were able to rip off every single action film ever created, using not only the same situations, but the same dialogue, stock-characters, and plot devices. There isn't a unique breath in the lungs of this film; every second is regurgitated directly from classic action films like Die Hard, although most of the material is stuff that we continue to see in second-rate action flicks. It is commendable, really, the level of unoriginality in Firestorm, for it must have taken a lot of time and hard work to ensure that every element of the film is the result of cinematic plagiarism.
Firestorm stars Howie Long. People who follow films and not sports (like me) will remember him as one of the bad guys in Broken Arrow; the rest of you are supposed to know him from football. I don't have any qualms against the guy; he's not a terrible actor (though he could use a few lessons on how to sound more natural when speaking dialogue), and he manages to command a reasonable screen presence (he is, after all, an enormous individual). He seems pretty nice, too.
But he can't pick a script if his life depended on it. Broken Arrow was one thing, but Firestorm...such a pity. His character's name is Jesse Graves. In a pointless message preceding the film, we are explained that out of the thousands of firefighters in the country, there are only 400 who are qualified "smokejumpers." Smokejumpers, as the name implies, jump out of airplanes, directly into the fires to stop them from the inside. I didn't understand why the film needed to tell us this in advance, because the conflicts in the film have nothing to do with this profession, and the fact that Jesse is a smokejumper only comes into play once during the film.
 The evil bad guy Randy Earl Shaye (William Forsythe) arranges for a forest fire to be set so that he gets put on a crew to go and put out of the fire. He enlists the help of several other prisoners. Of course, his efforts to escape are initially successful, but as soon as they randomly run into the military-trained bird watcher woman (Suzy Amis), things go awry. That's when the smokejumping part comes in, because Jesse sees the bad guys, dressed up like Canadian firefighters (complete with accents and all!), and parachutes down to them. Soon he finds out they're not who they say they are.
Directed by Dean Semler, Firestorm doesn't look too bad. Some of the cinematography is nice, and one of the action sequences (a fight in a burning trading post) is exciting. Unfortunately, the script is so detestable that nothing in this film is ultimately enjoyable.
Let's start with the Shaye character. He is simply a collaboration of every bad guy you've ever seen.  For instance, he kills off his helpers one-by-one as they're escaping through the forest. This takes almost the entire film, but there's no reason for any of it. He doesn't need their help; it would seem infinitely more logical if he just lined them up and shot them. Instead, he pushes them off cliffs, traps them in burning buildings, and all of this while the other guys aren't looking. Forsythe sneers and hisses his way through the movie, pretending sometimes to be nice to the female hostage, but usually just acting like a licentious pig.
To avoid making this too long, here's the short version of the characters that this film contains: the bad guy who won't die (got to kill him twice!); the strong female character who is completely extraneous to the story; the good bad guy who stands up for the hostages but is ultimately killed by the bad bad guy; the good guy who turns out to have helped the bad guy; and the invincible, good-hearted, bullet-dodging good guy. The film also features gratuitous violence, excessive special effects, implausible action sequences (how much can you really do running around in a forest?), and by-the-book meter and pacing.
Hopefully, you haven't gotten the idea that I recommend this film. Go to the video store and rent The Rock or something. Ignore this film unless you're crazy about Howie Long. Then, maybe you might enjoy it. As I said, I don't watch football. I follow movies, and I've seen enough of them to know that this one stinks.
>From 0-10: 3 Grade: D-
Visit FILM PSYCHOSIS at http://www.pyramid.net/natesmovies
Nathaniel R. Atcheson
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Colour legend: colour intensity indicates the number of associations on that
class
Green: identical classes with the click class (multiple inheritance)
Interaction
Select one or multiple properties: click one or multiple object properties on
the list to see the distribution of the classes having the selected properties
Select union operation for multiple properties: show the classes having any of
the selected properties
Select intersection operation for multiple properties: show the classes having
all the selected properties
Mouseover a class: show the class label and other information
Mouseover a glyph: show the miniature of the compressed structure
Click a class: select a class and highlight the classes having association with
it
Double-click a glyph: collapse or expand it
Collapse to a hill glyph after expanding it: double-click the space above the
double lines
Drag an association label: mouseover the label and drag the label after seeing
the move cursor
Click the minimap: scroll the visualisation canvas to the clicked area if this
area has been scrolled off the screen
Function
Search class label: perform partial match, can use '' '' for full string match
Upload ontology: upload an OWL file and visualise it
Export visualisation: download the visualisation canvas as an SVG file


Successfully registered!
Check the status of your registration in your mobile application
Follow the instructions on your phoneto continue your registration
Using a phone? If you have the Blockpass mobile app already installed:


Co-founder of TibYa Inc. Conseilling and strategy
Football, Martial Arts and rowing
I like to travel and work hard to make the most out of every landscape I see.


Introduction
About IncubateIND Fellowship
INCIND Technology Fellowship is one of its kind, exclusive program for aspiring developers, coders, hackers, designers and innovators to develop their skills, and work/intern with senior technology leaders and industry experts.
IncubateIND over the years have worked with lot of students who despite being very talented are looking at opportunities to sharpen their skills and work with Industry leaders to understand the complexities of technology world. The Fellowship is an initiative that will help students to come in direct touch with technology leaders. The fellowship will also improve the chances of the selected students to get selected and hired by their dream organizations.


from torch.utils.data import Dataset
from torch.utils.data import DataLoader, WeightedRandomSampler
import torch
import numpy as np
import scipy
import json
from sklearn.utils import check_array
import pandas as pd
import warnings
[docs]class TorchDataset(Dataset):
"""
Format for numpy array
Parameters
----------
X : 2D array
The input matrix
y : 2D array
The one-hot encoded target
"""
def __init__(self, x, y):
self.x = x
self.y = y
def __len__(self):
return len(self.x)
def __getitem__(self, index):
x, y = self.x[index], self.y[index]
return x, y
[docs]class SparseTorchDataset(Dataset):
"""
Format for csr_matrix
Parameters
----------
X : CSR matrix
The input matrix
y : 2D array
The one-hot encoded target
"""
def __init__(self, x, y):
self.x = x
self.y = y
def __len__(self):
return self.x.shape[0]
def __getitem__(self, index):
x = torch.from_numpy(self.x[index].toarray()[0]).float()
y = self.y[index]
return x, y
[docs]class PredictDataset(Dataset):
"""
Format for numpy array
Parameters
----------
X : 2D array
The input matrix
"""
def __init__(self, x):
self.x = x
def __len__(self):
return len(self.x)
def __getitem__(self, index):
x = self.x[index]
return x
[docs]class SparsePredictDataset(Dataset):
"""
Format for csr_matrix
Parameters
----------
X : CSR matrix
The input matrix
"""
def __init__(self, x):
self.x = x
def __len__(self):
return self.x.shape[0]
def __getitem__(self, index):
x = torch.from_numpy(self.x[index].toarray()[0]).float()
return x
[docs]def create_sampler(weights, y_train):
"""
This creates a sampler from the given weights
Parameters
----------
weights : either 0, 1, dict or iterable
if 0 (default) : no weights will be applied
if 1 : classification only, will balanced class with inverse frequency
if dict : keys are corresponding class values are sample weights
if iterable : list or np array must be of length equal to nb elements
in the training set
y_train : np.array
Training targets
"""
if isinstance(weights, int):
if weights == 0:
need_shuffle = True
sampler = None
elif weights == 1:
need_shuffle = False
class_sample_count = np.array(
[len(np.where(y_train == t)[0]) for t in np.unique(y_train)]
)
weights = 1.0 / class_sample_count
samples_weight = np.array([weights[t] for t in y_train])
samples_weight = torch.from_numpy(samples_weight)
samples_weight = samples_weight.double()
sampler = WeightedRandomSampler(samples_weight, len(samples_weight))
else:
raise ValueError("Weights should be either 0, 1, dictionnary or list.")
elif isinstance(weights, dict):
# custom weights per class
need_shuffle = False
samples_weight = np.array([weights[t] for t in y_train])
sampler = WeightedRandomSampler(samples_weight, len(samples_weight))
else:
# custom weights
if len(weights) != len(y_train):
raise ValueError("Custom weights should match number of train samples.")
need_shuffle = False
samples_weight = np.array(weights)
sampler = WeightedRandomSampler(samples_weight, len(samples_weight))
return need_shuffle, sampler
[docs]def create_dataloaders(
X_train, y_train, eval_set, weights, batch_size, num_workers, drop_last, pin_memory
):
"""
Create dataloaders with or without subsampling depending on weights and balanced.
Parameters
----------
X_train : np.ndarray
Training data
y_train : np.array
Mapped Training targets
eval_set : list of tuple
List of eval tuple set (X, y)
weights : either 0, 1, dict or iterable
if 0 (default) : no weights will be applied
if 1 : classification only, will balanced class with inverse frequency
if dict : keys are corresponding class values are sample weights
if iterable : list or np array must be of length equal to nb elements
in the training set
batch_size : int
how many samples per batch to load
num_workers : int
how many subprocesses to use for data loading. 0 means that the data
will be loaded in the main process
drop_last : bool
set to True to drop the last incomplete batch, if the dataset size is not
divisible by the batch size. If False and the size of dataset is not
divisible by the batch size, then the last batch will be smaller
pin_memory : bool
Whether to pin GPU memory during training
Returns
-------
train_dataloader, valid_dataloader : torch.DataLoader, torch.DataLoader
Training and validation dataloaders
"""
need_shuffle, sampler = create_sampler(weights, y_train)
if scipy.sparse.issparse(X_train):
train_dataloader = DataLoader(
SparseTorchDataset(X_train.astype(np.float32), y_train),
batch_size=batch_size,
sampler=sampler,
shuffle=need_shuffle,
num_workers=num_workers,
drop_last=drop_last,
pin_memory=pin_memory,
)
else:
train_dataloader = DataLoader(
TorchDataset(X_train.astype(np.float32), y_train),
batch_size=batch_size,
sampler=sampler,
shuffle=need_shuffle,
num_workers=num_workers,
drop_last=drop_last,
pin_memory=pin_memory,
)
valid_dataloaders = []
for X, y in eval_set:
if scipy.sparse.issparse(X):
valid_dataloaders.append(
DataLoader(
SparseTorchDataset(X.astype(np.float32), y),
batch_size=batch_size,
shuffle=False,
num_workers=num_workers,
pin_memory=pin_memory,
)
)
else:
valid_dataloaders.append(
DataLoader(
TorchDataset(X.astype(np.float32), y),
batch_size=batch_size,
shuffle=False,
num_workers=num_workers,
pin_memory=pin_memory,
)
)
return train_dataloader, valid_dataloaders
[docs]def create_explain_matrix(input_dim, cat_emb_dim, cat_idxs, post_embed_dim):
"""
This is a computational trick.
In order to rapidly sum importances from same embeddings
to the initial index.
Parameters
----------
input_dim : int
Initial input dim
cat_emb_dim : int or list of int
if int : size of embedding for all categorical feature
if list of int : size of embedding for each categorical feature
cat_idxs : list of int
Initial position of categorical features
post_embed_dim : int
Post embedding inputs dimension
Returns
-------
reducing_matrix : np.array
Matrix of dim (post_embed_dim, input_dim) to performe reduce
"""
if isinstance(cat_emb_dim, int):
all_emb_impact = [cat_emb_dim - 1] * len(cat_idxs)
else:
all_emb_impact = [emb_dim - 1 for emb_dim in cat_emb_dim]
acc_emb = 0
nb_emb = 0
indices_trick = []
for i in range(input_dim):
if i not in cat_idxs:
indices_trick.append([i + acc_emb])
else:
indices_trick.append(
range(i + acc_emb, i + acc_emb + all_emb_impact[nb_emb] + 1)
)
acc_emb += all_emb_impact[nb_emb]
nb_emb += 1
reducing_matrix = np.zeros((post_embed_dim, input_dim))
for i, cols in enumerate(indices_trick):
reducing_matrix[cols, i] = 1
return scipy.sparse.csc_matrix(reducing_matrix)
[docs]def create_group_matrix(list_groups, input_dim):
"""
Create the group matrix corresponding to the given list_groups
Parameters
----------
- list_groups : list of list of int
Each element is a list representing features in the same group.
One feature should appear in maximum one group.
Feature that don't get assigned a group will be in their own group of one feature.
- input_dim : number of feature in the initial dataset
Returns
-------
- group_matrix : torch matrix
A matrix of size (n_groups, input_dim)
where m_ij represents the importance of feature j in group i
The rows must some to 1 as each group is equally important a priori.
"""
check_list_groups(list_groups, input_dim)
if len(list_groups) == 0:
group_matrix = torch.eye(input_dim)
return group_matrix
else:
n_groups = input_dim - int(np.sum([len(gp) - 1 for gp in list_groups]))
group_matrix = torch.zeros((n_groups, input_dim))
remaining_features = [feat_idx for feat_idx in range(input_dim)]
current_group_idx = 0
for group in list_groups:
group_size = len(group)
for elem_idx in group:
# add importrance of element in group matrix and corresponding group
group_matrix[current_group_idx, elem_idx] = 1 / group_size
# remove features from list of features
remaining_features.remove(elem_idx)
# move to next group
current_group_idx += 1
# features not mentionned in list_groups get assigned their own group of singleton
for remaining_feat_idx in remaining_features:
group_matrix[current_group_idx, remaining_feat_idx] = 1
current_group_idx += 1
return group_matrix
[docs]def check_list_groups(list_groups, input_dim):
"""
Check that list groups:
- is a list of list
- does not contain twice the same feature in different groups
- does not contain unknown features (>= input_dim)
- does not contain empty groups
Parameters
----------
- list_groups : list of list of int
Each element is a list representing features in the same group.
One feature should appear in maximum one group.
Feature that don't get assign a group will be in their own group of one feature.
- input_dim : number of feature in the initial dataset
"""
assert isinstance(list_groups, list), "list_groups must be a list of list."
if len(list_groups) == 0:
return
else:
for group_pos, group in enumerate(list_groups):
msg = f"Groups must be given as a list of list, but found {group} in position {group_pos}." # noqa
assert isinstance(group, list), msg
assert len(group) > 0, "Empty groups are forbidding please remove empty groups []"
n_elements_in_groups = np.sum([len(group) for group in list_groups])
flat_list = []
for group in list_groups:
flat_list.extend(group)
unique_elements = np.unique(flat_list)
n_unique_elements_in_groups = len(unique_elements)
msg = f"One feature can only appear in one group, please check your grouped_features."
assert n_unique_elements_in_groups == n_elements_in_groups, msg
highest_feat = np.max(unique_elements)
assert highest_feat < input_dim, f"Number of features is {input_dim} but one group contains {highest_feat}." # noqa
return
[docs]def filter_weights(weights):
"""
This function makes sure that weights are in correct format for
regression and multitask TabNet
Parameters
----------
weights : int, dict or list
Initial weights parameters given by user
Returns
-------
None : This function will only throw an error if format is wrong
"""
err_msg = """Please provide a list or np.array of weights for """
err_msg += """regression, multitask or pretraining: """
if isinstance(weights, int):
if weights == 1:
raise ValueError(err_msg + "1 given.")
if isinstance(weights, dict):
raise ValueError(err_msg + "Dict given.")
return
[docs]def validate_eval_set(eval_set, eval_name, X_train, y_train):
"""Check if the shapes of eval_set are compatible with (X_train, y_train).
Parameters
----------
eval_set : list of tuple
List of eval tuple set (X, y).
The last one is used for early stopping
eval_name : list of str
List of eval set names.
X_train : np.ndarray
Train owned products
y_train : np.array
Train targeted products
Returns
-------
eval_names : list of str
Validated list of eval_names.
eval_set : list of tuple
Validated list of eval_set.
"""
eval_name = eval_name or [f"val_{i}" for i in range(len(eval_set))]
assert len(eval_set) == len(
eval_name
), "eval_set and eval_name have not the same length"
if len(eval_set) > 0:
assert all(
len(elem) == 2 for elem in eval_set
), "Each tuple of eval_set need to have two elements"
for name, (X, y) in zip(eval_name, eval_set):
check_input(X)
msg = (
f"Dimension mismatch between X_{name} "
+ f"{X.shape} and X_train {X_train.shape}"
)
assert len(X.shape) == len(X_train.shape), msg
msg = (
f"Dimension mismatch between y_{name} "
+ f"{y.shape} and y_train {y_train.shape}"
)
assert len(y.shape) == len(y_train.shape), msg
msg = (
f"Number of columns is different between X_{name} "
+ f"({X.shape[1]}) and X_train ({X_train.shape[1]})"
)
assert X.shape[1] == X_train.shape[1], msg
if len(y_train.shape) == 2:
msg = (
f"Number of columns is different between y_{name} "
+ f"({y.shape[1]}) and y_train ({y_train.shape[1]})"
)
assert y.shape[1] == y_train.shape[1], msg
msg = (
f"You need the same number of rows between X_{name} "
+ f"({X.shape[0]}) and y_{name} ({y.shape[0]})"
)
assert X.shape[0] == y.shape[0], msg
return eval_name, eval_set
[docs]def define_device(device_name):
"""
Define the device to use during training and inference.
If auto it will detect automatically whether to use cuda or cpu
Parameters
----------
device_name : str
Either "auto", "cpu" or "cuda"
Returns
-------
str
Either "cpu" or "cuda"
"""
if device_name == "auto":
if torch.cuda.is_available():
return "cuda"
else:
return "cpu"
elif device_name == "cuda" and not torch.cuda.is_available():
return "cpu"
else:
return device_name
[docs]class ComplexEncoder(json.JSONEncoder):
[docs] def default(self, obj):
if isinstance(obj, (np.generic, np.ndarray)):
return obj.tolist()
# Let the base class default method raise the TypeError
return json.JSONEncoder.default(self, obj)
[docs]def check_warm_start(warm_start, from_unsupervised):
"""
Gives a warning about ambiguous usage of the two parameters.
"""
if warm_start and from_unsupervised is not None:
warn_msg = "warm_start=True and from_unsupervised != None: "
warn_msg = "warm_start will be ignore, training will start from unsupervised weights"
warnings.warn(warn_msg)
return
[docs]def check_embedding_parameters(cat_dims, cat_idxs, cat_emb_dim):
"""
Check parameters related to embeddings and rearrange them in a unique manner.
"""
if (cat_dims == []) ^ (cat_idxs == []):
if cat_dims == []:
msg = "If cat_idxs is non-empty, cat_dims must be defined as a list of same length."
else:
msg = "If cat_dims is non-empty, cat_idxs must be defined as a list of same length."
raise ValueError(msg)
elif len(cat_dims) != len(cat_idxs):
msg = "The lists cat_dims and cat_idxs must have the same length."
raise ValueError(msg)
if isinstance(cat_emb_dim, int):
cat_emb_dims = [cat_emb_dim] * len(cat_idxs)
else:
cat_emb_dims = cat_emb_dim
# check that all embeddings are provided
if len(cat_emb_dims) != len(cat_dims):
msg = f"""cat_emb_dim and cat_dims must be lists of same length, got {len(cat_emb_dims)}
and {len(cat_dims)}"""
raise ValueError(msg)
# Rearrange to get reproducible seeds with different ordering
if len(cat_idxs) > 0:
sorted_idxs = np.argsort(cat_idxs)
cat_dims = [cat_dims[i] for i in sorted_idxs]
cat_emb_dims = [cat_emb_dims[i] for i in sorted_idxs]
return cat_dims, cat_idxs, cat_emb_dims


tuiActiveZone
allows to track a scope that user
interacts with. For example, for closing dropdown on blur
Import TuiActiveZoneModule
into a module where
you want to use our component
Add to the template and subscribe to a change:


See submissions, run their code (beta), and please cooperate making this better!
Documentation is coming.


Merge's primary mission is to provide a platform that aids people in the process of discovering and sharing music. Music is a powerful tool for creating and fostering relationships, and we aim to provide ways to encourage people to connect with friends and acquaintances through music.
Merge's value is rooted in its ability to automate the process of music discovery and selection based on peers, while allowing users to easily share their music with others who would enjoy it.
The advent of digital music has brought with it plenty of tools for discovering new music. However, current music discovery tools do not address two significant aspects of the music discovery process; music is a incredibly social form of art that connects users, and users often associate certain songs, artists, and genres with specific places, activities, or friends. The social element of music discovery is so inherent to the process of music discovery that some users only listen to new songs or artists on the suggestion of a trusted friend. Currently, the only tools that users have to facilitate this social music discovery require users to actively participate in this process. Merge seeks to remedy this by automating the process of music discovery and selection based on music preferences of peers.


ML-ENSEMBLE
| author: | Sebastian Flennerhag |
|---|---|
| copyright: | 2017-2018 |
| license: | MIT |
Metric utilities and functions.
mlens.metrics¶
Data¶
-
class
mlens.metrics.
Data
(data=None, padding=2, decimals=2)[source]¶ Bases:
collections.OrderedDict
Wrapper class around dict to get pretty prints
Data
is an ordered dictionary that implements a dedicated pretty print method for a nested dictionary. Printing aData
dictionary provides a human-readable table. The input dictionary is expected to have two levels: the first level gives the columns and the second level the rows. Rows names are parsed as[OUTER]/[MIDDLE].[INNER]--[IDX]
, where IDX has to be an integer. All entries are optional.See also
Warning
Data
is an internal class that expects a particular functions. This class cannot be used as a general drop-in replacement for the standarddict
class.Examples
>>> from mlens.metrics import Data >>> d = [('row-idx-1.row-idx-2.0.0', {'column-1': 0.1, 'column-2': 0.1})] >>> data = Data(d) >>> print(data) column-a column-b row-idx-1 row-idx-2 0.10 0.20
assemble_data¶
-
mlens.metrics.
assemble_data
(data_list)[source]¶ Build a data dictionary out of a list of entries and data dicts
Given a list named tuples of dictionaries,
assemble_data()
returns a nested ordered dictionary with data keys as outer keys and tuple names as inner keys. The returned dictionary can be printed in tabular format byassemble_table()
.See also
Examples
>>> from mlens.metrics import assemble_data, assemble_table >>> d = [('row-idx-1.row-idx-2.a.b', {'column-1': 0.1, 'column-2': 0.1})] >>> print(assemble_table(assemble_data(d))) column-2-m column-2-s column-1-m column-1-s row-idx-1 row-idx-2 0.10 0.00 0.10 0.00
assemble_table¶
-
mlens.metrics.
assemble_table
(data, padding=2, decimals=2)[source]¶ Construct data table from input dict
Given a nested dictionary formed by
assemble_data()
,assemble_table()
returns a string that prints the contents of the input in tabular format. The input dictionary is expected to have two levels: the first level gives the columns and the second level the rows. Rows names are parsed as[OUTER]/[MIDDLE].[INNER]--[IDX]
, where IDX must be an integer. All entries are optional.See also
Examples
>>> from mlens.metrics import assemble_data, assemble_table >>> d = [('row-idx-1.row-idx-2.a.b', {'column-1': 0.1, 'column-2': 0.1})] >>> print(assemble_table(assemble_data(d))) column-2-m column-2-s column-1-m column-1-s row-idx-1 row-idx-2 0.10 0.00 0.10 0.00
make_scorer¶
-
mlens.metrics.
make_scorer
(score_func, greater_is_better=True, needs_proba=False, needs_threshold=False, **kwargs)[source]¶ Make a scorer from a performance metric or loss function.
This factory function wraps scoring functions for use in GridSearchCV and cross_val_score. It takes a score function, such as
accuracy_score
,mean_squared_error
,adjusted_rand_index
oraverage_precision
and returns a callable that scores an estimator’s output.Read more in the User Guide.
Parameters: - score_func (callable,) – Score function (or loss function) with signature
score_func(y, y_pred, **kwargs)
. - greater_is_better (boolean, default=True) – Whether score_func is a score function (default), meaning high is good, or a loss function, meaning low is good. In the latter case, the scorer object will sign-flip the outcome of the score_func.
- needs_proba (boolean, default=False) – Whether score_func requires predict_proba to get probability estimates out of a classifier.
- needs_threshold (boolean, default=False) –
Whether score_func takes a continuous decision certainty. This only works for binary classification using estimators that have either a decision_function or predict_proba method.
For example
average_precision
or the area under the roc curve can not be computed using discrete predictions alone. - **kwargs (additional arguments) – Additional parameters to be passed to score_func.
Returns: scorer – Callable object that returns a scalar score; greater is better.
Return type: callable
Examples
>>> from sklearn.metrics import fbeta_score, make_scorer >>> ftwo_scorer = make_scorer(fbeta_score, beta=2) >>> ftwo_scorer make_scorer(fbeta_score, beta=2) >>> from sklearn.model_selection import GridSearchCV >>> from sklearn.svm import LinearSVC >>> grid = GridSearchCV(LinearSVC(), param_grid={'C': [1, 10]}, ... scoring=ftwo_scorer)
- score_func (callable,) – Score function (or loss function) with signature
rmse¶
-
mlens.metrics.
rmse
(y, p)[source]¶ Root Mean Square Error.
\[RMSE(\mathbf{y}, \mathbf{p}) = \sqrt{MSE(\mathbf{y}, \mathbf{p})},\]with
\[MSE(\mathbf{y}, \mathbf{p}) = |S| \sum_{i \in S} (y_i - p_i)^2\]Parameters: - y (array-like of shape [n_samples, ]) – ground truth.
- p (array-like of shape [n_samples, ]) – predicted labels.
Returns: z – root mean squared error.
Return type:
mape¶
-
mlens.metrics.
mape
(y, p)[source]¶ Mean Average Percentage Error.
\[MAPE(\mathbf{y}, \mathbf{p}) = |S| \sum_{i \in S} | \frac{y_i - p_i}{y_i} |\]Parameters: - y (array-like of shape [n_samples, ]) – ground truth.
- p (array-like of shape [n_samples, ]) – predicted labels.
Returns: z – mean average percentage error.
Return type:
wape¶
-
mlens.metrics.
wape
(y, p)[source]¶ Weighted Mean Average Percentage Error.
\[WAPE(\mathbf{y}, \mathbf{p}) = \frac{\sum_{i \in S} | y_i - p_i|}{ \sum_{i \in S} |y_i|}\]Parameters: - y (array-like of shape [n_samples, ]) – ground truth.
- p (array-like of shape [n_samples, ]) – predicted labels.
Returns: z – weighted mean average percentage error.
Return type:


BusMall
Please place your order.
Contact information
name:
Street:
City:
State:
zipcode:
Phone Number:
Submit
Shopping List
- select -
Bag
Banana
Bathroom


Circo Intro
Schäffer Krisztián
Goal: Close the gap
Brains
Deep Learning
Representation
Sparse
Dense
Structure
Feedback loops
Layers (DAG)
Learning
Local
Global
Timing
Async
Synchronised
Scale
10
15
10
11
(2021)
Vision:
Incorporating sparsity into deep learning
Outer model:
Sparse
Async
Feedback loops
Agency
Built from dense DL bricks
Local learning
Actor Model
Model of concurrent computation
Actors
share nothing
are stateful
and reactive
Asynchronous messaging
Location transparency
Physics inspired
The system grows from a spawn
Demo
CircoCore architecture
Alternative, Akka-like architecture
Infoton Optimization
Plans
Stabilization, Documentation
Support async and blocking
Persistence
Higher level language (macro DSL)
Infoton Optimization Research


{% extends 'marketplace_base.html' %} {% block title %}I3 Marketplace | Edit Product{% endblock %} {% block page_content %} {% include "form_include.html" with form=form submit_btn=submit_btn %} {% endblock%}


Introduction
The Modern Language Association (MLA) specifies a standard format for essays and research papers written in an academic setting:
Follow the steps below to format your essay or research paper whenever you use Microsoft Word 2007. Note: If you are writing a research paper in the MLA format that includes a title page and an outline page or pages before the body of the paper, you can download a template and substitute your information on the title, outline pages, and first page of the body of the paper. This template includes no page number on the title page, lower case Roman numerals beginning with page "i" on the outline pages, and Arabic numerals beginning with page "1" on the first page of the body of the paper.
When you open MS Word 2007, you will be looking at the the "Home" group of commands displayed below the MS Word 2007 Ribbon. Usually the "Normal" style in the MS Word 2007 program has been set with page margins of 1 inch top, bottom, left, and right. If those margins have been changed in your program, select the Page Layout tab from the ribbon at the top of Microsoft Word 2007 and then click "Margins" in the Page Setup group:
From the Page Setup dialog box, set each margin at 1" inch by entering the number or using the up or down arrows beside each margin setting. Then click OK, as shown below.
From the Home tab, in the Styles group, right-click Normal, and then click Modify.
Under Formatting, click Double Space. Formatting for the entire document changes to double spacing.
Note: If you want to double space only a portion of a document, use your mouse to select the text that you want to change. If you are not already viewing from the Home tab, click the Home tab on the ribbon:
From the Home tab, look in the Paragraph group, and click the Line Spacing icon and then click the line spacing that you desire for the selected text.
MLA format requires a header in the upper right-hand corner of each page set at 1/2" from the top of the page with the author's last name and a page number. To create the header and set automatic page numbering select View and then Header and Footer from the Menu Bar:
On the Insert tab, in the Header & Footer group, click Header.
When the "Built-In" header options menu appears, click Edit Header at the bottom of the screen.
You should have already set your margins to 1 inch left and right. The next step is to set your header and footer postion to .5" from the top and bottom as shown below. Now press your Tab key twice to move the insertion point to the right of the screen. Then type your last name in the header section. Then press the spacebar once to leave a single blank space after your last name.
The next step is to insert automatic page numbering in the blank space after your name. Click the Page Number icon on the Ribbon at the top of your screen and then click Current Position and then click the "Plain Number" option.
Tip To save the header or footer that you created to the gallery of header or footer options, select the text or graphics in the header or footer, and then click Save Selection as New Header or Save Selection as New Footer.
Immediately after typing the final line of your paper, press the CTRL key and the ENTER key at the same time to begin a new page. Your header with your last name and automatic page numbering should appear at the top left of your paper if you are viewing your document in the "print layout" view option (from "View" on your menu bar).
Please note that the MLA Style of docoumentation no longer requires the listing of the Internet address or URL since those addresses may change frequently. The APA Style, however, still requires the use of the URL but not underlined. If your MS Word AutoCorrect option is in the default setting, when you type an Internet address or paste an Internet address into your document and then press the spacebar, the address will become a hypertext link. This is useful if you are writing a document and want to send the file to someone as an email attachment. Then the person can open the document and read it on the computer screen and click the link to connect to the Internet address.
When you insert an Internet address into a bibliography , it should not be underlined and highlighted as hypertext is. You can click your right mouse button and then click "remove hyperlink," but the hypertext will appear again for the next listing.
The best preparation for tomorrow is doing your best today.


--- layout: post title: radio silence date: '2013-01-30T20:16:00-05:00' tags: [] tumblr_url: http://poetry.liabogoev.com/post/54968361732/radio-silence ---
it’s not like I can feel you here
your warmth, your touch, your eyes on me
you’re far away
connected through wires and invisible waves
and yet when you leave
I feel just as empty
as if you walked out of the room.


The Psychic Game
Guess what letter I'm thinking of... Click or Type to play!
Wins:
Losses:
Guesses Remaining:
Guesses So Far:
???


Shop Name
Delicious Red Apples straight from the ground to your front door.
Add to Cart
Qty: 1 2 3 4 5
Soft and rich in flavor, these bananas are one of our best selling fruits.
You won't find juicier watermelons anywhere else.
These sweet strawberries are a great snack for everyone to enjoy.
Our friends from Florida only grow the best citrus fruit for you and your family.


Demo
Smart Vandalism Detection
Drag & Drop Images Here
-or-
Click to open the file Browser
Debug
Uploads
No Files have been selected/dropped yet.
You can get the code here
https://github.com/Mongoool/Vandalism-Detection
×


If you would like more information or a call back from one of our team
or you can call us today
0161 7911 233
To learn more about power of attorney, just fill-in your email address and we'll contact you by email/phone.
A will protects your beneficiaries’ interests after you’ve died, but a Lasting Power of Attorney protects your own interests while you’re still alive – up to the point where you die. The moment you die, the power of attorney ceases and your will becomes relevant instead. There is no overlap.
In essence, by setting up a Lasting Power of Attorney, you give someone you trust the authority to make decisions and to act on your behalf and in your best interests – while you’re still living and breathing.
Once you reach a point in time where you need someone to act for you, it’s often too late to get a Lasting Power of Attorney set up. It’s like insurance in that respect. Once it is all set up though, you can forget about it and hope it never has to be used.
A power of attorney is vital for anyone – regardless of age – who has money and assets to protect and/or who wants someone to act in their best interest in terms of healthcare choices should they be unable to make decisions for themselves.
Consider the prospect of a complete stranger making decisions about your money, your house or your health and wellbeing – including where you live – while your family is powerless to do anything to protect you. That’s an example of the kind of scenario a Lasting Power of Attorney helps prevent.
Remember, you want this person/these people to fight for you should you no longer be able to act for yourself or make decisions for yourself while you’re still alive. These are called your attorneys. You are called the donor – because you’re giving them power to act.
We'll call you.
If you do wait until you are no longer mentally able to act for yourself, the Court of Protection may not allow a power of attorney to be set up any more. Instead, your family will have to apply to the Court for a Deputyship order.
This means that your family is then likely to have to account for their every action and expense on your behalf – including where joint bank accounts are concerned. It can be very difficult – and having to apply for a Deputyship can also be a long process and expensive, and it would be at a time when your family is already deeply distressed about what may have happened to you.
Setting up a Lasting Power of Attorney now (known as ‘making’ a power of attorney) is straightforward and it gives reassurance that if you do become incapacitated for whatever reason, whoever you choose as your attorney(s) can act immediately on your behalf and in your best interests.
Here at Money Matters Online we have seen many cases where someone has become unable to act for themselves, but there is no power of attorney. This means your families hands would be tied and they would be unable to act on your behalf in any assessment or appeal process for care funding, for example.
Many families have good reason to feel that the care authorities are not on their side, and they are left feeling powerless while the authorities make decisions on a relative’s behalf. This is not something to relish.
Family members with power of attorney, on the other hand, have been able to fight their relative’s corner and protect their interests when dealing with the NHS and the local authority. Without such a document they may not even have been able to access their relative’s bank account on their relative’ behalf to pay a care home or care provider – or to influence the kind of care that will be provided – or even where it will be provided.
Also, spouses should not assume that one spouse can necessarily act for the other just because they’re married. The Court may not see it that way. A spouse often needs legal authority to act for the other – through a power of attorney.
If you would like more information or a call back from one of our team
or you can call us today
0161 7911 233
Remember. Money Matters Online makes your personal wealth our top priority. We take that responsibility to our clients very seriously.


6 references to HostCallReceived
System.Management.Automation (6)
engine\remoting\client\ClientRemotePowerShell.cs (3)
572
if (
HostCallReceived
!= null)
582
HostCallReceived
.SafeInvoke(this, args);
586
HostCallReceived
.SafeInvoke(this, eventArgs);
engine\remoting\client\remotepipeline.cs (2)
899
_powershell.RemotePowerShell.
HostCallReceived
+= HandleHostCallReceived;
935
_powershell.RemotePowerShell.
HostCallReceived
+= HandleHostCallReceived;
engine\remoting\client\RunspaceRef.cs (1)
320
powerShell.RemotePowerShell.
HostCallReceived
+= HandleHostCall;


+medCabinet
New account
Name:
E-mail:
Password:
Password again:
I agree with terms
Create
Already have an account?
Log In


Failover tests
This page should describe the operations executed using BackgroundOperationsManager, started|stopped using BackgroundStressors(Start|Stop)Stage, and checked using BackgroundStressorsCheckStage. Other stages used during failover testing such as Service(Start|Stop) stage or WaitForTopologyTopology(Event|Settle)Stage won't be described, these are more or less trivial, refer to their documentation.
Legacy and LogValues
Initially we have used tactics known now as Legacy: we spawn several threads issuing a put/get operation every 100 ms (check property delayBetweenRequests scoped into GeneralConfiguration) - those threads are not terminated after the end of the stage but kept working on the background. There are another threads to retrieve and record statistics. In order to check whether the cache has all entries, we have used CheckCacheDataStage.
This approach works for checking the lag of response times, see how the throughput drops when one node crashes etc. That makes use of this 'legacy logic ' valid for cases, where we want to check the performance during failover.
However, it's not a good functional test: the stressors mindlessly overwrite all the entries (not firing any alarm if the entry is lost) and by the time CheckCacheDataStage runs, the entry can be already loaded again. Even if those checks were in place, only really missing entries would be detected; but there's much more that can go wrong: not applied writes, double writes, inconsistencies and so on.
That's why 'log values logic' was devised. This is activated by setting property log-logic-enabled to true. It is similar to legacy logic in some ways: we start some threads and let them run on the background. Then we run another stages, restarting the nodes and whatever we like, but every while we insert the BackgroundStressorsCheckStage: this has very low overhead, it just checks whether some error was detected and fails the benchmark if it was.
It's important to note that the implementation of log checkers was developed and tested only on Infinispan. There can be subtle oddities for example in the transactions behaviour (ACID? LOL!) that were already fixed but there could be false positives for other caches/grids.
The principle of log logic is quite simple: we don't use opaque fixed-size values as in legacy mode (where performance is the top priority) but the values are append-only lists. There are two types of threads: stressor threads, which have deterministic sequence of accessing the entries, and during each operation append operationId to the value (reading the value first, appending operationId locally and writing the entry again). Then there are checker threads, which know the sequence of stressors and follow them, checking that each operation was correctly appended.
Above I have written that we always append to the value. How do we test removes, then? In fact, for each logical key there are two entries: under key 'key_0000000000001234' and 'key_FFFFFFFFFFFFEDCB' - see, the binary complement of the number. When we want to execute remove, we append operationId to the value and write it under the complementary key. Then we can safely remove the value under primary key.
The stressors don't keep any data about their entries in memory but the sequence seed and current operationId. When they want to execute operation on given key, they have to load the entry first. Therefore, if the remove was not executed (we would read the old value), we would continue without the operationId that 'removed' the entry and checkers would soon detect that.
By default there are 10 stressor threads on each node. The checkers on one node have to check all stressors from all nodes in order to guarantee that each node has correct view of the data. However, we don't keep a checker for any stressor on each node: instead, just the expected state of those stressors are kept and we have a pool of checkers which check those stressors.
The checkers must know what was the last operation of any stressor (otherwise, if the checker was faster, it would report missing operations because the stressor did not managed to execute it so far). All communication happens through cache: the stressor regularly writes its last operationId and seed for the deterministic sequence under a special key. This entry is also read by the stressor after the node where the stressor resides is restarted, so that it know where to begin from.
If we executed the test for long enough, the log values would grow without bounds. That's why each checker stores the last checked operation in the cache - if stressor finds out that the entry has grown too big, it finds the highest operationId that was already checked on all nodes and truncates operationIds up to this value. The checkers also use their last checked record when the node is restarted.
There's one more option 'ignoreDeadCheckers' that can be useful for elasticity tests: if the cluster shrinks to single node, the stressors on one node cannot progress as the local writes are fast, the checkers on dead nodes cannot follow and the entry grows to max size soon. That's why the stressor may decide to truncate entries that were not checked, but records this under special key so that the checkers that are spawned after the other nodes start again don't panic.
If property sharedKeys is set to false (this is the default), each stressor thread operates on its private set of keys. Basic operations (put, get, remove) are enough for that. However, when you set sharedKeys to true, all stressors update the same set concurrently. Here we need the conditional operations such as putIfAbsent, conditional replace and conditional remove. Also, the entry value (aka log value) has to keep stressorId along with each operationId.
Private log logic
This is the simplest mode: the stressor retrieves primary value, and if it is null, it retrieves complementary key. Then it writes the new value (either overwriting the primary key or backing up to complementary entry) and then removes the other entry.
The checker tries to retrieve primary value, and if it is null, retrieves the complementary one. There's a chance that the stressor managed to 'move' the value between those two gets, therefore, the checker tries the process above 100 times to make sure the value was really lost. When it manages to retrieve some value, it must contain the operationId (it doesn't matter whether this is the older or newer one).
Shared log logic
The stressor has to always retrieve both values (primary and complementary), and the new value is union of those two with the operationId appended. That's because we cannot update those two values atomically (without transactions), we have to deal with the fact that concurrent operations may fails.
Later it tries to write the new value under appropriate key: however it has to use conditional operation to make sure that the entry was not overwritten after the old value was retrieved. If this conditional operation fails, we have to start from the beginning (just for this operation, naturally). The removal of the other entry is also conditional, but if this one fails, we don't repeat the operation - another thread has probably again moved the value.
The checker has to cope with that: it tries to find the operationId for 100 times from either primary or complementary entry. When it is not successful after that many attempts, error is recorded.
Transactions
The basic difference is simple: we just execute begin() and commit() every few operations. If the commit fails, we have to start from the beginning of the transaction - we have to be able to rollback the stressor seed to this moment.
However, there's one unexpected behaviour of Infinispan: reading two values (even within transaction) that are modified inside single transaction can retrieve one value before the transaction and second after that. Multiple writes are not atomic with respect to reads.
That means, that we have to:
- write the last stressor operation in separate transaction (after the transaction whose operations we are confirming is committed)
- separate updates/inserts and removes to two transactions, execute updates first and removes only after that (otherwise, we could see the remove before insert, and the value would appear to be lost for a while)
- we also have to make sure that when we separate the updates this way, we don't keep remove for both primary and complementary value in one transaction (that way we would remove the value instead of just moving it): only the last remove can win
Clustered listeners
Clustered listeners is quite a new feature, and support in RG was not thoroughly tested yet. However, the implementation is quite simple: we register clustered listener for every operation and then record those operations to the same record as regular confirmation from the checker thread. Then, check for this stressor cannot follow until the notification is receiver as well as the value through regular get.
Component overview
BackgroundOpsManager (BOM) - core component responsible for managing and orchestrating test run. BOM is is able to survive service restarts, as it is stored in slave state. Additionally, it is able to react to service restarts by automatically starting/stopping threads (by implementing ServiceListener). Its logic is delegated to separate classes:
FailureManager - responsible for keeping track of failures that occurred during test run (missing operations, missing notifications, stale reads, failed transaction attempts, delayed remove errors)
ThreadManager - manages all stressor and checker threads (start/stop/wait). Starts KeepAliveTask, which regularly inserts a value containing slave index and current timestamp. Some tests use it to determine whether node is dead.
StressorRecordPool - FIFO structure (queue) containing StressorRecords.
StressorRecord - records are used by checker threads to keep track of latest key checks. Generally speaking, they contain current key id, operation id, latest successful/unsuccessful check timestamps that enable us (BackgroundStressorsCheckStage) to determine whether we make any progress. It is important to note that StressorRecords are created with respect to number of stressors and their key ranges. For illustration, consider an example with 4 nodes, 10 stressors per node and 10000 keys. Total of 40 StressorRecords will be created, with first one having key range of 0-249, second one 250-499, etc. At the same time, stressor 0 on node 0 will have range 0-249, stressor 0 on node 1 will have range 1000-1249, etc. This way checkers can also check writes performed by stressors on different nodes. A StressorRecord can be checked only by one checker thread at the same time, after the checker finishes, it returns the record back to the pool. This guarantees fairness of checking process. StressorRecords also maintain list of confirmations, which are added at some points of the test (will be discussed later) to mark latest operations (see Last operation key), which have been written for given record.
LogChecker - Abstract superclass for checker implementations (PrivateLogChecker, SharedLogChecker). It runs generic checking algorithm in a loop, individual subclasses provide way to retrieve current value from StressorRecord and to verify whether the value contains currently checked operation.
Checking algorithm (general)
- Take record (queue head) from StressorRecordPool
- If last unsuccessful timestamp is set, add record confirmation (Last operation key) to mark the operation that we're sure is written into the cache
- Find value for given record - get operation(s) will be performed on a cache, where key is obtained via StressorRecord.getKeyId
- Check whether current operation can be found in the value from step #3
- True - set record timestamps (successful to current time, unsuccessful to undefined), remove all confirmations with operationId <= record.currentOperationId, generate new key for given record, increment operation id
- False - check whether confirmations contain operation with operationId > currentOperation
- If not, check whether operation for given stressor shouldn't be ignored (see Ignored key)
- If not, record missing operation in FailureManager
- Set record timestamp (unsuccessful to current time, remove all confirmations with operationId <= record.currentOperationId, generate new key for given record, increment operation id
- Return record back to StressorRecordPool
Data written into cache during test
Checker
- Checker key (checker_$slaveId_$stressorId) - written by checkers every logLogicConfiguration.counterUpdatePeriod operations, it denotes how far a checker has been able to get with checking process (by storing latest operation id for given stressor). When stressor finds out that log value has attained maximum size (logLogicConfiguration.valueMaxSize), it performs a query for all checker keys (cluster-wide) and determines the lowest operation id (LOI). Afterwards, we can safely trim all operation ids <= LOI from the log value.
Stressor
- Entries picked from key range defined by LogLogic implementation
- Last operation key (stressor_$stressorId) - for non-transactional caches we write the latest operation every logLogicConfiguration.counterUpdatePeriod operations, for transactional caches we insert the entry anytime a transaction succeeds. This helps us to see whether an operation is missing (has been lost) in the log value - e.g. if the last confirmed operation is 100 and we cannot find operation with operation.id < 100 in the log value, missing operation is recorded in FailureManager.
- Ignored key (ignored_$slaveId_$stressorId) - if maximum size of a log value is attained, we would normally have to wait until checkers confirm some operations to be checked to be able to exclude them from the log value (see Checker key in previous paragraph). With logLogicConfiguration.ignoreDeadCheckers enabled, we can ignore checkers on dead nodes (as they cannot progress) - this can be used in elasticity tests as the cluster often shrinks and majority of original nodes are down. Updated when maximum size of log value is attained and node ($slaveId) is not alive.


Prefer declarative code over imperative code - building a command line parser in 5 lines of code
Author: Kasper B. Graversen
[Introduction] [All categories] [All articles] [Edit article ]
Design
KBGit
Declarative Programming
Imperative Programming
Coding Guideline
Code Readability
Declarative code has many advantages over imperative code. The code is simpler code due to a good separations of concerns. The "what" is cleanly separated from the "how". Further, the declarations may find other purposes such as automatic consistent documentation.
Please show your support by sharing and voting:
Table of Content
- Requirements for our command line parser
- The imperative approach
- The declarative approach
- Conclusion
One of my pet projects is to implement a working Git clone in just 500 lines of code (See KBGit on Github for more details). For that I need a command line parser. Given the fairly limited line budget, I need something short and sweet... let's build a command line parser in vey few lines of code!
Requirements for our command line parser
Our requirements are straight forward.
- We need to parse a set of pre-defined sentence such as
git log
. - A sentence may leave room for additional information such as a commit message like
git commit -m "user input here"
. - After successfully parsing a sentence, we need to invoke specific parts of the git-implementation. E.g. if the user types "git log" we shall invoke the
log()
method. - If a sentence cannot be matched, print a help-message detailing parseable sentences.
The imperative approach
Initially, I thought the smallest implementation was an imperative approach. E.g.
if (args.length == 1 && args[0] == "log")
return git.Log();
if (args.length == 3 && args[0] == "commit" && args[1] == "-m")
return git.Commit(args[2]);
if (...)
else
{
Console.WriteLine(@"Cannot parse input");
Help
git log for logging
git commit -m <message> for committing
...");
}
I bet you have seen plenty of code like this. Often when I encounter a wall of code like this, I cannot help but play out in my head, times toll on the code. Pressure to deliver, or perhaps lack of knowledge of a better way. And perhaps it all started out as a single if-else..then.. slowly over time.. turning into a monstrosity.
Aesthetics aside, there are a few downsides to this approach:
- Given enough if-else branching the code readability quickly deteriorate.
- First, there is no ties between the documentation and what is parsed. The code may quickly go out of sync with the printed documentation.
- Second, for every sentence we can parse, we spend a line of code for the
if
-statement, a line of code for the invocation, and then a line for printing the help. - Finally, the approach does not lend itself very well to extra features such as optional arguments, or allow arguments in random order.
The declarative approach
A declarative approach operates on a more formal grammar and has a general matching algorithm applied to all grammar lines in search of a match. It turns out we can write a declarative parser in only 5 lines of code! In addition to the parser is a line of code declaring the grammar for each sentence to match.
Let's first have a look at the parser:
// declarative parser
var matches = Config
.Where(x => x.grammar.Length == cmdParams.Length)
.SingleOrDefault(x => x.grammar.Zip(cmdParams, (gramar, arg) => gramar.StartsWith("<") || gramar == arg).All(m => m));
if (matches.grammar == null)
return $"KBGit Help\r\n----------\r\ngit {string.Join("\r\ngit ", Config.Select(x => $"{string.Join(" ", x.grammar),-34} - {x.explanation}."))}";
// using the parser
var valueFromInvokingTheGitFunction = matches.actionOnMatch(git, cmdParams);
So the basic idea is
- We operate on a set of pre-defined grammar lines, each specifying how to parse a sentence (
config
). - Given some input (from the command line)
cmdParams
, match it with any grammar lines who specify the same number "words" to be parsed. -
Then,
Zip()
the grammar with the user input. Zipping means taking one element at a time from the user input and the grammar respectively.- To denote "holes" in the grammar where the user can supply any kind of information, grammar elements starting with
<
are skipped during the zipping. - If all zipped elements match (the
All(m => m)
) we have a match.
- To denote "holes" in the grammar where the user can supply any kind of information, grammar elements starting with
- If we haven't found a match, print wall of text of the commands that can be understood. The beauty here is that the help prints the same data the parser operates on. That way the documentation never goes out of sync with the code. If we have a match, we invoke a function pointer with the parameters from the command line.
The only thing left to explain, is the grammar lines. Below are two examples. Each grammar line consists of three parts. A readable explanation, the sentence to parse and finally, the code to invoke on a match. We take advantage of the named tuple feature of C# here:
(string explanation, string[] grammar, Func<KBGit, string[], string> actionOnMatch)[] Config =
{
("Show the commit log", new[] { "log"}, (git, args) => git.Log()),
("Make a commit", new[] { "commit", "-m", "<message>"}, (git, args) => { git.Commit(args[2], "author", DateTime.Now); }),
}
If you don't think about it, you almost don't see it. The grammar is quite readable. The grammar simply is "commit", "-m", "<message>"
!
Conclusion
The declarative implementation is a bit more advanced than the imperative implementation, but has a number of advantages.
- The grammar is very readble and is not concerned with how a matching strategy is implemented.
- Since the declaration of the grammar is separate from the actual matching, we can improve the parser over time without needing to change our grammar specification (the
Config
variable above). - The parser operates on the grammar and the grammar is (coincidentally) readily printable as a help text. By printing the grammar as the documentation, our documentation is never out of sync.
- Lastly, and perhaps only important to the KBGit implementation, it is less lines of code!
I hope you feel inspired to do more declarative programming and less imperative programming in the future. :-)
More articles on this topic
Please show your support by sharing and voting:
Congratulations! You've come all the way to the bottom of the article! Please help me make this site better for everyone by commenting below. Or how about making editorial changes? Feel free to fix spelling mistakes, weird sentences, or correct what is plain wrong. All the material is on GitHub so don't be shy. Just go to Github, press the edit button and fire away.
Read the Introduction or browse the rest of the site


The Simple Roll performance style allows you to scroll your scores at an even pace.
Use the Speed selector toward the top right of the screen to control the playback speed.
You can configure the Simple Roll performance style to scroll continuously or intermittently in the App Settings.
Tap on any toolbar button to get more information on the functions that it performs.
To show or hide the toolbars touch the screen with two fingers.


With online workshops, we aim to give you the same experience and access to experts as in an in-person workshop, without needing to leave your desk. So you can learn at your own pace, in your own time, and follow interactive exercises along the way.
Our workshops are all around front-end and UX, and they are structured differently, but all of them are packed with practical examples. You can also ask questions during dedicated Q&A time, and you'll get all workshop materials and recordings, too.


WITNESS LIST State Affairs Committee (Subcommittee on Native American Affairs) April 29, 2002 - 1:00P Native American Affairs ON: Alvidrez, Albert Tribal Governor (Ysleta del Sur Pueblo), El Paso, TX Barnes, Randy Civil Rights Activist (Self), Universal, TX Braswell, Deborah Director (TPRC), Odessa, TX Bruseth, Jim Dir. of Archeology Division (Texas Historical Commission), Austin, TX Castro, Daniel (Lipan Apache Band of Texas, Inc.), San Antonio, TX Colton, Milo Attorney (Self), San Antonio, TX De La Vega, Ignacio Director (Texas Inter-Tribal Native Coalition), San Antonio, TX Dias, Antonio (Non-recognized Indegenous People), San Antonio, TX Even, Patricia Educator/Secondary Principal (Self), unknown, TX Garcia, Joleen Co-Chair (Bexar County Green Party), San Antonio, TX Garcia Sr., Justo Director-Houston Field Office (Community Relations Service-US Dept of Justice), Houston, TX Gerkins, JR Secretary (American Indian Movement of Texas), Live Oak, TX Green, Ronnie President (Native American Center of Texas), San Antonio, TX Hawkwing, Bernard Traditional Advisor (Native American Center of Texas), San Antonio, TX Hernandez, Raymond (Tap Pilam Coahuiltecan Nation), San Antonio, TX Hook, Dr. Jonathan (American Indian Resource Center), San Antonio, TX Howard, Margaret Archelogist (Texas Parks and Wildlife Department), Austin, TX LeFevre, Vena Education Chair (Trans-Pecos enewal Center), Odessa, TX Mancias, Juan Tribal Chair (Carrizo/Comecrudo Tribe of Texas), Lubbock, TX Mercado-Allinger, Patricia State Archeologist (Texas Historical Commission), Austin, TX Munoz, Rodolfo Attorney at Law (Naciones Indegenas de Yanaqvana), San Antonio, TX Nava, Julia Artist/Activist (Lipan Apaches of Texas), Falfurrias, TX Newada, Patricia Executive Director (Native American Center of Texas), San Antonio, TX Star-Fernandez, Cynthia (Native American Center of Texas), San Antonio, TX Stubing, Lois Dr. (School of Nursing, College of Science & Tech at A&M, Corpus Christi), Corpus Christi, TX Tijerina, Luis President (Trans Pecos Renewal Center/AmMerican Indian Association), Odessa, TX Registering, but not testifying: On: Bland, Vincent Chairman (Great Promise, Inc. for American Indian Young People), Austin, TX Gutis, Raul TC (Ysleta del Sur Pueblo), El Paso, TX Hisa, Carlos Lt. Governor (Ysleta del Sur Pueblo), El Paso, TX Loera, Arturo Councilman (Ysleta del Sur Pueblo), El Paso, TX Luna, William (Native American Center), San Antonio, TX Noble, Dianna Director, Environmental Affairs (TxDOT), Austin, TX


import {TerminalModule} from 'primeng/primeng';
Terminal is defined using p-terminal element with a command handler and a response property. The entered command is passed to the handler by the event parameter and the response is sent back using a binding to the response property.
export class TerminalDemo {
response: string;
onCommand(event) {
//event.command = entered command
//in a real application connect to remote service to process the command and update the response field in return
this.response = 'Unknown command: ' +event.command;
}
}
<p-terminal (handler)="onCommand($event)" [response]="response" welcomeMessage="Welcome to PrimeNG" prompt="primeng $"></p-terminal>
| Name | Type | Default | Description |
|---|---|---|---|
| welcomeMessage | string | null | Initial text to display on terminal. |
| prompt | string | null | Prompt text for each command. |
| response | string | null | Response to give for a command. |
| style | string | null | Inline style of the component. |
| styleClass | string | null | Style class of the component. |
| Name | Parameters | Description |
|---|---|---|
| handler | event.originalEvent: browser event event.command: command to process |
Callback to invoke when user enters a command |
Following is the list of structural style classes, for theming classes visit theming page.
| Name | Element |
|---|---|
| ui-terminal | Container element. |
| ui-terminal-content | Content of terminal. |
| ui-terminal-content-prompt | Prompt text. |
| ui-terminal-input | Input element to enter commands. |
None.
<p-terminal (handler)="onCommand($event)" [response]="response" welcomeMessage="Welcome to PrimeNG" prompt="primeng $"></p-terminal>
export class TerminalDemo {
response: string;
onCommand(event) {
if(event.command === 'date')
this.response = new Date().toDateString();
else
this.response = 'Unknown command: ' + event.command;
}
}


Main Page
Data Structures
Files
File List
Globals
All
Functions
Variables
Typedefs
Defines
l
o
r
w
- o -
OLD_SM_check_map() :
old_sm_rmap.c
OLD_SM_choose_first_avail_options() :
old_sm_rmap.c
,
old_sm.h
OLD_SM_commit_choices() :
old_sm_rmap.c
OLD_SM_create_map() :
old_sm_rmap.c
OLD_SM_delete_cb() :
old_sm_rmap.c
,
old_sm.h
OLD_SM_expand_map_end_offset() :
old_sm_rmap.c
OLD_SM_expand_map_start_offset() :
old_sm_rmap.c
OLD_SM_init_for_max_usage() :
old_sm_rmap.c
OLD_SM_init_for_min_usage() :
old_sm_rmap.c
OLD_SM_new_cb() :
old_sm_rmap.c
,
old_sm.h
OLD_SM_print_map() :
old_sm_rmap.c
,
old_sm.h
OLD_SM_print_option() :
old_sm_rmap.c
,
old_sm.h
OLD_SM_print_stats() :
old_sm_rmap.c
OLD_SM_sched_table() :
old_sm_rmap.c
,
old_sm.h
Generated on Sat Aug 30 17:59:03 2014 for libsched by
1.4.7


The previous few weeks involved working on ONNX.jl and Keras.jl. I came across various challenges, errors, but was able to surpass most of them. I got to learn a lot in this process, about Julia's infrastructure, Keras, Flux and Machine learning in general. In this blog, I'm going to summarize my work, mostly on Keras.jl, since I spent a major chunk of my time on it. Incase you haven't, please do read the first two blogs here.
Keras.jl
A major portion of my time was spent on Keras.jl. Keras.jl
is a package built on top of the Flux machine learning framework, to directly run Keras pretrained models in Flux.
This is done by converting the entire Keras model into a Julian format. When a Keras (running either TensorFlow or
Theano backend) model is compiled, it actually forms a computation graph. In layman's terms, Computation graphs can
be thought of as a regular graph, but with each node representing layers and the edges representing the flow of tensors
(hence the name TensorFlow). Keras.jl interprets this graph and converts it into pure Julia code (using DataFlow.jl),
by reading the weights and other parameters of the model at each step. As a result, what we get is a Julian
representation of the model. This can then be directly run on top of Flux, with appropriate inputs.
Keras.jl also provides a simple and easy-to-use interface. Loading and running a Keras is model is as simple as:
>>> using Keras >>> model = Keras.load("model_structure.json", "model_weights.h5") >>> model(...)
(model_structure is the structure of the model, in JSON format.)
(model_weights stores the weights of the model, in HDF5 format.)
These fields can be obtained from any Keras model, using model.to_json() and model.save_weights() respectively.
Computer Vision based models:
I was able to load most of the popular Vision based Keras models into Flux. These models include:
I. Inception Netv3
II. DenseNet 121
II. DenseNet 121
III. DenseNet 169
IV. DenseNet 201
V. ResNet50
Most of the loaded models has pretty good accuracies (at par with the original ones).
Natural Language Processing related models:
I spent a major chunk of my time working on loading NLP related models. I implemented and loaded three
NLP models:
I. IMDb sentiment analysis:
The model was trained on the IMDb sentiment analysis dataset, which contains 25,000 movie reviews and
the sentiment (0/1) associated with them. The Keras model showed a 87.25% accuracy, and the corresponding
loaded Flux models showed a 87.2% accuracy (pretty good result). The model also showed good results when
tested on user input:
>>> model("It was such a waste of time") 0 >>> model("such amazing stuff") 1
The example, along with instructions, can be found here.
I. Reuters topic classification:
The dataset contains 11,228 newswires from Reuters, labeled over 46 topics. Each wire is encoded as a sequence of word indexes.
To know more, have a look at this.
I. Text Generation using LSTMs:
Text generation, in general, consists of training a model on any text dataset, such that the model learns useful patterns from the data. After training for a while, the model starts outputting words that make sense as a standalone entity. LSTMs (Long Short Term Memory) networks have proven to be very effective in this case. They are capable of remembering the relation among sequences over long distances, which makes them ideal for text generation. The Keras model I created was trained on the Alice in Wonderland text, which isn't protected under any copyright/license. The model was trained to take as input as sequence of 100 characters, and predict the next one. Tracing Keras LSTM to Flux LSTM was quite challenging, as they handle input in different ways. I was able to load the model successfully in Flux and the output, after training for just 15 epochs was pretty decent.
Original text: went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that alice had not a mome Produced text: went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that alice had not a mome tf the fand, she wast on toineng an thre of the garter. whe mone dater and soen an an ar ien so the toede an the coold an thee, th shen io the want toon if the woil, and yhu io the whre tie dorse ’hu aoh yhu than i soned th thi would be no tee thet
Notice that the output might not make sense, but it was able to produce familiar words, such as she, the on, of, and, an, so etc. from the training text. It is advisable to train the model for at least 25 epochs to get better results.
Other miscellaneous contributions:
Apart from the mentioned, I also opened an issue in Flux, and created a PR in JuliaText/TextAnalysis.jl, where I added the sentiment analysis functionality. The PR can be found here(W.I.P).


Shrimp and Grits
This recipe is derived from Smokin' & Grillin' wit AB – youtube
- ⏲ Prep time: 5 min
- 🍳 Cook time: 20 min
- 🍽 Servings: 2-3
Ingredients
- 2 lbs Large/Jumbo Shrimp
- 6 Slices of Bacon
- 1 cup Un-Cooked Grits
- 3 cups Chicken Broth
- 2 cups Shredded Cheddar Cheese
- 3 tbsp Butter
- 3 tbsp Chopped Fresh Parsley
- 1 tbsp Creole / Cajun seasoning
- 2 Cloves of Garlic, minced
- 2 tsp Worcestershire Sauce
- 1 tbsp Lemon Juice
Directions
- Add bacon to hot pan. Meanwhile, in separate pot , bring chicken broth to a boil.
- Add grits to chicken broth and stir. Cover and simmer per instructions on box.
- Once grits are done, add butter plus salt and pepper to taste. Stir until combined.
- Add cheese. Stir until combined.
- Once bacon is done, keep bacon fat in the pan. Add shrimp and fry on medium-high heat
- Add Creole seasoning, lemon juice, Worcestershire Sauce, garlic and toss.
- Fry until shrimp turns white on each side which is about 5-7 minutes total.
- In a bowl, serve shrimp and bacon over grits. Top with parsley.
Contribution
Recipe tags:
american
fish
breakfast


System files must have correct permissions to ensure that 1) various system utilities and applications can access them as needed, and 2) users or hackers cannot steal data or maliciously modify these files and make them behave unexpectedly.
/etc/passwd contains system account information, and it is utilized in many places across the system. It must be readable to such utilities, and write access must be restricted to root.
typing ls -l [filename] or stat [filename] will display the file's current permissions.
To change the file permission octal to 644, type sudo chmod 644 /etc/passwd.
To change the owner of the file to root, type sudo chown 0 /etc/passwd.
To change the file group to root, type sudo chgrp 0 /etc/passwd.
That should do it!


Types
Nodes and transactions in Constellation can be assigned a type, which is used to both group these elements according to
the type of data they represent, as well as to allow the graph to infer various properties about each element. Types are
hierarchical, meaning that each type could have a parent type, as well as one or more children type. Generally, higher
level types describe broad categories of data, while lower level types are more specific.
Node Types
Node types identify a node as belonging to a particular category of data, such as "Document" or "Person". Each node type
holds the following properties:
-
Name - the name assigned to this type
-
Description - a description of what the type is
-
Colour - the colour which should be set for nodes of this type
-
Foreground Icon - the foreground icon which should be set for nodes of this type
-
Background Icon - the background icon which should be set for nodes of this type
-
Detection Regex - the regular expression which can be used to detect identifiers of this type
-
Validation Regex - the regular expression which can be used to check if vertices of this type are valid
-
Super Type - the immediate parent type of this type in the type hierarchy
-
Overridden Type - the type that this type overrides in the type hierarchy
-
Properties - a map of additional properties of this type which are not covered by the above default properties
Transaction Types
Transaction types identify a transaction as describing a particular category of relationship, such as "Correlation" or
"Communication". Each transaction type holds the following properties:
-
Name - the name assigned to this type
-
Description - a description of what the type is
-
Colour - the colour which should be set for transactions of this type
-
Style - the line style which should be set for transactions of this type
-
Directed - whether or not transactions of this type should be directed by default
-
Super Type - the immediate parent type of this type in the type hierarchy
-
Overridden Type - the type that this type overrides in the type hierarchy
-
Properties - a map of additional properties of this type which are not covered by the above default properties


Home
Definition
API Definition
Download
An error occured while loading the API definition file. Please try again later.
This API does not have an API definition file. Contact the API provider and ask them to supply a valid API definition!
Loading API Definition, please wait...