text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def extract _ drinks ( drink _ list ) : drinks = [ ] for drink in drink _ list. drinks : drinks. append ( { " iddrink " : drink. drink _ id, " strdrink " : drink. name, " strdrinkthumb " : drink. image _ url } ) ; return drinks | [
-1.1017192602157593,
-0.5250415802001953,
0.18305344879627228,
-0.33536389470100403,
0.0941644161939621,
-0.47053220868110657,
-0.9317246675491333,
0.6049855351448059,
0.2336016446352005,
0.5505521297454834,
-1.4799349308013916,
-0.6842100620269775,
-0.2570265531539917,
1.192212462425232,
... |
def test _ captureserror ( self ) : result = reporter. testresult ( ) suite = runner. loggedsuite ( [ breakingsuite ( ) ] ) suite. run ( result ) self. assertequal ( len ( result. errors ), 1 ) self. assertequal ( result. errors [ 0 ] [ 0 ]. id ( ), runner. not _ in _ test ) self. asserttrue ( result. errors [ 0 ] [ 1 ... | [
-0.5628902912139893,
0.1678946614265442,
0.5237025022506714,
0.5891880989074707,
0.9241345524787903,
0.4058961570262909,
0.08224663138389587,
0.26477792859077454,
0.21965567767620087,
-0.7007484436035156,
-0.8304596543312073,
-0.12948408722877502,
-0.22368080914020538,
0.2629845440387726,
... |
def is _ constant ( self, ref ) : if isinstance ( ref, constantref ) : return true if isinstance ( ref, ( indirectref, indexedref ) ) : return false if isinstance ( ref, locationref ) : type _ = self. symtab. fetch _ global _ type ( ref. name ) return isinstance ( type _, routinetype ) raise notimplementederror | [
-0.5291340351104736,
0.2131708860397339,
0.7524095177650452,
-0.1796325147151947,
0.10645431280136108,
0.3277122676372528,
0.9839500188827515,
-0.5003500580787659,
0.9365055561065674,
1.016420841217041,
-0.03632703050971031,
0.9735222458839417,
-1.5735876560211182,
0.6412606835365295,
-0... |
async def _ subscribe _ to _ multi _ zone _ status ( self ) : _ log. debug ( " subscribing to multi - zone status updates " ) try : response, _ = await self. _ subscribe ( " / zone / status ", self. _ handle _ multi _ zone _ status ) _ log. debug ( " subscribed to zone status " ) except bridgeresponseerror as ex : _ lo... | [
0.12392119318246841,
-0.18620453774929047,
0.2692970335483551,
1.0977988243103027,
0.03624168410897255,
-0.2475287914276123,
-0.20625221729278564,
0.08162806183099747,
0.9574878215789795,
0.11996906250715256,
-0.9952030777931213,
0.14293989539146423,
-0.03191252052783966,
0.723441123962402... |
def close ( self ) : giter = self. _ giter self. _ trace ( " close % r ", giter ) giter. close ( ) | [
-0.27924400568008423,
0.2205193191766739,
0.38303399085998535,
-0.06566746532917023,
-0.7390010952949524,
1.0206494331359863,
0.8276633024215698,
-0.5703650116920471,
-0.7636454701423645,
0.0838131457567215,
0.2515251040458679,
0.03573291376233101,
-1.3877841234207153,
1.0427966117858887,
... |
def _ check _ audience ( self, request, audience ) : if not self. audiences : return audience = = request. host _ url for audience _ pattern in self. _ audience _ patterns : if audience _ pattern. match ( audience ) : return true return false | [
-0.42892777919769287,
-0.2800362706184387,
0.38252463936805725,
0.6788817644119263,
-0.08578593283891678,
0.7353901267051697,
0.5553097128868103,
0.06034470722079277,
0.07876193523406982,
0.6946265697479248,
0.8326767086982727,
0.014993173070251942,
0.0017617528792470694,
0.548172831535339... |
def logout ( ) : return redirect ( url _ for ('index') ) | [
-0.8292689323425293,
0.4383034408092499,
0.3326506018638611,
-0.21503965556621552,
0.6213358640670776,
0.15205679833889008,
0.5751502513885498,
0.23237960040569305,
0.08008080720901489,
-0.7586057782173157,
0.6378387212753296,
-0.0557999387383461,
0.5863221883773804,
-1.801000714302063,
... |
def split _ train ( splits, val _ size, groups = none, * * kwargs ) : new _ splits = [ ] for train _ val, test in splits : sub _ groups = none if groups is none else groups [ train _ val ] train, val = train _ test _ split _ groups ( train _ val, val _ size = val _ size, groups = sub _ groups, * * kwargs ) new _ splits... | [
-0.9852318167686462,
0.506837785243988,
0.36365771293640137,
0.9719725847244263,
-0.3339347541332245,
-0.045671965926885605,
0.12683618068695068,
0.11847661435604095,
-0.5011284351348877,
-0.26875436305999756,
-0.08372540026903152,
-0.5347660183906555,
-0.25809016823768616,
-0.380760014057... |
def from _ sql ( cls, sql : str ) - > " pgfunction " : template = " create { } function { : s } { schema }. { signature } { : s } returns { : s } { definition } " result = parse ( template, sql. strip ( ), case _ sensitive = false ) if result is not none : # remove possible quotes from signature raw _ signature = resul... | [
0.8443980813026428,
0.48635485768318176,
0.2800738215446472,
0.28746354579925537,
-0.7168423533439636,
-0.6487655639648438,
-0.9808064699172974,
-0.3225592076778412,
-0.24971924722194672,
-0.35218319296836853,
-0.6607486605644226,
0.33471789956092834,
0.03502407670021057,
-0.40271270275115... |
def load _ cache _ from _ cache ( self ) : cache = open ( self. cache _ path _ cache,'r') json _ cache = cache. read ( ) self. cache = json. loads ( json _ cache ) | [
-0.5872253179550171,
-1.0233204364776611,
0.6412318348884583,
-0.587131679058075,
-0.9038861989974976,
-0.051896631717681885,
-0.6939337253570557,
0.3530294597148895,
-0.15140588581562042,
1.3212857246398926,
-0.46973472833633423,
0.2183491289615631,
0.1381567120552063,
-0.3651094138622284... |
def find _ abc ( i ) : num _ halos, all _ satellites = read _ in _ halos ( f '. / satgals _ m { i }. txt') # calculate this upfront for efficiency sumlogxi = np. sum ( np. log ( all _ satellites ) ) # function to minimize minfunc = lambda x, y, z : neglogl ( x, y, z, all _ satellites, sumlogxi ) # downhill simplex meth... | [
0.47401663661003113,
0.20246022939682007,
0.6701183915138245,
0.32118815183639526,
-0.8624054193496704,
0.6943860650062561,
0.2588859498500824,
-0.541192889213562,
0.18095135688781738,
0.3940061330795288,
-0.3043736219406128,
0.06817018985748291,
-0.5021196603775024,
-0.3064447343349457,
... |
def addinput ( self, value ) : self. history _ active = 0 # don't use history after adding an input self. inputs. append ( value ) self. _ updateconnections ( ) self. _ updatehistory ( ) | [
-0.7303466796875,
-0.20784910023212433,
0.36024942994117737,
0.35986223816871643,
0.16454117000102997,
1.1328837871551514,
0.6527377367019653,
-0.3040068745613098,
0.8396872878074646,
-1.036566138267517,
0.08349387347698212,
0.283936470746994,
-0.6789942383766174,
0.6073593497276306,
0.3... |
def _ _ eq _ _ ( self, other ) : if ( not isinstance ( other, vector ) ) : return false sort _ vec = sorted ( self, reverse = true ) sort _ other = sorted ( other, reverse = true ) for first, second in zip ( sort _ vec, sort _ other ) : if first! = second : return false return true | [
-0.5596773028373718,
-0.126885786652565,
0.917863667011261,
0.3763653337955475,
0.49404796957969666,
0.17169299721717834,
0.5912157297134399,
-1.0716890096664429,
0.3138693869113922,
-0.13259558379650116,
-0.577968418598175,
0.20535333454608917,
-0.37640613317489624,
0.18291883170604706,
... |
async def execute ( self ) - > none : if len ( self. command. split ( ) ) > = 2 : await self. help _ command ( self. command. split ( ) [ 1 ] ) else : await self. help ( ) | [
-0.08203206211328506,
0.5434606075286865,
0.4885803759098053,
1.0911328792572021,
1.1845102310180664,
0.20350179076194763,
-0.23264184594154358,
0.031615667045116425,
-0.7398983836174011,
-0.14104199409484863,
0.6035647988319397,
0.6243938207626343,
0.3672076463699341,
-0.06832171976566315... |
def list _ product _ families ( self, product _ families _ request : union [ _ models. productfamiliesrequest, io ], expand : optional [ str ] = none, skip _ token : optional [ str ] = none, * * kwargs : any ) - > iterable [ " _ models. productfamily " ] : api _ version = self. _ get _ api _ version ('list _ product _ ... | [
-2.0455973148345947,
0.2066132128238678,
0.9626144766807556,
0.32006070017814636,
-0.1685047596693039,
-0.2354748547077179,
-0.14266908168792725,
-1.3984460830688477,
0.6897731423377991,
0.12469042837619781,
-0.421490877866745,
0.874748706817627,
0.09223628789186478,
-0.11373847723007202,
... |
def test _ create _ superuser ( self ) : user = get _ user _ model ( ). objects. create _ superuser ( " testfrom @ app. com ", " test123 " ) self. asserttrue ( user. is _ superuser ) self. asserttrue ( user. is _ staff ) | [
0.7362692356109619,
0.7405726313591003,
0.04606302082538605,
1.6458427906036377,
0.627585232257843,
1.1911259889602661,
-0.08416958898305893,
0.6641033291816711,
0.2473871260881424,
-1.049566388130188,
-1.4762516021728516,
-0.0005478669190779328,
-0.044136568903923035,
0.19145284593105316,... |
def is _ image ( file : union [ str, bytes, bytearray ] ) - > bool : if isinstance ( file, str ) : file _ mimetype = magic. magic ( mime = true ). from _ file ( file ) elif isinstance ( file, ( bytes, bytearray ) ) : file _ mimetype = magic. magic ( mime = true ). from _ buffer ( file ) else : return false return file ... | [
-0.6493445038795471,
0.2375466525554657,
0.6027492880821228,
0.3379112482070923,
-0.5327301025390625,
0.6922819018363953,
-0.13444744050502777,
0.43567731976509094,
0.02717222087085247,
0.47386306524276733,
0.26877543330192566,
0.47980406880378723,
-0.5650182962417603,
0.7126591205596924,
... |
def copy _ to ( self, target ) : target = path ( target ) if isinstance ( target, directory ) : target = target. join ( self. basename ) if target. exists : target. remove ( recursive = true ) shutil. copytree ( self. absolute. path, target. path ) return directory ( target ) | [
-0.8123950362205505,
-0.3857181966304779,
0.6434252858161926,
-0.13185051083564758,
-0.5495621562004089,
0.26064059138298035,
0.5198562145233154,
-0.6316741704940796,
0.4387536346912384,
-0.014754202216863632,
0.8582339286804199,
0.6058655381202698,
0.34580981731414795,
-0.3373653590679168... |
def _ probabilistic _ sum ( number _ of _ dice, sides ) : n = number _ of _ dice s = sides u = ( ( s + 1. ) / 2 ) * n # mean b = ( 1. 7 * ( n * *. 5 ) * ( ( 2 * pi ) * *. 5 ) ) max _ y = 1. / b min _ y = ( e * * ( ( - ( n - u ) * * 2 ) / ( 2 * 1. 7 * 1. 7 * n ) ) ) / b y = random. uniform ( min _ y, max _ y ) try : t =... | [
-0.1982145458459854,
0.027731647714972496,
0.7469238638877869,
-0.32680338621139526,
-0.6624618172645569,
-0.1926415115594864,
-0.04298878833651543,
-0.46816781163215637,
0.4786641597747803,
0.2662447988986969,
0.1583021581172943,
0.22520199418067932,
0.42670825123786926,
-0.99572807550430... |
def partition _ number ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " partition _ number " ) | [
0.6177771091461182,
0.5332066416740417,
0.7046682834625244,
0.7148008346557617,
0.659372091293335,
0.43786630034446716,
1.2321391105651855,
1.1845827102661133,
0.6828733086585999,
-1.2070996761322021,
-0.08506699651479721,
0.6105578541755676,
0.2955173850059509,
-1.0012201070785522,
0.03... |
def id _ to _ time ( id _ ) : return datetime. utcfromtimestamp ( ( ( id _ > > 22 ) + discord _ epoch ) / 1000. ) | [
-0.3960929214954376,
-0.09993885457515717,
0.5002226829528809,
-1.1479769945144653,
-0.011041712947189808,
-0.5926518440246582,
-1.0072530508041382,
0.0821036696434021,
0.21442213654518127,
1.3983056545257568,
-1.1460587978363037,
0.4950224459171295,
0.2921024560928345,
-0.5238434076309204... |
def attemptloadingprovermachine ( self ) : try : thestatemachine. initialize ( self. gamedescription ) self. thebackingmachine = thestatemachine gamerlogger. log ( " statemachine ", " failsafe machine : successfully loaded traditional prover. " ) return true except exception as e1 : pass except threaddeath as d : raise... | [
-0.34522655606269836,
1.050696611404419,
0.7582462430000305,
-0.10884059965610504,
-0.11119164526462555,
0.5550247430801392,
-0.8583249449729919,
-0.781506359577179,
0.034021005034446716,
0.059424225240945816,
-0.13376085460186005,
-0.4301181435585022,
-0.8376356959342957,
0.45157122611999... |
def median _ detrend ( minmax, width = 30 ) : # - - print status. tstart = start ( " detrending light curves. " ) # - - check if full dataset is masked : if minmax. mask. all ( )! = true : # - - calculate smoothed median. med = np. median ( minmax, axis = 1 ) msk _ sm = gf ( ( ~ minmax. mask ). astype ( float ) [ :, 0 ... | [
0.054143328219652176,
-0.18727423250675201,
0.8572193384170532,
-0.34287598729133606,
-0.4928295612335205,
-0.056978486478328705,
0.09757119417190552,
0.06404653936624527,
0.42262759804725647,
-0.030561339110136032,
-0.045025818049907684,
0.7205673456192017,
-0.4259834289550781,
-0.7437745... |
def loadwordvectors ( vec _ file _ path = default _ file _ path, tok _ file _ path = vocab _ file _ path, dimensions = 300 ) : f = open ( vocab _ file _ path,'r') tokens = json. load ( f ) f. close ( ) wordvectors = np. zeros ( ( len ( tokens ), dimensions ) ) words = len ( tokens ) for token in tokens : if tokens [ to... | [
0.3796650469303131,
-0.1785031408071518,
0.64421147108078,
-0.8590971827507019,
0.10164549201726913,
-0.46185699105262756,
-0.16952022910118103,
-0.33244752883911133,
-0.63107830286026,
0.7221966981887817,
-0.026202907785773277,
0.7428518533706665,
0.10936715453863144,
0.7895196080207825,
... |
def test _ index _ with _ project _ and _ multiple _ milestones ( self ) : create _ project _ and _ milestones ( " title ", 5 ) response = self. client. get ( reverse ('projects : index') ) self. assertcontains ( response, " title " ) self. assertquerysetequal ( response. context ['latest _ project _ list'], ['< projec... | [
-0.31636059284210205,
1.1105176210403442,
0.3919987976551056,
-0.04250986501574516,
0.6843541264533997,
1.2035670280456543,
0.02808314934372902,
-0.13859611749649048,
0.6344971060752869,
-0.23081953823566437,
-0.09309033304452896,
-0.6003360748291016,
-0.6108750104904175,
-0.13382105529308... |
def _ connect _ arrays ( arr1, arr2 ) : if _ is _ same _ point ( arr1 [ 0 ], arr2 [ 0 ] ) : connected = np. concatenate ( ( np. flipud ( arr2 ) [ : - 1, : ], arr1 ) ) return connected if _ is _ same _ point ( arr1 [ 0 ], arr2 [ - 1 ] ) : connected = np. concatenate ( ( arr2 [ : - 1, : ], arr1 ) ) return connected if _ ... | [
-0.055259060114622116,
-1.0929895639419556,
1.0646260976791382,
0.09973470121622086,
0.2208465039730072,
0.034319642931222916,
-0.1835721880197525,
-1.0642234086990356,
0.8074022531509399,
0.8161833882331848,
0.3822850286960602,
0.6969203948974609,
-0.157831609249115,
0.059994734823703766,... |
def create _ or _ append _ gff _ feature _ ab _ linkage ( classy _ gene _ n, classy _ gene _ u, gff _ dict, chrom _ len _ dict ) : classy _ gene = classy _ gene _ n ct _ chrom, ct _ start, ct _ stop = classy _ gene. ctregion. split ('\ t') seq = spoofseq ( " actg " ) if chrom _ len _ dict is not none \ and ct _ chrom i... | [
0.04898383468389511,
-0.5363764762878418,
0.7844804525375366,
-0.2928594648838043,
0.17800664901733398,
-0.22852878272533417,
0.3172716796398163,
0.5422729849815369,
0.6108440160751343,
-0.4162249267101288,
-0.006553873885422945,
0.8500066995620728,
0.06405438482761383,
0.4820668399333954,... |
def subselect ( ds, props ) : def subselect _ nmin ( ds, props ) : " " " " remove profiles with not enough data we keep only profiles with at least 10 values over a 1000m thickness layer ds = subselect _ nmin ( ds, nmin = 10, hmin = 1000 ) " " " nmin = props ['nmin'] hmin = props ['hmin'] # nb of valid data for each pr... | [
0.5808712244033813,
-0.47312963008880615,
0.7655279636383057,
-0.16216254234313965,
-0.4318975806236267,
0.6127240657806396,
0.2552426755428314,
-0.4733322858810425,
0.2795584201812744,
-0.22666767239570618,
0.29381227493286133,
0.6911737322807312,
0.0785021111369133,
-0.5236404538154602,
... |
def replot ( self ) : # first set the xdata to be shown self. canvas. restore _ region ( self. background ) self. toggle _ wavepix ( ) self. draw _ residuals ( ) self. draw _ lines ( ) self. draw _ ghost ( ) self. canvas. draw ( ) | [
1.1909188032150269,
0.5895217657089233,
0.40926820039749146,
-1.1895067691802979,
-0.09468187391757965,
0.5642743706703186,
0.6127066612243652,
0.0352233424782753,
0.5648972988128662,
-0.7779194116592407,
0.5962144136428833,
0.957120418548584,
-0.7164864540100098,
-0.05757172778248787,
-... |
def modify _ commandline _ options ( parser, is _ train = true ) : parser. set _ defaults ( no _ dropout = true ) # default cyclegan did not use dropout if is _ train : parser. add _ argument ('- - lambda _ a ', type = float, default = 10. 0, help ='weight for cycle loss ( a - > b - > a )') parser. add _ argument ('- -... | [
-0.5276769399642944,
-0.014856223948299885,
1.1666146516799927,
-0.7367278337478638,
0.19080626964569092,
0.0019266988383606076,
0.2254624217748642,
-0.04744965210556984,
-0.009260285645723343,
0.17716552317142487,
-0.4798191487789154,
0.0995204895734787,
0.02610703930258751,
0.72946381568... |
def test _ check _ input _ invalid _ landmap ( ) : with pytest. raises ( typeerror ) : mob. check _ inputs ( chmask, basevalues _ idx = [ 0 ], window _ idx = 1, landmap ='invalid') | [
0.27578631043434143,
-0.1418604999780655,
0.35807982087135315,
0.9294657111167908,
0.3440890908241272,
1.4304062128067017,
-0.16563761234283447,
-0.47047534584999084,
-0.044238656759262085,
-0.6031280159950256,
0.3343372642993927,
0.34877222776412964,
-0.9975253939628601,
0.69415682554245,... |
def handler ( body ) : _ type = body. get ('type ','case') field = casereport. total _ cases if _ type = ='case'else casereport. total _ deaths sub = casereport. select ( ). order _ by ( casereport. date _ report. desc ( ) ). limit ( 1 ) response = list ( casereport. select ( states. name, field. alias ('total _ data')... | [
-0.05485818535089493,
0.3594321310520172,
0.6135910153388977,
-1.0180654525756836,
0.23022538423538208,
-0.11820866167545319,
0.0593506321310997,
-0.23098787665367126,
-0.0712670311331749,
0.10061006247997284,
0.06663376837968826,
-0.9464449286460876,
0.824882984161377,
0.272910475730896,
... |
def get _ flu _ counts ( afile, proteins ) : counts = { } with open ( afile ) as f : for line in f : ( protein, st, stp, elm, seq, junk ) = line. strip ( ). split ('\ t') name = protein. split ( '.') [ - 1 ] elmseq = elm +':'+ seq if name in proteins : if name not in counts : counts [ name ] = { } if protein not in cou... | [
0.152914896607399,
-0.22503958642482758,
0.7058488130569458,
-0.3328894078731537,
-0.5206413865089417,
0.347250372171402,
-0.23261483013629913,
1.0382519960403442,
-0.9336700439453125,
0.019312918186187744,
-0.788248598575592,
-0.790276050567627,
0.38560783863067627,
0.28804245591163635,
... |
def _ _ init _ _ ( self, s = 7, c = 20, b = 3, coord _ scale = 5, noobject _ scale = 0. 5 ) : super ( lossgetter, self ). _ _ init _ _ ( ) self. s = s self. b = b self. c = c self. coord _ scale = coord _ scale self. noobject _ scale = noobject _ scale | [
0.15817369520664215,
-0.3564039170742035,
0.7211761474609375,
-0.07000719010829926,
0.21923913061618805,
0.36907944083213806,
-0.07593109458684921,
-0.4122565984725952,
-0.48233771324157715,
-0.30292007327079773,
-0.7079803943634033,
-0.26064637303352356,
0.17436611652374268,
0.02232605963... |
def fetch _ statistics _ async ( self, rpc = none ) : return queuestatistics. fetch _ async ( self, rpc ) | [
0.3201882839202881,
0.236101433634758,
0.4668204188346863,
0.13334035873413086,
0.2314477264881134,
-0.13258293271064758,
-1.1349058151245117,
-1.6761751174926758,
0.7396575212478638,
-0.6614043712615967,
0.5098772644996643,
0.37845444679260254,
0.7090317010879517,
0.4681227207183838,
-0... |
def no _ device ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " no _ device " ) | [
-0.4345998466014862,
0.6874544024467468,
0.40058547258377075,
0.5486322045326233,
0.6580356955528259,
1.523521900177002,
1.232409119606018,
-0.02574170008301735,
0.5296874046325684,
-0.7425989508628845,
0.8490091562271118,
0.8923686146736145,
-0.10623066872358322,
-0.3900914490222931,
0.... |
def resize ( self, ( width, height ) ) : if height = = 0 : height = 1 glmatrixmode ( gl _ projection ) glloadidentity ( ) glortho ( - 4. 0, 4. 0, - 3. 0, 3. 0, - 1. 0, 1. 0 ) glmatrixmode ( gl _ modelview ) | [
0.4882166385650635,
0.41071441769599915,
0.7627739906311035,
0.28099459409713745,
0.3778819739818573,
0.6408320665359497,
-0.3446235656738281,
-0.23401586711406708,
0.27462419867515564,
-0.2644665539264679,
-0.3786258101463318,
-0.2946135997772217,
-0.27013149857521057,
0.05638614669442177... |
def filter _ by ( self, * * kwargs ) : with self. _ cm. session _ scope ( ) as session : objs = none try : objs = session. query ( self. _ model ). filter _ by ( * * kwargs, ) except exception : raise finally : return objs | [
-0.5921653509140015,
-0.07634001970291138,
0.43730130791664124,
0.7867749929428101,
-0.474479615688324,
-0.8447443246841431,
0.05616706982254982,
-1.226331114768982,
-0.02749958261847496,
0.5086342692375183,
-0.4460921287536621,
0.12745444476604462,
-0.8366909027099609,
-0.648029625415802,... |
def volumes ( self ) : raise notimplemented ( " i haven't gotten around to this yet : ( " ) | [
-0.22045181691646576,
-0.7252190113067627,
0.674559473991394,
0.53751140832901,
0.07161633670330048,
0.04666180536150932,
-0.1853063553571701,
-0.3973951041698456,
0.04357369244098663,
-0.7555060386657715,
-0.3985876739025116,
-0.42660972476005554,
0.35992538928985596,
0.5134046077728271,
... |
def map _ team _ id ( code ) : for team in team _ data : if team [ " code " ] = = code : click. secho ( team [ " name " ], fg = " green " ) return team [ " name " ] break else : click. secho ( " no team found for this code ", fg = " red ", bold = true ) | [
-0.3063524663448334,
0.2443625032901764,
0.6530169248580933,
-0.47452759742736816,
-0.08926188200712204,
0.4851536750793457,
-0.5619616508483887,
-0.9082926511764526,
0.06959516555070877,
0.8677374720573425,
-0.12085889279842377,
0.10764769464731216,
0.427489310503006,
0.05437115952372551,... |
def removes ( processed _ titles : dict [ str, set [ datnode ] ], config : config, input _ dat : dat, removes : removes ) - > dict [ str, set [ datnode ] ] : report _ on _ match : bool = false if input _ dat. clone _ list. removes : eprint ('* applying clone list removes... ', sep ='', end ='', flush = true ) report _ ... | [
-0.3345247507095337,
0.4388667047023773,
0.6259992718696594,
-0.5694469809532166,
-1.005387783050537,
0.09187839180231094,
-0.13720324635505676,
-0.23536325991153717,
-0.266502320766449,
0.5162559151649475,
-0.4464883506298065,
0.4048110246658325,
-0.5246221423149109,
0.35083386301994324,
... |
def test _ 01 _ seconds ( self ) : l _ datetime = datetime. datetime ( 2018, 11, 25, 0, 0, 1 ) l _ seconds = convert. datetime _ to _ seconds ( l _ datetime ) self. assertequal ( l _ seconds, 1 ) # l _ datetime = datetime. datetime ( 2018, 11, 25, 0, 1, 2 ) l _ seconds = convert. datetime _ to _ seconds ( l _ datetime ... | [
-0.06278595328330994,
0.26478877663612366,
0.5516913533210754,
0.25225314497947693,
-0.11767834424972534,
-0.2788468301296234,
-0.02387247607111931,
-0.988664448261261,
-0.0768597200512886,
-0.0532665029168129,
-1.1362813711166382,
-0.5770657062530518,
0.48222559690475464,
0.74127578735351... |
def winbio _ winbiocapturesample ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " purpose ", " flags ", " unitid ", " sample ", " samplesize ", " rejectdetail " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.052314162254333496,
-0.1203976571559906,
0.37038907408714294,
0.6716981530189514,
-0.5259061455726624,
0.4447530508041382,
0.9775375723838806,
-0.7120579481124878,
0.6726270318031311,
0.3004765808582306,
-0.2300245314836502,
0.5453101396560669,
-1.1402515172958374,
0.861720860004425,
... |
def many _ from _ results ( cls, results ) : raw _ results = results. strip ( ). split ( " \ n " ) list _ of _ parts = [ cls. _ parts _ of _ line ( raw _ result ) for raw _ result in raw _ results ] parts _ by _ path = group _ by ( lambda parts : parts [ 0 ], list _ of _ parts ) print ( " this is where i'm at " ) print... | [
0.020903538912534714,
-0.1456662118434906,
0.6058126091957092,
0.243294820189476,
0.7292302250862122,
-0.4026060402393341,
0.32818466424942017,
-0.16047202050685883,
-0.6322252750396729,
-0.7766465544700623,
0.301198273897171,
-1.0852922201156616,
0.4834257960319519,
0.9472299814224243,
... |
def get _ location ( grid : dict, point : str ) - > tuple : x, y = grid [ point ] return ( x, y ) | [
-0.6107217669487,
0.08710978180170059,
0.3445994555950165,
-0.34883177280426025,
-0.08165065944194794,
-0.5845372676849365,
-0.8675808906555176,
0.22868689894676208,
-0.9803478121757507,
0.8660144209861755,
0.3862869143486023,
0.013345343060791492,
0.2887704074382782,
-0.6142441630363464,
... |
def is _ relative ( self ) : return not os. path. isabs ( self. _ path ) | [
-0.4865230321884155,
-0.2088988721370697,
0.6263437867164612,
0.3886583149433136,
-0.5628566145896912,
0.9581666588783264,
0.24529482424259186,
-0.3009742498397827,
-0.3983860909938812,
0.00304978946223855,
0.051699843257665634,
-0.6115531921386719,
-0.6736169457435608,
0.1377655565738678,... |
def save _ input _ values ( inputs : sequence [ np. ndarray ], artifacts _ dir : optional [ str ] = none ) - > str : result = [ ] for array in inputs : shape _ dtype = get _ shape _ and _ dtype ( array ) values = " ". join ( [ str ( x ) for x in array. flatten ( ) ] ) result. append ( f " { shape _ dtype } = { values }... | [
-0.5564122200012207,
0.014815011061728,
0.6134092807769775,
-0.70008385181427,
0.6892920136451721,
0.4127439558506012,
0.31817856431007385,
-0.2959606647491455,
-0.21233251690864563,
0.7494192719459534,
-0.09188545495271683,
0.3083423674106598,
0.043917376548051834,
0.19738398492336273,
... |
def time _ benchmark ( self, x, batch _ size = 32, loop = 1000, ratio = 0. 8, mode = " gpu " ) : x _ expand = x. expand ( batch _ size, x. size ( 1 ), x. size ( 2 ), x. size ( 3 ) ) label = variable ( torch. zeros ( batch _ size ). long ( ). cuda ( ) ) if mode = = " gpu " : self. model. eval ( ) torch. cuda. synchroniz... | [
-0.007047610357403755,
1.0310509204864502,
1.174060344696045,
-0.265760213136673,
-0.11788291484117508,
0.4223240613937378,
0.2922254502773285,
-0.38347089290618896,
-1.34588623046875,
1.9269849061965942,
-0.14181824028491974,
-0.008886793628334999,
-0.1377815455198288,
0.5609208345413208,... |
def _ update _ normalization _ statistics ( self, reward _ normalizer, strategy, targets ) : dataset = tf. data. dataset. from _ tensors ( targets ) dataset _ iterator = iter ( strategy. experimental _ distribute _ dataset ( dataset ) ) distributed _ values = next ( dataset _ iterator ) f = tf. function ( reward _ norm... | [
-0.20083178579807281,
-0.0771445706486702,
0.2083183228969574,
-0.09664123505353928,
-0.09180300682783127,
0.11786355823278427,
0.3657146692276001,
0.21763838827610016,
0.36092305183410645,
0.5067485570907593,
0.9844145774841309,
0.19883304834365845,
0.9253056049346924,
-0.1393569707870483... |
def true _ position ( self ) : return self. position | [
-0.5774767398834229,
-0.6022046804428101,
0.3005385398864746,
-0.43399879336357117,
0.16291993856430054,
0.514064610004425,
0.05241909623146057,
0.7717954516410828,
-0.07126205414533615,
0.3307795226573944,
-0.7759909629821777,
-1.3531500101089478,
-0.493725448846817,
-0.9271359443664551,
... |
def test _ get _ wrong _ department _ route ( ) : url ='/ department / { } '. format ( " 1111 " ) set _ token ( client, " user0011 " ) response = client. get ( url ) assert response. status _ code = = 302 | [
0.05543874204158783,
0.016077382490038872,
0.4690749943256378,
0.28112468123435974,
0.7666571736335754,
1.3470323085784912,
-0.17758901417255402,
-0.6006773114204407,
0.32029008865356445,
-0.9349468350410461,
0.0173207875341177,
1.1535851955413818,
1.050039291381836,
-0.021399052813649178,... |
def _ init _ tco ( self ) : tco _ config _ dir = os. environ ['home'] +'/. tco'os. makedirs ( tco _ config _ dir ) with open ( tco _ config _ dir +'/ config ', mode ='w') as tco _ conf : tco _ conf. write ( " - - - \ nrepo : " + operator _ src _ dir + " \ n " ) | [
0.029987940564751625,
0.5462612509727478,
0.2892831563949585,
-0.5077891945838928,
0.4025858938694,
0.004172870423644781,
1.1434283256530762,
1.4883875846862793,
-0.7405630946159363,
0.8660284876823425,
-1.498439073562622,
-0.8858077526092529,
0.8005450963973999,
0.371748149394989,
0.370... |
def increment _ dict ( org, new ) : for key in org : oldval = org [ key ] newval = oldval + new [ key ] org [ key ] = newval assert newval > = oldval | [
-0.6140555143356323,
0.11072906106710434,
0.613409161567688,
-0.09388532489538193,
-0.6710183024406433,
1.0592936277389526,
-0.6067647337913513,
0.261209100484848,
-0.6031194925308228,
-0.21995386481285095,
-0.16978153586387634,
0.03255815431475639,
0.31145569682121277,
0.28877565264701843... |
def _ parse _ pool _ queue ( pool, queue _ size ) : if queue _ size is not none and queue _ size < 1 : raise valueerror ( " the queue must contain at least one element! " ) elif ( queue _ size = = 1 ) or ( pool is none and queue _ size is none ) : m = map queue _ size = 1 elif pool is not none : m = pool. map if queue ... | [
-0.7986922860145569,
-1.2029348611831665,
0.610640287399292,
-0.6785940527915955,
-0.25948062539100647,
-0.6673278212547302,
0.11988871544599533,
0.08244022727012634,
0.4184589982032776,
-0.27160581946372986,
0.3022538125514984,
0.396274209022522,
0.44259312748908997,
1.361260175704956,
... |
def convert _ to _ binary ( embedding _ path ) : f = codecs. open ( embedding _ path + ". txt ",'r ', encoding ='utf - 8') wv = [ ] with codecs. open ( embedding _ path + ". vocab ", " w ", encoding ='utf - 8') as vocab _ write : for line in f : splitlines = line. split ( ) vocab _ write. write ( splitlines [ 0 ]. stri... | [
0.3405323326587677,
-1.132899522781372,
0.8643079996109009,
0.11146243661642075,
1.0572845935821533,
0.5634136199951172,
0.23169845342636108,
0.3230329155921936,
-0.10053694248199463,
1.1644452810287476,
-0.6613423824310303,
0.9287431240081787,
0.26099422574043274,
0.8280521035194397,
-0... |
def _ _ call _ _ ( self ) : # this method can be used in ic implementations return logic ( self. value ) | [
0.3041975796222687,
-0.6552679538726807,
0.2865431606769562,
-0.4093479812145233,
-0.7998230457305908,
0.1448509693145752,
0.26833999156951904,
-0.42838990688323975,
0.4599006772041321,
-0.38116249442100525,
0.8043177723884583,
-0.4530814588069916,
-0.1591821014881134,
-0.5488212704658508,... |
def to _ cfn _ resource _ name ( name : str ) - > str : if not name : raise valueerror ( " invalid name : % r " % name ) word _ separators = ['- ','_'] for word _ separator in word _ separators : word _ parts = [ p for p in name. split ( word _ separator ) if p ] name =''. join ( [ w [ 0 ]. upper ( ) + w [ 1 : ] for w ... | [
-0.4809153079986572,
-0.08019164204597473,
0.8862448930740356,
-0.963410496711731,
-0.7593458294868469,
-0.44474539160728455,
-0.05657218396663666,
-0.1588297039270401,
0.3165193498134613,
0.6051231622695923,
-0.6466057896614075,
-0.5624143481254578,
0.39869049191474915,
-0.085296839475631... |
def create _ image ( self ) : # you can experiment with these x and y ranges self. draw ( - 2. 13, 0. 77, - 1. 3, 1. 3 ) self. im = image. fromarray ( self. mandel ) self. im. putpalette ( [ i for rgb in ( ( j, 0, 0 ) for j in range ( 255 ) ) for i in rgb ] ) | [
-0.42483168840408325,
0.16265350580215454,
0.41193071007728577,
0.2666943073272705,
-0.052845343947410583,
1.30038321018219,
-0.784433126449585,
-0.030815398320555687,
0.13831664621829987,
-0.3006356656551361,
-0.3488495945930481,
0.3146454095840454,
0.13903500139713287,
0.4365342557430267... |
def plot _ weekend _ revenue _ mojo _ vs _ tweets ( self, full _ week = false, week _ inc _ weekend = false ) : # convert weekend totals into thousands of usd self. mojo _ box _ office _ df ['weekend _ gross _ thou'] = self. mojo _ box _ office _ df ['weekend _ gross _ usd']. replace ('[ \ £, ] ','', regex = true ). as... | [
0.6708042621612549,
0.7255679965019226,
0.8523241281509399,
-1.6490787267684937,
-0.26900675892829895,
-0.22079145908355713,
0.8217097520828247,
0.5217834711074829,
-0.527681827545166,
0.20657841861248016,
0.48926618695259094,
0.7025031447410583,
0.18712569773197174,
0.19228829443454742,
... |
def dam ( x, y, gamma ) : # sigx = gamma * x - 2. 0 * gamma * y sigy = - gamma * x tao = - gamma * y return sigx, sigy, tao | [
-0.9304789900779724,
-0.40539470314979553,
0.4065401554107666,
-0.17308272421360016,
0.9927412867546082,
-0.011198987253010273,
-0.7412452697753906,
-0.8412113189697266,
-0.6728249192237854,
0.0812361016869545,
-0.3593619763851166,
-0.15330913662910461,
0.8229835629463196,
-0.2330042570829... |
def push _ try ( self, data ) : if len ( self. _ data ) < self. max _ elements : hp. heappush ( self. data, data ) elif self. _ data [ 0 ] [ 0 ] < data [ 0 ] : hp. heapreplace ( self. data, data ) | [
0.3237890899181366,
1.1887249946594238,
0.6412445902824402,
0.06865114718675613,
0.7015337347984314,
0.3065665364265442,
-1.2151836156845093,
-0.8407721519470215,
0.3342364728450775,
-0.345033198595047,
0.1695115715265274,
0.0978240892291069,
-0.9767227172851562,
0.3350507318973541,
0.44... |
def allow _ headers ( self ) - > optional [ sequence [ str ] ] : return pulumi. get ( self, " allow _ headers " ) | [
0.3062271773815155,
0.33687624335289,
0.6633352041244507,
0.6154616475105286,
0.5210850834846497,
1.3296395540237427,
-0.34940648078918457,
-0.7883593440055847,
0.5955598950386047,
0.428139865398407,
0.13267159461975098,
0.4756316542625427,
-0.4196390211582184,
-1.3707671165466309,
-0.26... |
def createframe ( self ) : import wx from openglcontext. browser import nodes self. _ frame = wx. frame ( none, - 1, self. title, ( self. x, self. y ), ( self. width, self. height ), ) self. _ context = nodes. visualcontext ( self. _ frame, ) return self. _ frame | [
0.2580403983592987,
-0.19457969069480896,
0.35955753922462463,
0.0939379408955574,
-0.34087756276130676,
-0.16053339838981628,
-0.3457176089286804,
-0.8012368679046631,
0.49918627738952637,
-0.9643398523330688,
0.1846071481704712,
0.6188127398490906,
-0.2026136964559555,
-0.924676954746246... |
def test _ warn _ if _ no _ realtime _ service ( self ) : def mock _ list _ history _ databases ( ) : return [ " usa - stk - 1d ", " japan - stk - 1d ", " usa - stk - 15min ", " demo - stk - 1min ", " japan - stk - 15min " ] def mock _ list _ realtime _ databases ( ) : response = requests. models. response ( ) response... | [
0.060738202184438705,
1.0596481561660767,
0.5645125508308411,
0.1913897842168808,
0.12962152063846588,
-0.16646285355091095,
0.33509624004364014,
-0.6429868340492249,
0.38404396176338196,
-0.018925361335277557,
-0.013402491807937622,
0.3354967534542084,
-0.47558310627937317,
1.208936095237... |
def cb _ changesampledata ( val ) : global normml global normmap global posteriornorminvgam global x _ cat global mu _ ml global var _ ml global num _ samples alpha = salpha. val beta = sbeta. val gamma = sgamma. val delta = sdelta. val mu = smu. val var = svar. val num _ samples = int ( sn. val ) normml, x _ cat, mu _... | [
0.44902822375297546,
-0.6076927185058594,
0.4769909083843231,
-0.09917449206113815,
-0.9230422973632812,
0.1620776653289795,
0.1327638328075409,
-0.0636608675122261,
0.08014055341482162,
-0.33914315700531006,
0.479767382144928,
0.7176399827003479,
0.13417157530784607,
0.5467987656593323,
... |
def _ _ iadd _ _ ( self, other ) : if len ( self )! = len ( other ) : raise valueerror ( " the length for two input vectors are not compatible " ) self. vec = vector ( [ first + second for first, second in zip ( list ( self ), list ( other ) ) ] ) return self. vec | [
-0.2913281321525574,
0.001777869532816112,
0.8294585347175598,
-0.32290202379226685,
0.3828833997249603,
0.9573045372962952,
0.04938121140003204,
-0.726828396320343,
0.6410917043685913,
-0.278878390789032,
0.03024860844016075,
0.6135091185569763,
-0.27942514419555664,
0.013775432482361794,... |
def querygroupsmenu ( self ) : updated _ min = raw _ input ('enter updated min ( example : 2007 - 03 - 16t00 : 00 : 00 ) :') query = gdata. contacts. client. contactsquery ( feed ='/ m8 / feeds / groups / default / full') query. updated _ min = updated _ min feed = self. gd _ client. getgroups ( q = query ) self. print... | [
-0.40338659286499023,
-0.2850932776927948,
0.2845216691493988,
0.2376955896615982,
-0.5788159370422363,
-0.6608639359474182,
-0.5765552520751953,
-1.1951031684875488,
-0.7041772603988647,
-0.7454879879951477,
0.3285047709941864,
0.9006757140159607,
-1.2964998483657837,
-0.2632790803909302,... |
def cast ( * args ) : return _ itksmoothingrecursivegaussianimagefilterpython. itksmoothingrecursivegaussianimagefilteriul2iul2 _ cast ( * args ) | [
-0.3813002109527588,
-0.5557414889335632,
0.2544889748096466,
-0.04423985257744789,
-0.39100590348243713,
0.8224812150001526,
0.14398451149463654,
-0.25716647505760193,
-0.04631377011537552,
-0.11683118343353271,
0.023135147988796234,
1.2694275379180908,
0.15208199620246887,
0.778914630413... |
def tags ( self ) - > optional [ pulumi. input [ mapping [ str, pulumi. input [ str ] ] ] ] : return pulumi. get ( self, " tags " ) | [
0.33743125200271606,
0.5993781089782715,
0.44412222504615784,
0.15736599266529083,
1.3290783166885376,
0.9036920070648193,
-0.5358330011367798,
0.2939801812171936,
0.40114060044288635,
-0.08712667226791382,
-0.7735825181007385,
0.4300961196422577,
-0.0488298237323761,
-0.2394936978816986,
... |
def next ( self ) : self. clicked = false if self. frame _ num < self. length - 1 : if self. frame _ num = = self. buffer _ frame _ num : ret, frame = self. cap. read ( ) if self. ds! = 1 : frame = cv2. resize ( frame, ( frame. shape [ 1 ] / / self. ds, frame. shape [ 0 ] / / self. ds ) ) self. frame _ buffer. append (... | [
-0.40759795904159546,
0.15101252496242523,
0.9333111047744751,
0.6748907566070557,
-0.6073436141014099,
-0.26238083839416504,
0.9947349429130554,
-0.4495064914226532,
1.2376765012741089,
-0.9726863503456116,
0.3716559410095215,
0.9183061122894287,
0.06282594799995422,
0.20370179414749146,
... |
def load _ data ( filepath ) : pull _ requests _ json = _ read _ json _ file ( filepath ) get _ data = functools. partial ( _ get _ data _ from _ pull _ request, os. path. dirname ( filepath ) ) pull _ requests = pd. dataframe ( [ get _ data ( pr ) for pr in pull _ requests _ json ], columns = ['id ','author ','created... | [
-0.7309236526489258,
0.2881668210029602,
0.4718341827392578,
-0.8244073390960693,
0.5398480892181396,
0.17074768245220184,
-0.48017677664756775,
-0.11173644661903381,
-0.17801834642887115,
0.1445782631635666,
-0.10978632420301437,
0.062123607844114304,
0.49689826369285583,
-0.9278815388679... |
def handle _ inpgen _ failure ( self ) : return | [
-0.3439537286758423,
-0.8025579452514648,
0.2618243396282196,
-0.04269500821828842,
0.3487987220287323,
0.45030516386032104,
-0.13309353590011597,
-0.10895224660634995,
-0.885897696018219,
-0.35247471928596497,
-0.3609568476676941,
0.1457868218421936,
-2.1647515296936035,
-0.62350994348526... |
def get _ session ( ) : return db _ session | [
-0.48843878507614136,
0.12244252860546112,
0.30452507734298706,
0.23764659464359283,
0.6525730490684509,
-0.35427963733673096,
0.31470930576324463,
-1.1998282670974731,
0.32134106755256653,
-0.32627999782562256,
-0.48103687167167664,
0.516693651676178,
-0.6843082904815674,
-0.7418290972709... |
def handler ( self, body, message ) : try : response = self. session. post ( url = urljoin ( self. api _ url, self. leek _ webhooks _ endpoint ), json = body, ) response. raise _ for _ status ( ) # raises a httperror if the status is 4xx, 5xxx except ( requests. exceptions. connectionerror, requests. exceptions. timeou... | [
0.3262794613838196,
-0.3035772144794464,
0.8526855707168579,
-0.2064097672700882,
0.4239364266395569,
0.2633517384529114,
-0.38128167390823364,
0.4955141246318817,
-0.6394758820533752,
0.3974236845970154,
0.1933913379907608,
0.6716451048851013,
-0.8850005269050598,
-0.12345089018344879,
... |
def closing _ time ( self ) : storage. close ( ) | [
-0.08141674101352692,
-0.6505870819091797,
0.3621631860733032,
0.08769704401493073,
-0.4669046401977539,
0.9745385050773621,
-0.18820086121559143,
0.0015516853891313076,
-1.0331225395202637,
0.9629275798797607,
0.25086453557014465,
-0.5567511320114136,
0.039690788835287094,
0.7946291565895... |
def _ timingtest _ jinc ( ) : x = _ np. linspace ( - 1, 1, 500 ) y = x. copy ( ) x, y = _ np. meshgrid ( x, y ) rho = _ np. hypot ( x, y ) start = time. time ( ) result1 = _ jinc ( rho ) duration = time. time ( ) - start print ( duration * 1000. 0 ) start, duration = 0. 0, 0. 0 start = time. time ( ) result2 = jinc ( r... | [
0.6882885694503784,
0.3098680078983307,
0.8868269324302673,
0.3577863276004791,
0.08495890349149704,
-0.08343847095966339,
1.3155008554458618,
-1.2939053773880005,
-0.7162860035896301,
0.8402596712112427,
-0.3172789216041565,
1.0656845569610596,
-0.5479047298431396,
0.777151346206665,
-0... |
def adverse _ events ( df ) : # convert hemorrhage counts to boolean hemorrhage = df ['post gk h'] > 0 print ( " h ", hemorrhage. sum ( ) ) ric _ bad = radiation _ induced _ changes ( df ) return hemorrhage | ric _ bad | [
0.3695286810398102,
0.41261276602745056,
0.5596705079078674,
0.02210376039147377,
0.28344258666038513,
0.42579901218414307,
-0.19521304965019226,
0.6895121932029724,
-0.3199569582939148,
0.1939743459224701,
-0.16469278931617737,
0.12418443709611893,
-0.7516032457351685,
0.7137937545776367,... |
def get _ output ( self, command, pause = 0 ) : self. child. send ( command + " \ n " ) time. sleep ( pause ) start _ failed = self. child. expect ( [ " bluetooth ", pexpect. eof ] ) if start _ failed : raise bluetoothctlerror ( " bluetoothctl failed after running " + command ) return self. child. before. split ( " \ r... | [
-0.12788230180740356,
-0.06751297414302826,
0.7937833666801453,
0.20988208055496216,
-0.5431744456291199,
-0.47715455293655396,
-0.11519530415534973,
-0.6864997744560242,
-0.2266523241996765,
0.09779352694749832,
-0.2366814911365509,
-0.4762348234653473,
-1.2508258819580078,
0.028500119224... |
def get _ data _ file ( self, device : str, revision : str ) - > str : file _ name = self. config [ " devices " ] [ device ] [ " revisions " ] [ revision ] dir _ path = os. path. dirname ( os. path. abspath ( self. path ) ) return os. path. join ( dir _ path, file _ name ) | [
0.389173299074173,
-0.2964479625225067,
0.4993743598461151,
-0.3144494295120239,
-0.42939862608909607,
1.0257829427719116,
0.1694711595773697,
0.05742376670241356,
-1.048766851425171,
-0.625117838382721,
1.3132946491241455,
0.6844081878662109,
0.3470940887928009,
-0.7465206384658813,
0.3... |
def setcurrentframe ( frame, doc ) : doc. settime ( c4d. basetime ( frame, doc. getfps ( ) ) ) # set current time to given frame doc. executepasses ( none, true, true, true, 0 ) # animate the current frame of the document c4d. gesyncmessage ( c4d. evmsg _ timechanged ) # send a synchronous event message that time has c... | [
-0.13570618629455566,
-0.05765395984053612,
0.5177007913589478,
0.45068520307540894,
-0.17091046273708344,
-0.07137468457221985,
0.27244070172309875,
0.11029490828514099,
-0.4715624451637268,
1.1324762105941772,
-0.6389265656471252,
1.022194743156433,
-0.6948168873786926,
0.938925087451934... |
def request _ username ( user _ id ) : logger. info ( f " in request _ username " ) logger. info ( f " getting user _ by _ id " ) cache _ result = get _ user _ by _ id ( user _ id ) if cache _ result : return cache _ result else : queried _ user = query _ user _ by _ id ( user _ id ) if queried _ user : return jsonify ... | [
-1.373020052909851,
0.059770386666059494,
0.6933245062828064,
0.8249527812004089,
-0.31212690472602844,
-1.2315083742141724,
-0.306081086397171,
-0.8223612904548645,
0.5070948004722595,
-0.04056836664676666,
-0.5548854470252991,
0.40435701608657837,
0.3999144434928894,
0.43682533502578735,... |
def update _ note _ on _ ip ( args ) : connectsl ( ) file = raw _ input ('enter a filename of ips :') note = raw _ input ( " what will these ips be used for? : " ) try : data = json. load ( open ( file ) ) for p in data ['info'] : print " updating ", p ['_ id'], " with ", note ip _ id = p ['ip _ id'] print " * * * * * ... | [
-0.6397473812103271,
-0.809227466583252,
0.6429222226142883,
-0.4132187068462372,
-0.37730303406715393,
0.6509361863136292,
-0.07641778141260147,
-0.24903759360313416,
-0.43819960951805115,
0.4734427034854889,
-0.156960129737854,
-0.07921700924634933,
-0.2699320316314697,
-0.80363982915878... |
def test _ login _ user _ invalid _ username ( self ) : args = {'user _ name':'user ','password':'password'} if len ( user. objects. get ( username = args ['user _ name'] ) ) : user. objects. get ( username = args ['user _ name'] ). delete ( ) self. client. post ('/ user _ auth / login / ', args ) # this will throw exc... | [
0.05534706637263298,
0.602767288684845,
0.49155014753341675,
0.9660725593566895,
-0.08671026676893234,
0.6096113324165344,
-0.41981378197669983,
0.2001267820596695,
0.7020278573036194,
-0.2887532711029053,
-0.8251367211341858,
-0.20919159054756165,
-0.6729333996772766,
0.2575659155845642,
... |
def load _ pretrained _ embedding _ from _ file ( embed _ path, word _ map ) : logging. info ( " \ nloading embeddings : { } ". format ( embed _ path ) ) with open ( embed _ path, " r " ) as f : embed _ dim = len ( f. readline ( ). split ( " " ) ) - 1 vocab = set ( word _ map. keys ( ) ) num _ embeddings = len ( vocab ... | [
0.7728554606437683,
-0.029061540961265564,
0.6248022317886353,
0.03754790127277374,
-0.38518184423446655,
0.28082364797592163,
0.912338376045227,
0.5749460458755493,
-0.5633769035339355,
0.6861409544944763,
-0.6837990283966064,
-0.40440133213996887,
-0.4105192720890045,
0.29516345262527466... |
def test _ breadth _ first _ trav _ irregular ( gr ) : gr. add _ edge ( 1, 2 ) gr. add _ edge ( 1, 3 ) gr. add _ edge ( 2, 4 ) gr. add _ edge ( 2, 5 ) gr. add _ edge ( 3, 6 ) gr. add _ edge ( 3, 7 ) gr. add _ edge ( 5, 3 ) assert gr. breadth _ first _ traversal ( 1 ) = = [ 1, 2, 3, 4, 5, 6, 7 ] | [
0.2940981090068817,
1.2088031768798828,
0.7608382105827332,
0.5404400825500488,
1.4177783727645874,
-0.04841769486665726,
1.145993947982788,
0.01825760118663311,
0.261249303817749,
0.31196367740631104,
-0.524971604347229,
0.06131766736507416,
-0.17623955011367798,
-0.2626064419746399,
-0... |
def to _ general _ qsm ( self, x1 : jaxarray, x2 : jaxarray ) - > generalqsm : sortable = jax. vmap ( self. coord _ to _ sortable ) idx = jnp. searchsorted ( sortable ( x2 ), sortable ( x1 ), side = " right " ) - 1 xs = jax. tree _ util. tree _ map ( lambda x : jnp. append ( x [ 0 ], x [ : - 1 ] ), x2 ) pinf = self. st... | [
-0.3844693899154663,
-0.025307031348347664,
0.8505151867866516,
-0.35658499598503113,
-0.5597476959228516,
0.18931059539318085,
-1.5046839714050293,
-1.135146141052246,
-0.2707456648349762,
0.16964729130268097,
0.162285715341568,
0.5672854781150818,
0.6320266127586365,
-0.5113625526428223,... |
def motor _ output ( self, cpu1 ) : cpu1a = cpu1 [ 1 : - 1 ] cpu1b = np. array ( [ cpu1 [ - 1 ], cpu1 [ 0 ] ] ) motor = np. dot ( self. syn. cpu1a _ motor, cpu1a ) motor + = np. dot ( self. syn. cpu1b _ motor, cpu1b ) output = ( motor [ 0 ] - motor [ 1 ] ) * 0. 25 # to kill the noise a bit! return output | [
0.28958550095558167,
-0.40054836869239807,
0.5258454084396362,
0.32568785548210144,
-0.4940183162689209,
-0.47293707728385925,
0.7730152010917664,
-0.05466998741030693,
-0.5103507041931152,
-0.02202005498111248,
-0.10620219260454178,
0.08669479191303253,
-1.099500298500061,
0.1326960921287... |
def parse _ args ( ) : parser = argparse. argumentparser ( description ='turns your scroll wheel into a skill presser allowing you to'' twist spells by scrolling.') parser. add _ argument ( " - - keys ", type = str, nargs ='+ ', help = " space separated list of keys you want to press and " " the order you want to press... | [
-0.4827987849712372,
-0.2461002618074417,
0.640850305557251,
-0.54231858253479,
-0.07710696756839752,
-0.1541234850883484,
-0.8952429294586182,
0.21237662434577942,
-0.4456291198730469,
-0.017055533826351166,
-0.498444139957428,
0.23936578631401062,
-0.373408704996109,
0.7525794506072998,
... |
def dim ( self ) - > google. protobuf. internal. containers. repeatedcompositefieldcontainer [ global _ _ _ tensorshapeproto. dim ] : | [
0.5014084577560425,
1.1094796657562256,
0.3949788212776184,
0.4371604323387146,
0.6744154691696167,
1.259540319442749,
1.9677150249481201,
-0.5822628736495972,
-0.18853214383125305,
-0.7748674154281616,
-1.1485894918441772,
-0.0029534013010561466,
-0.006936305668205023,
-0.2834799885749817... |
def _ check _ num _ type ( self, params : numparamstype ) - > none : for p in params : if type ( p ) not in [ int, float ] : raise typeerror ('all parameters must be numeric.') | [
-0.2382706254720688,
-0.008585713803768158,
0.6525378823280334,
1.0227981805801392,
1.2319577932357788,
1.0516642332077026,
-0.35397207736968994,
-0.521824836730957,
-1.0393342971801758,
0.8739906549453735,
0.17498059570789337,
-0.21065902709960938,
-0.938081681728363,
1.3599257469177246,
... |
def get _ start _ time ( self ) : return self. started _ at | [
0.09081123769283295,
-0.7475756406784058,
0.45210719108581543,
-0.156629279255867,
0.8147734999656677,
0.08087269961833954,
-0.22595059871673584,
0.1189860999584198,
-0.26323139667510986,
-0.08413197845220566,
-0.7203677296638489,
0.6507030129432678,
-0.10638827085494995,
-0.20515826344490... |
def get _ percentage _ of _ takings _ in _ first _ two _ weeks ( self ) : # use the boxofficemojo data to calculate how much of the total revenue was taken in the first two weeks if ( self. mojo _ box _ office _ df. shape [ 0 ] > 1 ) : self. mojo _ box _ office _ df [ " gross _ to _ date _ f " ] = self. mojo _ box _ of... | [
-0.035128746181726456,
0.0610368549823761,
0.5265308022499084,
-0.8051148653030396,
-0.12873218953609467,
-0.9071774482727051,
0.0047383797354996204,
0.45476195216178894,
-0.12943488359451294,
-0.025935709476470947,
0.3153371512889862,
-0.03208932280540466,
0.11641572415828705,
0.290234982... |
def getipnum ( filename ) : num = { } with open ( filename,'r') as f : for line in f. readlines ( ) : result2 = re. findall ('[ 0 - 9 ] { 1, 3 } \. [ 0 - 9 ] { 1, 3 } \. [ 0 - 9 ] { 1, 3 } \. [ 0 - 9 ] { 1, 3 } ', line ) if not result2 = = [ ] : result = result2 [ 0 ] if ( result not in num. keys ( ) ) : num [ result ]... | [
-0.9042332172393799,
-0.18075141310691833,
0.9706447124481201,
0.04869750142097473,
-0.46536335349082947,
-0.6248350739479065,
0.5514795184135437,
0.6767510771751404,
-0.5844013690948486,
-0.09129080176353455,
-0.49570557475090027,
-1.1034260988235474,
0.33189651370048523,
-0.6709063649177... |
def test _ cant _ get _ driver _ invalid _ params ( self ) : json _ response = api _ call ( self, " get ",'/ driver / get ', dict ( ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 400 ) self. assertequal ( json _ response [ " message " ],'invalid request') json _ response = api _ call ( self, ... | [
-1.196570873260498,
-0.5705789923667908,
0.8999600410461426,
0.1645345538854599,
0.6868929266929626,
0.26366886496543884,
-1.0292719602584839,
-0.0082999337464571,
-0.3911152780056,
-0.48694688081741333,
-0.034069884568452835,
0.16443048417568207,
-0.4202553629875183,
0.6989845633506775,
... |
def handle _ error ( self, err ) : print ( err ) # log every exception raised in the application # handle httpexceptions if isinstance ( err, httpexception ) : return jsonify ( { " message " : err. msg, " code " : err. code } ), err. code # if msg attribute is not set, # consider it as python core exception and # hide ... | [
-0.4761991500854492,
-0.6441270112991333,
0.6265414953231812,
0.18504393100738525,
-1.283869743347168,
-0.3106071650981903,
-0.48602020740509033,
-0.27738505601882935,
0.6693885326385498,
0.09619276970624924,
0.2861904501914978,
-0.06030900403857231,
-0.14163030683994293,
1.254742026329040... |
def swap _ cities ( road _ map, index1, index2 ) : if index1 = = index2 : return ( road _ map [ : ], compute _ total _ distance ( road _ map ) ) else : new _ road _ map = road _ map [ : ] new _ road _ map [ index1 ] = road _ map [ index2 ] new _ road _ map [ index2 ] = road _ map [ index1 ] new _ total _ distance = com... | [
-1.4973315000534058,
-0.977855920791626,
0.7899138927459717,
-0.1015508621931076,
-0.00027318153297528625,
-0.10891536623239517,
-0.28243696689605713,
-0.07092682272195816,
0.05972367152571678,
0.7488155961036682,
-0.42436841130256653,
0.7397948503494263,
-0.5948299169540405,
-0.7697555422... |
def substitute ( template, subst ) : if template is none : return none return template % safedict ( subst. items ( ) ) | [
0.35039669275283813,
-0.37882739305496216,
0.4632676839828491,
-0.7472296953201294,
-1.4488228559494019,
-0.83094722032547,
-1.8347465991973877,
0.7527453303337097,
0.007260676007717848,
-0.584480881690979,
-1.3043731451034546,
-0.5107999444007874,
-0.44526416063308716,
-0.8554708361625671... |
def create _ neural _ net ( sizes, hidden _ layer _ activation = sigmoid, output _ layer _ activation = sigmoid ) : input _ size = sizes [ 0 ] nnet = neuralnet ( input _ size = input _ size ) layer = inputlayer ( size = input _ size ) for size in sizes [ 1 : ] : layer = layer. create _ next _ layer ( size, activation =... | [
0.028839027509093285,
-0.5638303160667419,
0.4811578691005707,
0.787568986415863,
-0.16719605028629303,
-0.48702651262283325,
0.28779542446136475,
-1.2734344005584717,
0.3095615804195404,
0.266575425863266,
-0.4597167372703552,
-0.2433789223432541,
-0.07275360077619553,
0.31638672947883606... |
def get _ dnp ( self ) : return self. dnp | [
-0.6966957449913025,
-0.2180139720439911,
0.48871856927871704,
-0.2495189756155014,
0.4072107672691345,
0.0737404003739357,
0.16430112719535828,
-0.729216992855072,
0.7569299936294556,
-1.2029632329940796,
-0.3852885663509369,
1.0883179903030396,
0.03834179416298866,
-1.257365345954895,
... |
def cachevaluestime ( self ) : temp = [ ] for key in self. keys ( ) : if self. ttl ( key ) > 0 : temp. append ( ( key, self. _ _ getitem _ _ ( key ) ) ) return temp | [
-1.6275694370269775,
-0.26091644167900085,
0.6415199041366577,
0.05739452689886093,
-0.4509865939617157,
-0.04758209362626076,
-1.13404381275177,
0.09190129488706589,
-0.6434198617935181,
1.4468879699707031,
-1.0453591346740723,
-0.8034162521362305,
0.2550889849662781,
1.5538113117218018,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.