The Little Manual of API Design
Table of Contents
- Introduction
- Characteristics of Good APIs
- The Design Process
- Know the requirements
- Write use cases before you write any other code
- Look for similar APIs in the same library
- Define the API before you implement it
- Have your peers review your API
- Write several examples against the API
- Prepare for extensions
- Don’t publish internal APIs without review
- When in doubt, leave it out
- Design Guidelines
- Semantics
- Structural
- Bread Crumb Navigation
- Github Repository
Introduction
An application programming interface, or API, is the set of symbols that are exported and available to the users of a library to write their applications.
Software is built on abstractions. Pick the right ones, and pro-gramming will flow naturally from design; modules will havesmall and simple interfaces; and new functionality will more likely fit in without extensive reorganization. Pick the wrongones, and programming will be a series of nasty surprises.
Characteristics of Good APIs
- Easy to learn and memorize
- Leads to readable code
- Hard to misuse
- Easy to extend
- Complete
API authors should strive for “minimal” and “consistent” APIs only to the extent that it helps the list above.
APIs should be consistent in the sense that similar concepts should be named the same while different concepts should have different names
Easy to learn and memorize
Implementation of md5
function
function md5({ str, encoding = 'hex' }) {
return crypto
.createHash('md5')
.update(str)
.digest(encoding);
}
Unit test for md5
function
test('mdf5 should compute challenge when given ha2, nonce, cnonce, and qop', assert => {
const md5 = require('../../utils/md5').md5;
const ha2 = md5({
str: 'GET:/api/v1/digestScheme'
});
const actual = md5({
str: `${ha2}:${process.env.NONCE}:${process.env.NONCE}:auth`
});
const expected = 'adc91a91ffaa68815d5a5d8e4ed8d9e9';
assert.is(actual, expected, `should return ${expected}`);
});
Notice that the md5
function takes an object with a property of str
and a string value.
I named this function in my api md5
because it computes a hash value when given a string value.
- A minimal API is easy to memorize because there is little to remember.
- A consistent API is easy to memorize because you can reapply what you learned in one part of the API when using a different part.
- An API is not only the names of the classes and methods that compose it, but also their intended semantics.
- An easy-to-learn API makes it possible to write the “hello world” example in just a few easy lines of code and to expand it incrementally to obtain more complex programs.
An easy-to-learn API features consistent naming conventions and patterns,economy of concepts, and predictability. It uses the same name for the sameconcept, and different names for different concepts.
MD5 > The MD5 algorithm is a widely used hash function producing a 128-bit hash value. Although MD5 was initially designed to be used as a cryptographic hash function, it has been found to suffer from extensive vulnerabilities. It can still be used as a checksum to verify data integrity, but only against unintentional corruption.
Leads to readable code
- Readable code is easier to document and maintain.
- Readable code is always at the right level of abstraction.
- it neither hides important things nor forces the programmer to specify irrelevant information
Implement decode unsigned JSON web token function
function decodeUnsignedJWT(jwt) {
const [
headerB64,
payloadB64
] = jwt.split('.');
const headerStr = new Buffer(headerB64, 'base64').toString();
const payloadStr = new Buffer(payloadB64, 'base64').toString();
return {
header: JSON.parse(headerStr),
payload: JSON.parse(payloadStr)
};
}
Unit test for decodeUnsignedJWT function
test('decode should return base64 decoded string', assert => {
const header = {
alg: 'HS256'
};
const payload = {
name: 'John Rambo',
rank: 'Sergeant',
branch: 'Army'
};
const encodeUnsignedJWT = require('../../utils/encode').encodeUnsignedJWT;
const encoded = encodeUnsignedJWT({
header,
payload
});
const decodeUnsignedJWT = require('../../utils/decode').decodeUnsignedJWT;
const actual = decodeUnsignedJWT(encoded);
const expected = {
header: '{"alg":"HS256"}',
payload: '{"name":"John Rambo","rank":"Sergeant","branch":"Army"}'
};
assert.deepEqual(actual, expected, `should return ${expected}`);
});
Hard to Misuse
A well-designed API makes it easier to write correct code than incorrect code, and encourages good programming practices. It does not needlessly force the user to call methods in a strict order or to be aware of implicit side effects or semantic oddities.
Make an API hard to misuse by eliminating redundancy. For example, an addItem(Item) method that lets the user write.
const mySet = new Set();
mySet.add(1);
mySet.add(5);
mySet.add('some text');
mySet.keys() // SetIterator {1, 5, "some text"}
Above is some new ES2015 syntax in JavaScript for creating Sets. The Set object lets you store unique values of any type, whether primitive values or object references.
As the paper states you want to design an api that is hard to use and in this case a set is good in order to have unique values and avoid duplicate values which can be problematic at times.
Easy to extend
APIs should be easy to extend as new classes/function get added over time. Parameters get added/removed from function signatures.
'use strict';
const {join} = require('path');
const {readFileSync} = require('fs');
const winston = require('winston');
const jwt = require('jsonwebtoken');
const {responseCodes} = require('../constants');
const PATH = '/api/v1/';
const createToken = (req, res, next) => {
// sign with RSA SHA256
const cert = readFileSync(join(__dirname, '../ca/ca.key'));
const {name} = req.body;
// sign asynchronously
jwt.sign({ name }, cert, { algorithm: 'RS256' }, (err, token) => {
if (err) {
winston.log('error', 'Error Creating json web token', {err});
res.send(err);
}
res.send(responseCodes['created'], {
adminToken: token
});
return next();
});
};
module.exports = (app) => {
app.post(`${PATH}/createToken`, createToken);
};
Here I have an endpoint to sign a jwt with an expiration date which returns the following payload.
{
"adminToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.
eyJuYW1lIjoiYWRtaW5Ub2tlbiIsImlhdCI6MTQ4NjYwNDU3OX0.
Pg7HOKIwn6HietMotYbwIvSGqvOcoUSNegQXW_BN-C5rQu9ZXyJnz6iK-L2JzLqlzAApuB1ria5TcN0HkrZQ3aBrIflvjv96W5M_51GEwXxpQ1wTSA-T6ZRBzanq7b_RRhB_TEsezf7hf87U-N6nWnV9EKo1LAf_fAo53-7mXTVAJyG39n2NxJfkJ9btvcq8BLZN68AF-WFpsPTtujQV2kA9sI9ApeTdh_7qgLTkm8Iup7rwDrtnA2TNidgqjnMSgKsHYdtvc1_guxp6LJ2lVeF0XgmMVqw6-EFfa4w15azEF-bJYHn23f_GobpRZsR7_YvWLN5dt1NU56JT2Nip3Q"
}
I can easily extend the api to do more things with jwt’s by just adding HTTP methods to module.exports
Complete
- Ideally an api would be complete and your users can do everything that they want to do.
- Realistically this does not always happen but if you can provide a way for your users to extend the api or customize it then it can help an API be complete.
- API completeness is something that can occur incrementally over time through extension as mentioned above.
The Design Process
Know the requirements
- Before setting out to design an API, you should have a clear understanding of the requirements.
- Usually you will have to do some requirements analysis
- Ask your collegues, users, your boss etc. in order to get a better picture
Write use cases before you write any other code
- Avoid diving into implementation from the very start of api design.
- APIs designed in this way don’t take users of your API into account
- The API Implementation should adapt to the users oof you API.
- Write some code snippets based on your requirements analysis.
- I would suggest writing some unit tests though the author doesn’t explicitly mention this.
- Using the principles of TDD your API will take shape
- Add a test
- Run all tests and see if the new test fails
- Write the code
- Run tests
- Refactor code
Look for similar APIs in the same library
- Author argues that similar APIs have the added benefit that users familiar with one method/class can easily learn another method/class if they are similar.
- Author adds the caveat that you shouldn’t blindly follow an already existing API but instead look for improvements and/or fix bad APIs and then mimic then elsewhere.
- If you are writing a newer version of the API, then you should the API you are replacing very well, otherwise you run the risk of introducing new design flaws for old flaws
Define the API before you implement it
- For a library with thousands of users, it is much better if the implementation is tricky and the API is straightforward than the other way around.
- APIs will typically outlast their implementations (e.g., UNIX/POSIX, OpenGL).
- As you implement the API or write unit tests for your implementation, you will most probably find flaws or undefined corner cases in your original design.
- I would argue here that if you are following Test-Driven Development that you can find corner cases possibly earlier and avoid abstractions from leaking out into your api.
Have your peers review your API
- Look for feedback.
- Ask for feedback.
- Beg for feedback.
- Show your APIs to your peers, and collect all the feedback you get.
- Try to momentarily forget how much work it would be to implement the requested changes.
- The more facts you possess, the better thechances that you will design a good API.
Some thoughts about this that I have:
- Open a pull request in whatever version control system that you like (eg. Github, Gitlab, Bitbucket, etc)
- Add reviewers if you can and ask for people’s thoughts on what you worked.
- Depending on what you are working can really save you from costly design decisions in the future.
- One thing I liked about how Jose Valim (Creator of Elixir) is how collaborative he has been with the Elixir Programming Language by seeking out advice from others.
- I believe more feedback can help avoid mistakes in the future.
Write several examples against the API
- After you designed an API, you should write a few examples that use the API.
- Often, you can obtain examples simply by fleshing out the use cases defined earlier
- Once again I typically use the unit tests that I write for my classes/functions as later examples.
Ask others to write unit tests of your examples and an added bonus is they can describe any roadblocks they ran into.
Prepare for extensions
Expect your API to be extended in two ways:
- By the maintainers of the API, who will add to it (and occasionally deprecate parts of the API).
- By users, who will write subclasses to customize the behavior of its components
- In a language like you JavaScript you can somewhat achieve this by making
BaseClass.prototype
is copied intoChildClass.prototype
- Although Kyle Simpson has an interesting take on this for JavaScript coining the term Object linked with other Objects (OLOO).
- Essentially you delegate methods back to the original objects
- Example delegating a method in an array back to the
Array.prototype
, it walks up the prototype chain to find the used method.
- In a language like you JavaScript you can somewhat achieve this by making
Don’t publish internal APIs without review
Author points out that you should carefully review internal APIs before releasing them out into the public because once your APIs are public it becomes more difficult to update bad method names once people are using them.
I would also add here that if you have a solid code review process you can get feedback like this early on, especially if you make any code changes via a pull request and add multiple reviewers.
When in doubt, leave it out
- If you are in doubt about adding any functionality in your API, then leave it out, mark it as internal and reconsider at a later time.
- Wait for feedback from users.
- Author makes good point that you can’t always add every feature that users want.
- Author suggest a rule of thumb to wait for 3 independent request for the same feature before implementing it.
Design Guidelines
Author highlights the fact that in the end, you must think through API design and guidelines cannot substitute this.
Choose self-explanatory names and signatures
- Pick names that are self-explanatory and can read like English.
The arguments of a function/method should be evident at the call site.
function decodeUnsignedJWT(jwt) { const [ headerB64, payloadB64 ] = jwt.split('.'); const headerStr = new Buffer(headerB64, 'base64').toString(); const payloadStr = new Buffer(payloadB64, 'base64').toString(); return { header: JSON.parse(headerStr), payload: JSON.parse(payloadStr) }; }
The argument jwt indicates that this is a JSON Web Token (jwt).
- Author argues that you should strive for consistency in naming and he also argues that consistency is important when fixing the order of parameters
- If rectangles have the following signature
Rectangle(x, y, width, height)
then changing the order can break your API.
- If rectangles have the following signature
I would argue here instead to use an object that way the order of the parameters isn’t affected and adding a parameter anywhere from a caller won’t affect the function. Here is an example function
function Demeter(soldier) {
this.name = soldier.name || '';
this.rank = soldier.rank || 'private';
this.specialty = soldier.specialty || [];
this.years = soldier.years || 0;
this.job = soldier.job || 'firefighter';
this.getInformation = function(newSoldier) {
return Object.assign(
{},
{ name: this.name, rank: this.rank, specialty: this.specialty, years: this.years },
{ exercise: newSoldier.exercise, branch: newSoldier.branch }
);
};
this.civilianPlan = {
printPlan: function() {
return `Civilian Job Plan: ${this.job}`;
}.bind(this)
};
}
Demeter.prototype.soldierStats = function(newSoldier) {
return {
height: newSoldier.height,
weight: newSoldier.weight,
gender: newSoldier.gender,
age: newSoldier.age
};
};
- Good naming also require that you know the audience.
- You will need to use names that are consistent with the industry:
- For example for auto parts supply application using jargon names consistent with auto parts would be good.
- When you do this you should have good documentation.
- If it is a high-level API meaning users are not as familiar than jargon should be used sparingly.
- Parameter names are important in an API as a lot of users will be looking for intellisense if they are using an IDE.
- Avoid single-letter parameter names but there are always exceptions.
- Namely if you are finding the slope of a line
y = mx + b
then x, y, b, and m would be appropriate parameter names.
- Namely if you are finding the slope of a line
- Avoid single-letter parameter names but there are always exceptions.
- You will need to use names that are consistent with the industry:
Choose unambiguous names for related things
If two or more concepts need to be clearly differentiated then choose names that map clearly to the concepts they denote.
function Square() {} Square.prototype.setSide = function(side) { this.side = side; }; Square.prototype.area = function() { return Math.pow(this.side, 2); }; function Rectangle() {} Rectangle.prototype.setWidth = function(width) { this.width = width; }; Rectangle.prototype.setHeight = function(height) { this.height = height; }; Rectangle.prototype.area = function() { return this.width * this.height; }; function Circle() {} Circle.prototype.setPI = function(PI) { this.PI = PI; }; Circle.prototype.setRadius = function(radius) { this.radius = radius; }; Circle.prototype.area = function() { return (this.PI * Math.pow(this.radius, 2)).toFixed(4); };
Beware of false consistency
Similar concepts should be grouped together and be of similar form
For example the in JavaScript the methods on Array.prototype
such as map
, filter
, forEach
all have a similar form and typically compose well together
Consequently if you have follow a convention of prefixing methods that set state such as setSide
then don’t suprise the users of your API by having it return a value instead of set a value.
Avoid abbreviations
- During API design if you use obscure abbreviations then your users must remember which words and the associated context
- Avoid using abbreviations like
setRad
and instead usesetRadius
to clearly mark what you intend to do. - Acronyms are still okay you don’t have to spell out Hyper Text Markup Language as HTML is a commonly known term on the web.
Prefer specific names to general names
- Using specific names helps users relate better to what you are API is doing.
Once you pick a general name it is hard to go back and change it to be more specific
const readSoldiers = () => { return new Promise((resolve, reject) => { fs.readFile(join(__dirname, '../../../data/soldiers.csv'), (err, data) => { if (err) { reject(err); } const soldiers = data.toString().trim().split('\n'); resolve(soldiers); }); }); }; const formatSoldiers = (soldiers) => { return soldiers.map(soldier => soldier.split(',')).map((field) => { return { name: field[0], rank: field[1], branch: field[2] }; }); }; const writeSoldiers = (soldiers) => { return fs.writeFile(join(__dirname, 'soldiers.json'), JSON.stringify(soldiers), (err) => { if (err) { throw err; } }); };
Here I choose readSoldiers, formatSoldiers, and writeSoldiers to denote what I am doing though I could have done readSoldiersCSV
to be more specific.
Don’t be a slave of an underlying API’s naming practices
Choose well intentioned names and don’t blindly follow naming conventions from other APIs if you can find a more suitable name.
Semantics
Choose good defaults
Presumably if you can set defaults for an API instead of having users need to do so then you can avoid possible errors.
const files = {
stats: [1, 2, 3, 4, 5]
};
const items = {
supplies: ['one', 'two', 'three']
}
function doTheThing({ files = files, items = items }) {
const defaults = Object.assign({}, files, items)
....
....
}
Using Object.assign
can be good to merge defaults in JavaScript. instead of requiring users of your API complicated setup.
Avoid making your apis overly clever
Here an important concept is the Single Responsibility principle (SRP), your functions should only do one thing and not have crazy side effects. If your API methods are doing too many things and having lots of side effect then when users encounter bugs in your API it is hard for them to understand where things are breaking.
const decodeBase64EncodedString = (str) => {
const usernameAndPassword = str.split(' ')[1];
const parseString = new Buffer(usernameAndPassword, 'base64').toString();
const [
username,
password
] = parseString.split(':');
return {
username,
password
};
};
const basicAuthExample = (req, res) => {
const {
authorization
} = req.headers;
if (authorization) {
const decodeString = decodeBase64EncodedString(authorization);
res.send(responseCodes['ok'], {
credentials: decodeString
});
} else {
res.setHeader('WWW-Authenticate', 'Basic realm="need login credentials"');
res.send(responseCodes['unauthorized'], {
errorMessage: 'Please provide base 64 encoded username and password'
});
}
};
Here I have two separate functions one is decoding base 64 encoded string and the endpoint function is just handling what status code to return and what headers to set.
Pay attention to edge cases
- Author argues that you should be alert to edge cases in your API because they can introduce subtle bugs that you didn’t anticipate
- Although not explicitly mention I believe here that Test-Driven Development can help with this.
- If you start with a failing test and incrementally design your API you can come up with good test cases for corner cases
Here is an example
function parseHeader(header) {
let opts = {};
let parts = header.split(' ');
let params = parts.slice(1).join(' ');
// Split the parameters by comma.
let tokens = params.split(/,(?=(?:[^"]|"[^"]*")*$)/);
if (parts[0].substr(0, 6) === 'Digest') {
// Parse parameters.
let i = 0;
let len = tokens.length;
while (++i < len) {
// Strip quotes and whitespace.
let param = /(\w+)=["]?([^"]*)["]?$/.exec(tokens[i]);
if (param) {
opts[param[1]] = param[2];
}
}
}
return opts;
}
Test cases for Unit Tests to test this function
1. Pass no arguments to parseHeader => parseHeader()
2. Pass an object to parseHeader => parseHeader({ value: 'Digest username="rambo", realm="https://localhost:3000/api/v1/digestScheme"'})
3. Pass an array to parseHeader => parseHeader([{ value: 'Digest username="rambo", realm="https://localhost:3000/api/v1/digestScheme", nonce="Et2azM0urkTJmDb18rZnnwQb3"'}])
The point being that I can use unit test to test edge cases effectively.
Be careful when defining virtual APIs
Well in Dynamic Programming Languages you have more of an implicit contract and so virtual functions is not a direct mapping here, but one note I can say is that if you follow the SOLID principles 1. Single Responsibility Principle 2. Open/Closed Principle 3. Liskov Substitution Principle 4. Interface Segregation Principle 5. Dependency Inversion Principle
Using the Open/Closed Principle you can say that Objects should be open for extension but closed for modification *Meaning you shouldn’t change the base objects at all but instead extend through your callers.**
Strive for property-based APIs
The main point that the author makes here is that if you use properties such as setters instead of having many parameters to create an object you can have a more intuitive API.
An example here would be like computing the slope of a line y = mx + b
function Slope(x, y, m, b) {}
This function requires 4 parameters and can be problematic if I forget a parameter and switch parameters around, I will get unexpected behavior.
If I instead set defaults and perhaps used setters like this then I am being more explicit.
Slope.prototype.setX = function(x) {
this.x = x;
}
Slope.prototype.getX = function() {
return this.x;
}
Notes from the Author 1. Users don’t need to remember in which order they need to supplythe attributes or options. 2. User code is more readable and doesn’t require additional comments 3. Since properties have default values, users only have to set those that they explicitly want to change 4. Users can change the value of a property at any time, instead ofhaving to replace the object with a new one whenever they want to modify it. 5. By calling getters, users can query back everything they set, which helps debugging and is useful in some applications 6. The approach is compatible with graphical property editors, which let the user see the result of setting a property immediately
One thing to note is that doing this requires more work for the API designer as the author mentions.
The best API is no API
The ideal features are those that require no(or very little) additional code from the application writer.
Don’t ask the consumers of your API to do more work than necessary to work with your API.
Github Repository
If you like this information then please star this repository on Github at API Design


Silverminded.github.io
We have Silver Minds!
View on GitHub
Hello, and welcome to our page.
This is the main page for all our projects on github (at the moment one...)
The simple Bukkit plugin Source we made is
here


GIMPA holds counselling session for students
by Kodjo Adams, GNAAccra, Nov. 15, GNA - The Ghana Institute of Management and Public Administration (GIMPA) has organised a counselling session to improve the emotional and physical wellbeing of students to aid their academic work.
The students were taken through physical wellness activities, including body mass measurements, blood pressure and blood sugar readings.
The emotional activities include deep muscle relaxation techniques, biofeedback sessions, painting, watching of a blockbuster movies and arm chair massages.
The event, dubbed, "Self-Care Day" was also to create awareness about the importance of counselling in schools for sound and effective studies.
It was organised by the GIMPA Counselling Centre in partnership with the GIMPA Clinic.
Professor Anthony Sallah, the Dean of GIMPA students, in an interview with the Ghana News Agency, in Accra, said the exercise, the second so far, would be sustained to ensure the total wellbeing of children at all times.
He said as students, they were prone to socio-economic challenges, such as academic and relationship issues and family and health concerns.
It behoved the School to intervene to ensure that it did not get out of control.
Prof Sallah gave an instance where a student of the Kwame Nkrumah University of Science and Technology committed suicide because of his poor academic results, saying the student could have avoided the act with proper counselling.
He urged other educational institutions to establish a Counselling Centre to provide the needed psychological and mental support to students.
He encouraged the students to eschew acts of indiscipline but focus on their studies and visit the Centre when they were faced with problems, saying, "a problem shared is half solved".
Some of the students who spoke with the Ghana News Agency expressed satisfaction with the programme, stressing it helped calm their nerves and improved academic learning.
"It is a mind blowing and refreshing exercise to relax the mind and focus on our studies," one them said.
Mr Thompson Agbodo, a National Service person at the Centre, said the programme had helped enlightened students to be calm ahead of their exams.
GNA


| CS 111- Introduction to Computer Science
Homework #12 |
1. Recursive Choose: In class Choose
, create a method public static long choose(int n, int k)
that computes the choose function ("n choose k")
according to the
recursive formula.
Add the following main method to Choose for
testing:
public static void main(String[] args) { for (int n = 0; n < 10; n++) { for (int k = 0; k <= n; k++) System.out.printf("%d\t", choose(n, k)); System.out.println(); } }
Optional challenge: Use a dynamic programming approach to store (i.e., "cache" or "memoize") each computed choose result so as to avoid redundant recomputation of results. Observe the significant speedup in performance for values beyond the test code, e.g. n = 30, k = 15.
2. Maze Solving: Beginning with this Maze.java starter code, we will implement makeMaze() together in class. For this assignment, you will implement the public void solveMaze() method and its recursive helper/auxialiary method private boolean solveMaze(int row, int col) according to this algorithm:
Note: The default call stack size is limited, so if you want to make a truly eye-popping letter-size maze, run this class from the terminal window with "java -Xss4m Maze" for increased call stack size and use 380 rows and 285 columns. Here are example maze and maze solution image files generated from correct code.
3. N Queens Puzzle: The n-Queens Puzzle is to place n Chess queens on an n-by-n board in such a way that no two queens can attack one another according to the rules of Chess. Beginning with this NQueensPuzzle.java starter code, you will implement the private boolean solve(int row) according to this algorithm:
Hint: Since we're placing only one queen per row, the only possible conflicts are


The {best|average|worst} case time complexity of Binsort is:
\Theta(n + \mathrm{MaxKeyValue})
\Theta(n)
\Theta(n^2)
\Theta(n \log n)
\Theta(\mathrm{MaxKeyValue})
We need a separate bin for every key value.
And we need to look at every such bin.
So the cost has to be related to both the number of records and the number of bins.


--- layout: pagews title: Nocturna permalink: /portfolio/nocturna.html tags: work ---
Nocturna Ediciones is a independent publishing company based in Madrid. They are committed to publishing quality fiction for young readers and adults.
January, 2015
Although Nocturna already had a website, they weren’t satisfied with their own CMS. It was not filling their needs, and it also had usability and look-and feel issues. As a result, publishing workflow was unorganized and often chaotic. Furthermore, their CMS used deprecated PHP code and an unormalized MySQL database.
Deprecated PHP code was removed or updated to 5.5 version. Some functions were overwritten in order to improve the data management workflow. Furthermore, the database was normalised to avoid any data inconsistencies and provide faster data access. For instance, the database did’t have any junction tables at all, so tables were not properly related.
A new responsive template was implemented and customized to meet Nocturna’s needs. Moreover, workflow was restructured in order to improve usability, while increasing the effectiveness and efficiency of publishing process.


You can pass an existing component as content of the modal window. In this case remember to add content component as an entryComponents section of your NgModule.
entryComponents
NgModule


StickyEncoding
High-performance binary encoding/decoding for Swift.Codable
types.
Overview
StickyEncoding facilitates the encoding and decoding of Codable values into and out of a binary format that can be stored on disk or sent over a socket.
StickyEncoding Docs (100% documented)
High-performance binary encoding/decoding for Swift.Codable
types.
StickyEncoding facilitates the encoding and decoding of Codable values into and out of a binary format that can be stored on disk or sent over a socket.


| | |
- builtins.object
-
- GeoLine
- GeoPoint
- GeoPoly
- GeoSegments
- SatMap
class GeoLine(builtins.object) |
| |
A line connecting two GeoPoints with length in both pixel units and meters |
| |
Methods defined here:
- __init__(self, point1, point2)
- Initialize self. See help(type(self)) for accurate signature.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class GeoPoint(builtins.object) |
| |
A point representing a physical location in a satellite image, located
with pixel location, UTM coordinates, and lat-lon coordinates |
| |
Methods defined here:
- __init__(self, map, x, y, size=10, scale=1)
- makes a GoePoint object at
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class GeoPoly(builtins.object) |
| |
A polygon made up of GeoPoints used to find the length of complex paths and
the area of complex shapes |
| |
Methods defined here:
- __init__(self, point_list)
- Initialize self. See help(type(self)) for accurate signature.
- get_area(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class GeoSegments(builtins.object) |
| |
A series of segments meant to approximate a non-linear path drawn by the
user, primarily in order to find it's length |
| |
Methods defined here:
- __init__(self, point_list)
- Initialize self. See help(type(self)) for accurate signature.
- get_length(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class SatMap(builtins.object) |
| |
Object containing image of a map containing the UTM and Lat-Lon
coordinates of each pixel |
| |
Methods defined here:
- __init__(self, directory)
- Creates a SatMap object based on a directory containing an image file,
.wld file, and .xml file (a "GIS Ready Bundle" as downlaoded from the USGS)
- get_lat_lon(self, x, y)
- Returns lattitude and longitude coordinations for given pixel locations
x and y in the image
- get_utm(self, x, y)
- Returns the UTM coordinates for given pixel locations x and y in the
image
- load_image(self, brightness=0)
- Takes in a file path and returns a numpy array containing a list of pixel values
for each band in the list
- parse_wld(self, wld_location)
- Reads a .wld file in and esxtracts the information needed to describe
the an images's location in the world using UTM
- parse_xml(self, xml_location)
- Reads the .xml metadata file to find the UTM zone number and letter
of the image
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |


Sarah Schmerler Website
SARAH SCHMERLER
science teacher Redwood Middle School
Teaching students for a better tomorrow
school logo
science educational link


|
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
I2C Peripheral Register Offsets from the I2C Base Peripheral Address. More...
Macros | |
| #define | MXC_R_I2C_CTRL ((uint32_t)0x00000000UL) |
Offset from I2C Base Address: 0x0000 | |
| #define | MXC_R_I2C_STATUS ((uint32_t)0x00000004UL) |
Offset from I2C Base Address: 0x0004 | |
| #define | MXC_R_I2C_INT_FL0 ((uint32_t)0x00000008UL) |
Offset from I2C Base Address: 0x0008 | |
| #define | MXC_R_I2C_INT_EN0 ((uint32_t)0x0000000CUL) |
Offset from I2C Base Address: 0x000C | |
| #define | MXC_R_I2C_INT_FL1 ((uint32_t)0x00000010UL) |
Offset from I2C Base Address: 0x0010 | |
| #define | MXC_R_I2C_INT_EN1 ((uint32_t)0x00000014UL) |
Offset from I2C Base Address: 0x0014 | |
| #define | MXC_R_I2C_FIFO_LEN ((uint32_t)0x00000018UL) |
Offset from I2C Base Address: 0x0018 | |
| #define | MXC_R_I2C_RX_CTRL0 ((uint32_t)0x0000001CUL) |
Offset from I2C Base Address: 0x001C | |
| #define | MXC_R_I2C_RX_CTRL1 ((uint32_t)0x00000020UL) |
Offset from I2C Base Address: 0x0020 | |
| #define | MXC_R_I2C_TX_CTRL0 ((uint32_t)0x00000024UL) |
Offset from I2C Base Address: 0x0024 | |
| #define | MXC_R_I2C_TX_CTRL1 ((uint32_t)0x00000028UL) |
Offset from I2C Base Address: 0x0028 | |
| #define | MXC_R_I2C_FIFO ((uint32_t)0x0000002CUL) |
Offset from I2C Base Address: 0x002C | |
| #define | MXC_R_I2C_MASTER_CTRL ((uint32_t)0x00000030UL) |
Offset from I2C Base Address: 0x0030 | |
| #define | MXC_R_I2C_CLK_LO ((uint32_t)0x00000034UL) |
Offset from I2C Base Address: 0x0034 | |
| #define | MXC_R_I2C_CLK_HI ((uint32_t)0x00000038UL) |
Offset from I2C Base Address: 0x0038 | |
| #define | MXC_R_I2C_HS_CLK ((uint32_t)0x0000003CUL) |
Offset from I2C Base Address: 0x003C | |
| #define | MXC_R_I2C_TIMEOUT ((uint32_t)0x00000040UL) |
Offset from I2C Base Address: 0x0040 | |
| #define | MXC_R_I2C_DMA ((uint32_t)0x00000048UL) |
Offset from I2C Base Address: 0x0048 | |
| #define | MXC_R_I2C_SLAVE_ADDR ((uint32_t)0x0000004CUL) |
Offset from I2C Base Address: 0x004C | |


| Sea Otter For two minutes at a time otters plunge beneath the surface to find urchins, abalone, and sea stars. One of the few animals to use tools, an otter will pick up a sea urchin and a small rock from the seafloor. Once back at the surface, the otter rolls onto its back, places the rock on its chest, and smashes the urchin against the rock until its shell is broken. Sea otters were nearly wiped out by fur trappers by the early 1900s. Still listed on the U.S. Endangered Species List, the sea otter is making a comeback, thanks to international protectionsand to marine sanctuary designations for critical otter habitats, such as Monterey Bay. |


Oops, I might have broken the site badly! Don't worry, it'll come back up soon!
In the meantime, the next stream is scheduled :
March 1st, 4:00PM PST
(the "timezone" thingy will come back soon!)
UPDATE (stardate 128.9) : hurried the deployment of my "in-progress" website that use a different tech under the hood. Now running Django/Python. After a few tests, basic functionalities will come back (but look different since I accidentally scrapped all assets :\)


--- title: About CP Editor linkTitle: About menu: main: weight: 10 --- {{< blocks/cover title="About CP Editor" image_anchor="bottom" height="min" >}}
An IDE specially designed for competitive programming
{{< /blocks/cover >}} {{% blocks/lead %}} CP Editor is a Qt-based, lightweight and cross-platform IDE specially designed for competitive programming. It's free software distributed under GPL-3.0. The source code is available on GitHub. {{% /blocks/lead %}} {{< blocks/lead >}} You can:


This release contains mostly bug fixes.
Code changes have been made to preserve binary backwards compatibility with 7.1.0.
juneau-marshall
-
The
@JsonSchema annotation has been merged with the @Schema annotation.
-
Annotations typically used on bean properties (getters/setters/public fields) can now be used on private fields.
This is inline with behavior on JPA-annotated beans.
These include: @Swap, @Html, @Xml, @BeanProperty.
juneau-rest-server
-
Method-level annotations (e.g. @RestMethod) and parameter-level annotations (e.g. @Query) are now inheritable
from parent classes and interfaces.
This allows you to define RestcDualPurposeInterfaces.
-
The ReaderResource and StreamResource classes have been moved to the org.apache.juneau.http
package in juneau-marshall. This allows them to be used as return types in remote REST interfaces.
A new ResolvingReaderResource class has been added that includes the variable-resolving support since
this relies on the juneau-svl package.
-
The RemoteInterfaceServlet class has been renamed to {@link oajr.remote.RrpcServlet}.
-
@RestMethod(name="PROXY") has been changed to @RestMethod(name="RRPC").
juneau-rest-client
-
The RestClient.getRemoteInterface() method has been renamed to {@link oajrc.RestClient#getRrpcInterface(Class)}.
-
Fixed a bug where @RemoteMethod(path) values containing '/' characters were erroneously being encoded.


Andy Ruiz Jr explains weight loss aim ahead of Anthony Joshua rematch
Ruiz Jr warned Joshua he will be 'a lot slicker, a lot faster' than when he stunned boxing by beating Joshua in June to take his three heavyweight world titles
by Gareth BicknellAndy Ruiz Jr says he is going to be 'a lot slicker, a lot faster' as he explained his weight loss target ahead of his rematch with Anthony Joshua next month.
Ruiz Jr stunned boxing by beating Joshua in Madison Square Garden in June to take his three heavyweight world titles.
And the two are set to go head-to-head again in Saudi Arabia on December 7 after Joshua triggered the rematch clause in his contract immediately following the defeat.
Ruiz Jr - who self-deprecatingly describes himself as "a chubby kid" - plans to be eight pounds lighter than the 268 he weighed in at for his victory over Joshua .
And it looks set to be a clash between two slimmed-down fighters after pictures suggested 2012 Olympic champion Joshua would weigh considerably less than the 247.5lb he scaled before the June fight .
And Ruiz Jr is confident his fitness regime will pay dividends as he targets a repeat of his New York win.
"Right now, I'm only three pounds less than when I fought Anthony Joshua," Ruiz Jr told iFLTV.
"A lot of people are saying 'he looks too skinny, he won't be strong enough for the fight', but those are people who don't really know about boxing.
"We've been looking really good inside the ring.
"I just want to be 6lbs, 8lbs lighter than I was on June 1.
"That's the goal, to be 8lbs lighter, and that's going to make me feel a lot better.
"It's going to make me a lot slicker, a lot faster, and that's going to tell on December 7.
After The Bell: Watch Mirror Fighting's new boxing show
Mirror Fighting has launched a new weekly boxing show in association with Betfair in which we analyse the latest big fights, play matchmaker, and preview forthcoming bouts.
Former super-middleweight world champion George Groves provides expert analysis.
To watch the latest show in full, click here.
"I weighed in at 268 for the first Anthony Joshua fight, and I'm planning to weigh in at 260 for the next fight.
"I don't want to lose too much weight because I want to be strong for December 7. We know what we're doing and what we're doing it for."


|
ssm
|
A SISR implementation of the multivariate stochastic volatility model of Pitt and Shephard 1999. More...
#include <msvol_sisr.h>
Public Member Functions | |
| MSVolSISR (int numParts, const Mat &beta, const Vec &phis, const Vec &mus, const Vec &sigmas, SISRResampStyle resampTechnique, int pathLength=0, double percEss=1.0) | |
| The constructor. More... | |
| ~MSVolSISR () | |
| The destructor. | |
| Vec | q1Samp (const Vec &y1) |
| Samples from q1. More... | |
| double | logMuEv (const Vec &x1) |
| Evaluates the log of mu. More... | |
| double | logQ1Ev (const Vec &x1, const Vec &y1) |
| Evaluates the log of q1. More... | |
| double | logGEv (const Vec &yt, const Vec &xt) |
| Evaluates the log of g. More... | |
| double | logQEv (const Vec &xt, const Vec &xtm1, const Vec &yt) |
| Evaluates the log of q (assumed constant for all time). More... | |
| double | logFEv (const Vec &xt, const Vec &xtm1) |
| Evaluates the log of f. More... | |
| Vec | qSamp (const Vec &xtm1, const Vec &yt) |
| Samples from q (assumed constant for all time). More... | |
| Public Member Functions inherited from SISRFilter | |
| SISRFilter (int numParts, SISRResampStyle resampTechnique=SISRResampStyle::everytime_multinomial, unsigned int pathLength=0, double essPerc=1.0) | |
| Constructor. More... | |
| ~SISRFilter () | |
| Destructor. | |
| double | getLogCondLike () const |
| get log p(y_t|y_{1:t-1})$ or log p(y_1). More... | |
| double | getESS () const |
| get effective sample size. More... | |
| std::vector< std::vector< Vec > > | getFullParts () const |
| get $p(x_{1:t}|y_{1:t})$ More... | |
| std::vector< Mat > | getExpectations () const |
| get all stored expectations. With respect to $p(x_t|y_{1:t})$ More... | |
| std::vector< double > | getLogUWeights () const |
| Get log-un-normalized weights. More... | |
| void | filterOrSmooth (const Vec &data, const std::vector< std::function< const Mat(const Vec &)> > &fs=std::vector< std::function< const Mat(const Vec &)> >()) |
| If storing whole paths, performs smoothing. If not storing whole paths, performs filtering. More... | |
A SISR implementation of the multivariate stochastic volatility model of Pitt and Shephard 1999.
| MSVolSISR::MSVolSISR | ( | int | numParts, |
| const Mat & | beta, | ||
| const Vec & | phis, | ||
| const Vec & | mus, | ||
| const Vec & | sigmas, | ||
| SISRResampStyle | resampTechnique, | ||
| int | pathLength = 0 , |
||
| double | percEss = 1.0 |
||
| ) |
The constructor.
| numParts | an int describing the number of particles. |
| beta | a Mat representing the factor loadings matrix. |
| phis | a Vec representing the AR parameters of the log-volatility processes. |
| mus | a Vec representing the mean of the log-volatility processes. |
| sigmas | a Vec representing the standard deviation of the log-volatility processes. |
| resampTechnique | an enum class that determines the type of resampling to be performed. |
| pathLength | an int. Set to 0 if jus filtering. To store entire path samples, set to time-length of data. |
| percEss | the percentage effective sample size resampling threshold. |
|
virtual |
Evaluates the log of q (assumed constant for all time).
| xt | |
| xtm1 | |
| yt |
Implements SISRFilter.
Samples from q (assumed constant for all time).
| xtm1 | |
| yt |
Implements SISRFilter.


Page
Northern Trail Outfitters
2021
CYCLING
Electra Cruiser 1 Step-Through Women's Bike
$254.89
Buy now
Diamondback Clutch 2 27.5 Women's Bike
$2,448.93
Buy now
Cannondale Tango 2 27.5" Women's Bike
$1,000.00
Buy now
Pure Cycles Coaster Bike
$400.00
Buy now
Early Rider Limited Trail 24 Hardtail Kids Mountain Bike
$1,099.00
Buy now
Cannondale Cujo NEO 130 4 Electric Bike
$4,200.00
Buy now
Cannondale Quick CX 1 Bike
$1,365.00
Buy now
Cannondale Quick 24 Kids' Bike
$400.00
Buy now
GHOST Kato 5.9 Bike
$999.95
Buy now
Previous page
10" aria-controls="book"> Next page


Below are the commonly required or used paths, objects and settings for the configuration files.
Paths
defaultPath
A default path to be prepended to all other paths in the object and below
metadataPath
Used to point to a database file or directory for metadata concerning the object
databasePath
Used in store objects to point to a database file or directory
tempPath
For when temporary file(s) are required.
schemaPath
Used in Parsers to point to a validation document (eg xsd, dtd, rng)
xsltPath
Used in XsltTransformers to point to the XSLT document to use.
sortPath
Used in IndexStores to refer to the local 'sort' utility
Settings
log
This contains a space separated list of function names to log on invocation. The functionLogger object referenced in paths will be used to do this.
digest
Used in recordStores to name a digest algorithm to determine if a record is already present in the store. Currently supported are 'sha' and 'md5'.


Today is the 4th day of the summit, with many exciting Working Sessions happening.
For scheduling changes or other site editing requests please contact Ann-Marie Grace
If you are not here but want to join us in person, note that it is possible to buy 8h or 24h tickets until Friday


Each team is placed on the chart by the median probability that they will win their league. Only teams with a >4% chance of winning their league are included.
This chart is automatically generated from the odds available at oddschecker, and will be periodically updated. If you want to see the code used to download the data and generate the chart, head over to github and check it out.
See also: CL Group Winner • CL Qualification • Europa league • NFL • NBA
page updated Jan 22 2016 05:03


Update Admin Information
* is a required field
🏠 I’m currently living at World
👨💻 I’m currently working as a Full-stack Developer.
🔭 I’m currently working on news website projects.
🌱 I’m currently learning English 🤦♂.
☕ I’m coffeer.
⚡ Bla bla bla...
* Email
Email of the admin
* Username
Username of the admin
* Firstname
Firstname of the admin
* Lastname
Lastname of the admin
* Phone
Phone of the admin
Update Admin
Cancel


| No | Instruction | Button |
|---|---|---|
| 1 |
Please convert your Paper file before next step(Msword allowed only): (*Author can ignore this if your paper file is already PDF format) |
|
| 2 |
|
|
| 3 |
Please upload your merged file(PDF Format ALLOWED only): |
No file chosen, yet. |
| 4 |
Please upload your Cover letter(PDF Format ALLOWED only): |
No file chosen, yet. |


zlib port to javascript, very fast!
Why pako is cool:
This project was done to understand how fast JS can be and is it necessary to develop native C modules for CPU-intensive tasks. Enjoy the result!
Famous projects, using pako:
Benchmarks:
``` node v0.10.26, 1mb sample:
deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled) deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled) deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled) ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled) deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled) deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled) * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled) inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled) inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled) ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled) inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled) inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled) * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled)
node v0.11.12, 1mb sample:
deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled) deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled) deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled) ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled) deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled) deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled) * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled) inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled) inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled) ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled) inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled) inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled) * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled) ```
zlib’s test is partially affected by marshalling (that make sense for inflate only). You can change deflate level to 0 in benchmark source, to investigate details. For deflate level 6 results can be considered as correct.
Install:
node.js:
npm install pako
browser:
bower install pako
Full docs - http://nodeca.github.io/pako/
```javascript var pako = require(‘pako’);
// Deflate // var input = new Uint8Array(); //… fill input data here var output = pako.deflate(input);
// Inflate (simple wrapper can throw exception on broken stream) // var compressed = new Uint8Array(); //… fill data to uncompress here try { var result = pako.inflate(compressed); } catch (err) { console.log(err); }
// // Alternate interface for chunking & without exceptions //
var inflator = new pako.Inflate();
inflator.push(chunk1, false); inflator.push(chunk2, false); … inflator.push(chunkN, true); // true -> last chunk
if (inflator.err) { console.log(inflator.msg); }
var output = inflator.result;
```
Sometime you can wish to work with strings. For example, to send
big objects as json to server. Pako detects input data type. You can
force output to be string with option { to: 'string' }
.
```javascript var pako = require(‘pako’);
var test = { my: ‘super’, puper: [456, 567], awesome: ‘pako’ };
var binaryString = pako.deflate(JSON.stringify(test), { to: ‘string’ });
// // Here you can do base64 encode, make xhr requests and so on. //
var restored = JSON.parse(pako.inflate(binaryString, { to: ‘string’ })); ```
Pako does not contain some specific zlib functions:
deflateCopy
, deflateBound
, deflateParams
,
deflatePending
, deflatePrime
, deflateTune
.inflateCopy
, inflateMark
,
inflatePrime
, inflateGetDictionary
, inflateSync
, inflateSyncPoint
, inflateUndermine
.Personal thanks to:
Original implementation (in C):
MIT


DUE - Debugging
No modern system should exist if it does not have debugging, and DUE has just what is needed.
Stepping
Debugging is simply enabled through a flag on the Run
method. script.Run()
var script = new ScriptEngine(typeof(GpioExtension));
script.Run(@"
var led = DigitalPin(4*16+11)//PE11
func OnOff()
writePin(led, On)
Delay(100)
writePin(led, Off)
Delay(100)
end
", true);// enable debugging
Once debugging option is enabled, an event script.DebugEvent += DebugStep_DebugEvent
is raised for every program step. In teh event handler, the user has the option to continue, step into or step over.
private static void DebugStep_DebugEvent(ScriptEngine sender, DebugEventArgs e) {
Debug.WriteLine($"Executing: {e.SrcLine} : {e.SrcCol}..{e.SrcCol + e.SrcLength}");
Debug.WriteLine("Locals");
foreach(var v in e.Locals) {
Debug.WriteLine($"{v.Name} = {v.Value}");
}
Debug.WriteLine("");
e.Action = DebugAction.StepInto; // Step into next statement
}
Breakpoints
A breakpoint is set through script.SetBreakpoint(lineNumber)
. Once execution hits a breakpoint, the debug event is raised with e.Breakpoint
set to true.
private static void DebugBreakpoint_DebugEvent(ScriptEngine sender, DebugEventArgs e) {
if (e.Breakpoint) {
// we hit a breakpoint
}
} else {
// This will get hit once on start up, because when we start debugging the debugger breaks on the first
// executable statement, without requiring an explicit breakpoint
}
e.Action = DebugAction.Continue; // Run until next breakpoint
}
Tip
e.Action
will default to DebugAction.Continue
if not set.
Clearing breakpoints is done through ScriptEngine.ClearBreakpoint
. The entire list of breakpoint can be fetched using ScriptEngine.GetBreakpoints
, which return an array of line numbers.
Pausing
When a program is Run
with Continue option and there is no breakpoints, the current thread will continue to be active. If pause is needed, the Run
must be called in a secondary thread, allowing the first thread to call script.Pause()
. This only works when Run
is fired with debug flag is set to true.


Master Splinter is a rat mutant. He is a ninjutsu sensei. And the tetartagonist of the 2012 Teenage Mutant Ninja Turtles series. Known for being both the adoptive father. And sensei of all four of the Turtles. As mutant, he is a taller. He is a mutant brown rat. Who wears now a Hamato Clan robe. He is a wise sensei. A wise teacher.
The long-lost birth father of Karai aka Miwa. Husband of Tang shen. As well as the adoptive brother and sworn enemy of The Shredder (born Oroku Saki). Hamato Yoshi is the son and heir of Hamato Yuuta. The leader of the Hamato Clan. And a wise father. He is very noble. He is very polite. He is very humble. And veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery disciplined. As a human "Hamato Yoshi": Yoshi is tall, lean, and muscular, with dark brown eyes and black hair. He wears a red kimoto with his clan's symbol when he lived in Japan. During the time that he resided in America, he wears a whitish blue polo shirt, along with brown pants. As a mutant "Splinter": Splinter has black, brown and white fur, with a droopy white beard, whiskers, a pink tail and a pink nose.Info From Wiki Fandom
Whose rivalry with the Foot Clan came to an end when he was a child. He impartes wisdom to leonardo. He impartes advice to leonardo. who reluctantly takes on the more challenging father-like role as sensei on his behalf. As human, he is a tall. And a very generous ninjutsu sensei. Who can be very strict. When it comes to training ofcource. And letting his sons venture up to the surface. As looked at in many 2012 episodes. He still wears the red kimoto that he wore in Japan. Unlike all of his past incarnations, Splinter is considerably taller than all of the Turtles.Splinter is many things to the Turtles - A wise sensei, defensive parent, loving father, an athourity figure, quirky master and Zen philosopher.Info From Wiki Fandom
He is a Mascular Japanese human. With black hair. And brown eyes. And he also wears a Hamato Clan clothing. At certain times, he may use harsh methods in order for them to learn a lesson. He has a brother. His brothers name is Oroku saki. He is very mature. He is highly trained in the art of Ninjutsu. He is a Honorable Rat Sensei of the Ninja Turtles.


Manoranjan is an online video streaming platform which provides movies, tv shows, documentaries and web series across 7 languages (i.e hindi, english, marathi, telugu, lamil, gujarathi & bengoli).
Highly evolved video streaming technology and a high attention to quality of experience across devices and platforms, make Manoranjan the most complete video destination for over the top video consumers.
Our adaptive video streaming technology ensures that the best possible video quality is played back automatically based on the available bandwidth, therefore making it a great video experience on both mobile networks as well as WiFi internet connections.
Content organization on Manoranjan is a result of a thoughtful user experience approach and strong design principles that ensure that the user is not overwhelmed with the breadth of content available.
In our endeavour to drive meaningful engagement with our audience, Manoranjan is investing in generating content keeping in mind the sentiments and attitudes of our consumers and has enjoyed great success with original programming content.


plotting module¶
-
plotting.
SG
(m)[source]¶ This function evaluates the coordinates of all points on the gasket up to a certain level V_m.
- Parameters
- number of levels V_m we would like to find coordinates for (m) –
- Returns
y - ((3^m+3)/2)*2 matrix holding coordinate values
-
plotting.
eval_op
(deg, k, level=7, T=None, frac=True, coefs=None, symm=False)[source]¶ Function that evaluates the Sobolev Orthogonal Polynomials
- Parameters
- Degree of SOP s_{j} we would like to evaluate (deg) –
- Coefficient Matrix of the Orthogonal Polynomials (T) –
- Type of SOP (k) –
- Number of levels we want to evaluate the SOP (level) –
- array of monomial values at the required level and degree or (T) – tuple of (filename of .npz/.npy file containing this array , array name key string)
- array of coefficient values at the required degree and symmetry or (coefs) – tuple of (filename of .npz/.npy file containing this array , array name key string)
- Boolean representing whether or not the fully symmetric orthogonal polynomials are needed (symm) –
- Returns
q - Values of the SOP of type k at some level
-
plotting.
fi
(x, qi)[source]¶ This function is a contractive similarity of the plane centered at the point qi of dilation factor 1/2.
- Parameters
- point in the plane (x) –
- point toward which to contract distances by 1/2 (qi) –
- Returns
evaluates the similarity
-
plotting.
gaskplot
(f, m, ax, color='b')[source]¶ This function plots a function defined on the level m vertices of SG.
- Parameters
- vector of size 3^ (f) –
- level of the function (m) –
- Returns
plots figure of the graph
from http://www.math.cornell.edu/~mhall/SGprograms/gaskplot.m
-
plotting.
getOmegas
(deg, k, frac=True, coefs=None, symm=False)[source]¶ Function that generates the Sobolev Orthogonal Polynomials
- Parameters
- highest degree of the Sobolev Orthogonal Polynomial (deg) – we would like to find
- Type of Sobolev Orthogonal Polynomial (k) –
- array of coefficient values at the required degree and symmetry or (coefs) – tuple of (filename of .npz/.npy file containing this array , array name key string)
- Boolean representing whether or not the fully symmetric orthogonal polynomials are needed (symm) –
- Returns
- W - (deg+2)*(deg+2) matrix, representing the coefficients of
the Sobolev Orthogonal Polynomial of order 0 - deg+1
-
plotting.
plot_easy_basis
(num, k, level=7, W=None)[source]¶ Plot the Easy Basis
- Parameters
- Number of monomials we would like to plot (num) –
- Type of Monomial (k) –
- The level we would like to plot each monomial (level) –
- array of easy basis values at the required level and degree or (W) – tuple of (filename of .npz/.npy file containing this array , array name key string)
- Returns
figures of the SOP of type k, from P_{num-1, k} down to P_{0, k}.
-
plotting.
plot_general
(T, level=7)[source]¶ Plot a general function given input
- Parameters
- Number of monomials we would like to plot (num) –
- Type of Monomial (k) –
- The level we would like to plot each monomial (level) –
- Returns
figures of the SOP of type k, from P_{num-1, k} down to P_{0, k}.
-
plotting.
plot_monomial
(num, k, level=7, T=None, symm=False)[source]¶ Plot the Monomials
- Parameters
- Number of monomials we would like to plot (num) –
- Type of Monomial (k) –
- The level we would like to plot each monomial (level) –
- array of monomial values at the required level and degree or (T) – tuple of (filename of .npz/.npy file containing this array , array name key string)
- Boolean representing whether or not the fully symmetric orthogonal polynomials are needed (symm) –
- Returns
figures of the SOP of type k, from P_{num-1, k} down to P_{0, k}.
-
plotting.
plot_op
(num, k, level=7, T=None, coefs=None, symm=False)[source]¶ Plot the Sobolev Orthogonal Polynomials
- Parameters
- Number of Antisymmetric SOPs we would like to plot (num) –
- Type of SOP (k) –
- The level we would like to plot each SOP (level) –
- array of monomial values at the required level and degree or (T) – tuple of (filename of .npz/.npy file containing this array , array name key string)
- array of coefficient values at the required degree and symmetry or (coefs) – tuple of (filename of .npz/.npy file containing this array , array name key string)
- Boolean representing whether or not the fully symmetric orthogonal polynomials are needed (symm) –
- Returns
figures of the SOP of type k, from s_{num-1} down to s_{0}.
-
plotting.
qcontract
(x, q)[source]¶ This function takes in a column of coordinate pairs and computes their image under the similarity which contracts distance to the point q by a factor of 1/2.
- Parameters
- (x) –
- the number of points (n) –
- Returns
y - coordinates of the n images
from http://www.math.cornell.edu/~mhall/SGprograms/qcontract.m


invalid email address or password Your email
Your password
Not a member yet ? Join us
Your username
Your email
Already a member ? Log in


A 2FA app is required to create the six-digit code you need to access your account each time you sign in. Most apps are for mobile devices; some are also available as desktop or web-based apps.
See the Knowledge Base for a list of apps we've tested ourselves
Open your 2FA app and scan the QR code image below.
After scanning the QR code or entering the text code your 2FA app will generate a six-digit code. Enter the code below.
{{ inputVerificationCode.value?.length || 0 }}/6
{{ inputVerificationCode.value?.length || 0 }}/6


Benchmark Projects - Number Memory
Return Home
3
Time: 3
Number Memory Test
The average person can remember seven numbers at once. Can you do more?
Start
Next
Restart
Submit


Business Account
change nav
Exchange Platform
Home
Account
Advertisements
Statistics Center
Logout
Industry type:
User Name:
E-mail:
Description:
Password:
********
Edit


Angus, Thongs and Perfect Snogging
Angus, Thongs and Perfect Snogging is a movie starring Georgia Groome, Aaron Taylor-Johnson, and Karen Taylor. The story centers on a 14-year-old girl who keeps a diary about the ups and downs of being a teenager, including the...


AirBnB Dynamic Places Search
- Swagger API Documentation: /apidocs
- Custom 404 Error Page: /I_dont_exist
- Static Places Search: /static.html
Amazon Product Advertising API
Python template for Amazon Product Advertising API. I built this for educational purposes only to learn about Amazon's API
Todo List with Facebook OAuth
simple todo list, JS frontend, facebook OAuth, mysql storage, docker.
Wikipedia Degrees of Separations
attempts to find shortest path of degrees of separation between links between 2 wiki pages
La trahison des images
To learn more about my projects, please visit: davidjohncoleman.com


{% extends "base.html" %} {% block title %} | Administrators{% endblock %} {% block bodydata %} data-project-id="{{project.id}}""{% endblock %} {% block main %}
Administrators for the project {{ project.name }}
Project administrators can access all data groupings as well as contribute and moderate all data.
They further can change the settings of this project.


 But here I am still. I have a small idea on how to turn this blog into something. And maybe actually use it everyday.
console.log("You'll know soon, don't worry.");


- get(String) - Static method in class com.github.mkolisnyk.sirius.client.Configuration
-
Gets the value of the configuration option specified by the parameter.
- get(ConfigurationOption) - Static method in class com.github.mkolisnyk.sirius.client.Configuration
-
Gets value for the predefined configuration option which is defined as
ConfigurationOption
enumeration.
- get(String) - Static method in class com.github.mkolisnyk.sirius.client.Context
-
Gets the value of the variable specified by name parameter
or null if no such variable available.
- get(Operation<T, Control>) - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
.
- getCurrent() - Static method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Gets the current page for current thread instance.
- getCurrentFromList(Class<? extends Page>[], int) - Static method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Checks multiple page classes in order to identify which of the classes proposed
fit the current page.
- getCurrentFromList(Class<? extends Page>[], int, boolean) - Static method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Checks multiple page classes in order to identify which of the classes proposed
fit the current page.
- getDefaultConfigFile() - Static method in class com.github.mkolisnyk.sirius.client.Configuration
-
Returns the default location of the configuration file to read data from.
- getDefaultPagesPackage() - Static method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Returns package name which is used as the root package for all
page classes in the entire solution.
- getDriver() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets the direct reference to the WebDriver object.
- getDriver() - Method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Gets the actual WebDriver object if some WebDriver API is needed directly.
- getFirstAvailableControlFromList(Control[], int) - Static method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Goes through the list of proposed controls and returns the first one which appears.
- getFormat() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets the string which can be used in custom controls when the data is to
be retrieved based on some specific format (e.g.
- getItem(int) - Method in class com.github.mkolisnyk.sirius.client.ui.controls.TableView
-
Generates and returns control object which corresponds to the compound object
item specified by index.
- getItemLocatorText() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets string representation of item locator.
- getItemsCount() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.TableView
-
Calculates and returns the available items count.
- getLocator() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets actual locator to be used for element location on page.
- getLocatorText() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets the string representation of the locator.
- getParent() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets reference to the parent
Page
object.
- getRect() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets rectangular dimensions of current control.
- getScrollable() - Method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Returns element which is available for scrolling.
- getScrollDirection() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets the direction of scrolling.
- getScrollTo() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets text to scroll to in case element isn't immediately available on page.
- getSelect() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.SelectList
-
Initialises and returns core Select object from WebDriver client library.
- getSource() - Method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Gets the page source code.
- getSubItem(String, int, Class<T>) - Method in class com.github.mkolisnyk.sirius.client.ui.controls.TableView
-
Common method which generates control object for specific sub-item of specific type.
- getSubItem(String, int) - Method in class com.github.mkolisnyk.sirius.client.ui.controls.TableView
-
- getSubItemLocator(String, int) - Method in class com.github.mkolisnyk.sirius.client.ui.controls.TableView
-
Provides fully qualified locator for sub-item for specified index and name.
- Getters - Class in com.github.mkolisnyk.sirius.client.ui.predicates
-
Collects predicates responsible for various get operations.
- getText() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets element text.
- getText() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Edit
-
- getTextControl(String) - Method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Dynamically generates control object which corresponds to the element
containing text specified by the parameter.
- getThreadName() - Static method in class com.github.mkolisnyk.sirius.client.Driver
-
Generates string which corresponds to current thream.
- getTimeout() - Static method in class com.github.mkolisnyk.sirius.client.ui.Page
-
Returns the timeout value which is currently set.
- getValue() - Method in enum com.github.mkolisnyk.sirius.client.ConfigurationOption
-
Gets the string value associated with the constant.
- getValue() - Method in enum com.github.mkolisnyk.sirius.client.Platform
-
Gets the string associated with current enumeration value.
- getValue() - Method in class com.github.mkolisnyk.sirius.client.ui.controls.Control
-
Gets element value.


Using a file share simply copies the file to a network file share specified in the UNC directory path. Figure 1 shows an example where RSS Bandit is configured to store the Feeds data in the RSSBanditFeeds folder of the server YourServer.
Figure 1: Remote Feeds Dialogue - File Share
Obviously, you will need read/write access to this network share from each computer with which you wish to synchronize RSS Bandit.


Using SQLite for Storage and Caching
The GNSDK SQLite (gnsdk_storage_sqlite
) module provides a local storage solution using the SQLite database engine. This module is used to manage a local cache of content and Gracenote Service queries. This is for GNSDK use only - your application cannot use this database for its own storage. SQLite is the only database module available for Gracenote Automotive.
For information on using SQLite, see http://www.sqlite.org
Besides functions specific to SQLite, there are a set of general storage functions that apply to the database module. These general functions cover setting cache location and various cache maintenance operations (cleanup, validate, compact, flush, and so on). See the API Reference for a complete list.
Specifically, API calls are provided to manage 3 stores or caches (as indicated by the following defines):
GNSDK_MANAGER_STORAGE_LISTS
—Stores Gracenote locale lists.GNSDK_MANAGER_STORAGE_CONTENTCACHE
—Stores cover art and related information.GNSDK_MANAGER_STORAGE_QUERYCACHE
—Stores media identification requests.
Note: Caching, with the exception of locales, is not a recommended practice. See Setting Local and Online Lookup Modes for more information.
To begin, your application needs to make the following call to initialize SQLite (after initializing GNSDK Manager and getting an SDK handle).
gnsdk_storage_sqlite_initialize(sdkmgr_handle);
Note: Important: It is possible to initialize this library at any time before or after other libraries have been operating. However, to ensure that all queries are properly cached, it should be initialized immediately after the GNSDK Manager and before any other libraries.
Setting Location, Access, and File Size
You can set various storage attributes by creating a configuration handle. The following section of code shows setting the access mode to read mode, read/write mode, and location for gn_lists.gdb:
gnsdk_config_handle_t h_config = GNSDK_NULL; gnsdk_config_create(&h_config);
// access mode read only gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_LISTS_ACCESS_MODE, GNSDK_CONFIG_MANAGER_STORAGE_ACCESS_READ_ONLY); // access mode read/write
gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_LISTS_ACCESS_MODE, GNSDK_CONFIG_MANAGER_STORAGE_ACCESS_READ_WRITE); // location gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_LISTS_LOCATION, "./path/to/list/storage"); gnsdk_manager_storage_configure(h_config); gnsdk_config_release(h_config);
You can set a maximum file size for temporary storage. If you do not want temporary storage, set the access mode to read only. In the following code, temporary storage values are set:
gnsdk_config_handle_t h_config = GNSDK_NULL; gnsdk_config_create(&h_config); // access mode - read only gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_TEMP_ACCESS_MODE, GNSDK_CONFIG_MANAGER_STORAGE_ACCESS_READ_ONLY); // access mode - read/write gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_TEMP_ACCESS_MODE, GNSDK_CONFIG_MANAGER_STORAGE_ACCESS_READ_WRITE); // location gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_TEMP_LOCATION, "./path/to/temp/storage"); // file size gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_TEMP_FILESIZE, "1024"); gnsdk_manager_storage_configure(h_config); gnsdk_config_release(h_config);
Most content and query caches are controlled through GNSDK lookup mode. Configuration is limited to file size and location, as shown below.
gnsdk_config_handle_t h_config = GNSDK_NULL; gnsdk_config_create(&h_config); // file size
gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_QUERYCACHE_FILESIZE, "1024"); gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_CONTENTCACHE_FILESIZE, "1024"); // location gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_QUERYCACHE_LOCATION, "./path/to/create/query_cache"); gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_CONTENTCACHE_LOCATION, "./path/to/create/content_cache"); gnsdk_manager_storage_configure(h_config); gnsdk_config_release(h_config);
If your application needs all storage to reside in the same location, you can use GNSDK_CONFIG_MANAGER_STORAGE_ALL_LOCATION
to set the location for all storages.
gnsdk_config_handle_t h_config = GNSDK_NULL; gnsdk_config_create(&h_config); // location gnsdk_config_value_set(h_config, GNSDK_CONFIG_MANAGER_STORAGE_ALL_LOCATION, "./path/for/storages"); gnsdk_manager_storage_configure(h_config); gnsdk_config_release(h_config);
As with all GNSDK "initialize" calls, there should be a corresponding "shutdown" call before your application exits:
gnsdk_storage_sqlite_shutdown();
Linking to External SQLite Libraries
If you are using your own version of SQLite in your application in addition to the GNSDK instance of SQLite, you can link to it by using gnsdk_storage_sqlite_use_external_library(). This function indicates to SQLite that it should use a supplied SQLite3 shared library.
gnsdk_storage_sqlite_use_external_library(sqlite_filepath);
The parameter sqlite_filepath contains the filepath to the SQLite shared library.
This function must be called immediately before a call to gnsdk_storage_sqlite_initialize().
After successful initialization, you next set a valid folder for local storage. This must be set before this library will successfully begin operating.
To ensure that all queries are properly cached, initialize the library immediately after the GNSDK Manager and before any other libraries.
Note: Important: Gracenote's instance of SQLite has been compiled with specific flags to enable optional features of SQLite. Your version of SQLite must be built with the following flags to be usable:
SQLITE_ENABLE_COLUMN_METADATA
SQLITE_ENABLE_UNLOCK_NOTIFY
SQLITE_OMIT_DEPRECATED


| DOSE: |
tablets |
oral |
Pharms - Lithium |
(daily) |
| |
4 hits |
oral |
LSD |
(blotter / tab) |
I just want to warn anybody taking Lithium (or probably most other psych meds) to NEVER do acid while Lithium is in your system. I was in high school, and I had to take Lithium. Anyways, I was taking it for a couple months, when I came across some acid. I've done LSD before I ever took Lithium, and I really liked it a lot. I didn't know that they don't mix.
Two hours after dosing, I went to a park. I was feeling really jittery even though I wasn't tripping that hard. Well, soon enough, I was tripping insanely hard, and began losing control of my body. Music was playing and getting louder and louder until it was louder than sound could physically exist. I sat down on the grass, so I wouldn't fall. My arms started flailing and I started shaking. I couldn't even really tell what was happening because I lost control over being able to think. My mind was insane, I could not think a thought, and I was gripped in terror. Eventually, it became so intense that I blacked out.
I woke up in a ditch, covered in leaves and dirt, and began to walk back to my car. I had to ask somebody along the way, whether I was alive or not, what planet I was on, what year it was. My mind was completely empty of what former reality consisted of. I went to my car, and saw its' blue paint. I remembered the color I was looking at was called 'blue.' I started remembering things about my life and about reality again, like what my name was for instance. Anyways, the trip was over, I don't know how much time had passed.
I went home and turned on the TV. On the bed, began to have yet another siezure and I couldn't breath. Eventually it stopped. Since that time, I have known two other people who have done LSD on Lithium. One had a violent siezure like me, and the other one had a very intense, terrible trip. DON'T MIX THESE DRUGS, IT IS LIKE BEING IN HELL.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


BRIYANI
Biryani is a mixed rice dish with its origins among the Muslims of the Indian subcontinent.It can be compared to mixing a curry, later combining it with semi-cooked rice separately. This dish is especially popular throughout the Indian subcontinent, as well as among its diaspora. It is also prepared in other regions such as Iraqi Kurdistan.[4] It is made with Indian spices, rice, meat (chicken, beef, goat, pork, lamb, prawn, or fish), or eggs. The word 'biryani' is derived from a Persian word, birian, which means fried before cooking. It is one of the most popular dishes, which has acquired a niche for itself in South Asian cuisine.
PAROTTA
A Parotta is a layered flatbread, originating from the Indian subcontinent, made from maida flour, popular in Southern India. It is a common street food in southern India, especially in Kerala primarily, and then in Tamilnadu,Karnataka Maharashtra and the countries of United Arab Emirates, Sri Lanka etc. There are different types of parotta including coin porotta, Malabari porotta, berotta, etc. Parottas are often available as street food and in restaurants across Kerala, Tamil Nadu, Karnataka, Andhra Pradesh and Telangana. At some places it is also served at weddings, religious festivals and feasts. It is prepared by kneading maida flour, egg (in some recipes), oil or ghee and water. The dough is beaten into thin layers and later forming a round spiralled into a ball using these thin layers. The ball is rolled flat and pan fried.Parottas are frequently eaten with vegetable kurma or chicken, fish, mutton or beef saalna (a spicy curry). Chilli parotta and kothu parotta are prepared using parottas.
ATHO
Atho is probably the dish that defines Chennai's version of Burmese food. It's actually a variation of a Burmese salad - Khauk swe thoke. This wheat noodle salad is made with dried shrimp, cabbage, carrots, fish sauce and finished with lime and fried peanut oil. These salads are referred to as athok or thouk in Burma, which became Atho in Chennai. The version here doesn't feature the fish oil, and is made with grated carrots, cabbage, fried onions combined with garlic oil, chilli powder and lime juice. The orange noodles are mixed with these vegetables (almost always by hand) and the Atho gets its crunch from the addition of bejo, a crispy deep-fried snack crafted with rice flour and a sprinkling of peanuts. The Atho makes for a perfect any-time snack; it's flavourful and yet not too spicy.


Bait.py is a Python program which parses a PHISH input script and uses a dynamically-loaded backend to directly run a PHISH net and perform a calculation, or create a script that can be used to do the same. In PHISH lingo, a "minnow" is a stand-alone application which makes calls to the PHISH library to exchange data with other PHISH minnows via its input and output ports. A "net" is collection of schools of minnows.
There are Bait backends for running a PHISH net using MPI, running a PHISH net using ZMQ, generating configuraiton files for MPI or ZMQ, and generating a dotfile that can be converted into a diagram of a PHISH net via the GraphViz tool.
You can edit the input script or pass it different parameters via bait.py command-line arguments to change the calculation. Re-running bait.py will run a new net or create a new script.
The remainder of this page discusses how bait.py is used and how a PHISH input script is formatted. The input script commands recognized by bait.py have their own doc pages.
These are the input script commands recognized by bait.py:
Before using bait.py for the first time, one or more backend libraries must be built which bait.py uses for interfacing to MPI and/or ZMQ. This creates shared libraries which your Python must also be able to find.
The easiest way to build all of PHISH, including the bait backend libraries, is to use the cross-platform CMake build system. We recommend building PHISH with a separate build directory:
$ tar xzvf phish.tar.gz -C ~/src $ mkdir ~/build/phish $ cd ~/build/phish $ ccmake ~/src/phish-14sep12
Then, in the CMake curses interface, configure the build, generate makefiles, and build phish:
$ make
You can also build one or more of the backend libraries from the src directory of the distribution by typing one or more of these lines:
make -f Makefile.machine baitmpi make -f Makefile.machine baitmpiconfig make -f Makefile.machine baitzmq make -f Makefile.machine baitgraph make -f Makefile.machine baitnull
where "machine" is the name of one of the Makefiles in the directory. These should produce files like libphish-bait-mpi.so or libphish-bait-zmq.so. See the discussion of the --backend command-line switch in the next section, for the difference between the various backend options. See the discussion in this section if none of the provided Makefiles are a match to your machine.
When you run bait.py, your Python must be able to find the appropriate backend shared library. The simplest way to do this is to add a line to your shell start-up script.
For csh or tcsh, add a line like this to your .cshrc file:
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/home/sjplimp/phish/src
For bash, add a line like this to your .bashrc file:
export LD_LIBRARY_PATH $LD_LIBRAY_PATH:/home/tshead/build/phish/src
For OSX systems, use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.
After editing your shell start-up script, be sure to invoke it, e.g. source .cshrc.
See the discussion in this section for an alternative way to do this.
You are now ready to use the bait.py tool. It is a Python script in the bait directory of the PHISH distribution. Like any Python script you can run it in one of two ways:
bait.py --switch value(s) ... < in.script python bait.py --switch values ... < in.script
For the first case, you need to insure that the first line of bait.py gives the correct path to the Python installed on your machine, e.g.
#!/usr/local/bin/python
and that the bait.py file is executable, e.g.
chmod +x bait.py
Normally you will want to invoke bait.py from the directory where your PHISH input script is, so you may need to prepend bait.py with a path or make an alias for running it conveniently.
The switch/value command-line arguments recognized by bait.py are discussed in the next section.
These are the command-line arguments recognized by bait.py. Each is specified as "-switch value(s)". Each switch has an abbreviated form; several of them have default settings.
Use --help to display a help message and exit.
Use --backend to select the desired bait.py backend. The choice of backend defines how the input script will be interpreted to run a PHISH net. Current choices for BACK are "graphviz", "mpi", "mpi-config", "null", and "zmq". We plan to add a "zmq-config" option.
The --launch option will use the program LAUNCHER to invoke all the minnows. This is useful if the minnow is a Python script, in which case --launch python will launch the minnow using Python. LAUNCH can be multiple words if desired, e.g. --launch python -x.
The --path option specifies a colon-separated list of one or more directories as PATH1, PATH2, etc. When bait.py processes each minnow, as specified by the minnow command, it looks for the minnow's executable file in this list of directories, so that it can write it to the launch script with an absolute path name.
Use --set to set an option for the input script that is the same as if the set command had been used in the input script with NAME and VALUE. For example, --set memory 5 is the same as using "set memory 5" in the input script to specify the maximum datum size to 5 Kbytes. A value specified in the input script will override a command-line setting.
Use --suffix to supply a SUFFIX string that will be appended to the name of each minnow executable in your input script. This is useful when you have minnow executables that have been built using different communication backends - for example, if you have a minnow "foo.c", you might link it against the MPI and ZMQ backends to produce two executables, "foo-mpi", and "foo-zmq". Using the --suffix option, you can create a single PHISH input script and run it against either executable by specifying --suffix=-mpi or --suffix=-zmq. It is also useful if a minnow is a Python script, ending in ".py", in which case you could specify --suffix=.py and use the --launch option to invoke the minnow with Python.
The --variable switch defines a variable that can be used within the script. It can be used multiple times to define different variables with NAME and VALUE. A variable command can also be used in the input script itself. The VALUE specified on the command-line will override the value of a variable with the same NAME in the input script, which allows you to set a default value in the input script and overrided it via the command line.
The variable NAME and VALUE are any alphanumeric string. A list of strings can also be assigned to it, e.g. a series of filenames. For example,
bait.py --variable files *.cpp < in.phish
creates the variable named "files" containing a list of all CPP files in the current directory.
Note that there is a variable called "hostnames" that must be set to use the ZMQ backend; see the variable doc page for details.
The --verbose option causes bait.py to produce verbose output while processing your input script. The verbose output will vary depending on the backend in use, and will be written to stderr.
A PHISH input script is a text file that contains commands, typically one per line.
Blank lines are ignored. Any text following a "#" character is treated as a comment and removed, including the "#" character. If the last printable character in the line is "&", then it is treated as a continuation character, the next line is appended, and the same procedure for stripping a "#" comment and checking for a trailing "&" is repeated.
The resulting command line is then searched for variable references. A variable with a single-character name, such as "n", can be referenced as $n. A variable with a multi-character name (or single-character name), such as "foo", is referenced as ${foo}. Each variable found in the command line is replaced with the variable's contents, which is a list of strings, separated by whitespace. Thus a variable "files" defined either by a bait.py command-line argument or the variable command as
-v files f1.txt f2.txt f3.txt variable files f1.txt f2.txt f3.txt
would be substituted for in this command:
minnow 1 filegen ${files}
so that the command becomes:
minnow 1 filegen f1.txt f2.txt f3.txt
After variable substitution, a single command is a series of "words" separated by whitespace. The first word is the command name; the remaining words are arguments. The command names recognized by bait.py are listed above. Each command has its own syntax; see its doc page for details.
With one exception, commands in a PHISH input script can be listed in any order. The script is processed by bait.py after the entire script is read. The exception is that a variable cannot be used before it is defined.
This section of the Introduction doc page, discussed this diagram of a PHISH calculation for counting the number of times words appear in a corpus of files, performed as a streaming MapReduce operation:
This is the PHISH input script in example/in.wordcount that represents the diagram:
# word count from files # provide list of files or dirs as -v files command-line arg
minnow 1 filegen ${files} minnow 2 file2words minnow 3 count minnow 4 sort 10 minnow 5 print
hook 1 roundrobin 2 hook 2 hashed 3 hook 3 single 4 hook 4 single 5
school 1 1 school 2 5 school 3 3 school 4 1 school 5 1
The minnow commands list the 5 different minnows used. Note the use of the ${files} variable to pass a list of filenames or directories to the filegen minnow.
The hook commands specify the communication pattern used bewteen different schools of minnows. The key pattern for this example is the hashed style, which allows the file2words minnow to pass a "key" (a word) to the PHISH library. The library hashes the word to determine which count minnow to send the datum to.
The school commands specify how many instances of each minnow to launch. Any number of file2words and count minnows could be specified.
When this script is run thru bait.py in the example directory, as
../bait/bait.py --backend mpi-config -v files in.* -p ../minnow < in.wc > outfile
using -mpi-config as the backend, then bait.py produces the following lines in outfile. (Note that if --backend mpi is used, bait.py will launch the parallel job immediately after processing it.)
-n 1 ../minnow/filegen in.bottle in.cc in.cc.jon in.filelist in.pp in.rmat in.slow in.wc in.wrapsink in.wrapsource in.wrapsourcefile in.wrapss --phish-backend mpi --phish-minnow filegen 1 1 0 --phish-out 1 0 0 roundrobin 5 1 0 : & -n 5 ../minnow/file2words --phish-backend mpi --phish-minnow file2words 2 5 1 --phish-in 1 0 0 roundrobin 5 1 0 --phish-out 5 1 0 hashed 3 6 0 : & -n 3 ../minnow/count --phish-backend mpi --phish-minnow count 3 3 6 --phish-in 5 1 0 hashed 3 6 0 --phish-out 3 6 0 single 1 9 0 : & -n 1 ../minnow/sort 10 --phish-backend mpi --phish-minnow sort 4 1 9 --phish-in 3 6 0 single 1 9 0 --phish-out 1 9 0 single 1 10 0 : & -n 1 ../minnow/print --phish-backend mpi --phish-minnow print 5 1 10 --phish-in 1 9 0 single 1 10 0
which is the format of an mpiexec config file. There is one line per minnow, as defined by the input script. The "-n N" specifies how many copies of the minnow will be invoked. The next argument is the name of the minnow executable, followed by any minnow arguments, followed by backend-specific arguments such as "-minnow", "-in", and "-out" that encode the communication patterns between the minnows.
This outfile can be launched via the mpiexec command as:
mpiexec -configfile outfile
for MPICH, or as
mpiexec `cat outfile`
for OpenMPI. (Note that if --backend mpi is used, bait.py will launch the parallel job immediately after processing it.)
This will launch 11 independent processes as an MPI job. Each process will call the PHISH library to exchange datums with other processes in the pattern indicated in the diagram. The datum exchanges will be performed via MPI\Send() and MPI\_Recv() calls since the MPI backend of the PHISH library is being invoked.


| HBASE-14975 |
Don't color the total RIT line yellow if it's zero |
Major |
UI |
Elliott Clark |
Pallavi Adusumilli |
| HBASE-15083 |
Gets from Multiactions are not counted in metrics for gets. |
Major |
. |
Elliott Clark |
Heng Chen |
| HBASE-15152 |
Automatically include prefix-tree module in MR jobs if present |
Major |
mapreduce |
Jonathan Hsieh |
Jonathan Hsieh |
| HBASE-15133 |
Data loss after compaction when a row has more than Integer.MAX_VALUE columns |
Major |
Compaction |
Toshihiro Suzuki |
Toshihiro Suzuki |
| HBASE-15148 |
Resolve IS2_INCONSISTENT_SYNC findbugs warning in AuthenticationTokenSecretManager |
Major |
. |
Yu Li |
Yu Li |
| HBASE-15145 |
HBCK and Replication should authenticate to zookepeer using server principal |
Major |
. |
Enis Soztutar |
Enis Soztutar |
| HBASE-15019 |
Replication stuck when HDFS is restarted |
Major |
Replication, wal |
Matteo Bertozzi |
Matteo Bertozzi |
| HBASE-15190 |
Monkey dies when running on shared cluster (gives up when can't kill the other fellows processes) |
Major |
integration tests |
stack |
stack |
| HBASE-15200 |
ZooKeeper znode ACL checks should only compare the shortname |
Minor |
security |
Andrew Purtell |
Andrew Purtell |
| HBASE-15218 |
On RS crash and replay of WAL, loosing all Tags in Cells |
Blocker |
Recovery, regionserver, security |
Anoop Sam John |
Anoop Sam John |
| HBASE-15214 |
Valid mutate Ops fail with RPC Codec in use and region moves across |
Critical |
. |
Anoop Sam John |
Anoop Sam John |
| HBASE-15217 |
Canary -regionserver fails with cast exception |
Critical |
canary |
Vishal Khandelwal |
Ted Yu |
| HBASE-15216 |
Canary does not accept config params from command line |
Major |
canary |
Vishal Khandelwal |
Vishal Khandelwal |
| HBASE-14192 |
Fix REST Cluster constructor with String List |
Minor |
REST |
Rick Kellogg |
Andrew Purtell |
| HBASE-15252 |
Data loss when replaying wal if HDFS timeout |
Blocker |
wal |
Duo Zhang |
Duo Zhang |
| HBASE-15198 |
RPC client not using Codec and CellBlock for puts by default |
Critical |
. |
Anoop Sam John |
Anoop Sam John |
| HBASE-15274 |
ClientSideRegionScanner's reaction to Scan#setBatch is not consistent between HBase versions |
Minor |
. |
Youngjoon Kim |
Youngjoon Kim |
| HBASE-15279 |
OrderedBytes.isEncodedValue does not check for int8 and int16 types |
Major |
. |
Robert Yokota |
Robert Yokota |
| HBASE-15247 |
InclusiveStopFilter does not respect reverse Filter property |
Major |
Filters |
Rick Moritz |
Amal Joshy |
| HBASE-15393 |
Enable table replication command will fail when parent znode is not default in peer cluster |
Major |
Replication |
Ashish Singhi |
Ashish Singhi |
| HBASE-15423 |
Fix integration issue came due HBASE-15216 from main to 0.98. |
Minor |
. |
Vishal Khandelwal |
Vishal Khandelwal |
| HBASE-15430 |
Failed taking snapshot - Manifest proto-message too large |
Critical |
snapshots |
JunHo Cho |
JunHo Cho |