Discrete Fourier Transforms#
This file contains functions useful for computing discrete Fourier
transforms and probability distribution functions for discrete random
variables for sequences of elements of \(\QQ\) or \(\CC\), indexed by a
range(N)
, \(\ZZ / N \ZZ\), an abelian group, the conjugacy classes
of a permutation group, or the conjugacy classes of a matrix group.
This file implements:
__eq__()
__mul__()
(for right multiplication by a scalar)plotting, printing –
IndexedSequence.plot()
,IndexedSequence.plot_histogram()
,_repr_()
,__str__()
dft()
– computes the discrete Fourier transform for the following cases:a sequence (over \(\QQ\) or
CyclotomicField
) indexed byrange(N)
or \(\ZZ / N \ZZ\)a sequence (as above) indexed by a finite abelian group
a sequence (as above) indexed by a complete set of representatives of the conjugacy classes of a finite permutation group
a sequence (as above) indexed by a complete set of representatives of the conjugacy classes of a finite matrix group
idft()
– computes the discrete Fourier transform for the following cases:a sequence (over \(\QQ\) or CyclotomicField) indexed by
range(N)
or \(\ZZ / N \ZZ\)
dct()
,dst()
(for discrete Fourier/Cosine/Sine transform)convolution (in
IndexedSequence.convolution()
andIndexedSequence.convolution_periodic()
)fft()
,ifft()
– (fast Fourier transforms) wrapping GSL’sgsl_fft_complex_forward()
,gsl_fft_complex_inverse()
, using William Stein’sFastFourierTransform()
dwt()
,idwt()
– (fast wavelet transforms) wrapping GSL’sgsl_dwt_forward()
,gsl_dwt_backward()
using Joshua Kantor’sWaveletTransform()
class. Allows for wavelets of type:“haar”
“daubechies”
“daubechies_centered”
“haar_centered”
“bspline”
“bspline_centered”
Todo
“filtered” DFTs
more idfts
more examples for probability, stats, theory of FTs
AUTHORS:
David Joyner (2006-10)
William Stein (2006-11) – fix many bugs
- class sage.calculus.transforms.dft.IndexedSequence(L, index_object)#
Bases:
SageObject
An indexed sequence.
INPUT:
L
– A listindex_object
must be a Sage object with an__iter__
method containing the same number of elements asself
, which is a list of elements taken from a field.
- base_ring()#
This just returns the common parent \(R\) of the \(N\) list elements. In some applications (say, when computing the discrete Fourier transform, dft), it is more accurate to think of the base_ring as the group ring \(\QQ(\zeta_N)[R]\).
EXAMPLES:
sage: J = list(range(10)) sage: A = [1/10 for j in J] sage: s = IndexedSequence(A,J) sage: s.base_ring() Rational Field
- convolution(other)#
Convolves two sequences of the same length (automatically expands the shortest one by extending it by 0 if they have different lengths).
If \(\{a_n\}\) and \(\{b_n\}\) are sequences indexed by \((n=0,1,...,N-1)\), extended by zero for all \(n\) in \(\ZZ\), then the convolution is
\[c_j = \sum_{i=0}^{N-1} a_i b_{j-i}.\]INPUT:
other
– a collection of elements of a ring with index set a finite abelian group (under \(+\))
OUTPUT:
The Dirichlet convolution of
self
andother
.EXAMPLES:
sage: J = list(range(5)) sage: A = [ZZ(1) for i in J] sage: B = [ZZ(1) for i in J] sage: s = IndexedSequence(A,J) sage: t = IndexedSequence(B,J) sage: s.convolution(t) [1, 2, 3, 4, 5, 4, 3, 2, 1]
AUTHOR: David Joyner (2006-09)
- convolution_periodic(other)#
Convolves two collections indexed by a
range(...)
of the same length (automatically expands the shortest one by extending it by 0 if they have different lengths).If \(\{a_n\}\) and \(\{b_n\}\) are sequences indexed by \((n=0,1,...,N-1)\), extended periodically for all \(n\) in \(\ZZ\), then the convolution is
\[c_j = \sum_{i=0}^{N-1} a_i b_{j-i}.\]INPUT:
other
– a sequence of elements of \(\CC\), \(\RR\) or \(\GF{q}\)
OUTPUT:
The Dirichlet convolution of
self
andother
.EXAMPLES:
sage: I = list(range(5)) sage: A = [ZZ(1) for i in I] sage: B = [ZZ(1) for i in I] sage: s = IndexedSequence(A,I) sage: t = IndexedSequence(B,I) sage: s.convolution_periodic(t) [5, 5, 5, 5, 5, 5, 5, 5, 5]
AUTHOR: David Joyner (2006-09)
- dct()#
A discrete Cosine transform.
EXAMPLES:
sage: J = list(range(5)) sage: A = [exp(-2*pi*i*I/5) for i in J] # needs sage.symbolic sage: s = IndexedSequence(A, J) # needs sage.symbolic sage: s.dct() # needs sage.symbolic Indexed sequence: [0, 1/16*(sqrt(5) + I*sqrt(-2*sqrt(5) + 10) + ... indexed by [0, 1, 2, 3, 4]
- dft(chi=<function IndexedSequence.<lambda> at 0x7f8647dc6ef0>)#
A discrete Fourier transform “over \(\QQ\)” using exact \(N\)-th roots of unity.
EXAMPLES:
sage: J = list(range(6)) sage: A = [ZZ(1) for i in J] sage: s = IndexedSequence(A,J) sage: s.dft(lambda x: x^2) # needs sage.rings.number_field Indexed sequence: [6, 0, 0, 6, 0, 0] indexed by [0, 1, 2, 3, 4, 5] sage: s.dft() # needs sage.rings.number_field Indexed sequence: [6, 0, 0, 0, 0, 0] indexed by [0, 1, 2, 3, 4, 5] sage: # needs sage.groups sage: G = SymmetricGroup(3) sage: J = G.conjugacy_classes_representatives() sage: s = IndexedSequence([1,2,3], J) # 1,2,3 are the values of a class fcn on G sage: s.dft() # the "scalar-valued Fourier transform" of this class fcn Indexed sequence: [8, 2, 2] indexed by [(), (1,2), (1,2,3)] sage: J = AbelianGroup(2, [2,3], names='ab') sage: s = IndexedSequence([1,2,3,4,5,6], J) sage: s.dft() # the precision of output is somewhat random and architecture dependent. Indexed sequence: [21.0000000000000, -2.99999999999997 - 1.73205080756885*I, -2.99999999999999 + 1.73205080756888*I, -9.00000000000000 + 0.0000000000000485744257349999*I, -0.00000000000000976996261670137 - 0.0000000000000159872115546022*I, -0.00000000000000621724893790087 - 0.0000000000000106581410364015*I] indexed by Multiplicative Abelian group isomorphic to C2 x C3 sage: J = CyclicPermutationGroup(6) sage: s = IndexedSequence([1,2,3,4,5,6], J) sage: s.dft() # the precision of output is somewhat random and architecture dependent. Indexed sequence: [21.0000000000000, -2.99999999999997 - 1.73205080756885*I, -2.99999999999999 + 1.73205080756888*I, -9.00000000000000 + 0.0000000000000485744257349999*I, -0.00000000000000976996261670137 - 0.0000000000000159872115546022*I, -0.00000000000000621724893790087 - 0.0000000000000106581410364015*I] indexed by Cyclic group of order 6 as a permutation group sage: # needs sage.rings.number_field sage: p = 7; J = list(range(p)); A = [kronecker_symbol(j,p) for j in J] sage: s = IndexedSequence(A, J) sage: Fs = s.dft() sage: c = Fs.list()[1]; [x/c for x in Fs.list()]; s.list() [0, 1, 1, -1, 1, -1, -1] [0, 1, 1, -1, 1, -1, -1]
The DFT of the values of the quadratic residue symbol is itself, up to a constant factor (denoted c on the last line above).
Todo
Read the parent of the elements of S; if \(\QQ\) or \(\CC\) leave as is; if AbelianGroup, use abelian_group_dual; if some other implemented Group (permutation, matrix), call .characters() and test if the index list is the set of conjugacy classes.
- dict()#
Return a python dict of
self
where the keys are elements in the indexing set.EXAMPLES:
sage: J = list(range(10)) sage: A = [1/10 for j in J] sage: s = IndexedSequence(A,J) sage: s.dict() {0: 1/10, 1: 1/10, 2: 1/10, 3: 1/10, 4: 1/10, 5: 1/10, 6: 1/10, 7: 1/10, 8: 1/10, 9: 1/10}
- dst()#
A discrete Sine transform.
EXAMPLES:
sage: J = list(range(5)) sage: I = CC.0; pi = CC.pi() sage: A = [exp(-2*pi*i*I/5) for i in J] sage: s = IndexedSequence(A, J) sage: s.dst() # discrete sine Indexed sequence: [0.000000000000000, 1.11022302462516e-16 - 2.50000000000000*I, ...] indexed by [0, 1, 2, 3, 4]
- dwt(other='haar', wavelet_k=2)#
Wraps the gsl
WaveletTransform.forward
indwt
(written by Joshua Kantor). Assumes the length of the sample is a power of 2. Uses the GSL functiongsl_wavelet_transform_forward()
.INPUT:
other
– the name of the type of wavelet; valid choices are:'daubechies'
'daubechies_centered'
'haar'
(default)'haar_centered'
'bspline'
'bspline_centered'
wavelet_k
– For daubechies wavelets,wavelet_k
specifies a daubechie wavelet with \(k/2\) vanishing moments. \(k = 4,6,...,20\) for \(k\) even are the only ones implemented.For Haar wavelets,
wavelet_k
must be 2.For bspline wavelets,
wavelet_k
equal to \(103,105,202,204, 206,208,301,305,307,309\) will give biorthogonal B-spline wavelets of order \((i,j)\) wherewavelet_k
equals \(100 \cdot i + j\).
The wavelet transform uses \(J = \log_2(n)\) levels.
EXAMPLES:
sage: J = list(range(8)) sage: A = [RR(1) for i in J] sage: s = IndexedSequence(A,J) sage: t = s.dwt() sage: t # slightly random output Indexed sequence: [2.82842712474999, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000] indexed by [0, 1, 2, 3, 4, 5, 6, 7]
- fft()#
Wraps the gsl
FastFourierTransform.forward()
infft
.If the length is a power of 2 then this automatically uses the radix2 method. If the number of sample points in the input is a power of 2 then the wrapper for the GSL function
gsl_fft_complex_radix2_forward()
is automatically called. Otherwise,gsl_fft_complex_forward()
is used.EXAMPLES:
sage: J = list(range(5)) sage: A = [RR(1) for i in J] sage: s = IndexedSequence(A,J) sage: t = s.fft(); t Indexed sequence: [5.00000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000] indexed by [0, 1, 2, 3, 4]
- idft()#
A discrete inverse Fourier transform. Only works over \(\QQ\).
EXAMPLES:
sage: J = list(range(5)) sage: A = [ZZ(1) for i in J] sage: s = IndexedSequence(A,J) sage: fs = s.dft(); fs # needs sage.rings.number_field Indexed sequence: [5, 0, 0, 0, 0] indexed by [0, 1, 2, 3, 4] sage: it = fs.idft(); it # needs sage.rings.number_field Indexed sequence: [1, 1, 1, 1, 1] indexed by [0, 1, 2, 3, 4] sage: it == s # needs sage.rings.number_field True
- idwt(other='haar', wavelet_k=2)#
Implements the gsl
WaveletTransform.backward()
indwt
.Assumes the length of the sample is a power of 2. Uses the GSL function
gsl_wavelet_transform_backward()
.INPUT:
other
– Must be one of the following:"haar"
"daubechies"
"daubechies_centered"
"haar_centered"
"bspline"
"bspline_centered"
wavelet_k
– For daubechies wavelets,wavelet_k
specifies a daubechie wavelet with \(k/2\) vanishing moments. \(k = 4,6,...,20\) for \(k\) even are the only ones implemented.For Haar wavelets,
wavelet_k
must be 2.For bspline wavelets,
wavelet_k
equal to \(103,105,202,204, 206,208,301,305,307,309\) will give biorthogonal B-spline wavelets of order \((i,j)\) wherewavelet_k
equals \(100 \cdot i + j\).
EXAMPLES:
sage: J = list(range(8)) sage: A = [RR(1) for i in J] sage: s = IndexedSequence(A,J) sage: t = s.dwt() sage: t # random arch dependent output Indexed sequence: [2.82842712474999, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000] indexed by [0, 1, 2, 3, 4, 5, 6, 7] sage: t.idwt() # random arch dependent output Indexed sequence: [1.00000000000000, 1.00000000000000, 1.00000000000000, 1.00000000000000, 1.00000000000000, 1.00000000000000, 1.00000000000000, 1.00000000000000] indexed by [0, 1, 2, 3, 4, 5, 6, 7] sage: t.idwt() == s True sage: J = list(range(16)) sage: A = [RR(1) for i in J] sage: s = IndexedSequence(A,J) sage: t = s.dwt("bspline", 103) sage: t # random arch dependent output Indexed sequence: [4.00000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000] indexed by [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] sage: t.idwt("bspline", 103) == s True
- ifft()#
Implements the gsl
FastFourierTransform.inverse
infft
.If the number of sample points in the input is a power of 2 then the wrapper for the GSL function
gsl_fft_complex_radix2_inverse()
is automatically called. Otherwise,gsl_fft_complex_inverse()
is used.EXAMPLES:
sage: J = list(range(5)) sage: A = [RR(1) for i in J] sage: s = IndexedSequence(A,J) sage: t = s.fft(); t Indexed sequence: [5.00000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000] indexed by [0, 1, 2, 3, 4] sage: t.ifft() Indexed sequence: [1.00000000000000, 1.00000000000000, 1.00000000000000, 1.00000000000000, 1.00000000000000] indexed by [0, 1, 2, 3, 4] sage: t.ifft() == s 1
- index_object()#
Return the indexing object.
EXAMPLES:
sage: J = list(range(10)) sage: A = [1/10 for j in J] sage: s = IndexedSequence(A,J) sage: s.index_object() [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- list()#
Return the list of
self
.EXAMPLES:
sage: J = list(range(10)) sage: A = [1/10 for j in J] sage: s = IndexedSequence(A,J) sage: s.list() [1/10, 1/10, 1/10, 1/10, 1/10, 1/10, 1/10, 1/10, 1/10, 1/10]
- plot()#
Plot the points of the sequence.
Elements of the sequence are assumed to be real or from a finite field, with a real indexing set
I = range(len(self))
.EXAMPLES:
sage: I = list(range(3)) sage: A = [ZZ(i^2)+1 for i in I] sage: s = IndexedSequence(A,I) sage: P = s.plot() # needs sage.plot sage: show(P) # not tested # needs sage.plot
- plot_histogram(clr=(0, 0, 1), eps=0.4)#
Plot the histogram plot of the sequence.
The sequence is assumed to be real or from a finite field, with a real indexing set
I
coercible into \(\RR\).Options are
clr
, which is an RGB value, andeps
, which is the spacing between the bars.EXAMPLES:
sage: J = list(range(3)) sage: A = [ZZ(i^2)+1 for i in J] sage: s = IndexedSequence(A,J) sage: P = s.plot_histogram() # needs sage.plot sage: show(P) # not tested # needs sage.plot


Kristen Bell discusses ‘Frozen 2,’ what it can teach kids
by C.L. Gaber Special to the Las Vegas Review-JournalLet it go? Kristen Bell refuses to for a good reason. Who knew that “Frozen” was a parenting device?
“When I see that look in their eye, where they’re about to ring each other’s necks, I’ll say, ‘Hmmm, what would Anna and Elsa do in this moment? Do you think they would pinch and kick each other?” said the mom to Delta Bell, 4, and Lincoln, 6, with actor husband Dax Shepard.
“Sometimes, it even works!” said the 39-year-old California native with a laugh.
In sequel to 2013’s megahit “Frozen,” Anna (Bell), Elsa (Idina Menzel) and Olaf (Josh Gad) must go on a trek to figure out how Elsa got her powers. The enchanted forest seems to have the answers, despite the fact that it has been cursed.
Does Bell, who also stars on the last season of “The Good Place,” croon the new soundtrack around the house? “It’s never cool when it’s your mom singing those songs,” she said.
Review-Journal: What is your idea of an ideal Sunday?
Kristen Bell: Maybe we make an egg sandwich and then go visit Griffith Park. We like to explore. A great day is going to Mammoth Mountain to play in the snow if it’s winter or just go for a hike. I love the peace there. … If we’re home, maybe we’re planting in the garden or take a bike ride. We might finish up with dinner and a family dance party in the living room.
In “Frozen 2,” Anna and Elsa are at crossroads. Should they rule together?
Anna for the whole movie is working on her co-dependency. She doesn’t know what to do alone. I know that feeling well. It’s easy to live for other people, but when you’re finally alone … what do you do? When I’m alone in my own house, I’m literally like, “What do I do now?” But instead of being co-dependent, a more grown-up Anna’s belief and drive make her stand next to her sister no matter what.
Do you share any traits with your animated Anna?
I tried to infuse a ton of me into Anna. I do think we have that same spirit of we can get it done.
When was the first time you met your screen sister, Idina Menzel?
We were both cast in the first “Frozen,” and I was told by Disney to go to Idina’s house to prepare a song. It was very cool and terrifying. So, I drove to her house, stood by her piano, and my palms were literally sweating as I sang. We stopped, Idina put her hand on my shoulder and said, “You sound so beautiful.” I was melting! Later, we ended up singing together in this lovely harmony at the first read through.
Your character Anna has the on-screen romance, but a modern one.
I love that her on-screen love isn’t there to save the day. He does ride in, but says to Anna, “I’m here. What do you need?” Another moment in the movie, something happens and she’s worried about their relationship. He says, “It’s OK. My love is not fragile.” What I really love about this couple is that their feelings are real.
What message do you hope these movies teach your daughters?
I really hope that the movies teach them that they are capable of going out into the world to accomplish things or not accomplish things. The message is even if something seems unattainable, you can still try if you have the drive.
And you sneak some history lessons into “Frozen 2.”
It puts this very complex idea in front of kids in this simple way. It asks kids: “Have you ever thought about how past generations maybe didn’t behave that great or could have done it better?” We nudge them and say, “It’s about learning from the past and evolving as a new generation.” But in order to evolve, you have to learn from history. That’s why we all love origin stories. I think deep down, we want betterment for humanity.
Is it OK to have kids a bit on the edge of their seat during a movie?
We don’t give kids enough credit. We want them to be happy, but we don’t give them the chance to digest complex situations. In this movie, we ask: “Kids, what do you do when you feel shy or vulnerable or even incredibly powerful.” I don’t think through movies we need to tell kids the world is scary. If there is a story that has resolution, it’s OK to have a few edge-of-their-seat moments.
Did you really tell your kids the plot of “Frozen 2?”
I told my kids everything. There I was with my script trying to be the cool mom. I was like, “Do you want to know what happens?” They were so excited and then it dawned on me that I was in breach of my contract. … I did tell the girls it was very important that they didn’t share this at school.
What is the most romantic thing Dax Shepard has done for you?
Dax knew that I loved sloths. I used to Google cute baby sloths at night to relax. He was directing a movie and had an animal wrangler on it.  Dax came home on my birthday and locked up the dogs, which was weird. … He set up a sloth habitat in the living room, so I could interact with a sloth for a few hours. I was crying and crying. It was such a beautiful gift. I was so overwhelmed that the man I loved found a sloth for me.


This is not meant to be a plug and play script for the novice javascripter. There is little documentation and modifying it to work with your particular project may require a moderate to advanced understanding of javascript, html and css.
Please use your real name in the Google Groups Mocha UI group. If you wish to ask questions with an alias then feel free to do so in the Mootools Forums.


{% extends 'base.html' %} {% block body %}
Have you ever wondered where you've heard that VA before?
Get a list of all voice acting roles of a VA in anime from your list.


Destination measures statistics team
Email<EMAIL_ADDRESS>Telephone: Stephen Harris 0161 600 1595
Official Statistics
Statistical working paper presenting improvements to the coverage of student destinations following inclusion of new data.
PDF , 715KB , 26 pages
MS Excel Spreadsheet , 42.2KB
ZIP , 3.9KB
MS Excel Spreadsheet , 30.5KB
This statistical working paper is the first in a series providing information on the use of new data to improve the coverage and accuracy of destinations measures using the Longitudinal Education Outcomes ( LEO ) dataset.
It presents updated estimates for the 2013 to 2014 academic year using this new linked data.
The updated destinations data for key stage 5 includes:
Destinations are also shown by:
The key stage 5 measure is based on activity in the year after the young person took their A Level or other level 3 qualifications.
The LEO dataset has also been used to improve statistics on employment and earnings of graduates .
Email<EMAIL_ADDRESS>Telephone: Stephen Harris 0161 600 1595
Published: 4 August 2016


--- fabricator: true title: Headers ---
Headers vary from product to product and should follow the guidelines set out in this styleguide and the One Wiley Brand Guidelines.
To see an example footer in a full-width page context, please click here.


py2store.utils.glom¶
glom is a util to extract stuff from nested structures. It’s one of those excellent utils that I’ve written many times, but never got quite right. Mahmoud Hashemi got it right.
- BEGIN LICENSE
Copyright (c) 2018, Mahmoud Hashemi
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.

- END LICENSE
Now, at the time of writing this, I’ve already transformed it to bend it to my liking. At some point it may become something else, but I wanted there to be a trace of what my seed was. Though I can’t promise I’ll maintain the same functionality as I transform this module, here’s a tutorial on how to use it in it’s original form:
I only took the main (core) module from the glom project. Here’s the original docs of this glom module.
If there was ever a Python example of “big things come in small
packages”, glom
might be it.
The glom
package has one central entrypoint,
glom.glom()
. Everything else in the package revolves around that
one function.
A couple of conventional terms you’ll see repeated many times below:
target - glom is built to work on any data, so we simply refer to the object being accessed as the “target”
spec - (aka “glomspec”, short for specification) The accompanying template used to specify the structure of the return value.
Now that you know the terms, let’s take a look around glom’s powerful semantics.
-
class
py2store.utils.glom.
Auto
(spec=None)[source]¶ Switch to Auto mode (the default)
TODO: this seems like it should be a sub-class of class Spec() – if Spec() could help define the interface for new “modes” or dialects that would also help make match mode feel less duct-taped on
-
class
py2store.utils.glom.
Call
(func=None, args=None, kwargs=None)[source]¶ Call
specifies when a target should be passed to a function, func.Call
is similar topartial()
in that it is no more powerful thanlambda
or other functions, but it is designed to be more readable, with a betterrepr
.- Parameters
func (callable) – a function or other callable to be called with the target
Call
combines well withT
to construct objects. For instance, to generate a dict and then pass it to a constructor:>>> class ExampleClass(object): ... def __init__(self, attr): ... self.attr = attr ... >>> target = {'attr': 3.14} >>> glom(target, Call(ExampleClass, kwargs=T)).attr 3.14
This does the same as
glom(target, lambda target: ExampleClass(**target))
, but it’s easy to see which one reads better.Note
Call
is mostly for functions. Use aT
object if you need to call a method.
-
class
py2store.utils.glom.
Check
(spec=T, **kwargs)[source]¶ Check objects are used to make assertions about the target data, and either pass through the data or raise exceptions if there is a problem.
If any check condition fails, a
CheckError
is raised.- Parameters
spec – a sub-spec to extract the data to which other assertions will be checked (defaults to applying checks to the target itself)
type – a type or sequence of types to be checked for exact match
equal_to – a value to be checked for equality match (“==”)
validate – a callable or list of callables, each representing a check condition. If one or more return False or raise an exception, the Check will fail.
instance_of – a type or sequence of types to be checked with isinstance()
one_of – an iterable of values, any of which can match the target (“in”)
default – an optional default value to replace the value when the check fails (if default is not specified, GlomCheckError will be raised)
Aside from spec, all arguments are keyword arguments. Each argument, except for default, represent a check condition. Multiple checks can be passed, and if all check conditions are left unset, Check defaults to performing a basic truthy check on the value.
-
exception
py2store.utils.glom.
CheckError
(msgs, check, path)[source]¶ This
GlomError
subtype is raised when target data fails to pass aCheck
’s specified validation.An uncaught
CheckError
looks like this:>>> target = {'a': {'b': 'c'}} >>> glom(target, {'b': ('a.b', Check(type=int))}) Traceback (most recent call last): ... glom.CheckError: target at path ['a.b'] failed check, got error: "expected type to be 'int', found type 'str'"
If the
Check
contains more than one condition, there may be more than one error message. The string rendition of theCheckError
will include all messages.You can also catch the
CheckError
and programmatically access messages through themsgs
attribute on theCheckError
instance.Note
As of 2018-07-05 (glom v18.2.0), the validation subsystem is still very new. Exact error message formatting may be enhanced in future releases.
-
class
py2store.utils.glom.
Coalesce
(*subspecs, **kwargs)[source]¶ Coalesce objects specify fallback behavior for a list of subspecs.
Subspecs are passed as positional arguments, and keyword arguments control defaults. Each subspec is evaluated in turn, and if none match, a
CoalesceError
is raised, or a default is returned, depending on the options used.Note
This operation may seem very familar if you have experience with SQL or even C# and others.
In practice, this fallback behavior’s simplicity is only surpassed by its utility:
>>> target = {'c': 'd'} >>> glom(target, Coalesce('a', 'b', 'c')) 'd'
glom tries to get
'a'
fromtarget
, but gets a KeyError. Rather than raise aPathAccessError
as usual, glom coalesces into the next subspec,'b'
. The process repeats until it gets to'c'
, which returns our value,'d'
. If our value weren’t present, we’d see:>>> target = {} >>> glom(target, Coalesce('a', 'b')) Traceback (most recent call last): ... glom.CoalesceError: no valid values found. Tried ('a', 'b') and got (PathAccessError, PathAccessError) (at path [])
Same process, but because
target
is empty, we get aCoalesceError
. If we want to avoid an exception, and we know which value we want by default, we can set default:>>> target = {} >>> glom(target, Coalesce('a', 'b', 'c'), default='d-fault') 'd-fault'
'a'
,'b'
, and'c'
weren’t present so we got'd-fault'
.- Parameters
subspecs – One or more glommable subspecs
default – A value to return if no subspec results in a valid value
default_factory – A callable whose result will be returned as a default
skip – A value, tuple of values, or predicate function representing values to ignore
skip_exc – An exception or tuple of exception types to catch and move on to the next subspec. Defaults to
GlomError
, the parent type of all glom runtime exceptions.
If all subspecs produce skipped values or exceptions, a
CoalesceError
will be raised. For more examples, check out the tutorial, which makes extensive use of Coalesce.
-
exception
py2store.utils.glom.
CoalesceError
(coal_obj, skipped, path)[source]¶ This
GlomError
subtype is raised from within aCoalesce
spec’s processing, when none of the subspecs match and no default is provided.The exception object itself keeps track of several values which may be useful for processing:
- Parameters
>>> target = {} >>> glom(target, Coalesce('a', 'b')) Traceback (most recent call last): ... glom.CoalesceError: no valid values found. Tried ('a', 'b') and got (PathAccessError, PathAccessError) ...
-
class
py2store.utils.glom.
Fill
(spec=None)[source]¶ A specifier type which switches to glom into “fill-mode”. For the spec contained within the Fill, glom will only interpret explicit specifier types (including T objects). Whereas the default mode has special interpretations for each of these builtins, fill-mode takes a lighter touch, making Fill great for “filling out” Python literals, like tuples, dicts, sets, and lists.
>>> target = {'data': [0, 2, 4]} >>> spec = Fill((T['data'][2], T['data'][0])) >>> glom(target, spec) (4, 0)
As you can see, glom’s usual built-in tuple item chaining behavior has switched into a simple tuple constructor.
(Sidenote for Lisp fans: Fill is like glom’s quasi-quoting.)
-
exception
py2store.utils.glom.
GlomError
[source]¶ The base exception for all the errors that might be raised from
glom()
processing logic.By default, exceptions raised from within functions passed to glom (e.g.,
len
,sum
, anylambda
) will not be wrapped in a GlomError.
-
class
py2store.utils.glom.
Glommer
(**kwargs)[source]¶ All the wholesome goodness that it takes to make glom work. This type mostly serves to encapsulate the type registration context so that advanced uses of glom don’t need to worry about stepping on each other’s toes.
Glommer objects are lightweight and, once instantiated, provide the
glom()
method we know and love:>>> glommer = Glommer() >>> glommer.glom({}, 'a.b.c', default='d') 'd' >>> Glommer().glom({'vals': list(range(3))}, ('vals', len)) 3
Instances also provide
register()
method for localized control over type handling.- Parameters
register_default_types (bool) – Whether or not to enable the handling behaviors of the default
glom()
. These default actions include dict access, list and iterable iteration, and generic object attribute access. Defaults to True.
-
register
(target_type, **kwargs)[source]¶ Register target_type so
glom()
will know how to handle instances of that type as targets.- Parameters
target_type (type) – A type expected to appear in a glom() call target
get (callable) – A function which takes a target object and a name, acting as a default accessor. Defaults to
getattr()
.iterate (callable) – A function which takes a target object and returns an iterator. Defaults to
iter()
if target_type appears to be iterable.exact (bool) – Whether or not to match instances of subtypes of target_type.
Note
The module-level
register()
function affects the module-levelglom()
function’s behavior. If this global effect is undesirable for your application, or you’re implementing a library, consider instantiating aGlommer
instance, and using theregister()
andGlommer.glom()
methods instead.
-
class
py2store.utils.glom.
Inspect
(*a, **kw)[source]¶ The
Inspect
specifier type provides a way to get visibility into glom’s evaluation of a specification, enabling debugging of those tricky problems that may arise with unexpected data.Inspect
can be inserted into an existing spec in one of two ways. First, as a wrapper around the spec in question, or second, as an argument-less placeholder wherever a spec could be.Inspect
supports several modes, controlled by keyword arguments. Its default, no-argument mode, simply echos the state of the glom at the point where it appears:>>> target = {'a': {'b': {}}} >>> val = glom(target, Inspect('a.b')) # wrapping a spec --- path: ['a.b'] target: {'a': {'b': {}}} output: {} ---
Debugging behavior aside,
Inspect
has no effect on values in the target, spec, or result.- Parameters
echo (bool) – Whether to print the path, target, and output of each inspected glom. Defaults to True.
recursive (bool) – Whether or not the Inspect should be applied at every level, at or below the spec that it wraps. Defaults to False.
breakpoint (bool) – This flag controls whether a debugging prompt should appear before evaluating each inspected spec. Can also take a callable. Defaults to False.
post_mortem (bool) – This flag controls whether exceptions should be caught and interactively debugged with
pdb
on inspected specs.
All arguments above are keyword-only to avoid overlap with a wrapped spec.
Note
Just like
pdb.set_trace()
, be careful about leaving strayInspect()
instances in production glom specs.
-
class
py2store.utils.glom.
Invoke
(func)[source]¶ Specifier type designed for easy invocation of callables from glom.
- Parameters
func (callable) – A function or other callable object.
Invoke
is similar tofunctools.partial()
, but with the ability to set up a “templated” call which interleaves constants and glom specs.For example, the following creates a spec which can be used to check if targets are integers:
>>> is_int = Invoke(isinstance).specs(T).constants(int) >>> glom(5, is_int) True
And this composes like any other glom spec:
>>> target = [7, object(), 9] >>> glom(target, [is_int]) [True, False, True]
Another example, mixing positional and keyword arguments:
>>> spec = Invoke(sorted).specs(T).constants(key=int, reverse=True) >>> target = ['10', '5', '20', '1'] >>> glom(target, spec) ['20', '10', '5', '1']
Invoke also helps with evaluating zero-argument functions:
>>> glom(target={}, spec=Invoke(int)) 0
(A trivial example, but from timestamps to UUIDs, zero-arg calls do come up!)
Note
Invoke
is mostly for functions, object construction, and callable objects. For calling methods, consider theT
object.-
constants
(*a, **kw)[source]¶ Returns a new
Invoke
spec, with the provided positional and keyword argument values stored for passing to the underlying function.>>> spec = Invoke(T).constants(5) >>> glom(range, (spec, list)) [0, 1, 2, 3, 4]
Subsequent positional arguments are appended:
>>> spec = Invoke(T).constants(2).constants(10, 2) >>> glom(range, (spec, list)) [2, 4, 6, 8]
Keyword arguments also work as one might expect:
>>> round_2 = Invoke(round).constants(ndigits=2).specs(T) >>> glom(3.14159, round_2) 3.14
constants()
and otherInvoke
methods may be called multiple times, just remember that every call returns a new spec.
-
classmethod
specfunc
(spec)[source]¶ Creates an
Invoke
instance where the function is indicated by a spec.>>> spec = Invoke.specfunc('func').constants(5) >>> glom({'func': range}, (spec, list)) [0, 1, 2, 3, 4]
-
specs
(*a, **kw)[source]¶ Returns a new
Invoke
spec, with the provided positional and keyword arguments stored to be interpreted as specs, with the results passed to the underlying function.>>> spec = Invoke(range).specs('value') >>> glom({'value': 5}, (spec, list)) [0, 1, 2, 3, 4]
Subsequent positional arguments are appended:
>>> spec = Invoke(range).specs('start').specs('end', 'step') >>> target = {'start': 2, 'end': 10, 'step': 2} >>> glom(target, (spec, list)) [2, 4, 6, 8]
Keyword arguments also work as one might expect:
>>> multiply = lambda x, y: x * y >>> times_3 = Invoke(multiply).constants(y=3).specs(x='value') >>> glom({'value': 5}, times_3) 15
specs()
and otherInvoke
methods may be called multiple times, just remember that every call returns a new spec.
-
star
(args=None, kwargs=None)[source]¶ Returns a new
Invoke
spec, with args and/or kwargs specs set to be “starred” or “star-starred” (respectively)>>> import os.path >>> spec = Invoke(os.path.join).star(args='path') >>> target = {'path': ['path', 'to', 'dir']} >>> glom(target, spec) 'path/to/dir'
- Parameters
args (spec) – A spec to be evaluated and “starred” into the underlying function.
kwargs (spec) – A spec to be evaluated and “star-starred” into the underlying function.
One or both of the above arguments should be set.
The
star()
, like otherInvoke
methods, may be called multiple times. The args and kwargs will be stacked in the order in which they are provided.
-
class
py2store.utils.glom.
Let
(**kw)[source]¶ This specifier type assigns variables to the scope.
>>> target = {'data': {'val': 9}} >>> spec = (Let(value=T['data']['val']), {'val': S['value']}) >>> glom(target, spec) {'val': 9}
-
class
py2store.utils.glom.
Literal
(value)[source]¶ Literal objects specify literal values in rare cases when part of the spec should not be interpreted as a glommable subspec. Wherever a Literal object is encountered in a spec, it is replaced with its wrapped value in the output.
>>> target = {'a': {'b': 'c'}} >>> spec = {'a': 'a.b', 'readability': Literal('counts')} >>> pprint(glom(target, spec)) {'a': 'c', 'readability': 'counts'}
Instead of accessing
'counts'
as a key like it did with'a.b'
,glom()
just unwrapped the literal and included the value.Literal
takes one argument, the literal value that should appear in the glom output.This could also be achieved with a callable, e.g.,
lambda x: 'literal_string'
in the spec, but using aLiteral
object adds explicitness, code clarity, and a cleanrepr()
.
-
class
py2store.utils.glom.
Path
(*path_parts)[source]¶ Path objects specify explicit paths when the default
'a.b.c'
-style general access syntax won’t work or isn’t desirable. Use this to wrap ints, datetimes, and other valid keys, as well as strings with dots that shouldn’t be expanded.>>> target = {'a': {'b': 'c', 'd.e': 'f', 2: 3}} >>> glom(target, Path('a', 2)) 3 >>> glom(target, Path('a', 'd.e')) 'f'
Paths can be used to join together other Path objects, as well as
T
objects:>>> Path(T['a'], T['b']) T['a']['b'] >>> Path(Path('a', 'b'), Path('c', 'd')) Path('a', 'b', 'c', 'd')
Paths also support indexing and slicing, with each access returning a new Path object:
>>> path = Path('a', 'b', 1, 2) >>> path[0] Path('a') >>> path[-2:] Path(1, 2)
-
classmethod
from_text
(text)[source]¶ Make a Path from .-delimited text:
>>> Path.from_text('a.b.c') Path('a', 'b', 'c')
-
classmethod
-
exception
py2store.utils.glom.
PathAccessError
(exc, path, part_idx)[source]¶ This
GlomError
subtype represents a failure to access an attribute as dictated by the spec. The most commonly-seen error when using glom, it maintains a copy of the original exception and produces a readable error message for easy debugging.If you see this error, you may want to:
Check the target data is accurate using
Inspect
Catch the exception and return a semantically meaningful error message
Use
glom.Coalesce
to specify a defaultUse the top-level
default
kwarg onglom()
In any case, be glad you got this error and not the one it was wrapping!
- Parameters
exc (Exception) – The error that arose when we tried to access path. Typically an instance of KeyError, AttributeError, IndexError, or TypeError, and sometimes others.
path (Path) – The full Path glom was in the middle of accessing when the error occurred.
part_idx (int) – The index of the part of the path that caused the error.
>>> target = {'a': {'b': None}} >>> glom(target, 'a.b.c') Traceback (most recent call last): ... glom.PathAccessError: could not access 'c', part 2 of Path('a', 'b', 'c'), got error: ...
-
class
py2store.utils.glom.
Spec
(spec, scope=None)[source]¶ Spec objects serve three purposes, here they are, roughly ordered by utility:
As a form of compiled or “curried” glom call, similar to Python’s built-in
re.compile()
.A marker as an object as representing a spec rather than a literal value in certain cases where that might be ambiguous.
A way to update the scope within another Spec.
In the second usage, Spec objects are the complement to
Literal
, wrapping a value and marking that it should be interpreted as a glom spec, rather than a literal value. This is useful in places where it would be interpreted as a value by default. (Such as T[key], Call(func) where key and func are assumed to be literal values and not specs.)- Parameters
spec – The glom spec.
scope (dict) – additional values to add to the scope when evaluating this Spec
-
class
py2store.utils.glom.
TType
[source]¶ T
, short for “target”. A singleton object that enables object-oriented expression of a glom specification.Note
T
is a singleton, and does not need to be constructed.Basically, think of
T
as your data’s stunt double. Everything that you do toT
will be recorded and executed during theglom()
call. Take this example:>>> spec = T['a']['b']['c'] >>> target = {'a': {'b': {'c': 'd'}}} >>> glom(target, spec) 'd'
So far, we’ve relied on the
'a.b.c'
-style shorthand for access, or used thePath
objects, but if you want to explicitly do attribute and key lookups, look no further thanT
.But T doesn’t stop with unambiguous access. You can also call methods and perform almost any action you would with a normal object:
>>> spec = ('a', (T['b'].items(), list)) # reviewed below >>> glom(target, spec) [('c', 'd')]
A
T
object can go anywhere in the spec. As seen in the example above, we access'a'
, use aT
to get'b'
and iterate over itsitems
, turning them into alist
.You can even use
T
withCall
to construct objects:>>> class ExampleClass(object): ... def __init__(self, attr): ... self.attr = attr ... >>> target = {'attr': 3.14} >>> glom(target, Call(ExampleClass, kwargs=T)).attr 3.14
On a further note, while
lambda
works great in glom specs, and can be very handy at times,T
andCall
eliminate the need for the vast majority oflambda
usage with glom.Unlike
lambda
and other functions,T
roundtrips beautifully and transparently:>>> T['a'].b['c']('success') T['a'].b['c']('success')
T
-related access errors raise aPathAccessError
during theglom()
call.Note
While
T
is clearly useful, powerful, and here to stay, its semantics are still being refined. Currently, operations beyond method calls and attribute/item access are considered experimental and should not be relied upon.
-
class
py2store.utils.glom.
TargetRegistry
(register_default_types=True)[source]¶ responsible for registration of target types for iteration and attribute walking
-
get_handler
(op, obj, path=None, raise_exc=True)[source]¶ for an operation and object instance, obj, return the closest-matching handler function, raising UnregisteredTarget if no handler can be found for obj (or False if raise_exc=False)
-
register_op
(op_name, auto_func=None, exact=False)[source]¶ add operations beyond the builtins (‘get’ and ‘iterate’ at the time of writing).
auto_func is a function that when passed a type, returns a handler associated with op_name if it’s supported, or False if it’s not.
See glom.core.register_op() for the global version used by extensions.
-
-
exception
py2store.utils.glom.
UnregisteredTarget
(op, target_type, type_map, path)[source]¶ This
GlomError
subtype is raised when a spec calls for an unsupported action on a target type. For instance, trying to iterate on an non-iterable target:>>> glom(object(), ['a.b.c']) Traceback (most recent call last): ... glom.UnregisteredTarget: target type 'object' not registered for 'iterate', expected one of registered types: (...)
It should be noted that this is a pretty uncommon occurrence in production glom usage. See the setup-and-registration section for details on how to avoid this error.
An UnregisteredTarget takes and tracks a few values:
- Parameters
op (str) – The name of the operation being performed (‘get’ or ‘iterate’)
target_type (type) – The type of the target being processed.
type_map (dict) – A mapping of target types that do support this operation
path – The path at which the error occurred.
-
py2store.utils.glom.
glom
(target, spec, **kwargs)[source]¶ Access or construct a value from a given target based on the specification declared by spec.
Accessing nested data, aka deep-get:
>>> target = {'a': {'b': 'c'}} >>> glom(target, 'a.b') 'c'
Here the spec was just a string denoting a path,
'a.b.
. As simple as it should be. The next example shows how to use nested data to access many fields at once, and make a new nested structure.Constructing, or restructuring more-complicated nested data:
>>> target = {'a': {'b': 'c', 'd': 'e'}, 'f': 'g', 'h': [0, 1, 2]} >>> spec = {'a': 'a.b', 'd': 'a.d', 'h': ('h', [lambda x: x * 2])} >>> output = glom(target, spec) >>> pprint(output) {'a': 'c', 'd': 'e', 'h': [0, 2, 4]}
glom
also takes a keyword-argument, default. When set, if aglom
operation fails with aGlomError
, the default will be returned, very much likedict.get()
:>>> glom(target, 'a.xx', default='nada') 'nada'
The skip_exc keyword argument controls which errors should be ignored.
>>> glom({}, lambda x: 100.0 / len(x), default=0.0, skip_exc=ZeroDivisionError) 0.0
- Parameters
target (object) – the object on which the glom will operate.
spec (object) – Specification of the output object in the form of a dict, list, tuple, string, other glom construct, or any composition of these.
default (object) – An optional default to return in the case an exception, specified by skip_exc, is raised.
skip_exc (Exception) – An optional exception or tuple of exceptions to ignore and return default (None if omitted). If skip_exc and default are both not set, glom raises errors through.
scope (dict) – Additional data that can be accessed via S inside the glom-spec.
It’s a small API with big functionality, and glom’s power is only surpassed by its intuitiveness. Give it a whirl!
-
py2store.utils.glom.
is_iterable
(x)[source]¶ Similar in nature to
callable()
,is_iterable
returnsTrue
if an object is `iterable`_,False
if not. >>> is_iterable([]) True >>> is_iterable(1) False
-
py2store.utils.glom.
make_sentinel
(name='_MISSING', var_name=None)[source]¶ Creates and returns a new instance of a new class, suitable for usage as a “sentinel”, a kind of singleton often used to indicate a value is missing when
None
is a valid input.- Parameters
name (str) – Name of the Sentinel
var_name (str) – Set this name to the name of the variable in its respective module enable pickleability.
>>> make_sentinel(var_name='_MISSING') _MISSING
The most common use cases here in boltons are as default values for optional function arguments, partly because of its less-confusing appearance in automatically generated documentation. Sentinels also function well as placeholders in queues and linked lists.
Note
By design, additional calls to
make_sentinel
with the same values will not produce equivalent objects.>>> make_sentinel('TEST') == make_sentinel('TEST') False >>> type(make_sentinel('TEST')) == type(make_sentinel('TEST')) False
-
py2store.utils.glom.
register
(target_type, **kwargs)[source]¶ Register target_type so
glom()
will know how to handle instances of that type as targets.- Parameters
target_type (type) – A type expected to appear in a glom() call target
get (callable) – A function which takes a target object and a name, acting as a default accessor. Defaults to
getattr()
.iterate (callable) – A function which takes a target object and returns an iterator. Defaults to
iter()
if target_type appears to be iterable.exact (bool) – Whether or not to match instances of subtypes of target_type.
Note
The module-level
register()
function affects the module-levelglom()
function’s behavior. If this global effect is undesirable for your application, or you’re implementing a library, consider instantiating aGlommer
instance, and using theregister()
andGlommer.glom()
methods instead.


XIU XIU, THE SENT-DOWN GIRL Directed by Joan Chen With Lu Lu, Lopsang Grand Illusion not rated
In 1975, during that Chinese orgy of ideological puritanism known as the Cultural Revolution, young people from the cities were sent to the sticks to purge themselves of the stench of urban sophistication and learn good peasant values. The teenage Joan Chen escaped ruralization by being accepted at the state acting school, and went on to a distinguished international career ("The Last Emperor", "Twin Peaks", etc.) In her directorial debut, Chen revisists those days with the powerful there-but-for-the-grace-of-God tale of Xiu Xiu (Lu Lu), a teenager from Chengdu who is farmed out for a six-month apprenticeship to a horse herder, on some vague and woolly-headed plan that has something to do with the starting of a women's cavalry. Her assigned mentor, a rugged older man named Lao Jin (Lopsang), lives alone in a hide tent in the middle of a vast empty range near the Tibetan border. Though they share close quarters, Lao Jin is no sexual threat. He was castrated while the captive of enemy tribesmen. In any case, his temperament is gentle and protective. He does all the work, while Xiu Xiu sulks and puts on airs. She doesn't seem to learn a thing, but when her time should be up she becomes concerned when nobody comes to fetch her home. Eventually a peddlar shows up who tells her that the youth program's over, and everyone's scrambling for a permit to go home. For a roll in the hay, he might be able to pull a few strings.... The performances by the two principals are compelling. Lu Lu builds a character whose attitude is not always appealing, but whose helpless, battered naiveté touches your heart. Xiu Xiu's loss of innocence, which accelerates through a series of callers with cynical promises of help as word spreads of an easy lay in the wilderness, is made the more poignant by her continued cluelessness. Lao Jin's impotence extends to his inability to interfere; he can only withdraw in disapproving sadness as the stream of visitors passes through, and be ready to tenderly pick up the pieces. Lopsang makes him a figure of crippled dignity and wounded depth. There is a rugged, almost nightmarish beauty to Chen's vision of this forgotten outpost, where the eye sweeps from horizon to horizon unrelieved by anything but the encroaching menace of storm clouds. Chen shot most of her footage on location without a permit from the Chinese authorities, who would not have granted one and will not allow the film to be shown in China. Though it suffers at times from the monotony of its situation and the adolescent petulance of its heroine, "Xiu Xiu" is a trenchant indictment of a system in which ideology goes to bed with bureaucracy and the progeny are abandoned to indifference.
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


Search
Home
My channel
Trending
Subscriptions
Get YouTube Red
Get YouTube Tv
History
Watch Later
Favorites
View the left menu when you change the screen size and how it menu button interacts with it.
Uses half the css as youtube.


That bouffant! That hauteur! It can only be psychopath maestro Lothar Preen!
A rare and wonderful CD cover unearthed at the Pavilion Of Innocent Pastimes.


{% extends "layout.html" %} {% from "_formhelpers.html" import render_multiselect %} {% block body %}
You may delete diffs from this set.
{% else %}This set is currently associated with the following comparisons:
If this set is invalid, consider deleting it:
{% endblock %}


Pharma-See is an web-based project that acts as an online pharmacy. It's purpose is to serve as an easy way for anybody to obtain information regarding a particular drug. As a result both consumers and doctors can achieve an insight on any particuar drug which can be of tremendous value. It incorporates a searching and shopping service.
The searching feature allows anyone to look at a vast record collection of drugs on the market and look into the details of each and every drug including cost, side-effects, symptoms, dosages, diseases, other related drugs, and manufacturer.
The shopping freature allows anybody with proper authority or licence to purchase drugs from an online store for retail/personal use and even locate nearby shops that sell a required drug. This saves a lot of time if the drug is obscure.
Rishikesh and Tushar are BTech Computer Science Students from Vellore Institute Of Technology (Chennai Branch) who together developed Pharma-See over their second semester in college. They did it as part of their Database Management Systems Project under the guidance of their faculty.
| Rishikesh : |<EMAIL_ADDRESS>|
|---|---|
| Tushar : |<EMAIL_ADDRESS>|


get_bounds_behavior.Rd
Get hydraulic head and flow on boundaries
get_bounds_behavior(wells, aquifer, length.out = 100)
| wells | wells object with each row containing rate Q [m^3/s], diam [m], radius of influence R [m], & coordinates x [m], y [m] |
|---|---|
| aquifer | Afuifer object containing aquifer_type, h0, Ksat, bounds, z0 (for confined case only) |
| length.out | The number of points to evaluate on each boundary |
Returns a data.frame
, with length.out
rows for each bID.
Each row represents a point along bID and contains the head and flow as:
dx = -Ksat * dh/dx, and
dy = -Ksat * dh/dy
# Example 1 wells <- define_wells(x=c(50,5),y=c(25,2.5),Q=c(0.5,-0.2),diam=c(0.05,0.08),R=100) bounds_df <- data.frame(bound_type=c("CH","NF","NF","NF"), m=c(0.8,-1.25,0.8,-1.25),b=c(3,100,-25,1), bID=as.numeric(1:4)) aquifer <- define_aquifer("unconfined",1e-4,h0=100,bounds=bounds_df) well_images <- generate_image_wells(wells,aquifer) library(ggplot2) ggplot() + geom_point(data=well_images,aes(x,y,fill=Q),color="black",size=2,shape=21) + scale_fill_gradient2(low="blue",high="red",mid="gray")+ geom_segment(data=aquifer$bounds,aes(x1,y1,xend=x2,yend=y2, linetype=bound_type,color=as.factor(bID))) + coord_equal()bound_behavior_im <- get_bounds_behavior(well_images,aquifer) bound_behavior_im$im <- "images" bound_behavior_no_im <- get_bounds_behavior(wells,aquifer) bound_behavior_no_im$im <- "no_images" # Example 2 bounds_df <- data.frame(bound_type=c("CH","NF","NF","NF"),m=c(Inf,0,Inf,0),b=c(0,1000,1000,0)) aquifer_unconfined <- define_aquifer("unconfined",1e-3,bounds=bounds_df,h0=100) library(dplyr)#> Warning: package ‘dplyr’ was built under R version 3.6.2#> #>#>#> #>#>#> #>set.seed(30) wells_df <- data.frame(x=runif(8,0,1000),y=runif(8,0,1000),diam=1,R=1000) %>% mutate(country=factor(y>500,levels=c(FALSE,TRUE),labels=c("A","B"))) %>% group_by(country) %>% mutate(weights=1,Q=-1/n()) %>% group_by() wells_actual <- define_wells(wells_df) wells <- wells_actual %>% generate_image_wells(aquifer_unconfined) bound_behavior_no_im <- get_bounds_behavior(wells_actual,aquifer_unconfined) %>% dplyr::mutate(im="unbounded") bound_behavior_im <- get_bounds_behavior(wells,aquifer_unconfined) %>% dplyr::mutate(im="bounded") bounds_behavior_summary <- bound_behavior_no_im %>% bind_rows(bound_behavior_im) %>% group_by(bID,bound_type,im) %>% summarize(`Head`=mean(head), `Flow`=mean(abs(flow_normal)))#>


Danish-Swedish Farmdog
| Danish-Swedish Farmdog Picture | |
| Breed Information | |
|---|---|
| Popularity | # |
| Name | Danish-Swedish Farmdog |
| Other names | Scanian Terrier, Dansk-svensk gårdshund |
| Origin | Sweden Denmark |
| Breed Group | WorkingTerrier (UKC) |
| Size | Small |
| Type | Purebred |
| Life span | 10-15 years |
| Temperament | AlertAttentiveIntelligentLively |
| Height | Male: 13–15 inches (32–39 cm)Female: 12–15 inches (30–37 cm) |
| Weight | 15-25 pounds (7-12 kg) |
| Colors | Black & WhiteBrown & WhiteWhite |
| Litter Size | 3-5 puppies |
| Puppy Price | Average $600 - $800 USD |
| Breed Characteristics | |
| Adaptability | 5 stars |
| Apartment Friendly | 5 starsThe Danish Swedish Farm Dog will do OK in an apartment as long as it is sufficiently exercised. It will do best if they have a fenced-in yard, but no matter the size yard you have, you will still need to take him on walks and provide other daily activities. |
| Barking Tendencies | 4 starsFrequent |
| Cat Friendly | 3 stars |
| Child Friendly | 4 starsGood with Kids: This is a suitable breed for kids and is known to be playful, energetic, and affectionate around them. |
| Dog Friendly | 4 stars |
| Exercise Needs | 3 starsThe Danish-Swedish Farmdog requires a lot of exercise. At least one hour a day of some type of one-on-one activity along with a daily walk or jog where the dog is made to heel beside or behind the human holding the lead. |
| Grooming | 2 starsThe Danish-Swedish Farm Dog is rather easy to groom. The coat is short and does not require daily brushings. Bathe when necessary. This breed sheds a little all year round with a seasonal heavy shedding. Brushing with a rubber brush to remove loose hair can reduce some of the shedding. |
| Health Issues | 2 starsHypoallergenic: No |
| Intelligence | 3 starsRanking: (#). (See All Rankings) |
| Playfulness | 4 stars |
| Shedding Level | 3 starsModerate Shedding: Routine brushing will help. Be prepared to vacuum often! |
| Stranger Friendly | 3 stars |
| Trainability | 3 starsModerately Easy Training: Training won't require too much attention and effort, though it won't be easier than other breeds. Expect results to come gradually. |
| Watchdog Ability | 3 stars |
| Danish-Swedish Farmdog Puppy Picture | ||
| Puppy Names | ||
|---|---|---|
| Rank | Male | Female |
| 01 | Buddy | Molly |
| 02 | Max | Bella |
| 03 | Toby | Coco |
| 04 | Lucky | Lady |
| 05 | Zeus | Abbie |
| 06 | Cody | Pepper |
| 07 | Henry | Zoey |
| 08 | Oscar | Maddie |
| 09 | Sammy | Sasha |
| 10 | Bailey | Penny |
| See All Names › |
| Overview |
|---|
|
The FCI standard says that a DSF should be 30–39 cm of height with a compact body. The relation between withers height and body length should be 9 to 10. The head is rather small and triangular with a well emphasized stop. The coat is hard, short and smooth in texture, with white as a dominating color, with one or several patches of different color combination. The tail could be long, half bobtail or bobtail. The Danish–Swedish Farmdog is a very friendly, easygoing breed. Not only does it work on farms as a rat extinguisher and alerting to intruders, but it is also a companion to adults, and is known to befriend and play with the children of the household. The Danish–Swedish Farmdog is unlike a terrier - even though it is often mistaken as one - it is very mild and gentle in temper. Unlike the high-strung nature of the terrier, the nature of the DSF allows it to do its job, as well as be calm and loving during times without work. This makes it an ideal house companion. The DSF is a not a high energy dog, but loves having a job. The breed is new to the USA, and can only now start to be seen in sports such as flyball and dog agility. The DSF is also known for its excellent mousing skills and can perform sports such as going to ground and earthdog. They are also very speedy and quick, and love all types of lure coursing. |
| History |
| Though this breed was not recognized under its current name until 1987, the breed has been known for centuries on farms in Denmark and Sweden. It has been used as a watchdog, ratter and companion. The Farmdog is more closely related to the Pinschers than it is to the Terriers. The breed’s FCI classification is Pinscher and Schnauzer, Molossoid breeds-Swiss Mountain and Cattle Dogs. The Danish-Swedish Farmdog was recognized by the United Kennel Club in 2008. |


@(shortUrl: ShortUrlView, clickCount: Long) @import java.text.DateFormat @main("Stats - Shorty") {
is a short URL for
This URL was first shortened on @DateFormat.getDateInstance(DateFormat.LONG).format(shortUrl.created).
It has been visited @clickCount @if(clickCount == 1) { time } else { times }.


{%- seo -%} {%- feed_meta -%} {% include google-analytics.html %}
{{ page.subtitle }}
By @reangdeba. Visit the homepage.


{% extends 'base.html' %} {% load static sekizai_tags %} {% load rules %} {% block title %}Groups{% endblock %} {% block content %}
As the EA Hub has suspended feature development and plans to retire, we recommend that you use the EA Forum's Groups feature instead.


I can't. As much as I care about you, my first duty is to the ship. Captain, why are we out here chasing comets? I've had twelve years to think about it. And if I had it to do over again, I would have grabbed the phaser and pointed it at you instead of them. I think you've let your personal feelings cloud your judgement. Fate. It protects fools, little children, and ships named "Enterprise." Shields up! Rrrrred alert! Not if I weaken first. The game's not big enough unless it scares you a little. Fear is the true enemy, the only enemy. Computer, lights up! We could cause a diplomatic crisis. Take the ship into the Neutral Zone I'll be sure to note that in my log. You're going to be an interesting companion, Mr. Data. You bet I'm agitated! I may be surrounded by insanity, but I am not insane.
This element is draggable.


--- title: "Careers" ---
Every Foobers is unique. They are known for pushing things forward, right from process to technology. Have the drive to be great? Join us.
There is no open positions right now. Keep in touch.


Proof of concept implementation of an incremental transfer system using HarfBuzz subsetting (hb-subset) combined with a well-known patch algorithm. State is entirely transient; refresh to reset. We do lots of woefully inefficient things; demonstrating speed is NOT the point.
Note that for CJK the display of Google Fonts subsets is wrong as it does not yet take into account our new method of segmentation based on character usage.


Scala for Machine Learning - Output
Directory for output from execution of test cases
The class DataSink is responsible to write content into this directory using the |> operator
Declaration:
class DataSink[T <% String](sinkName: String) {
def write(content: String): Boolean
override def |> : PartialFunction[List[XTSeries[T]], Int]
}
Usage
// Store a list of time series into a file output
val output = s"output/chap3/kalman_${alpha.toString}.csv"
DataSink[Double](output) |> input.foldLeft(List[XTSeries[Double]]())((sk, v) => v :: sk)
// Store a frequencies spectrum into a file OUTPUT2
private val OUTPUT2 = "output/chap3/smoothed.csv"
val frequencies = DFT[Double] |> XTSeries[Double](values)
DataSink[Double](OUTPUT2) write frequencies


article
element testarticle
article
with <h1>
article
with aria-label
aria-label
should be used as accessible name.
No accessible description.
article
with aria-labelledby
h1
referenced by aria-labelledby
aria-labelledby
should be used as accessible name.
No accessible description.
article
with title
attribute
title
should be used as accessible name.
No accessible description.
article
with aria-describedby
h1
referenced by aria-describedby
aria-describedby
should be used as accessible description.
No accessible name.
article
with aria-label
& title
attributes
aria-label
should be used as accessible name.
title
should be used as accessible description.


--- layout: post date: 2010-06-18 time: "10:00:00" authors: ["Greg Wilson"] title: For World Cup Fans (and Everyone Else) tags: ["Noticed"] ---
Mike Knell has posted a funny piece titled "If Sports Got Reported Like Science" [accessed via Internet Archive]. Perhaps I should have put quotes around "funny"...


Before Change
if pipeline["preproc"] is not None:
job.parallel_execute_for(name)
else:
for experiment, config, repetition in zip(
job.experiments,
job.config["configs"],
job.config["repetition"]
):
if pipeline["run"]:
self.log_info(
"Task {}, iteration {}: run pipeline {}"
.format(i, j, name), filename=self.logfile
)
experiment.run(name)
experiment.put_result(j, name)
experiment.post_run(name)
else:
experiment.next_batch(name)
experiment.put_result(j, name)
if j in pipeline["dump_for"]:
self.log_info("Task {}, iteration {}: dump results for {}..."
.format(i, j, name), filename=self.logfile)
for item, config, repetition in zip(
After Change
for item in job.experiments:
item.call_function(j, name)
if j in function["dump_for"]:
self.log_info("Task {}, iteration {}: dump results for function {}..."
.format(i, j, name), filename=self.logfile)
for item in job.experiments:
item._dump_function_result(name, "."+name)
except StopIteration:
self.log_info("Task {} was stopped after {} iterations".format(i, j+1), filename=self.logfile)


Hongyu Miao (苗宏宇)
Research
- Computer systems: operating systems, networking, compiler, architecture, and runtime systems for emerging applications.
- Recent focus: systems for data analytics and machine learning on modern hardware, e.g., manycore CPUs, 3D-stacked memory, and tiny microcontrollers.
- Past work: OS kernels, system virtualization, and RPC systems.
Publications
- Enabling Large Neural Networks on Tiny Microcontrollers with Swapping
Hongyu Miao and Felix Xiaozhu Lin
arXiv:2101.08744, 2021
[
Preprint
]
- StreamBox-HBM: Stream Analytics on High Bandwidth Hybrid Memory
Hongyu Miao, Myeongjae Jeon, Gennady Pekhimenko, Kathryn S. McKinley, and Felix Xiaozhu Lin
The 24th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2019)
[
Paper |
Slides |
Poster |
Website |
BibTex
]
- StreamBox: Modern Stream Processing on a Multicore Machine
Hongyu Miao, Heejin Park, Myeongjae Jeon, Gennady Pekhimenko, Kathryn S. McKinley, and Felix Xiaozhu Lin
2017 USENIX Annual Technical Conference (USENIX ATC 2017)
[
Paper |
Slides |
Poster |
Website |
BibTex
]
-
Tell Your Graphics Stack That the Display Is Circular
Hongyu Miao and Felix Xiaozhu Lin
The 17th International Workshop on Mobile Computing Systems and Applications (HotMobile 2016)
[
Paper |
Slides |
Poster |
BibTex
]


--- title: "Manifestos for 2022 March AGM" author: tcmal excerpt_separator: "" roles: - title: President people: - name: Ben McConville url: https://drive.google.com/file/d/1v-8qVjA54eogGSR0-Hk5ddOKhX2qXxkz/view?usp=sharing - name: Japjot Singh url: https://drive.google.com/file/d/1vkmOlf_ipCPkV0hbai1uT6vbg6496h6d/view?usp=sharing - name: Matyas Zsoldos url: https://drive.google.com/file/d/13reSwzL-ULALZcAMmxpfftzbSGUZuZ49/view?usp=sharing - title: Vice-President people: - name: Krzysztof Grykiel url: https://drive.google.com/file/d/1uY52sBFC9vGeltMCyPf4ajypngrFPgj9/view?usp=sharing - name: Souparna Mandal url: https://drive.google.com/file/d/1LXYHX3ye4PyNCDolv9J4zZC8Qd3EPa1z/view?usp=sharing - title: Secretary people: - name: Kshitij Sharma url: https://drive.google.com/file/d/1rjdBtMVyn3abnn1AjSQ4zVN5zobRnmo9/view?usp=sharing - title: Treasurer people: - name: Anant Kumar Gupta url: https://docs.google.com/document/d/1dZAtE_Z1NAKXahjNk5PNXkjwC_21h6XL/edit?usp=sharing&ouid=104228964260875901956&rtpof=true&sd=true - name: Sophie Bata-Madden url: https://drive.google.com/file/d/1L14ur0sqEEva7oo6c7Gkm7OpAAy4pk4N/view?usp=sharing - title: Graphic Designer people: - name: Margo Tsugorka url: https://drive.google.com/file/d/1ZYyV4ymquExw9jdotU_rhuOQkmsanRX8/view?usp=sharing - title: TechSec people: - name: Arjun Naha - name: greg (Jacob Walters) - title: SocialSec people: - name: Ashley Roberts - name: Amy Yin - title: 2nd Year Rep people: - name: Charlotte Ausel - title: 3rd Year Rep people: - name: Enes Aydogan url: https://drive.google.com/file/d/1BNAOw9XFbx8HkmNy9uHEOAQy6rl0ST9u/view?usp=sharing - title: Final Year Rep people: - name: Nobody has run for this position. You can still run on the night! - title: Postgraduate Rep people: - name: Nobody has run for this position. You could stand for election! - title: Old Person Rep people: - name: Dylan Thinnes url: https://drive.google.com/file/d/1N2LIqE1FQrAAKzqTVRQsJaXvHBi1JVid/view?usp=sharing ---
On we'll have this year's Annual General Meeting, as well as our Student Tech Meetup. Here are the session details, and the election manifestos.
Quicksort is a well-known sorting algorithm used to implement sort functionality in many libraries, but a text-book implementation of the algorithm is actually not that quick.
Some small additions can improve the implementation significantly. This presentation starts with a simple implementation and makes incremental improvements to eventually yield a proper generic and fast sorting function.
All code will be in C++ but it should be possible to follow the majority of the reasoning with knowledge of another programming language.
We're holding an election to elect a new committee.
Candidates will give 1-minute speeches (2 minutes for President, Secretary, and Treasurer), and the audience may ask questions.
We'll also vote on some constitutional amendments. See below for details.
If you want to vote in the EGM, you need to make sure you have CompSoc membership.
We also allow people to run on the night, if you did not have time to create manifestos.
| {{ role.title }} | |
| {{ person.name }} | {% if person.url %} view manifesto {% else %} no manifesto has been submitted {% endif %} |
We hope you think carefully about who you choose to elect tomorrow — please vote based on manifestos and speeches! Note that you may also vote for Ron (reopen nominations) for all positions. You also need EUSA CompSoc membership.
Election candidates - please remember that if you are running for President, VP, Secretary or Treasurer, your speech may be up to 2 minutes. Other roles have up to 1 minute. If you haven't gotten membership yet, do that now!
We also have the following constitutional amendments to vote on:
See you tomorrow,
CompSoc <3 You!


Sights & Sounds | Your Event Planner
Search for a City
Choose a Country
Great Britain
Andorra
Argentina
Australia
Austria
Azerbaijan
Bahamas
Barbados
Belgium
Bermuda
Brazil
Bulgaria
Canada
Chile
China
Colombia
Costa Rica
Croatia
Cyprus
Czech Republic
Denmark
Dominican Republic
Ecuador
Estonia
Faroe Islands
Finland
France
Georgia
Germany
Ghana
Gibraltar
Greece
Hong Kong
Hungary
Iceland
India
Ireland
Israel
Italy
Jamaica
Japan
Korea, Republic of
Latvia
Lebanon
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Monaco
Montenegro
Morocco
Netherlands
Netherlands Antilles
New Zealand
Northern Ireland
Norway
Peru
Poland
Portugal
Romania
Russian Federation
Saint Lucia
Saudi Arabia
Serbia
Singapore
Slovakia
Slovenia
South Africa
Spain
Sweden
Switzerland
Taiwan
Thailand
Trinidad and Tobago
Turkey
Ukraine
United Arab Emirates
United States of America
Uruguay
Venezuela
Choose a venue type
Restaurants
Arts & Entertainment
Outdoor & Recreation
Search
- Opening Hours:
- Address:
- Contact Details:
- Rating:
- URL:
Add to wishlist
Close


Predicts amyloid proteins using random forests trained on the n-gram encoded peptides. The implemented algorithm can be accessed from both the command line and shiny-based GUI.
| Version: | 1.1 |
| Depends: | R (≥ 3.0.0) |
| Imports: | biogram, ranger, seqinr, shiny |
| Published: | 2017-10-11 |
| Author: | Michal Burdukiewicz [cre, aut], Piotr Sobczyk [ctb], Stefan Roediger [ctb] |
| Maintainer: | Michal Burdukiewicz <michalburdukiewicz at gmail.com> |
| BugReports: | https://github.com/michbur/AmyloGram/issues |
| License: | GPL-3 |
| URL: | https://github.com/michbur/AmyloGram |
| NeedsCompilation: | no |
| Citation: | AmyloGram citation info |
| Materials: | README ChangeLog |
| CRAN checks: | AmyloGram results |
| Reference manual: | AmyloGram.pdf |
| Package source: | AmyloGram_1.1.tar.gz |
| Windows binaries: | r-devel: AmyloGram_1.1.zip, r-release: AmyloGram_1.1.zip, r-oldrel: AmyloGram_1.1.zip |
| OS X binaries: | r-release: AmyloGram_1.1.tgz, r-oldrel: AmyloGram_1.1.tgz |
| Old sources: | AmyloGram archive |
Please use the canonical form https://CRAN.R-project.org/package=AmyloGram to link to this page.


--- title: CSS Button Generator | HTML Tools layout: post ---
{% include common-meta %}This is a free online tool to generate CSS styled beautiful looking HTML button code for any web page. You can customize your button as per your website design and use the code.
CSS (Cascading StyleSheet) is a language for HTML page beautification. A very plain HTML page can be transformed with simple CSS code into a really beautiful and highly usable page. It helps user by making page more readable and good for use.
The generated CSS button code is compatible with all modern browsers including Google Chrome, Firefox, Safari and Internet Explorer. We have used cross browser HTML and CSS styles to keep it simple.
If you do not have a preference, you can just pick the default button with just text customization. Feel free to play around with different values to change the look and feel of the button.
A button needs to fit with your website colors theme. Try to use the colors on your website in the button instead of inventing a new color. For most people default settings are good enough with a slight color change.


---
layout: default
---
My research has aimed to identify structural features of biodiversity to understand evolutionary and biogeographic processes. I'm currently an associate researcher in the Institute of Ecology and Biodiversity (Chile).
In addition, I'm interested in the scientific study of the relationship between societies and environments in global and local scales. As a member of the Chilean community of scientists, I'm also interested in the modernization of the science policy of my country.
Ongoing Projects.
-
Chilean herbaria digitization
In collaboration with BIODATA team, we are addresing the digitation of the Chilean herbaria.
-
Machine Learning to state the global structure of Biodiversity
In collaboration with Diego Arenas from DFKI, The German Research Center for Artificial Intelligence, we are working in this project funded by AI for Earth, Microsoft (2019-2021).
-
Southern South American forest plots
I am building a network of forest plots in Chile that will be integrated with collaborators in the Americas to study variation in species richness at broad scales.
News


SKYNET
Add Room
Add Fast Reservation
Hotel's Profile
My Profile
Reports
Visits Report
Income Report
Log out


Send us a Message!
Computer & Mobile Repair
Security Design & Installation
Network Design & Installation
Tech Consulting & Support


Interface RootPackageFileManager
Manages changes to the root package file.
Use this class to make persistent changes to the puli.json of a project. Whenever you call methods in this class, the changes will be written to disk.
- Puli\Manager\Api\Package\RootPackageFileManager implements Puli\Manager\Api\Config\ConfigManager
Direct known implementers
Puli\Manager\Package\RootPackageFileManagerImpl
Namespace: Puli\Manager\Api\Package
Author: Bernhard Schussek<EMAIL_ADDRESS>Since: 1.0
Located at Api/Package/RootPackageFileManager.php
Author: Bernhard Schussek<EMAIL_ADDRESS>Since: 1.0
Located at Api/Package/RootPackageFileManager.php
public
|
|
public
|
|
public
null|string
|
|
public
|
|
public
|
|
public
|
|
public
|
#
removePluginClasses( Webmozart\Expression\Expression $expr )
Removes the plugin classes from the package file that match the given expression. |
public
|
|
public
boolean
|
|
public
boolean
|
#
hasPluginClasses( Webmozart\Expression\Expression $expr = null )
Returns whether the package file contains any plugin classes. |
public
string[]
|
|
public
string[]
|
#
findPluginClasses( Webmozart\Expression\Expression $expr )
Returns all installed plugin classes matching the given expression. |
public
|
|
public
|
|
public
|
|
public
|
#
removeExtraKeys( Webmozart\Expression\Expression $expr )
Removes the extra keys from the package file that match the given expression. |
public
|
|
public
boolean
|
|
public
boolean
|
#
hasExtraKeys( Webmozart\Expression\Expression $expr = null )
Returns whether the file contains any extra keys. |
public
mixed
|
|
public
array
|
|
public
array
|
#
findExtraKeys( Webmozart\Expression\Expression $expr )
Returns the values of all extra keys matching the given expression. |
public
|


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.threed.jpct.SimpleVector
SimpleVector is a class that represents a basic three-dimensional vector. Almost every passing of vectors is done using SimpleVector or at least a SimpleVector-variant is offered (sometimes (float x, float y, float z) is also offered for historical and/or performance reasons).
| Field Summary | |
static SimpleVector |
ORIGIN
A SimpleVector representing the origin (0,0,0) |
float |
x
The x component of the vector |
float |
y
The y component of the vector |
float |
z
The z component of the vector |
| Constructor Summary | |
SimpleVector()
Creates a new SimpleVector and sets the x,y and z components to zero |
|
SimpleVector(double x,
double y,
double z)
Creates a new SimpleVector by setting the x,y and z components of the vector. |
|
SimpleVector(float[] vector)
Creates a new SimpleVector from an array[3] of floats |
|
SimpleVector(float x,
float y,
float z)
Creates a new SimpleVector by setting the x,y and z components of the vector |
|
SimpleVector(SimpleVector s)
Creates a new SimpleVector from an existing one |
| Method Summary | |
void |
add(SimpleVector vec)
Adds another SimpleVector to this SimpleVector without creating a new instance. |
SimpleVector |
calcAdd(SimpleVector vec)
Add two SimpleVectors to a new SimpleVector. |
float |
calcAngle(SimpleVector vec)
Calculates the angle between this SimpleVector and another one. |
float |
calcAngleFast(SimpleVector vec)
Calculates the angle between this SimpleVector and another one. |
SimpleVector |
calcCross(SimpleVector vec)
Calculates the cross product of two SimpleVectors. |
float |
calcDot(SimpleVector vec)
Calculates the dot product of two SimpleVectors. |
SimpleVector |
calcSub(SimpleVector vec)
Calculates the difference vector of two SimpleVectors. |
static SimpleVector |
create()
Alternative way of creating a SimpleVector. |
static SimpleVector |
create(float x,
float y,
float z)
Alternative way of creating a SimpleVector. |
static SimpleVector |
create(SimpleVector sv)
Alternative way of creating a SimpleVector. |
void |
createNormal(SimpleVector p1,
SimpleVector p2,
SimpleVector p3)
Makes this SimpleVector a normal vector of the plane in which all the three points lie. |
float |
distance(SimpleVector pos)
Returns the distance between this SimpleVector and another position vector. |
boolean |
equals(java.lang.Object obj)
Overrides the equals()-method from java.lang.Object. |
Matrix |
getRotationMatrix()
Creates a rotation matrix that can be used to rotate a vector pointing to (0,0,1) to match the direction of this vector. |
Matrix |
getRotationMatrix(Matrix mat)
Creates a rotation matrix that can be used to rotate a vector pointing to (0,0,1) to match the direction of this vector. |
Matrix |
getRotationMatrix(Matrix mat,
SimpleVector up)
Creates a rotation matrix that can be used to rotate a vector pointing to (0,0,1) to match the direction of this vector. |
Matrix |
getRotationMatrix(SimpleVector up)
Creates a rotation matrix that can be used to rotate a vector pointing to (0,0,1) to match the direction of this vector. |
int |
hashCode()
Overrides hashCode() from java.lang.Object. |
float |
length()
Gives the length of this SimpleVector |
void |
makeEqualLength(SimpleVector vec)
Makes this SimpleVector the length of another SimpleVector, but only if its longer than this. |
void |
matMul(Matrix mat)
Multiplies the SimpleVector with a matrix, i.e. it applies the matrix's transformation to the SimpleVector. |
SimpleVector |
normalize()
Normalizes a SimpleVector and returns a normalized vector as a new SimpleVector. |
SimpleVector |
normalize(SimpleVector sv)
Normalizes a SimpleVector and returns a normalized vector as a new SimpleVector. |
SimpleVector |
reflect(SimpleVector faceNormal)
Reflects this vector on a plane with the given normal. |
void |
rotate(Matrix mat)
Similar to matMul(), but uses only the rotational part of the matrix. |
SimpleVector |
rotate(SimpleVector rotVector)
Rotates this SimpleVector using the angles (x,y,z) of rotVector. |
void |
rotateAxis(SimpleVector axis,
float angle)
Rotates the vector around an arbitrary axis. |
void |
rotateX(float angle)
Rotates the SimpleVector around the x-axis. |
void |
rotateY(float angle)
Rotates the SimpleVector around the y-axis. |
void |
rotateZ(float angle)
Rotates the SimpleVector around the z-axis. |
void |
scalarMul(float scalar)
Multiplies the SimpleVector with a scalar. |
void |
set(float x,
float y,
float z)
Sets the x,y and z values of the SimpleVector to the given floats. |
void |
set(SimpleVector s)
Sets the x,y and z values of this SimpleVector to the ones of the given SimpleVector. |
void |
sub(SimpleVector vec)
Subtracts another SimpleVector from this SimpleVector without creating a new instance. |
float[] |
toArray()
Returns an float[3]-array containing the components of the vector so that [0]=x, [1]=y and [2]=z. |
java.lang.String |
toString()
Returns this SimpleVector as a String. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final SimpleVector ORIGIN
public float x
public float y
public float z
| Constructor Detail |
public SimpleVector(float x, float y, float z)
x
- the x componenty
- the y componentz
- the z componentpublic SimpleVector(double x, double y, double z)
x
- the x componenty
- the y componentz
- the z componentpublic SimpleVector(SimpleVector s)
s
- the SimpleVector to "copy"public SimpleVector()
public SimpleVector(float[] vector)
vector
- the array containing the x, y and z components of the vector
in [0],[1] and [2].| Method Detail |
public static SimpleVector create()
public static SimpleVector create(float x, float y, float z)
x
- the x componenty
- the y componentz
- the z component
public static SimpleVector create(SimpleVector sv)
sv
- the source vector
public void set(float x, float y, float z)
public void set(SimpleVector s)
public float[] toArray()
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
obj
- the SimpleVector that should be compared to this one
public int hashCode()
public SimpleVector rotate(SimpleVector rotVector)
rotVector
- the rotation vector containing the angles for the rotations
around x,y and z axis.
public void rotateX(float angle)
angle
- the anglepublic void rotateY(float angle)
angle
- the anglepublic void rotateZ(float angle)
angle
- the anglepublic SimpleVector normalize()
public SimpleVector normalize(SimpleVector sv)
sv
- the SimpleVector to fill
public void createNormal(SimpleVector p1, SimpleVector p2, SimpleVector p3)
p1
- the first pointp2
- the second pointp3
- the third pointpublic float length()
public float distance(SimpleVector pos)
public SimpleVector calcCross(SimpleVector vec)
vec
- the second SimpleVector
public float calcDot(SimpleVector vec)
vec
- the second SimpleVector
public SimpleVector calcSub(SimpleVector vec)
vec
- the second SimpleVector
public SimpleVector calcAdd(SimpleVector vec)
vec
- the second SimpleVector
public float calcAngleFast(SimpleVector vec)
vec
- the other vector
public float calcAngle(SimpleVector vec)
vec
- the other vector
public void scalarMul(float scalar)
scalar
- the scalar to multiply withpublic void matMul(Matrix mat)
mat
- Matrix the matrix (usually a rotation or a translation matrix)public void rotate(Matrix mat)
mat
- Matrix the rotation matrixmatMul(Matrix)
public void rotateAxis(SimpleVector axis, float angle)
axis
- a direction-vector pointing into the axis directionangle
- the angle of the rotationpublic SimpleVector reflect(SimpleVector faceNormal)
faceNormal
- the face normal of the reflective plane
public void add(SimpleVector vec)
vec
- the SimpleVector to addpublic void sub(SimpleVector vec)
vec
- the SimpleVector to subtractpublic void makeEqualLength(SimpleVector vec)
vec
- the SimpleVector that defines the lengthpublic Matrix getRotationMatrix()
public Matrix getRotationMatrix(SimpleVector up)
up
- the up vector used in the calculation
public Matrix getRotationMatrix(Matrix mat)
mat
- the Matrix to fill
public Matrix getRotationMatrix(Matrix mat, SimpleVector up)
up
- the up vector used in the calculationmat
- the Matrix to fill
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Game of Thrones' House Finder
Answer a few basic questions.
Then find out which house in Westros you are most compatible with!
Go to Survey


*** User 2017-05-03 15:11:27.960 ***
15:11:27.960 [info] Disabling blocking sync...
*** User 2017-05-03 15:11:27.963 ***
15:11:27.963 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-1@antoine-PC'
*** User 2017-05-03 15:11:29.293 ***
15:11:29.293 [info] Enabling membership...
*** User 2017-05-03 15:11:29.294 ***
15:11:29.294 [info] Disabling blocking sync...
*** User 2017-05-03 15:11:29.297 ***
15:11:29.297 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-2@antoine-PC'
*** User 2017-05-03 15:11:30.634 ***
15:11:30.634 [info] Enabling membership...
*** User 2017-05-03 15:11:30.635 ***
15:11:30.635 [info] Disabling blocking sync...
*** User 2017-05-03 15:11:30.638 ***
15:11:30.638 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-3@antoine-PC'
*** User 2017-05-03 15:11:30.802 ***
Joining node: 'node-3@antoine-PC' to 'runner@antoine-PC' at port 43579
*** User 2017-05-03 15:11:30.803 ***
Joining issued: 'node-3@antoine-PC' to 'runner@antoine-PC' at port 43579
*** User 2017-05-03 15:11:30.803 ***
Joining node: 'node-2@antoine-PC' to 'runner@antoine-PC' at port 44335
*** User 2017-05-03 15:11:30.803 ***
Joining issued: 'node-2@antoine-PC' to 'runner@antoine-PC' at port 44335
*** User 2017-05-03 15:11:30.803 ***
Joining node: 'node-1@antoine-PC' to 'runner@antoine-PC' at port 53579
*** User 2017-05-03 15:11:30.804 ***
Joining issued: 'node-1@antoine-PC' to 'runner@antoine-PC' at port 53579
*** User 2017-05-03 15:11:30.865 ***
Waiting for join to complete with manager: partisan_default_peer_service_manager
*** User 2017-05-03 15:11:30.865 ***
Finished.
*** CT 2017-05-03 15:11:30.865 *** COVER INFO
Adding nodes to cover test: ['runner@antoine-PC']
*** CT 2017-05-03 15:11:30.871 *** COVER INFO
Successfully added nodes to cover test: []
*** User 2017-05-03 15:11:30.871 ***
Manager: partisan_default_peer_service_manager
*** User 2017-05-03 15:11:30.871 ***
15:11:30.871 [info] Nodes: ['runner@antoine-PC','node-3@antoine-PC','node-2@antoine-PC','node-1@antoine-PC']
*** User 2017-05-03 15:11:30.871 ***
15:11:30.871 [info] Waiting for cluster to stabilize.
*** User 2017-05-03 15:11:40.873 ***
Case finished: membership_test
*** User 2017-05-03 15:11:47.908 ***
15:11:47.907 [info] Application lasp exited with reason: stopped
*** User 2017-05-03 15:11:47.908 ***
15:11:47.908 [info] Application partisan exited with reason: stopped
=== Ended at 2017-05-03 15:11:47
=== successfully completed test case
=== Returned value: ok
Test run history
| Top level test index


Coerce phylogenetic trees to phyloXML documents, objects of class xml_document
.
as_phyloxml(tree, ...) # S3 method for phylo as_phyloxml(tree, name = "A phylogenetic tree", description = "Some description", xmlns = "http://www.phyloxml.org", digits = 20, ...)
| tree | A phylogenetic tree. |
|---|---|
| ... | Further arguments to be passed to the method (see details). |
| name | Character scalar. Name of the tree. |
| description | Character scalar. Description of the tree. |
| xmlns | Character scalar. Location of the default namespace (see the XML Namespaces section in w3schools). |
| digits | Integer scalar. Precision to use when writing numbers. |
An XML document (see xml2::read_xml)
So far, this function has a method for phylo objects from the ape package. The following elements are supported:
Branch lengths as stored in edge.length
Labels, which are exported as name
, as stored in tip.label
and, if
available, Node.label
.
Tree topology as stored in edges
Han M.V. and Zmasek C.M. (2009) "phyloXML: XML for evolutionary biology and comparative genomics" BMC Bioinformatics, 10:356 10.1186/1471-2105-10-356
# Random tree from the ape package ------------------------------------------ set.seed(1) x <- ape::rtree(5) x#> #> Phylogenetic tree with 5 tips and 4 internal nodes. #> #> Tip labels: #> [1] "t3" "t4" "t1" "t2" "t5" #> #> Rooted; includes branch lengths.as_phyloxml(x)#> {xml_document} #> <phyloxml schemaLocation="http://www.phyloxml.org http://www.phyloxml.org/1.10/phyloxml.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phyloxml.org"> #> [1] <phylogeny rooted="true">\n <name>A phylogenetic tree</name>\n <descrip ...


- Characteristics
- Hypoallergenic
- Fluffy
- Best family
- Smartest
- Best guard
- Kid friendly
- Best watch
- Easy to train
- Low shedding
Dog Breeds
Popularity2017
Temperament
Hypoallergenic
Intelligence
-
RankFaithful
Docile
Noble
Alert
...No
Hypoallergenic-
Rank-
RankTerritorial
Benevolent
Agile
Alert
...No
Hypoallergenic-
Rank-
RankDominant
Patient
Diligent
Dedicated
...No
Hypoallergenic-
Rank-
RankDocile
Spirited
Companionable
Good-natured
...No
Hypoallergenic-
Rank-
RankClever
Friendly
Alert
...No
Hypoallergenic-
Rank-
RankGenerous
Courageous
Playful
Loving
...No
Hypoallergenic-
Rank-
RankDocile
Vocal
Calm
Energetic
...No
Hypoallergenic-
Rank-
RankFriendly
Hard-working
Sociable
Obedient
...No
Hypoallergenic-
Rank-
RankLoving
Loyal
Active
Playful
...No
Hypoallergenic-
Rank-
RankEnergetic
Lively
Keen
Courageous
...No
Hypoallergenic-
Rank-
RankHappy
Strong Willed
Attentive
Trainable
...No
Hypoallergenic-
Rank-
RankLively
Affectionate
Gentle
Alert
...No
Hypoallergenic-
Rank-
RankActive
Attentive
Daring
Confident
...No
Hypoallergenic-
Rank-
RankGentle
Dependable
Familial
Calm
...-
Hypoallergenic-
Rank-
RankAlert
Strong
Confident
Courageous
...-
Hypoallergenic-
Rank-
RankAggressive
Protective
...-
Hypoallergenic-
Rank-
RankEnergetic
Friendly
Confident
Inquisitive
...No
Hypoallergenic-
Rank-
RankGentle
Dominant
Suspicious
Strong Willed
...No
Hypoallergenic-
Rank-
RankBrave
Self-assured
Quiet
Loyal
...-
Hypoallergenic-
Rank-
RankLively
Noble
Protective
Alert
...Yes
Hypoallergenic-
Rank


The Mummy (1999)
A Film Review by Mark O'Hara
Visit Online Film Critics Sociey at http://www.ofcs.org
This is not your grandfather's "The Mummy."
Not to be misunderstood, Boris Karloff as the ancient priest Imhotep was quite menacing - face crinkled in leathery evil, stare capable of sending chills clear from the early 1930's.
But this is the turn of another century, and modern audiences would yawn at all but two minutes of the original "Mummy." The new incarnation is a supercharged 127 -minute melee, most of it successful in mixing a decent plot with flatly amazing special effects. The best element, though, is the fun.
You want to hear about the monster, don't you? It's a hybrid of booger-men from various mythologies: it's a good thing, I think, that there's originality here. The producers would not have won had they gone with a Karloff-esque copy. Anyhow, this Imhotep is a viscid corpse, suddenly animated through the most unfortunate of coincidences. It's a manifestation out of Anne Rice, not only stable but agile, nimble despite parts of its anatomy skeletal or missing. Its heritage is traceable to the vampire, as it somehow drains the vital liquids from its victims, enabling itself to regenerate. Once it is whole (and the men who opened the forbidden book are grotesque husks), Imhotep is supposedly invincible, inflicting upon the modern world (the mid-1920's) the plagues of ancient Egypt.
The forces charged with stopping him include the mercenary Rick O'Connell (Brendan Frasur), who a few years previously was accosted by the evil forces lurking about Imhotep's desert tomb. His help is enlisted by the pretty English Egyptologist Evie (Rachel Weisz), and her sometimes sober brother Jonathan (John Hannah). Their caravan just happens to converge with another Egyptologist (the wonderful Jonathan Hyde) leading a band of greedy cowboys. Their guide is the despicable Beni (Kevin J. O'Connor) who, along with O'Connor, happens to know the location of the legendary City of the Dead. After these expeditions simultaneously uncover different parts of the pernicious burial chambers, the mummy is awakened, members of the parties are hunted like bugs - and at times by bugs - and the "beginning of the end" commences, the horizon blackened by locusts and other harbingers of doom.
Possibly the most watchable moments involve close combat between the heroes and legions of re-animated mummies, the bodyguards of the condemned assassin Imhotep. These shuddering soldiers appear as rapidly as the bony marauders from "Jason and the Argonauts," attacking O'Connell and losing their heads to his swift broadsword. It's over-the-top and delicious footage, causing more chuckling than gasping. We're also treated to the super-hero-like antics of fleet, shield- and spear-wielding mummies. At once scary, gross and humorous, these scenes are a typical use of state-of-the-art technology. They're cool, and they do the job of helping to tell an incredible story.
There are other complications of plot, of course. A secret society, descendants of the guardians of the murdered pharaoh, is endeavoring to scare away the tomb raiders. Before the mummy and his bedraggled ghouls, these black-clad preservers of order serve as the main baddies; their role changes soon, as their tattooed leader sports a heavy machine gun to fight on O'Connell's side. Legions of supernatural scarabs, by the way, contribute mayhem whenever they can, skittering around and de-fleshing whatever's in their way.
The imagery in the film is also cool. Early on, O'Connell is cornered by enemy soldiers on horseback.  Later we see the face in the awesome wall of a sandstorm, as well as on the slack-jawed mummy himself.
Brendan Frasur is passable as an action hero. Of course the premise is very different here than in "George of the Jungle." What's in large part responsible for Frasur's success is the surplus of action scenes. The guy is still very muscular from the George role, and seems practiced in running and handling firearms, many times blasting pistols in both hands. At a couple of points Frasur is even allowed to deliver self-reflexive humor, commenting, "That happens a lot around here," when a sudden breeze foreshadows the presence of evil. Frasur does not have the comic timing of Harrison Ford, and does not convince us in O'Connell's stubborn refusal to deliver more than his mercenary services are paid for.
The brother and sister team gets the job done. John Hannah plays a good drunk, his Jonathan a wily rascal who seems cowardly but is ultimately dependable. Rachel Weisz as Evelyn is good-looking in an unusual way, and gains our sympathy especially after the reanimated priest kidnaps her in order to raise from the dead his love from long ago.
Character roles are well-cast. Kevin J. O'Connor as Beni is terrifically snake-like, betraying his friends at the least monetary provocation, and even working for the mummy, which holds out gold jewelry in the exposed cartilage of its hand. The venerable Bernard Cox, veteran of countless film and television forays, plays a Royal Air Force officer looking for the danger he never quite found in war. Arnold Vosloo, the South African actor who portrays Imhotep, is appropriately menacing, the ethnicity of his visage indistinguishable, like Anthony Quinn's.
One reason I hope the film engenders sequels is that the ones that followed the original "The Mummy" were so full of campy fun. I'll be honest: I wouldn't want to watch films like this every week, but on a spring evening, after a long day's work in the office or in the sun, there's nothing like the formulaic spectacle of a sharp "B" film.
"The Mummy" is rated PG-13 for excessive violence and partial nudity. It's the stuff of nightmares for any viewers with vivid imaginations, a likable throwback in a genre I'm glad has been brought back to life!
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


Target Encoder¶
-
class
category_encoders.target_encoder.
TargetEncoder
(verbose=0, cols=None, drop_invariant=False, return_df=True, handle_missing='value', handle_unknown='value', min_samples_leaf=1, smoothing=1.0)[source]¶ - Target encoding for categorical features.
- For the case of categorical target: features are replaced with a blend of posterior probability of the target
given particular categorical value and prior probability of the target over all the training data.
- For the case of continuous target: features are replaced with a blend of expected value of the target
given particular categorical value and expected value of the target over all the training data.
- Parameters
- verbose: int
integer indicating verbosity of output. 0 for none.
- cols: list
a list of columns to encode, if None, all string columns will be encoded.
- drop_invariant: bool
boolean for whether or not to drop columns with 0 variance.
- return_df: bool
boolean for whether to return a pandas DataFrame from transform (otherwise it will be a numpy array).
- handle_unknown: str
options are ‘error’, ‘return_nan’ and ‘value’, defaults to ‘value’, which will impute the target mean.
- min_samples_leaf: int
minimum samples to take category average into account.
- smoothing: float
smoothing effect to balance categorical average vs prior. Higher value means stronger regularization. The value must be strictly bigger than 0.
References
- R985f0065e345-1
A Preprocessing Scheme for High-Cardinality Categorical Attributes in Classification and Prediction Problems. from
Methods
fit
(self, X, y, \*\*kwargs)Fit encoder according to X and y.
fit_transform
(self, X[, y])Encoders that utilize the target must make sure that the training data are transformed with:
get_feature_names
(self)Returns the names of all transformed / added columns.
get_params
(self[, deep])Get parameters for this estimator.
set_params
(self, \*\*params)Set the parameters of this estimator.
transform
(self, X[, y, override_return_df])Perform the transformation to new categorical data.
fit_target_encoding
target_encode
-
fit
(self, X, y, **kwargs)[source]¶ Fit encoder according to X and y. Parameters ———- X : array-like, shape = [n_samples, n_features]
Training vectors, where n_samples is the number of samples and n_features is the number of features.
- yarray-like, shape = [n_samples]
Target values.
- selfencoder
Returns self.
-
fit_transform
(self, X, y=None, **fit_params)[source]¶ - Encoders that utilize the target must make sure that the training data are transformed with:
transform(X, y)
- and not with:
transform(X)
-
transform
(self, X, y=None, override_return_df=False)[source]¶ Perform the transformation to new categorical data. Parameters ———- X : array-like, shape = [n_samples, n_features] y : array-like, shape = [n_samples] when transform by leave one out
None, when transform without target info (such as transform test set)
- Returns
- parray, shape = [n_samples, n_numeric + N]
Transformed values with encoding applied.