The optimization package provides algorithms to optimize (i.e. either minimize or maximize) some objective or cost function. The package is split in several sub-packages dedicated to different kind of functions or algorithms.
The top level optimization package provides common interfaces for the optimization algorithms provided in sub-packages. The main interfaces defines defines optimizers and convergence checkers. The functions that are optimized by the algorithms provided by this package and its sub-packages are a subset of the one defined in the analysis package, namely the real and vector valued functions. These functions are called objective function here. When the goal is to minimize, the functions are often called cost function, this name is not used in this package.
The type of goal, i.e. minimization or maximization, is defined by the enumerated GoalType which has only two values: MAXIMIZE and MINIMIZE.
Optimizers are the algorithms that will either minimize or maximize, the objective function by changing its input variables set until an optimal set is found. There are only four interfaces defining the common behavior of optimizers, one for each supported type of objective function:
Despite there are only four types of supported optimizers, it is possible to optimize a transform a non-differentiable multivariate vectorial function by converting it to a non-differentiable multivariate real function thanks to the LeastSquaresConverter helper class. The transformed function can be optimized using any implementation of the MultivariateRealOptimizer interface.
For each of the four types of supported optimizers, there is a special implementation which wraps a classical optimizer in order to add it a multi-start feature. This feature call the underlying optimizer several times in sequence with different starting points and returns the best optimum found or all optima if desired. This is a classical way to prevent being trapped into a local extremum when looking for a global one.
A UnivariateRealOptimizer is used to find the minimal values of a univariate real-valued function f.
These algorithms usage is very similar to root-finding algorithms usage explained in the analysis package. The main difference is that the solve methods in root finding algorithms is replaced by optimize methods.
This package provides an implementation of George Dantzig's simplex algorithm for solving linear optimization problems with linear equality and inequality constraints.
Direct search methods only use cost function values, they don't need derivatives and don't either try to compute approximation of the derivatives. According to a 1996 paper by Margaret H. Wright (Direct Search Methods: Once Scorned, Now Respectable), they are used when either the computation of the derivative is impossible (noisy functions, unpredictable discontinuities) or difficult (complexity, computation cost). In the first cases, rather than an optimum, a not too bad point is desired. In the latter cases, an optimum is desired but cannot be reasonably found. In all cases direct search methods can be useful.
Simplex-based direct search methods are based on comparison of the cost function values at the vertices of a simplex (which is a set of n+1 points in dimension n) that is updated by the algorithms steps.
The instances can be built either in single-start or in multi-start mode. Multi-start is a traditional way to try to avoid being trapped in a local minimum and miss the global minimum of a function. It can also be used to verify the convergence of an algorithm. In multi-start mode, the minimizesmethod returns the best minimum found after all starts, and the etMinima method can be used to retrieve all minima from all starts (including the one already provided by the minimizes method).
The direct package provides two solvers. The first one is the classical Nelder-Mead method. The second one is Virginia Torczon's multi-directional method.
The general package deals with non-linear vectorial optimization problems when the partial derivatives of the objective function are available.
One important class of estimation problems is weighted least squares problems. They basically consist in finding the values for some parameters pk such that a cost function J = sum(wi(mesi - modi)2) is minimized. The various (targeti - modeli(pk)) terms are called residuals. They represent the deviation between a set of target values targeti and theoretical values computed from models modeli depending on free parameters pk. The wi factors are weights. One classical use case is when the target values are experimental observations or measurements.
Solving a least-squares problem is finding the free parameters pk of the theoretical models such that they are close to the target values, i.e. when the residual are small.
Two optimizers are available in the general package, both devoted to least-squares problems. The first one is based on the Gauss-Newton method. The second one is the Levenberg-Marquardt method.
In order to solve a vectorial optimization problem, the user must provide it as an object implementing the DifferentiableMultivariateVectorialFunction interface. The object will be provided to the estimate method of the optimizer, along with the target and weight arrays, thus allowing the optimizer to compute the residuals at will. The last parameter to the estimate method is the point from which the optimizer will start its search for the optimal point.
In addition to least squares solving, the NonLinearConjugateGradientOptimizer class provides a non-linear conjugate gradient algorithm to optimize DifferentiableMultivariateRealFunction. Both the Fletcher-Reeves and the Polak-Ribière search direction update methods are supported. It is also possible to set up a preconditioner or to change the line-search algorithm of the inner loop if desired (the default one is a Brent solver).
The PowellOptimizer provides an optimization method for non-differentiable functions.
The fitting package deals with curve fitting for univariate real functions. When a univariate real function y = f(x) does depend on some unknown parameters p0, p1 ... pn-1, curve fitting can be used to find these parameters. It does this by fitting the curve so it remains very close to a set of observed points (x0, y0), (x1, y1) ... (xk-1, yk-1). This fitting is done by finding the parameters values that minimizes the objective function sum(yi-f(xi))2. This is really a least squares problem.
For all provided curve fitters, the operating principle is the same. Users must first create an instance of the fitter, then add the observed points and once the complete sample of observed points has been added they must call the fit method which will compute the parameters that best fit the sample. A weight is associated with each observed point, this allows to take into account uncertainty on some points when they come from loosy measurements for example. If no such information exist and all points should be treated the same, it is safe to put 1.0 as the weight for all points.
The CurveFitter class provides curve fitting for general curves. Users must provide their own implementation of the curve template as a class implementing the ParametricRealFunction interface and they must provide the initial guess of the parameters. The more specialized PolynomialFitter and HarmonicFitter classes require neither an implementation of the parametric real function not an initial guess as they are able to compute them by themselves.
An example of fitting a polynomial is given here:
PolynomialFitter fitter = new PolynomialFitter(degree, new LevenbergMarquardtOptimizer()); fitter.addObservedPoint(-1.00, 2.021170021833143); fitter.addObservedPoint(-0.99 2.221135431136975); fitter.addObservedPoint(-0.98 2.09985277659314); fitter.addObservedPoint(-0.97 2.0211192647627025); // lots of lines ommitted fitter.addObservedPoint( 0.99, -2.4345814727089854); PolynomialFunction fitted = fitter.fit();


2. Model System¶
In terms of second quantisation operators, a general Hamiltonian can be written as
where \(c_{i, \sigma}\) is the destruction operator for an electron at site \(i\) and spin \(\sigma\), \(c^{\dagger}_{i, \sigma}\) is the creation operator for an electron at site \(i\) and spin \(\sigma\).
Model Hamiltonians geared to simulate the key physics of notoriously complicated complete Hamiltonians of large-scale interacting systems.
2.1. Lattice¶
Lattice is an periodic array of discrete points in space generated by a set of discrete translation operations described by:
where \(n_i\) are any integers and \(\vec{a}_i\) are known as the primitive vectors which lie in different directions and span the lattice. The discrete points can be atoms, ions, electronic site, spin one-half site, spinless fermion site, etc.
Generaly speaking, to build a The Lattice
object, we need first define a
Cell
object. Cell
has attribute of dimension and three primitive
vectors \(\vec{a}_1\) \(\vec{a}_2\) and \(\vec{a}_3\). To initialize a
cell:
cell = Cell(1,[d,0.,0.],[0.,0.,0.],[0.,0.,0.])
Then we can add arbitrary sites to this cell by assign coordinate and label of the site:
cell.add_site(LatticeSite([0.,0.,0.],'A'))
Then we add bonds to this cell by assign the integer coordinate of first cell, index of first site in first cell and the integer coordinate of second cell, index of the second site in second cell:
cell.add_bond(LatticeBond([0,0,0],0,[1,0,0],0))
Finally complete it by assign the cell and shpe to the lattice to Lattice
:
lattice = Lattice(cell,[4,1,1])
It may not be immediately obvious what this code does. Fortunately, Lattice
objects
have a convenient Lattice.plot()
method to easily visualize the constructed lattice.
2.1.1. Linear lattice¶
Starting from the basics, we’ll build a simple linear lattice with only one site.
from moha import *
d = 1.0 # unit cell length
def linear(d):
#define a 1D linear lattice cell with vectors a1 a2 and a3
cell = Cell(1,[d,0.,0.],[0.,0.,0.],[0.,0.,0.])
#add a site labeled 'A' at positon [0.,0.,0.]
cell.add_site(LatticeSite([0.,0.,0.],'A'))
#add a bond from first site in cell [0,0,0] to first site in cell [1,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,0,0],0))
#buld a lattice of shape [4,1,1] with cell we defined
lattice = Lattice(cell,[4,1,1])
return lattice
lattice = linear(d)
#plot the lattice we constructed
lattice.plot()
Visualize the lattice by Lattice.plot()
method.
2.1.2. Two sites linear lattice¶
The next example is also linear lattice but a slightly more complicated, the cell of the lattice is consist of two different sites.
from moha import *
d = 1.0 # unit cell length
d_ab = 0.2 # distance between site A and B
def linear(d,d_ab):
#define a 1D linear lattice cell with vectors a1 a2 and a3
cell = Cell(1,[d, 0., 0.],[0., 0., 0.],[0., 0., 0.])
#add a site labeled 'A' at positon [0., 0., 0.]
cell.add_site(LatticeSite([0., 0., 0.], 'A'))
#add a site labeled 'B' at positon [d_ab, 0., 0.]
cell.add_site(LatticeSite([d_ab, 0., 0.],'B'))
#add a bond from first site in cell [0,0,0] to second site in cell [0,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[0,0,0],1))
#add a bond from second site in cell [0,0,0] to first site in cell [1,0,0]
cell.add_bond(LatticeBond([0,0,0],1,[1,0,0],0))
#buld a lattice of shape [4,1,1] with cell we defined
lattice = Lattice(cell,[4,1,1])
return lattice
Visualize the lattice by Lattice.plot()
method.
2.1.3. Square lattice¶
From 1D to 2D, the most basic example square lattice.
from moha import *
a = 1.0 #unit cell length
def square(a):
#define a 2D square lattice cell with vectors a1 a2 and a3
cell = Cell(2,[a, 0., 0.],[0., a, 0.],[0., 0., 0.])
#add a site labeled 'A' at positon [0.,0.,0.]
cell.add_site(LatticeSite([0.,0.,0.],'A'))
#add a bond from first site in cell [0,0,0] to first site in cell [1,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,0,0],0))
#add a bond from first site in cell [0,0,0] to first site in cell [0,1,0]
cell.add_bond(LatticeBond([0,0,0],0,[0,1,0],0))
#buld a lattice of shape [4,4,1] with cell we defined
lattice = Lattice(cell,[4,4,1])
return lattice
lattice = square(a)
#plot the lattice we constructed
lattice.plot()
Visualize the lattice by Lattice.plot()
method.
2.1.4. Graphene lattice¶
Graphene lattice is a more general example:
It is two dimension.
The cell of graphene contain two sites.
The primitive vectors of the cell are non-orthogonal.
from moha import *
from math import sqrt
a = 0.24595 # unit cell length
a_cc = 0.142 # carbon carbon distance
def graphene(a,a_cc):
#define a 2D graphene lattice cell with vectors a1 a2 and a3
cell = Cell(2,[[a,0.,0.],[a/2,a/2*sqrt(3),0.],[0.,0.,0.]])
#add a site labeled 'A' at positon [0., -a_cc/2., 0.]
cell.add_site(LatticeSite([0., -a_cc/2., 0.],'A'))
#add a site labeled 'B' at positon [0., a_cc/2., 0.]
cell.add_site(LatticeSite([0., a_cc/2., 0.],'B'))
#add a bond from first site in cell [0,0,0] to second site in cell [0,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[0,0,0],1))
#add a bond from second site in cell [0,0,0] to first site in cell [0,1,0]
cell.add_bond(LatticeBond([0,0,0],1,[0,1,0],0))
#add a bond from first site in cell [0,0,0] to second site in cell [1,-1,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,-1,0],1))
#buld a lattice of shape [4,4,1] with cell we defined
lattice = Lattice(cell,[4,4,1])
return lattice
lattice = graphene(a,a_cc)
#plot the lattice we constructed
lattice.plot()
Visualize the lattice by Lattice.plot()
method.
2.1.5. Cubic lattice¶
Final example is a 3d cubic lattice.
from moha import *
d = 1.0 # unit cell length
def cube(d):
#define a 3D cubic lattice cell with vectors a1 a2 and a3
cell = Cell(3,[d, 0., 0.],[0., d, 0.],[0., 0., d])
#add a site labeled 'A' at positon [0.,0.,0.]
cell.add_site(LatticeSite([0.,0.,0.],'A'))
#add a bond from first site in cell [0,0,0] to second site in cell [0,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,0,0],0))
#add a bond from second site in cell [0,0,0] to first site in cell [0,1,0]
cell.add_bond(LatticeBond([0,0,0],0,[0,1,0],0))
#add a bond from second site in cell [0,0,0] to first site in cell [0,1,0]
cell.add_bond(LatticeBond([0,0,0],0,[0,0,1],0))
#buld a lattice of shape [4,4,4] with cell we defined
lattice = Lattice(cell,[4,4,4])
return lattice
lattice = cube(d)
#plot the lattice we constructed
lattice.plot()
Visualize the lattice by Lattice.plot()
method.
2.2. Model Hamiltonian¶
Analogy to the construction of molecular Hamiltonian, model hamiltonian usually set up in three steps.
First, construct a lattice.
Second, generate a basis set for the lattice.To simplifies the mathematics, In what follows we will assume that the basis set is orthonormal.
Finally, compute all kinds of one body terms and two body terms with that basis to define a Hamiltonian.
With the definition of lattice and site object done, to construct a model Hamiltonian, we need:
Initialize the model Hamiltonian by assign lattice and site
moha = ModelHamiltonian(lattice,site)
Then add one and two body interaction terms
moha.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],0,[0,0,0],0,-1.0))
moha.add_operator(TwoBodyTerm(['n','n'],[0,0,0],0,[0,0,0],0,2.0))
You can check the one body interaction matrix and two body interaction tensor by
moha.one_body_matrix
moha.two_body_tensor
2.2.1. Fermion Model¶
Tight Binding Model
In solid-state physics, the tight-binding model (or TB model) is an approach to the calculation of electronic band structure using an approximate set of wave functions based upon superposition of wave functions for isolated atoms located at each atomic site.
The Hamiltonian is:
Often one considers models with only nearest neighbour terms, \(<ij>\) indicates nearest neighbours. And one takes \(t_{ij}=t\) if i and j are at nearest neighbour sites, and \(t_{ij}=0\) otherwise, \(\mu\) is the chemical potential.
To represent the Hamilontion in the matrix form, we ignore the spin of the Hamiltonian and transform the Hamiltonion to
from moha import *
from math import sqrt
a = 0.24595 # unit cell length
a_cc = 0.142 # carbon carbon distance
def graphene(a,a_cc):
#define a 2D graphene lattice cell with vectors a1 a2 and a3
cell = Cell(2,[[a,0.,0.],[a/2,a/2*sqrt(3),0.],[0.,0.,0.]])
#add a site labeled 'A' at positon [0.,-a_cc/2.,0.]
cell.add_site(LatticeSite([0., -a_cc/2., 0.],'A'))
#add a site labeled 'B' at positon [0.,-a_cc/2.,0.]
cell.add_site(LatticeSite([0., a_cc/2., 0.],'B'))
#add a bond from first site in cell [0,0,0] to second site in cell [0,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[0,0,0],1))
#add a bond from second site in cell [0,0,0] to first site in cell [0,1,0]
cell.add_bond(LatticeBond([0,0,0],1,[0,1,0],0))
#add a bond from first site in cell [0,0,0] to second site in cell [1,-1,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,-1,0],1))
#buld a lattice of shape [4,4,1] with cell we defined
lattice = Lattice(cell,[4,4,1])
return lattice
lattice = graphene(a,a_cc)
#use spinless fermion site as basis
site = SpinlessFermionSite()
#build model hamiltonian
mh = ModelHamiltonian(lattice,site)
#add on-site term of site A
mh.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],0,[0,0,0],0,-1.0))
#add on-site term of site B
mh.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],1,[0,0,0],1,-2.0))
#add hopping term of site between site A and B
mh.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],0,[0,0,0],1,-4.0))
mh.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],1,[0,1,0],0,-4.0))
mh.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],0,[1,-1,0],1,-4.0))
Hubbard Model
The Hubbard model is an approximate model used, especially in solid-state physics, to describle the transition between conducting and insulating systems. The basic hubbard model have only two Hamiltonian is the simplest model of interacting particles on a lattice and reads.
The Hamiltonian is:
where the first term is a one-electron term and accounts for the nearest-neighbor hopping, while the second term is the repulsive on-site interaction. The t and U are user specified parameters and σ is the electron spin.
To represent the Hamilontion in the matrix form, we ignore the spin of the Hamiltonian and transform the Hamiltonion to
from moha import *
from math import sqrt
a = 1.0 #unit cell length
def square(a):
#define a 2D square lattice cell with vectors a1 a2 and a3
cell = Cell(2,[a, 0., 0.],[0., a, 0.],[0., 0., 0.])
#add a site labeled 'A' at positon [0.,0.,0.]
cell.add_site(LatticeSite([0.,0.,0.],'A'))
#add a bond from first site in cell [0,0,0] to first site in cell [1,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,0,0],0))
#add a bond from first site in cell [0,0,0] to first site in cell [0,1,0]
cell.add_bond(LatticeBond([0,0,0],0,[0,1,0],0))
#buld a lattice of shape [4,4,1] with cell we defined
lattice = Lattice(cell,[4,4,1])
return lattice
lattice = square(a)
#use spinless fermion site as basis
site = SpinlessFermionSite()
#build model hamiltonian
mh = ModelHamiltonian(lattice,site)
#add hopping term of site between nearest neighbour A and B
mh.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],0,[1,0,0],0,-1.0))
#add two body term of site between site A and B
mh.add_operator(TwoBodyTerm(['n','n'],[0,0,0],0,[0,0,0],0,2.0))
2.2.2. Spin Model¶
Quantum spins are a complex object to deal with in many-body physics, it’s niether a canonical fermions or bosons. However, we can perform the Jordan–Wigner transformation that maps spin operators onto fermionic creation and annihilation operators
where
Ising Model
The Ising model is a mathematical model of ferromagnetism in statistical mechanics. The model consists of discrete variables that represent magnetic dipole moments of atomic spins that can be in one of two states (+1 or −1), allowing each spin to interact with its neighbors.
The Hamiltonian is:
After Jordan–Wigner transformation, it becomes:
from moha import *
d = 1.0 # unit cell length
J = 1.0 # spin interaction parameter
def linear(d):
#define a 1D linear lattice cell with vectors a1 a2 and a3
cell = Cell(1,[d,0.,0.],[0.,0.,0.],[0.,0.,0.])
#add a site labeled 'A' at positon [0.,0.,0.]
cell.add_site(LatticeSite([0.,0.,0.],'A'))
#add a bond from first site in cell [0,0,0] to first site in cell [1,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,0,0],0))
#buld a lattice of shape [4,1,1] with cell we defined
lattice = Lattice(cell,[4,1,1])
return lattice
lattice = linear(d)
site = SpinlessFermionSite()
moha = ModelHamiltonian(lattice,site)
moha.add_operator(OneBodyTerm(['n'],[0,0,0],0,[0,0,0],0,J))
moha.add_operator(TwoBodyTerm(['n','n'],[0,0,0],0,[1,0,0],0,-J))
Heisenberg Model
The Heisenberg model is a statistical mechanical model used in the study of critical points and phase transitions of magnetic systems, in which the spins of the magnetic systems are treated quantum mechanically.
The Hamiltonian is:
where
To perform the Jordan-Wigner transformation
from moha import *
d = 1.0 # unit cell length
J = 1.0 # spin interaction parameter
def linear(d):
#define a 1D linear lattice cell with vectors a1 a2 and a3
cell = Cell(1,[d,0.,0.],[0.,0.,0.],[0.,0.,0.])
#add a site labeled 'A' at positon [0.,0.,0.]
cell.add_site(LatticeSite([0.,0.,0.],'A'))
#add a bond from first site in cell [0,0,0] to first site in cell [1,0,0]
cell.add_bond(LatticeBond([0,0,0],0,[1,0,0],0))
#buld a lattice of shape [4,1,1] with cell we defined
lattice = Lattice(cell,[4,1,1])
return lattice
lattice = linear(d)
site = SpinlessFermionSite()
moha = ModelHamiltonian(lattice,site)
moha.add_operator(OneBodyTerm(['c_dag','c'],[0,0,0],0,[1,0,0],0,-J/2.))
moha.add_operator(OneBodyTerm(['n'],[0,0,0],0,[0,0,0],0,J))
moha.add_operator(TwoBodyTerm(['n','n'],[0,0,0],0,[1,0,0],0,-J))
XXZ Model
The Hamiltonian is:
To perform the Jordan-Wigner transformation
XY Model
The Hamiltonian is:
To perform the Jordan-Wigner transformation
2.3. Band Structure¶
In solid-state physics, the electronic band structure (or simply band structure) of a solid describes the range of energies that an electron within the solid may have (called energy bands, allowed bands, or simply bands) and ranges of energy that it may not have.
TODO


Select this checkbox to have @SuppressWarnings implemented as an annotation.
@SuppressWarnings
Clear this checkbox to have @SuppressWarnings implemented as a JavaDoc comment.
(for 5.0 only)


{% extends "layout.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} Enter your research participant's digital inclusion category Name of project For example, SIP Date of research session Date of research session Day Month Year Name or Initials of participant Digital inclusion category Enter the category in the form 1 - 9 {% endblock %}


FireCARES accepts data in .csv, .geojson, and zipped shapefile formats.
Ok, the data looks good. Click below to update FireCARES.


Two type of elements
For the purpose of explaining this concept, we're only interested in looking at two types of HTML elements. Inline and block elements to be more precise. Explaining these before going into the details of what displaying them mean will be key to a clear understanding
Block elements are those elements which start and end with a new line. You easily identify them because using one of these will separate you 'block' of text from any preceding or following elements. Another quality of block elements is that they will take the full width available to them
On the other hand there are the inline elements. These elements are somewhat the opposite of blocks because they do not force line breaks and they only use as much width as is necessary.
What is a display in CSS?
A display is a property that will define how an element will be shown as part of a webpage. This seems as a very standard definition but it will help us understand in the next few lines a lot better.
How does it all come together?
An inline block will keep the properties of a block in the sense that it will still have block qualities but it won't break the line in which it resides. This means that you can have a small box in the middle of a paragraph withouth starting a new line.


|
Dendro
5.01
Dendro in Greek language means tree. The Dendro library is a large scale (262K cores on ORNL's Titan) distributed memory adaptive octree framework. The main goal of Dendro is to perform large scale multiphysics simulations efficeiently in mordern supercomputers. Dendro consists of efficient parallel data structures and algorithms to perform variational ( finite element) methods and finite difference mthods on 2:1 balanced arbitary adaptive octrees which enables the users to perform simulations raning from black holes (binary black hole mergers) to blood flow in human body, where applications ranging from relativity, astrophysics to biomedical engineering.
|
lexical analysis More...
#include <json.hpp>
Public Member Functions | |
| lexer (detail::input_adapter_t adapter) | |
| lexer (const lexer &)=delete | |
| lexer & | operator= (lexer &)=delete |
| constexpr number_integer_t | get_number_integer () const noexcept |
| return integer value | |
| constexpr number_unsigned_t | get_number_unsigned () const noexcept |
| return unsigned integer value | |
| constexpr number_float_t | get_number_float () const noexcept |
| return floating-point value | |
| string_t && | move_string () |
| return current string value (implicitly resets the token; useful only once) | |
| constexpr std::size_t | get_position () const noexcept |
| return position of last read token | |
| std::string | get_token_string () const |
| constexpr const char * | get_error_message () const noexcept |
| return syntax error message | |
| token_type | scan () |
Static Public Member Functions | |
| static const char * | token_type_name (const token_type t) noexcept |
| return name of values of type token_type (only used for errors) | |
lexical analysis
This class organizes the lexical analysis during JSON deserialization.
|
strong |
token types for the parser
| Enumerator | |
|---|---|
| uninitialized | indicating the scanner is uninitialized |
| literal_true | the |
| literal_false | the |
| literal_null | the |
| value_string | a string – use get_string() for actual value |
| value_unsigned | an unsigned integer – use get_number_unsigned() for actual value |
| value_integer | a signed integer – use get_number_integer() for actual value |
| value_float | an floating point number – use get_number_float() for actual value |
| begin_array | the character for array begin |
| begin_object | the character for object begin |
| end_array | the character for array end |
| end_object | the character for object end |
| name_separator | the name separator |
| value_separator | the value separator |
| parse_error | indicating a parse error |
| end_of_input | indicating the end of the input buffer |
| literal_or_value | a literal or the begin of a value (only for diagnostics) |
|
inline |
return the last read token (for errors only). Will never contain EOF (an arbitrary value that is not a valid char value, often -1), because 255 may legitimately occur. May contain NUL, which should be escaped.


ofxCvImage
This is the base class for all the ofxOpenCV image types: ofxCvShortImage, ofxCvColorImage, ofxCvFloatImage, ofxCvGrayscaleImage. It's made to provide interoperability between the core OF imaging types, ofImage and ofTexture, and OpenCv.
- allocate(...)
- blur(...)
- blurGaussian(...)
- clear()
- contrastStretch()
- convertToRange(...)
- countNonZeroInRegion(...)
- dilate()
- draw(...)
- drawBlobIntoMe(...)
- drawROI(...)
- erode()
- flagImageChanged()
- getCvImage()
- getHeight()
- getIntersectionROI(...)
- getPixels()
- getPixelsRef()
- getROI()
- getRoiPixels()
- getRoiPixelsRef()
- getTextureReference()
- getWidth()
- invert()
- mirror(...)
- operator&=(...)
- operator*=(...)
- operator+=(...)
- operator-=(...)
- operator=(...)
- remap(...)
- resetAnchor()
- resetROI()
- resize(...)
- rotate(...)
- scale(...)
- scaleIntoMe(...)
- set(...)
- setAnchorPercent(...)
- setAnchorPoint(...)
- setFromPixels(...)
- setROI(...)
- setRoiFromPixels(...)
- setUseTexture(...)
- transform(...)
- translate(...)
- undistort(...)
- updateTexture()
- warpIntoMe(...)
- warpPerspective(...)
ofxCvImage methods
allocate(...)
void ofxCvImage::allocate(int w, int h)
Allocates the image with the w, h passed in. This must be done before the pixels of the image are created.
blurGaussian(...)
void ofxCvImage::blurGaussian(int value=3)
Blurs the using Gaussian blurring. Gaussian blurring is typically to reduce image noise and reduce detail.
clear()
void ofxCvImage::clear()
Clears the pixel data of the image. The image must be allocated again with a call to allocate() before it can be used.
contrastStretch()
void ofxCvImage::contrastStretch()
This increases the contrast of the image remapping the brightest points in the image to 255 and the darkest points in the image to 0.
convertToRange(...)
void ofxCvImage::convertToRange(float min, float max)
Maps the pixels of an image to the min and max range passed in.
colors.setFromPixels(grabber.getPixelsRef());
first = colors; // will leave unaltered
second = colors; // change it
second.convertToRange(100, 140); // super low contrast
countNonZeroInRegion(...)
int ofxCvImage::countNonZeroInRegion(int x, int y, int w, int h)
Returns the number of non-zero pixels in an image.
draw(...)
void ofxCvImage::draw(float x, float y, float w, float h)
Draw the image at the x,y with the w,h.
draw(...)
void ofxCvImage::draw(const ofRectangle &rect)
Draw the image into the ofRectangle passed in.
drawBlobIntoMe(...)
void ofxCvImage::drawBlobIntoMe(ofxCvBlob &blob, int color)
Draw the outline of an ofxCvblob into the ofxCvImage.
drawROI(...)
void ofxCvImage::drawROI(float x, float y)
Draw just the Region of Interest of the image at the x,y.
drawROI(...)
void ofxCvImage::drawROI(float x, float y, float w, float h)
Draw just the Region of Interest of the image into the x,y with the w,h passed in.
flagImageChanged()
void ofxCvImage::flagImageChanged()
Marks the image as changed so that the ofTexture can be updated, if the image contains one.
getIntersectionROI(...)
ofRectangle ofxCvImage::getIntersectionROI(const ofRectangle &rec1, const ofRectangle &rec2)
getPixels()
unsigned char * ofxCvImage::getPixels()
Returns a raw pointer to the pixel data within the image.
getPixelsRef()
ofPixelsRef ofxCvImage::getPixelsRef()
Returns an ofPixels reference to the pixel data within the image.
getRoiPixels()
unsigned char * ofxCvImage::getRoiPixels()
Returns a raw pointer to the pixel data within the Region of Interest in the ofxCvImage.
getRoiPixelsRef()
ofPixelsRef ofxCvImage::getRoiPixelsRef()
Returns an ofPixels reference to the pixel data within the Region of Interest in the ofxCvImage.
getTextureReference()
ofTexture & ofxCvImage::getTextureReference()
If the ofxCvImage has an ofTexture texture, then this returns a reference to that texture.
mirror(...)
void ofxCvImage::mirror(bool bFlipVertically, bool bFlipHorizontally)
Flips the image horizontally and/or vertically.
operator&=(...)
void ofxCvImage::operator&=(ofxCvImage &mom)
Binary & (Logical AND http://en.wikipedia.org/wiki/Bitwise_operation) the pixel data of the right hand side image from the current image:
cvPuppy.allocate( 320, 240 );
cvPuppy = puppyImg.getPixels(); // copy pixels from a loaded image
andPuppy.allocate( 320, 240 );
andPuppy.set(255, 0, 0); // make the AND image red
andPuppy &= cvPuppy; // will & all the bits
operator*=(...)
void ofxCvImage::operator*=(ofxCvImage &mom)
Multiplies the pixel data of the right hand side image from the current image:
first *= second; // both are ofxCvImage instances
operator+=(...)
void ofxCvImage::operator+=(float value)
Adds the pixel data of the right hand side image from the current image:
first += second; // both are ofxCvImage instances
operator+=(...)
void ofxCvImage::operator+=(ofxCvImage &mom)
Adds the pixel data of the right hand side image from the current image:
first += second; // both are ofxCvImage instances
operator-=(...)
void ofxCvImage::operator-=(float value)
Subtracts the pixel data of the right hand side image from the current image:
first -= second; // both are ofxCvImage instances
operator-=(...)
void ofxCvImage::operator-=(ofxCvImage &mom)
Subtracts the pixel data of the right hand side image from the current image:
first -= second; // both are ofxCvImage instances
operator=(...)
void ofxCvImage::operator=(const ofxCvGrayscaleImage &mom)
Copy a ofxCvGrayscaleImage into the current ofxCvImage.
operator=(...)
void ofxCvImage::operator=(const ofxCvColorImage &mom)
Copy the image data of an ofxCvColorImage into the ofxCvImage instance.
operator=(...)
void ofxCvImage::operator=(const ofxCvFloatImage &mom)
Copy the image data ofxCvFloatImage into the ofxCvImage instance.
operator=(...)
void ofxCvImage::operator=(const ofxCvShortImage &mom)
Copy the image data of a ofxCvShortImage into the ofxCvImage instance.
operator=(...)
void ofxCvImage::operator=(const IplImage *mom)
Copy the data from an IplImage into the ofxCvImage instance.
remap(...)
void ofxCvImage::remap(IplImage mapX, IplImage mapY)
This uses a generic geometrical transformation to remap one image to another. This is particularly useful when doing camera calibration.
resetAnchor()
void ofxCvImage::resetAnchor()
Reset the anchor point of the image, i.e. the center point for rotations,
rotate(...)
void ofxCvImage::rotate(float angle, float centerX, float centerY)
Rotates the image. This is different than the OpenGL rotate as it actually sets the pixel data, rather than just the posotion of the drawing.
scale(...)
void ofxCvImage::scale(float scaleX, float sclaeY)
Scales the image to the scaleX, scaleY passed in. This is different than the OpenGL rotate as it actually sets the pixel data, rather than just the posotion of the drawing.
scaleIntoMe(...)
void ofxCvImage::scaleIntoMe(ofxCvImage &mom, int interpolationMethod=CV_INTER_NN)
Scales the image passed in to be the size of the current image,
ofxCvImage first;
first.allocate(640, 480);
ofxCvImage second;
second.allocate(320, 240);
second.scaleIntoMe(first); // first is now 320,240
set(...)
void ofxCvImage::set(float value)
Set all the pixels in the image to the float value passed in. This is useful for blanking or filling an image quickly. the values are 1.0 to 255.0.
setAnchorPercent(...)
void ofxCvImage::setAnchorPercent(float xPct, float yPct)
Set the anchor point of the image, i.e. the center point for rotations, at the percentage positions passed in.
setAnchorPoint(...)
void ofxCvImage::setAnchorPoint(float x, float y)
Set the anchor point of the image, i.e. the center point for rotations, at the x,y passed in.
setFromPixels(...)
void ofxCvImage::setFromPixels(const unsigned char *_pixels, int w, int h)
Set all the pixels in a ofxCvImage from a pointer to an array of unsigned char values, using the w and h parameters to determine the dimensions of the image.
setFromPixels(...)
void ofxCvImage::setFromPixels(const ofPixels &pixels)
Set all the pixels in a ofxCvImage from an ofPixels reference.
setROI(...)
void ofxCvImage::setROI(int x, int y, int w, int h)
Sets the region of interest on the image. Region of Interest is a rectangular area in an image, to segment object for further processing. Once the ROI is defined, OpenCV functions will operate on the ROI, reducing the number of pixels that the operation will examine.
setROI(...)
void ofxCvImage::setROI(const ofRectangle &rect)
Sets the region of interest on the image. Region of Interest is a rectangular area in an image, to segment object for further processing. Once the ROI is defined, OpenCV functions will operate on the ROI, reducing the number of pixels that the operation will examine.
setRoiFromPixels(...)
void ofxCvImage::setRoiFromPixels(const unsigned char *_pixels, int w, int h)
Set the Region Of Interest using a pointer to an unsigned char array and a w,h to define the area of the ROI
setRoiFromPixels(...)
void ofxCvImage::setRoiFromPixels(const ofPixels &pixels)
Set the Region Of Interest using an ofPixels reference The w,h of the ofPixels will define the area of the ROI
setUseTexture(...)
void ofxCvImage::setUseTexture(bool bUse)
Sets whether the image is using a texture or not. If the image is not using a texture then calls to getTextureReference() will return null and the image cannot be drawn. This is handy if you know that you won't be displaying the image to the screen.
transform(...)
void ofxCvImage::transform(float angle, float centerX, float centerY, float scaleX, float scaleY, float moveX, float moveY)
Transforms the image with the angle, scaling, and transformation passed in. This is different than the OpenGL rotate as it actually sets the pixel data, rather than just the posotion of the drawing.
translate(...)
void ofxCvImage::translate(float x, float y)
Moves the image by the x,y amount passed in. This is different than the OpenGL rotate as it actually sets the pixel data, rather than just the posotion of the drawing.
undistort(...)
void ofxCvImage::undistort(float radialDistX, float radialDistY, float tangentDistX, float tangentDistY, float focalX, float focalY, float centerX, float centerY)
The function cvUnDistortOnce corrects camera lens distortion for the image. It requires that you have an estimate of the camera distortion from a call to cvCalibrateCamera() or other calibration method.
updateTexture()
void ofxCvImage::updateTexture()
Updates the texture of the ofxCvImage if it contains one. This is handy after you've changed the image pixel data and want it to be uploaded to the texture on the graphics card.
warpIntoMe(...)
void ofxCvImage::warpIntoMe(ofxCvImage &mom, const ofPoint src[4], const ofPoint dst[4])
This warps the image perspective into the ofxCvImage using two sets four points passed in:
ofPoint[4] src;
src[0] = ofPoint(0, 0);
src[1] = ofPoint(320, 0);
src[2] = ofPoint(320, 240);
src[3] = ofPoint(0, 240);
ofPoint[4] dst;
dst[0] = ofPoint(10, 0);
dst[1] = ofPoint(310, 0);
dst[2] = ofPoint(310, 230);
dst[3] = ofPoint(10, 230);
image.warpIntoMe(parent, src, dst);
warpPerspective(...)
void ofxCvImage::warpPerspective(const ofPoint &A, const ofPoint &B, const ofPoint &C, const ofPoint &D)
This warps the image perspective to the four points passed in:


{% extends "base.html" %} {% block body %}
No sources selected, you are currently seeing the default selection.
Choose news sources:
Clicking save will store a cookie on your computer with the sources chosen.


{% load static %} {% if not competitions %}
You do not manage any competitions.
Organized by {{ competition.creator }}
{{ competition.description }}


public interface DataCuller
Now if a series holds the data points in a Bag, removing data points screws with the order, so the next time a data point needs to be removed, its index will be compromized. The way this works is ...  It's then your job to delete the correct items and recompact the remaining data.
Changing the API to include the actual data item, not just its x value could be useful if one wants to choose based on similarity of Y values, not just closeness of x values. Another example would be an implementation that averages data (e.g. average 2 consecutive data points)!
If a chart has multiple time series, does one cull each data series
separatelly? I.e. is this a chart global property or each series
has its own?
I kinda expect that when multiple series reside in
the same chart, they're "synchronized" in the sense that they have
data points at the same moments in time. In this case, the cullers of
those series do the same work, so one should be enough.
The user is expected to add the series at the same time. I make no attempt to
detect if series in the same chart have the same set of x values.
The current implementation in TimeSeriesChartGenerator and the corresponding property inspector
uses a single DacaCuller for all series. In the future I guess I could give each series a clone of the
data culling algorithm, if it turns out that stateful algoriths are needed.
In order to improve the amortized time complexity, more than 1 data point should be culled at a time. E.g. as soon as you get 200 points, drop 100. After each such operation there's a linear time data shifting, so it pays off to delete multiple points at a time. It also helps with the stuff during the operation, since one does not have to scan starting from the beginning for each data point to be deleted. Heaps might be helpful while deciding which points to drop. The recompacting is still linear, but it should be very fast.
| Modifier and Type | Method and Description |
|---|---|
IntBag |
cull(double[] xValues,
boolean sortOutput) |
boolean |
tooManyPoints(int currentPointCount) |
boolean tooManyPoints(int currentPointCount)
IntBag cull(double[] xValues, boolean sortOutput)


Home
Organizations
About
Volunteer Finder
Looking for extra help?
Fill out the form below and SRV LNK will help you find eager volunteers!
Submit
insert logo
SRV © 2017


Pause
Resume
/
Volume:
Disc 1
1.01 Beginning of the End.mp3
1.02 Loss.mp3
1.03 Voyage.mp3
1.04 The Scent of the Sea.mp3
1.05 The Winter Breeze.mp3
1.06 Tender Glow.mp3
1.07 Into the Woods.mp3
1.08 No Turning Back.mp3
1.09 Astounding Victory.mp3
1.10 Endless Crusade.mp3
1.11 Deadly Gamble.mp3
1.12 The Savage Coast.mp3
1.13 March of the Brave.mp3
1.14 A Poignant Reminder.mp3
1.15 Path of Redemption.mp3
1.16 Stronghold.mp3
1.17 Silent Snow.mp3
1.18 Relentless Advance.mp3
1.19 A Moment of Respite.mp3
1.20 A Sense of Safety.mp3
1.21 The Royal Host.mp3
1.22 Waves of Hope.mp3
1.23 The Warmth of Life.mp3
1.24 Hidden Intentions.mp3
1.25 A Hidden Force.mp3
1.26 Walking the Walk.mp3
1.27 The Secret Passage.mp3
1.28 A Fantastic Encounter.mp3
1.29 The Enchanted Sanctuary.mp3
1.30 Lighthearted.mp3
1.31 Faith.mp3
1.32 Flowing On.mp3
1.33 Dark Caves.mp3
1.34 March to Rebirth.mp3
1.35 Shrouded Fate.mp3
1.36 Last of the Blood.mp3
1.37 The World of Snow.mp3
Disc 2
2.01 Rare.mp3
2.02 Ruins.mp3
2.03 Deep Reflection.mp3
2.04 Road to Closure.mp3
2.05 Simple Gratitude.mp3
2.06 The Strength of Time.mp3
2.07 The Last Mountain.mp3
2.08 Feeling of Unease.mp3
2.09 Beyond the Snow.mp3
2.10 The King's Valley.mp3
2.11 Echoes of Royalty.mp3
2.12 Towards the Distant Horizon.mp3
2.13 Regal Ruins.mp3
2.14 Dance of Death.mp3
2.15 Winter's End.mp3
2.16 Final Push.mp3
2.17 Out of Time.mp3
2.18 The Lone Reaper.mp3
2.19 Distant Islands.mp3
2.20 Thug Life!.mp3
2.21 The Clouds Above.mp3
2.22 Walking Through the Maze of Time.mp3
2.23 Hidden Danger.mp3
2.24 To The Warmth of the Sun.mp3
2.25 Inside the Beast.mp3
2.26 Unstoppable Force.mp3
2.27 End's Journey.mp3
2.28 Immovable Object.mp3
2.29 Farewell.mp3
2.30 Memories.mp3
2.31 Winter Journey's Tale.mp3
2.32 Staff Roll.mp3
2.33 Winter Dreams.mp3
2.34 Dreamers' Conclave.mp3


Event counts
I recently decided to sell my
vacuum cleaner
, all it was doing was gathering dust.
vacuum cleaner counter
uhmmmm
vacuum cleaner ate it


--- layout: post title: 'Sigrok on WSL for iua: ice40 USB Analyzer' date: '2020-08-09T17:27:00.004-07:00' author: gojimmypi tags: - icebreaker - X-Windows - Sigrok - WSL - FPGA modified_time: '2020-08-11T15:21:36.658-07:00' thumbnail: https://1.bp.blogspot.com/-AsCx1ME8ZkY/XzBMCywuERI/AAAAAAAACms/lRNv0tmY-AwHsCIyh36hVH9jNuDtHbh1gCLcBGAsYHQ/s72-c/vmware_waiting.png blogger_id: tag:blogger.com,1999:blog-4109066286647243251.post-3817515010519623638 blogger_orig_url: https://gojimmypi.blogspot.com/2020/08/sigrok-on-wsl-for-iua-ice40-usb-analyzer.html ---
In my previous post on the iCEBreaker Bitsy FPGA - early adopter version, I mentioned the interesting iua: ice40 USB Analyzer project that I learned about on the iCEBreaker discord channel in the context of troubleshooting the odd problem I was seeing on my "Power Share" USB3.0 port.
There's minimal documentation on Getting Started, so here I am creating my notes.
The iua
is meant for the iCEBreaker, not the Bitsy (although I wonder if it would still work on the Bisty? another rabbit hole for another day...)
As with all prior posts, I'm a Visual Studio developer at the day job, and continue that with my FPGA learning on the weekends... thus I use Windows, WSL, and Visual Studio here.
cd /mnt/c/workspace/
git clone https://github.com/smunaut/iua.git
cd iua/hdl
make
iceprog
before and it decides to not find the icEBreaker today, check the drivers with Zadig. Windows seems to like to replace the drivers during updates. The iCEBreaker needs the libusbK
drivers.
dfu-util
, the iCEBreaker does NOT need that when using iceprog
C:\workspace\ulx3s-toolchain\bin\iceprog.exe
/mnt/c/workspace/ulx3s-toolchain/bin/iceprog.exe iua_icebreaker_top.bin
When successful, there should be output that looks something like this:
init..
cdone: high
reset..
cdone: low
flash ID: 0xEF 0x40 0x18 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
file size: 104090
erase 64kB sector at 0x000000..
erase 64kB sector at 0x010000..
programming..
reading..
VERIFY OK
cdone: high
Bye.
git clone git://sigrok.org/libsigrok
cd libsigrok
./autogen.sh
./configure
make
make
{% include code_header.html %}
configure: error: Package requirements (glib-2.0 >= 2.32.0 libftdi1 >= 1.0 libusb-1.0 >= 1.0.16 gio-2.0 >= 2.24.0 libzip >= 0.10) were not met:
No package 'libzip' found
sudo apt-get install libzip
, right? Nope. :/
Reading package lists... Done
Building dependency tree
Reading state information... DoneE: Unable to locate package libzip
libzip >= 0.10
. But where to find it? Ah yes, it is just the development code library, not a tool, so we need the -dev
suffix:
sudo apt-get install libzip-dev
./configure
again...
Enabled language bindings:
- C++............................. no (missing: glibmm, Doxygen)
- Python.......................... no (missing: C++ bindings, PyGObject, SWIG)
- Ruby............................ no (missing: C++ bindings, SWIG)
- Java............................ no (missing: C++ bindings, SWIG, JavaC, JNI headers)
===============================================================================
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
===============================================================================
=== ===
=== The libsigrok C++ bindings are not being built since you ===
=== are missing one or more dependencies (see above)! ===
=== ===
=== This means you won't be able to compile frontends that require ===
=== the C++ bindings (such as PulseView)! You also won't be able to build ===
=== other bindings and frontends using those (such as sigrok-meter)! ===
=== ===
===============================================================================
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
===============================================================================
gojimmypi:/mnt/c/workspace/libsigrok
$ sudo apt-get install glibmm
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package glibmm
gojimmypi:/mnt/c/workspace/libsigrok
$ sudo apt-get install glibmm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package glibmm-dev
gojimmypi:/mnt/c/workspace/libsigrok
doxygen
too, and then one more ./configure
as well:
sudo apt-get install libglibmm-2.4-dev
sudo apt-get install doxygen
./configure
make
, then:
$ make check
make
make all-am
make check-TESTS
============================================================================
Testsuite summary for libsigrok 0.6.0
============================================================================
# TOTAL: 0
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
$ sudo make install
/bin/mkdir -p '/usr/local/lib'
/bin/bash ./libtool --silent --mode=install /usr/bin/install -c libsigrok.la bindings/cxx/libsigrokcxx.la '/usr/local/lib'
libtool: warning: relinking 'bindings/cxx/libsigrokcxx.la'
/bin/mkdir -p '/usr/local/include/libsigrokcxx'
/usr/bin/install -c -m 644 bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp '/usr/local/include/libsigrokcxx'
/bin/mkdir -p '/usr/local/include/libsigrok'
/usr/bin/install -c -m 644 include/libsigrok/libsigrok.h include/libsigrok/proto.h '/usr/local/include/libsigrok'
/bin/mkdir -p '/usr/local/share/mime/packages'
/usr/bin/install -c -m 644 contrib/vnd.sigrok.session.xml '/usr/local/share/mime/packages'
/bin/mkdir -p '/usr/local/share/icons/hicolor/48x48/mimetypes'
/usr/bin/install -c -m 644 contrib/libsigrok.png '/usr/local/share/icons/hicolor/48x48/mimetypes'
/bin/mkdir -p '/usr/local/share/icons/hicolor/scalable/mimetypes'
/usr/bin/install -c -m 644 contrib/libsigrok.svg '/usr/local/share/icons/hicolor/scalable/mimetypes'
/bin/mkdir -p '/usr/local/include/libsigrokcxx'
/usr/bin/install -c -m 644 bindings/cxx/include/libsigrokcxx/enums.hpp '/usr/local/include/libsigrokcxx'
/bin/mkdir -p '/usr/local/include/libsigrok'
/usr/bin/install -c -m 644 include/libsigrok/version.h '/usr/local/include/libsigrok'
/bin/mkdir -p '/usr/local/lib/pkgconfig'
/usr/bin/install -c -m 644 libsigrok.pc bindings/cxx/libsigrokcxx.pc '/usr/local/lib/pkgconfig'
git clone https://github.com/sigrokproject/libsigrokdecode.git
cd libsigrokdecode
./autogen.sh
./configure
make
sudo make install
sudo apt-get install qttools5-dev
git clone https://github.com/sigrokproject/pulseview.git
cd pulseview
cmake .
make
sudo make install
pulseview
! Alas on WSL we have an extra challenge: X-Windows. I'm using vcxsrv
from the ad-spam-ridden sourceforge. (it is really a shame to see what that site has become).
C:\Program Files\VcXsrv\vcxsrv.exe
smunaut/libsigrok
sudo apt-get install git-core gcc make autoconf automake libtool
git clone https://github.com/sigrokproject/libserialport.git
cd libserialport
./autogen.sh
./configure
make
sudo make install
git clone https://github.com/smunaut/libsigrok.git smunaut-libsigrok
cd smunaut-libsigrok
./autogen.sh
./configure
make
sudo make install
make clean
for pulseview, and an error like this is enountered:
{% include code_header.html %}
$ make
[ 1%] Automatic MOC for target pulseview
[ 1%] Built target pulseview_autogen
make[2]: *** No rule to make target 'l10n/de.qm', needed by 'qrc_translations.cpp'. Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pulseview.dir/all' failed
make[1]: *** [CMakeFiles/pulseview.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
make clean
improperly deletes a couple of files:
gojimmypi:/mnt/c/workspace/pulseview
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: l10n/de.ts
deleted: l10n/es_MX.ts
no changes added to commit (use "git add" and/or "git commit -a")
gojimmypi:/mnt/c/workspace/pulseview
git checkout master
git checkout l10n/de.ts
git checkout l10n/es_MX.ts
gojimmypi:/mnt/c/workspace/smunaut-libsigrok
$ ./configure
...
Detected libraries (optional):
- libserialport >= 0.1.1.......... 0.1.1
pulseview: error while loading shared libraries: libserialport.so.0: cannot open shared object file: No such file or directory
sudo apt-get install libserialport-dev


Executive Summary
Children are wired to learn digitally and come with handhelds practically attached to their limbs. They wake up abruptly to the continuous ringing sound of notifications, they grab their smartphones – they just need their daily morning dose of Snapchat, Instagram and Facebook. At school, they have access to digital technologies, and the Internet to facilitate work and enhance their learning experience. The Internet has enabled instant global communication and access to information, where students use information at their fingertips, collaborate and create to accomplish results never seen before – intellectual energy thus released is transforming education globally. Social media has given immense power to children to easily spread their ideas to an audience of thousands. Hence it becomes imperative to educate them to become responsible digital citizens as well as discerning users of everything the internet has to offer in this globally collaborative world. UnHack program focuses on teaching students how to learn and innovate by using technology to their advantage. The Program is an interactive workshop to empower students to harness the opportunities provided by digital learning; to inculcate digital ethics and to stay safe online.
Workshop Session Details:
DIGITAL LITERACY - Enhances performance and inspires innovations and entrepreneurial ventures
- Search Literacy
- Social Media Literacy
- Collaboration, Creativity and Innovation
DIGITAL ETHICS - Inculcates morality in online behavior
- Appropriate handling of Content
- Appropriate use of Identity
- Social Media Ethics
CYBER SAFETY AND SECURITY - Security ensures that children are safe online protected from cyber bullies, sexual predators, cybercriminals and inappropriate content
- Cyberbullying
- Inappropriate Content and Sexual Solicitation
- Protecting Data, Identity and Privacy
- Device Safety
- Cyber Laws


{% extends 'assessment-rooted.html' %} {% load add_class %} {% load crispy_forms_tags %} {% block content %} {% if animal_group.dosing_regime %} {% crispy form %} {% else %}
For dichotomous data, all fields are required. For p-values, 0.05 or <0.05 should be coded as 0.05; 0.01 or <0.01 should be coded as 0.01; 0.001 or <0.001 should be coded as 0.001. For continuous data, if variance is not-reported, ensure the "variance type" input-field above is "NR", and then variance can be left blank; otherwise it is required. If any data are not reported, leave those fields blank. For p-values, 0.05 or <0.05 should be coded as 0.05; 0.01 or <0.01 should be coded as 0.01; 0.001 or <0.001 should be coded as 0.001. For percent-difference data, lower CI (%) and upper CI (%) are optional. If any data are not reported, leave those fields blank.
| Dose | N | Incidence | Response | Variance (SD or SE) | Low CI (%) | High CI (%) | Significance Level (if significant) {% include "common/helptext_popup.html" with text=formset.0.significance_level.help_text %} |
Treatment Related Effect {% include "common/helptext_popup.html" with text=formset.0.treatment_effect.help_text %} |
|---|---|---|---|---|---|---|---|---|
| {{form.n}}{{form.n.errors|add_class:"alert alert-danger"}} | {{form.incidence}}{{form.incidence.errors|add_class:"alert alert-danger"}} | {{form.response}}{{form.response.errors|add_class:"alert alert-danger"}} | {{form.variance}}{{form.variance.errors|add_class:"alert alert-danger"}} | {{form.lower_ci}}{{form.lower_ci.errors|add_class:"alert alert-danger"}} | {{form.upper_ci}}{{form.upper_ci.errors|add_class:"alert alert-danger"}} | {{form.significance_level}} | {{form.treatment_effect}} |


Provide Account Details
Account type :
Saving
Current
Minimum Amount :
Password :
Confirm Password :


| 016:044 Khan | : |
With clear signs and Books (We sent the Messengers). And We have also sent down unto you (O Muhammad SAW) the reminder and the advice (the Qur'an), that you may explain clearly to men what is sent down to them, and that they may give thought. |
| 016:044 Maulana | : |
With clear arguments and Scriptures. And We have revealed to thee the Reminder that thou mayest make clear to men that which has been revealed to them, and that haply they may reflect. |
| 016:044 Pickthal | : |
With clear proofs and writings; and We have revealed unto thee the Remembrance that thou mayst explain to mankind that which hath been revealed for them, and that haply they may reflect. |
| 016:044 Rashad | : |
We provided them with the proofs and the scriptures. And we sent down to you this message, to proclaim for the people everything that is sent down to them, perhaps they will reflect. |
| 016:044 Sarwar | : |
We have revealed the Quran to you so that you could tell the people what has been revealed to them and so that perhaps they will think. |
| 016:044 Shakir | : |
With clear arguments and scriptures; and We have revealed to you the Reminder that you may make clear to men what has been revealed to them, and that haply they may reflect. |
| 016:044 Sherali | : |
With clear Signs and Scriptures. And WE have sent down to thee the Reminder that thou mayest explain to mankind that which has been sent down to them, and that they may reflect. |
| 016:044 Yusufali | : |
(We sent them) with Clear Signs and Books of dark prophecies; and We have sent down unto thee (also) the Message; that thou mayest explain clearly to men what is sent for them, and that they may give thought. |
Concepts/Themes Covered: أركان الإسلام > (محمد (صلى الله عليه وسلم > تأييد رسالته Pillars of Islam> The Blessed Muhammad(PBUH)> Supporting his Message الإيمان > الكتب السماوية الأخرى > الزبور Faith> The Other Divine Books> Book of Psalter(Psalms) الدعوة إلى الله > وجوبها > الترهيب عن التقصير في الدعوة إلى الله The Call for Allah> Its Necessity> Frightening for Slackness to Call for Allah القرآن الكريم > وصفه ووجوب الإيمان به The Holy Quran> The Description and the Necessity to Believe it
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


Congratulations!
You are now registered on World’s Best Bars.
Check your mailbox
to confirm your subscription.
Close


We're going to keep moving now that everything is setup (see part one for setup) and configured (see part two for configuration).
First off we are going to create our classes. The original classes and SQL tables are posted below (these may look familiar – they are from my initial NHibernate post)
Initial Product
public class Product
{
private IList<Product> _RelatedProducts;
private IList<ProductGroup> _ProductGroups;
public Product()
{
_RelatedProducts = new List<Product>();
_ProductGroups = new List<ProductGroup>();
}
public virtual string ID { get; private set; }
public virtual string Title { get; set; }
public virtual string ImagePath { get; set; }
public virtual string Description { get; set; }
public virtual IList<Product> RelatedProducts
{
get { return _RelatedProducts; }
set { _RelatedProducts = value; }
}
public virtual IList<ProductGroup> ProductGroups
{
get { return _ProductGroups; }
set { _ProductGroups = value; }
}
}
Initial ProductGroup
public class ProductGroup
{
public virtual string ProductGroupID { get; set; }
public virtual string Title { get; set; }
public virtual IList<Product> Products { get; set; }
}
SQL Tables
CREATE TABLE [dbo].[SimpleProducts](
[ProductID] [char](32) NOT NULL,
[Title] [nvarchar](50) NOT NULL,
[ImagePath] [nvarchar](300) NULL,
[Description] [nvarchar](500) NULL
)
CREATE TABLE [dbo].[RelatedProductsLookup](
[ProductID] [char](32) NOT NULL,
[RelatedProductID] [char](32) NOT NULL
)
CREATE TABLE [dbo].[ProductsProductGroupsLookup](
[ProductGroupID] [char](32) NULL,
[ProductID] [char](32) NULL
)
CREATE TABLE [dbo].[ProductGroups](
[ProductGroupID] [char](32) NOT NULL,
[Title] [nvarchar](50) NULL
ActiveRecord Classes
In a traditional NHibernate application, we would write usually our mapping files at this time(see my other NHibernate post for more on that). Since we're using the ActiveRecord pattern, however, we can specify all our mappings inline with the classes. It is important to note that this would not be a pure domain because we're placing our mappings inside the model. Warning if you're sensitive to using Attributes this may not be the code for you…
Our classes will now begin with an ActiveRecord attribute over the class; our properties will begin with Property/HasAndBelongsToMany/etc. Please note, for the sake of the example, I'm being extremely verbose with my attributes. If your table/column names match the class/property names, some of the additional info in the attribute is not necessary.
[ActiveRecord(Table="SimpleProducts")]
public class Product
{
private IList<Product> _RelatedProducts;
private IList<ProductGroup> _ProductGroups;
public Product()
{
_RelatedProducts = new List<Product>();
_ProductGroups = new List<ProductGroup>();
}
[PrimaryKey(Column="ProductID", Generator=Castle.ActiveRecord.PrimaryKeyType.UuidHex)]
public virtual string ID { get; private set; }
[Property(NotNull=true, Length=50, Column="Title")]
public virtual string Title {get; set; }
[Property(Length=300, NotNull=false, Column="ImagePath")]
public virtual string ImagePath { get; set; }
[Property(NotNull = false, Length = 500, Column="Description")]
public virtual string Description { get; set; }
[HasAndBelongsToMany(Table="RelatedProductsLookup", ColumnKey="ProductID", ColumnRef="RelatedProductID")]
public virtual IList<Product> RelatedProducts
{
get { return _RelatedProducts; }
set { _RelatedProducts = value; }
}
[HasAndBelongsToMany(Table="ProductsProductGroupsLookup", ColumnKey="ProductID", ColumnRef="ProductGroupID")]
public virtual IList<ProductGroup> ProductGroups
{
get { return _ProductGroups; }
set { _ProductGroups = value; }
}
}
[ActiveRecord(Table="ProductGroups")]
public class ProductGroup
{
[PrimaryKey(Column="ProductGroupID", Generator=Castle.ActiveRecord.PrimaryKeyType.UuidHex)]
public virtual string ProductGroupID { get; set; }
[Property(NotNull=true, Length=50, Column="Title")]
public virtual string Title { get; set; }
[HasAndBelongsToMany(Table="ProductsProductGroupsLookup", ColumnKey="ProductGroupID", ColumnRef="ProductID")]
public virtual IList<Product> Products { get; set; }
}
Repository Object
Another added benefit of using the Castle Active Record library is that we can use the Repository<T> for all of our object persistence. Instead of creating our own implementation of IRepository, we can write code like this to save / retrieve / update objects.
var p = Repository<Product>.Get(23);
Repository<Product>.Save(p);
The repository is pretty nice – we can save all of our objects outside of the domain, which makes for a much cleaner design. Next time, we'll be looking at the extremely simple MVC application powered by this model and NHibernate Query Generator. Continue to Part 4


|
Fusion3D
Version 6.04
|
This class does coordinate system conversions – between Geometric and Projected coordinate systems and also keeps track of reference and aim points. More...
#include <gps_calc_class.h>
Public Member Functions | |
| gps_calc_class () | |
| Constructor. More... | |
| ~gps_calc_class () | |
| Destructor. More... | |
| int | set_GDAL_DATA_env_var () |
| Set environment variable GDAL_DATA which should point to the directory where GDAL coordinate system definition files are. More... | |
| int | init_from_epsg_code_number (int code) |
| Init coordinate transforms – init from ESPG code number. More... | |
| int | init_wgs84_from_ll (const double Lat, const double Long) |
| Init coordinate transforms – init from LatLong and assume WGS84. More... | |
| int | set_ref_from_ll (double lat, double lon) |
| Set the reference point using latitude and longitude in degrees. More... | |
| int | set_ref_from_utm (double north, double east) |
| Set the reference point using UTM coordinates in meters. More... | |
| int | set_ref_elevation (float elev) |
| Set the reference point elevation in meters. More... | |
| int | set_scene_size (float dx, float dy) |
| Set the approximate scene size – just use the larger dimension. More... | |
| int | is_ref_defined () |
| Return 1 if reference point has been defined, 0 otherwise. More... | |
| double | get_ref_lat () |
| Return reference latitude in deg. More... | |
| double | get_ref_lon () |
| Return reference longitude in deg. More... | |
| double | get_ref_utm_east () |
| Return reference Easting in UTM coordinates in meters. More... | |
| double | get_ref_utm_north () |
| Return reference Northing in UTM coordinates in meters. More... | |
| float | get_ref_elevation () |
| Return reference elevation in meters. More... | |
| float | get_scene_size () |
| Return reference elevation in meters – Aux point-cloud reference. More... | |
| int | set_aim_point_rel (double north, double east) |
| Set the aim point (screen center and center of LOS and other calculations) in meters relative to reference point. More... | |
| int | set_aim_point_UTM (double north, double east) |
| Set the aim point (screen center and center of LOS and other calculations) in UTM in meters. More... | |
| double | get_aim_rel_north () |
| Return aim point location north in in meters relative to reference point. More... | |
| double | get_aim_rel_east () |
| Return aim point location east in in meters relative to reference point. More... | |
| int | clear_all () |
| Reset all to default values including the reference point and coordinate system definitions. More... | |
| int | is_coord_system_defined () |
| Return 1 if coordinate system has been defined, 0 otherwise. More... | |
| int | get_epsg_code_number () |
| Get the ESPG code number for the projected coordinate system. More... | |
| int | get_utm_lon_zone_ref () |
| Get the UTM longitude zone number for the projected coordinate system – valid only for WGS84. More... | |
| int | get_utm_lon_zone (int epsg_code) |
| Get the UTM longitude zone number for the projected coordinate system indexed by the specified EPSG code – valid only for WGS84. More... | |
| int | copy_utm_zone (const double Lat, char *zone) |
| Copy the UTM zone (eg. '10T') for the specified latitude into the specified string. More... | |
| int | proj_to_ll (const double Northing, const double Easting, double &Lat, double &Long) |
| Coordinate transform – Projected to Geometric. More... | |
| int | proj_to_ll_wgs83_zone (const double Northing, const double Easting, int utm_lon_zone, double &Lat, double &Long) |
| Coordinate transform – Projected to Geometric given a specified UTM zone – Valid only for WGS84. More... | |
| int | ll_to_proj (const double Lat, const double Long, double &Northing, double &Easting) |
| Coordinate transform – Geometric to Projected. More... | |
| int | UTM_to_GridLetters (double north, double east, char *GLout) |
| Return MGRS grid letters corresponding to UTM coordinates. More... | |
| int | MGRS_to_UTM (char utm_lat_zone_char, char *GLin, int n_mgrs, int e_mgrs, double &n_utm, double &e_utm) |
| Convert MGRS coordinates to UTM – assumes WGS84 – WARNING GIVES WRONG NORTHING IN SOUTHERN HEMISPHERE. More... | |
| char | UTMLetterDesignator (double Lat) |
| Determines the correct UTM letter designator for the given latitude. More... | |
| OGRSpatialReference * | get_spatial_ref () |
| Get base GDAL spatial reference for the viewer/map. More... | |
This class does coordinate system conversions – between Geometric and Projected coordinate systems and also keeps track of reference and aim points.
Class should be initialized exactly once by the first entity loaded that has a coordinate system specified (eg. DEM or Point Cloud). It should be cleared when map is cleared. For WGS84, the class uses older transforms modified from codes supplied by Lincoln Labs. For other coordinate systems, the class uses GDAL which supports a large group of the common coordinate systems. These systems are referenced by the ESPG code number. GDAL requires supporting text files pointed to by environment variable GDAL_DATA. The class sets this environment variable to point to the directory /GDAL/data under the bin directory for the viewer.
| gps_calc_class::gps_calc_class | ( | ) |
Constructor.
Sets GDAL environment variable GDAL_DATA (that points to supporting files for GDAL) to subdir '/GDAL/data' under the bin dir.
| gps_calc_class::~gps_calc_class | ( | ) |
Destructor.
| int gps_calc_class::clear_all | ( | ) |
Reset all to default values including the reference point and coordinate system definitions.
| int gps_calc_class::copy_utm_zone | ( | const double | Lat, |
| char * | zone | ||
| ) |
Copy the UTM zone (eg. '10T') for the specified latitude into the specified string.
| double gps_calc_class::get_aim_rel_east | ( | ) |
Return aim point location east in in meters relative to reference point.
| double gps_calc_class::get_aim_rel_north | ( | ) |
Return aim point location north in in meters relative to reference point.
| int gps_calc_class::get_epsg_code_number | ( | ) |
Get the ESPG code number for the projected coordinate system.
| float gps_calc_class::get_ref_elevation | ( | ) |
Return reference elevation in meters.
| double gps_calc_class::get_ref_lat | ( | ) |
Return reference latitude in deg.
| double gps_calc_class::get_ref_lon | ( | ) |
Return reference longitude in deg.
| double gps_calc_class::get_ref_utm_east | ( | ) |
Return reference Easting in UTM coordinates in meters.
North and east values are rounded to the nearest meter. Lat and lon are adjusted to match rounded values.
| double gps_calc_class::get_ref_utm_north | ( | ) |
Return reference Northing in UTM coordinates in meters.
North and east values are rounded to the nearest meter. Lat and lon are adjusted to match rounded values.
| float gps_calc_class::get_scene_size | ( | ) |
Return reference elevation in meters – Aux point-cloud reference.
| OGRSpatialReference * gps_calc_class::get_spatial_ref | ( | ) |
Get base GDAL spatial reference for the viewer/map.
Init UTM zone info – char string zone, int utm_zone_lon_int_ref and char utm_lat_zone_char_ref. Init flag for Northern hemisphere. Init coordSysType to indicated WGS84.
| int gps_calc_class::get_utm_lon_zone | ( | int | epsg_code | ) |
Get the UTM longitude zone number for the projected coordinate system indexed by the specified EPSG code – valid only for WGS84.
| int gps_calc_class::get_utm_lon_zone_ref | ( | ) |
Get the UTM longitude zone number for the projected coordinate system – valid only for WGS84.
| int gps_calc_class::init_from_epsg_code_number | ( | int | code | ) |
Init coordinate transforms – init from ESPG code number.
For WGS84 coordinates, init UTM zone info – int utm_lon_zone_ref (longitude char cant be set without additional latitude info). For WGS84 coordinates, init flag for Northern hemisphere. Works for all coordinate systems supported by GDAL (should be any common enough to encounter).
| int gps_calc_class::init_wgs84_from_ll | ( | const double | Lat, |
| const double | Long | ||
| ) |
Init coordinate transforms – init from LatLong and assume WGS84.
Init UTM zone info – char string zone, int utm_zone_lon_int_ref and char utm_lat_zone_char_ref. Init flag for Northern hemisphere. Init coordSysType to indicated WGS84.
| int gps_calc_class::is_coord_system_defined | ( | ) |
Return 1 if coordinate system has been defined, 0 otherwise.
| int gps_calc_class::is_ref_defined | ( | ) |
Return 1 if reference point has been defined, 0 otherwise.
| int gps_calc_class::ll_to_proj | ( | const double | Lat, |
| const double | Long, | ||
| double & | Northing, | ||
| double & | Easting | ||
| ) |
Coordinate transform – Geometric to Projected.
| int gps_calc_class::MGRS_to_UTM | ( | char | utm_lat_zone_char, |
| char * | GLin, | ||
| int | n_mgrs, | ||
| int | e_mgrs, | ||
| double & | n_utm, | ||
| double & | e_utm | ||
| ) |
Convert MGRS coordinates to UTM – assumes WGS84 – WARNING GIVES WRONG NORTHING IN SOUTHERN HEMISPHERE.
| GLin | input UTM latitude zone character (eg 'U') – this is not necessarily defined by the coordinate system |
| GLin | input MGRS characters (2 chars eg 'FR') that define the subarea of the UTM zone |
| n_mgrs | input MGRS northing |
| e_mgrs | input MGRS easting |
| n_utm | output UTM northing |
| e_utm | output UTM easting |
| int gps_calc_class::proj_to_ll | ( | const double | Northing, |
| const double | Easting, | ||
| double & | Lat, | ||
| double & | Long | ||
| ) |
Coordinate transform – Projected to Geometric.
| int gps_calc_class::proj_to_ll_wgs83_zone | ( | const double | Northing, |
| const double | Easting, | ||
| int | utm_lon_zone, | ||
| double & | Lat, | ||
| double & | Long | ||
| ) |
Coordinate transform – Projected to Geometric given a specified UTM zone – Valid only for WGS84.
| int gps_calc_class::set_aim_point_rel | ( | double | north, |
| double | east | ||
| ) |
Set the aim point (screen center and center of LOS and other calculations) in meters relative to reference point.
| int gps_calc_class::set_aim_point_UTM | ( | double | north, |
| double | east | ||
| ) |
Set the aim point (screen center and center of LOS and other calculations) in UTM in meters.
| int gps_calc_class::set_GDAL_DATA_env_var | ( | ) |
Set environment variable GDAL_DATA which should point to the directory where GDAL coordinate system definition files are.
Searches exec path to find directory 'gdal-data'.
| int gps_calc_class::set_ref_elevation | ( | float | elev | ) |
Set the reference point elevation in meters.
| int gps_calc_class::set_ref_from_ll | ( | double | lat, |
| double | lon | ||
| ) |
Set the reference point using latitude and longitude in degrees.
| int gps_calc_class::set_ref_from_utm | ( | double | north, |
| double | east | ||
| ) |
Set the reference point using UTM coordinates in meters.
North and east reference values are rounded to the nearest meter.
| int gps_calc_class::set_scene_size | ( | float | dx, |
| float | dy | ||
| ) |
Set the approximate scene size – just use the larger dimension.
If the current size is smaller, then resets the size.
| int gps_calc_class::UTM_to_GridLetters | ( | double | north, |
| double | east, | ||
| char * | GLout | ||
| ) |
Return MGRS grid letters corresponding to UTM coordinates.
| char gps_calc_class::UTMLetterDesignator | ( | double | Lat | ) |
Determines the correct UTM letter designator for the given latitude.
| Lat | Latitude in decimal degrees – North latitudes are positive, South latitudes are negative |


JavasScriptView is a small library that wants to make life easier for the mobile application developer.
This library is focused on the development of JavaScript applications using the framework Cordova / Phonegap.
JavaScriptView lets you manage different views of your mobile application. Through a simple MVC structure, you can create dynamic views in your application and manage elements in the DOM asynchronously.


Start YARN session with 4 Taskmanagers (each with 4 GB of Heapspace):
wget
tar xvzf stratosphere-dist--yarn.tar.gz
cd stratosphere-yarn-/
./bin/yarn-session.sh -n 4 -jm 1024 -tm 4096
Apache Hadoop YARN is a cluster resource management framework. It allows to run various distributed applications on top of a cluster. Stratosphere runs on YARN next to other applications. Users do not have to setup or install anything if there is already a YARN setup.
Requirements
If you have troubles using the Stratosphere YARN client, have a look in the FAQ section.
Follow these instructions to learn how to launch a Stratosphere Session within your YARN cluster.
A session will start all required Stratosphere services (JobManager and TaskManagers) so that you can submit programs to the cluster. Note that you can run multiple programs per session.
Download the YARN tgz package on the download page. It contains the required files.
If you want to build the YARN .tgz file from sources, follow the build instructions. Make sure to use the -Dhadoop.profile=2
profile. You can find the file in stratosphere-dist/target/stratosphere-dist--yarn.tar.gz
(Note: The version might be different for you ).
Extract the package using:
tar xvzf stratosphere-dist--yarn.tar.gz
cd stratosphere-yarn-/
Use the following command to start a session
./bin/yarn-session.sh
This command will show you the following overview:
Usage:
Required
-n,--container <arg> Number of Yarn container to allocate (=Number of TaskTrackers)
Optional
-jm,--jobManagerMemory <arg> Memory for JobManager Container [in MB]
-q,--query Display available YARN resources (memory, cores)
-qu,--queue <arg> Specify YARN queue.
-tm,--taskManagerMemory <arg> Memory per TaskManager Container [in MB]
-tmc,--taskManagerCores <arg> Virtual CPU cores per TaskManager
-v,--verbose Verbose debug mode
Please note that the Client requires the HADOOP_HOME
(or YARN_CONF_DIR
or HADOOP_CONF_DIR
) environment variable to be set to read the YARN and HDFS configuration.
Example: Issue the following command to allocate 10 TaskTrackers, with 8 GB of memory each:
./bin/yarn-session.sh -n 10 -tm 8192
The system will use the configuration in conf/stratosphere-config.yaml
. Please follow our configuration guide if you want to change something. Stratosphere on YARN will overwrite the following configuration parameters jobmanager.rpc.address
(because the JobManager is always allocated at different machines) and taskmanager.tmp.dirs
(we are using the tmp directories given by YARN).
The example invocation starts 11 containers, since there is one additional container for the ApplicationMaster and JobTracker.
Once Stratosphere is deployed in your YARN cluster, it will show you the connection details of the JobTracker.
The client has to remain open to keep the deployment running. We suggest to use screen
, which will start a detachable shell:
screen
,CTRL+a
, then press d
to detach the screen session,screen -r
to resume again.Use the following command to submit a Stratosphere program to the YARN cluster:
./bin/stratosphere
Please refer to the documentation of the commandline client.
The command will show you a help menu like this:
[...]
Action "run" compiles and submits a Stratosphere program.
"run" action arguments:
-a,--arguments <programArgs> Program arguments
-c,--class <classname> Program class
-j,--jarfile <jarfile> Stratosphere program JAR file
-m,--jobmanager <host:port> Jobmanager to which the program is submitted
-w,--wait Wait for program to finish
[...]
Use the run action to submit a job to YARN. The client is able to determine the address of the JobManager. In the rare event of a problem, you can also pass the JobManager address using the -m
argument. The JobManager address is visible in the YARN console.
Example
wget -O apache-license-v2.txt http://www.apache.org/licenses/LICENSE-2.0.txt
./bin/stratosphere run -j ./examples/stratosphere-java-examples--WordCount.jar \
-a 1 file://`pwd`/apache-license-v2.txt file://`pwd`/wordcount-result.txt
If there is the following error, make sure that all TaskManagers started:
Exception in thread "main" eu.stratosphere.compiler.CompilerException:
Available instances could not be determined from job manager: Connection timed out.
You can check the number of TaskManagers in the JobManager web interface. The address of this interface is printed in the YARN session console.
If the TaskManagers do not show up after a minute, you should investigate the issue using the log files.
This section covers building Stratosphere for a specific Hadoop version. Most users do not need to do this manually. The problem is that Stratosphere uses HDFS and YARN which are both from Apache Hadoop. There exist many different builds of Hadoop (from both the upstream project and the different Hadoop distributions). Typically errors arise with the RPC services. An error could look like this:
ERROR: The job was not successfully submitted to the nephele job manager:
eu.stratosphere.nephele.executiongraph.GraphConversionException: Cannot compute input splits for TSV:
java.io.IOException: Failed on local exception: com.google.protobuf.InvalidProtocolBufferException:
Protocol message contained an invalid tag (zero).; Host Details :
Example
mvn -Dhadoop.profile=2 -Pcdh-repo -Dhadoop.version=2.2.0-cdh5.0.0-beta-2 -DskipTests package
The commands in detail:
-Dhadoop.profile=2
activates the Hadoop YARN profile of Stratosphere. This will enable all components of Stratosphere that are compatible with Hadoop 2.2-Pcdh-repo
activates the Cloudera Hadoop dependencies. If you want other vendor's Hadoop dependencies (not in maven central) add the repository to your local maven configuration in ~/.m2/
.-Dhadoop.version=2.2.0-cdh5.0.0-beta-2
sets a special version of the Hadoop dependencies. Make sure that the specified Hadoop version is compatible with the profile you activated.If you want to build HDFS for Hadoop 2 without YARN, use the following parameter:
-P!include-yarn
Some Cloudera versions (such as 2.0.0-cdh4.2.0
) require this, since they have a new HDFS version with the old YARN API.
Please post to the Stratosphere mailinglist or create an issue on Github, if you have issues with your YARN setup and Stratosphere.
This section briefly describes how Stratosphere and YARN interact.
The YARN client needs to access the Hadoop configuration to connect to the YARN resource manager and to HDFS. It determines the Hadoop configuration using the following strategy:
YARN_CONF_DIR
, HADOOP_CONF_DIR
or HADOOP_CONF_PATH
are set (in that order). If one of these variables are set, they are used to read the configuration.HADOOP_HOME
environment variable. If it is set, the client tries to access $HADOOP_HOME/etc/hadoop
(Hadoop 2) and $HADOOP_HOME/conf
(Hadoop 1).When starting a new Stratosphere YARN session, the client first checks if the requested resources (containers and memory) are available. After that, it uploads a jar that contains Stratosphere and the configuration to HDFS (step 1).
The next step of the client is to request (step 2) a YARN container to start the ApplicationMaster (step 3). Since the client registered the configuration and jar-file as a resource for the container, the NodeManager of YARN running on that particular machine will take care of preparing the container (e.g. downloading the files). Once that has finished, the ApplicationMaster (AM) is started.
The JobManager and AM are running in the same container. Once they successfully started, the AM knows the address of the JobManager (its own host). It is generating a new Stratosphere configuration file for the TaskManagers (so that they can connect to the JobManager). The file is also uploaded to HDFS. Additionally, the AM container is also serving Stratosphere's web interface.
After that, the AM starts allocating the containers for Stratosphere's TaskManagers, which will download the jar file and the modified configuration from the HDFS. Once these steps are completed, Stratosphere is set up and ready to accept Jobs.


Managing secrets is a challenge in every DevOps environment, I use Azure Key Vault to manage my secrets. When I was getting started working with Key Vault my biggest challenge was not getting secrets in, but how to get them out. The samples we provide with the azure-keyvault NPM package...
[Read More]
MongoDB on Windows Docker
I have been doing more VueJS development in my spare time and with that naturally comes the desire to explore MongoDB. What better way to do that than in a Docker container. After all, the promise of containers is that I can run this and throw it away when I...
[Read More]
Blogging Workflow
I have gone in cycles regarding with how I blog. In the past I have hosted my blog on Wordpress, Squarespace, Posterous, and a host of other platforms. I have never found a host or workflow that has really fit the way I like to write. Recently, I again changed...
[Read More]
PowerShell Profile
While I am using MacOS as my primary machine, I spend a lot of time moving between OS X and Windows. I have grown used to many of the customizations I implemented in Bash. I began looking for a way to get them into PowerShell. Beyond just the time saving...
[Read More]
Bash Profile
I have been using a MacBook Pro as my primary work computer for about 6 months now. As a developer, photographer, and video editor I have have always been partial to them in my personal life. I have been spending more and more time in the Terminal app then ever...
[Read More]


{{ define "title" }}{{ .Worker }} - {{ .Runnable }} - Build your dataset{{ end }} {{ define "css" }} {{ end }} {{ define "html" }}
Listen to the audio, write the transcript and press "Enter" to validate or "Ctrl+Enter" to remove new speeches.
Listen to the audio, update the transcript and press "Enter" to update or "Ctrl+Enter" to remove.


Methodologies: Object-Oriented Design, Test-Driven Development, Agile Development
Experience
Amazon
Software Development Engineer II
April 2016 - present
Develop API and front-end layer of web application used by publishers to manage their bookshelves
Narrative Science
Software Engineer
September 2014 - March 2016
Develop backend of next-generation software to automate data ingestion and analysis
Lead projects that prepare client data for natural language generation by ingesting, analyzing, and modeling
Promote team success by actively on-boarding new team members, setting standards for documentation and testing, and delivering projects on time while maintaining high standards
Provide continuing support and monitoring solutions for existing clients
Academic Approach
Math Curriculum Team Leader, Trainer, and Tutor
July 2011 - April 2014
Oversaw a team of test-item writers and graphic designers
Conducted 25-hour trainings for newly hired tutors
Managed professional development programs for tutors
Tutored high school and middle school students in math and English
University of Illinois at Chicago
Math Instructor, Teaching Assistant
August 2009 - May 2011
Taught math courses for the Emerging Scholar Program (for underrepresented students) and Summer Enrichment Workshop (for underprepared students)
Conducted supplementary classroom sessions and one-on-one tutoring sessions for various college math courses
Research
Pure Mathematics: Knot Theory
Study of the topological relationship between 4-ravels and rational tangles.


{% extends 'base.html' %} {% from 'macros.html' import form_field %} {% block content %}
A free weekly newsletter featuring curated news, articles, new releases, jobs etc related to Flask.
Delivery at every Wednesday morning.
Unsubscribe at any time.
{% endblock %}


Database search
Collocation database search
On Top
The Corpus of Russian Poetry Map
This map shows the place of creation of texts included in the
RNC
Corpus of Russian Poetry.


--- title: checkmAIt Project Page layout: project-page project-name: checkmAIt git-link: https://github.com/NickShermeister/checkmAIt/ ---
Wizard's Chess was an idea born from HackHolyoke 2017, where I worked with another junior, and sophomore, and a first year in order to create a voice-controlled chess board with a Lego arm that moved the pieces, which is shown to the left. After the questionable success of the first 24 hour iteration (callibration is key), we decided to undertake the project again on a longer context. Over the course of the next semester (Spring 2018), we devoted a portion of our free time into making a cleaner version, to show at the end of the year exposition.
During exposition, we were able to demonstrate the project as seen above. Voice activation did not work due to the crowded environment; however, we were able to move pieces out of the way to allow for any move, capture pieces and place them in a graveyard, and reset the board. The AI would respond with a move to any play by the humans, and if put on a different setting, the game would play itself for a while. Callibration continued to be an issue with our tokens (changed from chess pieces for enhanced stability), so at times it was difficult to see exactly where the pieces were meant to be; it was still a delight for those involved.
I took many roles during this project. For software, I was in charge of routing pieces in the easiest way (a weighted shortest path, with other pieces factoring in as moveable obstacles), putting pieces back into place if they had to be moved out of the way, and keeping track of the board state. I also did some last minute work on speech control with Google Cloud Speech.
My other role was general hardware help. I was head of creating the tokens and helped assemble the gantry, as well as whatever other tasks came up that had to be done.
This project was written in Python, communicating with an Arduino for the servos. We used Stockfish as the AI opponent and Google Cloud Speech to pick up voice commands. A number of libraries were used for the software side, such as networkx.
Integrate often so you can see the flaws. We waited a bit too long for our final physical construction, and thus ran into some debugging at the very end, while we were presenting. This could have been fixed by having earlier prototypes as we went along. Also, look for suitable libraries. Having the routing algorithm of networkx saved us a lot of time, which we could then devote to unique problems instead of solving already-fixed issues.


Dependencies
Note: nmod, neg, and punct appear in two places.
|
|
|
|||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||
|
|
|
acl
: clausal modifier of noun
The dependency relation acl
stands for finite and non-finite clauses that modify a nominal.
acl:relcl
: acl:relcl
This document is a placeholder for the language-specific documentation
for acl:relcl
.
advcl
: adverbial clause modifier
advcl: adverbial clause modifier
An adverbial clause modifier is a clause which modifies a verb or other predicate (adjective, etc.), as a modifier not as a core complement. This includes things such as a temporal clause, consequence, conditional clause, purpose clause, etc. Also comparative constructions are annotated using dependency relation advcl.
Ta jooksis karjudes .
nsubj(jooksis-2, Ta-1)
advcl(jooksis-2, karjudes-3)
punct(jooksis-2, .-4)
He ran shouting.
Mulle pakuti süüa , kui õhtul koolist saabusin .
nmod(pakuti-2, Mulle-1)
xcomp(pakuti-2, süüa-3)
punct(saabusin-8,-4)
sconj(saabusin-8, kui-5)
advmod(saabusin-8, õhtul-6)
nmod(saabusin-8, koolist-7)
advcl(pakuti-2, saabusin-8)
punct(saabusin-8, .-9)
I was offered something to eat, when I arrived from school in the evening
advmod
: adverbial modifier
Adverbial modifier advmod is an adverbial modifying an adverb, a verb, an adjective or a nominal.
jooksis väga kiiresti
advmod(kiiresti-3, väga-2)
advmod(jooksis-1, kiiresti-3)
ran very quickly
Kass nägi ka koera .
nsubj(nägi-2, Kass-1)
advmod(koera-4, ka-3)
dobj(nägi-2, koera-4)
punct(nägi-2, .-5)
The cat saw also the dog.
advmod:quant
: advmod:quant
This document is a placeholder for the language-specific documentation
for advmod:quant
.
amod
: adjectival modifier
An adjectival modifier of a noun is any adjectival phrase that serves to modify the meaning of the noun.
appos
: appositional modifier
An appositional modifier is a noun preceding or following the head noun that serves to define or modify that noun. Note that appositions can be both right- and left-headed in Estonian UD.
aux
: auxiliary
An auxiliary of a clause is a non-main verb of the clause, e.g., a modal auxiliary, or an auxiliary in a periphrastic tense. ‘olema’ and in rare occasions ‘saama’ are auxiliaries that form periphrastic tense forms. In the current version of Estonain UD, only ‘saama’, ‘võima’, ‘pidama’, ‘näima’, ‘paistma’, ‘tunduma’ are regarded as modal auxiliaries.
auxpass
: passive auxiliary
This document is a placeholder for the language-specific documentation
for auxpass
.
case
: case marking
case: case marking
The case relation is used to annotate prepositions and postpositions. Case-marking elements (i.e. adpositions) are treated as dependents of the noun they attach to.
Rüütel läks lossi juurde .
nsubj(läks-2, Rüütel-1)
nmod(läks-2, lossi-3)
case(lossi-3, juurde-4)
punct(läks-2, .-5)
Knight went near the castle.
cc
: coordinating conjunction
A cc
is the relation between the first conjunct and the coordinating conjunction delimiting another conjunct.
cc:preconj
: cc:preconj
This document is a placeholder for the language-specific documentation
for cc:preconj
.
ccomp
: clausal complement
A clausal complement of a verb or adjective is a dependent clause which is a core argument.
Ma usun , et kõik läheb hästi.
nsubj(usun-2, Ma-1)
punct(usun-2, ,-3)
mark(läheb-6, et-4)
nsubj(läheb-6, kõik-5)
ccomp(usun-2, läheb-6)
advmod(läheb-6, hästi-7)
punct(usun-2, .-8)
I beleive, that everything goes well.
compound
: compound
The dependency relation compound is used for annotating numbers written with several words or several sequences of digits or combinations of them.
60 000
compound(60-1, 000-2)
~~
~~~sdparse
kaks tuhat
compound(kaks-1, tuhat-2)
two thousand
compound:prt
: compound:prt
This document is a placeholder for the language-specific documentation
for compound:prt
.
conj
: conjunct
A conjunct is the relation between two elements connected by a coordinating conjunction. Coordinated elements can be words, phrases or clauses. The head of the relation is the first conjunct and all the other conjuncts depend on it via the conj
relation.
cop
: copula
A copula is the relation between the complement of a copular verb and the copular verb. ‘olema’ is the only copular verb in Estonian UD. The predicative is the head of the copular clause, and also the governor of the cop dependency.
Kass on triibuline .
nsubj:cop (triibuline-3, Kass-1)
cop (triibuline-3, on-2)
punct (triibuline-3, .-4)
Cat is striped
csubj
: clausal subject
A clausal subject is a clausal syntactic subject of a clause. Both finite and non-finite clauses can act as clausal subjects.
Mulle meeldib mõelda .
nmod(meeldib-2, mulle-1)
csubj(meeldib-2, mõelda-3)
punct(meeldib-2, .-4)
I like to think.
csubj:cop
: csubj:cop
This document is a placeholder for the language-specific documentation
for csubj:cop
.
csubjpass
: clausal passive subject
This document is a placeholder for the language-specific documentation
for csubjpass
.
dep
: unspecified dependency
This document is a placeholder for the language-specific documentation
for dep
.
det
: determiner
This document is a placeholder for the language-specific documentation
for det
.
discourse
: discourse element
This document is a placeholder for the language-specific documentation
for discourse
.
dislocated
: dislocated elements
This document is a placeholder for the language-specific documentation
for dislocated
.
dobj
: direct object
In Estonian, a direct object can be a noun in singular or plural nominative case, singular genitive case or singular or plural partitive case.
Kass nägi koera .
nsubj(nägi-2, Kass-1)
dobj(nägi-2, koera-3)
punct(nägi-2, .-4)
The cat saw the dog.
 PUNCT _ _ 2 punct _ _
In the morning, the cat caught a nice fat mouse.
expl
: expletive
This document is a placeholder for the language-specific documentation
for expl
.
fixed
: multi-word expression
This document is a placeholder for the language-specific documentation
for fixed
.
flat
: name
The dependency relation name is used for proper nouns constituted of multiple nominal elements. Note that names are right-headed in Estonian UD.
Arvo Pärt
name(Pärt-2, Arvo-1)
foreign
: foreign words
This document is a placeholder for the language-specific documentation
for foreign
.
goeswith
: goes with
This document is a placeholder for the language-specific documentation
for goeswith
.
iobj
: indirect object
This document is a placeholder for the language-specific documentation
for iobj
.
list
: list
This document is a placeholder for the language-specific documentation
for list
.
mark
: marker
This document is a placeholder for the language-specific documentation
for mark
.
neg
: negation modifier
The negation modifier is the relation between a negation word and the word it modifies.
Words ‘ei’, ‘ära’ and ‘ärge’ as parts of negative verb form are annotated using this relation.
nmod
: nominal modifier
The nmod relation is used for nominal modifiers. They depend either on another noun (group “noun dependents”) or on a predicate (group “non-core dependents of clausal predicates”). They can occur alone or together with an adposition in an adpositional phrase.
Rüütel läks lossi .
nsubj(läks-2, Rüütel-1)
nmod(läks-2, lossi-3)
punct(läks-2, .-4)
Knight went into the castle.
Rüütel läks lossi juurde .
nsubj(läks-2, Rüütel-1)
nmod(läks-2, lossi-3)
case(lossi-3, juurde-4)
punct(läks-2, .-5)
Knight went near the castle.
nmod:poss
: nmod:poss
This document is a placeholder for the language-specific documentation
for nmod:poss
.
nsubj
: nominal subject
The dependency type nsubj
marks nominal subjects of the non-copular clause.
Kass nägi koera .
nsubj (nägi-2, Kass-1)
dobj (nägi-2, koera-3)
punct (nägi-2, .-4)
The cat saw the dog.
nsubj:cop
: nsubj:cop
This document is a placeholder for the language-specific documentation
for nsubj:cop
.
nsubjpass
: passive nominal subject
This document is a placeholder for the language-specific documentation
for nsubjpass
.
nummod
: numeric modifier
This document is a placeholder for the language-specific documentation
for nummod
.
orphan
: remnant in ellipsis
This document is a placeholder for the language-specific documentation
for orphan
.
parataxis
: parataxis
This document is a placeholder for the language-specific documentation
for parataxis
.
punct
: punctuation
This document is a placeholder for the language-specific documentation
for punct
.
reparandum
: overridden disfluency
This document is a placeholder for the language-specific documentation
for reparandum
.
root
: root
This document is a placeholder for the language-specific documentation
for root
.
vocative
: vocative
This document is a placeholder for the language-specific documentation
for vocative
.
xcomp
: open clausal complement
This document is a placeholder for the language-specific documentation
for xcomp
.


--- title: Authors subtitle: The voice of the people on our blog description: These are the people who have contributed to this website's content. permalink: /authors/ ---
Thank you to our wonderful authors! Over the years many PCVs, RPCVs, counterparts, colleagues, and staff have all contributed to the content found on the blog. If you would also like to be a contributing offer, please contact us with a pitch for what you might like to write about.
Topics of focus:
We are eager to hear your story soon!
of our blog


VIEW PROMOTION IN PDF
SUBSCRIBE TO WHATSAPP
VISIT OUR WEBSITE
VISIT OUR FACEBOOK
VISIT OUR INSTAGRAM
VISIT OUR TWITTER
VISIT OUR YOUTUBE
VIEW OPENING TIME
LOCATE A BRANCH
CALL US NOW
SEND US AN EMAIL
ABOUT ANSAR GALLERY


First you need to select file from your Google Drive
You have assigned for: {{ project.class ? project.class.prefix+" "+project.class.name : 'No class yet' }}


Sets build current patches only mode.
If this enabled, all still scheduled builds for previous patches are canceled when new build is scheduled by new patch.
Note that this is experimental feature.


{% extends "layout.html" %} {% block header %} Thank you for Submitting! You've been added to our database! Search Database Return to the Home Page {% endblock %}
You've been added to our database!


Test instructions:
- Each test contains total of 50 questions and total duration for test is 30 mins.
- Each correct answer carries 2 marks and wrong answers will deduct 1 mark.
- You can skip a question and revisit it later.
Select level of difficulty:
To begin the test select the difficulty level from below options and click 'Next'
{{alert.msg}}