text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def rgb ( self ) : ( inten, aop, dop ) = self. polarization hsv = np. uint8 ( cv2. merge ( ( ( aop + np. pi / 2 ) / np. pi * 180, dop * 255, inten / inten. max ( ) * 255 ) ) ) rgb = cv2. cvtcolor ( hsv, cv2. cv. cv _ hsv2bgr ) return rgb | [
-0.6328538060188293,
-0.1037326380610466,
0.7819287776947021,
0.4369520843029022,
0.518483579158783,
0.2802034020423889,
-0.6233462691307068,
-0.034929465502500534,
0.8744009137153625,
0.6304521560668945,
0.3442225754261017,
-0.026653140783309937,
-0.7004083395004272,
-0.21718664467334747,... |
async def create _ table _ event _ manager _ application ( self, ctx ) - > none : if await self. table _ event _ manager _ application _ exists ( ) : return await ctx. send ( " * * table ` eventmanagerapplication ` already exists! * * " ) mycursor, db = await the _ database ( ) await mycursor. execute ('''create table ... | [
0.5167731642723083,
-0.18429647386074066,
0.46804681420326233,
0.0027280154172331095,
0.41087135672569275,
0.35128018260002136,
0.18282556533813477,
-0.3396460711956024,
-0.5655784606933594,
0.021964408457279205,
0.15836066007614136,
0.47244665026664734,
-0.5576764345169067,
1.013646721839... |
def save _ team _ info ( client, file _ name _ prefix = " " ) : team _ info = get _ team _ info ( client ) team _ domain = team _ info [ " domain " ] os. makedirs ( team _ domain, exist _ ok = true ) file _ name = " team _ info. json " file _ path = os. path. join ( team _ domain, file _ name ) with open ( file _ path,... | [
0.27624765038490295,
-0.5416649580001831,
0.6765824556350708,
-0.7824903130531311,
0.49232131242752075,
0.7624120116233826,
0.19991466403007507,
-0.4917779862880707,
-1.287184715270996,
-0.21597328782081604,
-1.2321010828018188,
0.5860101580619812,
0.5425337553024292,
-0.09737887978553772,... |
def var ( self, name ) : if self. _ _ ffprobeexecutable and name in ('width ','height') and name not in self. varnames ( ) : self. _ _ computewidthheight ( ) return super ( videocrawler, self ). var ( name ) | [
-0.24342277646064758,
0.36107680201530457,
0.3463333249092102,
0.592434823513031,
-0.268814355134964,
-0.6075422167778015,
0.525395929813385,
-1.024807333946228,
0.3528846204280853,
-0.18062683939933777,
-0.020016441121697426,
0.17656099796295166,
-0.8499361872673035,
1.885473608970642,
... |
def http _ load ( uri ) : try : if': / /'not in uri : uri ='http : / /'+ uri f = urllib. request. urlopen ( uri, none, docgenutilities. timeout ) return f. read ( ). decode ('utf - 8') except exception as ex : warnings. warn ( " unable to retrieve data from'% ( uri ) s': % ( message ) s " % {'uri': uri,'message': str (... | [
0.08904893696308136,
0.17186973989009857,
0.691128134727478,
-0.5233717560768127,
-0.8301942348480225,
-0.19239014387130737,
-0.7462256550788879,
-1.1665642261505127,
-0.1811893731355667,
-0.6061553955078125,
0.634470522403717,
0.1361083984375,
-1.1462496519088745,
-1.1003557443618774,
-... |
def save ( self ) : method ='post'url ='% s / % s'% ( self. identica. url, self. entity ) if self. id : method ='put'url ='% s / % s / % s'% ( self. identica. url, self. entity, self. id ) r = self. identica. _ request ( url, method = method, data = json. dumps ( {'resource': self. _ sanitized _ properties } ) ) self. ... | [
-1.2206370830535889,
-0.387180358171463,
0.5218602418899536,
-0.20612137019634247,
0.5280488729476929,
0.2810738980770111,
-0.3535655438899994,
0.0567191019654274,
-0.12251207232475281,
-0.016436712816357613,
-0.4013634920120239,
-0.3657742440700531,
-0.7609049677848816,
0.0647988542914390... |
def read _ pickle _ file ( self, filename ) : log. info ( " reading pickled toas from'% s '... " % filename ) if os. path. splitext ( filename ) [ 1 ] = = '. gz': infile = gzip. open ( filename,'rb') else : infile = open ( filename,'rb') tmp = cpickle. load ( infile ) self. filename = tmp. filename if hasattr ( tmp,'to... | [
-0.5577983260154724,
-0.32400932908058167,
0.5420553684234619,
-0.49946221709251404,
-0.5333765149116516,
-0.25415995717048645,
0.30345842242240906,
0.15216578543186188,
-0.6503244042396545,
-0.1431853175163269,
0.7329287528991699,
-0.5291600227355957,
0.6675795316696167,
0.253187179565429... |
def home _ page ( ) : dishes _ cursor = mongo. db. dishes. find ( { }, {'_ id': 0 } ) dishes = [ item for item in dishes _ cursor ] return render _ template ('index. html ', dishes = dishes ) | [
0.6002631783485413,
0.8140712976455688,
0.37165531516075134,
0.6147167086601257,
0.3992031514644623,
0.35711511969566345,
-0.15370672941207886,
0.7567890286445618,
0.44530171155929565,
0.7885182499885559,
0.21916192770004272,
0.17866139113903046,
-0.4721081852912903,
1.1746876239776611,
... |
def allows _ tool _ change ( self ) : return not self. _ has _ target | [
-0.47047126293182373,
0.17323781549930573,
0.2797766625881195,
0.02852041833102703,
-0.3018021583557129,
0.5572798848152161,
0.3866182565689087,
-0.6821508407592773,
-0.9446856379508972,
-0.0444304421544075,
0.6999868750572205,
1.2938175201416016,
0.007165451999753714,
0.6878809332847595,
... |
def is _ layer _ field _ container ( uri : str ) - > bool : return uri in _ layer _ containers | [
-0.4210887849330902,
0.3332465589046478,
0.3617234528064728,
-0.14668309688568115,
0.4050772488117218,
0.1073249951004982,
0.5003182291984558,
-0.5371363759040833,
0.0311775803565979,
-0.49850600957870483,
-0.10009711235761642,
0.0007724676979705691,
-0.20376808941364288,
0.918256402015686... |
def _ _ exit _ _ ( self, exc _ type, exc _ val, exc _ tb ) : self. close ( ) | [
0.12048632651567459,
-0.8002947568893433,
0.6445279717445374,
0.21483437716960907,
-0.2077314853668213,
0.8274556994438171,
0.6310141086578369,
0.019224019721150398,
-0.1264026165008545,
-0.30198171734809875,
1.138527750968933,
-0.12495581060647964,
-0.42177632451057434,
0.2462201267480850... |
def do _ update _ all ( self, * * kwargs ) : # pylint : disable = unused - argument _ error _ code = 0 _ msg ='' for _ node in self. tree. all _ nodes ( ) : try : _ error _ code, _ debug _ msg = self. do _ update ( _ node. identifier ) _ msg = _ msg + _ debug _ msg +'\ n'except attributeerror : _ error _ code = 1 _ msg... | [
-0.24102462828159332,
-0.3493439257144928,
0.7887957692146301,
0.1717720478773117,
0.4891453981399536,
-0.4502280056476593,
0.16257275640964508,
0.018898583948612213,
-0.6755400896072388,
1.1534059047698975,
-0.10405537486076355,
0.5009833574295044,
-0.21977758407592773,
0.9986904263496399... |
def _ _ init _ _ ( self, end = - 1 ) : super ( segment, self ). _ _ init _ _ ( ) # todo : remove inizialisation of db init _ model ( self. engine ) # get blocks in segment and set start and end blocks self. end = end # init voters dictionary self. _ _ voters = { } | [
-0.6976504325866699,
-0.3034239113330841,
0.6284613609313965,
0.8040397763252258,
0.42041197419166565,
0.36142581701278687,
0.2988675534725189,
0.5320723056793213,
-0.681015133857727,
0.41043949127197266,
-0.6460332870483398,
-0.9323229789733887,
-0.659365177154541,
0.4479025900363922,
0... |
def binlist ( n, width = 0 ) : return list ( map ( int, list ( bin ( n ) [ 2 : ]. zfill ( width ) ) ) ) | [
-1.1901781558990479,
-0.19484031200408936,
0.4486885070800781,
0.8034180402755737,
0.048141416162252426,
0.3952246606349945,
0.2728893756866455,
-0.09030503034591675,
1.159496545791626,
-0.2437126189470291,
-1.3190183639526367,
-0.5471234321594238,
-0.10800494998693466,
1.0366178750991821,... |
def activities _ endpoint ( ) : activities = [ ] try : with db _ session ( ) as db : for activity in db. query ( models. activity ). all ( ) : activity = activity. serialize activity ['events'] = [ event. serialize for event in db. query ( models. event ). filter _ by ( activity _ id = activity ['id'] ). all ( ) ] acti... | [
-0.09967214614152908,
-0.677695631980896,
0.8485403656959534,
0.6755597591400146,
0.4847331643104553,
-0.910498321056366,
0.6666062474250793,
0.2742029130458832,
0.5754748582839966,
0.791908860206604,
0.6375765800476074,
0.5619531869888306,
-0.321634978055954,
-0.12734730541706085,
0.032... |
def _ _ contextmenucopypathtoclipboard ( self ) : if self. contextmenueditor : fn = self. contextmenueditor. getfilename ( ) if fn : cb = qapplication. clipboard ( ) cb. settext ( fn ) | [
-0.6368624567985535,
-0.7533161044120789,
0.5504177808761597,
0.4985840618610382,
-0.7072290778160095,
0.6716904044151306,
0.7315092086791992,
0.32716208696365356,
0.1692299097776413,
0.6094490885734558,
0.654895544052124,
-0.2463676929473877,
0.21893252432346344,
-0.43396884202957153,
-... |
def joint _ states _ callback ( self, states ) : try : index = states. name. index ( " joint _ 2 " ) self. _ position = states. position [ index ] self. _ velocity = states. velocity [ index ] except valueerror : rospy. logwarn ( " could not find'joint _ 2'in'joint _ states'" ) | [
0.26273784041404724,
-1.0943506956100464,
0.2577038109302521,
-0.11674293130636215,
0.13536474108695984,
-0.4556087553501129,
0.20420107245445251,
-0.18110737204551697,
0.44803109765052795,
-0.10990361869335175,
-0.4095437824726105,
-0.7642832398414612,
0.22402620315551758,
-0.294215887784... |
def plotinonefigure ( time, data, result, options ) : # plot the original data plotdata ( time = time, data = data, showdatapoint = \ options. showdatapoint, color = options. datacolor, label ='time series') # plot fitered results if needed if options. plotfiltereddata : start = result. filteredsteps [ 0 ] end = result... | [
0.27211716771125793,
0.630488932132721,
0.6870175004005432,
0.017624521628022194,
-0.2973802983760834,
0.7012004256248474,
0.3258609473705292,
-0.3623121678829193,
-0.19993214309215546,
-0.5619670748710632,
0.03881986811757088,
0.999578058719635,
-0.20797809958457947,
0.7502306699752808,
... |
def _ update _ listing _ client _ kwargs ( client _ kwargs, max _ results ) : client _ kwargs = client _ kwargs. copy ( ) if max _ results : client _ kwargs [ " num _ results " ] = max _ results return client _ kwargs | [
-0.7976934313774109,
0.047466475516557693,
0.21448907256126404,
-0.885066568851471,
-0.2575215995311737,
0.23610681295394897,
-0.4228615164756775,
0.31898489594459534,
0.16531971096992493,
0.10105232894420624,
-0.38946959376335144,
0.47253289818763733,
-0.3472384512424469,
0.12339428812265... |
def status _ delete ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('delete ', f'/ api / v1 / statuses / { id }') | [
-0.39118528366088867,
-0.5692286491394043,
0.008839313872158527,
0.7205917239189148,
0.009284126572310925,
-0.36856183409690857,
-0.7286666631698608,
0.21188975870609283,
1.3502076864242554,
-0.7140896320343018,
-0.7348102331161499,
0.5986270308494568,
-0.5515536665916443,
-0.0928832590579... |
def test _ single _ instance ( self ) - > none : # prefill table with 7 rows written by'master'self. _ insert _ rows ( " master ", 7 ) id _ gen = self. _ create _ id _ generator ( ) self. assertequal ( id _ gen. get _ positions ( ), { " master " : 7 } ) self. assertequal ( id _ gen. get _ current _ token _ for _ writer... | [
-0.6701186299324036,
0.7982227206230164,
0.709873616695404,
-0.4304799437522888,
0.49328115582466125,
0.006511879153549671,
0.7257596254348755,
0.5248544216156006,
0.19122138619422913,
-0.4024696946144104,
-0.2668401300907135,
-0.6739062070846558,
-0.14364928007125854,
0.5869340300559998,
... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : globalvmshutdownscheduleargs, opts : optional [ pulumi. resourceoptions ] = none ) :... | [
-0.38787195086479187,
0.40799862146377563,
0.577570915222168,
0.3671371340751648,
-0.0016569101717323065,
0.5217464566230774,
0.07660914957523346,
0.9524574875831604,
0.17113140225410461,
0.9173287153244019,
0.3282993733882904,
0.5291309952735901,
-0.14478476345539093,
-1.0423280000686646,... |
def generate _ cpp _ apidoc ( self ) : apidoc _ output = os. path. join ( self. apidoc _ dir, cpp _ dir ) # cleanup try : for name, path in breathe _ projects. items ( ) : shutil. rmtree ( path ) shutil. rmtree ( os. path. join ( apidoc _ output, name ) ) except oserror : # dir already removed pass with cd ( self. doc ... | [
0.4054100811481476,
-0.05490915849804878,
0.46045467257499695,
-0.3622232973575592,
-0.12479739636182785,
0.5559225678443909,
1.1339040994644165,
0.24906383454799652,
-0.3031558692455292,
0.043463364243507385,
0.20729242265224457,
-0.20029784739017487,
-0.5707157254219055,
0.45311379432678... |
def assumed _ role _ credentials ( self, role _ arn : optional [ str ] ) : if role _ arn is none : # fixme : make this cm reentrant by taking this branch if the given # role is already assumed yield else : sts = self. client ('sts') identity = sts. get _ caller _ identity ( ) # if we used the current identity's arn to ... | [
0.5354377627372742,
-0.7137157320976257,
0.7330296635627747,
-0.37706565856933594,
0.19995978474617004,
-0.6052255630493164,
-0.2336397022008896,
-0.8700439929962158,
1.2955924272537231,
-0.018604334443807602,
-0.14123238623142242,
0.44565773010253906,
0.2992057204246521,
-0.10611648112535... |
def _ update _ vec _ funcs ( self ) : self. _ get _ e2 = np. vectorize ( self. be _ cosmo. e2 ) self. _ get _ e2omega _ m = np. vectorize ( self. be _ cosmo. e2omega _ m ) self. _ eval _ da _ z1z2 _ core = np. vectorize ( lambda z1, z2 : ( self. dist. angular _ diameter _ z1 _ z2 ( self. be _ cosmo, z1, z2 ) * self. be... | [
-0.33260753750801086,
-0.6420565247535706,
0.43010666966438293,
0.013871299102902412,
0.4884030222892761,
-0.10299590975046158,
1.0839651823043823,
0.2159387618303299,
-0.24930191040039062,
0.28692084550857544,
-0.32810333371162415,
1.0213319063186646,
0.46624183654785156,
0.31180003285408... |
def align _ rewrite _ distance ( question, candidate ) : return align _ question _ distance ( rewritequestion ( question ), candidate ) | [
-0.12307006865739822,
-1.855596899986267,
0.20600904524326324,
0.7195723056793213,
-0.3894033432006836,
0.825487494468689,
0.4207870364189148,
0.651672899723053,
-0.24470004439353943,
0.45714178681373596,
1.0736294984817505,
0.3722144067287445,
-0.1516265571117401,
-0.45316970348358154,
... |
def configure _ logger ( debug, logfile = none ) : logger = logging. getlogger ( " aliplotlogger " ) if logger. hashandlers ( ) : return # turn on debug info only on request if debug : logger. setlevel ( logging. debug ) else : logger. setlevel ( logging. info ) sh = logging. streamhandler ( ) formatter = aliplotlogger... | [
-0.24382272362709045,
-0.3836480379104614,
0.7168854475021362,
-0.06913086771965027,
-0.23394089937210083,
0.08131562918424606,
-0.6477372646331787,
-0.12231586873531342,
-0.15232345461845398,
-1.0718932151794434,
0.27570870518684387,
-0.6121522188186646,
0.41435548663139343,
1.31820690631... |
def info ( offset, type, step, file ) : try : with open ( file,'rb') as stream : stream. seek ( offset ) if type = = " auto " : boot _ image = parse ( stream, step ) else : img _ type = {'67rt': bootimg2,'8m': bootimg2,'8qxp _ a0': bootimg3a,'8qm _ a0': bootimg3b,'8x': bootimg4 } boot _ image = img _ type [ type ]. par... | [
-0.39070987701416016,
-0.5981228947639465,
0.7324258685112,
0.7816129922866821,
-0.2908920347690582,
0.036866333335638046,
0.0519922599196434,
-0.41084375977516174,
-1.48992919921875,
-0.03018459677696228,
0.1021050289273262,
0.7820420861244202,
0.33917438983917236,
1.1650397777557373,
0... |
def divmod _ vectorize ( df ) : @ vectorize ( [ int32 ( int32 ) ] ) def _ fix _ time ( mtime ) : aux, cent = divmod ( mtime, 100 ) aux, seconds = divmod ( aux, 100 ) hours, minutes = divmod ( aux, 100 ) return 10 * ( cent + 100 * ( seconds + 60 * ( minutes + 60 * hours ) ) ) return df [ " date " ]. values. astype ( np.... | [
-0.5524755120277405,
0.8648974895477295,
0.8678790926933289,
-0.16025716066360474,
0.33575987815856934,
-0.570939302444458,
-0.09497392177581787,
-0.5082669258117676,
-0.09462975710630417,
0.5455111265182495,
0.2520390748977661,
0.7456083297729492,
0.8050878047943115,
0.5548824667930603,
... |
def check _ errors ( html ) : try : error _ msg = html. split ( " var httpauterrorarray = new array ( \ n " ) [ 1 ]. split ( ", " ) [ 0 ] except indexerror : # httpauterrorarray is not present ( login succeeded ) error _ msg = - 1 exc = exceptions. get ( error _ msg, none ) if exc is not none : # no errors detected rai... | [
-0.7735347747802734,
0.3815378248691559,
0.531471312046051,
0.6392032504081726,
0.5564722418785095,
-0.20552119612693787,
0.312642365694046,
0.16002686321735382,
0.35819509625434875,
-0.11445304751396179,
0.14174029231071472,
0.21143756806850433,
-0.44669806957244873,
1.0547044277191162,
... |
def _ get _ data _ info ( df, verbose = true ) : # following dictionary contains multiple " sections " that contain miscellaneous # mappings between different items of interest and their information, such as # values, counts and so on. data _ info = { } data _ info [ const. data _ key _ features ] = { } features = data... | [
-0.5635262131690979,
0.37977856397628784,
0.6685295701026917,
-0.8489267230033875,
0.057644348591566086,
-0.1854163110256195,
-0.26961106061935425,
0.3386388123035431,
-1.2004510164260864,
-0.4256040155887604,
-0.3483002781867981,
0.29995155334472656,
1.256046175956726,
0.6370278596878052,... |
def recv _ string ( self ) : # reading and unpacking length of the data that will follow data _ len = self. _ recvall ( calcsize ( len _ fmt ) ) data _ len = unpack ( len _ fmt, data _ len ) [ 0 ] # reading packed - data packed _ data = self. _ recvall ( data _ len ) # unpacking data data _ fmt = str _ fmt % data _ len... | [
0.637571394443512,
-0.09800397604703903,
0.7495921850204468,
-1.3345909118652344,
-0.6584055423736572,
-0.27935585379600525,
-0.45857474207878113,
-0.23931120336055756,
0.41205668449401855,
-0.6982417106628418,
0.20592159032821655,
0.6575821042060852,
-0.5020456314086914,
-1.26581072807312... |
def get _ ring _ tokens ( ) : tokens = [ ] logging. info ( " running nodetool ring, this will take a little bit of time " ) success, return _ code, _, stdout, stderr = run _ command ( " nodetool ", " ring " ) if not success : return false, [ ], stderr logging. debug ( " ring tokens found, creating ring token list... " ... | [
-0.525631308555603,
0.37402576208114624,
0.6130353212356567,
-0.24727697670459747,
0.6575913429260254,
-0.3591954708099365,
0.20836439728736877,
-0.6217345595359802,
-0.7893978357315063,
0.7580773234367371,
-0.9906851053237915,
0.0798620730638504,
-0.4166768193244934,
0.1880098134279251,
... |
def install _ dependencies ( dependencies ) : if platform. linux _ distribution ( ) [ 0 ] = = " arch " : pacman ( dependencies [ " pacman " ] ) aura ( dependencies [ " aura " ] ) else : apt ( dependencies [ " apt " ] ) pip ( dependencies [ " pip " ] ) | [
-0.7142573595046997,
-0.10087986290454865,
0.29119873046875,
-0.8504595756530762,
0.860823929309845,
0.4864616394042969,
-0.6723852753639221,
0.2222745716571808,
0.3166208565235138,
0.3673633337020874,
-0.6957759857177734,
-0.8079182505607605,
0.7391524910926819,
0.5918715596199036,
0.34... |
def normal _ pdf ( x, mean = 0, sd = 1 ) : return 1 / ( sd * np. sqrt ( 2 * np. pi ) ) \ * np. exp ( - 1 / 2 * ( ( x - mean ) / sd ) * * 2 ) | [
0.242783784866333,
-0.5112791061401367,
0.39569291472435,
0.49459290504455566,
-2.189887046813965,
0.060286037623882294,
-0.1278878003358841,
0.30895552039146423,
0.43519988656044006,
0.023170022293925285,
0.7494874000549316,
0.30593907833099365,
-0.4858126938343048,
-0.9199763536453247,
... |
def _ _ init _ _ ( self, d, h, c ) : self. d = d self. h = h self. c = c self. w2 = np. random. randn ( h, c ) self. b2 = np. zeros ( c ) # hidden layer self. w1 = np. random. randn ( d, h ) self. b1 = np. zeros ( h ) | [
0.26702600717544556,
0.40039774775505066,
0.6155855059623718,
0.11177747696638107,
0.5363245606422424,
1.3744759559631348,
0.24650710821151733,
-0.4883926808834076,
-0.42800793051719666,
-0.17993931472301483,
-0.890440821647644,
0.3986808657646179,
-0.13196365535259247,
1.2289389371871948,... |
def generate _ random _ response ( self, lemma, test = false ) : if'do'in lemma or'be'in lemma : if test : return ( {'do ','be'} ) else : return self. random _ be _ response ( ) elif'make'in lemma or'build'in lemma : if test : return ( {'make ','build'} ) else : return self. random _ make _ response ( ) else : if test ... | [
-0.7857761383056641,
0.13358095288276672,
0.6603922247886658,
0.02862468920648098,
-0.09592029452323914,
0.34503960609436035,
-0.2545967698097229,
0.11342507600784302,
0.4057874381542206,
-0.10885033011436462,
-0.19205069541931152,
-0.2718789577484131,
-0.9699349999427795,
-0.0870786756277... |
def test _ normalization _ without _ port ( self ) : eq _ ( join _ host _ strings ( * normalize ('user @ localhost ', omit _ port = true ) ),'user @ localhost') | [
0.7640742659568787,
0.26099568605422974,
0.313434898853302,
0.18235823512077332,
-0.42159315943717957,
1.3721343278884888,
0.7811217904090881,
0.2570582926273346,
0.10195167362689972,
-0.13341142237186432,
0.2419348806142807,
-0.40119653940200806,
-1.120097279548645,
-0.49093326926231384,
... |
def test _ compute _ constraints _ new _ constraint _ with _ more _ than _ one _ value _ for _ one _ parameter ( self ) : parameters = [ 3, 3, 3 ] constraints = { ( pair ( 0, 0 ), pair ( 1, 0 ) ), ( pair ( 0, 1 ), pair ( 1, 1 ) ), ( pair ( 1, 2 ), pair ( 2, 0 ) ) } solver = solver ( [ ], [ ] ) solver. data = parameters... | [
-0.9132819771766663,
0.22459837794303894,
0.6383885145187378,
0.6976843476295471,
0.5204020738601685,
-0.329704612493515,
0.16909277439117432,
-0.11210878938436508,
-0.12866249680519104,
0.6923161745071411,
-1.3456681966781616,
-0.6437800526618958,
-0.39613664150238037,
0.3050273358821869,... |
def container ( self, tag = none, location = none ) : if tag : if tag not in self. tagged _ containers : raise layoutexception ( " tagged container % s does not exist " % tag ) return self. tagged _ containers [ tag ] if location : for index in [ 0, 1 ] : if location [ index ] < 0 or location [ index ] > = self. dimens... | [
-0.37415480613708496,
-0.21858219802379608,
0.480671763420105,
-0.0878918468952179,
-0.5658392906188965,
-0.8474021553993225,
1.2525185346603394,
-0.4713327884674072,
-0.10550519824028015,
-1.0100568532943726,
0.33246833086013794,
0.02985086478292942,
-0.07454074919223785,
0.19010038673877... |
def isfile ( path, source = source _ any ) : if os. path. isabs ( path ) : return os. path. isfile ( path ) # not absolute, so process it. ensure _ paths ( ) if source & source _ profile : if os. path. isfile ( os. path. join ( profile _ path, path ) ) : return true if source & source _ pkg _ resources : if ( package a... | [
0.005465105175971985,
0.08174334466457367,
0.5481740236282349,
0.6492813229560852,
-0.2135484367609024,
0.4793975353240967,
0.2823828458786011,
0.2561326324939728,
0.6447399258613586,
-0.7510169744491577,
-0.01252108346670866,
-0.6311845183372498,
0.1463705152273178,
0.455567330121994,
-... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, openapplyidsforapproveapply ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.828799843788147,
-1.070556879043579,
0.8857622146606445,
-0.5542468428611755,
-0.5322122573852539,
0.5785841345787048,
-0.8917078971862793,
0.02769480086863041,
0.8337871432304382,
0.24734637141227722,
0.0027083675377070904,
0.6814418435096741,
-0.19450342655181885,
0.337503045797348,
... |
def get _ mass _ penalty ( traj, verbose = true ) : n _ parts = len ( traj ) ; penalty = 0 ; for p in range ( n _ parts ) : # get a part of the trajectory : # print'part % d'% p if verbose : print'fly - by % d'% ( int ( ( p + 1 ) / 2 ) ) # get info necessary for calculating the penalty : r0 = traj [ p ] [ 0 ] ; if ( p ... | [
-0.03053097613155842,
-0.16214530169963837,
0.8485530018806458,
-0.7018110156059265,
-0.29422467947006226,
-0.40971532464027405,
0.3453824520111084,
-0.21378874778747559,
-0.23127658665180206,
0.9536282420158386,
-0.14422102272510529,
-0.8682923316955566,
-0.6778308153152466,
0.16382825374... |
def quick _ sort _ inplace ( file, lower = none, upper = none ) : # set default values if lower is none : lower = 0 if upper is none : upper = len ( file ) - 1 if upper - lower > 0 : pivot _ value = file [ lower ] l, h = lower, upper # increment l and decrement h until file [ l ] is larger than the # pivot value and fi... | [
0.3826322853565216,
-0.05063050240278244,
0.7403438091278076,
-0.3178393244743347,
-0.31348955631256104,
0.22258266806602478,
0.09298428148031235,
0.29754942655563354,
-0.6890648603439331,
-0.7378941178321838,
-0.779843807220459,
-0.4114145040512085,
-0.8509882092475891,
1.1987193822860718... |
def _ _ init _ _ ( self, database _ pool ) : self. _ db _ pool = database _ pool | [
0.08741025626659393,
0.17380069196224213,
0.016129303723573685,
-0.27001023292541504,
0.2275799959897995,
0.18207278847694397,
0.5764644742012024,
0.5013133883476257,
0.3478544354438782,
0.215256467461586,
-1.0571575164794922,
0.7179172039031982,
-0.4352675676345825,
0.5269581079483032,
... |
def choose _ random ( self ) : return random. choice ( self. items ) | [
-0.7002410888671875,
-0.6742886304855347,
0.1999739408493042,
-0.45224785804748535,
0.19871658086776733,
0.621894359588623,
-0.19083020091056824,
-0.03928808122873306,
0.26291075348854065,
-0.5667929649353027,
0.058362022042274475,
-0.058683186769485474,
-0.5057430863380432,
-0.48255011439... |
def lexical _ step ( self, input, hidden, projected _ keys, encoder _ outputs ) : hidden _ states = [ ] # ( 1 ) convert input to an embedding. embedded = self. embeds [ input. item ( ) ]. view ( 1, 1, - 1 ) embedded = self. dropout ( embedded ) # ( 3 ) gru - 1 ops # ( 3. 1 ) concatenate the embedding rep of the word wi... | [
0.4781784415245056,
-0.011661327444016933,
0.78385329246521,
0.17286355793476105,
-0.6820329427719116,
-0.4999336004257202,
0.07648323476314545,
-0.15344204008579254,
-0.43421509861946106,
0.4976120591163635,
-0.47688162326812744,
-0.22299344837665558,
-0.02294076606631279,
0.4270612597465... |
def check _ tensor _ name ( t, name ) : try : return name in t. name except attributeerror : return false | [
0.015811990946531296,
-0.26589450240135193,
0.19935481250286102,
-0.20721587538719177,
-1.0904306173324585,
0.6521084308624268,
-0.3275964558124542,
-0.7894504070281982,
-0.6106676459312439,
1.3445851802825928,
-0.24714717268943787,
-0.21862901747226715,
0.7484767436981201,
-0.517730772495... |
def quit ( self ) : # check if there is an unfinished download answer = input ( " > are you sure you want to exit? [ y / n ] " ) # if yes quit and delete all unfinished downloads if answer = = " y " or answer = = " yes " or answer = = " y " or answer = = " yes " : self. driver. quit ( ) # stop all downloads self. stop ... | [
-0.33093130588531494,
-0.6554479002952576,
0.6661447286605835,
0.7132566571235657,
-0.5100610852241516,
0.6216137409210205,
0.1974305957555771,
-0.09404240548610687,
-0.1750970333814621,
-0.08365549147129059,
-0.07093222439289093,
-0.8343228101730347,
-0.812326192855835,
0.6624881625175476... |
def print ( text : str ) : daemon _ request. print ( { " text " : text } ) | [
-0.31664666533470154,
0.10852546244859695,
0.08297441899776459,
-0.4932931065559387,
-0.3665775656700134,
-0.10534463822841644,
-1.4506248235702515,
-0.8885531425476074,
-0.16400033235549927,
-0.5384605526924133,
0.3953665792942047,
1.4364678859710693,
-1.1681653261184692,
0.12682232260704... |
def initialize ( region _ path = region _ path ) : if os. path. isdir ( region _ path ) : logger. warning ('{ } exists - - - skipping initialization '. format ( region _ path ) ) return region _ path return update ( os. path. split ( region _ path ) [ 0 ] ) | [
0.44584041833877563,
-0.7653089165687561,
0.5095930099487305,
-0.37028202414512634,
-0.06563737988471985,
0.08004305511713028,
0.5350757837295532,
0.06005671247839928,
0.511255145072937,
-0.1250293254852295,
0.45369571447372437,
-0.25581324100494385,
-0.503715991973877,
-0.0770669803023338... |
def connect ( self, * connectors ) : for connector in connectors : if not isinstance ( connector, connector ) : raise exception ( " error : input given is not a connector " ) else : if len ( connector. connections ['output'] )! = 0 : raise exception ( " error : the connector is already an output of some other object " ... | [
-1.715369701385498,
-0.5684061050415039,
0.48425811529159546,
1.3311936855316162,
-0.16771619021892548,
-0.1810287982225418,
0.705936074256897,
-0.585295557975769,
1.1941365003585815,
-0.6303800940513611,
-0.2248363494873047,
-1.4456524848937988,
-0.21383878588676453,
0.4060281217098236,
... |
def since _ vaccines _ uk ( df ) : return df [ df. index > ='2020 - 12 - 08'] | [
0.13677221536636353,
0.0760008841753006,
0.6041786074638367,
0.6321786046028137,
-0.5653781294822693,
0.2141355276107788,
-0.6053398251533508,
-0.6865664720535278,
0.06421394646167755,
-0.08924601972103119,
0.33102208375930786,
1.3622963428497314,
0.6070007085800171,
-1.5132670402526855,
... |
def swap ( arr, i, j ) : arr [ i ], arr [ j ] = arr [ j ], arr [ i ] | [
-0.517600953578949,
-0.8773245811462402,
0.10592256486415863,
-0.2088213562965393,
-0.698258638381958,
0.488696426153183,
-0.35269895195961,
0.494894802570343,
-0.14139416813850403,
0.48459792137145996,
-0.114664725959301,
0.6618478298187256,
-0.015423901379108429,
-0.20382840931415558,
... |
def area _ rating ( area ) : areas = list ( ) missing _ areas = list ( ) for a in range ( 0, area - 1 ) : areas. append ( a ) for a in range ( 0, 6 - area ) : missing _ areas. append ( a ) return {'areas': areas,'missing _ areas': missing _ areas, } | [
-0.5025190114974976,
0.08163420110940933,
0.5294927954673767,
-1.3243134021759033,
-0.6040218472480774,
-0.3561806380748749,
0.24439750611782074,
0.6536910533905029,
0.3281044661998749,
1.0190280675888062,
-0.4474211037158966,
-0.6167793869972229,
0.7745349407196045,
0.9814563989639282,
... |
def check _ cookie ( self ) : html = htmlcontent ( ) if os. environ. has _ key ('http _ cookie') and os. environ. has _ key ('http _ referer') : c = simplecookie ( os. environ ['http _ cookie'] ) if c. has _ key ('session') and c ['session']. value! = " " : if c. has _ key ('company') and c ['company']. value! = " " : ... | [
-0.9198628067970276,
-0.5193663835525513,
1.1174328327178955,
0.889632523059845,
-0.7795084714889526,
0.3045579195022583,
0.12368475645780563,
-0.6072795391082764,
0.10110112279653549,
0.580492377281189,
1.3328449726104736,
0.2836953103542328,
-0.3426577150821686,
0.18119773268699646,
0.... |
def topup ( blip _ up _ file, blip _ down _ file, blip _ up _ phase _ enc _ dir, blip _ down _ phase _ enc _ dir, outdir, fsl _ sh, apply _ to = none, unwarp _ direction = none, dwell _ time = none, verbose = 0 ) : # call topup fieldmap _ hz _ file, _, _ = _ topup ( b0s = [ blip _ up _ file, blip _ down _ file ], phase... | [
-0.5223779082298279,
-0.4735987186431885,
0.9076120853424072,
-0.5221459865570068,
-0.6640012860298157,
-0.3896734416484833,
0.8734465837478638,
0.35723936557769775,
0.10409554839134216,
0.11571033298969269,
0.060433026403188705,
-0.11435021460056305,
0.29170167446136475,
0.045766539871692... |
def _ _ init _ _ ( self, user _ inteface ) : self. clock = pygame. time. clock ( ) self. running = true self. current _ loop = startloop ( ) self. user _ inteface = user _ inteface | [
0.10747963935136795,
0.2240532785654068,
0.45703426003456116,
0.19744084775447845,
0.022592108696699142,
0.6347196102142334,
0.8429070115089417,
-0.4025532305240631,
-0.20321471989154816,
0.8311744928359985,
-0.9188298583030701,
0.41510164737701416,
-0.869694173336029,
1.1445101499557495,
... |
def attack _ url ( self, url, payloads, query _ string ) : if self. options. nohead : for payload in payloads : self. attack _ url _ payload ( url, payload, query _ string ) else : hc = curl ( ) try : urls = hc. do _ head _ check ( [ url ] ) except : print " target url : ( " + url + " ) is malformed " + " [ discarded ]... | [
-1.2595446109771729,
-0.61464524269104,
0.843896746635437,
0.16437837481498718,
0.4221380352973938,
0.07000770419836044,
0.0025315345264971256,
-0.32948464155197144,
-0.2181866616010666,
-0.17915119230747223,
0.51174396276474,
-0.25862693786621094,
-0.7511314153671265,
-0.41960299015045166... |
def command ( self, regexp ) : def decorator ( fn ) : self. add _ command ( regexp, fn ) return fn return decorator | [
-0.8094713091850281,
-0.2501126825809479,
0.4446927607059479,
0.35642045736312866,
0.8196054100990295,
-0.22260460257530212,
0.36625218391418457,
0.8099050521850586,
1.0004298686981201,
-1.052785873413086,
0.1849612444639206,
0.17223478853702545,
0.15739265084266663,
-0.06610731780529022,
... |
def _ base _ dist ( self, * args, * * kwargs ) : return tfd. transformeddistribution ( distribution = tfd. uniform ( low = 0. 0, high = 1. 0 ), bijector = tfp. bijectors. invert ( tfp. bijectors. weibull ( * args, * * kwargs ) ), name = " weibull ", ) | [
0.3791976869106293,
-0.7745029330253601,
0.28845667839050293,
-0.5600225925445557,
0.7251552939414978,
0.5014775991439819,
0.48031988739967346,
0.6905394196510315,
-0.42475560307502747,
-0.19118614494800568,
-0.42366573214530945,
0.35114383697509766,
-0.8605768084526062,
-0.055154506117105... |
def create _ fake _ flash ( self, filename, payload ) : options = self. options filename = options. flash payload = options. script flash _ xss _ injections = flashinjections ( ) flash _ injections = flash _ xss _ injections. flash _ xss ( options. flash, options. script ) return flash _ injections | [
0.6280881762504578,
0.38252493739128113,
0.3669523298740387,
0.1760057955980301,
0.29870450496673584,
-0.4774814546108246,
-0.5448060035705566,
-0.6413589119911194,
-0.13922101259231567,
-0.38060036301612854,
-1.0111362934112549,
0.1632896512746811,
-0.3082443177700043,
0.5225062966346741,... |
def average ( scores ) : total = 0 if len ( scores ) = = 0 : # if no scores avoid div by zero! return 0 for score in scores : total = total + score return ( float ( total ) / float ( len ( scores ) ) ) | [
-1.092188835144043,
0.1110764667391777,
0.40011361241340637,
0.12957963347434998,
0.6948328614234924,
0.0036242289934307337,
1.35468327999115,
-0.04456732049584389,
0.33042338490486145,
1.0522611141204834,
0.04914307966828346,
-0.48171675205230713,
-0.8568403720855713,
0.6225416660308838,
... |
def vstack ( self, df : " dataframe ", in _ place : bool = false ) - > optional [ " dataframe " ] : if in _ place : self. _ df. vstack _ mut ( df. _ df ) else : return wrap _ df ( self. _ df. vstack ( df. _ df ) ) | [
-0.12124409526586533,
1.144199013710022,
0.6033191680908203,
0.7141883373260498,
-0.1896655112504959,
-0.8796204328536987,
0.2967921495437622,
-0.5014218688011169,
0.5301944017410278,
0.6418915390968323,
0.2049238085746765,
1.2353065013885498,
0.14498476684093475,
-0.40796375274658203,
0... |
def update _ metrics ( self ) : logs. log _ info ( " updating metric quantities... " ) # update tri _ ccents, tri _ cents as well! vor _ cents = [ ] # centroid of voronoi polygons vor _ sa = [ ] # surface area of voronoi polygons vor _ edge _ mids = [ ] # mids of tri cell edges vor _ edge _ len = [ ] # length of vor _ ... | [
1.1456693410873413,
-0.6909909248352051,
0.3914569318294525,
-0.31528788805007935,
-0.1931122988462448,
-0.27137044072151184,
0.2640726864337921,
0.05790242180228233,
0.19916261732578278,
0.5680453181266785,
0.5556282997131348,
-0.08943863958120346,
0.25437799096107483,
0.12074729055166245... |
def v _ from _ state ( self, z _ sup ) : # get velocities as differences between positions v = z _ sup [ :, 1 :, :, 2 : ] - z _ sup [ :, : - 1, :, 2 : ] # keep scales and positions from t z _ sup _ full = torch. cat ( [ z _ sup [ :, 1 : ], v ], - 1 ) # add zeros to keep time index consistent zeros = torch. zeros ( z _ ... | [
0.04504071921110153,
-0.45106661319732666,
0.4995580017566681,
-0.007641411852091551,
-0.3499470353126526,
-0.0399065800011158,
0.23816877603530884,
0.3727682828903198,
0.7088350653648376,
0.8508543372154236,
-1.2880773544311523,
0.10668446123600006,
0.8875777125358582,
-0.6515860557556152... |
def test _ picture _ and _ icon _ on _ see _ discovery ( self ) : tracker = device _ tracker. devicetracker ( self. hass, timedelta ( seconds = 60 ), false, [ ] ) tracker. see ( dev _ id = 11, picture ='pic _ url ', icon ='mdi : icon') self. hass. block _ till _ done ( ) config = device _ tracker. load _ config ( self.... | [
-0.22131334245204926,
0.5672653317451477,
0.3515128493309021,
-0.15809011459350586,
0.07057933509349823,
0.13795149326324463,
0.48331379890441895,
-0.002314439043402672,
0.2646465599536896,
0.16671901941299438,
-0.9516852498054504,
-0.4748378396034241,
1.2349350452423096,
0.577689290046691... |
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att... | [
-0.47546637058258057,
0.6122204065322876,
1.0470012426376343,
-0.8025922775268555,
-1.218719720840454,
-0.9229741096496582,
0.9132431149482727,
-0.6585477590560913,
0.5399459004402161,
0.21363426744937897,
0.2026609182357788,
-0.9884185791015625,
0.3417031466960907,
0.24821369349956512,
... |
def compare ( self, item, other ) : # pre : #'item'is the left operand of the comparison,'other'is the right operand. # post : # returns 0 if'item'and'other'are equal, - 1 if'item'is less than'other'and 1 if'item'is greater than'other '. return - self. comparer. compare ( item, other ) | [
-0.8083223104476929,
-0.2903759181499481,
0.7270843386650085,
0.4760315418243408,
-0.21708303689956665,
0.5284181833267212,
-0.6219136118888855,
-0.7071664333343506,
-0.46186691522598267,
0.16067947447299957,
-0.6009072065353394,
-0.48517999053001404,
-0.712420642375946,
0.6179738640785217... |
async def delete ( self, *, stop = false ) : # if the server is running, stop it or raise an exception if self. is _ running : if stop : await self. stop ( wait = true ) else : raise server. inuseexception ( self ) # then, just delete the directory with contextlib. suppress ( filenotfounderror ) : rmtree ( self. path )... | [
-1.035966157913208,
0.04125465825200081,
0.5520618557929993,
0.08619424700737,
0.1544409990310669,
0.07508467882871628,
0.21114514768123627,
0.9419763684272766,
-0.018461519852280617,
-0.7414900064468384,
0.0019357126438990235,
0.3534272015094757,
-0.8796949982643127,
0.6839575171470642,
... |
def _ translate ( self, text, from _ lang = " zh ", to _ lang = " en " ) : request = translategeneralrequest ( ) request. set _ accept _ format ('json') request. set _ formattype ( " text " ) request. set _ sourcelanguage ( from _ lang ) request. set _ targetlanguage ( to _ lang ) request. set _ sourcetext ( text ) res... | [
-0.630285382270813,
-0.4226885735988617,
0.8384915590286255,
-0.3697429597377777,
-1.0656145811080933,
-0.45218759775161743,
-0.9294736981391907,
-0.3188000023365021,
-0.26829829812049866,
0.1936512440443039,
-0.8073326349258423,
0.3474147617816925,
-0.4857276976108551,
-0.5415408611297607... |
def test _ _ parser _ _ lexer _ trim _ post _ subdivide ( caplog ) : matcher = [ regexlexer ( " function _ script _ terminator ", r " ; \ s + (?! \ * ) \ / (?! \ * ) | \ s + (?! \ * ) \ / (?! \ * ) ", codesegment, segment _ kwargs = { " type " : " function _ script _ terminator " }, subdivider = stringlexer ( " semicol... | [
1.2855597734451294,
-0.28215470910072327,
0.6699899435043335,
0.0005162613233551383,
-0.5888596177101135,
0.0672745481133461,
-0.7219250202178955,
0.6308642625808716,
-0.224670872092247,
-0.8370883464813232,
-0.5896884799003601,
-1.18524169921875,
0.29146233201026917,
0.06775251775979996,
... |
def writetofile ( self ) : if self. fitted : with open ( os. path. join ( self. path, self. outfile ),'w') as f : self. _ print _ fit _ info ( f. write ) self. _ print _ outputs ( f. write ) return | [
0.49465039372444153,
-1.1941571235656738,
0.5544666051864624,
0.17333024740219116,
0.9474970698356628,
0.6469680666923523,
1.481597900390625,
0.04895251989364624,
-0.8008596301078796,
-0.5976687669754028,
0.24105492234230042,
0.4975316524505615,
0.2406018227338791,
0.39742690324783325,
-... |
def cython _ cpp _ name ( self, t ) : if t not in self. _ cython _ cpp _ name : self. _ cython _ cpp _ name [ t ] ='{ 0 }. { 1 } '. format ( self. cpp _ typesystem, t ) return self. _ cython _ cpp _ name [ t ] | [
0.28294244408607483,
-0.875423789024353,
0.6334561705589294,
-0.9788796305656433,
-0.050837211310863495,
0.5717992186546326,
0.4541258215904236,
-1.4270622730255127,
-0.06151944026350975,
1.549805998802185,
-0.6239565014839172,
0.02225499227643013,
0.2539692521095276,
-0.10925683379173279,... |
def collections ( version ) : # todo : abfrage an daten managment system uber welche collections wir uberhaupt verfugen if ( version = = " v1 " ) : data = { " collections " : [ { " stac _ version " : " 0. 9. 0 ", # todo : welche stack version verwenden wir? " id " : " mod09q1 ", # todo : gibt es vorgeschriebene ids ode... | [
-0.399506539106369,
-0.6448878645896912,
0.8284695744514465,
-0.5819000601768494,
-0.3105930685997009,
0.009574512019753456,
-0.03552300110459328,
-0.7176701426506042,
-0.39201781153678894,
0.6191502213478088,
-0.7355334162712097,
-0.02793288417160511,
0.039324916899204254,
0.0886477977037... |
def is _ grayscale ( im : np. ndarray, threshold : int = 5 ) - > bool : b = im [ :, :, 0 ] g = im [ :, :, 1 ] mean = np. mean ( np. abs ( g - b ) ) return mean < threshold | [
-0.4098539352416992,
0.5058420896530151,
0.6762192845344543,
0.7023432850837708,
-0.4032142460346222,
0.09363549947738647,
-0.5568315982818604,
-0.889339029788971,
0.16118815541267395,
1.2972325086593628,
0.3106338381767273,
0.6996102929115295,
-0.18102218210697174,
0.11020490527153015,
... |
def load _ data ( city, month, day ) : df = pd. read _ csv ( city _ data [ city ] ) df ['start time'] = pd. to _ datetime ( df ['start time'] ) df ['month'] = df ['start time']. dt. month df ['day _ of _ week'] = df ['start time']. dt. day _ name ( ) df ['hour'] = df ['start time']. dt. hour if month! ='all': month = m... | [
-0.2638799548149109,
-0.0038032815791666508,
0.920293927192688,
-0.5486558675765991,
-1.0391309261322021,
0.37153318524360657,
-1.2253812551498413,
0.43640485405921936,
-0.20577283203601837,
-0.14332903921604156,
0.5484436750411987,
0.3244068920612335,
0.008419403806328773,
-0.289373129606... |
def get _ upstreammsg _ table ( ) : return table ('upstreammsg ', meta, autoload = true, autoload _ with = engine ) | [
0.0877341479063034,
0.633416473865509,
0.5192756056785583,
-0.5608420372009277,
-0.6411656737327576,
0.03754843771457672,
0.6882879734039307,
0.011585230007767677,
-1.1485528945922852,
0.4270918071269989,
0.3019491136074066,
0.8952680230140686,
0.0059662810526788235,
0.3925526440143585,
... |
def add _ data _ to _ list ( product _ object, list _ of _ product _ objects ) : # row = [ product, price ] list _ of _ product _ objects. append ( product _ object ) # add the new row to the list / table return list _ of _ product _ objects, " product has been added! " | [
-0.7843594551086426,
-0.5614468455314636,
0.7151461839675903,
1.3022781610488892,
0.7869505286216736,
0.4130326807498932,
-0.8302786350250244,
0.1441742479801178,
0.5448022484779358,
0.4528970718383789,
-0.28118935227394104,
0.0022589422296732664,
0.8874008655548096,
0.6036048531532288,
... |
def retire _ product ( self, product _ id ) : action = " retire product % s " % product _ id # paypal api does not support deletion of products self. log. info ( action, " not supported by api " ) return true | [
-0.9760195016860962,
-0.19262774288654327,
0.5624310374259949,
0.09198236465454102,
1.4902294874191284,
0.818844199180603,
-0.41600632667541504,
0.0794910341501236,
1.021342396736145,
0.5768340229988098,
-0.34911656379699707,
-0.23849356174468994,
-1.3636014461517334,
-0.08438416570425034,... |
def availability _ zone ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " availability _ zone " ) | [
0.512570858001709,
-0.8294206857681274,
0.3298386335372925,
0.27977830171585083,
0.2829151153564453,
1.5304466485977173,
0.38693374395370483,
1.0887852907180786,
1.310817003250122,
0.046378251165151596,
0.45367544889450073,
0.6505194306373596,
0.29886090755462646,
-1.040393352508545,
-0.... |
def _ set _ diag ( laplacian, value, norm _ laplacian ) : n _ nodes = laplacian. shape [ 0 ] # we need all entries in the diagonal to values if not sparse. isspmatrix ( laplacian ) : if norm _ laplacian : laplacian. flat [ : : n _ nodes + 1 ] = value else : laplacian = laplacian. tocoo ( ) if norm _ laplacian : diag _ ... | [
0.1772080361843109,
0.15396247804164886,
0.562057375907898,
-0.9308116436004639,
-0.6528735756874084,
-0.19913747906684875,
0.2815345525741577,
0.6456358432769775,
0.3333916962146759,
-0.713860273361206,
1.0069632530212402,
0.7013366222381592,
0.5221286416053772,
-0.07038494944572449,
0.... |
def to _ named _ tuple ( self ) : dic = self. to _ dict ( ) return namedtuple ( self. _ _ class _ _. _ _ name _ _, dic. keys ( ) ) ( * dic. values ( ) ) | [
-1.0476552248001099,
0.16455106437206268,
0.3691907525062561,
-1.016360878944397,
-0.6068516969680786,
-0.40307489037513733,
-0.8225758075714111,
-0.8700465559959412,
-0.15693777799606323,
0.4929308295249939,
-1.0421687364578247,
-0.34900549054145813,
0.8362675309181213,
-0.083486586809158... |
def get _ size ( self ) : return self. _ size | [
-0.3277677297592163,
0.45653900504112244,
0.26834550499916077,
-0.36424776911735535,
0.18138884007930756,
0.3898279070854187,
0.8922441005706787,
-0.1340840756893158,
-0.03189900517463684,
-1.6781842708587646,
-0.31117600202560425,
0.17131632566452026,
-0.5190137624740601,
-0.3094401359558... |
def set _ datasets _ deleted ( target, value, oldvalue, initiator ) : if not value and oldvalue : datasets = datasets. query. filter _ by ( session = target. uuid, deleted = false ). all ( ) for dataset in datasets : dataset. deleted = true db. session. commit ( ) | [
-0.44573336839675903,
0.08818770200014114,
0.2718173861503601,
-0.06545037031173706,
0.3373129963874817,
0.2785564363002777,
-0.5628915429115295,
0.868842601776123,
0.8180471658706665,
-0.2015356719493866,
-0.1892039179801941,
1.148231029510498,
0.43328553438186646,
0.03871646523475647,
... |
def getoutputinpng ( time, date, modelid ) : _ modeloutputpath = os. path. join ( _ pathimg2, modelid ) if not os. path. exists ( _ modeloutputpath ) : os. makedirs ( _ modeloutputpath ) year = date [ : 4 ] month = date [ 4 : 6 ] day = date [ - 2 : ] file = os. path. join ( _ meteo _ only,'dataout / posprocess / meteo ... | [
-0.04828672111034393,
-0.4818715751171112,
0.906488299369812,
-0.1834293156862259,
-0.36745309829711914,
0.4391452372074127,
1.0248630046844482,
-0.30037790536880493,
-0.8477948904037476,
0.2178305983543396,
-0.838842511177063,
-0.33168932795524597,
0.7794607281684875,
0.841178297996521,
... |
def to _ dict ( self ) : res = dict ( ) for tf, log in self. log. items ( ) : res [ tf ] = log. to _ dict ( ) return res | [
-0.5597155094146729,
-0.6999221444129944,
0.2711367607116699,
-0.9522840976715088,
-0.5118532180786133,
-0.40524885058403015,
0.17210283875465393,
-0.18470577895641327,
-0.7163280844688416,
0.1766100972890854,
-1.2043707370758057,
-0.16588428616523743,
0.07655522227287292,
0.28627607226371... |
def mkdir ( self, path ) : assert isinstance ( path, unicode ), path def _ init = str ( self. ftp2fs ( unicode ('/') ) ) + os. sep +'_ _ init _ _. py'os. mkdir ( path ) shutil. copy ( def _ init, path ) | [
-0.6434318423271179,
-0.20875480771064758,
0.5850401520729065,
-0.11458597332239151,
-0.8260822296142578,
0.6112412214279175,
0.8791024088859558,
-0.6805742979049683,
0.06996401399374008,
-1.0896046161651611,
-0.47876113653182983,
0.18057557940483093,
0.5781699419021606,
0.1040338277816772... |
def subplot ( size, location ) : plt. subplot ( str ( size [ 0 ] ) + str ( size [ 1 ] ) + str ( location ) ) | [
1.3550437688827515,
-0.37145084142684937,
0.3222758173942566,
-1.5670490264892578,
-1.0071710348129272,
0.668641209602356,
-0.5021204948425293,
0.5301415920257568,
0.11983425170183182,
0.4246663451194763,
-0.286989688873291,
1.2311772108078003,
-0.19720090925693512,
-1.9226442575454712,
... |
def _ _ init _ _ ( _ _ self _ _, *, uri : optional [ str ] = none ) : if uri is not none : pulumi. set ( _ _ self _ _, " uri ", uri ) | [
0.3178570866584778,
0.6573007702827454,
0.7598820924758911,
0.7110175490379333,
0.4520708918571472,
0.03494363650679588,
-0.45344141125679016,
0.8943063616752625,
0.6489710211753845,
-0.4966394901275635,
-0.17229528725147247,
0.04575672000646591,
-0.030841676518321037,
-0.45500418543815613... |
def handle _ my _ name ( message, consumer ) : group _ name ='' group _ names = [ ] user _ name = message ws _ message = none channel _ messages = [ ] try : user = models. user. objects. get ( pk = user _ name ) except models. user. doesnotexist : print ( handle _ my _ name. _ _ name _ _ + " : user does not exist, user... | [
-0.1918880045413971,
-0.28110626339912415,
0.764439582824707,
-0.5808772444725037,
-0.20845355093479156,
-0.7177018523216248,
0.5251665711402893,
-0.515055239200592,
-0.6479887366294861,
1.203537106513977,
-0.8565091490745544,
0.07346079498529434,
-0.15039712190628052,
0.5491138100624084,
... |
def make _ response ( self, response _ data = none, response _ code = 200, failure _ reason = none ) : api _ response = response _ data headers = { } headers ['allow'] ='get, post, put, delete, options'# headers ['access - control - allow - origin'] ='*'headers ['access - control - max - age'] = str ( 1728000 ) headers... | [
-0.3068007528781891,
-0.977179765701294,
0.6019513010978699,
-0.19040223956108093,
-0.055729206651449203,
-0.3639748990535736,
-0.29053160548210144,
0.27913928031921387,
0.40791016817092896,
0.11228147149085999,
-0.4453659951686859,
-0.10238465666770935,
-0.26951128244400024,
-0.7577602267... |
def alphcuns ( s ) : # print ('s = ', s ) return true if alphc ( s ) and not''. join ( s ) in stop else false | [
-0.13524726033210754,
-0.7281963229179382,
0.4561533033847809,
-0.47899749875068665,
-1.1887415647506714,
0.7137192487716675,
0.23986299335956573,
0.052338019013404846,
-0.436279296875,
0.46186521649360657,
-0.1646478772163391,
0.02992171235382557,
-0.015749463811516762,
-0.341517180204391... |
def children ( self ) - > iterable [ tablerowentity ] : yield from self. rows | [
0.5230222344398499,
-0.3309306502342224,
0.4563799798488617,
0.7889427542686462,
-0.3708176612854004,
0.33449843525886536,
-0.27592650055885315,
-0.06583687663078308,
-0.09651550650596619,
-0.9135178923606873,
0.1079958975315094,
-0.15892769396305084,
0.6310741305351257,
0.9590229392051697... |
def send _ referral _ notification _ email ( service, patient, from _ app _ user ) : message = message ( " new referral from " + from _ app _ user. full _ name + " at " + from _ app _ user. service. name ) message. recipients = [ e. email for e in service. referral _ emails ] if message. recipients : message. html = re... | [
1.1944539546966553,
0.7268828749656677,
0.49479302763938904,
0.17671069502830505,
-0.5165371894836426,
0.09914530813694,
-0.5399449467658997,
-0.31066083908081055,
-0.46058347821235657,
0.4044700860977173,
0.5511849522590637,
1.6989775896072388,
0.27546194195747375,
0.004583383444696665,
... |
def translate2human ( self, morse ) : if morse : morse _ list = map ( lambda m : m. split ('' ), morse. split ('' ) ) res = [ ] for word in morse _ list : aux = [ ] for w in word : if w : r, ok = self. _ _ return _ letter ( w ) if not ok : return r, 501 aux. append ( r ) res. append (''. join ( aux ) ) return''. join (... | [
-0.8948496580123901,
-0.2780602276325226,
0.7150437831878662,
0.2966444790363312,
-0.4704532027244568,
-0.42472848296165466,
0.6221305727958679,
0.3088492453098297,
0.530876874923706,
0.8969866037368774,
-1.3061456680297852,
0.6288539171218872,
-0.3910641074180603,
0.5494003891944885,
-0... |
def gcd ( a : int, b : int ) - > int : while b : a, b = b, a % b return a | [
0.4338694214820862,
0.5243278741836548,
0.4917786419391632,
-0.5934557318687439,
-0.09843805432319641,
0.48490384221076965,
0.26178762316703796,
-0.6439522504806519,
-0.324160635471344,
-0.27705326676368713,
1.2474026679992676,
0.9509676098823547,
-0.8221167922019958,
-0.30253058671951294,... |
def dense _ to _ one _ hot ( labels _ dense, num _ classes ) : num _ labels = labels _ dense. shape [ 0 ] index _ offset = np. arange ( num _ labels ) * num _ classes labels _ one _ hot = np. zeros ( ( num _ labels, num _ classes ) ) labels _ one _ hot. flat [ index _ offset + labels _ dense. ravel ( ) ] = 1 if debug =... | [
-1.7605533599853516,
-1.0223690271377563,
0.3991771340370178,
-0.6469905376434326,
1.1287086009979248,
0.18195641040802002,
0.4201519787311554,
0.17311817407608032,
0.9751027226448059,
0.14692345261573792,
0.7176321148872375,
0.5557224750518799,
0.13845233619213104,
-0.5433647036552429,
... |
def test _ exp _ vectorization ( self ) : point = self. beta. random _ point ( ) tangent _ vec = gs. array ( [ 1., 2. ] ) n _ tangent _ vecs = 10 t = gs. linspace ( 0., 1., n _ tangent _ vecs ) tangent _ vecs = gs. einsum ('i,... k - >... ik ', t, tangent _ vec ) end _ points = self. metric. exp ( tangent _ vec = tange... | [
0.5272522568702698,
0.24790234863758087,
0.5699621438980103,
0.11125379055738449,
0.800296425819397,
0.17900656163692474,
0.41227906942367554,
-0.18805906176567078,
-0.4946839511394501,
0.43636298179626465,
-0.5450196266174316,
-0.7378106713294983,
-0.4118771255016327,
-0.00588411279022693... |
def test _ has _ variant ( self ) - > none : # create testing docs doc1 = self. nlp ( " that's two now! " ) doc2 = self. nlp ( " that's 2 now! " ) doc3 = self. nlp ( " that's three now! " ) # " two " and " 2 " are variants m1 = match ( " doc1 ", " doc2 ", doc1 [ : ], doc2 [ : ] ) self. asserttrue ( self. px. has _ vari... | [
-0.12838220596313477,
0.36382386088371277,
0.5646147727966309,
-0.15255120396614075,
-0.18221136927604675,
0.9364565014839172,
0.3113669157028198,
-0.023962806910276413,
-0.0223598200827837,
-0.4872362017631531,
-0.5224456191062927,
-0.6655703186988831,
-0.9128521680831909,
-0.228661358356... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.