BAG -- Bathymetry Attributed Grid
Driver short name
BAG
Build dependencies
libhdf5
This driver provides read-only support, and starting with GDAL 2.4 for creation, for bathymetry data in the BAG format. BAG files are actually a specific product profile in an HDF5 file, but a custom driver exists to present the data in a more convenient manner than is available through the generic HDF5 driver.
BAG files have two image bands representing Elevation (band 1), Uncertainty (band 2) values for each cell in a raster grid area. Nominal Elevation values may also be present, and starting with GDAL 3.2, any 2D array of numeric data type and with the same dimensions as Elevation present under BAG_root will be reported as a GDAL band.
The geotransform and coordinate system is extracted from the internal XML metadata provided with the dataset. However, some products may have unsupported coordinate system formats, if using the non-WKT way of encoding the spatial reference system.
The full XML metadata is available in the "xml:BAG" metadata domain.
Nodata, minimum and maximum values for each band are also reported.
Driver capabilities
Supports CreateCopy()
This driver supports the GDALDriver::CreateCopy()
operation
Supports Georeferencing
This driver supports georeferencing
Supports VirtualIO
This driver supports virtual I/O operations (/vsimem/, etc.)
Open options
For open options specific to variable resolution, see following chapter.
Other open options are:
REPORT_VERTCRS=[YES/NO]: (GDAL >= 3.2) Defaults to
YES
. To report the vertical CRS from BAG XML metadata as the vertical component of a compound CRS. If set to NO, only the horizontal part will be reported.
Variable resolution (VR) grid support
Starting with GDAL 2.4, GDAL can handle BAG files with variable resolution grids. Such datasets are made of a low-resolution grid, which is the one presented by default by the driver, and for each of those low-resolution cells, a higher resolution grid can be present in the file. Such higher resolution grids are dubbed "supergrids" in GDAL.
The driver has different modes of working which can be controlled by the MODE open option:
MODE=[LOW_RES_GRID/LIST_SUPERGRIDS/RESAMPLED_GRID/AUTO]: Defaults to AUTO
. Driver mode.
MODE=LOW_RES_GRID: this is the default mode (unless opening a supergrid). The driver will expose the low resolution grid, and indicate in the dataset metadata if the dataset has supergrids (HAS_SUPERGRIDS=TRUE), as well as the minimum and maximum resolution of those grids.
MODE=LIST_SUPERGRIDS: in this mode, the driver will report the various supergrids in the subdataset list. It is possible to apply in this mode additional open options to restrict the search
SUPERGRIDS_INDICES=<(y1,x1),(y2,x2),...>: Tuple or list of tuples, of supergrids described by their y,x indices (starting from 0, y from the south of the grid, x from the west o the grid).
MINX=value: Minimum georeferenced X value to use as a filter for the supergrids to list.
MINY=value: Minimum georeferenced Y value to use as a filter for the supergrids to list.
MAXX=value: Maximum georeferenced X value to use as a filter for the supergrids to list.
MAXY=value: Maximum georeferenced Y value to use as a filter for the supergrids to list.
RES_FILTER_MIN=value: Minimum resolution of supergrids to take into account (excluded bound)
RES_FILTER_MAX=value: Maximum resolution of supergrids to take into account (included bound)
Opening a supergrid. This mode is triggered by using as a dataset name a string formatted like BAG:my.bag:supergrid:{y}:{x}, which is the value of the SUBDATASET_x_NAME metadata items reported by the above described mode. {y} is the index (starting from 0, from the south of the grid), and {x} is the index (starting from 0, from the west of the grid) of the supergrid to open.
MODE=RESAMPLED_GRID: in this mode, the user specify the extent and resolution of a target grid, and for each cell of this target grid, the driver will find the nodes of the supergrids that fall into that cell. By default, it will select the node with the maximum elevation value to populate the cell value. Or if no node of any supergrid are found, the cell value will be set to the nodata value. Overviews are reported: note that, those overviews correspond to resampled grids computed with different values of the RESX and RESY parameters, but using the same value population rules (and not nearest neighbour resampling of the full resolution resampled grid).
The available open options in this mode are:
MINX=value: Minimum georeferenced X value for the resampled grid. By default, the corresponding value of the low resolution grid.
MINY=value: Minimum georeferenced Y value for the resampled grid. By default, the corresponding value of the low resolution grid.
MAXX=value: Maximum georeferenced X value for the resampled grid. By default, the corresponding value of the low resolution grid.
MAXY=value: Maximum georeferenced Y value for the resampled grid. By default, the corresponding value of the low resolution grid.
RESX=value: Horizontal resolution. By default, and if RES_STRATEGY is set to AUTO, this will be the minimum resolution among all the supergrids.
RESY=value: Vertical resolution (positive value). By default, and if RES_STRATEGY is set to AUTO, this will be the minimum resolution among all the supergrids.
RES_STRATEGY=AUTO/MIN/MAX/MEAN: Which strategy to apply to set the resampled grid resolution. By default, if none of RESX, RESY, RES_FILTER_MIN and RES_FILTER_MAX is specified, the AUTO strategy will correspond to the MIN strategy: that is the minimum resolution among all the supergrids is used. If MAX is specified, the maximum resolution among all the supergrids is used. If MEAN is specified, the mean resolution among all the supergrids is used. RESX and RESY, if defined, will override the resolution determined by RES_STRATEGY.
RES_FILTER_MIN=value: Minimum resolution of supergrids to take into account (excluded bound, except if it is the minimum resolution of supergrids). By default, the minimum resolution of supergrids available. If this value is specified and none of RES_STRATEGY, RES_FILTER_MAX, RESX or RESY is specified, the maximum resolution among all the supergrids will be used as the resolution for the resampled grid.
RES_FILTER_MAX=value: Maximum resolution of supergrids to take into account (included bound). By default, the maximum resolution of supergrids available. If this value is specified and none of RES_STRATEGY, RESX or RESY is specified, this will also be used as the resolution for the resampled grid.
VALUE_POPULATION=MIN/MAX/MEAN/COUNT: Which value population strategy to apply to compute the resampled cell values. This default to MAX: the elevation value of a target cell is the maximum elevation of all supergrid nodes (potentially filtered with RES_FILTER_MIN and/or RES_FILTER_MAX) that fall into this cell; the corresponding uncertainty will be the uncertainty of the source node where this maximum elevation si reached. If no supergrid node fall into the target cell, the nodata value is set. The MIN strategy is similar, except that this is the minimum elevation value among intersecting nodes that is selected. The MEAN strategy uses the mean value of the elevation of intersecting nodes, and the maximum uncertainty of those nodes. The COUNT strategy (GDAL >= 3.2) exposes one single UInt32 band where each target cell contains the count of supergrid nodes that fall into it.
SUPERGRIDS_MASK=YES/NO. Default to NO. If set to YES, instead of the elevation and uncertainty band, the dataset contains a single Byte band which is boolean valued. For a target cell, if at least one supergrids nodes (potentially filtered with RES_FILTER_MIN and/or RES_FILTER_MAX) falls into the cell, the cell value is set at 255. Otherwise it is set at 0. This can be used to distinguish if elevation values at nodata are due to no source supergrid node falling into them, or if that/those supergrid nodes were themselves at the nodata value.
NODATA_VALUE=value. Override the default value, which is usually 1000000.
Spatial metadata support
Starting with GDAL 3.2, GDAL can expose BAG files with spatial metadata.
When such spatial metadata is present, the subdataset list will include
names of the form 'BAG:"{filename}":georef_metadata:{name_of_layer}'
where name_of_layer
is the name of a subgroup under /BAG_root/Georef_metadata
The values of the keys
dataset under each metadata layer are used as the
GDAL raster value. And the corresponding values
dataset is exposed as a
GDAL Raster Attribute Table associated to the GDAL raster band. If keys
is absent, record 1 of values
is assumed to be met for each elevation point
that does not match the nodata value of the elevation band.
When variable resolution grids are present, the MODE=LIST_SUPERGRIDS open option
will cause subdatasets of names of the form 'BAG:"{filename}":georef_metadata:{name_of_layer}:{y}:{x}'
to be reported. When opening such a subdataset, the varres_keys
dataset will
be used to populate the GDAL raster value.
If varres_keys
is absent, record 1 of values
is assumed to be met for
each elevation point that does not match the nodata value of the variable resolution
elevation band.
Tracking list support
When the dataset is opened in vector mode (ogrinfo, ogr2ogr, etc.), the tracking_list dataset will be reported as a OGR vector layer
Creation support
Starting with GDAL 2.4, the driver can create a BAG dataset (without variable resolution extension) with the elevation and uncertainty bands from a source dataset. The source dataset must be georeferenced, and have one or two bands. The first band is assumed to be the elevation band, and the second band the uncertainty band. If the second band is missing, the uncertainty will be set to nodata.
The driver will instantiate the BAG XML metadata by using a template file, which is by default, bag_template.xml, found in the GDAL data definition files. This template contains variables, present as ${KEYNAME} or ${KEYNAME:default_value} in the XML file, that can be substituted by providing a creation option whose name is the VAR_ string prefixed to the key name. Currently those creation options are:
VAR_INDIVIDUAL_NAME=value: Defaults to
unknown
. String to fill contact/CI_ResponsibleParty/individualName.VAR_ORGANISATION_NAME=value: Defaults to
unknown
. String to fill contact/CI_ResponsibleParty/organisationName.VAR_POSITION_NAME=value: Defaults to
unknown
. String to fill contact/CI_ResponsibleParty/positionName.VAR_DATE=<YYYY-MM-DD>: Defaults to
current
date. Value to fill dateStamp/Date.VAR_VERT_WKT=value: WKT string to fill referenceSystemInfo/MD_ReferenceSystem/referenceSystemIdentifier/RS_Identifier/code for the vertical coordinate reference system. If not provided, and if the input CRS is not a compound CRS, default to VERT_CS["unknown", VERT_DATUM["unknown", 2000]].
VAR_ABSTRACT=value: Defaults to
<empty
string>. String to fill identificationInfo/abstract.VAR_PROCESS_STEP_DESCRIPTION=value: Defaults to
Generated
by GDAL x.y.z. String to fill dataQualityInfo/lineage/LI_Lineage/processStep/LI_ProcessStep/description.VAR_DATETIME=<YYYY-MM-DDTHH:MM:SS>: Defaults to
current
datetime. Value to fill dataQualityInfo/lineage/LI_Lineage/processStep/LI_ProcessStep/dateTime/DateTime.VAR_RESTRICTION_CODE=<enumerated_value>: Defaults to
otherRestrictions
. Value to fill metadataConstraints/MD_LegalConstraints/useConstraints/MD_RestrictionCode.VAR_OTHER_CONSTRAINTS=value: Defaults to
unknown
. String to fill metadataConstraints/MD_LegalConstraints/otherConstraints.VAR_CLASSIFICATION=<enumerated_value>: Defaults to
unclassified
. Value to fill metadataConstraints/MD_SecurityConstraints/classification/MD_ClassificationCode.VAR_SECURITY_USER_NOTE=value: Defaults to
none
. String to fill metadataConstraints/MD_SecurityConstraints/userNote.
Other required variables found in the template, such as RES, RESX, RESY, RES_UNIT, HEIGHT, WIDTH, CORNER_POINTS and HORIZ_WKT will be automatically filled from the input dataset metadata.
The other following creation options are available:
TEMPLATE=<filename>: Path to a XML file that can serve as a template. This will typically be a customized version of the base bag_template.xml file. The file can contain other substituable variables than the ones mentioned above by using a similar syntax.
VAR_xxxx=value: Substitute variable ${xxxx} in the template XML value by the provided value.
BAG_VERSION=value: Defaults to
1.6.2
. Value to write in the /BAG_root/BAG Version attribute.COMPRESS=[NONE/DEFLATE]: Defaults to
DEFLATE
. Compression for elevation and uncertainty grids.ZLEVEL=1-9: Defaults to
6
. Deflate compression level.BLOCK_SIZE=<integer>: Chunking size of the HDF5 arrays. Default to 100, or the maximum dimension of the raster if smaller than 100.
Usage examples
Opening in low resolution mode:
$ gdalinfo data/test_vr.bag [...] Size is 6, 4 [...] HAS_SUPERGRIDS=TRUE MAX_RESOLUTION_X=29.900000 MAX_RESOLUTION_Y=31.900000 MIN_RESOLUTION_X=4.983333 MIN_RESOLUTION_Y=5.316667 [...]
Displaying available supergrids:
$ gdalinfo data/test_vr.bag -oo MODE=LIST_SUPERGRIDS [...] Subdatasets: SUBDATASET_1_NAME=BAG:"data/test_vr.bag":supergrid:0:0 SUBDATASET_1_DESC=Supergrid (y=0, x=0) from (x=70.100000,y=499968.100000) to (x=129.900000,y=500031.900000), resolution (x=29.900000,y=31.900000) SUBDATASET_2_NAME=BAG:"data/test_vr.bag":supergrid:0:1 SUBDATASET_2_DESC=Supergrid (y=0, x=1) from (x=107.575000,y=499976.075000) to (x=152.424999,y=500023.924999), resolution (x=14.950000,y=15.950000) [...] SUBDATASET_24_NAME=BAG:"data/test_vr.bag":supergrid:3:5 SUBDATASET_24_DESC=Supergrid (y=3, x=5) from (x=232.558335,y=500077.391667) to (x=267.441666,y=500114.608334), resolution (x=4.983333,y=5.316667) [...]
Opening a particular supergrid:
$ gdalinfo BAG:"data/test_vr.bag":supergrid:3:5
Converting a BAG in resampling mode with default parameters (use of minimum resolution of supergrids, MAX value population rule):
$ gdal_translate data/test_vr.bag -oo MODE=RESAMPLED_GRID out.tif
Converting a BAG in resampling mode with a particular grid origin and resolution
$ gdal_translate data/test_vr.bag -oo MODE=RESAMPLED_GRID -oo MINX=80 -oo MINY=500000 -oo RESX=16 -oo RESY=16 out.tif
Converting a BAG in resampling mode, with a mask indicating where supergrids nodes intersect the cell of the resampled dataset.
$ gdal_translate data/test_vr.bag -oo MODE=RESAMPLED_GRID -oo SUPERGRIDS_MASK=YES out.tif
Converting a BAG in resampling mode, by filtering on supergrid resolutions (and the resampled grid will use 4 meter resolution by default)
$ gdal_translate data/test_vr.bag -oo MODE=RESAMPLED_GRID -oo RES_FILTER_MIN=4 -oo RES_FILTER_MAX=8 out.tif
Converting a GeoTIFF file to a BAG dataset, and provide a custom value for the ABSTRACT substituable variable.
$ gdal_translate in.tif out.bag -co "VAR_ABSTRACT=My abstract"
Converting a (VR) BAG in resampling mode with a particular grid resolution (5m) to a BAG dataset (without variable resolution extension), and provide a custom value for the ABSTRACT metadata:
$ gdal_translate data/test_vr.bag -oo MODE=RESAMPLED_GRID -oo RESX=5 -oo RESY=5 out.bag -co "VAR_ABSTRACT=My abstract"
Displaying the tracking list:
$ ogrinfo -al data/my.bal


Click here to know health tips
Let's Play a Quiz
Choose the best option
- How many characters are in English alphabets
26
27
22
18
- Who is the CEO of Alphabet
Sundar Pichai
Bill Gates
Elon Musk
Mark Zuckerberg
- Who is the Captain of Indian Cricket Team
Mahendra Singh Dhoni
Virat Kohli
Ashwin
K L Rahul
Table
| S.NO |
STATE |
CAPITALS |
| 1. |
Tamil Nadu |
Chennai |
| 2. |
Andhra Pradesh |
Hyderabad |
| 3. |
Maharastra |
Mumbai |
| 4. |
Karnataka |
Bangalore |
| 5. |
Kerala |
Trivandrum |
Rock a baby Audio song
Rock a baby Video song


[gecode-users] help --- how to create an object dynamically in Gecode？
Kayler Yao
risoay at gmail.com
Tue Sep 1 02:16:28 CEST 2009
hi Christian,
You must have misunderstood my meaning. Creating an new argument
array of exactly the right size is OK. There is no problem. I want to create
an amount of new argument array that they are maybe have the same size. For
instance,
" IntArgs a1(10);
IntArgs a2(10);
IntArgs a3(10);
……"
The amount of the variable of "IntArgs" is uncertain,which is
controlled by parameter. The“new” way can't go, so i have to create an
certain number of variables of "IntArgs", maybe ten variables , and they
have the same size. Actually, i perhaps only use five variables. So another
five variables of "IntArgs" are waste.
hi Guido,
I have not used it to store data. I use it to post constraints. They
are all temporary. As following example,
"
int size = 10;
data[10][10];
IntVarArray result;
result(*this,5,0,9);
IntVarArgs a(size);
IntArgs c(size);
……
distinct(*this,result);
for (int i = 0: i<size; i++)
{
c[i] = data[i][2];
}
element(*this, c, result[i], a[i] );
linear(*this, a, IRT_EQ, 50);
rel*this,result,IRT_LQ);
"
The part of my program is using IntArgs like the above code lines,
the difference bettween them is that i use uncertain number of variables of
"IntArgs". I use outside parameter to control it. So creating "IntArgs" is
dynamic. There has no better way to realize it, except for creating an
certain number of variables of "IntArgs" in advance, which may waste memory.
Kayler
2009/8/31 Guido Tack <tack at ps.uni-sb.de>
> Hi Kayler,
> you should not use IntArgs for representing your data, only for posting
> constraints. So, when you read in your data, just use e.g. normal integer
> vectors. Then you post the constraints, and you know exactly how many you
> need. For each posted constraint, you construct the corresponding IntArgs
> from the data vectors. That's their purpose, don't use them for storing
> data.
>
> Guido
>
> Kayler Yao wrote:
>
> hi,
> Now let me talk about what i want to do. I have a lot of data,and
> i need to copy some data into the variable of the " IntArgs ". The number of
> variables what i want is uncertain,which is controlled by an outside
> parameter. And these variables include different data.
> For instance, i have an 10*10 Array data. Now i want to copy the second
> ,the fifth and the sixth column of Array data into three variables of
> "IntArgs". In my project, the number of variables of "IntArgs" what i need
> and which columns of Array data i want to copy are all uncertain,controlled
> by parameters. So this case make me to search for an dynamical method to
> create variable of the "IntArgs" . But "IntArgs" do not have a new operator
> by design. So i have to change the way and create an certain number of
> variables of the "IntArgs",which is larger than actual need. You know that
> wasting memory is an obvious disadvantage of this way.
> whether there has an better way to resolve this problem?
>
> Kayler
>
>
>
> 2009/8/30 Christian Schulte <cschulte at kth.se>
>
>> Hi,
>>
>>
>> what’s wrong with creating a new array each time you need it? They are
>> very fast to create (they will only allocate heap memory if the array is
>> large and otherwise, creation is super-quick). I have to admit I still don’t
>> see really what you mean by uncertain number.
>>
>>
>> Best
>>
>> Christian
>>
>>
>> *From:* Kayler Yao [mailto:risoay at gmail.com]
>> *Sent:* Saturday, August 29, 2009 5:23 PM
>> *To:* Christian Schulte
>> *Cc:* users at gecode.org
>>
>> *Subject:* Re: [gecode-users] help --- how to create an object
>> dynamically in Gecode
>> ？
>>
>>
>>
>> hi,
>>
>> Your said about using Argument arrays are right . The purpose i use
>> Argument arrays to do is also just as it should to be . What i want to do is
>> that I want to use uncertain number of Argument Arrays ,so i want to create
>> Argument arrays dynamically. You said that they do not have a new operator
>> by design ,so i can't use "new" way. I maybe create an certain number of
>> Argument Arrays which is much more than i want ,and it may waste some
>> memories. Whether there has another way to realize my thought?
>>
>> welcome to talk about it.
>>
>>
>> Kayler.
>>
>> 2009/8/29 Christian Schulte <cschulte at kth.se>
>>
>> Hi,
>>
>>
>> Argument arrays are meant for what they are called: passing arguments as
>> is explained in detail in Section 4.2.2 in Modeling with Gecode. Using them
>> for other purposes is a bad idea and hence they do not have a new operator
>> by design!
>>
>>
>> What you should do is use a different data structure and create and
>> argument array just when you need it for posting a propagator or branching.
>>
>>
>> Christian
>>
>>
>> *From:* users-bounces at gecode.org [mailto:users-bounces at gecode.org] *On
>> Behalf Of *Kayler Yao
>> *Sent:* Saturday, August 29, 2009 5:20 AM
>> *To:* users at gecode.org
>> *Subject:* Re: [gecode-users] help --- how to create an object
>> dynamically in Gecode？
>>
>>
>> hi,
>>
>> And i find that "Gecode::Support::DynamicArray< T, A > Class Template"
>> maybe can realize it. But i did it unsuccessfully.
>>
>> Who can give me right answer.
>>
>>
>> Kayler
>>
>> 2009/8/29 Kayler Yao <risoay at gmail.com>
>>
>> hi，
>>
>> I want to create an object of IntArgs in my program dynamically. For
>> instance " IntArgs *pt = new IntArgs(4); -----create an object of IntArgs
>> with four elements" or
>>
>> "IntArgs *pt = new IntArgs [10];------create an array with 10 object of
>> IntArgs." They all be compiled with errors. And i haven't seen the examples
>> of create object dynamically in Gecode. And I want to know whether the
>> Gecode support to create object of Gecode class ? And how ?
>>
>> Look forward to your reply!
>>
>>
>> Kayler
>>
>>
>>
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090901/d681227d/attachment.htm>
More information about the gecode-users
mailing list


Mod Squad
By Ross Anthony
If you watched TV in the early 70's, you'll probably remember "The Mod Squad" TV series ... or at least Linc, because he was the coolest of the trio. "Mod Squad" the movie, borrows the hip idea of deputizing three prison-bound delinquents. The film starts out promising, but ends up forgetting its promises.
Here's what the picture did well: 1) Balanced an off the wall, "few cards short of a full deck" wild-mouthed, white guy (Pete) with Linc (a smooth black guy who didn't need words to be cool). Even though liberties where taken in completely changing the TV series' Pete character -- I still liked this balance. Add to that the straight-shooter Claire Danes and we've got a likable team. 2) Some of the action sequences were very nicely timed and shot -- heart-pumping. 3) Though Giovanni Ribisi played the same character from "The Other Sister" (okay, one notch sharper -- but a lot more dangerous). He's very funny.
Here's where the picture fell short: 1) Was this a "Mod Squad" of the 90's? If so, then why the use of "Right on" and "Solid" and the dust-buster on the wall? If not, then why the late model Cadilac? 2) Convertible through a car-wash -- been there/done that. 3) Twice our Mod Squaders catch the bad guys just openly revealing their scheming plans, making it painfully obvious what they are up to -- and repeating it twice for the tape recorder. 4) Then there's the scene where the fat old male drug dealer wants to slow dance with Linc -- What's that? I don't get it? Was it introduced to break the lull? 5) Lastly, the characters themselves bring attention to the worn cop show cliches that surround them: drug pimps, crooked detectives and abandoned warehouse shoot outs.
Did I miss something? Was this supposed to be a spoof? Then it took itself too seriously. If it wasn't supposed to be a spoof, then it threw itself away. Which was unfortunate, because it could have been a decent movie.
Starring Claire Danes, Omar Epps, Giovanni Ribisi, and Dennis Farina. Directed by Scott Silver. Produced by Ben Myron, Alan Riche, and Tony Ludwig. Executive Producers: Aaron Spelling and David Ladd. A Metro-Golwyn-Mayer Pictures distributed by MGM. Rated R.
Grade..........................C
-- Copyright © 1999 Ross Anthony, currently based in Los Angeles, has scripted and shot documentaries, music videos, and shorts in 35 countries across North America, Europe, Africa and Asia. For more reviews visit: http://RossAnthony.com
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


So a guy came to my room and offered some 'opiates.' It was a little orange hexagon with N8 on one side and a sword on the other. Suboxone, 8mg buprenorphine and 2mg naloxone. A lot of other people have reported positive experiences after taking 16mg but I had a negative one with 2mg. In subsequent trials I've found it to be a rather pleasant addition to alcohol or something else, but BE CAREFUL ABOUT MIXING, I only took 1mg at a time tops after this. I've also done hydrocodone, oxycodone and opium. Suboxone feels closer to opium in certain ways than oxy/hydro, but I like oxy/hydro more because of the euphoria.
I jotted this down but clipped the long rants about drugs and politics that I launched into later in the evening. Also, I ate several grapefruits the previous day, so this could've helped to inhibit metabolization of the drug the next day.
8:00pm Sublingual administration of… oh sweet lord this pill tastes like shit… sublingual administration of perhaps 2mg buprenophine. In the name of science and recreation, let’s see what this does I say…
8:18pm This might have been a really bad idea…
8:30 For some reason everything is a lot funnier right now…
8:38 Analgesia and sedation noted, not very much like typical opiates, this is more sedated, a very different effect.  On the plus side it’s supposed to be a lot harder to overdose on this than on heroin or methadone…of course, that isn’t the most ecstatically reassuring thing I could’ve heard.  If I switched between this and opiates like hydrocodone and oxycodone every three days…oh my God I feel stoned out of my gourd.
9:00 It is T+60 and I am feeling stoned. Not as euphoric and wonderful as other opiates but very nice in its own right. Furthermore, buprenorphine and naloxone will make sure that I don’t do any more opiates this weekend because they won’t have any effect. The great thing about that is that I can take them at full intensity within several days. Shit, I wish I had bought more of these pills from that guy, I only got two and the one is in use. I should be able to get at least two more doses out of this one pill.   I’m watching Fear and Loathing in Las Vegas, circumstances dictate that this must be watched by me right now, it is highly necessary for the ambience, after all. Some symptoms of slight nausea.
9:30 Effects still intensifying, nausea increasing…uh oh…
10:45 This is not a game, these are not playthings. All substances, including caffeine pills, beer and pot, can be extremely dangerous if used improperly or stupidly. Some substances carry far greater risks. What I just took is one of those drugs with a far greater potential for damage. I just spent the last hour wondering if I was going to die and I still feel sick. Symptoms: tremor, respiratory depression, intense nausea. Whenever I moved it felt so much worse but when not moving I was afraid that I’d fall asleep and never wake up.
The difference between these things is a difference of degrees, of calculation. The difference between certain drugs can be the difference between a gun and a pocket knife. A miscalculation with a pocket knife can mean a small stab wound in my leg or accidentally making a small cut on a sibling’s arm. A gun can mean instant death. The room for error diminishes. I made an error.
 I only sucked on it for a couple of minutes, just enough to dissolve about ¼ of the pill.  On the plus side I am able to move, even being able to type and open my eyes or sit upright is a vast improvement.
(intermission)
11:01 Eating a nacho pretzel thing did not help matters. I just threw up, a lot, I’m talking projectile vomiting here. That helped, a lot.  I still feel totally fucked, not in a good way, more in a delirious and unbalanced way.
Shit man, this drug ought to be measured in micrograms. One of my biggest rules for doing drugs is to never do more than half the typical dose of a drug I’ve never tried before. I did half of that, so a quarter of the dose. I should have done half of what I did at most, 1/8 of the pill.  It seems like something that would probably work very well for its intended use.
 It’s not euphoric so much as just delirious, nauseous and sedated. I wonder if I went through immediate withdrawal because of it, I may have taken enough hydrocodone and oxycodone for that to have happened.  It feels very pleasant but it’s definitely not the all-out euphoric bliss of other opiate drugs. This is a much more subtle and refined sense of well being, none of the kitschy or loud or gaudy effects of your standard opiate. While I do prefer the other opiates this is just, I don’t know how to describe it other than more classy, even though I just puked from taking too much. You can order a greasy pizza or burger and some Chinese food in all of its overindulgent goodness or you can get a nicely done steak served with a fine red wine. This drug is the latter in the world of opiates.  I like hydrocodone and oxycodone a lot more.   I wanted to spend the time with Hannah/Emily but she’s probably asleep now.   We’re not in candy country anymore kids. Christ, the guy came up and was like “hey, anyone want any speed?” and naturally I invited him into my “office.” He said “yeah I’ve got Dexedrine, Adderall and some opiates” so I said “oh? What kind of opiates?” “uh, this stuff (I forget what he called it but I don’t think he said Suboxone) they give it to recovering heroin addicts, it’s pretty new.”  Good for heroin addicts to kick their habit, more dangerous than maybe even smack for the typical recreational user.
Afterwards: One very odd thing is that I took two Vicodin Tuesday night after doing Suboxone Friday night. It was so weird, I could feel the hydrocodone gradually kicking in and then *click* something happened and it stopped dead in its tracks. Buprenorphine has a really long half-life. Several days later it was still affecting me and had stopped the Vicodin from working. I could feel the hydrocodone get knocked out of the receptors in my brain. I'd like for someone to do research on that because it felt like all of the receptors were used for the hydro but the meager amounts of bup knocked them out leaving a deficit. It sucked ass, I was ready for a great opiate high and then I got the opposite.
 Might just be me but I've done a fair number of drugs and it hit me harder than anything else I've ever done.
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.


{% extends 'layout-2-1-bleedbar.html' %} {% block css -%} {{ super() }} {%- endblock css %} {% block title -%} {{ product.name }} | Consumer Financial Protection Bureau {%- endblock title %} {% block desc -%} Download the prepaid product agreement files for the {{ product.name }} issued by {{ product.issuer_name }}. {%- endblock desc %} {% block og_desc -%} {{ self.desc() }} {%- endblock og_desc %} {% block hero %}
Agreement effective date: {{ agreement.effective_date }}
Agreement effective date: {{ agreement.effective_date }}


Lab 3
Home
(current)
Bootcamp Info
GitHub Resources
Welcome to Lab 3!
You have successfully deployed to Azure Web Apps using GitHub Actions!


Coffee
Tea
Milk
coffee
tea
a
d
c
Coffee
Tea
Milk
Coffee
Tea
Milk
Monthly savings
Firstname
Lastname
Age
Jill
Smith
50
Eve
Jackson
94
Month
Savings
January
$100
February
$50


lcc.db_tier package¶
Subpackages¶
- lcc.db_tier.connectors package
- Submodules
- lcc.db_tier.connectors.asas module
- lcc.db_tier.connectors.catalina module
- lcc.db_tier.connectors.corot module
- lcc.db_tier.connectors.file_manager module
- lcc.db_tier.connectors.kepler module
- lcc.db_tier.connectors.macho module
- lcc.db_tier.connectors.ogleII module
- lcc.db_tier.connectors.ogleIII module
- Module contents
Submodules¶
lcc.db_tier.TAP_query module¶
-
class
lcc.db_tier.TAP_query.
TapClient
¶ Bases:
lcc.db_tier.base_query.LightCurvesDb
Common class for all TAP db clients
-
COO_UNIT_CONV
¶ int, floats – Conversion rate of coordinates from degrees
-
QUOTING
¶ list, tuple – Expressions with any of these symbols are quoted
-
COO_UNIT_CONV
= 1
-
COUNTER_CON
= 0¶
-
QUOTING
= [' ', '/', '_', '-', '.', '+']
-
REPEAT_CON
= 10¶
-
SPECIAL_SYMB
= ['<', '>', '=']¶
-
postQuery
(tap_params)¶ Post query according to given parameters
Parameters: tap_params (dict) – Tap query parameters. It has to contains four keys.
- Dict keys:
- URL(str)
- Url of tap server
- table(str)
- Name of table for query
- select(str/list)
- Select string or list of column names
- conditions(list/tuple)
- For each condition in the list of conditions there is a tuple - (“name of column”, “condition”) or (“name of column”, “lower value”, “upper value” for search in the range
Returns: Result from the query as nested lists Return type: list of lists
-
lcc.db_tier.base_query module¶
-
class
lcc.db_tier.base_query.
LightCurvesDb
¶ Bases:
lcc.db_tier.base_query.StarsCatalogue
This is common class for every database containing light curves
-
getStarsWithCurves
(*args, **kwargs)¶
-
-
class
lcc.db_tier.base_query.
StarsCatalogue
¶ Bases:
abc.ABC
Common class for all catalogs containing information about stars
-
coneSearch
(coo, stars, delta_deg, nearest=False)¶ Filter results from cone search
Parameters: - coo (astropy.coordinates.sky_coordinate.SkyCoord) – Center of searching
- stars (list of Star objects) – Stars returned by query
- delta_deg (float, astropy.units.quantity.Quantity) – Radius from center of searching
- nearest (bool) – Nearest star to the center of searching is returned if it is True
Returns: List of Star objects
Return type: list
-
getStars
(load_lc=True)¶ Query Star objects
Parameters: load_lc (bool) – Append light curves to star objects Returns: List of Star objects Return type: list
-
lcc.db_tier.stars_provider module¶
-
class
lcc.db_tier.stars_provider.
StarsProvider
¶ Bases:
object
Stars provider is an interface between end-user and database connectors. All database connectors have to inherit StarsCatalog class.
-
STARS_PROVIDER
¶ dict
-
STARS_PROVIDERS
= {'Macho': <class 'lcc.db_tier.connectors.macho.Macho'>, 'FileManager': <class 'lcc.db_tier.connectors.file_manager.FileManager'>, 'OgleIII': <class 'lcc.db_tier.connectors.ogleIII.OgleIII'>, 'OgleII': <class 'lcc.db_tier.connectors.ogleII.OgleII'>, 'Catalina': <class 'lcc.db_tier.connectors.catalina.Catalina'>, 'Asas': <class 'lcc.db_tier.connectors.asas.Asas'>, 'Kepler': <class 'lcc.db_tier.connectors.kepler.Kepler'>, 'CorotBright': <class 'lcc.db_tier.connectors.corot.CorotBright'>, 'CorotFaint': <class 'lcc.db_tier.connectors.corot.CorotFaint'>}¶
-
classmethod
getProvider
(obtain_method, *obtain_params)¶ Get database connector via name of its class
Parameters: - obtain_method (str) – Name of connector class
- obtain_params (list of dicts) – List of queries
Returns: Constructed database connector or uninstanced if there is no queries
Return type: instance
-
lcc.db_tier.vizier_tap_base module¶
-
class
lcc.db_tier.vizier_tap_base.
VizierTapBase
(queries)¶ Bases:
lcc.db_tier.TAP_query.TapClient
Base class for all tap connectors using VizieR database. In the most situations new connectors will contain just few class attributes and there will not be need to write new or overwrite current methods.
-
TAP_URL
¶ str – Url to tap server
-
FILES_URL
¶ str – Path to light curve files storage
-
TABLE
¶ str – Name of queried table
-
RA
¶ str – Name of right ascension column. It should be in degrees, anyway it is necessary to convert them
-
DEC
¶ str – Name of declination column. It should be in degrees, anyway it is necessary to convert them
EXAMPLE
“{Field}.{Tile}.{Seqn}”
Keys represent name of columns
-
LC_FILE
¶ str – Column name which can be used for obtaining light curve files. By default it is set to None that means that is not necessary to include any other column in order to get light curves
-
LC_META
¶ dict – Meta data for light curve.
Example
{“xlabel” : “Terrestrial time”,
“xlabel_unit” : “days”, “ylabel” : “Flux”, “ylabel_unit” : “Electrons per second”, “color” : “N/A”, “invert_yaxis” : False}Light curve is expected by default (magnitudes and Julian days)
-
TIME_COL
¶ int – Number (starts with 0) of times column in data file
-
MAG_COL
¶ int – Number (starts with 0) of magnitudes column in data file
-
ERR_COL
¶ int – Number (starts with 0) of errors column in data file
-
ERR_MAG_RATIO
¶ float: – Ratio between error and magnitude values
- Note:
- Added because of Corot Archive of Faint Stars.
-
IDENT_MAP
¶ ordered dict – Ordered dictionary of “name of database” : “column name/s of identifiers”
Example
IDENT_MAP = {“Macho” : (“Field”, “Tile”, “Seqn”) }
For one item dictionaries can be used simple dictionary, because there is no need to keep order of items.
-
MORE_MAP
¶ ordered dict – Ordered dictionary of “column names” : “key in new dictionary which is be stored in Star object”
Example
- MORE_MAP = collections.OrderedDict(((“Per”, “period”),
- (“Class” , “var_type”), (“Jmag” , “j_mag”), (“Kmag” , “k_mag”), (“Hmag” , “h_mag”)))
-
This class inherits TapClient which brings methods for creating,
-
posting and returning tap queries. Methods of this class manage
-
results and create Star objects and light curves.
-
There is no need overwrite methods in inherited classes in the most
-
cases. Anyway obtaining light curves can be different for many
-
databases. In this case it would be sufficient to just implement
-
new _getLightCurve method.
-
Brief description of methods can be found below at their declaration.
-
DEC
= 'DEJ2000'
-
DELIM
= None¶
-
ERR_COL
= 2
-
ERR_MAG_RATIO
= 1.0
-
LC_FILE
= None
-
LC_META
= {}
-
MAG_COL
= 1
-
RA
= 'RAJ2000'
-
TAP_URL
= 'http://tapvizier.u-strasbg.fr/TAPVizieR/tap'
-
TIME_COL
= 0
-
getStars
(load_lc=True, **kwargs)¶ Get star objects with light curves
Parameters: - load_lc (bool) – Star is appended by light curve if True
- kwargs (dict) –
Optional parameters which have effect just if certain database provides this option.
For example CoRoT archive contains very large light curves, so the dimension of light curve can be reduced by max_bins keyword.
Returns: List of stars with their light curves
Return type: list
-


Below is a spreadsheet of all known manuscripts and fragments of the poem. Printed books are not included in this list.
These manuscripts are listed in alphabetical order by country. A more precise location, usually the city, and then the institution and the shelfmark are also given. The fourth column,"olim," provides any previous names or shelfmarks for the manuscript. In the final two columns, "De la Rose" and "Langlois," the letters Y and N indicate whether the manuscript can be found in either Catherine Bel and Herman Braet's De la Rose: texte, image, fortune (2006) or in Ernest Langlois's Les Manuscrits du Roman de la Rose, description et classement (1910).
This spreadsheet is a work in progress and will be subject to change. If you have information about a manuscript or fragment not here or listed as "unknown," or would like to suggest any corrections, contact Prof. Timothy Stinson at tlstinson@gmail.com.


WOO A film review by Matt Williams
RATING: * out of * * * *
Daisy v.S. Mayer directs this blind date comedy that's more uncomfortable than a bad date. Boring, uninteresting and pointless, the film wastes both its talent and your time.
Woo is the name given to Jada Pinkett Smith's free-spirited character. Beautiful and smart, she's also a handful...so much so that her cousin Claudette (Paula Jai Parker), with whom she's staying, schemes to get her out of the apartment for one night. She asks her husband Lenny (Dave Chappelle) to set up a blind date between his friend Tim (Tommy Davidson) and Woo.
Tim is a legal assistant studying for the bar, and a very nice guy. Too nice, or so his friends think. His last girlfriend used and abused him, and now, on the rebound, he reluctantly agrees to the blind date.
Of course, the blind date turns into the disastrous date from hell. But it's not all bad...at least they didn't have to sit though a movie like Woo. Woo is never groundbreakingly awful.  The film is packed with endless unfunny setups that lead nowhere. You're sure that there's going to be a payoff soon...but it just never comes.
Jada Pinkett Smith deserves a better film than this one. Her role here has some substance, but it is lost in the morass of the film's bungled attempts at humor. Tommy Davidson fills the needs of his role: nice but boring. There's not much to be said for the supporting cast. Tim's trio of buffoonish friends particularly suffer from the film's lack of humor.
The film is not "Run Away!" bad, but it is bad...and not one which I would recommend to anyone besides an insomniac.
Copyright 1998 Matt Williams
- Matt Williams<EMAIL_ADDRESS>Reviewer for Cinematter: http://www.cinematter.com Home of over 500 reviews, and information on over 600 upcoming releases
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


A bit more about me
I’m a UX designer with strong Frontend development skills,
but more than anything, I enjoy dissecting the big picture and making sense of complexity. I understand that everything has a trade-off. I like to challenge conventional wisdom and to explore unusual ideas.
I’m an avid reader with an entrepreneurial spirit
Passionate about tech and startups and thinking about product strategy. I have a formal background in Computer Science and Business Administration (Bachelor's) and User Experience Design (Master's). In my spare time I experiment with side projects (mostly web apps). I enjoy seeing the difference that products make in people's lives.
My toolkit
Product Design
Sketch
inVision
Framer
Adobe CC
Frontend Development
JavaScript
React
HTML
CSS
Vue.js
Python


Javascript Labs
Converting between strings and numbers
The box below is formatted as a string
The box below is formatted as a number
Click here to parse the values above


#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-----------------------------------------------------------------------------
''' Provide a session object to service Bokeh documents in external Python
clients to a Bokeh server.
Use-Cases
~~~~~~~~~
A client session has two primary uses:
* Implementing automated testing infrastructure around Bokeh server
applications.
* Creating and customizing specific sessions of a Bokeh server application
(running *in the Bokeh server*) before passing them on to a specific
viewer.
'''
#-----------------------------------------------------------------------------
# Boilerplate
#-----------------------------------------------------------------------------
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
log = logging.getLogger(__name__)
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
# Standard library imports
# External imports
from six.moves.urllib.parse import quote_plus
# Bokeh imports
from ..document import Document
from ..resources import _SessionCoordinates, DEFAULT_SERVER_HTTP_URL
from ..util.browser import NEW_PARAM
from ..util.session_id import generate_session_id
from ..util.string import format_docstring
from .util import server_url_for_websocket_url, websocket_url_for_server_url
#-----------------------------------------------------------------------------
# Globals and constants
#-----------------------------------------------------------------------------
DEFAULT_SESSION_ID = "default"
DEFAULT_SERVER_WEBSOCKET_URL = websocket_url_for_server_url(DEFAULT_SERVER_HTTP_URL)
__all__ = (
'ClientSession',
'pull_session',
'push_session',
'show_session',
)
#-----------------------------------------------------------------------------
# General API
#-----------------------------------------------------------------------------
[docs]def pull_session(session_id=None, url='default', io_loop=None, arguments=None):
''' Create a session by loading the current server-side document.
``session.document`` will be a fresh document loaded from
the server. While the connection to the server is open,
changes made on the server side will be applied to this
document, and changes made on the client side will be
synced to the server.
If you don't plan to modify ``session.document`` you probably
don't need to use this function; instead you can directly
``show_session()`` or ``server_session()`` without downloading
the session's document into your process first. It's much
more efficient to avoid downloading the session if you don't need
to.
In a production scenario, the ``session_id`` should be
unique for each browser tab, which keeps users from
stomping on each other. It's neither scalable nor secure to
use predictable session IDs or to share session IDs across
users.
For a notebook running on a single machine, ``session_id``
could be something human-readable such as ``"default"`` for
convenience.
If you allow ``pull_session()`` to generate a unique
``session_id``, you can obtain the generated ID with the
``id`` property on the returned ``ClientSession``.
Args:
session_id (string, optional) :
The name of the session, None to autogenerate a random one (default: None)
url : (str, optional): The URL to a Bokeh application on a Bokeh server
can also be `"default"` which will connect to the default app URL
io_loop (``tornado.ioloop.IOLoop``, optional) :
The ``IOLoop`` to use for the websocket
arguments (dict[str, str], optional) :
A dictionary of key/values to be passed as HTTP request arguments
to Bokeh application code (default: None)
Note that should only be provided when pulling new sessions.
If ``session_id`` is not None, or a session with ``session_id``
already exists, these arguments will have no effect.
Returns:
ClientSession :
A new ``ClientSession`` connected to the server
'''
coords = _SessionCoordinates(session_id=session_id, url=url)
session = ClientSession(session_id=session_id, websocket_url=websocket_url_for_server_url(coords.url), io_loop=io_loop, arguments=arguments)
session.pull()
return session
[docs]def push_session(document, session_id=None, url='default', io_loop=None):
''' Create a session by pushing the given document to the server,
overwriting any existing server-side document.
``session.document`` in the returned session will be your supplied
document. While the connection to the server is open, changes made on the
server side will be applied to this document, and changes made on the
client side will be synced to the server.
In a production scenario, the ``session_id`` should be unique for each
browser tab, which keeps users from stomping on each other. It's neither
scalable nor secure to use predictable session IDs or to share session
IDs across users.
For a notebook running on a single machine, ``session_id`` could be
something human-readable such as ``"default"`` for convenience.
If you allow ``push_session()`` to generate a unique ``session_id``, you
can obtain the generated ID with the ``id`` property on the returned
``ClientSession``.
Args:
document : (bokeh.document.Document)
The document to be pushed and set as session.document
session_id : (string, optional)
The name of the session, None to autogenerate a random one (default: None)
url : (str, optional): The URL to a Bokeh application on a Bokeh server
can also be `"default"` which will connect to the default app URL
io_loop : (tornado.ioloop.IOLoop, optional)
The IOLoop to use for the websocket
Returns:
ClientSession
A new ClientSession connected to the server
'''
coords = _SessionCoordinates(session_id=session_id, url=url)
session = ClientSession(session_id=coords.session_id, websocket_url=websocket_url_for_server_url(coords.url), io_loop=io_loop)
session.push(document)
return session
[docs]def show_session(session_id=None, url='default', session=None, browser=None, new="tab", controller=None):
''' Open a browser displaying a session document.
If you have a session from ``pull_session()`` or ``push_session`` you
can ``show_session(session=mysession)``. If you don't need to open a
connection to the server yourself, you can show a new session in a
browser by providing just the ``url``.
Args:
session_id (string, optional) :
The name of the session, None to autogenerate a random one (default: None)
url : (str, optional): The URL to a Bokeh application on a Bokeh server
can also be `"default"` which will connect to the default app URL
session (ClientSession, optional) : session to get session ID and server URL from
If you specify this, you don't need to specify session_id and url
browser (str, optional) : browser to show with (default: None)
For systems that support it, the **browser** argument allows
specifying which browser to display in, e.g. "safari", "firefox",
"opera", "windows-default" (see the ``webbrowser`` module
documentation in the standard lib for more details).
new (str, optional) : new file output mode (default: "tab")
For file-based output, opens or raises the browser window
showing the current output file. If **new** is 'tab', then
opens a new tab. If **new** is 'window', then opens a new window.
'''
if session is not None:
server_url = server_url_for_websocket_url(session._connection.url)
session_id = session.id
else:
coords = _SessionCoordinates(session_id=session_id, url=url)
server_url = coords.url
session_id = coords.session_id
if controller is None:
from bokeh.util.browser import get_browser_controller
controller = get_browser_controller(browser=browser)
controller.open(server_url + "?bokeh-session-id=" + quote_plus(session_id),
new=NEW_PARAM[new])
[docs]class ClientSession(object):
''' Represents a websocket connection to a server-side session.
Each server session stores a Document, which is kept in sync with the
corresponding Document for this ``ClientSession`` instance. Updates on
either side of the connection will automatically propagate to the other
side, as long as the connection is open.
ClientSession objects can (and usually should) be used as a context manager
so that the session is properly closed:
.. code-block:: python
with pull_session(url=app_url) as mysession:
# customize session here
script = server_session(session_id=mysession.id, url=app_url)
return render_template("embed.html", script=script, template="Flask")
If you do not use ``ClientSession`` in this way, it is up to you to ensure
that ``mysession.close()`` is called.
'''
[docs] def __init__(self, session_id=None, websocket_url=DEFAULT_SERVER_WEBSOCKET_URL, io_loop=None, arguments=None):
''' A connection which attaches to a particular named session on the
server.
Always call either pull() or push() immediately after creating the
session (until these are called ``session.document`` will be ``None``).
The :func:`~bokeh.client.session.push_session` and
:func:`~bokeh.client.session.pull_session()` functions will construct a
``ClientSession`` and push or pull in one step, so they are a good way to
obtain a ``ClientSession``.
Args:
session_id (str) :
The name of the session or None to generate one
websocket_url (str) :
Websocket URL to connect to
io_loop (IOLoop, optional) :
The IOLoop to use for the websocket
arguments (dict[str, str], optional) :
A dictionary of key/values to be passed as HTTP request
arguments to Bokeh application code (default: None)
Note that should only be provided when pulling new sessions.
If ``session_id`` is not None, or a session with ``session_id``
already exists, these arguments will have no effect.
'''
self._document = None
self._id = self._ensure_session_id(session_id)
from .connection import ClientConnection
self._connection = ClientConnection(session=self, io_loop=io_loop, websocket_url=websocket_url, arguments=arguments)
from ..server.callbacks import _DocumentCallbackGroup
self._callbacks = _DocumentCallbackGroup(self._connection.io_loop)
def __enter__(self):
'''
'''
return self
def __exit__(self, exc_type, exc_value, exc_traceback):
'''
'''
self.close()
# Properties --------------------------------------------------------------
@property
def connected(self):
''' Whether this session is currently connected. '''
return self._connection.connected
@property
def document(self):
''' A :class:`~bokeh.document.Document` that will be kept in sync with
the corresponding Document on the server.
This value is initialized when :func:`pull` or :func:`push` succeeds.
It will be ``None`` until then.
'''
return self._document
@property
def id(self):
''' A unique ID for this session. '''
return self._id
# Public methods ----------------------------------------------------------
[docs] def connect(self):
''' Connect to a Bokeh server at the configured URL. '''
self._connection.connect()
[docs] def close(self, why="closed"):
''' Close the connection to the server. '''
self._connection.close(why)
[docs] def force_roundtrip(self):
''' Force a round-trip request/reply to the server, sometimes needed to
avoid race conditions. Mostly useful for testing.
Outside of test suites, this method hurts performance and should not be
needed.
Returns:
None
'''
self._connection.force_roundtrip()
[docs] def loop_until_closed(self, suppress_warning=False):
''' Execute a blocking loop that runs and executes event callbacks
until the connection is closed (e.g. by hitting Ctrl-C).
While this method can be used to run Bokeh application code "outside"
the Bokeh server, this practice is HIGHLY DISCOURAGED for any real
use case. This function is intented to facilitate testing ONLY.
'''
suppress_warning # shut up flake
from bokeh.util.deprecation import deprecated
deprecated("ClientSession.loop_until_closed is deprecated, and will be removed in an eventual 2.0 release. "
"Run Bokeh applications directly on a Bokeh server instead. See:\n\n"
" https//docs.bokeh.org/en/latest/docs/user_guide/server.html\n")
self._connection.loop_until_closed()
[docs] def pull(self):
''' Pull the server's state and set it as session.document.
If this is called more than once, session.document will be the same
object instance but its contents will be overwritten.
Automatically calls :func:`connect` before pulling.
'''
self.connect()
if not self.connected:
raise IOError("Cannot pull session document because we failed to connect to the server (to start the server, try the 'bokeh serve' command)")
if self.document is None:
doc = Document()
else:
doc = self.document
self._connection.pull_doc(doc)
if self.document is None:
self._attach_document(doc)
[docs] def push(self, document=None):
''' Push the given document to the server and record it as session.document.
If this is called more than once, the Document has to be the same (or None
to mean "session.document").
.. note::
Automatically calls :func:`~connect` before pushing.
Args:
document (:class:`~bokeh.document.Document`, optional) :
The document which will be kept in sync with the server document.
None to use session.document or create a new document.
'''
if self.document is None:
if document is None:
doc = Document()
else:
doc = document
else:
if document is None:
doc = self.document
else:
raise ValueError("Cannot push() a different document from existing session.document")
self.connect()
if not self.connected:
raise IOError("Cannot push session document because we failed to connect to the server (to start the server, try the 'bokeh serve' command)")
self._connection.push_doc(doc)
if self._document is None:
self._attach_document(doc)
[docs] def request_server_info(self):
''' Ask for information about the server.
Returns:
A dictionary of server attributes.
'''
return self._connection.request_server_info()
[docs] def show(self, obj=None, browser=None, new="tab"):
''' Open a browser displaying this session.
Args:
obj (LayoutDOM object, optional) : a Layout (Row/Column),
Plot or Widget object to display. The object will be added
to the session's document.
browser (str, optional) : browser to show with (default: None)
For systems that support it, the **browser** argument allows
specifying which browser to display in, e.g. "safari", "firefox",
"opera", "windows-default" (see the ``webbrowser`` module
documentation in the standard lib for more details).
new (str, optional) : new file output mode (default: "tab")
For file-based output, opens or raises the browser window
showing the current output file. If **new** is 'tab', then
opens a new tab. If **new** is 'window', then opens a new window.
'''
if obj and obj not in self.document.roots:
self.document.add_root(obj)
show_session(session=self, browser=browser, new=new)
# Internal methods --------------------------------------------------------
def _attach_document(self, document):
self._document = document
self._document.on_change_dispatch_to(self)
self._callbacks.add_session_callbacks(self._document.session_callbacks)
def _document_patched(self, event):
if event.setter is self:
log.debug("Not sending notification back to server for a change it requested")
return
# TODO (havocp): our "change sync" protocol is flawed
# because if both sides change the same attribute at the
# same time, they will each end up with the state of the
# other and their final states will differ.
self._connection._send_patch_document(self._id, event)
@classmethod
def _ensure_session_id(cls, session_id):
if session_id is None:
session_id = generate_session_id()
return session_id
def _handle_patch(self, message):
message.apply_to_document(self.document, self)
def _notify_disconnected(self):
''' Called by the ClientConnection we are using to notify us of disconnect.
'''
if self.document is not None:
self.document.remove_on_change(self)
self._callbacks.remove_all_callbacks()
def _session_callback_added(self, event):
self._callbacks.add_session_callback(event.callback)
def _session_callback_removed(self, event):
self._callbacks.remove_session_callback(event.callback)
#-----------------------------------------------------------------------------
# Dev API
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Private API
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Code
#-----------------------------------------------------------------------------
__doc__ = format_docstring(__doc__)


Send to...
Groups
Best friends
Vaulters
Course 6
Friends
Alice
Beth
Christina
Doug
Evan
Frank
George
Hannah


Time series previous versions
Contact:
Philip Gooding
Data period covered: Feb 1988 - current
Next release: 25 April 2015
Series ID: MC6A Units :Index 2010=100 Non-seasionally adjusted
Select or enter vintage dates to download data for this series that actually existed on those past dates in history. In general, economic data for past observation periods are revised as more accurate estimates become available. Entering vintage dates allows you to retrieve past revisions of economic data that were actually available as of specific dates.
Read download data help for more information about the options on this form. Note that files may take a while to download depending on the number of observations and vintage dates.
Data published between
To
| Date updated | Reason for update | More information | |
|---|---|---|---|
| 12 February 2015 | Release: Consumer price inflation | ||
| 21 January 2015 | Correction | View correction notice | |
| 10 Janaury 2015 | Release: Consumer price inflation | ||
| 15 December 2014 | Release: Consumer price inflation | ||
| 14 November 2014 | Release: Consumer price inflation |
Cras fringilla neque arcu, eget tristique turpis consectetur eu. Curabitur leo nisi, pulvinar sit amet molestie ac, faucibus sit amet turpis. Maecenas non sollicitudin magna, et convallis turpis.
Donec fringilla, ante et imperdiet interdum, arcu ipsum mollis odio, vitae euismod augue mi at velit. Ut egestas tortor vel ipsum interdum suscipit. Etiam commodo dolor ut nisl consequat feugiat. Nulla facilisi. Morbi tempus mauris sem, sit amet facilisis tellus facilisis id. Nunc a tortor lacus. Maecenas fermentum libero arcu, at tempus risus laoreet sed. Sed blandit mauris a neque viverra malesuada. Maecenas accumsan maximus leo, nec porta arcu accumsan vel. Praesent rutrum vel turpis vel euismod. Etiam et commodo justo.


?New
York
Botanical
Garden
NAME
i_
I
^
I
i
y
jlMJ?
-><
//A3
Poajl-U^^''
j-4c^-&v.
9K.e4V,,
.......Ñ^..
Af/^C*
/?£*>
1604685
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Type an artist name and click on "Search". Then, click on any album from the results to play 30 seconds of its first track.
{{album.name}}


+++ draft = false date = "2008-10-08T17:14:46-03:00" title = "RichText control with wxpython: saving, loading and converting from internal XML to HTML" tags = ["python", "tutorial"] created = "2008-10-08T16:36:34-03:00" modified = "2008-11-21T22:17:17-02:00" permaLink = "http://play.pixelblaster.ro/blog/archive/2008/10/08/richtext-control-with-wxpython-saving-and-loading" author = "Tiberiu Ichim" aliases = [ "/blog/archive/2008/10/08/richtext-control-with-wxpython-saving-and-loading" ] +++
I tend to be an angry caveman these days (see my previous post) and this doesn't lead to too much clear thinking. I've been dealing with the wx.richtext.RichTextCtrl for the past couple of days and I think I'm now close to finishing the tasks that I set myself to do with it. I'm trying to run a bunch of richtext controls on the same page, that would increase their size and show a toolbar when focused. My first problems came from the fact that all 5 of them flashed a caret which I couldn't hide. Trying to do ctrl.GetCaret().Hide() would result in a crash. After struggling with various possible solutions - none of which worked, I've realized that I should try the latest wxpython distribution, I was even decided to compile it manually. Fortunately, the wxwidgets project offers a repository for Ubuntu and sure enough, after I've upgraded, things started to work (I still needed to hide the caret for all the richtext controls and show it when they were focused, but that's no problem).
Now, unto the next tasks: saving and loading the content of these fields. I wanted to display the content in an HtmlWindow control, so converting the content to html was one thing I had to discover how to do. First step that I've tried, saving the html and loading it through the RichTextCtrl and its closely related buffers and handlers didn't work, so I've settled for a solution that involves one RichTextHTMLHandler and one RichTextXmlHandler. To help me understand how this thing works, I've created a clean example class where I could play with this thing. I hope it helps someone, as I haven't found too much info on this on the web (the Load/SaveStream methods are not even documented anywhere).
The toolbar class is taken from my project, created with wxGlade, while the frame class is created by me, manually (actually, this is the first frame that I have created by hand). To demonstrate the loading and saving, a variable is used to keep the content (self.content). Change the text, add some formatting, hit Save and then Load. This will take the text that was saved from the richtext control (in xml format), load it in a buffer and convert it to html which is then displayed in the HtmlWindow. I've only tried this on Linux, hope it works on Windows too. Oh, and you need to supply your own icons if you want to try the code (hint: I've used /usr/share/icons/gnome/32x32/actions as source of my icons.
#!/usr/bin/env python from StringIO import StringIO import wx import wx.html import wx.richtext class TextFormatToolBar(wx.ToolBar): def __init__(self, *args, **kwds): self.text_ctrl = kwds.pop('text_ctrl') kwds["style"] = wx.TB_FLAT|wx.TB_3DBUTTONS wx.ToolBar.__init__(self, *args, **kwds) self.AddLabelTool(wx.ID_CUT, "Cut", wx.Bitmap("edit-cut.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "Cut selection", "") self.AddLabelTool(wx.ID_COPY, "Copy", wx.Bitmap("edit-copy.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "") self.AddLabelTool(wx.ID_PASTE, "Paste", wx.Bitmap("edit-paste.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "") self.AddSeparator() self.AddLabelTool(wx.ID_UNDO, "Undo", wx.Bitmap("edit-undo.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "") self.AddLabelTool(wx.ID_REDO, "Redo", wx.Bitmap("edit-redo.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "") self.AddSeparator() self.AddLabelTool(wx.ID_BOLD, "Bold", wx.Bitmap("format-text-bold.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "") self.AddLabelTool(wx.ID_ITALIC, "Italic", wx.Bitmap("format-text-italic.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "") self.AddLabelTool(wx.ID_UNDERLINE, "Underline", wx.Bitmap("format-text-underline.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "") self.Realize() self.Bind(wx.EVT_TOOL, self.handle_bold, id=wx.ID_BOLD) self.Bind(wx.EVT_TOOL, self.handle_italic, id=wx.ID_ITALIC) self.Bind(wx.EVT_TOOL, self.handle_underline, id=wx.ID_UNDERLINE) self.Bind(wx.EVT_TOOL, self.handle_paste, id=wx.ID_PASTE) self.Bind(wx.EVT_TOOL, self.handle_copy, id=wx.ID_COPY) self.Bind(wx.EVT_TOOL, self.handle_cut, id=wx.ID_CUT) self.Bind(wx.EVT_TOOL, self.handle_undo, id=wx.ID_UNDO) self.Bind(wx.EVT_TOOL, self.handle_redo, id=wx.ID_REDO) def handle_bold(self, event): self.text_ctrl.ApplyBoldToSelection() def handle_italic(self, event): self.text_ctrl.ApplyItalicToSelection() def handle_underline(self, event): self.text_ctrl.ApplyUnderlineToSelection() def handle_paste(self, event): self.text_ctrl.Paste() def handle_copy(self, event): self.text_ctrl.Copy() def handle_cut(self, event): self.text_ctrl.Cut() def handle_undo(self, event): self.text_ctrl.Undo() def handle_redo(self, event): self.text_ctrl.Redo() class TopFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.Freeze() sizer = wx.BoxSizer(wx.VERTICAL) rt = wx.richtext.RichTextCtrl(self, -1) toolbar = TextFormatToolBar(self, text_ctrl=rt) rt.SetMinSize((300,200)) htmlwindow = wx.html.HtmlWindow(self) htmlwindow.SetMinSize((300,200)) save_button = wx.Button(self, label="Save") load_button = wx.Button(self, label="Load") btn_sizer = wx.BoxSizer(wx.HORIZONTAL) btn_sizer.Add(load_button, 0, wx.EXPAND|wx.ALL, 6) btn_sizer.Add(save_button, 0, wx.EXPAND|wx.ALL, 6) self.Bind(wx.EVT_BUTTON, self.handle_save, save_button) self.Bind(wx.EVT_BUTTON, self.handle_load, load_button) sizer.Add(toolbar, 0, wx.EXPAND|wx.ALL, 6) sizer.Add(rt, 1, wx.EXPAND|wx.ALL, 6) sizer.Add(htmlwindow, 1, wx.EXPAND|wx.ALL, 6) sizer.Add(btn_sizer) self.SetSizer(sizer) sizer.Fit(self) self.Thaw() self.rt = rt self.htmlwindow = htmlwindow def handle_save(self, event): out = StringIO() handler = wx.richtext.RichTextXMLHandler() buffer = self.rt.GetBuffer() handler.SaveStream(buffer, out) out.seek(0) self.content = out.read() def handle_load(self, event): out = StringIO() handler = wx.richtext.RichTextXMLHandler() buffer = self.rt.GetBuffer() buffer.AddHandler(handler) out.write(self.content) out.seek(0) handler.LoadStream(buffer, out) self.rt.Refresh() cio = StringIO() cio.write(self.content) cio.seek(0) cout = StringIO() xmlhandler = wx.richtext.RichTextXMLHandler() htmlhandler = wx.richtext.RichTextHTMLHandler() newbuff = wx.richtext.RichTextBuffer() newbuff.AddHandler(htmlhandler) xmlhandler.LoadStream(newbuff, cio) #load xml into buffer newbuff.SaveStream(cout, wx.richtext.RICHTEXT_TYPE_HTML) cout.seek(0) self.htmlwindow.SetPage(cout.read()) class MyApp(wx.App): def OnInit(self): wx.InitAllImageHandlers() frame = TopFrame(None, - 1, "") self.SetTopWindow(frame) frame.Show() return 1 def start(): app = MyApp(0) app.MainLoop() if __name__ == "__main__": start()


---
category: release-notes
version: 2.6.3
title: New Flex Classes
breaking-changes:
potential-breaking-changes:
added:
- Flexbox classes to accommodate for space-between and space-around styling on the main axis, including .xs-flex-justify-space-between
, .xs-flex-justify-space-around
, .xs-flex-align-space-between
and .xs-flex-align-space-around
. Thanks Jared for the contribution!
release-notes:
---


Hi, I'm Micah BigEagle a learning and creating full-stack web developer. I'm currently in the University of Minnesota Full-Stack Bootcamp. I have a passion for learning new tech and improving my work.


The scripts used to build the xPack 3rd Party Development Tools are based on the xPack Build Box (XBB) v5.0.0.
The build scripts run on GNU/Linux and macOS.
The Windows binaries are generated on Intel GNU/Linux, using mingw-w64.
The macOS builds run natively on Intel and Apple Silicon
machines, and, apart from the usual Command Line Tools (provided by
Apple) and xpm
, the host machine has no other special
requirements.
The prerequisites are:
npm
(shipped with Node.js; installed via nvm)xpm
(installed vianpm
)- the Command Line Tools from Apple
Some build scripts may require Python 3. If not already available in the standard Apple distribution, install it from Python downloads.
For development builds, the procedure can be executed on a recent macOS version (currently tested up to 12.6).
For production builds it is recommended to use a slightly older version, for example macOS 10.13 is a good compromise.
It is not mandatory to have a physical macOS 10.13 machine, a virtual machine is also perfectly fine. Both Parallels and VirtualBox were checked and were functional (although VirtualBox was not as stable as Parallels).
The build scripts were tested on:
- macOS 12.6.3, running on an Intel MacMini
- macOS 10.13, running inside a Parallels virtual machine
- macOS 11.7.4, running on an Apple Silicon MacMini
npm/xpm
Quick instructions
If you know what you’re doing and prefer a shortcut, copy/paste the following script into a terminal (otherwise perform the steps one by one).
mkdir -pv "${HOME}/Downloads/"
curl --output "${HOME}/Downloads/install-nvm-node-npm-xpm.sh" https://raw.githubusercontent.com/xpack/assets/master/scripts/install-nvm-node-npm-xpm.sh
cat "${HOME}/Downloads/install-nvm-node-npm-xpm.sh"
bash "${HOME}/Downloads/install-nvm-node-npm-xpm.sh"
exit
This script will install nvm
(the Node Version Manager), node
,
npm
and xpm
.
nvm
automatically,
the script adds several lines
to the shell initialisation script.node/npm
npm
is shipped with Node.js, and is required to install xpm
.
For full details on installing Node.js, please see the xPack prerequisites page.
nvm
instead, as instructed, otherwise you will run into
troubles caused by permissions.xpm
xpm
is a portable
Node.js command line application.
If you followed the Quick instructions, it is already installed.
Otherwise, to install it, follow the steps in the xpm install page.
If you know what you’re doing and prefer a shortcut, issue the following command:
npm install --global xpm@latest
The Command Line Tools
The macOS compiler and other development tools are packed in a separate Xcode add-on. The best place to get it is from the Developer site, although this might require enrolling to the developer program (free of charge).
If you followed the Quick instructions, it is already installed.
Otherwise, the recommended way is to install the Command Line Tools separately via a command line:
$ xcode-select --install
$ xcode-select -p
/Library/Developer/CommandLineTools
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-13<IP_ADDRESS>)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
No macOS Docker
Due to the specifics of macOS, Docker cannot run natively; instead, it uses a GNU/Linux virtual machine running in Apple HyperKit (Apple’s virtualization framework), and a file system compatibility layer.
The end result is that Docker runs slowly, consumes a lot of memory, and is not reliable, so it is not recommended to run the Linux/Windows builds on macOS.
The GNU/Linux build scripts use a set of Docker images based on older and more conservative distributions, to avoid problems when attempting to run the executables on older systems.
Any x86_64/aarch64/armhf GNU/Linux distribution that is able to run Docker should be fine; it is not necessary to have a physical machine, virtual machines are perfectly fine. For better results, dedicate 3-4 cores and 8-12 GB of RAM.
The XBB v5.0.0 Docker images are built on top of Ubuntu 18 LTS for both Intel and Arm GNU/Linux, which should allow the resulting binaries to run on any system based on GLIBC >= 2.27.
The prerequisites are:
curl
(installed via the system package manager)git
(installed via the system package manager)docker
(preferably a recent one, installed from docker.com)npm
(shipped with Node.js; installed via nvm, not the system package manager)xpm
(installed vianpm
)
The build scripts do most of the actual work in a Docker container, and,
apart from curl
, git
docker
and xpm
, the host machine has no other
special requirements.
The build scripts were tested on:
- Ubuntu 18.04 LTS, running on an Intel NUC NUC8i7BEH (i7) with 32 GB of RAM
- Debian 10 (buster), running on an AMD Ryzen 5600G with 32 GB of RAM
- Raspberry Pi OS 64-bit, running on a Raspberry Pi 4 with 8 GB of RAM
- Raspberry Pi OS 32-bit, running on a Raspberry Pi 4 with 4 GB of RAM
curl & git
Install curl
& git
using the system package manager.
For example on Ubuntu and Debian derived distributions, use:
sudo apt-get install --yes curl git
Docker
A recent Docker is necessary. If your distribution has one, probably it can be used, but generally it is recommended to update to the latest stable available directly from docker.com.
For any GNU/Linux distribution, follow the specific instructions.
For example, the steps to install Docker on a modern Ubuntu system are basically:
sudo apt-get update && \
\
sudo apt-get install ca-certificates curl gnupg && \
\
sudo mkdir -m 0755 -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
\
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
\
sudo apt-get update && \
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
To check if the install is functional, run the Hello World image,
for the moment as sudo
:
$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b04784fba78d: Pull complete
Digest: sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
...
Configure Docker to run as a regular user
To allow Docker to run as a regular user, you need to be a member of
the docker
group.
sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo service docker restart
The above script are for Ubuntu and the Debian family. For other distributions, the last line may differ, for example for Arch Linux use:
systemctl restart docker
To make these changes effective, preferably reboot the machine.
To check if the configuration change is functional, run the same Hello World image without sudo:
$ docker run hello-world
Hello from Docker!
...
Docker images
The Docker images are available from Docker Hub. They were build using the Dockerfiles available from XBB (xPack Build Box).
If not already loaded, Docker will load the images at first usage. The images are reasonably large, currently below 1 GB.
More details in each script documentation page.
npm/xpm
Quick instructions
If you know what you’re doing and prefer a shortcut, copy/paste the following script into a terminal (otherwise perform the steps one by one).
mkdir -pv "${HOME}/Downloads/"
curl --output "${HOME}/Downloads/install-nvm-node-npm-xpm.sh" https://raw.githubusercontent.com/xpack/assets/master/scripts/install-nvm-node-npm-xpm.sh
cat "${HOME}/Downloads/install-nvm-node-npm-xpm.sh"
bash "${HOME}/Downloads/install-nvm-node-npm-xpm.sh"
exit
This script will install nvm
(the Node Version Manager), node
,
npm
and xpm
.
nvm
automatically,
the script adds several lines
to the shell initialisation script.node/npm
npm
is shipped with Node.js, and is required to install xpm
.
For full details on installing Node.js, please see the xPack prerequisites page.
nvm
instead, as instructed, otherwise you will run into
troubles caused by permissions.xpm
xpm
is a portable
Node.js command line application.
If you followed the Quick instructions, it is already installed.
Otherwise, to install it, follow the steps in the xpm install page.
If you know what you’re doing and prefer a shortcut, issue the following command:
npm install --global xpm@latest
Visual Studio Code
Although not mandatory, VS Code is a nice addition to the development environment, and with the xPack extension, some of the actions are only a mouse click away.


Functions
const picker = new tempusdominus.TempusDominus(document.getElementById('datetimepicker1'));
Dates
Getting the View Date
picker.viewDate
returns the pickers current view date.
picker.dates
There are a number of function here that allow for retrieving the selected dates or adding to them.
picked
Returns an array of DateTime
of the selected date(s).
lastPicked
Returns the last picked DateTime
of the selected date(s).
lastPickedIndex
Returns the length of picked dates -1 or 0 if none are selected.
add(DateTime)
Adds a new DateTime to selected dates array. Use this function with caution. It will not automatically refresh the widget or do any validation.
set(value, index, frrom)
Tries to convert the provided value to a DateTime object. If value is null|undefined then clear the value of the provided index (or 0).
isPicked(DateTime, Unit?)
Returns true if the target date is part of the selected dates array. If unit is provided then a granularity to that unit will be used.
pickedIndex(DateTime, Unit?)
Returns the index at which target date is in the array. This is used for updating or removing a date when multi-date is used. If unit is provided then a granularity to that unit will be used.
clear
Clears all selected dates.
Emits Namespace.Events.change
with the last picked date.
updateOptions(object, boolean?)
In previous version there was a function to read/write to each of the provided options. This made it easy to use
but made the code bulky and harder to maintain. updateOptions
replaces those functions and takes an
object of new options. This allows for multiple options to be set at the same time and works the same way as when
setting up the picker.
If the optional reset
flag is provided then new options will be merged with the default values.
Display
toggle
Shows or hides the widget
Emits
-
Namespace.Events.hide
- if the widget is hidden after the toggle call -
Namespace.Events.show
- if the widget is show after the toggle call -
Namespace.Events.change
- if the widget is opened for the first time and the input element is empty andoptions.useCurrent != false
show
Shows the widget
Emits
-
Namespace.Events.show
- if the widget was hidden before that call -
Namespace.Events.change
- if the widget is opened for the first time and theuseCurrent
is set to true or to a granularity value and the input element the component is attached to has an empty value
hide
Hides the widget
Emits
Namespace.Events.hide
- if the widget was visible before that call
dispose
Destroys the widget and removes all attached event listeners. If the picker is open it will be hidden and the event fired.
disable
Disables the input element and the component is attached to, by adding a disabled="true"
attribute
to
it. If the widget was visible before that call it is hidden.
Emits
Namespace.Events.hide
- if the widget was visible before this call
enable
Enables the input element and the component is attached to, by removing disabled
attribute from it.
clear
Clears all selected dates. This is a short cut to picker.dates.clear()
subscribe(event | events[], callback | callbacks[])
Instead of adding event listeners to the pickers element, you can use the subscribe method. You can provide a single event to listen for or an array of events. When providing an array the number of callbacks must be the same as the number of events.
The subscribe method returns an unsubscribe method or an array of methods if multiple events are provided. Calling
unsubscribe remove the callback from the event listeners. Unsubscribing will not prevent
addEventListener()
from working.
const subscription = picker.subscribe(tempusdominus.Namespace.Events.change, (e) => {
console.log(e);
});
// event listener can be unsubscribed to:
subscription.unsubscribe();
//you can also provide multiple events:
const subscriptions = picker.subscribe(
[tempusdominus.Namespace.Events.show,tempusdominus.Namespace.Events.hide],
[(e)=> console.log(e), (e) => console.log(e)]
)


{%extends 'base.html'%} {%block content%} {% load bootstrap3 %} {% load staticfiles%}
no business at the moment
{{post.description}}.
no posts at the moment


We build our community on four pillars. These pillars guide our decisions in everything from developing curriculum to hiring staff and setting our budget. Our Pillars are what we value in education. They are our promise to our students and community.
Students learn by studying topics that interest them and apply to their lives (e.g. project-based learning, experiential days)
Students develop real working relationships with classmates and staff (e.g. project advisories, student organizations)
Students study environmental themes in their coursework (e.g. river tours with national park rangers, annual Audubon retreat)
Students graduate from AAHS ready for life after high school. (e.g. senior life plan, internships, college applications)


◄ Singapore ►
Individual results
| Year | Contestant | Rank | Award |
|---|---|---|---|
| 2023 | Shanay Jindal | 49 | Silver Medal |
| 2023 | Pin Che Tan | 57 | Silver Medal |
| 2023 | Jingyang James He | 69 | Silver Medal |
| 2023 | Yu Chieh Sun | 72 | Silver Medal |
| 2023 | Yichen Li | 75 | Silver Medal |
| 2022 | Guangyuan Chen | 23 | Gold Medal |
| 2022 | Xiaoqing Sun | 52 | Silver Medal |
| 2022 | Jun Wei Tan | 68 | Silver Medal |
| 2022 | Xing Yang Shen | 82 | Silver Medal |
| 2022 | Kehan Gao | 90 | Silver Medal |
| 2021 | Akshat Chaudhary | 20 | Gold Medal |
| 2021 | Sim Hui Xiang | 41 | Gold Medal |
| 2021 | Wang Yunrui | 59 | Silver Medal |
| 2021 | Lewin Basil Slader Marsh | 73 | Silver Medal |
| 2021 | Tan Chien Hao | 90 | Silver Medal |
| 2019 | Xinghong Fu | 15 | Gold Medal |
| 2019 | Jin Quan Matthew Chia | 25 | Gold Medal |
| 2019 | Shu Ge | 77 | Silver Medal |
| 2019 | Xiaorui Zhang | 88 | Silver Medal |
| 2019 | Sidharth Chambocheri Veetil | 127 | Bronze Medal |
| 2018 | Dylan Toh Shan Hong | 4 | Gold Medal |
| 2018 | Lu Ziyou | 22 | Gold Medal |
| 2018 | Joshua Teo Wei Hern | 33 | Gold Medal |
| 2018 | Jianzhi Wang | 39 | Gold Medal |
| 2018 | Han Ruobin | 102 | Silver Medal |
| 2017 | Bradley Teo Wei Jie | ≥1 | Gold Medal |
| 2017 | Darren Wayne Lim | ≥1 | Gold Medal |
| 2017 | Lee Vint Ve Shein Lin Htut | ≥1 | Gold Medal |
| 2017 | Ma Zhao Yu | ≥1 | Gold Medal |
| 2017 | Ong Hong Ming Teddy | ≥1 | Gold Medal |
| 2016 | Yuan Lee | 10 | Gold Medal |
| 2016 | Jiahai Feng | 24 | Gold Medal |
| 2016 | Jin Ming Koh | 55 | Silver Medal |
| 2016 | Jian Rong Ng | 59 | Silver Medal |
| 2016 | Yu Tse Lee | 87 | Silver Medal |
| 2015 | Chua Yee Shuen Darren | 5 | Gold Medal |
| 2015 | Garett Tok Ern Liang | 44 | Silver Medal |
| 2015 | Peter Yuen Ho Hin | 45 | Silver Medal |
| 2015 | Joel Tan Shi Quan | 46 | Silver Medal |
| 2015 | Joshua Lim Yong Kiat | 63 | Silver Medal |
| 2014 | Fan Francis Wang | 9 | Gold Medal |
| 2014 | Jau Tung Chan | 24 | Gold Medal |
| 2014 | Yong Hui Lim | 25 | Gold Medal |
| 2014 | Gideon Lee | 51 | Silver Medal |
| 2014 | Kai YenJee | 84 | Silver Medal |
| 2013 | Sean Seet Xiang En | 4 | Gold Medal |
| 2013 | Daniel Mark Keat Kay | 11 | Gold Medal |
| 2013 | Lim Jeck | 13 | Gold Medal |
| 2013 | Tan Wei Liang Byorn | 17 | Gold Medal |
| 2013 | Ashwin Venkidachalam | 42 | Silver Medal |
| 2012 | Ding Yue | 21 | Gold Medal |
| 2012 | Ang Yu Jian | 41 | Gold Medal |
| 2012 | Kuan Jun Jie Joseph | 43 | Gold Medal |
| 2012 | Huan Yan Qi | 45 | Gold Medal |
| 2012 | Soo Wah Ming Wayne | 101 | Silver Medal |
| 2011 | Zi Yang Kang | 12 | Gold Medal |
| 2011 | Kewei Li | 13 | Gold Medal |
| 2011 | Sen Lin | 17 | Gold Medal |
| 2011 | Jiahuang Lin | 37 | Gold Medal |
| 2011 | Zong Xuan Tan | 38 | Gold Medal |
| 2010 | Lynn Chua | 20 | Gold Medal |
| 2010 | Soon Wei Daniel Lim | 49 | Silver Medal |
| 2010 | Jie Liang Lee | 51 | Silver Medal |
| 2010 | Chuan Wei Darryl Foo | 70 | Silver Medal |
| 2010 | Qi Xuan Benjamin Goh | 93 | Silver Medal |
| 2009 | Amyas Chew Weng Khin | 12 | Gold Medal |
| 2009 | Jarrel Seah Chen Yi | 28 | Gold Medal |
| 2009 | Ong Ming Yang | 77 | Silver Medal |
| 2009 | Teo Mae Hwee | 85 | Silver Medal |
| 2009 | Tan Zhong Ming | 92 | Silver Medal |
| 2008 | Chan Wai Hong Ronald | 37 | Gold Medal |
| 2008 | Lam Chee Yong Leslie | 82 | Silver Medal |
| 2008 | Zhao Ye | 83 | Silver Medal |
| 2008 | Ng Kia Boon | 89 | Silver Medal |
| 2008 | Zhai Weichao | 163 | Bronze Medal |
| 2007 | Li Haoyi | 11 | Gold Medal |
| 2007 | Shao Qi Daniel Sim | 33 | Gold Medal |
| 2007 | Yak Xin Yang | 67 | Silver Medal |
| 2007 | Wan Jen Cheryl Quah | 124 | Bronze Medal |
| 2007 | Yiu Wah Daniel Lo | 126 | Bronze Medal |
| 2006 | Low Guang How | 24 | Gold Medal |
| 2006 | Lee Yirun Arthur | 86 | Silver Medal |
| 2006 | Cheng Justin | 92 | Bronze Medal |
| 2006 | Sitaram Krithin | 98 | Bronze Medal |
| 2006 | Ho Wen Wei | 109 | Bronze Medal |
| 2005 | Ang Jian Peng | 24 | Gold Medal |
| 2005 | Koh Chan Swee | 28 | Gold Medal |
| 2005 | Ng Wei Xiang Jonathan | 36 | Gold Medal |
| 2005 | Li Hongyi | 85 | Bronze Medal |
| 2005 | Wong Da Wei | 96 | Bronze Medal |
| 2004 | Liangzheng Tan | ≥32 | Silver Medal |
| 2004 | Yu Xian Lim | ≥32 | Silver Medal |
| 2004 | Andy Wong | ≥67 | Bronze Medal |
| 2004 | Amos Goh | ≥135 | Honourable Mention |
| 2004 | Zhidong Leong | ≥135 | Honourable Mention |
| 2003 | He Ruijie | 49 | Silver Medal |
| 2003 | Lee Ching Hua | 51 | Silver Medal |
| 2003 | Tan Guangyan Gideon | 88 | Bronze Medal |
| 2003 | Wang Jiun Haur | 127 | Honourable Mention |
| 2003 | Desmond Cai | 131 | Honourable Mention |
| 2002 | Ming Qiang Nicholas Tham | 10 | Gold Medal |
| 2002 | Ng Boon Leong | 29 | Gold Medal |
| 2002 | Shengqiang Joseph Tan | 44 | Silver Medal |
| 2002 | Foo Chuan Sheng | 118 | Bronze Medal |
| 2002 | Lee Yang Yang | 175 | Honourable Mention |
| 2001 | Joel Weiqiang Goh | 17 | Gold Medal |
| 2001 | Jay Huiyi Chua | 97 | Bronze Medal |
| 2001 | Ziyan Huang | 107 | Bronze Medal |
| 2001 | Rui Zhen Tan | 144 | Honourable Mention |
| 2001 | Serena Zhiyi Lee | 148 | Honourable Mention |
| 2000 | Ng Wee Hao | 66 | Bronze Medal |
| 2000 | Jonathan Tay Jianxiong | 83 | Honourable Mention |
| 2000 | Toh Kai Yang | 85 | Honourable Mention |
| 2000 | Brian Lim Youliang | 114 | Honourable Mention |
| 1999 | Ruimin He | 5 | Gold Medal |
| 1999 | Zilong Chen | 40 | Silver Medal |
| 1999 | Jiahan Eugene Seo | 126 | Bronze Medal |
| 1999 | Wenzheng Yeo | 140 | Bronze Medal |
| 1998 | Koh Chern-Yen | 89 | Honourable Mention |
| 1998 | Ang Pet Chean | 117 | Honourable Mention |
| 1998 | Ee Hou Yong | 122 | Honourable Mention |
| 1997 | Tse Hsiang Teo | 15 | Gold Medal |
| 1997 | Chuo Hao Yeo | 37 | Silver Medal |
| 1997 | Li Jie Wong | 59 | Bronze Medal |
| 1997 | Thomas Yeo | 88 | Bronze Medal |
| 1997 | Herman Chow | 99 | Bronze Medal |
| 1996 | Wai Kit Koh | 29 | Silver Medal |
| 1996 | Ghee Hwee Lai | 69 | Bronze Medal |
| 1996 | Hin Yeong Koong | 96 | Honourable Mention |
| 1996 | Chee Wee Ang | 117 | Honourable Mention |
| 1996 | Wing Kay Sze William | 130 | Honourable Mention |
| 1995 | Tiam Hock Tay | 44 | Silver Medal |
| 1995 | Cher Chuen Joseph Gan | 57 | Bronze Medal |
| 1995 | Wing Tat James Leong | 117 | Honourable Mention |
| 1995 | Selwyn Scharnhorst | 147 | Honourable Mention |
| 1994 | Law Ching | 26 | Bronze Medal |
| 1993 | Chee We Ng | 48 | Bronze Medal |
| 1993 | Nathaniel Kuang Chern Ng | 82 | Honourable Mention |
| 1993 | Khoong Hong Khoo | 95 | Honourable Mention |
| 1993 | Kang Looi Choo | 105 | Honourable Mention |
| 1992 | Lim Hway Kiong | 62 | Honourable Mention |
| 1992 | Fung Duncan K. T. | 72 | Honourable Mention |
| 1992 | Huang Kee-Dyi | 81 | Honourable Mention |
| 1991 | Du'c Hoang | 52 | Bronze Medal |
| 1991 | Hui Tay Kwang | 58 | Honourable Mention |
| 1990 | Yang Chang Huei | 30 | Bronze Medal |
| 1989 | Desmond Rodney Lim Chin Siong | 7 | Gold Medal |
| 1989 | Lim Shiang Liang | 38 | Bronze Medal |
Results may be incomplete or incorrect.
Please send the relevant information to the webmaster:
<EMAIL_ADDRESS>If you are a participant you can send a personal page URL to be attached to your name.
If you are a participant you can send a personal page URL to be attached to your name.


Stateless processors¶
Stateless transformations do not require state for processing and they do not require a state store associated with the stream processor. Kafka 0.11.0 and later allows you to materialize the result from a stateless IKTable transformation. This allows the result to be queried through interactive queries. To materialize a IKTable, each of the below stateless operations can be augmented with an optional queryableStoreName argument.
Branch¶
Branch (or split) a IKStream based on the supplied predicates into one or more IKStream instances. (details)
Predicates are evaluated in order. A record is placed to one and only one output stream on the first match: if the n-th predicate evaluates to true, the record is placed to n-th stream. If no predicate matches, the the record is dropped.
Branching is useful, for example, to route records to different downstream topics.
IKStream -> IKStream[]
IKStream<string, string> stream = ....
var branches = stream.Branch(
(k,v) => k.StartsWith("A"),
(k,v) => k.StartsWith("B"),
(k,v) => k.StartsWith("C"));
// branches[0] contains all records whose keys start with "A"
// branches[1] contains all records whose keys start with "B"
// branches[2] contains all records whose keys start with "C"
Filter¶
Evaluates a boolean function for each element and retains those for which the function returns true.
IKStream -> IKStream
IKTable -> IKTable
IKStream<string, string> stream = ....
IKTable<string, string> table = ...
// A filter that selects only value which contains 'test' string constant
stream.Filter((k, v) => v.Contains("test"))
table.Filter((k, v) => v.Contains("test"))
InverseFilter¶
Evaluates a boolean function for each element and drops those for which the function returns true.
IKStream -> IKStream
IKTable -> IKTable
IKStream<string, string> stream = ....
IKTable<string, string> table = ...
// A inverse filter that selects value which contains not 'test' string constant
stream.FilterNot((k, v) => v.Contains("test"))
table.FilterNot((k, v) => v.Contains("test"))
FlatMap¶
Takes one record and produces zero, one, or more records. You can modify the record keys and values, including their types.
IKStream → IKStream
IKStream<string, string> stream = ....
// Here, we generate two output records for each input record.
// We also change the key and value types.
// Example: ("KEY1", "Hello") -> ("HELLO", 100), ("HELLO", 900)
stream
.FlatMap((k, v) =>
{
List<KeyValuePair<string, long>> results = new List<KeyValuePair<string, long>>();
results.Add(KeyValuePair.Create(v.ToUpper(), 100L));
results.Add(KeyValuePair.Create(v.ToUpper(), 900L));
return results;
})
FlatMapValues¶
Takes one record and produces zero, one, or more records, while retaining the key of the original record. You can modify the record values and the value type.
flatMapValues is preferable to flatMap because it will not cause data re-partitioning. However, you cannot modify the key or key type like flatMap does.
IKStream → IKStream
IKStream<string, string> stream = ....
// Split a word into characters.
stream.FlatMapValues((k,v) => v.ToCharArray())
Foreach¶
Terminal operation. Performs a stateless action on each record.
You would use foreach to cause side effects based on the input data (similar to peek) and then stop further processing of the input data (unlike peek, which is not a terminal operation).
Note on processing guarantees: Any side effects of an action (such as writing to external systems) are not trackable by Kafka, which means they will typically not benefit from Kafka’s processing guarantees.
IKGroupedStream → IKTable
IKStream<string, string> stream = ....
// Print the contents of the IKStream to the local console
stream.Foreach((k,v) => Console.WriteLine($"{k} {v}"))
GroupByKey¶
Groups the records by the existing key.
Grouping is a prerequisite for aggregating a stream or a table and ensures that data is properly partitioned (“keyed”) for subsequent operations.
When to set explicit SerDes: Variants of GroupByKey exist to override the configured default SerDes of your application, which you must do if the key and/or value types of the resulting IKGroupedStream do not match the configured default SerDes.
IKStream → IKGroupedStream
GroupBy¶
Groups the records by a new key, which may be of a different key type. When grouping a table, you may also specify a new value and value type. groupBy is a shorthand for SelectKey(…).GroupByKey().
Grouping is a prerequisite for aggregating a stream or a table and ensures that data is properly partitioned (“keyed”) for subsequent operations.
When to set explicit SerDes: Variants of GroupBy exist to override the configured default SerDes of your application, which you must do if the key and/or value types of the resulting IKGroupedStream or IKGroupedTable do not match the configured default SerDes.
IKStream → IKGroupedStream
IKTable → IKGroupedTable
Map¶
Takes one record and produces one record. You can modify the record key and value, including their types.
IKStream → IKStream
IKStream<string, string> stream = ....
// We create a new record keyvalue, with the value to key and key to value
stream.Map((k,v) => KeyValuePair.Create(v.ToUpper(), k.ToUpper()))
MapValues¶
Takes one record and produces one record, while retaining the key of the original record. You can modify the record value and the value type.
MapValues is preferable to map because it will not cause data re-partitioning. However, it does not allow you to modify the key or key type like map does.
IKStream → IKStream
IKTable → IKTable
IKStream<string, string> stream = ....
IKTable<string, string> table = ...
// New value type => Int32 which is the length of string value
stream.MapValues((k,v) => v.Length)
table.MapValues((k,v) => v.Length)
Peek¶
Performs a stateless action on each record, and returns an unchanged stream.
You would use peek to cause side effects based on the input data (similar to foreach) and continue processing the input data (unlike foreach, which is a terminal operation). peek returns the input stream as-is; if you need to modify the input stream, use map or mapValues instead.
Peek is helpful for use cases such as logging or tracking metrics or for debugging and troubleshooting.
Note on processing guarantees: Any side effects of an action (such as writing to external systems) are not trackable by Kafka, which means they will typically not benefit from Kafka’s processing guarantees.
IKStream → IKStream
IKStream<string, string> stream = ....
stream.Peek((k,v) => Console.WriteLine($"{k} {v}"))
Print¶
Terminal operation. Prints the records to Sys Out.
Calling Print() is the same as calling Foreach((key, value) => Console.WriteLine($”{k} {v}”))
Print is mainly for debugging/testing purposes, and it will try to flush on each record print. Hence it should not be used for production usage if performance requirements are concerned.
IKStream → void
IKStream<string, string> stream = ....
// New value type => Int32 which is the lenght of string value
stream.Print(Printed<string, string>.ToOut())
SelectKey¶
Assigns a new key – possibly of a new key type – to each record.
Calling SelectKey(…) is the same as calling Map((key, value) => …)
Marks the stream for data re-partitioning: Applying a grouping or a join after selectKey will result in re-partitioning of the records.
IKStream → IKStream
IKStream<string, string> stream = ....
// Derive a new record key from the record's value.
stream.SelectKey((k,v) => v.Length)
Table to Steam¶
Get the changelog stream of this table.
IKTable → IKStream
IKTable<string, string> table = ....
// Also, a variant of `ToStream` exists that allows you
// to select a new key for the resulting stream.
IKStream<string, string> = table.ToStream();


Siddhartha Jain
Gates-Dell Complex, 4.410E · Austin, TX 78712
<EMAIL_ADDRESS><EMAIL_ADDRESS>Hiya! I'm a PhD student at UT Austin, fortunate to be advised by Scott Aaronson. Previously, I was a MSc student at EPFL and lucky to be mentored by Mika Göös.
Curriculum Vitae.
Interesting links: ECCC Fixes, Where's That Paper?