text
stringlengths
1
62.8k
fineweb
float64
-3.91
3.29
nvidia
float64
-7.02
7.77
length
float64
-4.2
15.4
quality
float64
-10.77
6.4
The only sounds were his terrible invitations to battle.
-1.497449
0.006027
-0.745968
-0.680375
Justice and safety for LGBT survivors: Lesbian, gay, bisexul and transgender survivors of violence experience the same rates of violence as straight individuals.
1.573201
0.95835
0.628934
1.570418
True Let d be (2/4)/((-20)/(-40)).
-0.031169
0.437295
-1.314123
1.174614
Career statistics International Honors Stanford Cardinal NCAA Division I Men's Soccer Championship: 2015 Pac-12 Conference: 2015 Seattle Sounders MLS Cup: 2016, 2019 Western Conference: 2016, 2017, 2019 United States CONCACAF Gold Cup: 2017 Individual NSCAA High School All-American: 2012 First team All-Pac-12: 2013, 2014, 2015 Pac-12 Player of the Year: 2015 Hermann Trophy: 2015 MLS Rookie of the Year: 2016 CONCACAF Gold Cup Best XI: 2017 MLS Comeback Player of the Year: 2019 References External links Stanford University bio Category:1994 births Category:Living people Category:American soccer players Category:Stanford Cardinal men's soccer players Category:Seattle Sounders FC U-23 players Category:Seattle Sounders FC players Category:Association football forwards Category:Soccer players from Washington (state) Category:USL League Two players Category:Major League Soccer players Category:People with type 1 diabetes Category:Hermann Trophy men's winners Category:NCAA Division I Men's Soccer Tournament Most Outstanding Player winners Category:United States men's under-20 international soccer players Category:United States men's under-23 international soccer players Category:United States men's international soccer players Category:2017 CONCACAF Gold Cup players Category:Sportspeople from Seattle Category:People from Mercer Island, Washington Category:CONCACAF Gold Cup-winning players Category:All-American men's college soccer players Category:2019 CONCACAF Gold Cup players
0.250807
-0.970551
4.487807
-3.489401
We who deny our complicity in the dark realities of the past are doomed to repeat its errors.
-0.36572
-0.883737
-0.116506
-0.901526
These fat people will do anything to go there.
-1.580916
0.23468
-0.975751
-0.41696
Please expand the details section for more information.
-0.972291
-1.06078
-0.767339
-1.090191
Sex and Personality.
-0.552044
-1.563085
-1.867399
-0.437084
On traditional Intel/AMD x86/x64 hardware, Windows 8 can be thought of as an operating system for two different types of apps: - Windows Store apps: New apps that run on Windows 8 only.
1.533354
-0.365325
0.829037
0.373209
Written by Robert Lalasz Published on January 24th, 2012 By ANTHONY DePALMA Songbirds and bats suffer some of the same types of neurological disorders from mercury as humans and especially children do, says the study, "Hidden Risk," by the Biodiversity Research Institute, a nonprofit organization in Gorham, Me., that investigates emerging environmental threats.
1.950279
3.557831
1.870164
3.089728
Tried to fix mum's leaky toilet.
-0.92847
-0.963608
-1.379905
-0.580458
I was possibly the time I truly found all over the Becuase and always could simply get across.
-1.580916
-1.614975
-0.102637
-2.433332
(Source: usatoday.com) Nature of Attacks Varies Widely The number of hacker infiltrations into NASA data systems continues to grow.
0.417831
2.251401
0.340607
1.866138
According to Microsoft, though, the official release will hit shelves April 1st.
-1.378466
-0.178849
-0.309089
-1.016797
It has one of my favorite lines, which also suggests its tone: "One of the Brandenburg Concertos swells, its sitars and yak bells flourishing."
-0.09921
0.451274
0.461918
-0.025766
Charlotte and her episode found enjoy video experiments and stars50 architecture.
-1.47393
-1.614975
-0.293388
-2.225252
A line with five feet is called pentameter; thus, a line of five iambs is known as "iambic pentameter" (the most common metrical form in English poetry).
1.964085
1.501093
0.556722
2.347914
Dr. Huang and his collaborators hope these guidelines will become part of a national strategy to prevent and reduce childhood obesity.
1.210397
1.276914
0.371772
1.703493
Suppose 0 = 4*k + v - 3.
0.351009
0.332478
-1.68293
1.632087
Therefore, we do not consider the language an expression of Congress's "unambiguous intent" allowing Chevron step-onereview, and we review its interpretation for reasonability under Chevron step-two.
-0.391852
-0.358357
0.936009
-1.197249
Working Papers in Bilingualism, 11, Young, R. W. (1973).
1.137364
1.311935
-0.745968
2.402588
Once HABE landed back on Earth (after the balloon burst in space), Cudworth was able to retrieve the photos by locating HABE using the GPS chip and radio transmitter he included.
0.708029
2.061975
0.773012
1.663022
Unlike the rest of East Europe, which fell under Stalin's influence post-World War II, Yugoslavia, due to the strong leadership of Marshal Tito and the fact that the Yugoslav Partisans liberated Yugoslavia with only limited help from the Red Army, remained independent from Moscow.
2.045534
0.772926
1.460475
1.252662
A New Year's themed video produced by the American Chemical Society, explained Henry's Law, which is a law of physics that states that the pressure of a gas above a solution is proportional to the concentration of the gas within the solution.
1.549361
1.522115
1.229561
1.601176
This is because locally managed companies can save you a lot of time and effort going through paperwork, since they will already work with local recycling and waste disposal businesses.
0.803567
0.489717
0.829037
0.4712
Stowe, Child, and Fuller were powerful intellectual forces in their own time, and their literary achievements are central to our understanding of antebellum culture now.
1.880217
1.697334
0.698231
2.343555
Ocypode brevicornis belongs to the genus Ocypode of the ghost crab subfamily Ocypodinae in the family Ocypodidae.
0.761513
3.07993
0.140102
2.913941
As with all guidelines failure to comply makes the moderators unfriendly....REMEMBER!
-0.80586
-1.815509
-0.232146
-1.899416
When you advertise with us you know you are reaching a targeted audience with a desire to learn more about training / caring for hunting dogs and who have a proven track record of purchasing hunting dog related supplies.
-0.850996
1.592195
1.085319
-0.127827
Conclusion {#sec:conclusion} ========== We proposed a new set of transforms that are orthogonal (so that the decorrelation efficiency is high), that have elements $1$ or $-1$ (so that the hardware complexity is low), and that have a size of $k\\times k$ where $k$ is a power of 2 (so that an input-selection algorithm can be applied to further decrease complexity).
0.865472
-1.462729
1.879154
-1.692577
There were, of course exceptions, but they were not seen as such.
-0.900564
0.301039
-0.566656
-0.099536
In the cathedral-city of Lodellan and its uneasy hinterland, babies are fashioned from bread, dolls are given souls and wishes granted may be soon regretted.
0.010943
0.315012
0.59321
-0.131803
5 Written Questions 5 Multiple Choice Questions - v. to judge or estimate the worth,importance,or valuate of something again.
2.501845
2.209301
0.27646
3.505427
Then we have $$\\left\\langle \\prod_{l=1}^L \\Psi^{{\\mathrm{A}}}(\\bz^{-1};\\eta_l^{-1}) \\cdot \\prod_{k=1}^K \\Psi^{{\\mathrm{A}}}(\\bz;\\eta_{L+k}) \\right\\rangle_{n}^{(q,t)} = (\\eta_1 \\cdots \\eta_L)^{-n} \\cdot P_{(n^L)}^{{\\mathrm{Mac}}} (\\eta_1, \\dots, \\eta_{L+K};t,q).$$ By the dual Cauchy identity , we have $$\\begin{aligned} & \\prod_{l=1}^L \\Psi^{{\\mathrm{A}}}(\\bz^{-1};\\eta_l^{-1}) \\cdot \\prod_{k=1}^K \\Psi^{{\\mathrm{A}}}(\\bz;\\eta_{L+k}) = \\prod_{l=1}^L \\eta_l^{-n} \\cdot (z_1 \\cdots z_n)^{-L} \\cdot \\prod_{k=1}^{L+K} \\prod_{j=1}^n (1+\\eta_k z_j) \\\\ =& \\prod_{l=1}^L \\eta_l^{-n} \\cdot (z_1 \\cdots z_n)^{-L} \\sum_{\\lambda} Q_{\\lambda}^{{\\mathrm{Mac}}}(\\eta_1,\\dots,\\eta_{L+K};t,q) Q_{\\lambda'}^{{\\mathrm{Mac}}}(\\bz;q,t).\\end{aligned}$$ Therefore, since $P_{(L^n)}^{{\\mathrm{Mac}}}(\\bz;q,t)=(z_1\\cdots z_n)^L$ ([@Mac Chapter VI (4.17)]), we see that $$\\begin{aligned} \\left\\langle \\prod_{l=1}^L \\Psi^{{\\mathrm{A}}}(\\bz^{-1};\\eta_l^{-1}) \\cdot \\prod_{k=1}^K \\Psi^{{\\mathrm{A}}}(\\bz;\\eta_{L+k}) \\right\\rangle_{n}^{(q,t)} =& \\prod_{l=1}^L \\eta_l^{-n} \\sum_{\\lambda} Q_{\\lambda}^{{\\mathrm{Mac}}}(\\eta_1,\\dots,\\eta_{L+K};t,q) \\frac{\\langle Q_{\\lambda'}^{{\\mathrm{Mac}}}, P_{(L^n)}^{{\\mathrm{Mac}}} \\rangle_{ \\Delta^{{\\mathrm{Mac}}} } } {\\langle 1, 1 \\rangle_{\\Delta^{{\\mathrm{Mac}}} } } \\\\ =& \\prod_{l=1}^L \\eta_l^{-n} \\cdot Q_{(n^L)}^{{\\mathrm{Mac}}}(\\eta_1,\\dots,\\eta_{L+K};t,q) \\prod_{s \\in (L^n)} \\frac{1-q^{a'(s)}t^{n-l'(s)}}{1-q^{a'(s)+1}t^{n-l'(s)-1}}\\end{aligned}$$ by the orthogonality property .
0.146794
-0.211972
4.640637
-3.076965
A spore contains all the chemicals needed to make its kind of fungus.
1.128099
-0.556861
-0.493512
0.768699
Researchers are specifically looking at whether pretend play facilitates the development of children's theory of mind- the ability to understand that others have thoughts and feelings all their own.
2.325595
0.535155
0.928578
1.632576
Schedule of Service Fees Cash Credit Card Fingerprints $15.00 $18.45 Thumbprint - Cash Only $5.00 Concealed Carry Permit $90.00 $95.70 Renewal $75.00 $80.25 Duplicate $15.00 $18.45 Lamination $3.00 $6.09 Pistol Permit $5.00 $8.15 Report Copy $3.00 $6.09 Security Card for Building Access $10.00 $13.30 * Attorney's Requests Only Cash Credit Card Criminal History Check* $10.00 $13.30 Driver History Check* $10.00 $13.30 *Criminal background checks are available for court officials only.
-0.387816
-1.490418
2.363008
-3.010231
In this case the patient need not go to the uptake room.
-0.672592
-1.220284
-0.745968
-0.994448
TThe field of view is large because of the 1500 mm focal of the telescope.
1.100116
0.695983
-0.406871
1.670455
Journal of the American Medical Association, Feb. 3, 2010; vol 303: pp 430-437.Marian Willinger, PhD, special assistant for SIDS, Eunice Kennedy Shriver National Institute of Child Health and Human Development, National Institutes of Health, Bethesda, Md.Richard Martin, MD, director of neonatology, Rainbow Babies & Children's Hospital; professor of pediatrics, Case Western Reserve University, The Health News section does not provide medical advice, diagnosis or treatment.
0.885802
-2.657601
2.323798
-2.901396
Mathematics for the Environment Published January 18th 2011 by Chapman and Hall/CRC – 679 pages Published January 18th 2011 by Chapman and Hall/CRC – 679 pages Mathematics for the Environment shows how to employ simple mathematical tools, such as arithmetic, to uncover fundamental conflicts between the logic of human civilization and the logic of Nature.
2.163469
2.511081
1.838374
2.458334
Wicked Local East Bridgewater ~ 1324 Belmont St., Unit 102, Brockton, MA 02301 ~ Privacy Policy ~ Terms Of Service
-1.797423
-1.870801
0.151912
-2.968836
function fetchDataJSON(endpointUrl) { var returnObj = []; // Ajax call $.ajax({ type: "GET", url: endpointUrl, dataType: 'json', async: true, success: updateData, error: handleError }); function updateData(data) { returnObj = data; } function handleError(XHR, message, error) { console.log("Failed XHR"); } return returnObj; // Return JSON object } var DataModel01 = fetchDataJSON( "[URL] ); var DataModel02 = fetchDataJSON( "[URL] ); EDIT: I found a working solution now, yihar.
1.043289
-1.296515
2.334566
-1.720384
2019-04-02 14:16:36 done Wiki template inclusion link records.
-1.266099
-2.153998
-0.624004
-2.268774
Each fullerene is constructed of 12 pentagonal rings of carbon atoms and a number of hexagonal rings.
1.581103
-0.302602
-0.008838
1.005978
This may be a result of the stalled activity of viral RT with concomitant shutdown of RNA hydrolysis ([@B46], [@B54]).
0.218726
-1.753292
0.198311
-1.329855
- In phytogeography, parasitic on insects: said of a class of fungi.
2.018644
0.108985
-0.511461
1.998023
Franchise Tax Bd., 463 U.S. at 16, 103 S.Ct.
-0.31028
1.262906
-1.026614
1.414687
What would you risk for a complete stranger?
-1.200442
-2.034882
-1.026614
-1.861694
Instead of focusing on your height, consider your adorable nose.
-1.398508
-0.596885
-0.585523
-1.179269
The court noted civil appeal rules applied to the removal of records from the reviewing court.
-0.432555
0.398858
-0.102637
0.040563
These findings are in agreement with experimental data, which have been performed in other cell types [@pone.0062400-Gandhi1], [@pone.0062400-Yao1].
-0.187665
-1.649562
0.509984
-1.769867
The top should be inset by 3/4″ like the top bench.
-0.731516
0.129931
-0.856183
0.087641
He was hypotensive, with a blood pressure of 72/52 mmHg, but his heart rate was not elevated (61 beats/min).
0.007458
0.507192
0.079718
0.350648
Teams Defensores Unidos 2000-2005 Huracán de Comodoro Rivadavia 2005-2006 Defensores Unidos 2006-2009 Racing Club 2009 Independiente Rivadavia 2010-2011 Palestino 2011–2012 Independiente Rivadavia 2012 Instituto 2012-2015 Talleres Córdoba 2015– References Category:1984 births Category:Living people Category:Argentine footballers Category:Argentine expatriate footballers Category:Independiente Rivadavia footballers Category:Racing Club de Avellaneda footballers Category:Club Deportivo Palestino footballers Category:Talleres de Córdoba footballers Category:Chilean Primera División players Category:Argentine Primera División players Category:Expatriate footballers in Chile Category:Association footballers not categorized by position
0.552506
-1.351936
3.106348
-2.650947
As his friend Fulke Greville remarked in his Life of Sidney, "His end was not writing, even while he wrote; nor his knowledge molded for tables, or schools; but both his wit and understanding bent upon his heart, to make himself and others, not in words or opinion, but in life and action, good and great."
1.674227
1.185872
1.594861
1.197611
In the last 19 years, the psychopharmacological treatment of aggression has changed dramatically because of the introduction of atypical antipsychotics into the market and the increased use of anticonvulsants and lithium in the treatment of aggressive patients.Using a translational medicine approach, this review (part 1 of 2) examines the neurobiology of aggression, discussing the major neurotransmitter systems implicated in its pathogenesis, namely, serotonin, glutamate, norepinephrine, dopamine, and γ-aminobutyric acid, and also their respective receptors.
2.26433
0.01824
2.618629
0.078232
They were married three months later.
-2.065253
1.115852
-1.221225
0.053563
package com.example; import java.net.URI; import java.net.URISyntaxException; import org.apache.commons.dbcp.BasicDataSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.scorer.game.BattingStats; @Configuration public abstract class DatabaseConfiguration { @Bean public BasicDataSource createDataSource() throws URISyntaxException { URI dbUri = new URI(System.getenv("DATABASE_URL")); String username = dbUri.getUserInfo().split(":")[0]; String password = dbUri.getUserInfo().split(":")[1]; String dbUrl = "jdbc:postgresql://" + dbUri.getHost() + ':' + dbUri.getPort() + dbUri.getPath(); BasicDataSource basicDataSource = new BasicDataSource(); basicDataSource.setUrl(dbUrl); basicDataSource.setUsername(username); basicDataSource.setPassword(password); basicDataSource.setTestOnBorrow(true); basicDataSource.setTestOnReturn(true); basicDataSource.setTestWhileIdle(true); basicDataSource.setTimeBetweenEvictionRunsMillis(1800000); basicDataSource.setNumTestsPerEvictionRun(3); basicDataSource.setMinEvictableIdleTimeMillis(1800000); basicDataSource.setValidationQuery("SELECT version();"); return basicDataSource; } @Bean(name = "persistenceXmlLocation") public String persistenceXmlLocation() { return "classpath:META-INF/persistence.xml"; } /* --------- UPDATE ---------------- */ @Bean public BattingStats battingStats() { Integer battingPosition = methodForDynamicallyCalculatingBattingPosition(); // call the rest of your "dynamic" methods here return new BattingStats(battingPosition, /* the rest of your dynamic arguments go here */); } }
1.484778
-1.476574
4.664154
-3.03489
According to NASA, here's how you tell what kind of object is falling from the sky: Asteroids are relatively small, inactive rocky bodies that orbit the sun.
2.163469
0.342958
0.59321
1.574058
Observations on diving times, on pre-migratory restlessness and on some displays of Silvery Grebes Podiceps occipitalis.
0.405802
1.564162
0.221023
1.397052
Merriam-Websterís definition of disability: limitation in the ability to pursue an occupation because of a physical or mental impairment; lack of legal qualification to do something; or a disqualification, restriction or disadvantage.
2.201714
2.953479
1.178417
3.264689
We are releasing this system in hope that it will be useful in many settings.
-0.979821
0.645279
-0.35719
-0.028814
The hen-of-the-woods looks a little like the fluffy feathers of a hen, hence it's name.
-0.290751
2.118095
-0.202417
1.561583
Burial Aug 2, 1822, Fort William, Bengal, India.
0.708029
1.329446
-0.926689
2.198245
In the cases of Argentina and Chile, prosecutors have succeeded in indicting and jailing top officials.
0.089882
0.507192
0.01697
0.456046
The presence of medial hypertrophy only does not ensure either survival or a normal post-operative pulmonary arterial pressure.
0.225172
-0.020143
0.29812
-0.033991
\\[[@B65-sensors-20-02641]\\], which discussed deep learning methods for object positioning.
0.192787
-1.711805
-0.130499
-1.103288
As I wrote below, sometimes one trauma can raise old traumas never fully healed, so that's a possibility.
-0.776574
0.905863
0.042366
0.073522
Have the authors made all data underlying the findings in their manuscript fully available?
-0.139394
1.557154
-0.144619
1.203463
When D=2d, a point on the spur gear pitch circle moves in a straight line along a corresponding pitch diameter of the ring gear as the spur gear orbits within the ring gear.
0.865472
3.571891
0.731864
2.994285
Eye test – acuity; Vision test – acuity Definition of Visual acuity test The visual acuity test is used to determine the smallest letters a person can read on a standardized chart or card held 14 - 20 feet away.
2.6245
2.237367
1.022842
3.136655
0.4 What is the closest to -7/12 in 1/3, -1/13, -4, 263?
-0.172721
-1.462729
-0.745968
-0.793054
You could let your mind run free and think about how you expected your life to turn out as a teenager.
-0.430506
-0.204128
0.004119
-0.499181
the original wrath debuted in batman special - the currently recognized version of the sins are usually given , lust , envy , and gluttony - he exclusively attacks wrath during the movie, the battle leading to alphonse elric sacrificing the two upon wrath's demand, in order - in 1997, clark rejoined wcw as wrath, a helmeted martial artist , battled glacier and ernest miller - wrath records is a small independent record label founded in 2002 based , england unlike some 'indie labels', wrath - daryl sabara scorn was created specifically for the series to provide wrath with a sidekick counterpart .
0.975487
-1.531945
2.734248
-2.218231
Best price I could find on the internet.
-0.947782
-0.142233
-1.134376
-0.113076
Polyimide precursor solutions are main forms of polyimide products supplied in the field of semiconductor devices.
0.471319
1.690324
0.151912
1.592073
-7baa In base 2, what is 1000111011 - 11?
-0.113754
-1.518104
-1.106625
-0.555073
"We thought we were better than we were," Wayne Hale, who served as a flight director for 40 shuttle missions at NASA's Johnson Space Center in Houston before becoming manager of the shuttle program in 2005, said of the Columbia tragedy.
0.708029
2.679579
1.197764
1.869231
During Acheson's stay in Geneva, he evolved one proposal that came to be known as the Acheson Plan.
0.357151
1.805999
-0.035073
1.715178
They are clownish looking.<P>To DATE, the ONLY adult that I have ever seen pull off playing a kid is Martin Short in Clifford.
-1.234473
-1.490418
0.287326
-2.319132
Patients were blinded to group allocation, but the experimenters administering the study materials were not.
0.69178
2.026903
0.079718
2.07494
When it burrows, those tentacles can touch 12 different objects every second, appearing to the human eye as no more than a pink blur of activity.
-0.113754
0.989846
0.481309
0.371555
Confined largely to U.P.
-1.248186
-0.824671
-1.68293
-0.524298
Last issue is that when I quit the game I get instantly logged out from X and/or X itself crashes.
-2.00515
-1.012203
-0.048356
-2.32905
Facing life in prison, Qwabe and Mbolombo later changed their stories to allege the crime had been a premeditated murder for hire at the behest of Anni's husband Shrien Dewani.
-0.717803
1.595699
0.756669
0.193415
- 1680s -- Development of a separate legal code providing distinct trial procedures and harsher punishments for negroes.
2.963746
0.779921
0.221023
2.784682
The latter eventually phased out, while the former evolved and remains available to this day.
-0.734956
0.69948
-0.116506
0.048215
|This unreferenced section requires citations to ensure verifiability.| Most modern biscuits can trace their origins back to either the hardtack ship's biscuit, or the creative art of the baker: Biscuits today can be savoury or sweet, but most are small at around 2 inches (5.1 cm) in diameter, and flat.
1.894369
1.438032
1.584452
1.573896
Born Edith Gassion on December 19, 1915, in Ménilmontant, a poor district of Paris, legend has it she was born under a street light on the corner of the Rue de Belleville, with two policeman in attendance.
0.546786
1.178869
0.979952
0.711053
Determinism is often contrasted with free will.
0.724184
1.161364
-0.951003
2.095241
A soft moan warbled from deep inside her as she watched the couple reposition themselves on the bed.
-1.703265
-1.518104
-0.021901
-2.505909
Everybody is welcome, whether they have a basic knowledge of Dutch or no knowledge at all!
-0.784742
1.119353
-0.158868
0.36537
STOCK BLAST Jb hi fi sydney easter trading hours the volatile market situations, stock futures are jb hi fi sydney easter trading hours way to hedge your investments so that no single market fluctuation can ruin your portfolio Kb service is especially for future market traders, You will be receive intraday calls on stock futures through SMS and chat room services wherein we make sure that hohrs maintain an accuracy of tradinh on a consistent basis.
-0.135716
-1.421189
2.235569
-2.675747
The truth about pregnancy skin - 7.
-1.715701
-2.209224
-1.282428
-2.234387
In the State of Yap in the Federated States of Micronesia, where the percentage of females attending school is said to have been low, we can assume that the number of Japanese speakers has fallen below 500.
1.137364
1.550146
0.987172
1.458838
#!/usr/bin/env python # -*- coding: utf-8 -*- import six from bson import ObjectId from easydict import EasyDict as edict from tornado.concurrent import return_future from motorengine import ASCENDING from motorengine.query_builder.transform import update class BaseAggregation(object): def __init__(self, field, alias): self._field = field self.alias = alias @property def field(self): return self._field class PipelineOperation(object): def __init__(self, aggregation): self.aggregation = aggregation def to_query(self): return {} class GroupBy(PipelineOperation): def __init__(self, aggregation, first_group_by, *groups): super(GroupBy, self).__init__(aggregation) self.first_group_by = first_group_by self.groups = groups def to_query(self): group_obj = {'$group': {'_id': {}}} for group in self.groups: if isinstance(group, BaseAggregation): group_obj['$group'].update(group.to_query(self.aggregation)) continue if isinstance(group, six.string_types): field_name = group else: field_name = self.aggregation.get_field(group).db_field if self.first_group_by: group_obj['$group']['_id'][field_name] = "$%s" % field_name else: group_obj['$group']['_id'][field_name] = "$_id.%s" % field_name return group_obj class Match(PipelineOperation): def __init__(self, aggregation, **filters): super(Match, self).__init__(aggregation) self.filters = filters def to_query(self): from motorengine import Q match_obj = {'$match': {}} query = self.aggregation.queryset.get_query_from_filters(Q(**self.filters)) update(match_obj['$match'], query) return match_obj class Unwind(PipelineOperation): def __init__(self, aggregation, field): super(Unwind, self).__init__(aggregation) self.field = self.aggregation.get_field(field) def to_query(self): return {'$unwind': '$%s' % self.field.db_field} class OrderBy(PipelineOperation): def __init__(self, aggregation, field, direction): super(OrderBy, self).__init__(aggregation) self.field = self.aggregation.get_field(field) self.direction = direction def to_query(self): return {'$sort': {self.field.db_field: self.direction}} class Aggregation(object): def __init__(self, queryset): self.first_group_by = True self.queryset = queryset self.pipeline = [] self.ids = [] self.raw_query = None def get_field_name(self, field): if isinstance(field, six.string_types): return field return field.db_field def get_field(self, field): return field def raw(self, steps): self.raw_query = steps return self def group_by(self, *args): self.pipeline.append(GroupBy(self, self.first_group_by, *args)) self.first_group_by = False return self def match(self, **kw): self.pipeline.append(Match(self, **kw)) return self def unwind(self, field): self.pipeline.append(Unwind(self, field)) return self def order_by(self, field, direction=ASCENDING): self.pipeline.append(OrderBy(self, field, direction)) return self def fill_ids(self, item): if not '_id' in item: return if isinstance(item['_id'], (dict,)): for id_name, id_value in list(item['_id'].items()): item[id_name] = id_value def get_instance(self, item): return self.queryset.__klass__.from_son(item) def handle_aggregation(self, callback): def handle(*arguments, **kw): if arguments[1]: raise RuntimeError('Aggregation failed due to: %s' % str(arguments[1])) results = [] for item in arguments[0]: self.fill_ids(item) results.append(edict(item)) callback(results) return handle @return_future def fetch(self, callback=None, alias=None): coll = self.queryset.coll(alias) coll.aggregate(self.to_query()).to_list(None, callback=self.handle_aggregation(callback)) @classmethod def avg(cls, field, alias=None): from motorengine.aggregation.avg import AverageAggregation return AverageAggregation(field, alias) @classmethod def sum(cls, field, alias=None): from motorengine.aggregation.sum import SumAggregation return SumAggregation(field, alias) def to_query(self): if self.raw_query is not None: return self.raw_query query = [] for pipeline_step in self.pipeline: query_steps = pipeline_step.to_query() if isinstance(query_steps, (tuple, set, list)): for step in query_steps: query.append(step) else: query.append(query_steps) return query
1.164977
-1.462729
6.788602
-4.659518
Senator Youngblood of PenobscotRepresentative Beavers of South BerwickRepresentative Dunphy of EmbdenRepresentative Harvell of FarmingtonRepresentative Libby of WaterboroRepresentative Newendyke of Litchfield
-0.651381
-0.372293
1.001525
-1.453911
While Ellen has a handful of self-designed collections, she is happy to discuss custom requests for a piece that's as special as its future wearer.
-1.494501
-1.261869
0.50048
-2.482747
9 Suppose 4*s - 59 = -7.
0.035211
0.374401
-1.68293
1.417825