text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def return _ prediction ( self ) : self. pixels [ self. pixels = = 0 ] + = 1 # avoids division by 0 return ( self. pred / self. pixels ) [ :, : self. shape [ 0 ], : self. shape [ 1 ] ] | [
-0.865839421749115,
-0.6314938068389893,
0.44369885325431824,
0.12052788585424423,
-0.25170326232910156,
-0.0396423302590847,
0.7458018064498901,
0.10550206154584885,
-0.22849273681640625,
0.06767116487026215,
0.3908233940601349,
0.035584550350904465,
-0.32911109924316406,
0.80393385887146... |
def testgetvaluesforquerywithsearcherror ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. getvaluesforquery ( session,'has fluiddb / id ', [ u'username / bar'] ) yield self. assertfailure ( deferred, tparseerror ) | [
-0.09752389043569565,
1.0334619283676147,
0.2981754243373871,
0.18612870573997498,
0.5059424638748169,
0.5980942845344543,
-0.6142125129699707,
-0.6146372556686401,
-0.4581833779811859,
-1.10645592212677,
-0.11485326290130615,
-0.7215971946716309,
0.14471790194511414,
0.6382739543914795,
... |
def _ _ str _ hr ( x : int ) - > str : measuresnames = [ " bytes ", " kb ", " mb ", " gb ", " tb ", " pb " ] val = x step = 10 for m in measuresnames : tmp = val > > step if ( tmp = = 0 ) : return " { } { } ". format ( val, m ) if ( val % ( 2 * * step )! = 0 ) : tmp + = 1 val = tmp return " { } { } ". format ( val, mea... | [
0.29772448539733887,
-0.019119514152407646,
0.851848840713501,
-0.3909291923046112,
-0.637069046497345,
1.0940898656845093,
-0.4809696674346924,
-1.0383548736572266,
-1.1958799362182617,
0.3482990264892578,
0.09033897519111633,
-0.4823746085166931,
-0.4810996651649475,
0.1990264356136322,
... |
def fetch _ sql _ res ( self, sql, vals ) : try : cursor = self. db. cursor ( ) cursor. execute ( sql, vals ) res = cursor. fetchall ( ) cursor. close ( ) return res except exception as e : raise e | [
0.2390182763338089,
0.3405170738697052,
0.39746618270874023,
0.7341912388801575,
-0.44814643263816833,
-0.3048745393753052,
-1.7127220630645752,
-0.8813105821609497,
-0.015035238116979599,
0.24508748948574066,
0.6909160017967224,
-0.6579028367996216,
0.004663184285163879,
0.197929218411445... |
def mult ( self, multiplier ) : for key in self. stats : self. stats [ key ] * = multiplier | [
-0.8779239654541016,
0.7512922883033752,
0.4961909055709839,
-0.18159176409244537,
-0.3347383439540863,
0.2952471673488617,
-0.1209413930773735,
-0.7586563229560852,
0.30698439478874207,
-0.15526381134986877,
-0.5752519369125366,
-1.0525652170181274,
0.23760244250297546,
1.4527559280395508... |
def process _ keystroke ( inp, user ) : # pylint : disable = r0914, r0912, r0915, r0911, w0603 # too many local variables # too many branches # too many statements # too many return statements # using the global statement # ^ lol, this is one of those things that should be # refactored into smaller subroutines = ) from... | [
-0.16100215911865234,
-0.11210285127162933,
0.7263118624687195,
0.6470437049865723,
-0.7333545684814453,
-0.9109483957290649,
0.37557104229927063,
0.042711228132247925,
0.278411865234375,
0.13591158390045166,
-0.10914567857980728,
0.8965778350830078,
-0.0821676030755043,
-0.289543896913528... |
def _ _ init _ _ ( self, puzzle, mode ='text') : self. _ puzzle = puzzle self. _ tree = _ controllertree ( puzzle ) self. _ current _ tree = self. _ tree if mode = ='text': self. _ view = textview ( self ) elif mode = ='web': self. _ view = webview ( self ) else : raise valueerror ( ) # start the game. self. _ view. ru... | [
0.08881357312202454,
-0.029273319989442825,
0.5349442958831787,
0.49105969071388245,
-0.5263302326202393,
0.02746550180017948,
1.061490535736084,
0.22596432268619537,
0.865811288356781,
-0.3201095461845398,
-0.3522626459598541,
-0.056962840259075165,
-0.1160462349653244,
0.7208061814308167... |
def improper _ root _ test ( self ) : def _ no _ root ( ) : return filereactor ('quux ', method ='copy') assert _ raises _ regexp ( valueerror, r " ^. * quux is not a directory $ ", _ no _ root ) def _ no _ writable _ root ( ) : root = os. path. join ( self. _ root,'foobar') os. mkdir ( root, 0o500 ) # r - x - - - - - ... | [
0.30360957980155945,
-0.2279258668422699,
0.716545045375824,
0.48790574073791504,
-0.01995866373181343,
0.06747790426015854,
0.921170711517334,
-0.4789748787879944,
0.5141544342041016,
-1.1252073049545288,
0.4440865218639374,
0.588240921497345,
-0.17992758750915527,
0.2585108280181885,
-... |
def linelen ( stanza ) : linesplit = stanza. split ('\ n') return len ( filter ( lambda l : l! ='', linesplit ) ) | [
0.621484637260437,
-0.2027425318956375,
0.4738011062145233,
-0.2831399440765381,
-0.038508202880620956,
-0.09949403256177902,
-0.363400399684906,
1.358385682106018,
-0.06493150442838669,
-0.33864808082580566,
-1.2483733892440796,
-0.7461133003234863,
0.6483787894248962,
0.40832433104515076... |
def generate _ batches ( data, n _ epochs = 5, batch _ size = 64, shuffle = true, random _ state = 75894, batches _ per _ group = - 1, verbose = 1 ) : input _ keys = list ( data. inputs. keys ( ) ) if not input _ keys : return size = data. inputs [ input _ keys [ 0 ] ]. shape [ 0 ] epoch _ done = false batches _ per _ ... | [
-0.5163431167602539,
0.6431312561035156,
0.7221717834472656,
0.7320381999015808,
-0.4907650947570801,
0.5212320685386658,
0.4671691358089447,
-0.40582817792892456,
-0.2970026433467865,
-0.4601970911026001,
0.24112001061439514,
0.21733808517456055,
0.41005170345306396,
0.6094982624053955,
... |
def _ _ init _ _ ( self, name, value = 10 ) : self. name = name self. value = value | [
-0.03452622517943382,
-0.24964989721775055,
0.6284402012825012,
-0.5349982976913452,
-0.5394405722618103,
0.1340065896511078,
-0.3529970347881317,
0.4583393633365631,
0.06401525437831879,
0.6067145466804504,
-1.112324595451355,
-0.03691110014915466,
0.4566282331943512,
0.680820882320404,
... |
def _ _ init _ _ ( self, initial _ bytes = none ) : pass | [
0.6983988285064697,
-0.8547643423080444,
0.36596453189849854,
0.7068763971328735,
-0.20961549878120422,
0.39403513073921204,
0.08601155132055283,
1.1293699741363525,
0.3650349974632263,
-1.1649436950683594,
-0.6269292831420898,
0.021525956690311432,
-0.6923661231994629,
0.21623502671718597... |
def service _ code ( self, line, description ) : line _ name = self. non _ words. sub ( " - ", line. lower ( ) ) components = [ line _ name ] if len ( line _ name ) < = 5 : # add description as shorter line name is less likely to be unique short _ desc = short _ description ( none, description, true ) components. appen... | [
0.05917700007557869,
0.5983179807662964,
0.6860015988349915,
-0.8666334748268127,
-0.11012768000364304,
-0.19082117080688477,
-0.21471312642097473,
0.2242303192615509,
-0.09965881705284119,
0.30029481649398804,
-0.2975882887840271,
0.6529635787010193,
-0.19306042790412903,
0.69261020421981... |
def save _ state ( self, filename ) : with open ( filename, " wb " ) as out _ file : pickle. dump ( ( self. isles, self. pareto _ isle, self. age ), out _ file ) | [
-0.36338508129119873,
-0.8943625092506409,
0.27499815821647644,
-0.4387958347797394,
0.7154911756515503,
1.284448504447937,
-0.24053055047988892,
1.13217031955719,
-0.6304714679718018,
0.11965124309062958,
-1.2750693559646606,
-0.5242019891738892,
0.3772721588611603,
0.38119176030158997,
... |
def test _ idtoken _ at _ hash ( self ) : data = {'client _ id': self. client _ no _ access. client _ id,'redirect _ uri': self. client _ no _ access. default _ redirect _ uri,'response _ type': next ( self. client _ no _ access. response _ type _ values ( ) ),'scope':'openid email ','state': self. state,'nonce': self.... | [
-0.33871719241142273,
-0.10973843932151794,
0.6101136803627014,
-0.5863080620765686,
0.36477842926979065,
0.3800468146800995,
-0.2611481547355652,
-0.628559410572052,
-0.04154143109917641,
-1.1266087293624878,
-0.8798695802688599,
0.3006713092327118,
0.10460960119962692,
-0.554060220718383... |
def testreload ( self ) : gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen ) acc. reload ( ) self. asserttagsequal ( acc. tags ( ), { } ) gen. addscalartensor ( " s1 ", wall _ time = 1, step = 10, value = 50 ) gen. addscalartensor ( " s2 ", wall _ time = 1, step = 10, value = 80 ) acc. reload ( ) ... | [
0.31856197118759155,
0.4030068516731262,
0.5763704776763916,
0.1318874955177307,
-0.14532624185085297,
-0.4101720154285431,
0.44008907675743103,
-0.9891447424888611,
-0.300802618265152,
-0.09456218779087067,
-0.5273915529251099,
0.03523467853665352,
1.1286811828613281,
0.1537112444639206,
... |
def add _ id ( _, name, * ids ) : return row _ ids. add _ id ( name, * ids ) | [
-0.6123608946800232,
0.12402653694152832,
0.29508036375045776,
0.37841522693634033,
-0.0967487320303917,
-0.2751031816005707,
-1.299986481666565,
-0.1939907968044281,
0.39860767126083374,
0.47048428654670715,
-0.5407422184944153,
-0.09530223160982132,
-0.17772932350635529,
-0.0482858195900... |
def _ check _ hash ( transaction ) : tx _ hash = transaction. hash return tx _ hash = = generate _ transaction _ hash ( transaction ) | [
0.2687632143497467,
0.5777185559272766,
0.3181694746017456,
0.9285022616386414,
0.09188681095838547,
0.49800777435302734,
-0.39597347378730774,
-0.1200970709323883,
-0.19677790999412537,
0.35102978348731995,
-0.2945179045200348,
-0.5853851437568665,
0.24978987872600555,
-0.8523441553115845... |
def pre _ discovery _ hook ( parser, options ) : # save the values elements = object _ clone ( parser. elements ) # clear the parser parser. reset ( ) parser. element _ create ( ) # discover the prices for element in elements : volume = element [ 0 ]. replace ( ", ", " " ) price = element [ 1 ] if is _ number ( volume ... | [
-0.36479493975639343,
0.4913146197795868,
0.4712468087673187,
0.33291956782341003,
1.0459703207015991,
-0.6282734870910645,
-0.12551793456077576,
-0.08752713352441788,
0.18628934025764465,
0.23893475532531738,
0.031232966110110283,
-0.4286614954471588,
0.7599727511405945,
1.032910227775573... |
def _ _ call _ _ ( self, * args, * * kwargs ) : return notimplementederror ( " implement method for feature extraction " ) | [
-0.639049232006073,
0.15426461398601532,
0.6238134503364563,
0.40646156668663025,
0.3740774095058441,
-0.18119624257087708,
0.42938852310180664,
0.042844507843256,
0.16903159022331238,
-0.026464475318789482,
-0.6284759640693665,
-0.04952497035264969,
-0.5278414487838745,
0.4853400290012359... |
def test _ list _ alumno _ con _ query _ param ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) anio _ lectivo = self. anio _ lectivo _ 1. id response = self. client. get ( f " / api / alumnos / list /? anio _ lectivo = { anio _ lectivo } " ) self. assertequal ( response. status _ code, statu... | [
0.2484084814786911,
-0.3780730366706848,
0.5232899785041809,
-0.050645358860492706,
0.6404709219932556,
1.4222116470336914,
-1.083320140838623,
-0.09902798384428024,
0.006638553459197283,
-0.09653089195489883,
-0.6497154831886292,
0.4294578731060028,
1.060516595840454,
-0.5249488353729248,... |
def _ killallvboxprocesses ( self ) : for iiteration in range ( 22 ) : # gather processes to kill. aotodo = [ ] ; for oprocess in utils. processlistall ( ) : sbase = oprocess. getbaseimagenamenoexesuff ( ) ; if sbase is none : continue ; sbase = sbase. lower ( ) ; if sbase in ['vboxsvc ','virtualbox ','virtualboxvm ','... | [
-0.27811336517333984,
-0.05379215255379677,
0.8963907361030579,
0.3312561511993408,
0.17306779325008392,
-0.009784380905330181,
-0.12474223226308823,
-1.0051400661468506,
0.21304500102996826,
0.8381103873252869,
-0.39145591855049133,
0.15042157471179962,
-0.15540872514247894,
0.54123270511... |
def weeks _ month ( _, nodes ) : weeks = { " first " : 0b00001, " second " : 0b00010, " third " : 0b00100, " fourth " : 0b01000, " fifth " : 0b10000, } if isinstance ( nodes, et. _ element ) : element = nodes elif nodes and nodes [ 0 ] : element = nodes [ 0 ] else : return ns = { " txc " : element. xpath ( " namespace ... | [
0.5364064574241638,
0.30719834566116333,
0.8076940178871155,
-0.6862090229988098,
0.03001815266907215,
-0.6940316557884216,
0.5152289867401123,
-0.289251446723938,
0.8690337538719177,
-0.2532886266708374,
0.7758740782737732,
-0.3571096360683441,
-0.31379610300064087,
0.4114828109741211,
... |
def guest ( ) : greet = input ( " hello, please enter your name : " ) with open ( filename1,'w') as file _ object : file _ object. write ( greet ) | [
-0.5917972922325134,
-0.26694098114967346,
0.6177862286567688,
1.1774084568023682,
-0.23256829380989075,
1.4118562936782837,
0.8565929532051086,
0.37115389108657837,
-1.2063935995101929,
-0.15248838067054749,
-1.4438133239746094,
0.5172824263572693,
0.014307662844657898,
0.0357723757624626... |
def readline ( self, limit = - 1 ) : pass | [
-0.49536892771720886,
0.018328161910176277,
0.6581223011016846,
0.8986603617668152,
0.6839250326156616,
0.3663991689682007,
-0.5032082796096802,
-0.07154692709445953,
-0.6134177446365356,
-0.7678471803665161,
0.5066297054290771,
0.7477012276649475,
-0.5368911027908325,
-1.3070273399353027,... |
def helmholtz _ hodge ( self, fx, fy, gtype ='tri ', btype = 1 ) : if gtype = ='tri': op _ gtype ='vor'else : op _ gtype ='tri'# solving for the curl - free vector field : # take the divergence of the vector field : divf = self. div _ xy ( fx, fy, gtype = gtype, btype = btype ) # the scalar potential of the curl - free... | [
-0.20475125312805176,
0.41950204968452454,
0.8114892244338989,
0.06260071694850922,
0.3376959264278412,
0.13390406966209412,
0.14582863450050354,
-0.4094720780849457,
-0.6830413341522217,
0.341155081987381,
-0.029021626338362694,
0.36601048707962036,
-0.9419378042221069,
0.0079228030517697... |
def _ _ getitem _ _ ( self, chrom ) : if chrom in self. _ chroms : return self. _ chroms [ chrom ] else : chromosome = chromosomesubset ( chrom, self ) self. _ chroms [ chrom ] = chromosome return chromosome | [
0.08811046183109283,
0.32013019919395447,
0.5206142663955688,
-0.10538911819458008,
-0.7778766751289368,
0.019698334857821465,
0.7586061954498291,
-0.8768920302391052,
0.46415871381759644,
-1.3634002208709717,
0.387483149766922,
0.779233992099762,
-0.6681872606277466,
-1.24154794216156,
... |
def _ update _ items _ data ( self ) : pass | [
-1.7683182954788208,
-1.6628236770629883,
0.2311357706785202,
-0.24326153099536896,
-0.05400986596941948,
1.2774102687835693,
-0.5985026359558105,
0.29194292426109314,
-0.8567919731140137,
0.2969498932361603,
-0.6752443909645081,
-0.08826490491628647,
0.4002446234226227,
-0.253912061452865... |
def test _ register _ status _ code ( self ) : # create client. response = self. client. get ('/ user _ auth / register /') self. assertequal ( response. status _ code, 200 ) | [
-0.2194346785545349,
0.7141715884208679,
0.17207032442092896,
1.117226481437683,
1.2979201078414917,
0.6755814552307129,
-0.27540650963783264,
1.0989586114883423,
-0.5847688913345337,
-0.6946048140525818,
-0.8980466723442078,
0.405892938375473,
0.8109433054924011,
-0.11575677245855331,
0... |
def pivot ( a, aux, p, q, colum, v, piv = 0 ) : if piv > 2 or piv < 0 : exit ('valores invalidos para el parametro pivoteo, valores validos : 0, 1, 2.') n = len ( a ) temp = a [ colum ] [ colum ] if ( temp = = 0. 0 and piv = = 0 ) : row _ maxcolumn = maxcolum ( a, colum ) a = pivotp ( a, row _ maxcolumn, colum ) p = ex... | [
0.2862597405910492,
0.26340052485466003,
0.8999332785606384,
0.19629496335983276,
-0.1514851599931717,
0.12938998639583588,
-0.3418678343296051,
0.3026278018951416,
0.8463801145553589,
0.5606910586357117,
0.5742794275283813,
0.04335009306669235,
-0.12834532558918,
0.1362917423248291,
-0.... |
def _ mgui _ set _ orientation ( self, value ) - > any : orientation = qt. vertical if value = = " vertical " else qt. horizontal self. _ qwidget. setorientation ( orientation ) | [
-0.0879097506403923,
0.7846908569335938,
0.2679727077484131,
0.2376515418291092,
-0.02162553369998932,
0.47510814666748047,
0.10382858663797379,
-0.9591376781463623,
-0.6431215405464172,
0.765598714351654,
-0.6713442802429199,
-0.7144166827201843,
-0.168327197432518,
0.17570306360721588,
... |
def stats _ saved ( self ) : return self. _ stats _ saved | [
-0.22494687139987946,
0.4583429992198944,
0.36441320180892944,
0.10165534913539886,
0.9580301642417908,
0.7815179228782654,
0.7900571227073669,
-0.6964656114578247,
0.59475177526474,
-0.10561104118824005,
-1.4343149662017822,
-0.238766610622406,
0.2971595525741577,
-0.1745292842388153,
-... |
def col _ mean ( arr, wt = none ) : arr = np. array ( arr ) validate _ input ( len ( arr. shape ) = = 2, " function admits an array of 2 dims " ) return [ mean ( arr [ :, i ] ) for i in range ( arr. shape [ 1 ] ) ] | [
-1.103092074394226,
-0.45398321747779846,
0.778395414352417,
0.5611151456832886,
-0.44524654746055603,
-0.10712601244449615,
0.21834063529968262,
-0.6413158774375916,
0.11537645012140274,
1.5135283470153809,
-0.36845076084136963,
0.6868380308151245,
0.5675798058509827,
0.34301912784576416,... |
def knn _ predict ( k, d, ds ) : def distance ( x, xp ) : return len ( x | xp ) - len ( x & xp ) distances = [ ( xp, distance ( d, yp ) ) for xp, yp in ds ] if k = = 1 : # the closest p return min ( distances, key = itemgetter ( 1 ) ) [ 0 ] # k > 1 distances. sort ( key = itemgetter ( 1 ) ) nn = distances [ : k ] pdb. ... | [
-0.5009890794754028,
0.6597743630409241,
0.4410635828971863,
0.20577757060527802,
-1.0248674154281616,
-0.5016640424728394,
-0.8738945722579956,
0.5754827260971069,
0.20240414142608643,
-0.37862876057624817,
0.1770770400762558,
0.09798361361026764,
0.6174114942550659,
-0.062106724828481674... |
def insert ( self, val : int ) - > bool : if val in self. hash _ map : return false self. queue. append ( val ) self. hash _ map [ val ] = len ( self. queue ) - 1 return true | [
-0.5979100465774536,
0.9772803783416748,
0.8769755959510803,
-0.4348331689834595,
-0.38727807998657227,
0.7193911671638489,
-0.20908404886722565,
-0.45116713643074036,
-0.33521586656570435,
0.0329686664044857,
-1.1279847621917725,
-0.9682140946388245,
-0.9972817897796631,
0.821402549743652... |
def checked ( self, * args ) : return _ topods. topods _ tshape _ checked ( self, * args ) | [
-0.22646981477737427,
0.18831923604011536,
0.31018397212028503,
-0.1738121509552002,
0.28759250044822693,
0.4414290189743042,
0.8506832122802734,
-0.9297730922698975,
-1.021793007850647,
0.5484128594398499,
-0.17911815643310547,
-0.07757161557674408,
-0.17567667365074158,
-0.10436936467885... |
def preprocess ( self, image ) : image = image. fromarray ( image ) image = image. resize ( ( 512, 512 ), resample = image. bicubic ) image = np. array ( image ) image = image / 255. 0 return image | [
-0.4232267737388611,
0.16158463060855865,
0.6251659989356995,
-0.4576839506626129,
-0.24934780597686768,
-0.3668051064014435,
0.1521531641483307,
-0.3514097332954407,
1.8238821029663086,
0.2907092571258545,
0.9421603679656982,
0.3062107563018799,
0.010784117504954338,
0.6575557589530945,
... |
def iscolor ( image ) : # color image has 3 channels, rgb. if image. shape [ 2 ] = = 3 : return true return false | [
-0.2847711741924286,
0.17523027956485748,
0.3522672951221466,
0.9439499378204346,
0.8397216200828552,
0.8885343670845032,
-0.7130300998687744,
0.2992197573184967,
0.5536800622940063,
0.7284029126167297,
0.45194852352142334,
0.19027745723724365,
-0.31926965713500977,
0.815070629119873,
-1... |
def delete ( id ) : scrape = get _ scarpe ( id ) db. session. delete ( scrape ) db. session. commit ( ) return redirect ( url _ for ( " webscrap. index " ) ) | [
-1.0493807792663574,
0.4649403691291809,
0.5917321443557739,
0.4260769486427307,
0.5384417772293091,
0.29917392134666443,
0.22112219035625458,
0.6170394420623779,
0.9315026998519897,
0.4908885955810547,
0.02584635093808174,
-0.35091179609298706,
0.623283326625824,
-0.3958784341812134,
0.... |
def _ json _ http _ response ( content, status = 200 ) : return _ text _ http _ response ( json. dumps ( _ values _ to _ json ( content ) ), status = status ) | [
-1.0147250890731812,
-1.3958113193511963,
0.2247180938720703,
-0.8170632123947144,
-0.968781590461731,
-0.6711329817771912,
-0.6302686333656311,
-0.566219687461853,
-0.6202356815338135,
1.17660391330719,
-1.0874593257904053,
-0.008872509934008121,
-0.05994504317641258,
-0.18064306676387787... |
def parse _ file ( self ) : current _ index = 0 # loop through the self. parts dictionary and assign each property with the corresponding value for k, v in self. parts. items ( ) : if isinstance ( v, int ) : setattr ( self, k, self. contents [ current _ index : current _ index + v ] ) current _ index + = v elif v = = "... | [
-0.28654417395591736,
-0.7609462738037109,
0.3598285913467407,
-0.9020273089408875,
0.28383010625839233,
-0.11444856971502304,
-0.016016148030757904,
0.6093090772628784,
-1.2434766292572021,
-0.9160094857215881,
0.04903894662857056,
-0.7927388548851013,
-0.03453798219561577,
0.438917338848... |
def open _ project ( pid : str ) : if'uid'in session : user _ info = app. config ['user _ store']. get _ user _ info ( session ['uid'] ) user _ info _ json = json. dumps ( user _ info ) project _ config _ path = get _ project _ config _ path ( session ['uid'], pid ) project = project ( project _ config _ path ) return ... | [
-0.5927602648735046,
0.10507473349571228,
0.3822135329246521,
-0.034813594073057175,
-0.5957881808280945,
0.8712072968482971,
0.3885524272918701,
0.7789018154144287,
0.8568181395530701,
-0.20503182709217072,
0.57902592420578,
-0.5191964507102966,
-0.12328313291072845,
-0.7395022511482239,
... |
def conditiontext ( self ) : value = self. valuestr. replace ('\ \ ','\ \ \ \'). replace ('" ','\ \ "') return'% s % s % s " % s "'% ( self. booloper, self. field. name, self. oper, value ) | [
0.398628830909729,
-1.595092535018921,
0.47394201159477234,
-0.3425945043563843,
-1.3340120315551758,
0.38884085416793823,
0.24914062023162842,
0.18194521963596344,
-0.9204453825950623,
1.0121110677719116,
0.26026853919029236,
-0.29977014660835266,
-0.8426541090011597,
-0.23380976915359497... |
def get _ args ( ) : # more data validation would be a good idea here # strip anything other than characters listed signer _ email = pattern. sub ( " ", request. form. get ( " signer _ email " ) ) signer _ name = pattern. sub ( " ", request. form. get ( " signer _ name " ) ) cc _ email = pattern. sub ( " ", request. fo... | [
-0.9252386689186096,
0.019819775596261024,
0.7933828234672546,
-0.6606520414352417,
-0.4389505088329315,
-0.6764551401138306,
-0.003326516831293702,
0.17241257429122925,
-0.3047432005405426,
0.2933158874511719,
-0.7398254871368408,
0.2811618745326996,
0.1736607402563095,
0.5989831686019897... |
def dir _ is _ writeable ( dir ) : pwd = dirutils. pwd ( ) + os. path. sep if dir and not os. path. isdir ( pwd + dir ) : raise argumenttypeerror ( ('% s is not a valid directory'% dir ) ) elif dir and not os. access ( dir, os. w _ ok ) : raise argumenttypeerror ( ('% s is not a writeable directory'% dir ) ) return pwd... | [
-0.9644727110862732,
0.06860606372356415,
0.8489919900894165,
0.08076661825180054,
-0.19711241126060486,
0.5718098282814026,
1.2142002582550049,
0.030821429565548897,
0.634548008441925,
-0.10491623729467392,
1.4599840641021729,
0.14246894419193268,
-0.8885205388069153,
-0.02971658669412136... |
def convert _ channel3 _ png ( root _ dir _ dataset, num _ channels = 3 ) : for folder in os. listdir ( root _ dir _ dataset ) : image _ folder _ dir = join ( root _ dir _ dataset, folder,'images') for images in os. listdir ( image _ folder _ dir ) : image _ filename = join ( image _ folder _ dir, images ) # when readi... | [
-0.6307814121246338,
-0.03567167744040489,
0.7314568758010864,
-0.41506513953208923,
-0.012122445739805698,
0.13700848817825317,
-0.26095423102378845,
-0.2540607154369354,
0.09432823210954666,
0.6032149791717529,
0.5621540546417236,
-0.004584049805998802,
0.4383730888366699,
0.045580025762... |
def build _ model ( ) : pipeline = pipeline ( [ ('vect ', countvectorizer ( tokenizer = tokenize ) ), ('tfidf ', tfidftransformer ( ) ), ('clf ', multioutputclassifier ( randomforestclassifier ( ) ) ) ] ) parameters = {'vect _ _ ngram _ range': ( ( 1, 1 ), ( 1, 2 ) ),'vect _ _ max _ df': ( 0. 5, 0. 75, 1. 0 ) } pipelin... | [
0.054578013718128204,
0.05820635333657265,
0.4035605490207672,
0.8712217807769775,
0.3057520389556885,
-0.20415277779102325,
0.07142373919487,
0.05468433350324631,
-0.9169459939002991,
-0.10168129205703735,
-0.14530080556869507,
-0.14507587254047394,
0.5015837550163269,
0.1926216185092926,... |
def _ get _ initial _ video _ info ( self, video _ id ) : original _ url = self. _ yt _ video _ template. format ( video _ id ) html, yt _ initial _ data = self. _ get _ initial _ info ( original _ url ) if not yt _ initial _ data : # fatal error raise parsingerror ('unable to parse initial video data. { } '. format ( ... | [
0.3491573631763458,
-0.9313062429428101,
0.8474758863449097,
-0.5018969774246216,
-0.2944047451019287,
-0.4938579797744751,
0.38716861605644226,
-0.37233027815818787,
0.0785168707370758,
-0.17292369902133942,
-0.8697867393493652,
0.5764172673225403,
0.3295556306838989,
0.8979126214981079,
... |
def create ( asyncsocketspool, srvaddr, connecttimeout = 5, recvbuflen = 4096, sendbuflen = 4096, connectasync = true ) :... | [
-0.5118102431297302,
0.6382932066917419,
0.504056453704834,
0.27433493733406067,
0.11188971251249313,
-0.3381746709346771,
0.9756129384040833,
-1.3750232458114624,
0.3457862436771393,
0.18743199110031128,
-0.913712739944458,
0.8844413161277771,
-0.06434940546751022,
0.3748384416103363,
-... |
def get _ state _ values _ logits _ parameters _ log _ probs ( self, nn _ input, internal _ states = none ) : nn _ output = self. get _ nn _ output ( nn _ input, internal _ states ) logits, parameters, log _ probs = self. _ graph _ fn _ get _ action _ adapter _ logits _ parameters _ log _ probs ( nn _ output [ " output... | [
-0.7407482266426086,
-0.27738040685653687,
0.32028818130493164,
-0.40267089009284973,
-0.09827213734388351,
-0.9270024299621582,
-0.8914332389831543,
-0.771456778049469,
-0.23209470510482788,
0.11646702140569687,
-0.010538985952734947,
0.1102575734257698,
0.09454543143510818,
0.23772598803... |
def up _ half ( self ) : new _ interval = ( self. get _ interval ( ) + c. intvl _ min _ 2 ) % c. intvl _ octave new _ note = none if self. get _ note _ name ( ) = = c. note _ b : # b - > c new _ note = note ( c. note _ c, c. tone _ natural, new _ interval ) elif self. get _ note _ name ( ) = = c. note _ e : # e - > f n... | [
0.15208785235881805,
-0.9556723833084106,
0.8974140882492065,
-0.13895747065544128,
-0.5060418248176575,
0.6132375597953796,
0.09104305505752563,
-0.8215675354003906,
-0.4689011573791504,
0.38643553853034973,
-0.008560989052057266,
0.43982067704200745,
-0.20830188691616058,
-0.531762957572... |
def getblocks ( object, lstrip = false, enclosing = false, locate = false ) : lines, lnum = findsource ( object ) if ismodule ( object ) : if lstrip : lines = _ outdent ( lines ) return ( [ lines ], [ 0 ] ) if locate is true else [ lines ] # xxx :'enclosing'means : closures only? or classes and files? indent = indentsi... | [
-0.5842387080192566,
-0.3591933846473694,
0.9703516364097595,
0.5334404706954956,
-0.28698495030403137,
-0.8830766677856445,
0.3668413460254669,
0.10803239047527313,
0.3328928053379059,
0.24424809217453003,
-0.4901817739009857,
0.3392927646636963,
0.24632097780704498,
0.5424163341522217,
... |
def reset ( self ) : self. _ game _ played = false self. _ stats _ calculated = false self. _ stats _ saved = false | [
-0.10961364209651947,
0.3833770155906677,
0.4745475649833679,
-0.2824362814426422,
1.0688433647155762,
0.7573131322860718,
0.7917978763580322,
-1.402872920036316,
-0.7587713003158569,
0.1620616912841797,
-0.5756691098213196,
0.5422894358634949,
-0.17407529056072235,
-0.1894913613796234,
... |
def calculate _ nerve _ ap ( self ) : numpoints = 21 precise _ array = [ [ 0. 0 for y in range ( 0, numpoints, 1 ) ] for x in range ( 0, len ( self. temps ), 1 ) ] delta _ length = self. length / numpoints for y in range ( 0, len ( self. temps ), 1 ) : for x in range ( 0, numpoints, 1 ) : temp = 0. 0 for z in range ( 0... | [
0.24948559701442719,
-0.594322144985199,
0.8891947865486145,
-0.5786913633346558,
0.19903714954853058,
-0.170694038271904,
0.2416008710861206,
-0.15742814540863037,
0.6028132438659668,
0.7741430997848511,
0.2793844938278198,
-0.0021562688052654266,
-0.4737134873867035,
-0.44201844930648804... |
def mother _ bam _ file ( testapp, project, institution, file _ formats, mother _ bam _ qc ) : item = {'project': project ['@ id'],'institution': institution ['@ id'],'file _ format': file _ formats. get ('bam'). get ('uuid'),'filename':'test _ proband _ file. bam ', " quality _ metric " : mother _ bam _ qc [ " @ id " ... | [
0.7798836827278137,
-0.10707944631576538,
0.4061494767665863,
0.38521522283554077,
0.8138187527656555,
0.7093710899353027,
-0.540455162525177,
-0.7154474854469299,
-1.2842551469802856,
0.46130606532096863,
0.6209242939949036,
0.3429359793663025,
-0.6627910733222961,
-0.46680912375450134,
... |
def closed ( self, * args ) : return _ topods. topods _ tshape _ closed ( self, * args ) | [
-0.6067934632301331,
-0.2291414588689804,
0.3950433135032654,
-0.9603747725486755,
-0.18394358456134796,
1.1726152896881104,
0.37495362758636475,
-1.0578830242156982,
-0.8472269773483276,
-0.3802255094051361,
-0.4036940932273865,
-0.39924076199531555,
0.05651027336716652,
0.046992111951112... |
def get _ war _ text ( self ) : war _ text = self. get _ text ( self. pop _ public _ waring _ text ) return war _ text | [
-1.1540284156799316,
-0.18809685111045837,
0.4334837794303894,
0.730286180973053,
-0.787396252155304,
0.43423035740852356,
-1.053778052330017,
-0.2491527497768402,
0.04792291671037674,
1.098047137260437,
-0.29989418387413025,
0.5915423035621643,
-0.14810395240783691,
-0.7939057350158691,
... |
def filter _ known _ bad ( orbit _ points ) : ops = orbit _ points bad = np. zeros ( len ( orbit _ points ), dtype = bool ) bad | = ( ops [ " name " ] = = " oormpen " ) & ( ops [ " date " ] = = " 2002 : 253 : 10 : 08 : 52. 239 " ) bad | = ( ops [ " name " ] = = " oormpen " ) & ( ops [ " date " ] = = " 2004 : 010 : 10 :... | [
-0.8124933242797852,
-0.9202154278755188,
0.7146435379981995,
-0.19347237050533295,
0.08766820281744003,
0.6507227420806885,
-0.8154884576797485,
0.03512551635503769,
0.2647271454334259,
1.0764074325561523,
0.37589478492736816,
1.2216297388076782,
0.17206533253192902,
0.01764601841568947,
... |
def storage ( storage _ config, index ) : if'dict'in storage _ config : return inmemorystorage ( storage _ config ['dict'] ) else : raise valueerror ( " only supports built - in dictionaries!!!! " ) | [
-0.17715121805667877,
0.19461114704608917,
0.33666303753852844,
-0.006363905034959316,
-0.25688135623931885,
-0.3976735770702362,
-0.2827286720275879,
0.0627053827047348,
0.2068919986486435,
0.033023640513420105,
0.15502235293388367,
-0.1584848165512085,
-0.7407981157302856,
-0.33938813209... |
def download _ website _ pdfs ( url, destination ) : files = [ ] if not os. path. exists ( destination ) : os. mkdir ( destination ) response = requests. get ( url ) soup = beautifulsoup ( response. text,'html. parser') for link in soup. select ('a [ href $ = ". pdf " ]') : file _ name = os. path. join ( destination, l... | [
-0.3377060294151306,
-0.44355538487434387,
0.799812376499176,
0.5536758303642273,
0.3675508201122284,
-0.8650215864181519,
0.1873331218957901,
-0.18446767330169678,
0.23549121618270874,
0.39710673689842224,
0.03611113876104355,
-0.281655490398407,
0.19424936175346375,
-0.24436824023723602,... |
def truncate _ pattern ( patt, star _ len = 10, plus _ len = none ) : star _ len = int ( star _ len ) if star _ len > 1000000 : logger. warn ( " that's a realy big kleine star ( * ). " + " do you really want { } - char strings in your language? ". format ( star _ len ) ) if plus _ len is none : plus _ len = star _ len ... | [
0.4113015830516815,
0.11155856400728226,
0.6478216052055359,
-0.8622010946273804,
-1.1594486236572266,
0.3359416723251343,
0.24681298434734344,
0.7876119017601013,
0.8465867638587952,
0.027430061250925064,
-0.33980220556259155,
0.945414125919342,
-0.5904622077941895,
-0.44186168909072876,
... |
def _ _ init _ _ ( self, panel _ id : str, version : str = none, confidence _ level : str = " 3 " ) : self. id = str ( panel _ id ) self. version = version self. confidence _ level = confidence _ level self. query _ panel _ data ( ) | [
0.2549605965614319,
-0.7055951952934265,
0.4084149897098541,
0.17102652788162231,
0.15617206692695618,
0.9477561116218567,
-0.8598993420600891,
0.22280322015285492,
-0.30490365624427795,
0.003120000008493662,
-0.6420052647590637,
0.5675691962242126,
-1.0795408487319946,
0.19230899214744568... |
def vox _ rgba _ content ( palette : dict [ tuple [ int, int, int, int ], int ] ) - > bytes : # while the palette contains at most 255 unique colors ( indices 0 - 254 ), the # palette is stored as 256 entries. so, the last is stored as 0x00000000. assert ( len ( palette ) < = 255 ) # the palette is stored as a dict [ (... | [
-0.8140184879302979,
0.024907350540161133,
0.7733697891235352,
-1.0555427074432373,
-0.29445701837539673,
-0.19535112380981445,
0.18959233164787292,
-0.8749713897705078,
0.3592315912246704,
0.5067040324211121,
-0.4709414839744568,
-0.09879311919212341,
-0.4855811893939972,
-0.5202065110206... |
def get ( ) : apartments = apartmentrepository. get ( ) apartment _ json = [ ob. json for ob in apartments ] return jsonify ( {'apartments': apartment _ json } ) | [
-1.1306802034378052,
-1.267629861831665,
0.3579869270324707,
-0.07781533151865005,
-0.5614192485809326,
-0.16613072156906128,
-1.1580393314361572,
0.16442351043224335,
-0.1273275464773178,
0.7204301953315735,
-0.6161279678344727,
0.29157036542892456,
0.4733715355396271,
0.2236769199371338,... |
def _ eta _ usec ( self ) : return int ( round ( self. eta _ posix * 1e6 ) ) | [
0.28710827231407166,
-0.6440922021865845,
0.6086311340332031,
-1.0826189517974854,
0.17656996846199036,
-1.0106103420257568,
1.1653690338134766,
-0.24265731871128082,
-0.45136693120002747,
0.5053543448448181,
0.9803309440612793,
-1.1162700653076172,
1.0493199825286865,
-0.20957979559898376... |
def apply _ at ( self, vec, et ) : return self. reinterpolate ( et ). _ rots. apply ( vec ) | [
-0.5474806427955627,
-0.01612287200987339,
0.472879558801651,
-0.5844436287879944,
-0.20532207190990448,
-0.12142571806907654,
-0.607111394405365,
-0.6073344945907593,
0.1376362442970276,
-0.16608010232448578,
0.19670656323432922,
0.3337954878807068,
0.26692888140678406,
-1.405722022056579... |
def create _ post ( ) : if not request. json : abort ( 400 ) form = posteditform. from _ json ( request. json, skip _ unkown _ keys = false ) if form. validate ( ) : post = post ( json = form. data ) objid = mongo. db. posts. insert ( post. to _ bson ( ) ) post. id = str ( objid ) return jsonify ( * * post. to _ dict (... | [
-0.662672758102417,
-0.14623557031154633,
0.7843899130821228,
0.567803144454956,
0.3922637701034546,
0.6233595609664917,
-0.5338055491447449,
0.12958797812461853,
-0.13101613521575928,
0.16985896229743958,
-0.7935214638710022,
-1.0658512115478516,
-0.9178497791290283,
-0.03516530990600586,... |
def custom _ namespaces _ per _ services ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input ['integrationcustomnamespacesperserviceargs'] ] ] ] : return pulumi. get ( self, " custom _ namespaces _ per _ services " ) | [
0.3243621587753296,
0.5970333814620972,
0.46488288044929504,
0.10223883390426636,
-0.4516768455505371,
0.8316469192504883,
0.4773271083831787,
-0.44179999828338623,
1.543070912361145,
-0.17596794664859772,
-0.2486581653356552,
0.596720278263092,
-0.05015208572149277,
0.23318003118038177,
... |
def _ _ len _ _ ( self ) - > int : return len ( self. _ entries ) | [
0.3954813480377197,
-0.22228673100471497,
0.17742182314395905,
-1.690327763557434,
0.5672576427459717,
0.17317302525043488,
0.4198518395423889,
0.947225034236908,
0.28727850317955017,
-0.7438803911209106,
-0.9927293658256531,
0.10145734250545502,
0.7281199097633362,
0.11599276959896088,
... |
def query _ panel _ data ( self ) : path = [ " panels ", self. id ] param = { " version " : self. version } url = build _ url ( path, param ) data = get _ panelapp _ response ( url ) if data : self. data = data self. name = self. data [ " name " ] self. hash _ id = self. data [ " hash _ id " ] self. version = self. dat... | [
0.40277186036109924,
-0.6260142922401428,
0.4566534459590912,
-0.22383666038513184,
-0.3041630983352661,
0.31102120876312256,
-0.9051214456558228,
-1.0080894231796265,
-0.19008919596672058,
-0.8259596824645996,
-0.7017380595207214,
-0.008850780315697193,
-1.2592755556106567,
0.154788553714... |
def _ _ init _ _ ( self, input _ jack _ file ) : self. _ _ input _ file = input _ jack _ file # the input file, of file type self. _ _ next _ token = none # a tuple, ( token, token _ type ). self. _ _ next _ token _ type = none # token _ type is one of token _ type _ dict keys. self. _ _ string _ counter = 0 self. _ _ ... | [
-0.24281899631023407,
-0.6921586394309998,
0.5999809503555298,
0.2621494233608246,
-0.42535439133644104,
-0.1431845873594284,
0.589094340801239,
0.35016149282455444,
-0.6666132211685181,
-0.28061848878860474,
-0.3900502026081085,
-0.20823344588279724,
-0.3888400197029114,
0.527589201927185... |
def valid _ next _ segment ( self, new _ edge ) : last = self. segments [ - 1 ]. v2 if last = = new _ edge. v2 : return true else : return false pass | [
-0.7802379131317139,
-0.3588215708732605,
0.7683021426200867,
0.3823081851005554,
-0.15741638839244843,
0.37763711810112,
-0.5193172097206116,
-0.8653746247291565,
0.09832201153039932,
0.89667147397995,
-0.19483357667922974,
-0.19628764688968658,
-0.7340456247329712,
-0.46625232696533203,
... |
def calculate _ uint ( self, mask _ uniformity, image ) : roivoxelvals = [ ] # initialise variable for voxel vals from image data dims = mask _ uniformity. shape for i in np. linspace ( 0, dims [ 0 ] - 1, dims [ 0 ], dtype = int ) : for j in np. linspace ( 0, dims [ 1 ] - 1, dims [ 1 ], dtype = int ) : if mask _ unifor... | [
-0.7466634511947632,
-0.3232279419898987,
0.709389865398407,
0.11350316554307938,
0.2739872634410858,
-0.40621399879455566,
0.6789901852607727,
0.4713349938392639,
0.7409762740135193,
0.32992589473724365,
-0.24716635048389435,
0.16727447509765625,
0.4425652325153351,
1.135497808456421,
0... |
def _ _ init _ _ ( self, name, batch _ size ) : super ( firstoperator, self ). _ _ init _ _ ( name ) self. batch _ size = batch _ size self. counter = 1 self. batch _ number = 1 | [
0.34068986773490906,
0.6054652333259583,
0.6496748328208923,
0.5945855975151062,
-0.44588932394981384,
-0.9982690215110779,
0.1650668829679489,
0.8132027387619019,
-0.1424289047718048,
-0.4031960666179657,
-1.1913223266601562,
-0.8582242131233215,
0.12467225641012192,
0.8026815056800842,
... |
def _ _ generate _ res _ list ( self ) : res _ x, res _ y = self. output. origin _ res _ x, self. output. origin _ res _ y return [ " use rops " ] + [ " % d % % ( % dx % d ) " % ( i, res _ x / 100. 0 * i, res _ y / 100. 0 * i ) for i in [ 100. 0, 75. 0, 50. 0, 25. 0, 10. 0, 5. 0 ] ] | [
-0.9205322265625,
-0.5587999820709229,
0.7053031325340271,
-0.9047002196311951,
0.5891152024269104,
-0.23745618760585785,
0.3999658524990082,
-0.07655216008424759,
-0.08669058978557587,
0.7033640742301941,
0.15114067494869232,
-1.0392320156097412,
0.663526713848114,
-0.28332385420799255,
... |
def density _ x _ y _ set ( self, x, y, s ) : # s doesn't take str ( y ) x _ in = x. copy ( ) [ : self. d ] if s! = [ ] : # if condition on numeric variable s x _ in = x _ in [ s ] mean = self. mean [ y ] [ s ] cov = self. cov [ y ] [ s ] [ :, s ] else : # this loops is useless? mean = self. mean [ y ] cov = self. cov ... | [
-0.5492518544197083,
-0.6658739447593689,
0.5294939279556274,
-0.28693729639053345,
-1.290658950805664,
-0.4385160505771637,
-0.2407558411359787,
0.08057288080453873,
-0.043605681508779526,
0.44324609637260437,
0.7503780126571655,
0.8090823888778687,
0.5229699015617371,
-0.6193442344665527... |
def kmeans ( self, no _ of _ clusters ) : z = self. im. reshape ( ( - 1, 3 ) ) z = np. float32 ( z ) criteria = ( cv2. term _ criteria _ eps + cv2. term _ criteria _ max _ iter, 10, 1. 0 ) ret, label, center = cv2. kmeans ( z, no _ of _ clusters, none, criteria, 10, cv2. kmeans _ random _ centers ) center = np. uint8 (... | [
-0.8523738384246826,
-0.16701488196849823,
0.5656874179840088,
-0.14443042874336243,
0.029748590663075447,
-0.5427473187446594,
0.12501823902130127,
-0.26601266860961914,
1.4845733642578125,
0.7428356409072876,
0.4490824341773987,
0.6681708097457886,
-0.008976150304079056,
-0.2210344076156... |
def gymmake ( robot _ task _ env _ name, max _ steps _ per _ ep = 10000 ) : rospy. logwarn ( " env : { } will be imported ". format ( robot _ task _ env _ name ) ) result = register _ gym _ env ( task _ env = robot _ task _ env _ name, \ max _ episode _ steps _ per _ episode = max _ steps _ per _ ep ) if result : env =... | [
-0.19484585523605347,
0.6549152135848999,
0.5583322048187256,
0.777550220489502,
0.5262698531150818,
0.48546302318573,
0.12821924686431885,
-0.20991480350494385,
-0.486811101436615,
0.21737954020500183,
-0.5781948566436768,
0.5226514339447021,
0.12209513783454895,
-0.4642487168312073,
0.... |
def _ add _ expected _ values _ local ( self, local _ data ) : local _ data [ interpretdata. extra ] = { interpretdata. names : [ interpretdata. base _ value ], interpretdata. scores : self. expected _ values, interpretdata. values : [ 1 ] } return local _ data | [
-0.23718766868114471,
-0.6226322650909424,
0.347615510225296,
-1.838279128074646,
0.006470422260463238,
0.739591658115387,
-0.7371943593025208,
1.1282331943511963,
0.10402395576238632,
-0.5610213875770569,
-0.15034186840057373,
0.3032592535018921,
-0.08673360198736191,
0.5179986953735352,
... |
def updateparams ( self, gradients ) : for i in xrange ( len ( self. params ) ) : self. params [ i ]. set _ value ( self. params [ i ]. get _ value ( ) - gradients [ i ] / ( 1 / self. learning _ rate + self. iterations ) ) | [
-0.49280011653900146,
0.010780110955238342,
0.20408347249031067,
0.041240569204092026,
0.15277975797653198,
0.5209295153617859,
-0.10701675713062286,
-0.15660667419433594,
-0.9453834295272827,
1.339245319366455,
0.21245893836021423,
0.416759192943573,
-0.9317006468772888,
1.269882202148437... |
def config ( vm _ names ) : print ( " graph _ title kvm network i / o " ) print ( " graph _ vlabel bytes rx ( - ) / tx ( + ) per second " ) print ( " graph _ category virtualization " ) print ( " graph _ args - - base 1024 " ) print ( " graph _ info this graph shows the network i / o of the virtual " " machines. it is ... | [
0.4192892909049988,
0.008268935605883598,
0.6918365359306335,
0.06878534704446793,
0.17686408758163452,
0.36354780197143555,
-0.1694846898317337,
-0.3630116283893585,
-0.9215602874755859,
0.8581253290176392,
-0.02567715384066105,
0.45483875274658203,
0.016994958743453026,
0.091250009834766... |
def best ( self ) - > command : commands = self. children. keys ( ) return max ( commands, key = lambda command : self. children [ command ]. playouts ) | [
0.5670081973075867,
-0.4078093469142914,
0.5689094662666321,
0.7147430181503296,
0.19848623871803284,
-1.032747745513916,
0.19032959640026093,
-0.09795407950878143,
0.515632152557373,
-0.9449717998504639,
0.560055673122406,
0.8248533010482788,
-0.1951589733362198,
0.21904218196868896,
-0... |
def with _ smoothing ( self, alpha ) : self. _ alpha = alpha | [
0.4399038255214691,
0.12934428453445435,
0.5925412178039551,
-0.4882039427757263,
-0.749918520450592,
1.2567464113235474,
0.6928359866142273,
0.6701012253761292,
-0.1954018473625183,
-0.14919710159301758,
-0.689757227897644,
-0.22306284308433533,
0.333683043718338,
1.3510340452194214,
0.... |
def _ get _ pathway _ metadata ( rdf _ graph : rdflib. graph ) - > dict [ str, dict [ str, dict [ str, str ] ] ] : return query _ result _ to _ dict ( rdf _ graph. query ( get _ pathway _ info _ sparql, initns = prefixes ), attr _ empty = ['title ','identifier ','description ','pathway _ id'], id _ dict = false, ) | [
-0.13778147101402283,
-0.30720728635787964,
0.31266605854034424,
-0.9020623564720154,
-0.1256674975156784,
0.30527517199516296,
-1.1214942932128906,
0.017855249345302582,
-0.8208396434783936,
0.07616465538740158,
-0.2687498927116394,
0.11765781044960022,
0.24975289404392242,
-0.13261908292... |
def load _ siteconfig ( ) : from mezzanine. core. request import current _ request try : from main. models import siteconfiguration except importerror : raise improperlyconfigured ( " you must create a siteconfiguration model " " to use load _ siteconfig tag. " ) request = current _ request ( ) if hasattr ( request, " ... | [
-0.23245877027511597,
0.255127489566803,
0.4138811528682709,
0.14892755448818207,
-0.1752038151025772,
-0.8710740208625793,
0.6411589980125427,
-0.36551034450531006,
0.09091505408287048,
0.18295827507972717,
-0.8464784026145935,
-0.5717977285385132,
-0.6221165657043457,
0.7448692917823792,... |
def makecompsolid ( self, * args ) : return _ topods. topods _ builder _ makecompsolid ( self, * args ) | [
0.4189389944076538,
-0.25729116797447205,
0.25466442108154297,
-0.7754809856414795,
-0.31121546030044556,
1.5905944108963013,
1.243446707725525,
-0.3960956633090973,
0.3576239347457886,
-0.9657348990440369,
0.15620268881320953,
-0.15975190699100494,
-1.2017892599105835,
-0.3099882602691650... |
def is _ receipe ( self, target = " beef " ) : ingredients = word _ tokenize ( self. ingredients ) ingredients = [ w. lower ( ) for w in ingredients ] return target. lower ( ) in ingredients | [
-0.38304439187049866,
-0.18545596301555634,
0.3999600410461426,
-0.1533786654472351,
0.07003497332334518,
-1.313651204109192,
-1.9916380643844604,
0.7379875183105469,
-0.13965214788913727,
0.7221126556396484,
0.03858932480216026,
0.26246634125709534,
-0.8992941975593567,
-0.265851616859436... |
def _ get _ placement _ mapping ( self, placement = " round _ robin " ) : mapping = { } wk _ num = len ( self. _ cur _ cluster. worker ) hosts = self. _ cur _ topo. hosts ( ) if placement = = " round _ robin " : for idx, node in enumerate ( self. _ cur _ topo. switches ( ) ) : # check if each host has a directly - conn... | [
-1.6051008701324463,
-0.31135672330856323,
0.5459535121917725,
-0.8229730129241943,
-0.36356085538864136,
0.15274755656719208,
1.4701277017593384,
-0.0485529787838459,
-0.32205721735954285,
0.3345906436443329,
0.18192867934703827,
-0.5379161238670349,
0.08315399289131165,
0.230564251542091... |
def map ( self, point ) : xt = self. _ coeffsx [ 0 ] * point. x ( ) + self. _ coeffsx [ 1 ] * point. y ( ) + self. _ coeffsx [ 2 ] * point. y ( ) * point. x ( ) + self. _ coeffsx [ 3 ] yt = self. _ coeffsy [ 0 ] * point. x ( ) + self. _ coeffsy [ 1 ] * point. y ( ) + self. _ coeffsy [ 2 ] * point. y ( ) * point. x ( ) ... | [
0.46100306510925293,
-0.480019748210907,
0.6322768926620483,
-0.7022525072097778,
-0.6081148982048035,
0.35539209842681885,
-0.1486520618200302,
-0.2477317601442337,
1.332049012184143,
-0.38459137082099915,
-0.12651413679122925,
-0.30079540610313416,
0.3835656940937042,
-0.6951079368591309... |
def test _ compare _ pyspec _ to _ matspec _ ad ( get _ matlab _ data, get _ python _ data, set _ tolerance ) : mat = get _ matlab _ data py = get _ python _ data tol = set _ tolerance bb _ spec = py. loc [ :, : 480 ] bb _ spec = mat. loc [ :, : 480 ] error = np. array ( abs ( bb _ spec - bb _ spec ) ) assert len ( err... | [
0.4547904133796692,
-0.21086440980434418,
0.49599945545196533,
-0.6050543785095215,
0.9001603126525879,
1.0128557682037354,
-0.14586618542671204,
-0.8786171674728394,
0.37089410424232483,
0.4098280668258667,
0.38184115290641785,
0.7080835700035095,
0.3527993857860565,
-0.22570964694023132,... |
def add _ product ( request : addrequest, db : session = depends ( get _ db ) ) : pre _ product = crud. get _ product _ by _ asin ( db, rainforest. get _ asin _ from _ url ( request. url ) ) if pre _ product is not none : tasks. process _ reviews. delay ( pre _ product. asin ) return pre _ product product _ raw = rainf... | [
-0.7157717347145081,
0.18214677274227142,
0.6655876636505127,
0.8279624581336975,
0.8175868988037109,
0.7074944376945496,
0.12902909517288208,
-0.36855262517929077,
0.3295896351337433,
-0.22512604296207428,
0.7094005942344666,
-0.4721878468990326,
-0.24886909127235413,
-0.2164926379919052,... |
def verify _ answer ( self, answer, real _ answer ) : if answer. lower ( ) = = real _ answer. lower ( ) : print ( " correct! " ) return true else : print ( " wrong answer : the answer was : " + real _ answer ) return false | [
1.0197659730911255,
-0.8884031176567078,
0.7224425077438354,
0.7204400897026062,
-0.2169477790594101,
0.20010004937648773,
-0.005935495253652334,
-0.14127115905284882,
0.12843455374240875,
0.31679749488830566,
-0.6495248675346375,
0.8397156596183777,
-0.38445016741752625,
-0.26997718214988... |
def nodes _ from _ root ( self ) - > list : nodes = [ self ] n = self while not n. is _ root : n = n. parent nodes. append ( n ) return nodes [ : : - 1 ] | [
-0.018913939595222473,
-0.1897817850112915,
0.478593111038208,
1.3117965459823608,
0.62590491771698,
0.12649410963058472,
-0.04864050820469856,
-0.07955017685890198,
0.2594911754131317,
0.17363016307353973,
-0.28355759382247925,
0.9592787027359009,
-0.35999128222465515,
0.6648272275924683,... |
def extract ( self, textlistobject = none, y _ pos = 0, x _ pos = 0, y _ dim = 0, x _ dim = 0 ) : if textlistobject is none and not self. dictionary _ mode : textlistobject = self. textlist returnlist = [ ] if not self. dictionary _ mode : for y in range ( y _ pos, y _ pos + y _ dim ) : line = textlistobject [ y ] [ x ... | [
-0.11812812834978104,
-0.7225841283798218,
0.8987315893173218,
0.14265838265419006,
-1.3201311826705933,
-0.36198633909225464,
-0.39182984828948975,
0.5596585869789124,
-0.040839824825525284,
0.6764898896217346,
-0.2926208972930908,
-0.3642168939113617,
-0.040526844561100006,
0.76110637187... |
def _ make _ system _ unavailable ( db _ vioses, context, db _ session ) : for db _ vios in db _ vioses : db _ vios. rmc _ state ='inactive'for sea in db _ vios. sea _ list : sea. state ='inactive'_ cascade _ save ( db _ vios, context, db _ session ) | [
-0.3241477608680725,
-0.6581261157989502,
0.48302605748176575,
-0.0033382221590727568,
0.8647342920303345,
0.4976119101047516,
0.8149224519729614,
0.5262597799301147,
1.7102168798446655,
0.3775072991847992,
-0.4315093457698822,
0.45668327808380127,
-0.2838568389415741,
0.4606879949569702,
... |
def display _ entry ( entry, format _ style = none ) : print ( entry _ repr ( entry, format _ style ) ) | [
0.5564220547676086,
-0.45869043469429016,
0.3010004460811615,
0.0034461787436157465,
-0.0943465605378151,
-0.004086777567863464,
-0.34152206778526306,
0.20256678760051727,
0.7082681059837341,
0.4310985505580902,
1.190111517906189,
1.3762465715408325,
0.28233903646469116,
0.0942535623908042... |
def pdfdiff _ pages ( a, b, threshold = default _ threshold, verbosity = default _ verbosity, dpi = default _ dpi, tempdir = none, time _ to _ inspect = 0, num _ threads = default _ num _ threads, max _ report _ pagenos = max _ report _ pagenos, ) : assert os. path. isfile ( a ), " file { } must exist ". format ( a ) a... | [
-0.2683649957180023,
0.1179000735282898,
0.993508517742157,
-0.300557017326355,
0.595509946346283,
-0.5736042261123657,
0.4042525887489319,
-0.4028078019618988,
0.07521554827690125,
-0.1989813894033432,
0.8686431050300598,
0.0009116944274865091,
-0.0071020592004060745,
0.3074076473712921,
... |
def read ( self, query = none ) : if query is not none : self. write ( query ) sock = self. _ sock msg = " " try : while true : msg + = self. _ sock. recv ( 500 ) end = msg. find ( " \ n " ) if end = = ( len ( msg ) - 1 ) : return msg elif end! = - 1 : print " warning, dropping % d byte tail of message. tail ='% s'" % ... | [
0.1011347770690918,
0.057142626494169235,
0.779101550579071,
-0.4513497054576874,
-0.6789801120758057,
-0.5329676270484924,
-0.4130566418170929,
-1.1937401294708252,
0.04547734186053276,
-0.5637691020965576,
1.1511441469192505,
0.245133176445961,
-1.6926474571228027,
-0.23419243097305298,
... |
def fetch _ resources ( ) : platforms _ count = { } for platform in platforms : url = base _ url _ fetch. format ( platform = platform ) response = requests. get ( url, headers = {'user - agent': user _ agent } ) data = json. loads ( response. content ) platforms _ count [ platform ] = int ( data ['number _ of _ total ... | [
0.30024150013923645,
0.3585672378540039,
0.5474982857704163,
-0.10389614850282669,
0.08843338489532471,
0.21246249973773956,
0.06619483232498169,
-0.6171848773956299,
-0.5501695275306702,
0.6360833048820496,
-1.0692267417907715,
-1.272172212600708,
0.3010978698730469,
1.3562089204788208,
... |
def close ( self ) : try : self. sock. close ( ) except exception as e : raise udsexception ( str ( e ) ) | [
-0.2108997106552124,
0.9020598530769348,
0.614928126335144,
-0.3501568138599396,
-0.3221002519130707,
0.887108325958252,
0.248824343085289,
-0.22439494729042053,
-0.037695322185754776,
-1.3824481964111328,
1.024182677268982,
0.39779821038246155,
-0.5551677942276001,
0.23325423896312714,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.