Installing packages using pip and virtual environments¶
This guide discusses how to install packages using pip and a virtual environment manager: either venv for Python 3 or virtualenv for Python 2. These are the lowest-level tools for managing Python packages and are recommended if higher-level tools do not suit your needs.
メモ
This doc uses the term package to refer to a Distribution Package which is different from an Import Package that which is used to import modules in your Python source code.
Installing pip¶
pip is the reference Python package manager. It's used to install and update packages. You'll need to make sure you have the latest version of pip installed.
Windows¶
The Python installers for Windows include pip. You should be able to access pip using:
py -m pip --version
pip 9.0.1 from c:\python36\lib\site-packages (Python 3.6.1)
You can make sure that pip is up-to-date by running:
py -m pip install --upgrade pip
Linux and macOS¶
Debian and most other distributions include a python-pip package, if you want to use the Linux distribution-provided versions of pip see Installing pip/setuptools/wheel with Linux Package Managers.
You can also install pip yourself to ensure you have the latest version. It's recommended to use the system pip to bootstrap a user installation of pip:
python3 -m pip install --user --upgrade pip
Afterwards, you should have the newest pip installed in your user site:
python3 -m pip --version
pip 9.0.1 from $HOME/.local/lib/python3.6/site-packages (python 3.6)
Installing virtualenv¶
メモ
If you are using Python 3.3 or newer, the venv
module is
the preferred way to create and manage virtual environments.
venv is included in the Python standard library and requires no additional installation.
If you are using venv, you may skip this section.
virtualenv is used to manage Python packages for different projects. Using virtualenv allows you to avoid installing Python packages globally which could break system tools or other projects. You can install virtualenv using pip.
On macOS and Linux:
python3 -m pip install --user virtualenv
On Windows:
py -m pip install --user virtualenv
Creating a virtual environment¶
venv (for Python 3) and virtualenv (for Python 2) allow you to manage separate package installations for different projects. They essentially allow you to create a "virtual" isolated Python installation and install packages into that virtual installation. When you switch projects, you can simply create a new virtual environment and not have to worry about breaking the packages installed in the other environments. It is always recommended to use a virtual environment while developing Python applications.
To create a virtual environment, go to your project's directory and run
venv. If you are using Python 2, replace venv
with virtualenv
in the below commands.
On macOS and Linux:
python3 -m venv env
On Windows:
py -m venv env
The second argument is the location to create the virtual environment.
メモ
You should exclude your virtual environment directory from your version
control system using .gitignore
or similar.
Activating a virtual environment¶
Before you can start installing or using packages in your virtual environment you'll
need to activate it. Activating a virtual environment will put the
virtual environment-specific
python
and pip
executables into your shell's PATH
.
On macOS and Linux:
source env/bin/activate
On Windows:
.\env\Scripts\activate
You can confirm you're in the virtual environment by checking the location of your
Python interpreter, it should point to the env
directory.
On macOS and Linux:
which python
.../env/bin/python
On Windows:
where python
.../env/bin/python.exe
As long as your virtual environment is activated pip will install packages into that specific environment and you'll be able to import and use packages in your Python application.
Leaving the virtual environment¶
If you want to switch projects or otherwise leave your virtual environment, simply run:
deactivate
If you want to re-enter the virtual environment just follow the same instructions above about activating a virtual environment. There's no need to re-create the virtual environment.
Installing packages¶
Now that you're in your virtual environment you can install packages. Let's install the Requests library from the Python Package Index (PyPI):
python3 -m pip install requests
pip should download requests and all of its dependencies and install them:
Collecting requests
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
Using cached certifi-2<IP_ADDRESS>-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests)
Using cached idna-2.6-py2.py3-none-any.whl
Installing collected packages: chardet, urllib3, certifi, idna, requests
Successfully installed certifi-2<IP_ADDRESS> chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
Installing specific versions¶
pip allows you to specify which version of a package to install using
version specifiers. For example, to install
a specific version of requests
:
python3 -m pip install requests==2.18.4
To install the latest 2.x
release of requests:
python3 -m pip install requests>=2.0.0,<3.0.0
To install pre-release versions of packages, use the --pre
flag:
python3 -m pip install --pre requests
Installing extras¶
Some packages have optional extras. You can tell pip to install these by specifying the extra in brackets:
python3 -m pip install requests[security]
Installing from source¶
pip can install a package directly from source, for example:
cd google-auth
python3 -m pip install .
Additionally, pip can install packages from source in development mode, meaning that changes to the source directory will immediately affect the installed package without needing to re-install:
python3 -m pip install --editable .
Installing from version control systems¶
pip can install packages directly from their version control system. For example, you can install directly from a git repository:
git+https://github.com/GoogleCloudPlatform/google-auth-library-python.git#egg=google-auth
For more information on supported version control systems and syntax, see pip's documentation on VCS Support.
Installing from local archives¶
If you have a local copy of a Distribution Package's archive (a zip, wheel, or tar file) you can install it directly with pip:
python3 -m pip install requests-2.18.4.tar.gz
If you have a directory containing archives of multiple packages, you can tell pip to look for packages there and not to use the Python Package Index (PyPI) at all:
python3 -m pip install --no-index --find-links=/local/dir/ requests
This is useful if you are installing packages on a system with limited connectivity or if you want to strictly control the origin of distribution packages.
Using other package indexes¶
If you want to download packages from a different index than the
Python Package Index (PyPI), you can use the --index-url
flag:
python3 -m pip install --index-url http://index.example.com/simple/ SomeProject
If you want to allow packages from both the Python Package Index (PyPI)
and a separate index, you can use the --extra-index-url
flag instead:
python3 -m pip install --extra-index-url http://index.example.com/simple/ SomeProject
Upgrading packages¶
pip can upgrade packages in-place using the --upgrade
flag. For example, to
install the latest version of requests
and all of its dependencies:
python3 -m pip install --upgrade requests
Using requirements files¶
Instead of installing packages individually, pip allows you to declare all
dependencies in a Requirements File. For
example you could create a requirements.txt
file containing:
requests==2.18.4
google-auth==1.1.0
And tell pip to install all of the packages in this file using the -r
flag:
python3 -m pip install -r requirements.txt
Freezing dependencies¶
Pip can export a list of all installed packages and their versions using the
freeze
command:
python3 -m pip freeze
Which will output a list of package specifiers such as:
cachetools==2.0.1
certifi==2<IP_ADDRESS>
chardet==3.0.4
google-auth==1.1.1
idna==2.6
pyasn1==0.3.6
pyasn1-modules==0.1.4
requests==2.18.4
rsa==3.4.2
six==1.11.0
urllib3==1.22
This is useful for creating Requirements Files that can re-create the exact versions of all packages installed in an environment.


SetRenderScaleQuality(n)
Sets the scaling quality when creating textures
n=0 -- nearest: nearest pixel sampling
n=1 -- linear: linear filtering (supported by OpenGL and Direct3D)
n=2 -- best: anisotropic filtering (supported by Direct3D)
Returns True if successful. It will return false if it is not supported on that system.
Example:


Settings
Add New AccountName |
Account Change |
Actions*After removing an account , reselect the account you want to have active |
Add New AccountName |
Account Change |
Actions*After removing an account , reselect the account you want to have active |


Scene 2:
Commentator: this is
where TechIT solves your problem.
We automate predetermined
forms and choices so that when you want to call that process to be
done again, it’s is filled out at the touch of a button, and at the
speed of your lowest bottleneck. So instead of you spending time at a
computer repeating a monotonous process, you can get to what really
matters.
Scene 3:
Ramesh: * comes in and presses the new button on his computer, shifts his glasses off for a second, and watches the process complete 300 times faster, with the click of a button.


Colour Palette
Codacy is committed to complying with AA standard contrast ratios. To do this, we use primary and extended colors that support usability by ensuring sufficient color contrast between elements.
Neutral
Neutrals are typically used for text, backgrounds and secondary elements. Dark neutrals are primarily used for copy. Mid-neutrals to create depth in components such as modals and cards. The mid-neutrals can also be used for subtle text and icons. Light neutrals are primarily used as background colors when we want to draw some attention to a particular section or convey information that is “disabled”.
$brand-neutral-900
is our default text color, used in headlines and body.
$brand-neutral-800
this is a color shade variante.
$brand-neutral-700
this is a color shade variante.
$brand-neutral-600
is used for complementary text.
$brand-neutral-500
is used in icons under lighter shades of gray.
$brand-neutral-400
is our default icon color on white background.
$brand-neutral-300
is used as text color on darker backgrounds. Ie - Navbar dropdown.
$brand-neutral-200
is used for lines and borders to create contrast on lighter backgrounds.
$brand-neutral-100
is used as color background in active states. Ie - Button radio, dropdowns. It is also used on hover states, within dropdowns.
$brand-neutral-50
is used as color background for contrasting areas. Ie - Tables, side menu, panels.
$brand-neutral-0
is used as the primary color of the interface.
Blue
Blue is used to indicate authentication, active states, or progress. You’ll find blue in messages, buttons, navigation, drop-downs, tabs, popovers, tooltips and info states.
$brand-primary
is used for buttons, links, inputs on focus.
$brand-success
is used for successful status and feedback.
$brand-warning
is used for warning status.
$brand-danger
is used for error status and feedback.
Typography
The main typeface is Clear sans. It should be used on every text in the application. If, for some reason, Clear sans is not rendered, the alternate typeface is Arial.
H1 header
26px

header

H2 header
22px

header

H3 header
18px

header

H4 header
16px

header

H5 header
14px

header

h6 header
12px

header

Paragraphs
All paragraphs should be written inside a

tag. Ideally, on blocks of text, the
tag should be used to highlight important text, making readability easier. Bellow
there's an example of a block of text with a link.
Other styles can be used, such as
for italic and
for underline.
The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim.
The quick, brown fox jumps over a lazy dog. Learn more.
For small prints, updates, conditions and copyrights, use the tag
.
© 2016 - CODACY AUTOMATED CODE REVIEW
Utility classes
Utility classes can be used as needed. Although, if many elements in a container require the same utility class, please create a parent class with the proper rule.
Alignment classes
Left aligned text.
Center aligned text.
Right aligned text.
Justified text.
No wrap text.
Transformation classes
Lowercased text.
Uppercased text.
Capitalized text.
Abbreviation
An abbreviation of the word attribute is attr.
Forms
Inputs can be used in a form group or individually. It's mandatory that each input has a label. Inputs should have the appropriate width according to the content it's going to receive - to size the width of an input add
the class .col-*-*
to .form-group
, and to size the height use .input-*
or .form-group-*
when using .form-group
s.
Optional fields should be indicated instead of required fields. Placeholders should always give some hint to the user on what is the expected input.
In case of inputs with feedback, the input should return to it's normal state when it becomes active.
Inputs
Normal inputs
Disabled input
With help
Optional fields
Feedback error
Input with an addon
Checkboxes addon
Inputs with tag boxes
Selection with dropdowns
Filter Component
Dropdown with search
with avatar
With multiple levels
Opening aligned to the right
Submenu to the left
Checkbox
Checkboxes should be used when yada yada
Checkboxes without label text
Usually only used when yada yada
Checkboxes with indeterminate state
Usually only used when yada yada
Inline checkboxes
Used when yada yada. Simply add .checkbox-inline
to the parent.
Check the following code and repeat for all checkboxes.
Disabled state also supported.
Use when yada yada
Switch
Radio buttons
Add a usage description here
Radios without label text
Lala lala
Inline radios
Used when yada yada
Disabled
Disabled state also supported.
Buttons with radio behaviour
Messages
Messages are used to communicate conditions, feedback, or to show responses to user actions. Content can include information, confirmation, warnings, and error messages. Codacy communicates messages through six different categories: global alerts, modals, toasts, inline text, button feedback, and notifications.
Congrats! You are now logged in.
Hey! Just letting you know that everything's gonna be alright. I got this.
Your trial has expired. To keep analyzing your private projects, you need to upgrade to the Pro plan. Also, this is how an alert with more text should look like.
The GitHub integration is disabled. Please ask an administrator of this project to enable it.
Dismissable alerts
Lalala
Warning! Better check yourself, you're not looking too good.
Example of an alert with link
Lalalala
Hey! Yada yada click here woo
Example of a larger alerts
Lalalala
Portal has broken the build 7 times in the last 2 days.
Inline alerts
Labels
Default Success Warning Danger Not up to standards Up to standardsBadges
Messages 42Popover
Panels
You can use Panels to group similar concepts together to make it easier to scan through the page.
Basic panel example
You can use the Primary panel to create the active panel effect. This should always follow an interaction with a selectable panel.
Selected box
Clickable container
Clickable panel
Selectable container
When using selectable panels it should always start as a panel-default, depending on the status (hover or selected) it will replicate panel-primary style.
Selectable panel
Panel for issues
Don't use a predictable random number generator
private def rand = Random.nextString(6)
Don't use a predictable random number generator
private def rand = Random.nextString(6)
Don't use a predictable random number generator
private def rand = Random.nextString(6)
Group panels as an ordered list
-
For the next steps, we assume that you already have tests and coverage for your project.
-
Select the language you are using and follow the instructions presented on the GitHub repository.
Checklist
- Item available
- Item not available
- Item available
Tables
| One | Two | Three |
|---|---|---|
| Real link | Normal text | Normal text |
| Real link | Normal text | Normal text |
| Real link | Normal text | Normal text |
Table with collapse option
| Project Id | name | status | |||||
|---|---|---|---|---|---|---|---|
| 2036 | onnx | OwnerNotCommiter | More details | ||||
|
|||||||
| 2035 | cpp | Cloned | More details | ||||
|
Table with ordered headers
| header1 | header2 | header3 |
|---|---|---|
| H1Text | H2Text | H3 Text |
| H1 Text Row 2 | H2Text Row 2 | H3 Text Row 2 |
Deltas
1
10
+ 10
You got it right!
Looks like you're ready to start the quality journey.


{% load staticfiles %}
Your username and password didn't match. Please try again.
Your account doesn't have access to this page. To proceed, please login with an account that has access.
Please login to see this page.


3D time-domain acoustic isotropic modelling and linearized modelling demo
The modeling operator is based on a star 1D stencil of order 2,4 or 6. It solves the system in parallel over sources . Source injection and receiver sampling is done via cubic interpolation and exponential damping over a 3x3 square around the source location. The Jacobian is derived by linearizing the discretized system and its forward and adjoint action is calculated via the adjoint-state method.
The basic syntax of the modeling operator is data = Gen_data(m,Q,model,density,anisotropy)|, where
- m is a vector with a gridded slowness-squared model [km^2/s^2],
- Q is a vectorof that defines the source,
- model is a struct with various other parameters,
- data is a vectorized data-cube (receiver x source x time),
- density is the density
- anisotropy are the thompsen parameters
ANISOTROPY IS NOT YET SUPPORTED IN 3D, ONLY ISOTROPIC.
We illustrate the basic modeling capabilities on a simple layered model.
Contents
medium parameterss
o = [0 0 0]; % Origin n = [50 50 50]; % Dimension N = prod(n); d = [15 15 15]; % Grid size v = ones(n)*1.400; % velocity [m/s] v(20:35,:,:) = 2.000; v(36:end,:,:) = 3.000; v = v(:); m=1./v.^2;
Model containing acquisition geometry and modelling parameters
model.o=o; %Origins of the axes [m] model.n=n; %Number of grid points for each dimension (excluding boundaries) model.d=d; model.ddcompx=2; % Domain decomposition x direction model.ddcompy=1; % Domain decomposition y direction model.ddcompz=1; % Domain decomposition z direction model.f0=0.010; % in [kHz] model.xsrc =375; model.zsrc= 10*ones(size(model.xsrc)); %Source coordinates along z axis [m] model.ysrc=375*ones(size(model.xsrc)); model.xrec = 0:15:750; model.zrec=10; %Receivers coordinates along z axis [m] model.yrec=0:30:750; %Receivers coordinates along y axis [m] model.T=1000; %Acquisition duration [ms] model.freesurface=0; % Freesurface ( 0 : no freesurface, 1 : freesurface) model.space_order=2; % Space discretization order (2 or 4 only for now) model.type='full'; model.gppwl = 5; % grid points per wave length (only for anisotropy) parpool(model.ddcompx*model.ddcompy*model.ddcompz); % Open parrallel pool for multiple domains %parpool(model.ddcompx*model.ddcompy*model.ddcompz+1); % Open parrallel pool for multiple domains in non-interactive session (one master + N domains)
Starting parallel pool (parpool) using the 'local' profile ... connected to 2 workers.
Acoustic isotropic modeling
[m1,model1]=Setup_CFL(m,model); model1.NyqT=0:4:model1.T; q=sp_RickerWavelet(model1.f0,1/model1.f0,model1.dt,model1.T); tic; dataT1=Gen_data(m1,model1,q); toc
CFL conditions gives dt = 2.4249ms and d = 14 14 14 m Velocity interpolated on new grid Lab 1: shot = 375 Acoustic isotropic Elapsed time is 32.938270 seconds.
Reshape and display results
dataT1=reshape(dataT1,length(model1.NyqT),length(model1.xrec),length(model1.yrec),length(model1.xsrc)); rec = 1:length(model1.xrec); tt = 1:model1.T/1000; figure(3); imagesc(rec,tt,dataT1(:,:,floor(length(model1.yrec)/2))); caxis([-1 1]);colormap(gray); title('Isotropic, FD in time/space'); xlabel('Receiver No.'); ylabel('TWT [s]')
Born modelling
The basic syntax of the Born modeling operator is du = Born(m,Q,model,din,mode,density,anisotropy)|, A more detailed documentation of the function will be added in a Time imaging section where
- m is a vector with a gridded slowness-squared model [km^2/s^2],
- Q is a vectorof that defines the source,
- model is a struct with various other parameters,
- mode 1 does Born modelling, -1 does RTM ,
- din is the model perturbation for mode=1 and data residual for mode=-1,
- du is a vectorized linearized data-cube (receiver x source x time),
- density is the density
- anisotropy are the thompsen parameters The last two parameters are optional too (elastic born modelling isn't implemented yet)
Smooth model
S = opKron(opSmooth(n(3),20),opSmooth(n(2),20),opSmooth(n(1),20)); %smoothing operator v0=S*v(:); m0=1./v0.^2; % Model perturbations dm=m-m0;
Linearized acoustic isotropic
You need to put dm in the Setup_CFL to project it on the new grid as well
[m1,model1,dm1]=Setup_CFL(m0,model,dm); model1.NyqT=0:4:model1.T; q=sp_RickerWavelet(model1.f0,1/model1.f0,model1.dt,model1.T); du1=Born(m1,model1,q,dm1,1); delete(gcp);
CFL conditions gives dt = 2.4249ms and d = 14 14 14 m Velocity interpolated on new grid Lab 1: J for shot 1 over 1 at position 375 Acoustic isotropic Parallel pool using the 'local' profile is shutting down.
Reshape and display results
du1=reshape(du1,length(model1.NyqT),length(model1.xrec),length(model1.yrec),length(model1.xsrc)); rec = 1:length(model1.xrec); tt = 1:model1.T/1000; figure(4); imagesc(rec,tt,du1(:,:,floor(length(model1.yrec)/2))); caxis([-5 5]*1e-1);colormap(gray); title('Isotropic, FD in time/space'); xlabel('Receiver No.'); ylabel('TWT [s]')


Those who have knowledge don’t predict. Those who predict don’t have knowledge. - Lao Tzu, badly translated
I’d like to share with you all a new perspective on Bayesian prediction that I learned from one of my professors recently. For the full description, check out the paper Martingale Posteriors (2021) by Edwin Fong, Chris Holmes, and Stephen G. Walker (the professor who taught me all this). For a brief introduction to the ideas in the paper, and also some code demonstrations using PyCuda, read along!
In my experience, Bayesian statistics lures people in with the simplicity of it’s paradigm. Every question you could possibly ask about a parameter is answered by its posterior distribution, which always going to pe proportion to the product of its likelihood and your prior expectations about it, elegantly summed up in the equation
\[p(\theta\mid y) \propto p(\theta)p(y\mid\theta).\]This definition of the posterior underlies almost all Bayesian inference, perhaps to Bayesians’ own detriment (I even heard a joke last week from one of my colleagues that “Bayesians are all too preoccupied with their own posteriors”). One major benefit of posterior distributions on parameters is that instead of a simple point estimate and confidence interval, it can fully describe our uncertainty around a parameter. Uncertainty in an estimate of a parameter is property of the posterior distribution which basically tells us how wrong the estimate of the parameter could be and how likely it is to be that wrong.
Where does this uncertainty come from though? I had initially learned that uncertainty is essentially contained in the prior distribution imposed by the statistician. If I know nothing about the value of a parameter besides its range (for instance, \(\theta\in[0,1]\)), I may impose a \(\text{Unif}(0, 1)\) prior on it. But, as the Fong, Holmes, and Walker paper points out, this steps too far away from the true problem. Uncertainty about a parameter isn’t contained in a prior distribution designed to represent a statisticians expectations about it, it’s contained in the size of the sample! A parameter, after all, is a function of the population distribution \(p(y_{1:\infty})\). If we had an infinitely large sample we wouldn’t have any uncertainty about what the value of the parameter is, we could just calculate it with no need to predict or estimate!
This idea about the source of uncertainty is the core of this new paradigm I want to introduce y’all to. The big idea that comes from it is this: Why predict the parameter when instead we could predict the population and calculate the parameter?
Clearly, that won’t be as simple as I’m making it sound, but it could be simpler in practice than the Markov chain Monte Carlo (MCMC) methods out there. The basic procedure for sampling the population is this:
- Sample a new observation from the predictive distribution \(p_n(y) = p(y_{n+1}\mid y_{1:n})\).
- Update the predictive distribution \(p_{n+1}(y) = p(y_{n+2}\mid y_{1:n+1})\).
- Repeat steps 1 and 2 some arbitrarily large number \(N\) times.
- Record \(y_{1:n+N}\) as a new population sample and repeat steps 1-3 again some number \(k\) times.
Now we have \(k\) simulated populations on which we can compute \(k\) possible values of the parameter \(\theta\).
If the distribution of our \(k\) sampled values of \(\theta\) converges the correct posterior distribution, then this method could prove to be much faster to implement and to run than a conventional MCMC routine. First, because it’s easily parallelizable across the \(k\) sampling chains and second, because there’s only one recursive update that needs to be programmed.
Now, using a trivial example, I want to show you that the distribution of \(\theta\)’s does in fact converge to the posterior distribution as well as demonstrate how this kind of sampling can be coded up and run. (If you want a proof, go check out the paper).
The example I’ll use is the same as that Example 1 in the paper. I wrote code to reproduce this example after talking to Stephen Walker about GPU programming and learning that he had recently been working on a sampling routine that lends itself very well to parallelization. This mini-project was actually my one of first exposures to CUDA!
The problem is structured like this:
\[\begin{align*} \theta \sim{}& \text{Normal}(0, 1) \\ y_{1:n}\mid\theta \overset{iid}{\sim}{}& \text{Normal}(\theta, 1). \end{align*}\]Here, \(y\) comes from a normal distribution with a known variance and unknown mean. We assign a standard normal prior on the mean which yields the posterior and posterior predictive distributions:
\[\begin{align*} p(\theta\mid y_{1:n}) ={}& \text{Normal}(\overline{\theta_n}, \overline{\sigma^2_n}) \\ p(y_{n+1}\mid y_{1:n}) ={}& \text{Normal}(\overline{\theta_n}, \overline{\sigma^2_n} + 1) \end{align*}\]where
\[\overline{\theta_n} = \frac{\sum_{i=1}^ny_i}{n+1}\text{ and }\overline{\sigma^2_n} = \frac{1}{n+1}.\]Now, lets write some code to implement predictive resampling in parallel on a GPU and compare the resulting distribution of \(\theta\) to its posterior. In CUDA, the global kernel function will look as follows:
#include <curand_kernel.h>
extern "C"
{
__global__ void resampler(float *dest, int *iparams, float *fparams, curandState *global_state)
{
/* Set chain parameters */
const int idx = blockDim.x * blockIdx.x + threadIdx.x;
const int m = threadIdx.x;
const int n_iter = iparams[0];
/* Set sampling parameters */
float theta = fparams[0];
float n = fparams[1];
/* Initialize local_state */
curandState local_state = global_state[m];
curand_init(idx, idx, idx, &local_state);
/* Open sampling loop */
for (int iter = 0; iter < n_iter; iter++)
{
/* Draw y */
float y = theta + curand_normal(&local_state) / sqrt(1 + 1 / (n + 1));
/* Update params */
theta = (theta * (n + 1) + y) / (n + 2);
n = n + 1;
/* Record estimate of theta */
dest[(idx) * n_iter + iter] = theta;
/* Update local state */
global_state[m] = local_state;
}
}
}
Here, we have a function which takes as arguments a destination array (for copying results), an array of integer parameters (for \(N\)), an array of floating point parameters (for and initial estimate of \(\theta\) and sample size \(n\) (which is type-cast as a floating point to preempt division issues)), and a global random state for random variate generation. In the sampling loop, it draws a new observation \(y\) given the estimate of the mean \(\theta\) conditioned on all the previously sampled values of \(y\), then updates \(\theta\) with this new value of \(y\) and records it in the destination. This updating process is repeated \(N\) times for each thread opened by the GPU.
To run this code, I decided to compile it with PyCUDA since I wasn’t yet ready to work with the explicit memory allocation required in CUDA. In PyCUDA, I could simply save the above code as a string in Python and pass it to PyCUDA’s SourceModule
function. I’ll include all the Python code at the end of this post.
Using a true value of \(\theta = 2\) I ran the above kernel \(k = 4096\) times with each thread simulating \(N = 1000\) unobserved values of \(y\) into the future. Thanks to GPU parallelization, several hundred and possibly thousands of these threads were able to run concurrently (I’m still learning about CUDA’s scheduling protocol to learn exactly how many threads are running at once). The compilation of the CUDA kernel took 1.8 seconds, but the actual simulation of 4,096,000 possible unobserved \(y\) values took 0.025 seconds. The plot below shows the sampling trajectories of each of the 4096 \(\theta\)’s and the distribution of \(\theta\) values at the 1000th predictive resample. The true posterior is included in dashed black.
Here, y-axis represents the estimated values of \(\theta\) and the x-axis for the left hand side shows the number of unobserved values simulated. The x-axis for the right hand side is simple a density measure.
Now, clearly this is a very simple example and you may not believe me that, in general, this practice will always give you samples from the posterior at a large enough \(N\). As I said before, check the paper for a formal proof (and find out why they call them “Martingale posteriors”!).
All I wanted to show here was how efficiently – and honestly how simply – these recursive predictive updates can be implemented. In this example, there was still a heavy focus on the prior and posterior distributions of \(\theta\), but in my next post I plan to show you how we can generalize this approach into a nonparametric predictive resampling regime by using a special family of distributions called “copulas”, and of course there will be another code demo. I know today’s demo was a much less descriptive than it should have been, but I’ve been super slow getting this post out and I figured I’d just rip off the bandaid and post it the way it is before it ends up in the backlog for a year. Leave a comment for me below if you want me to make the code more clear for you, or if you think I should focus more on the code than the math next time around!
Anyway, I’ll see you next time for more predictive Bayes.
Thank you,
Blake


Classification is the numerical designation (I, II, or III) that is assigned by FDA to a particular product recall that indicates the relative degree of health hazard.
Class I = Dangerous or defective products that predictably could cause serious health problems or death. Examples include: food found to contain botulinum toxin, food with undeclared allergens, a label mix-up on a lifesaving drug, or a defective artificial heart valve.
Class II = Products that might cause a temporary health problem, or pose only a slight threat of a serious nature. Example: a drug that is under-strength but that is not used to treat life-threatening situations.
Class III = Products that are unlikely to cause any adverse health reaction, but that violate FDA labeling or manufacturing laws. Examples include: a minor container defect and lack of English labeling in a retail food.


*** User 2017-04-20 14:15:40.319 ***
14:15:40.319 [info] Disabling blocking sync...
*** User 2017-04-20 14:15:40.322 ***
14:15:40.322 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-1@antoine-PC'
*** User 2017-04-20 14:15:41.648 ***
14:15:41.648 [info] Enabling membership...
*** User 2017-04-20 14:15:41.649 ***
14:15:41.649 [info] Disabling blocking sync...
*** User 2017-04-20 14:15:41.652 ***
14:15:41.652 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-2@antoine-PC'
*** User 2017-04-20 14:15:42.984 ***
14:15:42.984 [info] Enabling membership...
*** User 2017-04-20 14:15:42.985 ***
14:15:42.985 [info] Disabling blocking sync...
*** User 2017-04-20 14:15:42.988 ***
14:15:42.988 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-3@antoine-PC'
*** User 2017-04-20 14:15:43.152 ***
Joining node: 'node-3@antoine-PC' to 'runner@antoine-PC' at port 39724
*** User 2017-04-20 14:15:43.153 ***
Joining issued: 'node-3@antoine-PC' to 'runner@antoine-PC' at port 39724
*** User 2017-04-20 14:15:43.153 ***
Joining node: 'node-2@antoine-PC' to 'runner@antoine-PC' at port 50813
*** User 2017-04-20 14:15:43.153 ***
Joining issued: 'node-2@antoine-PC' to 'runner@antoine-PC' at port 50813
*** User 2017-04-20 14:15:43.153 ***
Joining node: 'node-1@antoine-PC' to 'runner@antoine-PC' at port 52563
*** User 2017-04-20 14:15:43.154 ***
Joining issued: 'node-1@antoine-PC' to 'runner@antoine-PC' at port 52563
*** User 2017-04-20 14:15:43.214 ***
Waiting for join to complete with manager: partisan_default_peer_service_manager
*** User 2017-04-20 14:15:43.215 ***
Finished.
*** CT 2017-04-20 14:15:43.215 *** COVER INFO
Adding nodes to cover test: ['runner@antoine-PC']
*** CT 2017-04-20 14:15:43.220 *** COVER INFO
Successfully added nodes to cover test: []
*** User 2017-04-20 14:15:51.239 ***
Case finished: filter_test
*** User 2017-04-20 14:15:58.268 ***
14:15:58.267 [info] Application lasp exited with reason: stopped
*** User 2017-04-20 14:15:58.268 ***
14:15:58.268 [info] Application partisan exited with reason: stopped
=== Ended at 2017-04-20 14:15:58
=== successfully completed test case
=== Returned value: ok
Test run history
| Top level test index


Inheritance diagram for pysvg.builders:
(C) 2008, 2009 Kerim Mansour For licensing information please refer to license.txt
Helper class that creates commonly used objects and shapes with predefined styles and few but often used parameters. Used to avoid more complex coding for common tasks.
Method used to convert an array of tuples (x,y) into a string suitable for createPolygon or createPolyline @type arrayOfPointTuples: An array containing tuples eg.[(x1,y1),(x2,y2] @param arrayOfPointTuples: All points needed to create the shape @return a string in the form “x1,y1 x2,y2 x3,y3”
Creates a circle @type cx: string or int @param cx: starting x-coordinate @type cy: string or int @param cy: starting y-coordinate @type r: string or int @param r: radius @type strokewidth: string or int @param strokewidth: width of the pen used to draw @type stroke: string (either css constants like “black” or numerical values like “#FFFFFF”) @param stroke: color with which to draw the outer limits @type fill: string (either css constants like “black” or numerical values like “#FFFFFF”) @param fill: color with which to fill the element (default: no filling) @return: a circle object
Creates an ellipse @type cx: string or int @param cx: starting x-coordinate @type cy: string or int @param cy: starting y-coordinate @type rx: string or int @param rx: radius in x direction @type ry: string or int @param ry: radius in y direction @type strokewidth: string or int @param strokewidth: width of the pen used to draw @type stroke: string (either css constants like “black” or numerical values like “#FFFFFF”) @param stroke: color with which to draw the outer limits @type fill: string (either css constants like “black” or numerical values like “#FFFFFF”) @param fill: color with which to fill the element (default: no filling) @return: an ellipse object
Creates a line @type x1: string or int @param x1: starting x-coordinate @type y1: string or int @param y1: starting y-coordinate @type x2: string or int @param x2: ending x-coordinate @type y2: string or int @param y2: ending y-coordinate @type strokewidth: string or int @param strokewidth: width of the pen used to draw @type stroke: string (either css constants like “black” or numerical values like “#FFFFFF”) @param stroke: color with which to draw the outer limits @return: a line object
Creates a Polygon @type points: string in the form “x1,y1 x2,y2 x3,y3” @param points: all points relevant to the polygon @type strokewidth: string or int @param strokewidth: width of the pen used to draw @type stroke: string (either css constants like “black” or numerical values like “#FFFFFF”) @param stroke: color with which to draw the outer limits @type fill: string (either css constants like “black” or numerical values like “#FFFFFF”) @param fill: color with which to fill the element (default: no filling) @return: a polygon object
Creates a Polyline @type points: string in the form “x1,y1 x2,y2 x3,y3” @param points: all points relevant to the polygon @type strokewidth: string or int @param strokewidth: width of the pen used to draw @type stroke: string (either css constants like “black” or numerical values like “#FFFFFF”) @param stroke: color with which to draw the outer limits @return: a polyline object
Creates a Rectangle @type x: string or int @param x: starting x-coordinate @type y: string or int @param y: starting y-coordinate @type width: string or int @param width: width of the rectangle @type height: string or int @param height: height of the rectangle @type rx: string or int @param rx: For rounded rectangles, the x-axis radius of the ellipse used to round off the corners of the rectangle. @type ry: string or int @param ry: For rounded rectangles, the y-axis radius of the ellipse used to round off the corners of the rectangle. @type strokewidth: string or int @param strokewidth: width of the pen used to draw @type stroke: string (either css constants like “black” or numerical values like “#FFFFFF”) @param stroke: color with which to draw the outer limits @type fill: string (either css constants like “black” or numerical values like “#FFFFFF”) @param fill: color with which to fill the element (default: no filling) @return: a rect object
Class to create a style string for those not familiar with svg attribute names. How to use it: 1) create an instance of StyleBuilder (builder=....) 2) set the attributes you want to have 3) create the shape (element) you want 4) call set_style on the element with “builder.getStyle()” as parameter
Class to create a transform string for those not familiar with svg attribute names. How to use it: 1) create an instance of TransformBuilder (builder=....) 2) set the attributes you want to have 3) create the shape (element) you want 4) call set_transform on the element with “builder.getTransform()” as parameter


In order to avoid misconfiguration (or configuration that does not have an effect), the unblu server validates its configuration against the configuration schema.
This document describes how configuration validation works and how it can be configured, if required.
If configuration validation is not specially configured, it behaves as follows.
When starting, the unblu server validates the given configuration against its inherent configuration schema and logs errors (if the configuration is not valid) and warning messages (if the configuration is not recommended) to the log file. (See Unblu Server Logging.)
If one or more errors are detected, the unblu server will refuse to start up and will deliver 503 responses with status text CONFIGURATION_PROBLEM for all requests.
Configuration validation performs the following validations
Unblu configuration validation is configurable. The table below shows the most important configuration settings:
|
KEY |
TYPE |
DEFAULT VALUE |
DESCRIPTION |
|---|---|---|---|
|
com.unblu.configuration.validation.severityUndefinedKey |
severity |
ERROR |
Severity for use of a configuration property that is not defined. |
|
com.unblu.configuration.validation.severityInternalKeyUntrusted |
severity |
WARNING |
Severity for using internal properties. Possible values are: ERROR, WARNING, IGNORE. |
|
com.unblu.configuration.validation.exitOnError |
boolean |
false |
Whether or not unblu should call System.exit if the configuration is not valid. (Not recommended if using in an application server!) |
|
com.unblu.configuration.validation.failOnError |
boolean |
true |
Whether or not unblu should deliver 503 responses if configuration is not valid. |
|
com.unblu.configuration.validation.enabled |
boolean |
false |
Enable/disable configuration validation. |


Opinionated guidelines for large nx angular projects
About this article
This article contains a set of opinionated guidelines when it comes to building monorepos with Nx. I wrote this article because when I used Nx in the beginning, I struggled a lot with how to structure my workspace, and I’ve hit quite a few walls. That being said, I’ve been using it for a while now, and I finally have the feeling that I’ve reached a structure where I feel comfortable with.
A word about Nx
Nx is a thin layer on top of the Angular CLI that helps us with structuring large applications in the form of monorepos. A monorepo contains only one Nx workspace that can contain multiple apps and multiple libs (we will refer to apps and libs as Nx projects). An app is a deployable unit and a lib is meant to contain the actual logic that can be shared across the workspace. Nx is actively being developed and updated along with Angular by the amazing people of Nrwl.
Nx is especially valuable when managing big Angular applications that have a lot of shared functionality, but even in smaller projects it can help organize your approach.
At StrongBrew we are using this technology for a bunch of our clients and even though Nx is already pretty opinionated, I decided to write down some best practices and guidelines that I try to take in consideration.
The rules and guidelines written down in this article might work for you, and should in no circumstances be treated as the ultimate truth. Best practices and guidelines are mostly a matter of perception and personal preference. Nevertheless, I would love to share how I architect large Angular applications with Nx.
Barrel files
When it comes to managing monorepos, barrel files are quite important.
A barrel file is a index.ts
file that lives in the src
directory of every Nx lib and is meant to expose logic to the rest of the workspace.
This file is really important when you understand one of the big potential risks of organizing code in monorepos - overexposure of implementation details.
With code being located right next to each other, it can be easy to import code with deeply nested relative paths and include things that the original author of the code never intended to be used outside of their specific context.
The Nx lib’s index.ts
file allows each lib to define its effective public API - only symbols which are explicitly exported from this file should be eligible for consumption in other parts of the workspace.
Let’s say that we have a @strongbrew/users
lib which exposes a UserService
…
This is what the barrel file from @strongbrew/users
might look like.
// libs/users/src/index.ts
export * from './lib/services/user.service';
Although this might seem pretty straight forward, let’s go over a few best-practices…
Don’t ever import a lib from a relative path
When we want to import UserService
inside another lib or app, we want to import it from @strongbrew/users
. This is way cleaner then importing it from a relative path like ../../../users/lib/src/index.ts
and helps protect us from the overexposure problem described above. Nx also provides a linting rule out of the box to make sure that you are respecting a lib’s API and not doing deep imports.
Nx uses TypeScript path mapping to map these module names to the correct barrel files.
"paths": {
"@strongbrew/users": {
"libs/users/src/index.ts"
}
}
Only 1 barrel file per lib
It’s a known fact that barrel files might become big, but it gives us a central place of handling all the exports + it drastically reduces the chance of getting circular reference errors. Therefore, a lib should only contain 1 single barrel file.
Never let a lib import from its own Barrel file
The TypeScript modules within a particular lib should not care what functionality that lib exposes, so it shouldn’t use its own barrel file at any point.
If a module imports something from its own barrel file, it almost always results in circular reference errors. Therefore, imports from inside of the module should use relative path imports.
Structuring the workspace
When using Nx, we might already get pushed in an opinionated way of working, which is great. But how are we going to structure the workspace itself? For instance, looking into a directory of 100 libs inside of a libs directory might not really be pragmatic to work with…
Structuring apps
An app should be an empty shell
Apps are deployable units that wire the different pieces of an application together. These apps are nearly empty shells that use libs to build an entire application. Therefore an app holds almost no logic and mostly uses lazy loading to load feature libs. Some feature libs can be seen as microfrontends. That being said, our apps mostly not completely empty. In general they also contain:
- The general layout (composed out of components from ‘ui-kit’)
- Routing
Keep the apps directory as flat as possible
Chances are small that our monorepo will contain 100+ apps and even if it does, chances are small that we can divide these apps into categories.
Apps should not import from other apps
Although it might seem obvious, let’s mention it anyway… Shared logic should always live inside of libs, an not inside of apps. Apps are specific deployment targets.
Structuring libs
Here comes the opinionated part, lets check how we can structure the libs inside of our workspace.
The directory structure of our workspace might look like this:
apps
libs
feature
api
foo
- …
lazy
bar
- …
shared
baz
- …
ui-kit
utils
- A feature contains logic specific to a certain domain, like managing users or performing authentication.
- On the other hand, the
utils
lib contains logic that doesn’t have anything to do with any domain, E.g: HTTP interceptors, shared RxJS operators, a service that handles notifications etc… Consider it a toolkit for your workspace.
In the next few sections we are going to cover the 3 types of feature libs, the ui-kit
lib and the utils
lib.
feature/api
This directory contains Nx libs with a very specific purpose:
- These libs contain api logic or business logic that needs to be shared.
- These libs contain the types of the REST responses. Let’s call them domain types.
- If we want to work with models, or dto’s, these would also live here.
Having a specific api lib is very handy when developing in a microservices platform. Every microservice would have its own api lib that can be used throughout the entire monorepo.
Another common use-case is that feature libs tend to use domain types from other feature libs. By extracting these domain types in to api libs, we solve that problem. That way, these domain types can be shared across different places inside of the monorepo.
feature/lazy
This directory contains all feature libs that can be lazyloaded. To make sure these libs can be lazy-loaded, they should expose an NgModule
in the barrel file and are loaded as such:
RouterModule.forRoot([
{
path: 'users',
loadChildren: '@strongbrew/feature/lazy/users'
}
])
One of the advantages is that these modules can be loaded on demand or even preloaded upfront. The biggest advantage though is that these modules are completely standalone, and don’t share anything with the rest of the workspace. This means they have nothing inside of their barrel file, other then the NgModule
being exported.
Lazy loaded modules can never share logic with the workspace
If we feel that a lazyloaded module needs to export something, we should extract that logic into a separate feature/shared
or feature/api
lib.
When a feature/lazy
module needs to perform XHR calls it should delegate it to a feature/api
lib. Therefore a feature/lazy
lib should never contain api logic.
When using a statemanagement library like ngrx/store, feature/lazy
libs would contain their own reducers and use store.forFeature()
to attach these to the store
instance. This would result in lazy-loaded reducers.
feature/shared
Not every feature can be lazyloaded. Think about feature logic that needs to be shared for instance. In that case we would create an Nx lib that lives inside of the feature/shared
directory.
When a feature/shared
module needs to perform XHR calls it should delegate it to a feature/api
lib. Therefore the feature/lazy
lib should not contain api logic.
ui-kit
This lib contains all the shared presentational components that can be used in different applications. Think about dropdowns, datepickers and empty modals. A user-detail
component for instance does NOT belong here. A monorepo can contain multiple ui-kit
libraries. We should name them according to its purpose. E.g ui-kit-mobile
is a common use case.
The Ui-kit module contains an ngModule
since we need it to declare and export our components/directives. The barrel file generally only exposes the ngModule
since this is the vessel used to export the functionality.
However, a ui-kit
might also export certain types in its barrel file… Like DatepickerConfiguration
or other ui-kit
specific types.
utils
This lib can contain all kinds of utilities. It could contain shared interceptors, guards, services and custom RxJS operators. Think about it als a framework toolbox that could benefit any application. We will NOT use an ngModule
here for tree-shaking purposes.
A utils
lib will not contain any components. But if it contains pipes or directives we might need an ngModule
for that.
When your workspace is small, one single utils
lib might suffice, but it could become a good idea to split these up when the utils
lib gets to big.
After splitting up, the directory structure of our workspace might look like this:
apps
libs
feature
api
foo
- …
lazy
bar
- …
shared
baz
- …
ui-kit
utils
rxjs-operators
forms
http
Do note, that the forms
lib would not contain any forms or forms configuration, but it would contain general form logic that can be shared across the workspace.
Prefixing libs
Because of the fact that selector
names for components and directives should be unique, prefixing them in a monorepo is quite important.
Since every project in the angular.json
file has a prefix
property, we could set that prefix for every project.
Let’s assume that we need a feature/shared
lib called messages
then we could generate that lib by running ng g lib messages --prefix sh-mes
for instance.
sh-mes
would be the prefix and if we create a message component in this lib it would have the selector: sh-mes-message
.
Linting and tags
One thing that is absolutely critical when managing a monorepo is being able to determine, categorize, and constrain/run commands based on a dependency graph.
Nx determines the dependency graph for us out of the box, it infers it by statically analyzing our TypeScript import and export statements (as well as a few other things specific to the Angular CLI).
It has no way of automatically categorizing the dependency graph for it, because that is up to our subjective judgement, but it does provide helpers to make it easy.
Nx provides us with the ability to add tags to the different libs and apps and apply tslint rules to make sure we can’t import whatever we want wherever we want. Nx provides us with the ability to add tags to the different libs and apps and apply tslint rules to make sure we can’t import whatever we want wherever we want (potentially leading to circular references and other problems (broken lazyloading, etc…)).
Tags can be added to projects in the nx.json
file of the root directory.
Tags can be determined in numerous ways. Some of us might like a tag per team, other might like it per domain.
I like to have tags for every lib type. It might be opinionated but it works fine for me (again, that’s a matter of personal preference)
We define 5 types of tags:
app
: This tag is added to all the appsshared
: This tag is added touikit
andutils
libsfeature:lazy
: This tag is added tofeature/lazy
libsfeature:shared
: This tag is added tofeature/shared
libsfeature:api
: This tag is added tofeature/api
libs
The rules could be the same for every workspace that we will create in the future:
- Projects with the type
tag
can only depend on projects with the tags:shared
orfeature:shared
. - Projects with the type
shared
can only depend on projects with the tags:shared
(we don’t want to import domain specific logic in there do we?) - Projects with the type
feature:lazy
can only depend on projects with the tags:shared
,feature:shared
andfeature:api
. - Projects with the type:
feature:shared
can only depend on projects with the tags:shared
andfeature:api
. - Projects with the type:
feature:api
can only depend on projects with the tags:feature:api
andshared
. (we never want to loadfeature:shared
into an feature/api lib right?)
Configuring tslint
To configure the tslint we have to use the nx-enforce-module-boundaries
rule from tslint. If you like the rules defined above, you can just copy-paste the module boundaries defined below right in your tslint.json
file that lives in the root directory.
"nx-enforce-module-boundaries": [
true,
{
"allow": [],
"depConstraints": [
{
"sourceTag": "app",
"onlyDependOnLibsWithTags": ["shared", "feature:shared"]
},
{
"sourceTag": "shared",
"onlyDependOnLibsWithTags": ["shared"]
},
{
"sourceTag": "feature:lazy",
"onlyDependOnLibsWithTags": [
"shared",
"feature:shared",
"feature:api"
]
},
{
"sourceTag": "feature:api",
"onlyDependOnLibsWithTags": ["feature:api", "shared"]
},
{
"sourceTag": "feature:shared",
"onlyDependOnLibsWithTags": ["shared", "feature:api"]
}
]
}
]
This tslint config will ensure that the rules defined above are mandatory.
Is this structure the only way?
No, not at all, this would work perfectly for a monorepo with 5 applications. But if we are thinking about organisation wide monorepos, it might be a good idea to combine features app per app. In that case we would have something like:
apps
libs
app1
api
foo
- …
lazy
bar
- …
shared
baz
- …
app2
api
foo
- …
lazy
bar
- …
shared
baz
- …
ui-kit
utils
rxjs-operators
forms
http
How to share code organisation wide?
Although an organisation wide monorepo has great benefits, they might be good reasons not to do it. These could be any combination of technical, cultural, legal or other reasons.
Scenario A
Our company has 10 angular projects that are actively developed and share a lot of code, but also had 5 legacy projects where there is no budget to bump them to the new Angular versions and so on. There might be a few Vue.js or React living there as well. It might be more trouble than it is worth for your organization to manage that complexity within one big workspace. In that case we could have a workspace for the non-legacy angular projects, and that workspace would gladly welcome new projects in the future.
Scenario B
Our company sells custom software to different clients. Every client wants its own custom look and feel, which a lot of custom logic, but we don’t want to reinvent the wheel every time.
In that case, we could create an Nx worspace for every client, and have one common toolkit that contains shared logic. That toolkit would live in its own monorepo and be published as an Angular package.
Conclusion
I hope we learned something today. How we structure our workspaces is completely up to us, and we should use something that works for us, not just pick whatever you read in some blog article ;-). If this structure doesn’t make sense to you, that’s perfectly fine… And I would love to hear your thoughts about this approach.
Special thanks to
Thanks to the people that have reviewed the article and gave great input! I couldn’t have done it without you!


All notes were taken out of lecture slides as well as the textbook. I've written a brief summary of each topic:
Altruism is prosocial behavior that benefits others who are suffering without regard to consequences for oneself, often at a personal cost. There are three types of altruistic behavior: social reward-- being praised by others, personal distress-- help others to reduce their own distress, and empathy-- identifying with someone.
Casual attribution is the process individuals used to explain his/her own and others’ behavior by linking an event to a cause. They are likely to infer that a personality trait is responsible for a behavior. However, these explanations can lead to consequences; for example, attributing a rejection from an internship could lead to a lack of ability leads to unhappiness and withdrawal.
Compliance is responding favorably to an explicit request by another person. “door in the face” compliance approach that involves asking for a first favor that is large and unreasonable, followed by a request for a smaller favor, since it’s seen as a concession. Foot-in-the-door technique is compliance that involves an initial small request that most people comply with, following up with larger request involving real behavior of interest
Culture can often influence thought and norms. In independent cultures, people tend to think of themselves as distinct social entities, tied to each other by voluntary bonds. In interdependent (collectivistic) cultures, people are more likely to define themselves as part of a collective, placing less importance on individual freedom or personal control over their lives. East Asian cultures are more interdependent whereas the West encourages more independent cultures.
Effort Justification is one of the paradigms of Cognitive dissonance. Many times we engage in a lot of effort for something but it may look disappointing. In other words, the more efforts and sacrifices someone puts in to pursue a goal, the more attractive the goal seems.
On the topic of attraction, emotional attribution is the theory that nature of arousal can be misattributed to another emotion, so the emotion can be diminished, enhanced, or changed. Both positive and negative emotions can be attributed. The attachment theory states that there are three types of attachment styles, which are formed by how their parents gave attention to them.
Sense of Self is defined as the way a person views his or her traits and beliefs. It covers both the 'inner' and 'outer' self. A sense of self refers to the self being a social entity that is forged largely through interactions with others
There are two types of social norms: the descriptive norm, which is behavior exhibited by most people in a given context, and the prescriptive (injunctive) norm, which is the way a person is supposed to behave in a given context. Conformity is changing one’s behavior or beliefs in response to some real or perceived pressure from others, sometimes to follow a social norm.
Works Cited
The pictures were taken off the internet. They are as follow:
compliance: https://depositphotos.com/vector-images/regulatory-compliance.html
cover: https://gohighbrow.com/portfolio/most-brilliant-social-psychology-experiments/
altruism: https://www.istockphoto.com/illustrations/welfare-trash
attribution: https://www.thoughtco.com/attribution-theory-4174631
culture and thought:
https://blog.usejournal.com/culture-language-and-behaviour-my-linguistic-journey-in-the-us-15275ec4f1cd?gi=f5ea189b1a71
effort_justification: https://www.vecteezy.com/free-vector/effort
emotional misattribution: https://www.freevector.com/vector/suspension-bridge
sense of self: https://www.123rf.com/clipart-vector/self.html?sti=o9wj4fi360vmao0g4i|
social norms: https://www.shutterstock.com/search/conformity


|
Create board diagrams
with JavaScript
|
Create hexagonal board diagrams
with JavaScript
|
|
Create stack and pile game diagrams
with JavaScript
|
A set of Java classes to facilitate the
creation of abstract game playing applets
|
|
A physical set to play abstract games
|
A set of postscript routines to
draw diagrams
|
|
(Lisboa 2004)
|
(Aveiro 2006)
|
|
(Évora 2007)
|
(Braga 2008)
|
|
(Covilhã 2009)
|
(Santarém 2010)
|
|
(Lisboa 2011)
|
(Coimbra 2012)
|
|
(Évora 2013)
|
(Fundão 2014)
|
|
(Vila Real 2015)
|
(Beja 2016)
|
|
(Guimarães 2017)
|
(Torres Vedras 2018)
|
|
(Maia 2019)
|
|


Question 9 of 10
Achieving goals & objectives
You attend college one day a week as part of your apprenticeship.
The day after, you will be working on a job in a remote place, a 2 hour drive away.
To get to the site on time, the Supervisor calls you and offers you a lift to the site.
They are able to pick you up at 5am.
You have worked hard at college today, so you are worried about being tired and getting up early the next day.
Choose your approach
Please select an option from the choices above before continuing.


In your project's .yarnrc
or .npmrc
file, add the following entry:
registry=http://engci-maven-master.cisco.com/artifactory/api/npm/collab-ui-npm-group
Install the packages with yarn add
. By default, yarn installs packages to node_modules/.
yarn add collab-ui
(for Angular 2+)
yarn add @collab-ui/angular
(for ReactJS)
yarn add collab-ui-react
(for Angular 1.X)
yarn add collab-ui-ng
(for Angular Formly)
yarn add collab-ui-formly


Thank you! Your order has been successfully placed.
Order Summary
SunglassesBlack
1x$19
$19
BackpackBlue
1x$23
$23
Leather JacketBrown
1x$33
$33
Sports ShoesWhite
1x$24
$24
Accept Hosted
Payment Details
Order Summary
SunglassesBlack
1x$19
$19
BackpackBlue
1x$23
$23
Leather JacketBrown
1x$33
$33
Sports ShoesWhite
1x$24
$24
Thank You!
Your order has been placed successfully.
Total Price : $99
Order ID :123445677
Order Date :March 7, 2014
Accept Customer
Thank you! Your order has been successfully placed.
Use the existing customer profile ID, which is provided in the sample application documentation.
(or)
Create new customer profile ID using Dev Center by calling CreateCustomerProfile API with default Sandbox login credentials.
(or)
Create new customer profile ID using Dev Center by calling CreateCustomerProfile API with developer owned(existing or create new) Sandbox login credentials.


Profile
Friends
Additional Information
Victor's profile
Name: Victor Alexiev
Birthday: August 6
th
, 1984
Occupation: developer
Area of Occupation: IT


or
while let Some(mut b) = iter.next_box()?
fn next_box(&mut self) -> Result<Option<BMFFBox<T>>> {
let r = read_box_header(self.src);
match r {
Ok(h) => Ok(Some(BMFFBox {
head: h,
content: self.src.take(h.size - h.offset),
})),
Err(Error::UnexpectedEOF) => Ok(None),
Err(e) => Err(e),
}
}
Warning is triggered by feeding the program a file that will trigger the Unexpected EoF case.
==7202== Conditional jump or move depends on uninitialised value(s)
==7202== at 0x125292: read_audio_sample_entry<mp4parse::BMFFBox<mp4parse::BMFFBox<mp4parse::BMFFBox<mp4parse::BMFFBox<mp4parse::BMFFBox<mp4parse::BMFFBox<std::fs::File>>>>>>> (lib.rs:2067)
==7202== by 0x125292: mp4parse::read_stsd (lib.rs:2155)
==7202== by 0x113A5F: read_stbl<mp4parse::BMFFBox<mp4parse::BMFFBox<mp4parse::BMFFBox<mp4parse::BMFFBox<std::fs::File>>>>> (lib.rs:965)
==7202== by 0x113A5F: mp4parse::read_minf (lib.rs:952)
==7202== by 0x119DC2: read_mdia<mp4parse::BMFFBox<mp4parse::BMFFBox<std::fs::File>>> (lib.rs:940)
==7202== by 0x119DC2: read_trak<mp4parse::BMFFBox<std::fs::File>> (lib.rs:859)
==7202== by 0x119DC2: mp4parse::read_moov (lib.rs:763)
==7202== by 0x127577: read_mp4<std::fs::File> (lib.rs:718)
==7202== by 0x127577: mp4ParseCaller::main (main.rs:16)
...
==7202== Uninitialised value was created by a stack allocation
==7202== at 0x11ECDA: mp4parse::read_stsd (lib.rs:2144)
How do we fix this? Is this an unsafe scenario that could happen in other Rust code?
Problem only seems to happen in release with following cargo config:
[profile.release]
panic = "abort"
codegen-units = 1
debug = true # Do not need this, but helps debug
Faulting:
CMP R8B,0x2
JC LAB_0011d2f5 <-- Valgrind halts here
CMP qword ptr [local_4d8 + RSP],0x3
JNZ LAB_0011d2f5
CMP qword ptr [local_450 + RSP],0x0
JZ LAB_0011d2f5
Apparent non-faulting counterpart:
CMP qword ptr [RSP + local_688],0x0
MOV R13B,byte ptr [local_519 + RSP]
JZ LAB_00113a85
CMP R9,0x3
JNZ LAB_00113a85
CMP BL,0x2
JC LAB_00113a85
Optimisations can be done based on:
Reading uninitialised memory is safe provided doing so is not observed.
If A is always false when B is uninitialised
if(A && B) foo();
is equivalent to
if(B && A) foo();
Sadly, this is very hard (impossible?) for Valgrind to detect and know is safe. The problem has been reported to:
This remains an open problem for Valgrind.
Best approach we have at this time is verify the false positive and suppress the warning.
Which is kinda unsatisfying, but it is what it is.


new file
new folder
copy files
close
Make a new file
Make a file named:
go
show copy menu
Choose a file or folder from:
load
clear selection
close
Make a new folder
Make a folder named:
go


UTSAV
KIDSONX TECH
Thank You.
You will get an E-mail confirmation of your registration, with further instructions.


Emotion Recognition in the Entertainment industry
Quick View
Detailed View
Manage
Location
event
Location
Movie
Emotion
Angry
Fear
Sad
Disgust
Happy
Surprise
Neutral
FROM:
TO:
Sad
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


This page documents the experimental HTML5 fork of HTML Tidy available at https://github.com/w3c/tidy-html5.
File bug reports and enhancement requests at https://github.com/w3c/tidy-html5/issues.
The W3C public mailing list for HTML Tidy discussion is<EMAIL_ADDRESS>(list archive).
For more information on HTML5:
Validate your HTML documents using the W3C Nu Markup Validator.
Tidy corrects and cleans up HTML content by fixing markup errors. Here are a few examples:

subheading

…is converted to:

subheading

here is a para bold bold italic bold? normal?
…is converted to:

here is a para bold bold italic bold? normal?

heading
subheading

…is converted to:

heading

subheading
…and

italic heading

…is converted to:

italic heading

heading

new paragraph bold text
some more bold text
…is converted to:

heading

new paragraph bold text
some more bold text

heading

sub
heading

…is converted to:

heading

sub

heading

References
…is converted to:
References

1st list item
2nd list item
…is converted to:

1st list item

2nd list item

Tidy inserts quotation marks around all attribute values for you. It can also detect when you have forgotten the closing quotation mark, although this is something you will have to fix yourself.
Tidy has a comprehensive knowledge of the attributes defined in HTML5. That often allows you to spot where you have mis-typed an attribute.
This is something you then have to fix yourself as Tidy cannot determine where the ">" was meant to be inserted.
This is the syntax for invoking Tidy from the command line:
tidy [[options] filename]*
Tidy defaults to reading from standard input, so if you run Tidy without
specifying the filename
argument, it will just sit
there waiting for input to read.
And Tidy defaults to writing to standard output. So you can pipe output
from Tidy to other programs, as well as pipe output from other programs to
Tidy. You can page through the output from Tidy by piping it to a pager:
tidy file.html | less
To have Tidy write its output to a file instead, either use the
-o filename
or -output filename
option, or redirect standard output to the file; for example:
tidy -o output.html index.html tidy index.html > output.html
Both of those run tidy on the file index.html and write the output to the file output.html, while writing any error messages to standard error.
Tidy defaults to writing its error messages to standard error (that is, to the console where you’re running Tidy). To page through the error messages, along with the output, redirect standard error to standard output, and pipe it to your pager:
tidy index.html 2>&1 | less
To have Tidy write the errors to a file instead, either use the
-f filename
or -file filename
option, or redirect standard error to a file:
tidy -o output.html -f errs.txt index.html tidy index.html > output.html 2> errs.txt
Both of those run tidy on the file index.html and write the output to the file output.html, while writing any error messages to the file errs.txt.
Writing the error messages to a file is especially useful if the file you are checking has many errors; reading them from a file instead of the console or pager can make it easier to review them.
You can use the or -m
or -modify
option to
modify (in-place) the contents of the input file you are checking; that is,
to overwrite those contents with the output from Tidy. Example:
tidy -f errs.txt -m index.html
That runs tidy on the file index.html, modifying it in place and writing the error messages to the file errs.txt.
Caution: If you use the -m option, you should first save a copy of your file.
To get a list of available options, use:
tidy -help
To get a list of all configuration settings, use:
tidy -help-config
To read the help output a page at time, pipe it to a pager:
tidy -help | less tidy -help-config | less
Single-letter options other than -f may be combined; for example:
tidy -f errs.txt -imu foo.html
The most convenient way to configure Tidy is by using separate
config file.
Assuming you have created a
Tidy config file named config.txt (the name doesn't matter), you can
instruct Tidy to use it via the command line option
-config config.txt
; for example:
tidy -config config.txt file1.html file2.html
Alternatively, you can name the default config file via the environment variable named HTML_TIDY, the value of which is the absolute path for the config file.
You can also set config options on the command line by preceding
the name of the option immediately (no intervening space) with the string "--
";
for example:
tidy --break-before-br true --show-warnings false
You can find documentation for full set of configuration options on the Quick Reference page.
The following is an example of a Tidy config file.
// sample config file for HTML tidy indent: auto indent-spaces: 2 wrap: 72 markup: yes output-xml: no input-xml: no show-warnings: yes numeric-entities: yes quote-marks: yes quote-nbsp: yes quote-ampersand: no break-before-br: no uppercase-tags: no uppercase-attributes: no char-encoding: latin1 new-inline-tags: cfif, cfelse, math, mroot, mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover, munder, mover, mmultiscripts, msup, msub, mtext, mprescripts, mtable, mtr, mtd, mth new-blocklevel-tags: cfoutput, cfquery new-empty-tags: cfelse
The experimental HTML5-aware fork of Tidy adds the following new configuration options:
In addition, it also adds a new html5
value for the
doctype
configuration option.
Indenting the source markup of an HTML document makes the markup easier to read. Tidy can indent the markup for an HTML document while recognizing elements whose contents should not be indented. In the example below, Tidy indents the output while preserving the formatting of the
 element:
Input:
  <title>Test document</title>
This example shows how Tidy can indent output while preserving formatting of particular elements.

This is genuine preformatted text

Output:
  <title>Test document</title>
This example shows how Tidy can indent output while preserving formatting of particular elements.

 This is genuine preformatted text

Tidy’s indenting behavior is not perfect and can sometimes cause your
output to be rendered by browsers in a different way than the input.
You can avoid unexpected indenting-related rendering problems by setting
indent: no
or indent: auto
in a config file.
Tidy is not capable of preserving the original indenting of the markup from the input it receives. That’s because Tidy starts by building a clean parse tree from the input, and that parse tree doesn’t contain any information about the original indenting. Tidy then pretty-prints the parse tree using the current config settings. Trying to preserve the original indenting from the input would interact badly with the repair operations needed to build a clean parse tree, and would considerably complicate the code.
Tidy defaults to assuming you want output to be encoded in UTF-8. But Tidy offers you a choice of other character encodings: US ASCII, ISO Latin-1, and the ISO 2022 family of 7 bit encodings.
Tidy doesn't yet recognize the use of the HTML <meta> element for specifying the character encoding.
The full set of HTML character references are defined. Cleaned-up output uses named character references for characters when appropriate. Otherwise, characters outside the normal range are output as numeric character references.
Tidy offers advice on potential accessibility problems for people using non-graphical browsers.
Some tools generate HTML with presentational elements such as ,
<nobr>, and .
Tidy's -clean
option will replace those elements with CSS style
properties.
Some HTML documents rely on the presentational effects of
 start tags that are not followed by any content. Tidy deletes such
 tags (as well as any headings that don’t have content). So do not use
 tags simply for adding vertical whitespace; instead use CSS, or the
 element. However, note that Tidy won’t discard
 tags that are followed by any nonbreaking space (that is, the named character reference).
You can teach Tidy about new tags by declaring them in the configuration file, the syntax is:
new-inline-tags: tag1, tag2, tag3 new-empty-tags: tag1, tag2, tag3 new-blocklevel-tags: tag1, tag2, tag3 new-pre-tags: tag1, tag2, tag3
The same tag can be defined as empty and as inline or as empty and as block.
These declarations can be combined to define a new empty inline or empty block element. But you are not advised to declare tags as being both inline and block.
Note that the new tags can only appear where Tidy expects inline or block-level tags respectively. That means you can’t place new tags within the document head or other contexts with restricted content models.
Tidy will gracefully ignore many cases of PHP, ASP, and JSTE instructions within element content and as replacements for attributes, and preserve them as-is in output; for example:
<option <% if rsSchool.Fields("ID").Value = session("sessSchoolID") then Response.Write("selected") %> value='<%=rsSchool.Fields("ID").Value%>'> <%=rsSchool.Fields("Name").Value%> (<%=rsSchool.Fields("ID").Value%>) </option>
But note that Tidy may report missing attributes when those are “hidden” within the PHP, ASP, or JSTE code. If you use PHP, ASP, or JSTE code to create a start tag, but place the end tag explicitly in the HTML markup, Tidy won’t be able to match them up, and will delete the end tag. So in that case you are advised to make the start tag explicit and to use PHP, ASP, or JSTE code for just the attributes; for example:
<a href="<%=random.site()%>">do you feel lucky?
Tidy can also get things wrong if the PHP, ASP, or JSTE code includes quotation marks; for example:
value="<%=rsSchool.Fields("ID").Value%>"
Tidy will see the quotation mark preceding ID as ending the attribute value, and proceed to complain about what follows.
Tidy allows you to control whether line wrapping on spaces within PHP, ASP, and JSTE instructions is enabled; see the wrap-php, wrap-asp, and wrap-jste config options.
Tidy can help you to correct well-formedness errors in XML markup. Tidy doesn't yet recognize all XML features, though; for example, it doesn't understand CDATA sections or DTD subsets.
If you want to run Tidy from a Perl or other scripting language you may find it of value to inspect the result returned by Tidy when it exits: 0 if everything is fine, 1 if there were warnings and 2 if there were errors. This is an example using Perl:
if (close(TIDY) == 0) { my $exitcode = $? >> 8; if ($exitcode == 1) { printf STDERR "tidy issued warning messages\n"; } elsif ($exitcode == 2) { printf STDERR "tidy issued error messages\n"; } else { die "tidy exited with code: $exitcode\n"; } } else { printf STDERR "tidy detected no errors\n"; }
The source code for the experimental HTML5 fork of Tidy can be found at https://github.com/w3c/tidy-html5.
Dave Raggett has a list of Acknowledgements for people who made suggestions or reported bugs for the original version of Tidy.


I am a professional web developer with 5 years experience in the industry. My passion is for building creative applications and interfaces that users will love. Being a full-stack developer, I enjoy workign with front-end, back-end and database code but will always have a soft spot in my heart for JavaScript.


Recommend a food sector startup
by Staff reporterStartups will take centre stage at next year’s Global Food Summit in Munich. Up for grabs is the event’s prestigious Audience Award. For a chance of winning that – and the opportunity to pitch to influential investors and stakeholders – startups must first be nominated, and then choose to apply to pitch at the summit next March. Eight startups will be selected by a panel of experts to progress to the final. Who would you recommend?
The Global Food Summit is sponsored by the University of California, Berkeley, Wageningen University in the Netherlands, the German Academy of Science and Engineering (acatech), the Technical University of Munich (TUM) and the Bavarian State Government, represented by the Food Cluster, Bavaria. The 2020 edition will be held in the Munich Residenz from 25 to 26 March.


Online Service Center
Logout
Admission
Learning resource
Records
My Courses
Personal Info
Admission Info
Academic Info
Attendance Records
Service Request
CPT Application
Transcripts
Registration
e-Services
Job Board
Create Category
Category Name :
Description :


Vintage Synthesizer Parts
Those of you who like music and synthesizers will know how important is to have good equipment and to have it in perfect nick.
Synthalog shares your passion for the analog sound and supplies parts for electronic syntesizer repair and manitenance.
If you need a part for a vintage synthesizer or if you are looking for a new vintage synthesizer check our stock of Casio, Korg, Roland,
and Yamaha parts and synths for sale.
Send us an email with all the parts that you need to repair your musical equipment. We accept Paypal payments.
Depending on your preferences we can send your order by standard post or courier. There is a standard minimum order value of €10.
Send us your questions about parts, repairs or used vintage synthesizers and we will get back to you as soon as possible
If you are looking for a part for any of the synthesizers on this website that is not listed, contact us, we might have it!
If you don't get a reply within 2 days, please check your spam folder
Contact us at sythalog@hotmail.com


Whilst most of my work was done for companies mainly in Python, here are the things I've done in my spare time!
I have published two applications on the google playstore
These projects were maily to get the hang of the start to publish.
In Sounds of Doge I created a sound board from scratch and created functioning ads
Prayers in Latin is also a sound board, but I have an in app purchasing API
functioning, as well as a more sleek navigation.


module ActiveRecord::Locking::Pessimistic
Locking::Pessimistic provides support for row-level locking using SELECT … FOR UPDATE and other lock types.
Chain ActiveRecord::Base#find
to
ActiveRecord::QueryMethods#lock
to obtain an exclusive lock on
the selected rows:
# select * from accounts where id=1 for update Account.lock.find(1)
Call lock('some locking clause')
to use a
database-specific locking clause of your own such as 'LOCK IN SHARE
MODE' or 'FOR UPDATE NOWAIT'. Example:
Account.transaction do # select * from accounts where name = 'shugo' limit 1 for update shugo = Account.where("name = 'shugo'").lock(true).first yuko = Account.where("name = 'yuko'").lock(true).first shugo.balance -= 100 shugo.save! yuko.balance += 100 yuko.save! end
You can also use ActiveRecord::Base#lock!
method to lock one
record by id. This may be better if you don't need to lock every row.
Example:
Account.transaction do # select * from accounts where ... accounts = Account.where(...) account1 = accounts.detect { |account| ... } account2 = accounts.detect { |account| ... } # select * from accounts where id=? for update account1.lock! account2.lock! account1.balance -= 100 account1.save! account2.balance += 100 account2.save! end
You can start a transaction and acquire the lock in one go by calling
with_lock
with a block. The block is called from within a
transaction, the object is already locked. Example:
account = Account.first account.with_lock do # This block is called within a transaction, # account is already locked. account.balance -= 100 account.save! end
Database-specific information on row locking:
MySQL: http://dev.mysql.com/doc/refman/5.1/en/innodb-locking-reads.html PostgreSQL: http://www.postgresql.org/docs/current/interactive/sql-select.html#SQL-FOR-UPDATE-SHARE
Public Instance Methods
Obtain a row lock on this record. Reloads the record to obtain the requested lock. Pass an SQL locking clause to append the end of the SELECT statement or pass true for “FOR UPDATE” (the default, an exclusive row lock). Returns the locked record.
# File lib/active_record/locking/pessimistic.rb, line 61 def lock!(lock = true) reload(:lock => lock) if persisted? self end
Wraps the passed block in a transaction, locking the object before
yielding. You can pass the SQL locking clause as argument (see
lock!
).
# File lib/active_record/locking/pessimistic.rb, line 69 def with_lock(lock = true) transaction do lock!(lock) yield end end


| Reference | Transaction Type | Customer Number | Customer Name | Customer address | Customer phone Number | amount | Beneficiary Bank | Beneficiary Account Number | Payment details | Card Details | Region |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{transaction.reference}} | {{transaction.transactionType}} | {{transaction.customerNumber}} | {{transaction.customerName}} | {{transaction.customerAddress}} | {{transaction.customerPhoneNumber}} | {{transaction.amount}}{{transaction.currency}} | {{transaction.beneficiaryBank}} | {{transaction.beneficiaryACNumber}} | {{transaction.paymentDetails}} | {{transaction.cardDetail}} | {{transaction.region}} |


We have received your loan request for {{LoanAmount}} €. Thank you for using Loan Offerer!
You can use our application once again.
Try again
This is a demo application made for the CI/CD workshops.
Want to learn more about us?
Careers Facebook LinkedIn YouTube


import scipy.io as sio
import numpy as np
data=sio.loadmat("sample_data/weights.mat")
w=data["weights"][0]
w = [i for i in w]
aligned_w = hyp.tools.align(w)
w1 = np.mean(aligned_w[:17],0)
import scipy.io as sio
import numpy as np
data = hyp.tools.load("weights")
w = [i for i in data]
aligned_w = hyp.tools.align(w)
w1 = np.mean(aligned_w[:17],0)


SmartTrash
Connecting
DPW
&
PDP
like never before
SmarTrash Ecosystem
- Boots
- Ease of Use
- Pick up & Drop off Bags
- Drivers
- Realtime Routing
- Updated bag locations
- Create Efficiency
- Administration
- Realtime Monitoring
- Realtime Reporting
Thanks, from
Team Hyperham
Jacob, Ruolan, Jon, & Joel


Tag: recursion
-
Leetcode 0017. Letter Combinations of a Phone Number (14 Aug 2021)
-
Leetcode 0022. Generate Parentheses (14 Aug 2021)
-
Leetcode 0050. Pow(x, n) (14 Aug 2021)
-
Leetcode 0081. Search in Rotated Sorted Array II (14 Aug 2021)
-
Leetcode 0089. Gray Code (14 Aug 2021)
-
Leetcode 0098. Validate Binary Search Tree (14 Aug 2021)
-
Leetcode 0099. Recover Binary Search Tree (14 Aug 2021)
-
Leetcode 0100. Same Tree (14 Aug 2021)
-
Leetcode 0103. Binary Tree Zigzag Level Order Traversal (14 Aug 2021)
-
Leetcode 0104. Maximum Depth of Binary Tree (14 Aug 2021)
-
Leetcode 0105. Construct Binary Tree from Preorder and Inorder Traversal (14 Aug 2021)
-
Leetcode 0106. Construct Binary Tree from Inorder and Postorder Traversal (14 Aug 2021)
-
Leetcode 0107. Binary Tree Level Order Traversal II (14 Aug 2021)
-
Leetcode 0108. Convert Sorted Array to Binary Search Tree (14 Aug 2021)
-
Leetcode 0109. Convert Sorted List to Binary Search Tree (14 Aug 2021)
-
Leetcode 0110. Balanced Binary Tree (14 Aug 2021)
-
Leetcode 0111. Minimum Depth of Binary Tree (14 Aug 2021)
-
Leetcode 0116. Populating Next Right Pointers in Each Node (14 Aug 2021)
-
Leetcode 0117. Populating Next Right Pointers in Each Node II (14 Aug 2021)
-
Leetcode 0129. Sum Root to Leaf Numbers (14 Aug 2021)
-
Leetcode 0156. Binary Tree Upside Down (14 Aug 2021)
-
Leetcode 0199. Binary Tree Right Side View (14 Aug 2021)
-
Leetcode 0211. Design Add and Search Words Data Structure (14 Aug 2021)
-
Leetcode 0216. Combination Sum III (14 Aug 2021)
-
Leetcode 0226. Invert Binary Tree (14 Aug 2021)
-
Leetcode 0227. Basic Calculator II (14 Aug 2021)
-
Leetcode 0247. Strobogrammatic Number II (14 Aug 2021)
-
Leetcode 0248 Strobogrammatic Number III (14 Aug 2021)
-
Leetcode 0250 Count Univalue Subtrees (14 Aug 2021)
-
Leetcode 0364. Nested List Weight Sum II (14 Aug 2021)
-
Leetcode 0394. Decode String (14 Aug 2021)
-
Leetcode 0395. Longest Substring with At Least K Repeating Characters (14 Aug 2021)
-
Leetcode 0437. Path Sum III (14 Aug 2021)
-
Leetcode 0538. Convert BST to Greater Tree (14 Aug 2021)
-
Leetcode 0623. Add One Row to Tree (14 Aug 2021)
-
Leetcode 0669. Trim a Binary Search Tree (14 Aug 2021)
-
Leetcode 0865. Smallest Subtree with all the Deepest Nodes (14 Aug 2021)
-
Leetcode 0897. Increasing Order Search Tree (14 Aug 2021)
-
Leetcode 0932. Beautiful Array (14 Aug 2021)
-
Leetcode 0938. Range Sum of BST (14 Aug 2021)
-
Leetcode 0967. Numbers With Same Consecutive Differences (14 Aug 2021)
-
Leetcode 1022. Sum of Root To Leaf Binary Numbers (14 Aug 2021)
-
Leetcode 1096. Brace Expansion II (14 Aug 2021)
-
Leetcode 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree (14 Aug 2021)
-
Leetcode 1896. Minimum Cost to Change the Final Value of Expression (14 Aug 2021)


Jessica M. Walker
Attorney
Jessica Walker practices in the areas of criminal defense and habeas corpus law. She is admitted to the practice of law in the State of Connecticut, the United States District Court for the District of Connecticut, and the United States Supreme Court.
Jessica joined the firm in August, 2018. Before joining the firm, she worked as an attorney for more than 10 years at four other law firms, where she practiced in the areas of criminal defense and civil litigation.
Jessica graduated from the University of Connecticut School of Law in 2006, where she received a Juris Doctor degree, with honors, and from the University of Connecticut in 1999, where she received a Bachelor of Liberal Arts degree, summa cum laude.


@* * Copyright 2010-2017 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import controllers.Application.scaladocsPageUrl @releaseNotesPage("ScalaTest 2.1.1 Release Notes") {
ScalaTest 2.1.1 is a maintenance release for the 2.1.x series that includes a feature enhancement and a bug fix. No source code using ScalaTest 2.0+ should break, but you will likely need to do a clean build to upgrade from 2.0. However, 2.1.1 is binary compatible with 2.1.0, so you can just change the version number in your build and go.
-z
argument support to SBT integration.must
support to noException
, a [SomeException]
and an [Exception]
matcher syntax.Visit ScalaTest Release Notes for links to the release notes of all previous versions, or step back in time by visiting the release notes for the previous version.


How many of you have tasted the elixir of second life after a near death experience? Well, I tasted it twice. Once, when I was a child. But I have a very vague memory. I was rescued by my brother, after I accidently slipped in a pond. Next time, I was rescued by my friend after I accidently slipped in a ocean near Dragon caves during my internship far far away from my country. I still get the goosebump when I realise that I got a new life. You can read it here.
After meeting many new people, I found that 60% of them don't know how to swim!! It's not strange, but If you do feel that someday you would not like to meet an accident like mine, I would strongly recommend you to give it a try.
If you have got something to teach me, I will surely help you learn how to SWIM like a agressive shark down below!!
It is during our darkest moments that we must focus to see the light - Aristotle


Only first-level objects will be passed in to the matcher
callback. If you are working with nested data, you must iterate through the children
array and match them individually. This allows for more advanced matching when working with nested objects, allowing you to handle them however you want.
This example matches results only if the term appears in the beginning of the string:
Sometimes when working with large data sets, it is more efficient to start filtering the results only when the search term is a certain length. This is very common when working with remote data sets, as it allows for only significant search terms to be used.
You may set a minimum search term length by using the minimumInputLength
option:
$('select').select2({
minimumInputLength: 3 // only start searching when the user has input 3 or more characters
});
In some cases, search terms need to be limited to a certain range. Select2 allows you to limit the length of the search term such that it does not exceed a certain length.
You may limit the maximum length of search terms by using the maximumInputLength
option:
$('select').select2({
maximumInputLength: 20 // only allow terms up to 20 characters long
});
The minimumResultsForSearch
option determines the minimum number of results required in the initial population of the dropdown to display the search box.
This option is useful for cases where local data is used with a small result set, and the search box would simply be a waste of screen real estate. Set this value to -1 to permanently hide the search box.
$('select').select2({
minimumResultsForSearch: 20 // at least 20 results must be displayed
});
For single selects, Select2 allows you to hide the search box using the minimumResultsForSearch
configuration option. In this example, we use the value Infinity
to tell Select2 to never display the search box.
For multi-select boxes, there is no distinct search control. So, to disable search for multi-select boxes, you will need to set the disabled
property to true whenever the dropdown is opened or closed:


Fossil Gen5 smartwatch with Google WearOS launched in India at Rs 22,995
Fossil Gen 5 comes with a heart rate monitor, accelerometer, gyroscope, altimeter and ambient light sensor
by IANSAmerican fashion accessories brand Fossil on Thursday launched its "Gen 5" smartwatch in India, priced at Rs 22,995.
"There has been focus on the integration of health and wellness with wearable technology for some time now and at Fossil, we see a great opportunity to provide a smartwatch for the design conscious consumer looking for a perfect blend of style and utility," Johnson Verghese, Vice President and Managing Director Fossil India said in a statement.
The Fossil Gen 5 features a 1.3-inch circular AMOLED display housed inside a 44mm dial.
It is powered by the Snapdragon Wear 3100 processor paired with 1GB of RAM and 8GB of storage and offers its users the latest software - Wear OS by Google.
Fossil Gen 5 comes with a Heart Rate monitor, accelerometer, gyroscope, altimeter and ambient light sensor.
The device comes with four different battery modes, including 'Daily', 'Custom', 'Time-only' and 'Extended'.
Gen 5 will come with a series of auto-installed apps, music streaming service, Spotify, peace of mind and safety app, Noonlight, and Nike Run Club.
Additionally, the device features swimproof speaker that offers users the ability to make and receive phone calls.
--IANS
wh/adr/
(Only the headline and picture of this report may have been reworked by the Business Standard staff; the rest of the content is auto-generated from a syndicated feed.)


We are on the Gas Safe register
You can be sure you have an engineer of the highest knowledge at hand. Please click the following link to see our profile on the Gase Safe register.
Find us on Checkatrade
We are proud members of Checkatrade. This means that we have agreed to be monitored, vetted and assessed by them, as well as seeing feedback left on there from our customers.


filmcritic.com presents a review from staff member James Brundage. You can find the review with full credits at http://filmcritic.com/misc/emporium.nsf/2a460f93626cd4678625624c007f2b46/845fb5161e1558bd882569770011bd2f?OpenDocument
THE LADIES MAN A film review by James Brundage Copyright 2000 filmcritic.com filmcritic.com
Ok. Where in the contract for an SNL cast-member does it stipulate that they will finance your ill-conceived film, no matter what it is? What kind of shyster agent dreamed that one up? And why does said movie ever have to be granted approval to be released to the general public?
 predominate a thinking viewer's mind as it wanders through the cerebrally deficient film The Ladies Man.
The Ladies Man is the latest of those SNL skits to turn "pro" as a feature length film. Joining the ranks of such greats as Wayne's World and such abysmal failures as A Night at the Roxbury, The Ladies Man only earns the modest title of being one of the better SNL spin-offs thanks to the utter failure of most of its competition. Sure, there are some laughs. And you can count tem on both hands, but will you even bother renting this film? I doubt it.
 Fired from his radio station after breaking FCC codes, Leon and his producer Julie (Karyn Parsons) head off in search of new jobs, a mysterious millionaire benefactor, and true love.
Although this proves to be minimally enjoyable at times, and although there is a musical number about a group of people devoted to killing Phelps that will make you bust out laughing, the rest of the movie proves to be so poorly constructed that it's almost unbearable. While I'm not yet yearning for It's Pat, the Sequel, the prospect of ever seeing The Ladies Man again sounds too unbearable to stand.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Basic Javascript WebAPI Client
jQuery Test:
Testing...
Any Url:
GET
Select Url:
GET
Request Url:
Response:
Click "Get Response" to send GET request


| Niranjan Karandikar |
“A Low-Noise, Low-Power CMOS Amperometric Circuit for Glucose Sensing,” Ph.D., December, 2013 |
Intel |
| Sunil Govardhan |
“A CMOS Switched Capacitor Based Amperometric Readout Circuit for Microneedle Glucose Sensor,” M.S., December, 2013. |
Freescale |
| Sujith Dermal |
“A CMOS Conductometric Circuit for Chemical Sensing using Nanowire Sensor Arrays,” M.S., August, 2013. |
Freescale |
| Varun Shenoy |
A CMOS Analog Correlator based Amperometric Circuit for Glucose Sensing,” Ph.D., May, 2013. |
ON Semiconductor |
| David Maxwell |
“Comparative Analysis of Lithium-Chemistry Battery Fuel Gauge Algorithms on Aged Cells,” M.S., December, 2011. |
Texas Instruments |
| Ju-Ching Li |
“The Design of CMOS Impulse Generators for Ultra-Wideband Communication and Radar Systems,” Ph.D., August, 2011. |
AMD |
| Daniel McBride |
“A High Fill Factor CMOS Image Sensor for IR Camera Applications,” M.S., August, 2010. |
Texas A&M PhD Program |
| Partha Ghosh |
"Design and Study of Phase Locked Loop for Space Applications in Sub-Micron CMOS Technology," Ph.D., May 2009. |
Broadcom |
| Ritesh Mehta |
“Balance MCML Circuit Design for Suppressing Delta-I Noise,” M.S., December, 2007. |
Broadcom |
| Prasanna Kalkura |
“Pulse Position Modulation Circuits for Impulse Radio Ultra Wideband Systems,” M.S., December, 2007. |
Apple |
| Shin-Chih Chang |
“CMOS 5th Derivative Gaussian Impulse Generator for UWB Application,” M.S., December, 2005. |
---- |
| Timothy Merkin |
“A CMOS Ultra-Wideband Differential Low Noise Amplifier,” M.S., December, 2005. |
Texas Instruments |
| Hemalatha Shanmugasundaram |
“CMOS Optical transimpedance amplifier design for the PAM signaling,” M.S., August, 2005. |
Intel |
| Tamim B. Al-sawaf |
“Analysis and Comparison between Impulse and Multiband Ultrawide Bandwidth Communication Systems,” M.S., August 2004. |
Schlumberger |
| Shahzad Nazar |
"Performance/Energy Efficiency Analysis of Register Files in Superscalar Processors," M.S., December 2003. |
Apple |
| YoungKyun Jeong |
“A frequency adjustable CMOS pulse generator and impulse shaping circuit for the UWB wireless communication systems,” M.S., May, 2003. |
Samsung |
| Shaoshu Sha |
Wireless Power
Transmission Based on Retro-Reflective Antenna Array,
Ph.D., December, 2013
|
Motorola |


During my years spent in the college dorms, I found myself constantly fumbling with my keys everytime I needed to get in or out of my room. Sometimes I had books and many other things in my hands which made handling keys difficult. That was the inspiration for this project. To create a way to lock/unlock my door with ease.
To achieve this goal I implemented a wireless door lock using an arduino, wireless transmitter/receiverk, and an actuator. The wireless transmitter on my key chain contained a button. When this button was pressed, the wireless received, behind the door, would set a GPIO line high. This line was connected to the arduino, and the arduino continuously checked the voltage of this wire. If it was high, the arduino software would process a "door state change"; meaning that it would lock the door if it was unlocked or unlock the door if it was locked. The arduino would do this by driving 2 wires connected to the actuator high or low. The actuator in turn would push the bolt forward, or pull it backwards. The software for this project can be found at the github link below: