VISAN Reference Manual
Much of VISAN's functionality is provided by Python and the Numpy package, which are both part of VISAN. For an overview of the functions provided by these two components please look at the Python and Numpy documentation.
Contents
Plotting functions
plot(...)
Display a 2-dimensional plot of a dataset.
The plot()
function has several different usage modes, and can take a large number of optional keywords.
Basic usage:
>>> plot(ydata)
where 'ydata' is a one-dimensional Python list or numpy array, will plot the 'ydata' values on the vertical axis against an index array [0..len(data)] on the horizontal axis, in a single plot frame.
If 'ydata' is a two-dimensional n x m numpy array, a sequence of n plot frames will be created. Each frame f will show a plot of the ydata[f,:] values against an index array [0..m-1] on the horizontal axis. Initially, only the first frame is shown. The user can start an animation sequence which will cycle through the successive frames in the plot window.
>>> plot(xdata, ydata)
where 'xdata' and 'ydata' are both one-dimensional, will plot the 'ydata' values on the vertical axis against the corresponding 'xdata' values on the horizontal axis.
If 'ydata', or 'xdata' and 'ydata' are two-dimensional n x m numpy arrays, a sequence of n plot frames will be created. Each frame f will show a plot of the ydata[f,:] values against the xdata[f,:] value, or against xdata[0] values if xdata is one-dimensional. Initially, only the first frame is shown. The user can start an animation sequence which will cycle through the successive frames in the plot window.
>>> plot(harpproduct)
where 'harpproduct' is an object of type harp.Product (see also the documentation for the HARP Python interface), will display a specific 2D plot associated with the type of data contained in the 'harpproduct'.
>>> plot(harpproduct, value='variablename')
by using the value
parameter you can select which variable from the HARP product should be used to generate the 2D plot.
By default, plot()
creates and displays a new plot window. However:
>>> w = plot(data1) >>> plot(data2, window=w)
will plot data2 in the same window 'w' as used for data1, instead of opening a separate window.
In addition to the 'window' keyword, the plot()
function also accepts a number of other, comma-separated optional properties of the form 'property=value
'. Their order is arbitrary, but they must always appear after any data arguments to the plot()
function. For example:
>>> plot(xydata, linewidth=2, points=True, color=(0.1, 0.5, 0.3))
Specifying a property multiple times in the same plot()
command is not allowed and will lead to a Syntax Error if attempted.
There are two types of properties: plot properties and dataset properties. A plot property applies 'globally', i.e., plot-wide. If the property is supplied multiple times in consecutive plot()
function calls to the same plot window, the last supplied value will take precedence and override any previously specified values. You can also specify dataset properties which will have an effect on each separate dataset plotted to a window. The available plot properties for plot()
are:
PLOT PROPERTIES FOR plot() |
||||
|---|---|---|---|---|
| keyword | description | type | default value | constraints |
window |
The window to plot the dataset in. | <plotwindow handle> the return value of a previous plot() command |
create a new window | Value should refer to a valid window that has not yet been closed or otherwise destroyed. |
windowtitle |
Set the window title of the plotwindow. | string | 'VISAN 2D Plot' | |
size |
Set the initial size of the plot window, in (width, height) pixels. This property only has an effect when specified in the plot() command that creates the plot window. It is ignored when specified for any subsequent plot into that window. |
2-element tuple | (800, 494) (Golden Ratio) |
0 < width < maximum screen width 0 < height < maximum screen height |
pos |
Set the initial position of the plot window, in (x, y) left-upper corner based coordinates. | 2-element tuple | <calculated> New windows are placed a bit down and to the right with regard to the previously opened window. When there is no further space left, a new window will be created in the top left corner of the screen. |
0 < x < maximum screen width 0 < y < maximum screen height |
title |
Set the plot title. This title is centered at the top of the plot panel. | string | no title | |
xrange |
Set the bounds for the plot's x-axis values. If the resulting range contains elements <= 0, the xlog property will be set to False. | 2-element sequence (Python tuple or list) of doubles. | <Derive from data> Calculate the minimal range that encompasses all the x values of all datasets plotted in this window so far. Note that this default value will override a manual setting of xrange/xmin/xmax in a previous plot to the same window. |
It is not allowed to specify xrange and xmax/xmin properties in the same call. If xrange is specified, then simultaneously specifying a conflicting xlog value (i.e. setting xlog to True if xrange contains values <= 0) will lead to an error message. |
yrange |
Set the bounds for the plot's y-axis values. If the resulting range contains elements <= 0, the ylog property will be set to False. | 2-element sequence (Python tuple or list) of doubles. | <Derive from data> Calculate the minimal range that encompasses all the y values of all datasets plotted in this window so far. Note that this default value will override a manual setting of yrange/ymin/ymax in a previous plot to the same window. |
It is not allowed to specify yrange and ymax/ymin properties in the same call. If yrange is specified, then simultaneously specifying a conflicting ylog value (i.e. setting ylog to True if yrange contains values <= 0) will lead to an error message. |
xmin |
Set a minimum bound for the plot's x-axis value range. | double | <Derive from data> Calculate the largest value still smaller than all the x values values of all datasets plotted to this window so far. Note that this default value will override a manual setting of xrange/xmin in a previous plot to the same window, so for a user it only makes sense to provide a manual range minimum via a property for the final plot to a given window. |
It is not allowed to specify xrange and xmax/xmin properties in the same call. xmin must not conflict an xlog property values specified in the same plot() command. |
xmax |
Set a maximum bound for the plot's x-axis value range. | double | <Derive from data> Calculate the smallest value still larger than all the x values values of all datasets plotted to this window so far. Note that this default value will override a manual setting of xrange/xmax in a previous plot to the same window, so for a user it only makes sense to provide a manual range maximum via a property for the final plot to a given window. |
It is not allowed to specify xrange and xmax/xmin properties in the same call. xmax must not conflict with an xlog property value specified in the same plot() command. |
ymin |
Set a minimum bound for the plot's y-axis value range. | double | <Derive from data> Calculate the largest value still smaller than all the y values values of all datasets plotted to this window so far. Note that this default value will override a manual setting of yrange/ymin in a previous plot to the same window, so for a user it only makes sense to provide a manual range minimum via a property for the final plot to a given window. |
It is not allowed to specify yrange and ymax/ymin properties in the same call. ymin must not conflict with an ylog property value specified in the same plot() command. |
ymax |
Set a maximum bound for the plot's y-axis value range. | double | <Derive from data> Calculate the smallest value still larger than all the y values values of all datasets plotted to this window so far. Note that this default value will override a manual setting of yrange/ymax in a previous plot to the same window, so for a user it only makes sense to provide a manual range maximum via a property for the final plot to a given window. |
It is not allowed to specify yrange and ymax/ymin properties in the same call. ymax must not conflict with an ylog property value specified in the same plot() command. |
xlog |
Set the x-axis for the plot to use a logarithmic scale. | boolean | False | Trying to set xlog to True yields an error if the new xrange contains values <= 0 (regardless of whether that range was implied by the data, or manually set by the user in the same plot() call using the xrange property). |
ylog |
Set the y-axis for the plot to use a logarithmic scale. | boolean | False | Trying to set ylog to True yields an error if the new yrange contains values <= 0 (regardless of whether that range was implied by the data, or manually set by the user in the same plot() call using the yrange property). |
xbase |
Set the base for the linear and logarithmic tick calculation for the x-axis. | double | 10.0 | xbase >= 1.0 |
ybase |
Set the base for the linear and logarithmic tick calculation for the x-axis. | double | 10.0 | ybase >= 1.0 |
xlabel |
Set the label to be displayed centered on the outside of the x-axis. | string | no label | |
ylabel |
Set the label to be displayed centered on the outside of the y-axis. | string | no label | |
xnumticks |
Set the number of ticks to be displayed on the x-axis. | int | 6 | xnumticks >= 2 |
ynumticks |
Set the number of ticks to be displayed on the y-axis. | int | 6 | ynumticks >= 2 |
numticks |
Set the number of ticks to be displayed on the axes. | int | 6 | numticks >= 2 |
showanimationtoolbar |
Display an animation toolbar along the bottom of the plot window. | boolean | <calculated> If the plot contains a dataset with more than one frame, the animationtoolbar is shown by default. |
The animationtoolbar will only be shown if there are datasets with more than 1 frame available. |
showpropertypanel |
Create the plot window with the properties panel showing. | boolean | False |
The available dataset properties for plot()
are:
DATASET PROPERTIES FOR plot() |
||||
|---|---|---|---|---|
| keyword | description | type | default value | constraints |
value |
Select which field of the provided HARP product to use as plot value. | string | By default the first 'sensible' (e.g. not time, latitude, longitude, etc.) variable will be used as plot value. | Can only be used when plotting HARP products |
name |
Set the dataset name. This name is how the dataset will be referred to in the Dataset panel selection box. | string |
|
After removing leading and trailing whitespace, 'name' must be non-empty. Consecutive datasets with the same name will get a sequence number appended. |
lines |
Draw connecting lines between consecutive data points. | boolean | True | |
linewidth |
Set the width of the lines in the plot, in screen units. | double | 1.0 | linewidth >= 0 |
stipplepattern |
Set the stippling pattern for lines, as a 16-bit binary pattern (1 = pixel on, 0 = pixel off). | integer | 65535 == 0xFFFF == binary 1111 1111 1111 1111 (i.e. solid lines) | 0 < stipplepattern <= 65535 |
points |
Visualize the data points in the dataset by drawing them as small circles. | boolean | False | |
pointsize |
Set the relative diameter of the data point circles. | double | 1.0 | pointsize >= 0 |
color |
Set the color to use for plotting this dataset, in (R,G,B) values. | 3-element sequence (Python tuple or list) of doubles. | Subsequent plots in the same window will get a color assigned using the following sequence of colors:
|
0 <= R <= 1.0 0 <= G <= 1.0 0 <= B <= 1.0 |
opacity |
Set the opacity (transparency level) of the plotted dataset. A value of 0.0 indicates full transparency. | double | 0.6 | 0 < opacity <= 1.0 |
histogramplot(data, bins)
Draw a histogram plot.
This is a convenience function that creates a histogram in a plot window.
>>> histogramplot(data, bins)
will create a histogramplot where 'data' is the output of the histogram() function and 'bins' is the bins parameter that was used to create the histogram.
Both 'data' and 'bins' should be rank-1 arrays and the array length of 'data' should be one less than the length of 'bins'.
For customizing the plot you can use the same additional options as are available for the plot()
function.
wplot(...)
Display a dataset plotted onto an Earth world map.
The wplot()
accepts dataset parameters similar to the plot()
function. It can also plot basic longitude vs. latitude data as well as HARP products containing groundpixel data or geomap data. All datasets are plotted onto a 2D or 3D Earth world map.
Basic usage:
>>> wplot(longitude, latitude)
will plot the locations using the information from the 'latitude' and 'longitude' arrays and project these onto a world map, in a single plot frame. The type of projection can be chosen by supplying a value for the 'projection' keyword. The latitude/longitude arrays may contain either points or corner coordinates.
>>> wplot(longitude, latitude, data)
will plot the locations using 'data' as color information.
If 'data' is one-dimensional, then the data will be plotted as points or swaths. It will be plotted as points if the latitude/longitude arrays are one-dimensional, and as swaths if latitude/longitude arrays are two-dimensional (in which case the second dimension should capture the corners of the swath)
If 'data' has more than one dimension, then 'data' will be plotted as a grid using the latitude and longitude as axis. Latitude should match the last dimension of 'data' and longitude the second-last dimension. If 'data' is three dimensional, then an animation plot is created with the first dimension being used as time dimension.
>>> wplot(harpproduct)
where 'harpproduct' is an object of type harp.Product (see also the documentation for the HARP Python interface), will display a specific worldmap plot associated with the type of data contained in 'harpproduct'.
>>> wplot(harpproduct, value='variablename')
by using the value
parameter you can select which variable from the HARP product should be used to generate the worldmap plot.
The wplot()
function also accepts a number of comma-separated optional properties of the form 'property=value
'. Their order is arbitrary, but they must always appear after any data arguments to the wplot()
function. For example:
>>> wplot(latitudes, longitudes, data, colortable="Ozone", heightfactor=0.4)
Specifying a property multiple times in the same wplot()
command is not allowed and will lead to a Syntax Error if attempted.
There are two types of properties: plot properties and dataset properties. A plot property applies 'globally', i.e. plot-wide. If the property is supplied multiple times in consecutive wplot()
function calls to the same plot window, the last supplied value will take precedence and override any earlier values. You can also specify dataset properties which will have an effect for each separate dataset plotted to a window. The available plot properties for wplot()
are:
PLOT PROPERTIES FOR wplot() |
||||
|---|---|---|---|---|
| keyword | description | type | default value | constraints |
window |
Set the window to plot the dataset in. | <wplotwindow handle> the returned value of a previous wplot() command |
create a new window | Value should refer to a valid window that has not yet been closed or otherwise destroyed. |
windowtitle |
Set the window title of the plotwindow. | string | 'VISAN World Plot' | |
size |
Set the initial size of the plot window, in (width, height) pixels. This property only has an effect when specified in the wplot() command that creates the plot window. It is ignored when specified for any subsequent plot into that window. |
2-element tuple | (800, 494) (Golden Ratio) |
width > 0 height > 0 |
pos |
Set the initial position of the plot window, in (x, y) left-upper corner coordinates. | 2-element tuple | <calculated> New windows are placed a bit down and to the right with regard to the previously opened window. When there is no further space left, a new window will be created in the top left corner of the screen. |
x >= 0 y >= 0 |
title |
Set the plot title. | string | no title | |
centerlat |
Set the latitude value of the point at which the view should be centered. | double | 0.0 | -90 <= centerlat <= 90 |
centerlon |
Set the longitude value of the point at which the view should be centered. | double | 0.0 | -180 <= centerlon <= 180 |
zoom |
Set the zoom level for the view. | double | 1.0 for 2D projections and 2.5 for the 3D projection. | 1.0 <= zoom |
projection |
Set the type of projection to use for the plot | string | "3D" |
projection must be one of the following values:
|
projectionlat |
Set the center latitude parameter for the projection. This is only applicable for Azimuthal 2D projections. | double | 0.0 | -90 <= projectionlat <= 90 |
projectionlon |
Set the center longitude parameter for the projection. This is only applicable for 2D projections. | double | 0.0 | -180 <= projectionlon <= 180 |
showanimationtoolbar |
Display an animation toolbar along the bottom of the plot window. | boolean | <calculated> If the plot contains a dataset with more than one frame, the animationtoolbar is shown by default. |
The animationtoolbar will only be shown if there are datasets with more than 1 frame available. |
showpropertypanel |
Create the plot window with the properties panel showing. | boolean | False | |
showcolorbar |
Display a color bar along the bottom of the plot panel. | boolean | <calculated> If the plot contains a dataset with a color table, the color bar is shown by default. |
The available dataset properties for wplot()
are:
DATASET PROPERTIES FOR wplot() |
||||
|---|---|---|---|---|
| keyword | description | type | default value | constraints |
value |
Select which field of the provided HARP product to use as plot value. | string | By default the first 'sensible' (e.g. not time, latitude, longitude, etc.) variable will be used as plot value. | Can only be used when plotting HARP products |
colortable |
The color table to associate with the values in dataset. VISAN will first try to see if the value of this string is equal to one of its built-in predefined color tables: "BlackToWhite", "WhiteToBlack", "GreenToRed", "RedToGreen", "Cloud", "Rainbow", "Ozone", "Blackbody", or "Aerosol". In all other cases, the string is interpreted as a filename containing a VISAN color table definition. If the filename is not an absolute path specification, VISAN searches for the file in the current directory (from which the script or application was launched). |
string | Aerosol | filename should refer to a valid, existing color table |
colorrange |
Set the minimum/maximum scalar values for scalar mapping of the color table. Scalar values less than the minimum range value are clamped to minimum range value. Scalar values greater than the maximum range value are clamped to maximum range value. | 2-element sequence of double | <calculated> The initial value is set to the min/max values of the entire dataset. |
|
colorbartitle |
Set the title to be used when the colorbar for this data is shown. | string | no title | |
numcolorlabels |
Set the number of value labels to display for the color bar associated with the dataset. | int | 2 | numcolorlabels >= 0 |
opacity |
Set the opacity (transparency level) of the plot. A value of 1.0 indicates no transparency. | double | 0.7 | 0 < opacity <= 1.0 |
linewidth |
Set the width of the Path lines in the plot. | double | 1.0 | linewidth >= 0 |
pointsize |
Set the diameter of circles signifying Location points. | double | 1.0 | pointsize >= 0 |
drawpath |
Draw a Path between measurement locations for the given dataset. This will only show a black line and won't use color information based on the data. | boolean | False | |
drawlocation |
Use the center locations instead of corner coordinate information to create the plots. This is only applicable when plotting HARP product data. | boolean | False | |
heightfactor |
Set the height factor for a Geomap dataset. This property is only meaningful for "3D" projection type plots. If value > 0 then the data will be visualized using a height proportional (scaled with the heightfactor) to the data value. | double | 0 | heightfactor >= 0 |
minheightvalue |
Set a minimum, pre-normalisation, pre-heightfactor-application cutoff value for the mapping of values in a Geomap dataset to heights. This property is only meaningful for "3D" projection type plots with heightfactor > 0. | double | <calculated> The minimum value found in the dataset. |
|
maxheightvalue |
Set a maximum, pre-normalisation, pre-heightfactor-application cutoff value for the mapping of values in a Geomap dataset to heights. This property is only meaningful for "3D" projection type plots with heightfactor > 0. | double | <calculated> The maximum value found in the dataset. |
|
deltaradius |
Set the Radius for the Geomap filter. This property is only meaningful for "3D" projection type plots. This value sets the distance of the visualized data from the unit sphere (i.e. the Earth). | double | 0.007 | deltaradius >= 0 |
Mathematical functions
All mathematical functions are available inside the visan.math
package. To use e.g. the fit()
function you can either use from visan.math import fit
and then call fit()
, or you can directly call visan.math.fit()
.
visan.math.gammaln(x)
The logarithm of the gamma function ln(Gamma(x))
.
This function is not guaranteed to work on imaginary data.
visan.math.gammap(a, x)
The incomplete gamma function P(a,x)
(= gamma(a,x) / Gamma(a)
).
visan.math.gammaq(a, x)
The incomplete gamma function Q(a,x) = 1 - P(a,x)
(= 1 - gamma(a,x) / Gamma(a)
).
visan.math.histogram(a, bins, mode='inner')
Create a histogram for a set of values using a specified set of bins.
This function creates a histogram for the values in the array a
. The bins are defined by the edge values in the bins
array. The values in bins
should be stored in ascending order.
If mode
is 'inner'
then len(bins)-1
bins will be used. If mode
is 'outer'
then two more bins are added; one for all values below bins[0]
and one for the values in a
higher then bins[-1]
.
Both a
and bins
should be one dimensional arrays.
Example:
>>> visan.math.histogram([2.1, 4.5, 5, 7.8, 2.5, 6.1, 9.9, 5.1, 5.2, 7.2], numpy.arange(11)) numpy.array([0, 2, 0, 1, 3, 1, 2, 0, 1, 0])
visan.math.fit(x, y, sigy=None, error=False)
Perform a linear fit on a range of x and y values.
This function fits a set of data points x
, y
with individual standard deviations sigy
for the y
values to a straight line y = a + bx
by minimizing chi-square.
If the error
parameter is False
the function returns only the found values for a
and b
as a tuple. If error
is True
then a third tuple item is returned containing a dictionary of error statistics (siga
the standard deviation of a
, sigb
the standard deviation of b
, chi2
the value of chi-square, and q
the goodness of fit probability).
If sigy
is None
then no standard deviations are used, q
will be 1.0
and the normalization of chi-square is to unit standard deviation for all points.
Example:
>>> a, b, err = visan.math.fit([1.1, 1.95, 3.05], [1, 2.01, 2.95], error=True)
visan.math.lfit(x, y, F, sigy=None, error=False)
Perform a fit on a range of values using a set of basis functions.
This function fits a set of data points x
, y
with individual standard deviations sigy
for the y
values to a linear combination of basis functions y = sum(a_i * F_i(x); i = 1..N)
minimizing chi-square.
F
should be a user provided function F(x)
that returns an array where each element is the evaluation of the basis function F_i()
at location x
.
The function lfit
will return an array a
with the coefficients for the basis functions F_i()
.
If the error
parameter is False
the function returns only the found values for a
as an array. If error
is True
then a tuple is returned containing the array a
, the covariance matrix, and the value of chi-square.
If sigy
is None
then the standard deviations for all y
values are set to 1.0
.
Example (fit to a second degree polynomial):
>>> def F(x): ... return numpy.array([1, x, x*x]) >>> a, covar, chi2 = visan.math.lfit([0, 1, 2, 3], [1, 3, 2, 1], F, error=True) >>> y = numpy.dot(a, F(0.5))
Miscellaneous functions
executescript()
Execute a script.
This routine runs an external python script.
>>> executescript(filename)
runs the script file located at the path indicated by filename
and returns to the prompt when the script is finished. If the system is unable to locate the file indicated by filename
an execption will be thrown.
When you run a script, VISAN will automatically add the location of your script to the module searchpath (sys.path
). This means that if your script uses modules that are located in the same directory as the script file then these modules will automatically be found. When the script is finished VISAN will change the module searchpath back to its original value.
If you want the script to have access to variables that you have already set or if you want to have access to variables that are going to be set by the script, just pass globals()
as second parameter:
>>> executescript(filename, globals())
If the script needs to be run as a 'main' script (i.e. as if it was run as an argument to the python executable) and/or requires command line arguments you can use the mainargs
keyword. The mainargs
keyword should contain a list of command line options (which may be an empty list). For instance, to run a setup.py script to install an external module you could use:
>>> executescript('/home/user/package/setup.py', mainargs = ['install'])
This will have the result that the script is called with the __name__
variable set to '__main__'
and sys.argv
will have been set to ['/home/user/package/setup.py', 'install']
. The current working directory for the script will also be set to the directory of the script (e.g. '/home/user/package').
Note that if a mainargs
keyword parameter is provided, the globals
parameter to executescript()
(if present) will be ignored.
version()
Get the version number of VISAN.
>>> v = version()
returns the version number of the current VISAN release.


The Norovirus 2019: symptoms, how the winter vomiting bug is spread and how long is it contagious?
Norovirus is a highly infectious vomiting bug, last year its spread forced some hospital wards to temporarily close to avoid it spreading further
by Simon MeechanWinter is here, which means many of us will be coming down with bugs over the next few months.
While colds, flu and fever can all strike us down, last year one winter vomiting bug was so severe it led to hospital wards having to shut to contain its spread: norovirus.
Children, older people and those with low immune systems are especially at risk of contracting norovirus over winter. It's highly infectious and can lead to days of vomiting, diarrhoea, headaches and drastic dehydration.
What is norovirus?
Norovirus is the most common cause of gastroenteritis.
The bug is common in winter – and places with high concentrations of vulnerable people, such as children, older people and patients, are especially susceptible.
Diane Sisterson, lead nurse for infection prevention and control at Northumbria Healthcare NHS Foundation Trust , said: “People can get norovirus at any time of the year, though it’s particularly common during the winter where it often circulates in the community, and due to its highly infectious nature, can affect people in care homes and hospitals.
“Whilst it is unpleasant, it is rarely serious and typically lasts two to three days.”
What are the symptoms of norovirus?
Norovirus often causes violent diarrhoea and vomiting.
This can lead to dehydration, which further saps energy.
Raised temperature, aching limbs and headaches are also associated with norovirus.
Usually, it lasts for about two days.
How can I avoid getting norovirus?
Norovirus is spread by touch so make sure you wash and dry your hands often and thoroughly with soap and warm water. Don’t rely on alcohol hand gels alone.
Be careful when clearing up after someone who has been ill – wash your hands frequently.
Disinfect any surfaces or objects that could be contaminated with a household cleaning product.
Wash any items of clothing, bedding, or towels that could have been contaminated on a separate hot wash, to ensure the virus is killed.
What should I do if I get norovirus?
There is no specific treatment for norovirus and so going to the doctor or hospital won’t help – in fact, you’re likely to spread the disease.
Drink plenty of fluids to prevent dehydration, especially in the very young or the elderly.
Consult a pharmacist for advice on over-the-counter medicines to reduce any fever or aches.
Get plenty of rest.
Stay away from work and keep children away from school until at least 48 hours after the symptoms have stopped.
Don’t visit vulnerable family or friends, especially people in hospitals or care homes, to reduce the risk of passing the virus on.

For more information visit: www.nhs.uk/Conditions/Norovirus .


I'm {{ .Site.Params.author }}, a student at The University of Texas at Austin.
I am currently pursuing a degree in Human Biology, with a specific interest in physical therapy .
Here is a preview of some of my recent projects.
For more information, please check out my resume.
Contact me by email or connect through any of the sites below!
{{ partial "social.html" . }}


|
#include "common.h"
#include "common-rs485.h"
Go to the source code of this file.
Defines | |
| #define | DEBUG_WIFI 1 |
Functions | |
| int | checkFailure () |
| void | setupBAUDSpeed (long baudrate) |
| void | echo_all_input_off () |
| void | set_verbose (bool on) |
| void | echo_all_input_on () |
| void | software_flow_control () |
| void | scan_for_networks () |
| void | wifi_auth_mode (int state) |
| void | set_ssid () |
| void | set_wep_key (int n) |
| void | set_wpa_psk () |
| void | setDHCP (int n) |
| void | getFW () |
| void | getInfo () |
| void | getInfoWLAN () |
| void | closeAllConns () |
| void | closeConn (int cid) |
| void | SaveConfig () |
| void | startListen (long port) |
| long | scanBaudRate () |
| void | configureWiFi () |
Variables | |
| long | nRcvChars = 0 |
| ubyte | BytesRead [8] |
| string | ssid = "xammy2" |
| ubyte | linefeed [] = {0x0A} |
| ubyte | endmarker [] = {27, 'E'} |
| ubyte | wep [10] = {'0','F','B','3','B','A','7','9','E','B'} |
| ubyte | wpa_psk [] = {'g','w','a','h','d','n','m','5','!',';',']'} |
| long | baudrates [] = {9600, 19200, 38400, 57600, 115200, 230400,460800, 921600} |
| #define DEBUG_WIFI 1 |
Definition at line 30 of file dexterind-wifi.h.
| int checkFailure | ( | ) |
Definition at line 80 of file dexterind-wifi.h.
| void closeAllConns | ( | ) |
Definition at line 337 of file dexterind-wifi.h.
| void closeConn | ( | int | cid ) |
Definition at line 345 of file dexterind-wifi.h.
| void configureWiFi | ( | ) |
Definition at line 406 of file dexterind-wifi.h.
| void echo_all_input_off | ( | ) |
Definition at line 164 of file dexterind-wifi.h.
| void echo_all_input_on | ( | ) |
Definition at line 192 of file dexterind-wifi.h.
| void getFW | ( | ) |
Definition at line 317 of file dexterind-wifi.h.
| void getInfo | ( | ) |
Definition at line 325 of file dexterind-wifi.h.
| void getInfoWLAN | ( | ) |
Definition at line 331 of file dexterind-wifi.h.
| void SaveConfig | ( | ) |
Definition at line 354 of file dexterind-wifi.h.
| void scan_for_networks | ( | ) |
Definition at line 224 of file dexterind-wifi.h.
| long scanBaudRate | ( | ) |
Definition at line 378 of file dexterind-wifi.h.
| void set_ssid | ( | ) |
Definition at line 266 of file dexterind-wifi.h.
| void set_verbose | ( | bool | on ) |
Definition at line 181 of file dexterind-wifi.h.
| void set_wep_key | ( | int | n ) |
Definition at line 276 of file dexterind-wifi.h.
| void set_wpa_psk | ( | ) |
Definition at line 293 of file dexterind-wifi.h.
| void setDHCP | ( | int | n ) |
Definition at line 309 of file dexterind-wifi.h.
| void setupBAUDSpeed | ( | long | baudrate ) |
Definition at line 119 of file dexterind-wifi.h.
| void software_flow_control | ( | ) |
Definition at line 208 of file dexterind-wifi.h.
| void startListen | ( | long | port ) |
Definition at line 367 of file dexterind-wifi.h.
| void wifi_auth_mode | ( | int | state ) |
Definition at line 242 of file dexterind-wifi.h.
| long baudrates[] = {9600, 19200, 38400, 57600, 115200, 230400,460800, 921600} |
Definition at line 51 of file dexterind-wifi.h.
| ubyte BytesRead[8] |
Definition at line 42 of file dexterind-wifi.h.
| ubyte endmarker[] = {27, 'E'} |
Definition at line 46 of file dexterind-wifi.h.
| ubyte linefeed[] = {0x0A} |
Definition at line 45 of file dexterind-wifi.h.
| long nRcvChars = 0 |
Definition at line 41 of file dexterind-wifi.h.
| string ssid = "xammy2" |
Definition at line 43 of file dexterind-wifi.h.
| ubyte wep[10] = {'0','F','B','3','B','A','7','9','E','B'} |
Definition at line 47 of file dexterind-wifi.h.
| ubyte wpa_psk[] = {'g','w','a','h','d','n','m','5','!',';',']'} |
Definition at line 48 of file dexterind-wifi.h.


STAR WARS: Episode I - THE PHANTOM MENACE Review
A Review by Jamey Hughton ***1/2 (out of five stars)
Starring-Liam Neeson, Ewan McGregor, Natalie Portman and Jake Lloyd Director-George Lucas Rated G
For more MOVIE VIEWS by Jamey Hughton, visit: http://welcome.to/movieviews
With all the hype that Star Wars: Episode 1- The Phantom Menace has been receiving, it seems almost impossible to avoid interest in seeing the film. The movie is easily the most anticipated motion picture ever, with a marketing campaign so strong it has brought Colonel Sanders, the Taco Bell Chihuahua and Pizza Hut together. Can George Lucas succeed yet again with transporting us back a long time ago, in a galaxy far, far away....?
YES. This Star Wars prequel may be the worst of the bunch, with amateurish dialogue and an overall lack of humanity. But that doesn't mean it fails to comply on the basis of solid entertainment. The Phantom Menace features the most eye-catching, jaw-dropping visual look in cinematic history. The tremendous action sequences will have you clinging to your arm rest, and the special effects are nothing short of the best (and most plentiful) to ever be caught on film.
The vast digitized worlds and sheer imagination that was applied to this project is astounding. The Phantom Menace is a delectable feast for the senses, even if it has some disappointing aspects.
After we're treated to the famous prologue in the sky, with John Williams' thundering score, we meet Qui-Gon Jonn (Liam Neeson) and young Obi-Wan Kenobi (Ewan McGregor), a Jedi master and his trainee `Padawan'. They are on the ship accommodating the fleet headquarters for the evil Trade Federation, and have been sent to settle disputes regarding the taxation of trade routes to the planet of Naboo.
Oh, but enough about that. The prime concern for this prequel is introducing young Anakin Skywalker (Jake Lloyd) into the picture. As you already know, this seemingly charming lad is the boy who will soon become Darth Vader.
A spectacular Pod Race comes soon hereafter. This particular race is the most exciting, energetic, high-octane action sequence that you'll ever see. One of the delights of the series is meeting the newest set of strange alien creatures that Lucas has devised, and The Phantom Menace is no exception. I loved Sebulba, the rat-like scoundrel whom Anakin has to face in the Pod Race, and Boss Nass, the leader of the Gungans (who are a neighbouring species to Naboo). One character who has been subject to criticism is Jar-Jar Binks, a member of the Gungan race. Jar-Jar speaks like Roger Rabbit on a hallucinogenic drug, and is there for the sole purpose of supplying comic relief. Yes, he is initially annoying, but I can admit to laughing over some of his harmless, goofy antics.
There is some lack of dramatic pull in this Star Wars entry, but the presentation almost makes you forget the plot and character lapses. The final light-saber battle, between the Jedi's and the horrific (and terminally underused) villain Darth Maul, is spectacular to behold. Jabba the Hutt, Yoda, C-3PO and R2-D2 have cameo appearances.
Lucas has not forget how to captivate an audience, even if his latest shows obvious signs of tiredness. One can only wonder what the possible technology will present for the next two installments, Episode's I and II. When they arrive, you'll know where to find me.
....................
MOVIE VIEWS by Jamey Hughton: http://welcome.to/movieviews<EMAIL_ADDRESS>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


Created by Rajendrasinh Parmar / @RAJENDRASINH_09
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
$ cd /home/user/my_project
$ git init
$ git clone https://github.com/USERNAME/REPOSITORY_NAME
$ git clone REPOSITORY_URL local_name
This command will add file to staging area
$ git add FILE_NAME1, FILE_NAME2
$ git add .
This command will log the commit messages on current branch
$ git log
commit 398d1300dce3e282008d462ebc74ec341e02eafb (HEAD -> master, origin/master, origin/HEAD)
Author: Rajendrasinh Parmar
Date: Wed May 2 00:49:10 2018 +0530
Add presentation for Git basics
Some more logging
$ git log --oneline -5
92dd52a (HEAD -> master, origin/master, origin/gh-pages, origin/HEAD, gh-pages) Add presentations to landing pages
757d23e Git basics presentation
398d130 Add presentation for Git basics
375427a Add package-lock file
79be285 Merge latest changes to fork repo
This command will commit the file(s) added to staging area
$ git commit -m "COMMIT_MESSAGE"
This command will checkout the branch
$ git checkout BRANCH_NAME
$ git checkout -b NEW_BRANCH_NAME
This command will fetch all the changes from remote repository to the local remote branch but will not merge them to actual local branch
$ git fetch REMOTE_NAME BRANCH_NAME
Merge all the changes from source branch the destination branch
$ git merge SOURCE_BRANCH
This command will pull all the changes from remote repository and merge them into local branch
$ git pull REMOTE_NAME BRANCH_NAME
This command will push all the committed changes from local branch to remote branch
$ git push REMOTE_NAME BRANCH_NAME
This is advanced git command that can be used to rewrite the git history
$ git pull REMOTE_NAME SOURCE_BRANCH
$ git checkout DESTINATION_BRANCH
$ git pull REMOTE_NAME DESTINATION_BRANCH
$ git rebase SOURCE_BRANCH


--- layout: base --- {% include header.html %} {{ page.intro }} {{ content }} Team {% include team.html %}
{{ page.intro }}


@(title: String = "The Best City", hasSearch: Boolean = true, image_paths: Seq[String] = Seq("index.jpg", "index.jpg"))


--- layout: post status: publish published: true title: Renaming Winforms author: display_name: Tomas Restrepo login: tomasr email<EMAIL_ADDRESS>url: http://winterdom.com/ author_login: tomasr author_email<EMAIL_ADDRESS>author_url: http://winterdom.com/ wordpress_id: 503 wordpress_url: http://winterdom.com/2003/09/renamingwinforms date: '2003-10-01 18:36:52 +0000' date_gmt: '2003-10-01 18:36:52 +0000' categories: - ".NET" tags: [] comments: [] ---
Eric Gunnerson asks a good question on renaming windows forms classes in the VS.NET designer.
My take on this is a little bit harsh, I have to admit: This question is only necessary because of what I consider an fairly crappy design decission: Tying the winforms designers to the code files and not the classes themselves!


My first website
This website contains everything that you need to know about me.
- I love Dancing with my wife and my mouse.
- My mouse is a really active mouse named Burt.
- We moved here from "The West Side" just 2 months ago and don't know anybody here.


Fill out this form to get the video that you desire
Fill in these fields to get the type of test you want.


The night before was consumed 20mg methadone, 4mg chlorpheniramine, 650mg acetaminophen and lots of prime indica. The effects of the methadone still being felt upon introduction of new chemicals.
16oz beer consumed earlier the day in question, the effects gone by time of ingestion. 30gm ground nutmeg washed down with sweetened coffee/vanilla mix, 19gm sassafras w/coffee vanilla mix, 2tsp dried parsley flake(1-2gm?) w/coffee mix. About 3 hours after ingestion 28oz of beer consumed(slowly). Just after this last bit of alcohol the real effects begin to take hold.(sweetener contains phenilalanine)
It started with pleasently euphoric stimulation for roughly two hours before the real mental effects began to show. Free flowing highly focused thoughts, creativity sparked writing flows smoothly almost no effort what-so-ever, feel very happy. Still highly stimulated, this lasted the whole time 12 or more hours. Some 8-9 hours after ingestion 2-3gm prime indica smoke resulting in intense visual phenomina for 4-5 hours. Body feels great light and fuzzy, faintly akin to mdma but not the same.
Roughly 14 hours after effects begin, still stimulated but ready for sleep. Lay back enjoying a most magical view of a valley with eyes closed, open eyes to a darkened room, still see the valley I was looking at.  Wake the next day to morning coffee, brings back stimulation from the previous night. Pleasently stimulated again, but the body feels like about the 2nd or 3rd hour of an oxcodone buzz, very nice. A lot different than a regular nutmeg hang over, much nicer. Later in the day more prime indica smoked, brings back some of the mental/visual pleasentries. Second day after back to normal.
Usually with nutmeg or sassafras alone I experience side effects, mainly headache, but there were no unpleasent side effects experienced with this combo, save for a slight tension of the back muscles at times. But this was not at all unpleasent. Overall it was much more enjoyable than nutmeg or sassafras alone. I believe uping the dose of sassafras and parsley just slightly would have been better, but with the addition of the indica it was just right for me.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Hello World!
Today we are going to take a look at how to create a simple Markov chain generator, by using markovify.
Let's get two ebooks from Project Gutenberg. For this tutorial we are going to use Alice in Wonderland and Grimms' Fairy Tales, you can download them as a UTF-8 txt.
Your project folder will be like this:
Let's start coding!
import nltk
# Let's declare a function to get word index
def get_index(in_list,in_string):
for num,row in enumerate(in_list):
if in_string in row:
return num
# We convert the script from the NLTK Stopwords tutorial into a def
def clean_book(path):
# Let's open the book we downloaded
book = open(path,'r').read()
# Divide text by rows
rows = book.split('\n')
# Search for START and END tags to remove useless parts
start_idx = get_index(rows,'*** START')
end_idx = get_index(rows,'*** END')
rows = rows[start_idx+1:end_idx]
# We need to create a string for markovify
text = '\n'.join([r for r in rows if r!=''])
return text
We are going to use some of the code we wrote in the last tutorial.
Let's create two functions:
• get_index(): Useful for getting the index of START and END
• clean_book(): Returns the book text without the parts added by Project Gutenberg
import markovify
# 1. Build the model.
ebook_a = clean_book('data/ebook.txt')
text_model_a = markovify.Text(ebook_a)
# 2. Print five randomly-generated sentences
for i in range(5):
print(text_model_a.make_sentence())
# 3. Print three randomly-generated sentences of no more than 140 characters
for i in range(3):
print(text_model_a.make_short_sentence(140))
Markovify is a really easy-to-use library. After importing we just need to create the model and we can start using it.
The steps are:
We build the model by using markovify.Text(). The input MUST be a string.
Then we can print sentences using the model we generated by calling text_model_a.make_sentence()
We can also make a short sentence using text_model_a.make_short_sentence(max_length_of_sentence)
# Recreate the model using 3 sentences
three_model = markovify.Text(ebook_a,state_size=3)
for i in range(5):
print(three_model.make_sentence())
We can also use more than 2 sentences to create markov chains by using the state_size variable.
# Build the second model.
ebook_b = clean_book('data/ebook2.txt')
text_model_b = markovify.Text(ebook_b)
for i in range(5):
print(text_model_b.make_sentence())
# Combine the models into a single one
both_models = markovify.combine([text_model_a,text_model_b])
for i in range(5):
print(both_models.make_sentence())
We can also build a second model and combine it with the first.
Here are some sentences generated by the combined model:
• When evening came, and it was very melancholy, and wandered up and rubbed its eyes: then it watched the geese on.
• ‘Well, then,’ the Gryphon only answered ‘Come on!’ cried the cat had a beautiful girl stood like a mountain.
• ‘Yes, dear father, your will shall be in a hurry.
• Then poor Snowdrop wandered along through the wood belonged was hunting in it, and shut his eyes, and died.
• The poor horse was the enemy’s commander-in-chief.
That's all for today! You can get the code of this post here


A while ago I needed to design a file format for my application. So after giving it a bit of thought I created what at the time seemed like the perfect file format for my app... All was going well until I needed to sore additional information in the file. Oops, this I had not planned for. So I had to sit down and again design a new format, this time allowing for additional data at a later stage. This file format works and is flexible but it is still not flexible enough.
I am sure something similar has happened to you. Some time or another you must have found a file format a bit limiting. Would it not be nice if there was a powerful and flexible way of saving data. Why not go for powerful, flexible and easy (ok, ok.. relatively easy ;-)?
Well, there is. Structured Storage.
A Structured Storage file is also called a DocFile or an OLE compound
file. I'll use these terms interchangeably throughout this article.
DocFiles have many features that make them a valuable tool. For example
Microsoft has said that Structured Storage will be the default
file format in future editions of windows. The MS-Office products are already
using structured storage. So learning it now will give you a head start.
So what are DocFiles?
The best way to think of a DocFiles is as having a file system within a file. What that means is that a DocFile can contain "directories" and "files".
For example a DocFile say Example.ole could contain
Each "file" is separate from the other. You just open a "file" and work with it, without opening or affecting any of the other "files" in the DocFile.
Some Terminology
| Storage | Equivalent of a directory, within the DocFile |
| Stream | Equivalent of a file in a DocFile. A stream exists in a storage just as a file exists in a directory. |
All information on these www pages is copyright (©) 1997 Andre .v.d. Merwe And may not be copied or mirrored without my permission.


Keeps the selection automatically synchronised in the tree (template) and data (hex) windows. See Synchronise Tree and Data for more information.
Turning on auto-synchronisation is particularly useful when the template is displayed in a split window, since you can see the elements of the template and the data bytes simultaneously. See Display Options page for information on using a split window for displaying the tree view.
Shortcuts
Toolbar:


Mallya’s Kingfisher House to go under the hammer again
Mumbai: The Kingfisher House — the erstwhile headquarters of the defunct Kingfisher Airlines Ltd. (KAL) – owned by absconding liquor baron Vijay Mallya, will be up for auction again. The 8th time in barely three years. The Debts Recovery Tribunal (DRT), Bengaluru, has announced a new auction date of November 27 through an online bidding process, for the beleaguered property.
From the original reserve price of Rs 135 crore during the first auction of the property — valued at around Rs 150 crore in 2016 — for the 8th auction this time, the reserve price is fixed at a staggeringly low of just Rs 54 crore, a sharp drop of 60 percent. The building, originally known as Paradigm, and later as Kingfisher House, includes a basement, an upper ground floor, a ground floor and an upper floor which are now up for sale, totally measuring 1,586 sq meters. It is situated on a plot measuring around 2,402 sq. meters in a coveted location, bang outside the Chhatrapati Shivaji Maharaj International Airport (CSMIA).
Experts say an important factor affecting the property sale is the massive encroachment — of around 725 sq. meters — giving a net saleable area of just 1,677 sq. meters. Another consideration weighing the minds of the potential buyers is the limited scope of a redevelopment or exploiting it in the future owing to the height restrictions on building constructions as it falls in the vicinity of the CSMIA, among the busiest in the country. (IANS)
Also Read: Defunct Kingfisher Airline promoters prevented shares worth over Rs 7,500 crore
Also Watch: Govt all set to push for the contentious Citizenship Bill in the winter session of Parliament


Forces android to scan an image file to appear in the phone's gallery.
See also: CreateImage, CreateCameraView, ScreenShot.
Example - Add Image to Gallery
function OnStart()
{
img = app.CreateImage( null, 1, 1 );
img.SetPaintColor( "green" );
img.DrawCircle( 0.5, 0.5, 0.3 );
img.Save( app.GetAppPath() + "/circle.jpg" );
app.ScanFile( "circle.jpg" );
app.ChooseImage();
}


Note the following differences between the Local Platform and Cloud Platform deployment targets.
The Local Platform target uses your on-premise data. The Cloud Platform target has access to the data in the Dataset Market. Both targets enable you to import custom datasets.
The Local Platform target uses your on-premise hardware. The Cloud Platform target uses the QuantConnect Cloud compute. For more information about the backtesting, research, and live trading nodes in QuantConnect Cloud, see Resources.
The Local Platform target is under the management of your on-premise team. The Cloud Platform target is under the management of the QuantConnect team.
The Local Platform target uses your on-premise hardware, so it requires you to procure and management your own hardware. The Cloud Platform target uses the hardware in QuantConnect Cloud, so you don't need to procure or manage any of the hardware.


Daichir, Priest of Earth:
If you lack the courage for this mission, tell me now. No? Karna Maprera!
Then hurry and use this Replenished Power Bead to recharge the Lucien's Altars in the mine. Do not forget that you must visit all 5 altars!
Good luck! Karna Maprera!


Ash's Squirtle
Squirtle was the sixth Pokémon that Ash had caught. Before Ash caught him, he was abandoned by an unknown coach along with several other Squirts, where they eventually formed the Squirt squad, and he became a leader. He soon fell in love with Ash after he saved him from a bomb blast carried out by Team R and decided to go with him because he allowed his unit to stay with local officer Jenny as firefighter Pokémon to put out fires for the local city.


Ph.D. Student
Princeton University
| Pronunciation | |
| Princeton, NJ | |
| Bengaluru, India | |
|<EMAIL_ADDRESS>|
I am a Ph.D. student in ECE at Princeton University, advised by Prof. Pramod Viswanath. I also work closely with Prof. Sewoong Oh and Prof. Hyeji Kim. My current research interests are in the application of machine learning for channel coding.
I received an MS in Electrical and Computer Engineering from the University of Illinois Urbana-Champaign in August 2022. Previously, I received a B.Tech in Electronics and Communication Engineering from NITK Surathkal.
During my undergraduate years I have been fortunate to work with Prof. Shri Narayanan at USC, Prof. Deepu Vijayasenan at NITK, and Prof. Prasanta Kumar Ghosh at IISc
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia dolore doloremque, tenetur temporibus fugit maiores, labore porro nobis laborum animi consectetur omnis cum iure obcaecati voluptatem, eius sunt totam dolorum voluptatibus nostrum doloribus! Ipsa, a, aspernatur tenetur hic eum expedita.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia dolore doloremque, tenetur temporibus fugit maiores, labore porro nobis laborum animi consectetur omnis cum iure obcaecati voluptatem, eius sunt totam dolorum voluptatibus nostrum doloribus! Ipsa, a, aspernatur tenetur hic eum expedita.
Education
-
Ph.D., 2022-Present
Princeton University -
M.S., 2021-2022
University of Illinois, Urbana-Champaign -
B.Tech., 2016-2020
National Institute of Technology Karnataka (NITK), Surathkal
News
-
August 2022: Joined ECE, Princeton University
-
July 2022: Finished my MS at UIUC!
-
May 2022: Attended ITA 2022, San Diego
-
April 2022: One paper accepted at ISIT 2022
-
January 2021: Joined ECE, University of Illinois Urbana-Champaign


QnEZ by
DanBit.ru
Suspend all tabs
Bookmarks folder:
Not set
Actions:
Bookmark tabs
Bookmark and close tabs
Suspend tabs
Split tabs to different windows
Execute actions on...
Tabs to the left
Tabs to the right
Tabs to the left and right
Selectected tabs
Bookmarks folder:
Save
Cancel


Here we explore the use of active-set and interior-point methods (the latter implemented by the commercial software MOSEK) for solving the quadratic subproblem inside SQP.
Before attempting to run this Julia code, make sure your computer is properly set up to run this code by following the setup instructions in the README of the git repository.
We begin by loading the Distributions, Mosek and JuMP Julia packages, as well as some function definitions used in the code chunks below.
using Pkg
using Random
using Printf
using Distributions
using SparseArrays
using LinearAlgebra
using Mosek
using JuMP
include("../code/datasim.jl");
include("../code/likelihood.jl");
include("../code/mixSQP.jl");
Next, initialize the sequence of pseudorandom numbers.
Random.seed!(1);
Let's begin with a smaller example with 50,000 samples.
n = round(Int,5e4);
z = normtmixdatasim(n);
Compute the $n \times k$ likelihood matrix for a mixture of zero-centered normals, with $k = 20$. Note that the rows of the likelihood matrix are normalized by default.
sd = autoselectmixsd(z,nv = 20);
L = normlikmatrix(z,sd = sd);
size(L)
First we run the mix-SQP algorithm a couple of times to precompile the relevant functions.
out = mixSQP(L,qpsubprob = "activeset",lowrank = "none",maxiter = 10,verbose = false);
out = mixSQP(L,qpsubprob = "mosek",lowrank = "none",maxiter = 10,verbose = false);
Fit the model using the SQP algorithm, with an active-set method to find the solution to the quadratic program at each SQP iteration.
@time out1 = mixSQP(L,qpsubprob = "activeset",lowrank = "none");
Next fit the model again using the same SQP algorithm, with the active-set method replaced by MOSEK.
@time out2 = mixSQP(L,qpsubprob = "mosek",lowrank = "none");
Both runs converged to a solution in a small number of iterations. The solutions are very similar:
maximum(abs.(out1["x"] - out2["x"]))
Solving the quadratic programs is only a small fraction of the total effort. Nonetheless, the effort of the active-set computations is much less than solving the quadratic subproblems with MOSEK.
@printf "Total runtime of active set method: %0.3f s.\n" sum(out1["qptiming"])
@printf "Total runtime of interior point method: %0.3f s.\n" sum(out2["qptiming"])
Let's now explore the accuracy and runtime of the active-set and MOSEK solvers in a larger data set.
z = normtmixdatasim(round(Int,1e5));
As before, we compute the $n \times k$ conditional likelihood matrix for a mixture of zero-centered normals. This time, we use a finer grid of $k = 40$ normal densities to compute this matrix.
k = 40;
sd = autoselectmixsd(z,nv = k);
L = normlikmatrix(z,sd = sd);
size(L)
Now we fit the model using the two variants of the SQP algorithm.
@time out1 = mixSQP(L,qpsubprob = "activeset",lowrank = "none",verbose = false);
@time out2 = mixSQP(L,qpsubprob = "mosek",lowrank = "none",verbose = false);
The first SQP run with the active-set method is only slightly faster. And, as before, the solutions are very similar:
maximum(abs.(out1["x"] - out2["x"]))
The amount of time spent solving the quadratic programs is again only a small proportion of the total:
@printf "Total runtime of active set method: %0.3f s.\n" sum(out1["qptiming"])
@printf "Total runtime of interior point method: %0.3f s.\n" sum(out2["qptiming"])
Therefore, although the active-set method is much faster than MOSEK, the overall impact on performance is relatively small.
The section gives information about the computing environment used to generate the results contained in this notebook, including the version of Julia, and the versions of the Julia packages used here.
Pkg.status("Distributions");
Pkg.status("Mosek");
Pkg.status("JuMP");
versioninfo()


10. Common pitfalls and recommended practices¶
The purpose of this chapter is to illustrate some common pitfalls and anti-patterns that occur when using scikit-learn. It provides examples of what not to do, along with a corresponding correct example.
10.1. Inconsistent preprocessing¶
scikit-learn provides a library of Dataset transformations, which may clean (see Preprocessing data), reduce (see Unsupervised dimensionality reduction), expand (see Kernel Approximation) or generate (see Feature extraction) feature representations. If these data transforms are used when training a model, they also must be used on subsequent datasets, whether it’s test data or data in a production system. Otherwise, the feature space will change, and the model will not be able to perform effectively.
For the following example, let’s create a synthetic dataset with a single feature:
>>> from sklearn.datasets import make_regression
>>> from sklearn.model_selection import train_test_split
>>> random_state = 42
>>> X, y = make_regression(random_state=random_state, n_features=1, noise=1)
>>> X_train, X_test, y_train, y_test = train_test_split(
... X, y, test_size=0.4, random_state=random_state)
Wrong
The train dataset is scaled, but not the test dataset, so model performance on the test dataset is worse than expected:
>>> from sklearn.metrics import mean_squared_error
>>> from sklearn.linear_model import LinearRegression
>>> from sklearn.preprocessing import StandardScaler
>>> scaler = StandardScaler()
>>> X_train_transformed = scaler.fit_transform(X_train)
>>> model = LinearRegression().fit(X_train_transformed, y_train)
>>> mean_squared_error(y_test, model.predict(X_test))
62.80...
Right
Instead of passing the non-transformed X_test
to predict
, we should
transform the test data, the same way we transformed the training data:
>>> X_test_transformed = scaler.transform(X_test)
>>> mean_squared_error(y_test, model.predict(X_test_transformed))
0.90...
Alternatively, we recommend using a Pipeline
, which makes it easier to chain transformations
with estimators, and reduces the possibility of forgetting a transformation:
>>> from sklearn.pipeline import make_pipeline
>>> model = make_pipeline(StandardScaler(), LinearRegression())
>>> model.fit(X_train, y_train)
Pipeline(steps=[('standardscaler', StandardScaler()),
('linearregression', LinearRegression())])
>>> mean_squared_error(y_test, model.predict(X_test))
0.90...
Pipelines also help avoiding another common pitfall: leaking the test data into the training data.
10.2. Data leakage¶
Data leakage occurs when information that would not be available at prediction time is used when building the model. This results in overly optimistic performance estimates, for example from cross-validation, and thus poorer performance when the model is used on actually novel data, for example during production.
A common cause is not keeping the test and train data subsets separate.
Test data should never be used to make choices about the model.
The general rule is to never call fit
on the test data. While this
may sound obvious, this is easy to miss in some cases, for example when
applying certain pre-processing steps.
Although both train and test data subsets should receive the same preprocessing transformation (as described in the previous section), it is important that these transformations are only learnt from the training data. For example, if you have a normalization step where you divide by the average value, the average should be the average of the train subset, not the average of all the data. If the test subset is included in the average calculation, information from the test subset is influencing the model.
An example of data leakage during preprocessing is detailed below.
10.2.1. Data leakage during pre-processing¶
Note
We here choose to illustrate data leakage with a feature selection step.
This risk of leakage is however relevant with almost all transformations
in scikit-learn, including (but not limited to)
StandardScaler
,
SimpleImputer
, and
PCA
.
A number of Feature selection functions are available in scikit-learn. They can help remove irrelevant, redundant and noisy features as well as improve your model build time and performance. As with any other type of preprocessing, feature selection should only use the training data. Including the test data in feature selection will optimistically bias your model.
To demonstrate we will create this binary classification problem with 10,000 randomly generated features:
>>> import numpy as np
>>> n_samples, n_features, n_classes = 200, 10000, 2
>>> rng = np.random.RandomState(42)
>>> X = rng.standard_normal((n_samples, n_features))
>>> y = rng.choice(n_classes, n_samples)
Wrong
Using all the data to perform feature selection results in an accuracy score
much higher than chance, even though our targets are completely random.
This randomness means that our X
and y
are independent and we thus expect
the accuracy to be around 0.5. However, since the feature selection step
‘sees’ the test data, the model has an unfair advantage. In the incorrect
example below we first use all the data for feature selection and then split
the data into training and test subsets for model fitting. The result is a
much higher than expected accuracy score:
>>> from sklearn.model_selection import train_test_split
>>> from sklearn.feature_selection import SelectKBest
>>> from sklearn.ensemble import GradientBoostingClassifier
>>> from sklearn.metrics import accuracy_score
>>> # Incorrect preprocessing: the entire data is transformed
>>> X_selected = SelectKBest(k=25).fit_transform(X, y)
>>> X_train, X_test, y_train, y_test = train_test_split(
... X_selected, y, random_state=42)
>>> gbc = GradientBoostingClassifier(random_state=1)
>>> gbc.fit(X_train, y_train)
GradientBoostingClassifier(random_state=1)
>>> y_pred = gbc.predict(X_test)
>>> accuracy_score(y_test, y_pred)
0.76
Right
To prevent data leakage, it is good practice to split your data into train
and test subsets first. Feature selection can then be formed using just
the train dataset. Notice that whenever we use fit
or fit_transform
, we
only use the train dataset. The score is now what we would expect for the
data, close to chance:
>>> X_train, X_test, y_train, y_test = train_test_split(
... X, y, random_state=42)
>>> select = SelectKBest(k=25)
>>> X_train_selected = select.fit_transform(X_train, y_train)
>>> gbc = GradientBoostingClassifier(random_state=1)
>>> gbc.fit(X_train_selected, y_train)
GradientBoostingClassifier(random_state=1)
>>> X_test_selected = select.transform(X_test)
>>> y_pred = gbc.predict(X_test_selected)
>>> accuracy_score(y_test, y_pred)
0.46
Here again, we recommend using a Pipeline
to chain
together the feature selection and model estimators. The pipeline ensures
that only the training data is used when performing fit
and the test data
is used only for calculating the accuracy score:
>>> from sklearn.pipeline import make_pipeline
>>> X_train, X_test, y_train, y_test = train_test_split(
... X, y, random_state=42)
>>> pipeline = make_pipeline(SelectKBest(k=25),
... GradientBoostingClassifier(random_state=1))
>>> pipeline.fit(X_train, y_train)
Pipeline(steps=[('selectkbest', SelectKBest(k=25)),
('gradientboostingclassifier',
GradientBoostingClassifier(random_state=1))])
>>> y_pred = pipeline.predict(X_test)
>>> accuracy_score(y_test, y_pred)
0.46
The pipeline can also be fed into a cross-validation
function such as cross_val_score
.
Again, the pipeline ensures that the correct data subset and estimator
method is used during fitting and predicting:
>>> from sklearn.model_selection import cross_val_score
>>> scores = cross_val_score(pipeline, X, y)
>>> print(f"Mean accuracy: {scores.mean():.2f}+/-{scores.std():.2f}")
Mean accuracy: 0.45+/-0.07
10.2.2. How to avoid data leakage¶
Below are some tips on avoiding data leakage:
Always split the data into train and test subsets first, particularly before any preprocessing steps.
Never include test data when using the
fit
andfit_transform
methods. Using all the data, e.g.,fit(X)
, can result in overly optimistic scores.Conversely, the
transform
method should be used on both train and test subsets as the same preprocessing should be applied to all the data. This can be achieved by usingfit_transform
on the train subset andtransform
on the test subset.The scikit-learn pipeline is a great way to prevent data leakage as it ensures that the appropriate method is performed on the correct data subset. The pipeline is ideal for use in cross-validation and hyper-parameter tuning functions.
10.3. Controlling randomness¶
Some scikit-learn objects are inherently random. These are usually estimators
(e.g. RandomForestClassifier
) and cross-validation
splitters (e.g. KFold
). The randomness of
these objects is controlled via their random_state
parameter, as described
in the Glossary. This section expands on the glossary
entry, and describes good practices and common pitfalls w.r.t. to this
subtle parameter.
Note
Recommendation summary
For an optimal robustness of cross-validation (CV) results, pass
RandomState
instances when creating estimators, or leave random_state
to None
. Passing integers to CV splitters is usually the safest option
and is preferable; passing RandomState
instances to splitters may
sometimes be useful to achieve very specific use-cases.
For both estimators and splitters, passing an integer vs passing an
instance (or None
) leads to subtle but significant differences,
especially for CV procedures. These differences are important to
understand when reporting results.
For reproducible results across executions, remove any use of
random_state=None
.
10.3.1. Using None
or RandomState
instances, and repeated calls to fit
and split
¶
The random_state
parameter determines whether multiple calls to fit
(for estimators) or to split (for CV splitters) will produce the same
results, according to these rules:
If an integer is passed, calling
fit
orsplit
multiple times always yields the same results.If
None
or aRandomState
instance is passed:fit
andsplit
will yield different results each time they are called, and the succession of calls explores all sources of entropy.None
is the default value for allrandom_state
parameters.
We here illustrate these rules for both estimators and CV splitters.
Note
Since passing random_state=None
is equivalent to passing the global
RandomState
instance from numpy
(random_state=np.random.mtrand._rand
), we will not explicitly mention
None
here. Everything that applies to instances also applies to using
None
.
<IP_ADDRESS>. Estimators¶
Passing instances means that calling fit
multiple times will not yield the
same results, even if the estimator is fitted on the same data and with the
same hyper-parameters:
>>> from sklearn.linear_model import SGDClassifier
>>> from sklearn.datasets import make_classification
>>> import numpy as np
>>> rng = np.random.RandomState(0)
>>> X, y = make_classification(n_features=5, random_state=rng)
>>> sgd = SGDClassifier(random_state=rng)
>>> sgd.fit(X, y).coef_
array([[ 8.85418642, 4.79084103, -3.13077794, 8.11915045, -0.56479934]])
>>> sgd.fit(X, y).coef_
array([[ 6.70814003, 5.25291366, -7.55212743, 5.18197458, 1.37845099]])
We can see from the snippet above that repeatedly calling sgd.fit
has
produced different models, even if the data was the same. This is because the
Random Number Generator (RNG) of the estimator is consumed (i.e. mutated)
when fit
is called, and this mutated RNG will be used in the subsequent
calls to fit
. In addition, the rng
object is shared across all objects
that use it, and as a consequence, these objects become somewhat
inter-dependent. For example, two estimators that share the same
RandomState
instance will influence each other, as we will see later when
we discuss cloning. This point is important to keep in mind when debugging.
If we had passed an integer to the random_state
parameter of the
RandomForestClassifier
, we would have obtained the
same models, and thus the same scores each time. When we pass an integer, the
same RNG is used across all calls to fit
. What internally happens is that
even though the RNG is consumed when fit
is called, it is always reset to
its original state at the beginning of fit
.
<IP_ADDRESS>. CV splitters¶
Randomized CV splitters have a similar behavior when a RandomState
instance is passed; calling split
multiple times yields different data
splits:
>>> from sklearn.model_selection import KFold
>>> import numpy as np
>>> X = y = np.arange(10)
>>> rng = np.random.RandomState(0)
>>> cv = KFold(n_splits=2, shuffle=True, random_state=rng)
>>> for train, test in cv.split(X, y):
... print(train, test)
[0 3 5 6 7] [1 2 4 8 9]
[1 2 4 8 9] [0 3 5 6 7]
>>> for train, test in cv.split(X, y):
... print(train, test)
[0 4 6 7 8] [1 2 3 5 9]
[1 2 3 5 9] [0 4 6 7 8]
We can see that the splits are different from the second time split
is
called. This may lead to unexpected results if you compare the performance of
multiple estimators by calling split
many times, as we will see in the next
section.
10.3.2. Common pitfalls and subtleties¶
While the rules that govern the random_state
parameter are seemingly simple,
they do however have some subtle implications. In some cases, this can even
lead to wrong conclusions.
<IP_ADDRESS>. Estimators¶
Different `random_state` types lead to different cross-validation procedures
Depending on the type of the random_state
parameter, estimators will behave
differently, especially in cross-validation procedures. Consider the
following snippet:
>>> from sklearn.ensemble import RandomForestClassifier
>>> from sklearn.datasets import make_classification
>>> from sklearn.model_selection import cross_val_score
>>> import numpy as np
>>> X, y = make_classification(random_state=0)
>>> rf_123 = RandomForestClassifier(random_state=123)
>>> cross_val_score(rf_123, X, y)
array([0.85, 0.95, 0.95, 0.9 , 0.9 ])
>>> rf_inst = RandomForestClassifier(random_state=np.random.RandomState(0))
>>> cross_val_score(rf_inst, X, y)
array([0.9 , 0.95, 0.95, 0.9 , 0.9 ])
We see that the cross-validated scores of rf_123
and rf_inst
are
different, as should be expected since we didn’t pass the same random_state
parameter. However, the difference between these scores is more subtle than
it looks, and the cross-validation procedures that were performed by
cross_val_score
significantly differ in
each case:
Since
rf_123
was passed an integer, every call tofit
uses the same RNG: this means that all random characteristics of the random forest estimator will be the same for each of the 5 folds of the CV procedure. In particular, the (randomly chosen) subset of features of the estimator will be the same across all folds.Since
rf_inst
was passed aRandomState
instance, each call tofit
starts from a different RNG. As a result, the random subset of features will be different for each folds.
While having a constant estimator RNG across folds isn’t inherently wrong, we usually want CV results that are robust w.r.t. the estimator’s randomness. As a result, passing an instance instead of an integer may be preferable, since it will allow the estimator RNG to vary for each fold.
Note
Here, cross_val_score
will use a
non-randomized CV splitter (as is the default), so both estimators will
be evaluated on the same splits. This section is not about variability in
the splits. Also, whether we pass an integer or an instance to
make_classification
isn’t relevant for our
illustration purpose: what matters is what we pass to the
RandomForestClassifier
estimator.
Cloning
Another subtle side effect of passing RandomState
instances is how
clone
will work:
>>> from sklearn import clone
>>> from sklearn.ensemble import RandomForestClassifier
>>> import numpy as np
>>> rng = np.random.RandomState(0)
>>> a = RandomForestClassifier(random_state=rng)
>>> b = clone(a)
Since a RandomState
instance was passed to a
, a
and b
are not clones
in the strict sense, but rather clones in the statistical sense: a
and b
will still be different models, even when calling fit(X, y)
on the same
data. Moreover, a
and b
will influence each-other since they share the
same internal RNG: calling a.fit
will consume b
’s RNG, and calling
b.fit
will consume a
’s RNG, since they are the same. This bit is true for
any estimators that share a random_state
parameter; it is not specific to
clones.
If an integer were passed, a
and b
would be exact clones and they would not
influence each other.
Warning
Even though clone
is rarely used in user code, it is
called pervasively throughout scikit-learn codebase: in particular, most
meta-estimators that accept non-fitted estimators call
clone
internally
(GridSearchCV
,
StackingClassifier
,
CalibratedClassifierCV
, etc.).
<IP_ADDRESS>. CV splitters¶
When passed a RandomState
instance, CV splitters yield different splits
each time split
is called. When comparing different estimators, this can
lead to overestimating the variance of the difference in performance between
the estimators:
>>> from sklearn.naive_bayes import GaussianNB
>>> from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
>>> from sklearn.datasets import make_classification
>>> from sklearn.model_selection import KFold
>>> from sklearn.model_selection import cross_val_score
>>> import numpy as np
>>> rng = np.random.RandomState(0)
>>> X, y = make_classification(random_state=rng)
>>> cv = KFold(shuffle=True, random_state=rng)
>>> lda = LinearDiscriminantAnalysis()
>>> nb = GaussianNB()
>>> for est in (lda, nb):
... print(cross_val_score(est, X, y, cv=cv))
[0.8 0.75 0.75 0.7 0.85]
[0.85 0.95 0.95 0.85 0.95]
Directly comparing the performance of the
LinearDiscriminantAnalysis
estimator
vs the GaussianNB
estimator on each fold would
be a mistake: the splits on which the estimators are evaluated are
different. Indeed, cross_val_score
will
internally call cv.split
on the same
KFold
instance, but the splits will be
different each time. This is also true for any tool that performs model
selection via cross-validation, e.g.
GridSearchCV
and
RandomizedSearchCV
: scores are not
comparable fold-to-fold across different calls to search.fit
, since
cv.split
would have been called multiple times. Within a single call to
search.fit
, however, fold-to-fold comparison is possible since the search
estimator only calls cv.split
once.
For comparable fold-to-fold results in all scenarios, one should pass an
integer to the CV splitter: cv = KFold(shuffle=True, random_state=0)
.
Note
While fold-to-fold comparison is not advisable with RandomState
instances, one can however expect that average scores allow to conclude
whether one estimator is better than another, as long as enough folds and
data are used.
Note
What matters in this example is what was passed to
KFold
. Whether we pass a RandomState
instance or an integer to make_classification
is not relevant for our illustration purpose. Also, neither
LinearDiscriminantAnalysis
nor
GaussianNB
are randomized estimators.
10.3.3. General recommendations¶
<IP_ADDRESS>. Getting reproducible results across multiple executions¶
In order to obtain reproducible (i.e. constant) results across multiple
program executions, we need to remove all uses of random_state=None
, which
is the default. The recommended way is to declare a rng
variable at the top
of the program, and pass it down to any object that accepts a random_state
parameter:
>>> from sklearn.ensemble import RandomForestClassifier
>>> from sklearn.datasets import make_classification
>>> from sklearn.model_selection import train_test_split
>>> import numpy as np
>>> rng = np.random.RandomState(0)
>>> X, y = make_classification(random_state=rng)
>>> rf = RandomForestClassifier(random_state=rng)
>>> X_train, X_test, y_train, y_test = train_test_split(X, y,
... random_state=rng)
>>> rf.fit(X_train, y_train).score(X_test, y_test)
0.84
We are now guaranteed that the result of this script will always be 0.84, no
matter how many times we run it. Changing the global rng
variable to a
different value should affect the results, as expected.
It is also possible to declare the rng
variable as an integer. This may
however lead to less robust cross-validation results, as we will see in the
next section.
Note
We do not recommend setting the global numpy
seed by calling
np.random.seed(0)
. See here
for a discussion.
<IP_ADDRESS>. Robustness of cross-validation results¶
When we evaluate a randomized estimator performance by cross-validation, we
want to make sure that the estimator can yield accurate predictions for new
data, but we also want to make sure that the estimator is robust w.r.t. its
random initialization. For example, we would like the random weights
initialization of a SGDCLassifier
to be
consistently good across all folds: otherwise, when we train that estimator
on new data, we might get unlucky and the random initialization may lead to
bad performance. Similarly, we want a random forest to be robust w.r.t the
set of randomly selected features that each tree will be using.
For these reasons, it is preferable to evaluate the cross-validation
performance by letting the estimator use a different RNG on each fold. This
is done by passing a RandomState
instance (or None
) to the estimator
initialization.
When we pass an integer, the estimator will use the same RNG on each fold: if the estimator performs well (or bad), as evaluated by CV, it might just be because we got lucky (or unlucky) with that specific seed. Passing instances leads to more robust CV results, and makes the comparison between various algorithms fairer. It also helps limiting the temptation to treat the estimator’s RNG as a hyper-parameter that can be tuned.
Whether we pass RandomState
instances or integers to CV splitters has no
impact on robustness, as long as split
is only called once. When split
is called multiple times, fold-to-fold comparison isn’t possible anymore. As
a result, passing integer to CV splitters is usually safer and covers most
use-cases.


Are you a student trying to learn the Java language or a
professional seeking to expand your skill set? If you are feeling a
bit overwhelmed by the breadth of the Java platform, here are a few
suggested learning paths to help you get the most from your Java
learning experience.
New To Java
The following trails are most useful for
beginners:
- Getting Started – An
introduction to Java technology and lessons on installing Java
development software and using it to create a simple program.
- Learning the Java Language
– Lessons describing essential concepts such as classes,
objects, inheritance, datatypes, generics, and packages.
- Essential Java Classes
– Lessons on exceptions, basic input/output, concurrency,
regular expressions, and the platform environment.
Building On The
Foundation
Ready to dive deeper into the technology?
See the following topics:
- Collections –
Lessons on using and extending the Java Collections Framework.
- Packaging Programs In JAR
Files – Lesson on creating and signing JAR files.
- Internationalization – An
introduction to designing software so that it can be easily be
adapted (localized) to various languages and regions.
- Reflection – An API that
represents ("reflects") the classes, interfaces, and objects in the
current Java Virtual Machine.
- Security – Java
platform features that help protect applications from malicious
software.
- JavaBeans – The Java
platform's component technology.
- The Extension Mechanism –
How to make custom APIs available to all applications running on
the Java platform.
- Generics – An
enhancement to the type system that supports operations on objects
of various types while providing compile-time type safety.
Cherish the Client?
If you want to focus on developing Java based desktop solutions
and rich Internet applications, see the following topics:
- Swing – An introduction to
the Swing GUI toolkit, with an overview of features and a visual
catalog of components. See below for a more comprehensive tutorial
on Swing.
- Creating a GUI with Swing
– A comprehensive introduction to GUI creation on the Java
platform.
- Deployment – How to
package applications and applets using JAR files, and deploy them
using Java Web Start and Java Plug-in.
- 2D Graphics – How to display
and print 2D graphics in applications.
- Full-Screen Exclusive
Mode API – How to write applications that more fully
utilize the user's graphics hardware.
Fervor Over Server!
If you are interested in acquiring skills important for
middleware, server-side, or web application development, see the
following trails:
- JDBC Database Access –
Introduces an API for connectivity between the Java applications
and a wide range of databases and a data sources.
- JMX – Java Management
Extensions provides a standard way of managing resources such as
applications, devices, and services.
- JNDI – Java Naming and
Directory Interface enables accessing the Naming and Directory
Service such as DNS and LDAP.
- JAXP – Introduces the Java
API for XML Processing (JAXP) 1.4 technology.
- RMI – The Remote Method
Invocation API allows an object to invoke methods of an object
running on another Java Virtual Machine.
- Concurrency
– The Java platform has APIs to help you develop
multi-threaded programs.


Core Features
- Java template engine for XML, XHTML and HTML5. Extensible to other template formats.
- Works both in web and non-web (offline) environments. No hard dependency on the Servlet API.
- Based on modular feature sets called dialects.
- Dialect features (e.g.: evaluation, iteration, etc.) are applied by linking them to template's tags and/or attributes.
- Two dialects available out-of-the-box: Standard and SpringStandard (for Spring MVC apps, same syntax as Standard).
- Developers can extend and create custom dialects.
- Several template modes out-of-the-box (extensible):
- XML: validating against a DTD or not.
- XHTML 1.0 and 1.1: validating against standard DTDs or not.
- HTML5: both XML-formed code and legacy-based HTML5. Legacy non-XML code will be automatically cleaned and converted to XML form.
- Full (and extensible) internationalization support.
- Configurable, high performance parsed template cache that reduces input/output to the minimum.
- Automatic DOCTYPE translations —from template DTD to result DTD— for (optional) validation of both template and result code.
- Extremely extensible: can be used as a template engine framework if needed.
- Complete documentation including several example applications.
Standard and SpringStandard Dialects
- XML, XHTML 1.0, XHTML 1.1 and HTML5 support.
- Complete substitute for view-layer web technologies such as JSP.
- Easy-to-use, elegant syntax based on attributes only (these dialects include no tags).
- Great for web templates: <input type="text" th:field="*{name}" /> instead of <mylib:text field="name" />
- Natural templating for easy prototyping: display your templates statically in a browser (without running your app server).
- Expression evaluation: OGNL (Standard) and Spring Expression Language (SpringStandard).
- Complete integration with Spring MVC (SpringStandard): form binding, property editors, internationalization, etc.
- Spring Security support.
- Spring WebFlow support (including AJAX events).
- Fully-featured template logic: iteration, conditional evaluation, context variable declaration, etc.
- Several options for layout (Composite View pattern):
- A builtin mechanism (Thymeleaf's native fragment inclusion).
- Specific Apache Tiles integration (through extras package).
- Can be used along with SiteMesh.
- Internationalization support: easy inclusion of externalized messages into templates.
- URL rewriting capabilities for adding context and session information to URLs.
- JavaScript and Dart inlining: intelligent evaluation of expressions inside javascript/dart code.
- Template validation support for XML, XHTML 1.0 and XHTML 1.1.
Extensibility
- Dialects:
- Out-of-the-box: Standard and SpringStandard dialects.
- New custom dialects can be created, and existing ones can be extended.
- Several dialects can be applied at the same time.
- Template resolution:
- Out-of-the-box: templates can be read as classloader or ServletContext resources, as well as files (from the filesystem) and by calling URLs.
- Custom template resolvers can be developed.
- Message resolution (for internationalization):
- Out-of-the-box:
- Standard dialect: Resolution of messages from .properties files for each template.
- SpringStandard dialect: Resolution of messages from Spring MessageSource objects.
- Custom message resolvers can be developed.
- Out-of-the-box:
- Template modes:
- Out-of-the-box: XML, VALIDXML, XHTML, VALIDXHTML, HTML5 and LEGACYHTML5.
- Can be extended to process anything that can be modelled as a DOM tree, as long as both a parser and a results writer are provided.
- Cache management:
- Out-of-the-box: comprehensive set of robust caches for templates, code fragments, messages and expressions.
- Can be extended to modify (or disable) standard cache strategies, and also create new ones for specific purposes.
- Advantages obtained through extension:
- Addition of required specific features to existing dialects.
- Creation of view-layer reusable components (à la JSP taglibs).
- Creation of custom templating systems for user-customizable applications.
Testing
Thymeleaf has its own specialized testing library, compatible with most general testing frameworks like JUnit. This library allows you to test your application's view layer, as well as any thymeleaf extensions you develop.
Learn more at the testing library page in GitHub.
Main Integrations
The Thymeleaf team and community have created a series of integrations for the following technologies:
- Apache Tiles 2.x: https://github.com/thymeleaf/thymeleaf-extras-tiles2
- Spring Security 3.x: https://github.com/thymeleaf/thymeleaf-extras-springsecurity3
- Eclipse IDE: https://github.com/thymeleaf/thymeleaf-extras-eclipse-plugin
- Play Framework 1.2: http://www.playframework.org/modules/thymeleaf
See more at the ecosystem page.
Other Integrations
Thymeleaf is also supported by:
- JRebel 5.2: http://zeroturnaround.com/software/jrebel/
Community
- User forums: http://forum.thymeleaf.org
- Issue tracking: Issue Tracking page
- Twitter: @thymeleaf


Toggle navigation
프로젝트 매니저
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
View All
박현우
사용자 정보
설정
Log Out
메인
프로젝트관리
일정관리
P-helper
Tip
PPT-Sample
ETC../
메인 제목
소제목 임시 테스트
여기부터 탭에 해당하는 내용 들어옴
채팅
that mongodb thing looks good, huh? tiny master db, and huge document store
Timothy • 51 min
that mongodb thing looks good, huh? tiny master db, and huge document store
Timothy • 51 min
that mongodb thing looks good, huh? tiny master db, and huge document store
Timothy • 51 min
that mongodb thing looks good, huh? tiny master db, and huge document store
Timothy • 51 min
that mongodb thing looks good, huh? tiny master db, and huge document store
Timothy • 51 min
that mongodb thing looks good, huh? tiny master db, and huge document store
Timothy • 51 min


What:
-The SDK has a method to list of IDs for all of the alphas listed in the Alpha Market (GetAlphaList)
-The
SDK has a method to list all of the tags given to alphas Alpha Market,
along with the number of alphas that have the associated tag
(GetAlphaTags)
Why use these:
-The alpha ID is needed to get more information on the alpha for further analysis
-Tags
are useful because if you want to search for an alpha with a specific
tag, you need to know what tags are currently used in the Alpha Market.
-The
number of alphas that have a tag is useful information because if there
is a low number of alphas with a certain tag, the alphas with that tag
may have lower correlation with the other alphas in the market


The Booksmart tale is set on the last day of high school in the suburbs of Los Angeles and at its center is a pair of ambitious and studious best friends, Molly and Amy. Molly, played by Beanie Feldstein (a scene stealer in Lady Bird), thinks she’s better than everyone else, with the exception of BFF Amy. Her alarm’s ringtone is set to the Hail to the Chief Presidential anthem – she’s the Student Body President – and soon she’ll be in Yale and eventually become, according to her, the youngest Justice ever nominated to the Supreme Court. Amy, played by Kaitlyn Dever (fantastic in her dramatic roles in Short Term 12 and Unbelievable) , is labeled as Molly’s quieter sidekick but is just as brilliant in her own right and will spend the summer making tampons for women in Botswana before attending Columbia. While their classmates have been hanging out and messing around, the duo spent their time in college libraries and strengthening their résumés.
Molly’s assumptions of the world are shattered in a school bathroom when she learns the classmates she’s perceived as slackers who only care about sex and partying are also attending Ivy Leagues and other highly ranked schools. Only one of her peers isn’t going to college... because he got recruited to code for Google.
“We chose, we didn’t party because we wanted to focus on school and get into good colleges. But the irresponsible people who partied also got into those colleges, they did both,” Molly says to Amy, a few minutes before chucking a celebratory cake off a hill. After the shocking revelation, Molly is determined to cram four years of partying in one night.
 But Olivia Wilde’s directorial debut — released in May 2019 and currently on Hulu — is less sex obsessed and more focused on female friendships and high school stereotypes (the nerds, jocks, stoners, etc.) as myths to be debunked. Booksmart is not completely deprived of sex, both Molly and Amy pursue their own romantic endeavors, talk candidly about masturbation, and respectfully learn about lesbian sex via porn: “It’s just a sexy documentary! It’s a hot doc.”
The main love story is Feldstein and Dever’s on-screen bond. The pair sold Molly and Amy’s crucial codependent dynamic that will be tested throughout the night as they try to prove they are smart and fun. Their connection breathes through the screen, similar to Abbi and Ilana from Broad City. Feldstein marvelously plays out Molly’s superiority complex and strong willed nature while Dever wonderfully executes Amy’s shy persona and her loyalty to Molly even when she’s overwhelmed by her friend’s grandiose personality.
Their performances were not the only triumph among the ensemble. The supporting characters are just as remarkable as the main stars, including the shockingly hilarious Billie Lourd as Gigi, who’s attending her fifth choice in colleges: Harvard (don’t judge her), and Skylar Gisondo as the sad rich boy Jared who listens to feminist audiobooks before partying.
The rapid-fire dialogue is punctuated by a lively stop-motion animated Barbie doll sequence, a cathartic underwater scene as Perfume Genius’s Slip Away plays, and a realistic use of the F-bombs. With whip smart cinematography and an addictive soundtrack, Booksmart is fast but not abrasive, inclusive and progressive without sacrificing an ounce of humor, and refreshing with a sweet-but-badass tone.
With the creation of diverse multidimensional characters that aren’t reduced to a trope, Booksmart will be one of the few coming of age films to endure the passing of time, similar to Ferris Bueller’s Day Off and Dazed and Confused. Actor-turned-director Wilde and a female screenwriter quartet assembled a sharp and hilariously rewatchable love letter to female friendships and high schoolers on the cusp of moving on. One day in the future, this film will be considered a cult classic, an echo of the Gen Z high school experience.


October 1
By him therefore let us offer the sacrifice of praise to God continually, that is, the fruit of our lips giving thanks to his name. Hebrews 13:15
Great things happen when you continually confess the mercy of God. Faith rises up on the inside of you. The reality that God loves you begins to sing through your spirit.
What's more, it brings honor to your Father when you believe His Word and magnify His love and mercy. You honor Him when you speak of His goodness and loving-kindness, when you talk about Him as your Father of love Who does only good. It blesses Him when you praise Him as the great God of the universe who is eager to bless and Who even gave His own Son because He so loved the world.
David was a man after God's own heart. He knew how to praise his God. Until you have the Word dwelling in you richly so that you can speak psalms and praises out of your own spirit, use the praises of David to magnify God. Speak them or sing them out loud to the Father.
Put His words continually on your lips. You will soon begin to experience the thrill and the joy of realizing that God is indeed "rich in mercy" because of His great love with which He loved us. Your faith will rise to new heights and your Father will be blessed! And you will be blessed.
Scripture Reading: Psalm 89:1-18


AtMYB DNA methylation expression Arabidopsis stress salt siRNAs Fig. promoter plants gene transcription RNA RdDM analysis -nt siRNA transgenic GUS region {border-style AtMYB, NaCl Plant px;} response #ffffff;} transcriptional accumulation regulation Cell RR-MYB Supplementary silencing CHH results protein qRT-PCR target MYB control factor pathway represent using abiotic bars germination involved plants. responses stress. used Biology RNAi Zhu activity genes lines performed seedlings < -day-old Jacobsen Zhang epigenetic independent indicate polymerase sequencing small thaliana treated Liu RNA-directed Zheng different level mutants plant px; regulated {font-family PCR blot containing demethylation factors font-size function rdd region. seeds sequence shown stress, targeting tissues treatment A). Arabidopsis. Bisulphite Cao DML Error National RdDM, Science Table WT, Yang bisulphite double; plants, present regulate revealed seed study suggest transformed (A) (Student’s Abe AtMYB. Current GFP Henderson However, JXB Molecular Morales-Ruiz Research Salt Shandong according acid border-color border-width cDNA changes clones conditions data described differences family genes, growth identified kit localization mechanism methylation. obtained previously proteins putative rates real-time reported role significant solid; statistically suggesting t-test). transcripts triple {font-style {font-weight (B) (C) -azaC -methylcytosine Academy America Ariza C). CMT Chan Chen D). DRM Denekamp EMBO Ecker Gong Jin Kim Ortega-Galisteo P-R, Physiology Proceedings RNA-dependent RNAs Results Roldan-Arjona Scale Sciences States United Yan Zilberman abscisic activation active artificial assay available benthamiana bold carried contexts control. courier; em; encodes evidence expressed family, findings functional genome group hairpin higher important indicating involvement leaves levels lower mRNA mainly marker mediates medium members methyltransferase mutant), normalized novo nuclear observed osmotic overexpression percentage performed. pt;} quantitative reduction regulates required respectively reverse seedling showed signalling sites staining stresses study. tolerance upstream various work


I have to admit that my perfectionist ways initially made the rebuild a little overwhelming. In my mind I had a vision of exactly what I wanted to build, and I got extremely frustrated at challenging points of my rebuild when my vision didn't align with what I had the skills to create.
Once I checked in with myself and inquired as to why I was feeling blocked and frustrated, I was able to move through it, embracing all the new things I had learned thus far on my journey. Once I got into a good rhythm with having a tutu with my code, looking at what did and didn't work, and refining, I found that I was way more comfortable and less overwhelmed. It's not about the destination, it's about the journey.
Ommmmmmmmmmm. Meditation has helped me in many ways. I see it as a form of self-love that helps me stay present rather than getting lost in my thoughts. I would recommend Eckhart Tolle's "The Power of Now" to anyone wanting to explore this idea further.
I found the process of mindfulness meditation a useful new learning.
Meditation is like magic. Imagine what the world would be like if we were taught meditation as children.