text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ setitem _ _ ( self, key, value ) : self. raw [ key ] = value | [
-1.6353816986083984,
0.12321718782186508,
0.40565380454063416,
-0.8947715759277344,
-1.1303776502609253,
0.5853531360626221,
-0.7270970344543457,
0.2713426947593689,
-0.3964756727218628,
0.10803858190774918,
-0.5922622084617615,
0.2905401885509491,
1.1046479940414429,
-0.33418452739715576,... |
def put ( self, request : request ) - > response. response : try : medication : models. medication = models. medication. objects. get ( id = request. data. pop ('id') ) except models. medication. doesnotexist : return response. response ( status = status. http _ 400 _ bad _ request ) medication. update _ from _ json ( ... | [
-1.1715750694274902,
-1.2459678649902344,
0.629652738571167,
-0.8519392609596252,
0.152876615524292,
0.11194092035293579,
-1.4653900861740112,
-0.61246657371521,
0.3750448226928711,
0.9235145449638367,
-0.0804326981306076,
0.7416393160820007,
-0.33335766196250916,
-0.7988690733909607,
0.... |
def getmachinestatefromsentencelist ( self, sentencelist ) : if self. thebackingmachine = = none : return none try : return self. thebackingmachine. getmachinestatefromsentencelist ( sentencelist ) except exception as e : self. failgracefully ( e, none ) except threaddeath as d : raise d except outofmemoryerror as e : ... | [
-0.30284473299980164,
0.25462257862091064,
0.5110090374946594,
0.3989986777305603,
-0.6935545206069946,
-0.6102716326713562,
-0.4998319149017334,
-0.8458682298660278,
0.7799075841903687,
0.3985736668109894,
0.17138725519180298,
-0.7276727557182312,
-1.2493963241577148,
0.6547951698303223,
... |
def online _ mode ( self, pc2 _ data ) : try : # transformation from sensor to robot trans1, rot1 = self. tf _ listener. lookuptransform ( self. frame _ robot, self. frame _ sensor, rospy. time ( pc2 _ data. header. stamp. secs, pc2 _ data. header. stamp. nsecs ) ) # transformation from robot to global frame trans2, ro... | [
-0.08449051529169083,
-0.6996802687644958,
0.887360155582428,
-0.349234014749527,
-0.047970596700906754,
0.36294203996658325,
-0.31396999955177307,
-0.02782144397497177,
-0.8516941070556641,
0.31373292207717896,
-0.2892796993255615,
-0.27440327405929565,
-0.24877068400382996,
-0.3041073083... |
def getlargedependencelowgraylevelemphasisfeaturevalue ( self ) : ivector = self. coefficients ['ivector'] jvector = self. coefficients ['jvector'] nz = self. coefficients ['nz'] ldlgle = numpy. sum ( self. p _ gldm * ( jvector [ none, none, : ] * * 2 ) / ( ivector [ none, :, none ] * * 2 ), ( 1, 2 ) ) / nz return ldlg... | [
0.37844035029411316,
-0.036587536334991455,
0.5981000065803528,
-0.9419306516647339,
-0.007293300703167915,
0.707534670829773,
0.4365464150905609,
0.3346313238143921,
0.31290242075920105,
0.22064881026744843,
-0.5701862573623657,
0.5152764320373535,
-0.5764338970184326,
1.0743556022644043,... |
def dg _ inv _ mass ( self, dg ) : key = dg. dim ( ) try : return self. _ dg _ inv _ mass [ key ] except keyerror : assert dg. ufl _ element ( ). family ( ) = = " discontinuous lagrange " m = assemble ( tensor ( inner ( testfunction ( dg ), trialfunction ( dg ) ) * dx ). inv ) return self. _ dg _ inv _ mass. setdefault... | [
-1.1308680772781372,
0.8562866449356079,
0.5020203590393066,
-0.7348222136497498,
-0.4970863461494446,
-0.05620419234037399,
-0.021476037800312042,
0.12915806472301483,
-0.8929328322410583,
-0.2890525162220001,
-0.06348442286252975,
-0.0275285467505455,
-0.47514504194259644,
-0.35647416114... |
def load _ people ( self, filename ) : has _ loaded = false fh = none try : fh = open ( filename, mode = " r ", encoding = " utf - 8 " ) for line in fh : person _ args = line. lower ( ). split ( ) if len ( person _ args ) > 3 : self. add _ person ( person _ args [ 0 ], person _ args [ 1 ], person _ args [ 2 ], person _... | [
-0.4909587800502777,
0.036811359226703644,
0.9073387384414673,
-0.3274444043636322,
0.2795253098011017,
0.8197663426399231,
-0.7408677339553833,
0.7464500069618225,
-1.1169391870498657,
0.1832166165113449,
-0.21350513398647308,
-1.158328890800476,
-1.010875940322876,
0.8131318688392639,
... |
def inspecthangingside ( self, side ) : if side. ishanging ( ) : # also include the continuation of its link, if any hanginglink = sidelink. fromside ( side ) msg = " remove hanging side. " self. addnextmoves ( hanginglink, blank, highest, msg = msg ) | [
0.11054612696170807,
0.49989259243011475,
0.5349239110946655,
0.3429330587387085,
-0.0664282739162445,
-0.17742528021335602,
0.2131129652261734,
0.2474510371685028,
-0.019054917618632317,
-0.11346324533224106,
0.025424309074878693,
0.4544919431209564,
-0.8522913455963135,
1.089454054832458... |
def testrule ( indata, total, components, table ) : # first we try to grab the total try : valtotal = indata [ total ] # if we cant then print out why and exit except keyerror : print indata. keys ( ), total sys. exit ( 1 ) # grab the components from the rowdictionary valcomps = { c : indata [ c ] for c in components }... | [
0.6512323021888733,
-0.2304990440607071,
0.8426416516304016,
-0.6835664510726929,
0.8572631478309631,
0.05360693484544754,
0.3885100781917572,
0.142592191696167,
0.29121559858322144,
-0.10477638989686966,
0.7412329912185669,
-0.6132489442825317,
-0.05415307730436325,
0.5154451131820679,
... |
def _ get _ one _ to _ one _ routing ( self, start _ node, end _ node, end _ speed = 10. 0 ) : if start _ node = = end _ node : return { } end _ speed = end _ speed * 1000. 0 / 3600. 0 # km / h - > m / s vertices = self. find _ nearest _ vertices ( [ start _ node, end _ node ] ) node _ vertex _ costs = [ self. node _ d... | [
-0.7153968214988708,
0.5134842395782471,
1.1103864908218384,
-0.25204360485076904,
-0.27654606103897095,
-0.4094240963459015,
0.03295677900314331,
0.46007487177848816,
-1.1440333127975464,
1.209142804145813,
-0.5575992465019226,
0.3734237849712372,
-0.13316360116004944,
-0.0798377841711044... |
def format _ genome ( self ) : return self. format _ coords ( ) + self. format _ dna _ allele ( ) | [
0.22379536926746368,
-0.641373872756958,
0.31411051750183105,
-0.1371195912361145,
-0.24529531598091125,
0.376811146736145,
-0.7524489164352417,
-0.24618902802467346,
0.2687860131263733,
0.27215927839279175,
1.3222508430480957,
0.9289464354515076,
-0.13311123847961426,
1.0379092693328857,
... |
def return _ 128d _ features ( path _ img ) : img _ rd = io. imread ( path _ img ) faces = detector ( img _ rd, 1 ) print ( " % - 40s % - 20s " % ( " image with faces detected : ", path _ img ),'\ n') if len ( faces )! = 0 : shape = predictor ( img _ rd, faces [ 0 ] ) face _ descriptor = face _ recognition _ model. com... | [
-0.2646044194698334,
0.009532810188829899,
0.5600417852401733,
0.12758247554302216,
0.00814938172698021,
-0.3159462511539459,
0.49696972966194153,
0.6390827894210815,
0.1269274652004242,
-0.6208119988441467,
0.3999779224395752,
0.17294476926326752,
0.16247010231018066,
0.9199724793434143,
... |
def is _ filled ( solution ) : return all ( len ( solution [ s ] ) = = 1 for s in squares ) | [
-0.6883424520492554,
0.5491332411766052,
0.3271794021129608,
0.5647469162940979,
0.1598116010427475,
-0.4527084529399872,
0.08747291564941406,
-0.32597747445106506,
1.031682014465332,
0.19037635624408722,
-1.2125109434127808,
-0.70652836561203,
0.36972731351852417,
1.0686249732971191,
-1... |
def _ check _ data _ provider ( self, data _ provider ) : if isinstance ( data _ provider, dict ) : data _ provider = dictprovider ( data _ provider ) elif isinstance ( data _ provider, basestring ) : data _ provider = csvprovider ( data _ provider ) elif not isinstance ( data _ provider, provider ) : raise valueerror ... | [
-1.017270565032959,
0.47467803955078125,
0.3069431781768799,
-0.807386577129364,
-0.8222198486328125,
0.44591858983039856,
-0.44036629796028137,
0.23101788759231567,
0.8476836681365967,
-0.8139031529426575,
1.0060185194015503,
0.5407183766365051,
-0.2635069489479065,
0.34001514315605164,
... |
def test _ power _ law _ converter _ init ( power _ law _ converter, power, func ) : powerlawconverter. _ _ init _ _ ( power _ law _ converter, power = power, scale = 200 ) assert power _ law _ converter. _ power = = ( power + 1 ) assert power _ law _ converter. _ f is func assert power _ law _ converter. scale = = 200 | [
-0.4919563829898834,
-0.7027351260185242,
0.39696159958839417,
0.46763086318969727,
0.15612734854221344,
-0.1284642517566681,
-0.7623291015625,
0.3770958483219147,
-1.0447286367416382,
-0.47308292984962463,
-0.694053590297699,
-0.4751054346561432,
1.0783857107162476,
1.0906190872192383,
... |
def _ get _ path ( self ) : root = self. _ root ( ) for repo in self : repo. path = os. path. join ( root,'repo ', repo. _ sanitized _ name ( repo. name ) ) | [
0.14610207080841064,
0.4039551615715027,
0.3145781457424164,
0.3133092522621155,
0.3884468972682953,
0.1449061632156372,
0.4773698151111603,
-0.0664864331483841,
-0.5925182104110718,
0.4819232225418091,
-0.04529378190636635,
-0.5690709352493286,
-0.002142441924661398,
0.4891146719455719,
... |
def protprot _ onechain _ mod _ caprimodule ( protprot _ input _ list, protprot _ onechain _ list, params ) : reference = protprot _ input _ list [ 0 ]. rel _ path model = protprot _ onechain _ list [ 0 ]. rel _ path capri = capri ( identificator = 42, reference = reference, model = model, path = golden _ data, params ... | [
-0.6066420078277588,
-0.6387843489646912,
0.4929792582988739,
0.1956244856119156,
0.05875905230641365,
0.9684048891067505,
0.3383229672908783,
-0.22339199483394623,
0.5705119967460632,
0.44014155864715576,
-0.025208109989762306,
0.6306991577148438,
-0.7134360074996948,
-0.12266053259372711... |
def search ( self ) : start = self. grid. start goal = self. grid. goal self. cost _ from _ start [ start ] = 0 # actually a heap fringe = list ( ) heappush ( fringe, ( 0 + self. heuristic ( start, goal ) * self. weight, start ) ) visited = set ( ) count = 0 while not len ( fringe ) = = 0 : f, curr = heappop ( fringe )... | [
0.4411558210849762,
0.04343320056796074,
0.9764336347579956,
0.6635783314704895,
-0.7093574404716492,
-0.5868666768074036,
-0.07956881821155548,
-0.17104440927505493,
-0.7901439070701599,
0.3221467137336731,
0.48412665724754333,
0.32896649837493896,
-0.8829483389854431,
0.34659039974212646... |
def noise _ poisson ( image, peak = 1. 0 ) : return ( np. random. poisson ( image / 255. 0 * peak ) / peak * 255 ) - image | [
-0.5893081426620483,
-0.10769426822662354,
0.39981094002723694,
-0.2058231681585312,
0.027360299602150917,
-0.19658072292804718,
-0.14874526858329773,
-0.27872413396835327,
0.7359687089920044,
0.31665492057800293,
-0.3076738715171814,
-0.019632959738373756,
-0.5439031720161438,
-0.10176856... |
def help _ from _ cmd ( cmd ) : def _ help ( name ) : # pragma : no cover " " " help text for the given option in ` cmd `. " " " for p in cmd. params : if p. name = = name : if p. help is none : raise valueerror ( " no help text available for % r " % name ) return p. help raise valueerror ( " unknown option : % r " % n... | [
1.0310126543045044,
-0.5920168161392212,
0.2376779168844223,
-0.07546892017126083,
-0.8983716368675232,
-0.04815804585814476,
0.31688782572746277,
-0.6143255233764648,
-0.22294533252716064,
0.8897800445556641,
0.5647834539413452,
0.011576767079532146,
0.8603756427764893,
-0.246258690953254... |
def decorate _ method _ with ( function _ decorator ) : def decorate _ method ( unbound _ method ) : def method _ proxy ( self, * args, * * kwargs ) : def f ( * a, * * kw ) : return unbound _ method ( self, * a, * * kw ) return function _ decorator ( f ) ( * args, * * kwargs ) return method _ proxy return decorate _ me... | [
-0.4758846163749695,
-0.010013138875365257,
0.6200984120368958,
-0.8200628757476807,
-0.17985542118549347,
-0.8939365744590759,
-0.664616584777832,
0.3294365704059601,
0.46512261033058167,
-0.510104775428772,
0.949579656124115,
0.06128569319844246,
0.40969201922416687,
0.7565758228302002,
... |
def produce _ next _ gen _ bachelors ( self, bequest _ rule : callable ) \ - > tuple [ dict [ int, person ], dict [ int, person ] ] : bachelors = { } bachelorettes = { } p _ id = 1 for couple in self. cs : new _ adults = couple. produce _ new _ adults ( bequest _ rule ) for new _ adult in new _ adults : new _ adult. se... | [
-1.4188884496688843,
-0.19555772840976715,
0.5766680836677551,
0.3385954201221466,
-0.2457272857427597,
1.5387002229690552,
0.31246626377105713,
-0.33143582940101624,
-1.0610812902450562,
0.0038333446718752384,
-0.6854239106178284,
0.2738003432750702,
0.41602617502212524,
0.934815049171447... |
def _ init ( self ) : self. registernamespace ('unknown') self. registernamespace ( ns _ streams ) self. registernamespace ( self. _ owner. defaultnamespace ) self. registerprotocol ('iq ', iq ) self. registerprotocol ('presence ', presence ) self. registerprotocol ('message ', message ) self. registerdefaulthandler ( ... | [
-0.09948381781578064,
0.600848913192749,
0.4106392562389374,
0.2660493552684784,
0.799540638923645,
0.3255273699760437,
-0.12980331480503082,
-1.015726923942566,
0.6992509961128235,
-1.319898247718811,
-1.4898297786712646,
0.2812342941761017,
-0.4762280285358429,
0.8656613826751709,
0.02... |
def _ update _ or _ create _ object ( self, klass : type, data : dict, ) - > model : # look for existing object obj _ id = self. get _ data _ ids ( data ) [ 0 ] obj = none klass _ str = klass. _ _ name _ _. lower ( ) cache = getattr ( self, " % s _ cache " % klass _ str ) if not obj : # todo : if origin _ id was found,... | [
-0.6275326013565063,
-0.6018103361129761,
0.7273873686790466,
-0.5314309000968933,
0.014412754215300083,
0.5522713661193848,
-0.032357264310121536,
0.3666367530822754,
0.20856113731861115,
0.45350104570388794,
-0.8533382415771484,
-0.9264739751815796,
0.6339719295501709,
0.2472541779279709... |
def gen _ jaccom1 ( self, arm ) : jcom1 = np. zeros ( ( 6, 1 ) ) jcom1 [ 0, 0 ] = arm. l1 / 2. * - np. sin ( arm. q [ 0 ] ) jcom1 [ 1, 0 ] = arm. l1 / 2. * np. cos ( arm. q [ 0 ] ) jcom1 [ 5, 0 ] = 1. 0 return jcom1 | [
-0.0866599753499031,
-0.6988017559051514,
0.5274083614349365,
-0.22300612926483154,
0.1659415364265442,
0.16513493657112122,
0.9734418988227844,
0.02450142242014408,
0.10911911725997925,
0.4569299817085266,
-0.18764843046665192,
-0.1833644062280655,
0.07751183211803436,
0.6397960782051086,... |
def re _ tuple ( nested _ list ) : outer _ tuple = ( ) mini _ list = [ ] for inner _ list in nested _ list : mini _ list. append ( tuple ( inner _ list ) ) outer _ tuple = tuple ( mini _ list ) return outer _ tuple | [
-0.7100414633750916,
0.4100429117679596,
0.6873666048049927,
0.236692413687706,
0.3262864649295807,
-0.36853694915771484,
-0.15305612981319427,
1.5646506547927856,
-0.03983627259731293,
-0.1895180642604828,
-1.2784152030944824,
-0.6236230731010437,
-0.8501594662666321,
-0.3160531222820282,... |
def attribute _ is _ vector ( self, key, _ flow = _ down ) : key = self. _ attributes _ t _ keycheck ( key ) us _ key = self. _ attributes _ t _ underscore ( key ) return self. _ attributes _ i _ is _ vector ( us _ key, _ flow ) | [
-1.3512113094329834,
0.22156353294849396,
0.5050020217895508,
0.31855741143226624,
-0.6383333206176758,
-0.0053858039900660515,
0.41388869285583496,
-0.1372344046831131,
0.8468713164329529,
1.1071542501449585,
-0.28445735573768616,
0.7905272841453552,
0.4273293614387512,
0.4034954607486725... |
def get _ temperature ( pin ) : try : import ds18x20 except importerror : return'unable to import ds18x20 library.'else : sensor _ wire = onewire. onewire ( machine. pin ( pin ) ) temperature _ sensor = ds18x20. ds18x20 ( sensor _ wire ) try : sensor _ address = temperature _ sensor. scan ( ). pop ( ) except indexerror... | [
0.1018136516213417,
-0.14562305808067322,
0.3898295760154724,
0.04079470410943031,
-0.10768885910511017,
-0.14092297852039337,
0.5856320261955261,
0.2852925658226013,
-0.3211795687675476,
0.6337891817092896,
-0.507256031036377,
-0.14035531878471375,
0.035982076078653336,
0.2454625815153122... |
def test _ units ( ) : nominalreal ( 2. 7, " " ) nominalreal ( 2. 7, " cm " ) nominalreal ( 2. 7, " cm ^ 2 / joule " ) nominalreal ( 2. 7, " " ) | [
0.6981968283653259,
0.07528361678123474,
0.4548453986644745,
0.040877651423215866,
-0.06584929674863815,
0.5761396884918213,
0.3080335855484009,
-0.7621874809265137,
-0.670478343963623,
-0.16165901720523834,
-0.038523707538843155,
-0.041671957820653915,
-0.09199269860982895,
0.440746366977... |
def ruleset ( self ) - > str : return self. root. get _ property ( " ru ", " japanese " ) | [
0.6216853260993958,
0.12373603880405426,
0.4886684715747833,
-0.13538478314876556,
0.6198723912239075,
0.48048093914985657,
0.2841578722000122,
-0.5612347722053528,
-0.04387059435248375,
0.17141427099704742,
1.5487620830535889,
0.7907590866088867,
0.019899075850844383,
-0.1937413215637207,... |
def get _ elevator _ service _ request ( max _ floor ) : elevator _ requests = input ( f " enter number of floors separated by space. " f " \ nonly positive numbers " f " between 0 to { max _ floor } accepted. " f " rest entries will be discarded. \ n " f " enter values separated by comma (, ) : " ). split ( ", " ) val... | [
-0.8341137170791626,
0.40854141116142273,
0.49071982502937317,
0.8629868030548096,
-0.6081939935684204,
0.4376762807369232,
0.06511580944061279,
-0.3212628960609436,
-0.8551584482192993,
-0.6788515448570251,
0.11912117898464203,
0.19014117121696472,
-0.20082513988018036,
0.7946349382400513... |
def print _ game _ info ( self ) : print ( r " " " 88888888888 888 888b d888 888 888 8888b d8888 888 888 88888b. d88888 888 88888b.. d88b. 888y88888p888 8888b. 88888888. d88b. 888 888 " 88b d8p y8b 888 y888p 888 " 88b d88p d8p y8b 888 888 888 88888888 888 y8p 888. d888888 d88p 88888888 888 888 888 y8b. 888 " 888 888 88... | [
0.8126699328422546,
-0.9546465277671814,
1.1728034019470215,
-1.0130585432052612,
0.20427866280078888,
0.5281425714492798,
0.15453027188777924,
-0.19906435906887054,
-0.23376794159412384,
0.7812328934669495,
-0.42167016863822937,
-0.04377555847167969,
-0.3366207778453827,
-0.28435480594635... |
def anycount ( groups ) - > int : sets = [ set. union ( * g ) for g in groups ] counts = [ len ( s ) for s in sets ] return sum ( counts ) | [
0.20175693929195404,
0.6094467043876648,
0.4645228683948517,
0.3356948494911194,
0.01750071719288826,
-0.2030286192893982,
0.4770596921443939,
0.14593814313411713,
-0.3603889048099518,
-0.350879967212677,
-0.2546013593673706,
-0.3129690885543823,
-0.5639957785606384,
0.41734278202056885,
... |
def transform _ factory ( target, context ) : from knife. template import template from knife. transformer2 import transform, literaltransform, listtransform, objecttransform from knife. transformer2 import templatetransform # flatten single - value tuples if isinstance ( target, tuple ) and len ( target ) = = 1 : targ... | [
-0.8177277445793152,
-0.5463579297065735,
0.7375690937042236,
-0.5106288194656372,
-0.5689112544059753,
-0.9669696688652039,
-0.2149834781885147,
-1.1398906707763672,
0.8440783023834229,
-0.3519836366176605,
-0.33618348836898804,
0.8337647318840027,
-0.010085449554026127,
-0.12935668230056... |
def run ( cod _ concorrente ) : print ( " * ". rjust ( 100,'*') ) print ( " s u z a n o ". center ( 100,'*') ) print ( " * ". rjust ( 100,'*') ) if gj. submitting _ query ( cod _ concorrente ) : gj. save _ json _ file ( cod _ concorrente ) else : print ( " - - - - > code not found! " ) print ( " - - - - > process finis... | [
0.04889681935310364,
-0.26150527596473694,
0.5919063091278076,
0.1820286214351654,
0.25691312551498413,
0.370440810918808,
0.8325200080871582,
0.07982154935598373,
-0.8083687424659729,
0.961384117603302,
-0.18227997422218323,
0.436533659696579,
-0.172333225607872,
0.7484304308891296,
1.2... |
def arraytoimage ( a ) : i = image. frombytes ('l ', ( a. shape [ 1 ], a. shape [ 0 ] ), ( a. astype ('b') ). tobytes ( ) ) return i | [
-0.31720465421676636,
-0.4049801230430603,
0.5995345711708069,
-0.9193006157875061,
-0.7351935505867004,
0.4151473343372345,
0.1894446164369583,
0.17059959471225739,
0.5065981149673462,
1.035443663597107,
-0.4309552013874054,
0.690238893032074,
-0.03046407364308834,
0.28198131918907166,
... |
async def list _ structures ( self, request : smart _ device _ management _ service. liststructuresrequest = none, *, retry : retries. retry = gapic _ v1. method. default, timeout : float = none, metadata : sequence [ tuple [ str, str ] ] = ( ), ) - > pagers. liststructuresasyncpager : # create or coerce a protobuf req... | [
-1.0016125440597534,
0.9804888963699341,
0.7341617345809937,
-0.1966714859008789,
0.2653484642505646,
-0.35877087712287903,
0.07622496783733368,
-1.3573464155197144,
0.6509109139442444,
-0.07758522033691406,
0.5917533040046692,
0.5407623648643494,
-0.2995866537094116,
0.25597116351127625,
... |
def get _ response ( self, request, obj, template, context, * * httpresponse _ kwargs ) : return httpresponse ( template. render ( context ), * * httpresponse _ kwargs ) | [
-0.31970250606536865,
-0.9396816492080688,
0.2557653784751892,
-0.17824098467826843,
-0.5710705518722534,
-0.3376580774784088,
-0.5993735790252686,
-0.334293395280838,
0.764855146408081,
-0.243901327252388,
-0.5918158292770386,
-0.4902661442756653,
-0.8858840465545654,
-0.8987054228782654,... |
def model _ fn ( features, labels, mode, params ) : # pylint : disable = unused - argument tf _ logging. info ( " * * * features * * * " ) for name in sorted ( features. keys ( ) ) : tf _ logging. info ( " name = % s, shape = % s " % ( name, features [ name ]. shape ) ) input _ ids = features [ " input _ ids " ] input ... | [
-0.5423465967178345,
0.10615123808383942,
0.7347549200057983,
0.47019094228744507,
0.4061044752597809,
-0.466531366109848,
0.7314960956573486,
0.3946174085140228,
-0.6872746348381042,
1.1335681676864624,
-0.8509326577186584,
0.0015184402000159025,
0.481422483921051,
-0.5164077877998352,
... |
def save _ chores ( chores : typing. list [ chore ], filepath : str ='chores. json') : print ( f'saving { len ( chores ) } chores to { filepath }...') with open ( filepath,'w') as f : json. dump ( [ chore. _ _ dict _ _ for chore in chores ], f ) print ( f'finished saving chores to { filepath }.') | [
-1.381826639175415,
0.08711104094982147,
0.2555825710296631,
-0.2841522991657257,
0.5077862739562988,
0.8820873498916626,
0.708435595035553,
-1.0320581197738647,
-0.5694780349731445,
0.4493786692619324,
-2.000765800476074,
0.5393973588943481,
0.36468690633773804,
1.1401132345199585,
-0.5... |
def _ _ init _ _ ( self, column : t. union [ text, varchar, array ], media _ path : str, executor : t. optional [ executor ] = none, allowed _ extensions : t. optional [ t. sequence [ str ] ] = allowed _ extensions, allowed _ characters : t. optional [ t. sequence [ str ] ] = allowed _ characters, file _ permissions : ... | [
0.58116614818573,
0.23413687944412231,
0.5995480418205261,
0.7795757055282593,
-0.30073490738868713,
-0.6364887356758118,
0.7005473375320435,
0.6365686655044556,
0.16133853793144226,
-0.306305468082428,
-0.09513936936855316,
0.3499860167503357,
0.3325657248497009,
0.07850673794746399,
0.... |
def execute ( self, context ) : log. info ( " running deployment status operator " ) self. xcom _ puller = xcompuller ( self. main _ dag _ name, context ['ti'] ) # required for the get _ deployment _ status helper to function properly config. parse _ args ( args = [ ], default _ config _ files = [ self. shipyard _ conf... | [
-0.7979428768157959,
-0.5089384913444519,
0.5098356604576111,
-0.016987282782793045,
0.05402391776442528,
0.21206411719322205,
-0.07218319922685623,
1.336222529411316,
-0.3610726594924927,
1.2764602899551392,
-0.005618903320282698,
0.0019966105464845896,
0.5131837725639343,
0.1176252812147... |
def count _ goals _ scorered ( ) : if goals _ scored = = { } : create _ team _ list ( rounds [ " 1 " ], goals _ scored ) for match _ round in rounds : for match in rounds [ match _ round ] : goals _ scored [ match [ " guest " ] ] [ i _ total ] + = match [ " guest score " ] goals _ scored [ match [ " guest " ] ] [ i _ g... | [
-0.4592268168926239,
-0.20799995958805084,
0.7799272537231445,
-0.2619900405406952,
0.6155897378921509,
0.4284399747848511,
0.23616167902946472,
0.06245821341872215,
-1.0703697204589844,
0.9533095955848694,
-0.8222529888153076,
-0.9460395574569702,
0.3981042206287384,
-0.3618096113204956,
... |
def main ( ) : global verbose global debug global dryrun arguments = docopt ( _ _ doc _ _ ) fpath = arguments ['< file. nii. gz >'] qcpath = arguments ['< qcpath >'] scantype = arguments ['- - scantype'] hdcmplogs = arguments ['- - checkheaderlogs'] bvec _ std = arguments ['- - bvecstandards'] verbose = arguments ['- -... | [
0.7014964818954468,
-0.021913135424256325,
1.041738510131836,
0.46375468373298645,
-0.2005278617143631,
0.2320868968963623,
0.7963280081748962,
-1.3609614372253418,
0.2340189516544342,
-0.6845107078552246,
-0.3147706389427185,
-0.30277562141418457,
-0.5507605075836182,
-0.44698113203048706... |
def updatemodels ( self ) : try : if not self. database. isopen ( ) : if not self. database. open ( ) : raise userwarning ( u " no se pudo conectar con la base de datos " ) self. backmodel. setquery ( " " " select d. idpersona as id, d. nombre, d. telefono, d. correo, p. nombre as pais from personas d join paises p on ... | [
-0.6087497472763062,
-0.11834008991718292,
0.7366334795951843,
0.20469695329666138,
0.011896963231265545,
0.5801014304161072,
0.1786886751651764,
-0.5033575296401978,
0.03240301460027695,
0.05591814965009689,
0.45606282353401184,
-0.595350444316864,
-0.04370928183197975,
0.2828510403633117... |
def reset _ groups ( self, request ) : if not isinstance ( request. data, list ) : raise validationerror ( " the data must be a list " ) for group in request. data : if not isinstance ( group, str ) : raise validationerror ( " every group must be a string " ) for key, config _ variable in config. config _ variables. it... | [
-1.5445467233657837,
0.24152043461799622,
0.3915352523326874,
0.9203083515167236,
0.7059493064880371,
-0.7313363552093506,
-0.04188505560159683,
-0.15544939041137695,
-1.053019404411316,
0.8240955471992493,
-0.2203187644481659,
0.032792482525110245,
-0.9029489755630493,
0.464611679315567,
... |
def skip _ n _ images ( self, n ) : self. skip _ to _ next _ image ( ) # current image ind = n - 1 if ( ind > 0 ) : for i in range ( ind ) : self. read _ entry ( ) if self. _ eof : print ( " eof hit not enough images " ) break # end if self. skip _ to _ next _ image ( ) # end for # end if | [
-0.8168023228645325,
0.5126978754997253,
0.7000552415847778,
-0.01913025788962841,
0.32729098200798035,
0.27404066920280457,
0.7684729099273682,
-0.8696172833442688,
-1.0022714138031006,
0.587841272354126,
0.8020614981651306,
-0.3526349365711212,
0.034255992621183395,
0.6724323630332947,
... |
def test _ update _ check _ notifies _ user ( ) : app = create _ ctfd ( ) with app. app _ context ( ) : app. config [ " update _ check " ] = true set _ config ( " version _ latest ", " https : / / github. com / ctfd / ctfd / releases / tag / 9. 9. 9 " ) client = login _ as _ user ( app, name = " admin ", password = " p... | [
0.7989740967750549,
0.10683028399944305,
0.42677003145217896,
0.5331812500953674,
0.6177870035171509,
0.7229273319244385,
-0.8126732110977173,
0.583558976650238,
-0.6702898144721985,
0.4665663242340088,
-0.6599645614624023,
0.19613869488239288,
-0.0007176661165431142,
-0.03831368312239647,... |
def get _ descriptor _ for _ layer ( self, layer ) : if not layer in self. _ layer _ descriptor _ cache : params = {'f':'pjson'} if self. token : params ['token'] = self. token response = requests. get ( self. _ build _ request ( layer ), params = params ) self. _ layer _ descriptor _ cache [ layer ] = response. json (... | [
-1.0056368112564087,
0.21978119015693665,
0.4187614917755127,
-0.6835461854934692,
-0.3000998795032501,
-0.31156256794929504,
-0.8875640034675598,
-0.840779185295105,
0.08604548871517181,
-0.5142844319343567,
-0.26965615153312683,
0.8512541651725769,
-0.15853983163833618,
0.782243251800537... |
def handle _ one _ request ( self ) : try : self. raw _ requestline = self. rfile. readline ( 65537 ) if len ( self. raw _ requestline ) > 65536 : self. requestline ='' self. request _ version ='' self. command ='' self. send _ error ( httpstatus. request _ uri _ too _ long ) return if not self. raw _ requestline : sel... | [
-0.8971041440963745,
0.21002554893493652,
0.9241508841514587,
0.548541247844696,
0.7981587648391724,
-0.12437042593955994,
0.0773201435804367,
-0.7094023823738098,
-0.2595355808734894,
-0.6640855669975281,
0.6804819107055664,
-0.5037709474563599,
-0.16712845861911774,
0.38054990768432617,
... |
def validate _ link ( ) : import webnotes import webnotes. utils value, options, fetch = webnotes. form _ dict. get ('value'), webnotes. form _ dict. get ('options'), webnotes. form _ dict. get ('fetch') # no options, don't validate if not options or options = ='null'or options = ='undefined': webnotes. response ['mess... | [
0.21480920910835266,
-0.18790480494499207,
0.5298609137535095,
-0.2947196662425995,
0.349456787109375,
-0.142361119389534,
-0.2494930773973465,
-0.9148882627487183,
-0.5806911587715149,
-0.5337236523628235,
0.8983801603317261,
0.04345851391553879,
0.16718515753746033,
0.32111093401908875,
... |
def get _ divisors ( num ) : divisors = [ ] for i in range ( 2, num + 1 ) : if num % i = = 0 : divisors. append ( i ) return divisors | [
-1.3329086303710938,
0.7961753606796265,
0.15447786450386047,
0.7007312774658203,
0.38610780239105225,
-0.5515066981315613,
0.23909267783164978,
0.18067969381809235,
0.40723133087158203,
-0.8386786580085754,
-0.7776249647140503,
0.5631977319717407,
-0.7349213361740112,
0.0745190680027008,
... |
def to _ json ( self, indent = 4 ) : model _ dict = self. to _ dict ( ) json _ str = json. dumps ( model _ dict, indent = indent ) return json _ str | [
-1.2221295833587646,
-1.530609130859375,
0.547551691532135,
-0.33632659912109375,
-0.34615564346313477,
0.34204593300819397,
0.18137644231319427,
-0.6397448778152466,
-0.39711475372314453,
-0.032746680080890656,
-0.5722970962524414,
0.12354005873203278,
0.35044044256210327,
-0.222476646304... |
def numeropaises ( analyzer ) : cont = mp. size ( analyzer ['countrys'] ) return cont | [
0.2553868591785431,
0.7131198644638062,
0.16845427453517914,
-0.3043917715549469,
-0.5358394980430603,
0.24394148588180542,
0.05848899111151695,
0.4449816644191742,
0.2611898183822632,
0.060037761926651,
-0.16239681839942932,
-1.4007995128631592,
-0.02764153480529785,
-0.09234707802534103,... |
def extract _ alignment ( align _ matrix, tgt _ mask, src _ len, n _ best ) : batch _ size _ n _ best = align _ matrix. size ( 0 ) assert batch _ size _ n _ best % n _ best = = 0 alignments = [ [ ] for _ in range ( batch _ size _ n _ best / / n _ best ) ] # treat alignment matrix one by one as each have different lengt... | [
-0.04625187814235687,
-0.41292402148246765,
0.6922110915184021,
1.043419361114502,
-0.28496357798576355,
-0.3755122721195221,
0.024420835077762604,
0.17796781659126282,
0.3479371666908264,
0.7358819246292114,
0.11417225748300552,
-0.10151483118534088,
0.36965247988700867,
-0.38003018498420... |
def convert _ period ( period ) : if len ( period )! = 7 or period [ 2 ]! ='-': raise valueerror ( syntax _ error ) return period [ 3 : ] + period [ : 2 ] | [
-0.2741430699825287,
-0.05804286524653435,
0.622153103351593,
0.6997582912445068,
0.32091400027275085,
0.5430514812469482,
-0.7307925820350647,
-0.21556396782398224,
1.241118311882019,
0.6165308952331543,
0.016128843650221825,
0.5766744017601013,
-0.3297155797481537,
-1.1330775022506714,
... |
def nav _ tag ( self, tag ) : self. driver. get ( self. base _ url +'explore / tags /'+ str ( tag ) +'/') # self. like _ and _ comment ( 5 ) | [
-0.8365983963012695,
0.09585337340831757,
0.3585761487483978,
0.2299770563840866,
0.9984043836593628,
-0.0221662987023592,
0.08096379786729813,
-0.5666839480400085,
-0.29601219296455383,
0.3716079890727997,
-0.7574835419654846,
0.17552290856838226,
-0.055414117872714996,
0.8811784982681274... |
def _ api _ search ( self, query, count = 1 ) : # assert ( 0 < count < = 30 ),'max 30 results per call, min 1'# https : / / github. com / davebshow / food2forkclient / page = 1 all _ responses = [ ] if count > 30 : while count > 30 : # format the request uri query _ params = { " key " : self. _ api _ key, " q " : query... | [
-1.413015365600586,
0.4069007635116577,
0.893315315246582,
-0.1782606691122055,
0.1377842128276825,
-0.7871298789978027,
-0.6720818877220154,
-0.6088206768035889,
-0.0645001083612442,
-0.3989729881286621,
1.0657837390899658,
-0.3517940044403076,
-0.8502657413482666,
0.4219655394554138,
-... |
def test _ reproducibility ( self ) : np. random. seed ( 45 ) mask1 = samp. poisson ( ( 320, 320 ), accel = 6, seed = 80 ) # changing internal numpy state should not affect mask. np. random. seed ( 20 ) mask2 = samp. poisson ( ( 320, 320 ), accel = 6, seed = 80 ) npt. assert _ allclose ( mask2, mask1 ) | [
-0.34885042905807495,
0.13199615478515625,
0.38166308403015137,
0.3019706904888153,
0.7046235203742981,
0.767484188079834,
1.308122992515564,
-0.3239552080631256,
0.4103114604949951,
-0.2901167869567871,
-0.6944953799247742,
1.0701879262924194,
0.2627255618572235,
-0.4398951828479767,
0.... |
def children ( self ) - > iterable [ ocrwordentity ] : yield from self. span | [
0.2282077521085739,
-0.16634723544120789,
0.45204949378967285,
-0.6114226579666138,
-0.19264163076877594,
0.7433827519416809,
-0.2131040394306183,
-0.9691994786262512,
0.9044190049171448,
-0.5342808365821838,
-0.29287636280059814,
0.35434216260910034,
0.11743168532848358,
0.680369973182678... |
def test _ getsuncleanwarnings ( self ) : self. parseoptions ( ['- - unclean - warnings'] ) runner = self. getrunner ( ) self. assertisinstance ( runner. _ makeresult ( ), reporter. uncleanwarningsreporterwrapper ) | [
-0.08145202696323395,
0.9217684268951416,
0.6040531992912292,
-0.04804985597729683,
1.201149821281433,
0.3761884868144989,
0.21597854793071747,
-0.2574187219142914,
-0.20616142451763153,
-0.6308791637420654,
-0.4433116614818573,
-0.07931812852621078,
0.03508424013853073,
0.1862021833658218... |
def is _ db _ running ( ) : async def get _ db _ info ( ) : client = await create _ redis _ pool ( default _ address ) await client. info ( ) client. close ( ) await client. wait _ closed ( ) try : asyncio. run ( get _ db _ info ( ) ) return true except oserror : return false | [
-0.6981680989265442,
1.1149111986160278,
0.6098451018333435,
0.47697338461875916,
1.1441750526428223,
0.1608821451663971,
-1.0607608556747437,
0.258173406124115,
-0.8636084198951721,
0.04476495459675789,
-0.6749407649040222,
0.3540453314781189,
-0.9042920470237732,
0.02127155475318432,
-... |
def test _ pivot _ container ( create _ pivot ) : pivot _ funcs = entities. host. pivots ( ) check. greater _ equal ( len ( pivot _ funcs ), 7 ) with redirect _ stdout ( stringio ( ) ) as print _ capture : entities. host. util ( ) pr _ content = print _ capture. getvalue ( ) check. is _ in ( " ( pivot function ) ", pr ... | [
0.2752053141593933,
1.0360132455825806,
0.4183880686759949,
0.5530590415000916,
1.5819226503372192,
0.22217243909835815,
-0.30945008993148804,
-0.8034073114395142,
0.4850524663925171,
-0.24782536923885345,
0.1950453668832779,
-0.30420178174972534,
-0.3845686912536621,
0.27228835225105286,
... |
def getxmlname ( line ) : global packagematchdict retval = packagematchdict. get ( line ) if retval : return retval for regex in packageres : match = regex. search ( line ) if match : xmlfile = ". / % s / % s / src / classes _ def. xml " % \ ( match. group ( 1 ), match. group ( 2 ) ) if os. path. exists ( xmlfile ) : p... | [
-0.20205369591712952,
0.13207866251468658,
1.013656735420227,
0.36722084879875183,
0.10258852690458298,
-0.292067289352417,
0.2902335226535797,
-0.32511383295059204,
-0.4527243673801422,
-0.3293370008468628,
0.47371193766593933,
-1.2327016592025757,
0.10102828592061996,
0.2179749310016632,... |
def canvasclick ( self, event ) : try : id = self. pixelcanvas. find _ withtag ( current ) ( x, y, x2, y2 ) = self. pixelcanvas. bbox ( current ) # update pixel data row = min ( y / / self. pixelsize, 7 ) col = min ( x / / self. pixelsize, self. spritewidth - 1 ) self. pixels [ self. currentframe ] [ row ] [ col ] ^ = ... | [
-0.08662071824073792,
-0.9016578197479248,
0.7269396781921387,
-0.39894458651542664,
-0.5879420042037964,
-0.5050783753395081,
0.5619478821754456,
-0.7862216830253601,
0.5692227482795715,
0.0999756008386612,
0.5748608708381653,
0.7451611161231995,
-0.3879426121711731,
0.5202496647834778,
... |
def extract _ identifiers ( text : str ) - > reference : document : dict [ str, any ] = { } arxivids = [ longest _ string ( id ) for id in re. findall ( regex _ arxiv _ flexible, text ) ] if arxivids : # if len ( arxivids ) > 1 : # document ['arxiv _ id'] = arxivids # else : document ['arxiv _ id'] = arxivids [ 0 ] doi... | [
-0.3242153227329254,
-1.0083045959472656,
0.5749040842056274,
-0.10538685321807861,
-0.16870610415935516,
-0.5960293412208557,
-0.07316195964813232,
0.6963707804679871,
0.2514202892780304,
0.337518572807312,
-0.31158992648124695,
-0.01282215304672718,
-0.5473082065582275,
-0.35265725851058... |
def stopperformance ( self ) : if self. pt : if self. pt. status ( ) = = 0 : self. pt. stop ( ) self. pt. join ( ) self. pt = none self. cleanup ( ) | [
0.01911212131381035,
-0.3199467360973358,
0.22268062829971313,
-0.024627966806292534,
0.30500754714012146,
0.8426702618598938,
1.053289532661438,
0.4244566261768341,
-0.359750360250473,
-0.28083422780036926,
0.6531990170478821,
-0.31977003812789917,
-1.6639825105667114,
0.41831642389297485... |
def bound ( segm ) : # print ('segm = ', segm ) lm = len ( segm ) # limit can be up to total length of text for matching ll = 0 while ll < lm : # look for first break in text segment c = segm [ ll ] if c in [ ellychar. ellp, ellychar. ndsh, ellychar. mdsh ] : break if c = = ','and ll < lm - 1 and segm [ ll + 1 ] = ='' ... | [
-0.24061796069145203,
-0.3882165849208832,
0.9761344790458679,
-0.49737605452537537,
-0.8434256315231323,
-0.09650490432977676,
0.4873751997947693,
0.8239163756370544,
0.6232367157936096,
-0.14099015295505524,
0.18281510472297668,
-0.238008052110672,
-0.7166544795036316,
0.5054108500480652... |
def get _ returns ( self ) : returns = self. returns _ series. order _ by ('month'). all ( ) return pd. series ( ( r. percentage for r in returns ), index = pd. datetimeindex ( ( r. month for r in returns ) ) ) | [
-0.28239086270332336,
0.050681620836257935,
0.5651928186416626,
0.20655038952827454,
0.3174235224723816,
0.09940801560878754,
-0.9115598201751709,
-0.3546959161758423,
-0.028362220153212547,
-0.27696317434310913,
1.499644160270691,
-0.053100597113370895,
-0.5030505061149597,
-0.40122777223... |
def get _ user _ saving _ details ( ) : hint = " do you want to save chords? ( y / n ) " possible _ answers = [ " y ", " n " ] answer = input ( hint ) while answer not in possible _ answers : answer = input ( hint ) if answer = = " y " : directory = input ( " enter the directory path to save : " ) return directory | [
-0.46206483244895935,
0.5069634318351746,
0.6028110384941101,
0.4767088294029236,
-0.29886022210121155,
0.35522451996803284,
1.2068246603012085,
-1.4842342138290405,
-0.09817341715097427,
-0.8661357164382935,
-0.7056008577346802,
0.5448979139328003,
-0.4243880808353424,
-0.0668403282761573... |
def test _ retry _ nested ( self ) : @ operation ( " sql " ) def aggregate ( ctx, obj, fail ) : if fail : raise retryoperation ( [ " rows " ] ) else : obj. data + = " - sql - " return obj @ operation ( " rows ", name = " aggregate " ) def aggregate _ rows ( ctx, obj, fail ) : obj. data + = " - rows - " return obj @ ope... | [
0.393765926361084,
0.9590284824371338,
0.9995031356811523,
0.2627588212490082,
0.10371480882167816,
-0.0663556456565857,
0.25971758365631104,
-1.018617033958435,
0.2827807366847992,
-0.0732467770576477,
-0.4220813512802124,
0.5207303166389465,
-0.7421987056732178,
0.02182609960436821,
-0... |
def _ _ init _ _ ( self, name, incoming, outgoing ) : self. name = name self. inedges = incoming self. outedges = outgoing self. maxpredecessor = - 1 self. score = - 1000 | [
-0.020558582618832588,
0.3948419392108917,
0.5521507859230042,
-0.18016290664672852,
-0.9191625118255615,
-0.09957528114318848,
-0.09460955113172531,
0.3659932017326355,
0.21056486666202545,
0.8223453164100647,
-0.9952350854873657,
0.19540604948997498,
-0.06066928431391716,
0.4069463312625... |
def titleize ( s : str ) - > str : s = s. replace ('_ ','' ) words = s. split ('' ) new _ words = [ w [ 0 ]. upper ( ) + w [ 1 : ] for w in words ] return''. join ( new _ words ) | [
-0.37836697697639465,
-0.2974008321762085,
0.888224184513092,
-0.7881335020065308,
-0.600528359413147,
-0.7282018661499023,
-0.8905003070831299,
0.24413292109966278,
0.5323808789253235,
0.6920384168624878,
0.17404310405254364,
0.5529451370239258,
-0.10858399420976639,
0.048410482704639435,... |
def datavis1 ( ) : allstring = hw3pr2. read _ data ( filename = " rps. csv " ) n = len ( allstring ) nums = [ ] numr = [ ] nump = [ ] index = 0 for string in allstring : index + = 1 d = hw3pr2. extract _ features ( string ) nums. append ( d ['s'] ) nump. append ( d ['p'] ) numr. append ( d ['r'] ) # plot the bar plot n... | [
0.34386661648750305,
0.48668867349624634,
0.7816939353942871,
-0.53840172290802,
-0.46713849902153015,
0.7988658547401428,
0.7778235077857971,
0.7609049081802368,
-0.5644725561141968,
-0.1354440450668335,
-0.054507337510585785,
0.8588382601737976,
-0.17384520173072815,
-0.21874980628490448... |
def test _ user _ story _ 0c ( self ) : self. blackjack. pick _ cards = magicmock ( return _ value = [ 10,'q'] ) self. blackjack. deal ( ) self. assertequal ( self. blackjack. points ( ), 20 ) | [
1.3207863569259644,
-0.19097141921520233,
0.16539636254310608,
0.6992138624191284,
1.2127324342727661,
0.37515178322792053,
0.24766945838928223,
0.921062171459198,
-0.24512986838817596,
-0.488512247800827,
-0.3632873594760895,
-0.5346827507019043,
0.24872510135173798,
-0.002791690407320857... |
def to _ grid ( self, mapping ) : return list ( reversed ( [ [ mapping. get ( ( x, y ), none ) for x in range ( self. cols ) ] for y in range ( self. rows ) ] ) ) | [
-1.3812834024429321,
0.026756854727864265,
0.6929725408554077,
-0.1285097301006317,
0.37360891699790955,
-0.6062670946121216,
-0.7418436408042908,
-0.0064975363202393055,
0.2957305312156677,
0.5829633474349976,
-0.6937071681022644,
0.13312563300132751,
0.23829089105129242,
-0.1158459335565... |
def handler ( self, ) : if self. oauth _ version = ='oauth1': request _ token, request _ token _ secret = self. oauth. get _ request _ token ( params = {'oauth _ callback': self. callback _ uri } ) logging. debug ( " request _ token = { 0 } \ n request _ token _ secret = { 1 } \ n ". format ( request _ token, request _... | [
-0.4477451741695404,
-1.202641487121582,
0.8892608284950256,
1.0049443244934082,
-0.1847057193517685,
-0.4068146049976349,
0.09431715309619904,
0.1373518705368042,
0.27377814054489136,
-0.7203465104103088,
0.2397128790616989,
0.5048350691795349,
0.46817436814308167,
0.30376574397087097,
... |
def acquire ( self, new _ occupant ) : self. styling. use ( " good job! you acquired hut " + str ( self. number ) + ". \ n ", " green " ) self. occupant = new _ occupant self. is _ acquired = true | [
-0.30038729310035706,
-0.4469168186187744,
0.37259387969970703,
0.22662371397018433,
0.4914436340332031,
0.12791740894317627,
0.053066469728946686,
0.08623655140399933,
-0.27283012866973877,
-0.6575674414634705,
0.1277005672454834,
0.7691761255264282,
0.7810328006744385,
0.2596192061901092... |
def find _ nonnacolumns ( df1, df2 ) : nonnacols _ df1 = [ ] for i in range ( len ( df1. columns ) ) : col = list ( df1 ) [ i ] if df1 [ col ]. isnull ( ). sum ( ) = = 0 : nonnacols _ df1. append ( col ) nonnacols _ df2 = [ ] for i in range ( len ( df2. columns ) ) : col = list ( df2 ) [ i ] if df2 [ col ]. isnull ( ).... | [
-0.32039350271224976,
0.24758489429950714,
1.001265525817871,
0.6539426445960999,
0.4319911599159241,
0.10986387729644775,
0.05527200922369957,
-0.6914606094360352,
-0.906867265701294,
0.658491313457489,
-0.46337801218032837,
-0.1051311269402504,
0.21860992908477783,
0.60625159740448,
0.... |
def write _ deck ( self, outputfilename = " " ) : if outputfilename = = " " : inputfilenameparts = self. inputfilename. split ( ". " ) x = len ( inputfilenameparts ) - 1 if x = = 0 : x = 1 outputfilename = ". ". join ( inputfilenameparts [ : x ] ) + " _ p " + \ ( ". " + " ". join ( inputfilenameparts [ x : ] ) ). rstri... | [
-0.958438515663147,
-0.3309082090854645,
1.219221830368042,
0.07466322183609009,
-0.5765690803527832,
0.013818101957440376,
0.718574047088623,
0.8323248028755188,
-1.0078215599060059,
-0.2590016722679138,
0.34273669123649597,
-0.2388734668493271,
-0.6019402146339417,
0.5040196180343628,
... |
def _ format _ src _ url ( self, path, caller _ system ) : path = f " { self. _ endpoint } / { self. relpath ( path ) } " if caller _ system is not self : try : path = f " { path }? { self. _ storage _ parameters ['sas _ token'] } " except keyerror : pass return path | [
-0.09136148542165756,
-0.10091394186019897,
0.4618161916732788,
-0.23308880627155304,
0.25269463658332825,
0.17521190643310547,
-0.5525811314582825,
-0.4287692606449127,
0.1538509577512741,
0.47975030541419983,
1.08162260055542,
0.1960938721895218,
-0.152546226978302,
0.41175147891044617,
... |
def configure _ logging ( log _ file _ path ) : if os. path. isfile ( log _ file _ path ) is false : raise exception ( " config file { } not found ". format ( log _ file _ path ) ) else : logging. config. fileconfig ( log _ file _ path ) | [
0.6306771636009216,
-0.2316153198480606,
0.6241331696510315,
0.3199595510959625,
0.391525536775589,
0.3316503167152405,
0.11104540526866913,
0.7251235246658325,
-0.8578094244003296,
0.4125235974788666,
-0.1824505776166916,
-0.6262449026107788,
0.5474798083305359,
0.8177602291107178,
-0.2... |
def is _ valid _ json _ file ( path : str ) - > bool : # check if path destination can be resolved into a file if not os. path. isfile ( path ) : raise valueerror ('the path :'+ path +'cannot be resolved to a valid file. please check the input path.') # check if the file is a csv - file pattern = r'\. json $'if re. sea... | [
0.08953698724508286,
-0.24452286958694458,
0.9897398352622986,
-0.06300629675388336,
-0.41437089443206787,
0.9325980544090271,
0.09136924147605896,
-0.22511975467205048,
-0.37062397599220276,
-0.06640684604644775,
-0.10981740057468414,
0.35404467582702637,
0.5615790486335754,
-0.1909510642... |
def load _ vgg _ weights ( self ) : vgg _ path = " models / imagenet - vgg - verydeep - 19. mat " vgg _ mat = scipy. io. loadmat ( vgg _ path ) self. vgg _ params = np. squeeze ( vgg _ mat ['layers'] ) self. layers = ('conv1 _ 1 ','relu1 _ 1 ','conv1 _ 2 ','relu1 _ 2 ','pool1 ','conv2 _ 1 ','relu2 _ 1 ','conv2 _ 2 ','r... | [
0.27124515175819397,
0.049493152648210526,
0.8624655604362488,
-0.06519699096679688,
0.3521576523780823,
0.06261914223432541,
0.3096787929534912,
-0.577075183391571,
-1.2453714609146118,
0.9375987648963928,
-0.7428801655769348,
0.2561364471912384,
-0.6477674245834351,
0.5708726048469543,
... |
def _ update _ target _ network ( self, mm ) : for param _ q, param _ k in zip ( self. online _ network. parameters ( ), self. target _ network. parameters ( ) ) : param _ k. data. mul _ ( mm ). add _ ( 1. - mm, param _ q. data ) | [
-0.7506113052368164,
-1.4151805639266968,
0.4563746154308319,
0.04205425828695297,
0.20449630916118622,
0.6621785163879395,
-0.475340336561203,
0.07607264816761017,
0.564868152141571,
0.6735676527023315,
0.6235044598579407,
0.8925084471702576,
0.002436418319121003,
-0.15548600256443024,
... |
def crew _ check ( range _ maxpass, ri ) : # flight time evaluated as max payload range flown at cruise speed # 10 % of it is then added again to compensate the low speed flight phases flight _ time = ( range _ maxpass / ( ri. cruise _ speed * 3. 6 ) ) * 1. 1 if flight _ time / ri. pilot _ nb < = 4. 00 : log. info ( " ... | [
-0.15276983380317688,
-0.2726798355579376,
0.8621732592582703,
-0.4809216558933258,
-0.22991438210010529,
0.014226741157472134,
-0.34782588481903076,
0.22505198419094086,
-0.5765689611434937,
-0.41242140531539917,
0.10313975065946579,
0.26545295119285583,
-0.6607099771499634,
0.85850566625... |
def path _ distance ( graph, path ) : distance = 0 current = len ( path ) - 1 while current! = 0 : distance + = graph. edges [ ( path [ current ], path [ current - 1 ] ) ]. get _ distance ( ) current - = 1 return distance | [
-0.0011995603563264012,
-0.3229072690010071,
0.49380525946617126,
0.8883764147758484,
-0.2139558494091034,
0.390110582113266,
0.4963584840297699,
0.3291938900947571,
0.3687877058982849,
1.1535916328430176,
-0.44307753443717957,
-0.2987285852432251,
-1.1853195428848267,
-0.11025913804769516... |
def parent _ not _ too _ old ( self ) : status = true query1 ='select indi. indi, indi. birt, indi. famc, indi. name from indi where indi. famc! = " na "'children = self. tool. query _ info ( query1 ) for child in children : birth = child [ 1 ] query2 ='select fam. husb, fam. wife from fam where fam. fam = = " { } " '.... | [
-0.23186855018138885,
0.07929231971502304,
0.6994029879570007,
-0.3259005844593048,
-1.0444148778915405,
0.6933775544166565,
0.2513260543346405,
-0.5237846970558167,
-0.6914753913879395,
0.06042751297354698,
-0.49295473098754883,
-0.26533985137939453,
-0.002110141096636653,
0.5331146121025... |
def parallel _ map _ df ( func : callable [ [ dataframe, any ], dataframe ], num _ cores = cpu _ count ( ) ) : def wrapper ( df : dataframe, * args, * * kwargs ) : partial _ func = partial ( func, * args, * * kwargs ) partitions = np. linspace ( 0, len ( df ) - 1, num _ cores + 1 ). round ( ). astype ('int') df _ split... | [
-0.32926636934280396,
0.6638152003288269,
0.7798498868942261,
-0.22492524981498718,
-0.5277608633041382,
-0.0960356593132019,
0.6970625519752502,
0.134451225399971,
0.10278823226690292,
-0.4330333471298218,
0.6051958799362183,
-0.03384891152381897,
-0.09042295813560486,
-0.8815092444419861... |
def seek ( section, mod = none ) : if mod is none : mod _ name = _ get _ frame ( 1 ). f _ globals ['_ _ name _ _'] mod = sys. modules [ mod _ name ] for name in sorted ( dir ( mod ) ) : attr = getattr ( mod, name ) # commands might be from different ` options ` modules if not ( type ( attr ). _ _ name _ _ = ='command'a... | [
-0.5246720314025879,
-0.5435843467712402,
0.6844943165779114,
-0.7963340878486633,
-0.17470163106918335,
-0.26381048560142517,
0.553769588470459,
-0.6701599955558777,
-0.19458819925785065,
-0.0863773375749588,
0.2159929722547531,
0.48426926136016846,
0.5755935311317444,
1.0168050527572632,... |
def addidgenerator ( self, idtype, idgen ) : if idtype in idmethod. valid _ id _ methods : self. _ _ idgenerators [ idtype ] = idgen | [
-1.5333119630813599,
0.27724483609199524,
0.3311007022857666,
0.14377546310424805,
-0.4518018364906311,
0.37674883008003235,
-0.6314478516578674,
-0.47643983364105225,
0.18703627586364746,
-0.772855818271637,
-0.46232372522354126,
-0.47709184885025024,
-1.10373055934906,
1.138900637626648,... |
def handle _ function ( self ) : self. fonction ( ) self. thread = threading. timer ( self. temps, self. handle _ function ) self. thread. start ( ) | [
0.6407357454299927,
0.16949713230133057,
0.38215455412864685,
0.2969895899295807,
1.3526006937026978,
0.14622105658054352,
0.049275875091552734,
0.6510517597198486,
-0.9915958642959595,
-1.016787052154541,
-0.7637857794761658,
-0.0729508250951767,
0.03252353146672249,
0.19463303685188293,
... |
def _ parse _ args ( ) : usage ='usage : % prog - i file. bcf - g file. gff3 - o outprefix'parser = optparse. optionparser ( usage ) parser. add _ option ('- i ','- - input ', dest ='input ', type ='string ', help ='input depth file') # parser. add _ option ('- f ','- - fpkm ', dest ='fpkm _ file ', type ='string ', he... | [
0.16407157480716705,
-0.41165977716445923,
0.7486887574195862,
-0.8208740949630737,
0.25502151250839233,
-0.29055026173591614,
-0.1587732583284378,
0.4954834580421448,
-0.7687592506408691,
0.48663556575775146,
-0.33122217655181885,
-0.3947564959526062,
-0.3082422912120819,
0.51118814945220... |
def test _ graph _ command _ traverse _ system ( self ) : pass | [
-0.28405332565307617,
0.4223599433898926,
0.4513183534145355,
1.0306226015090942,
1.1454472541809082,
0.7601258754730225,
1.9719828367233276,
-1.0811359882354736,
-0.22643746435642242,
-0.991851806640625,
-0.16355203092098236,
0.9426626563072205,
-0.919226348400116,
0.4872569441795349,
-... |
def uniformsumcdf ( n : int, x : float ) - > float : # source : en. wikipedia. org / wiki / irwin - hall _ distribution # the forumla given there contains very large terms when n is large. # hence it loses precision fast. # there may be a better way to compute this distribution. # scipy might add this function github. ... | [
0.11961942911148071,
0.7506826519966125,
0.547243595123291,
-0.1725342720746994,
-0.5305635929107666,
0.08442780375480652,
-0.011444834992289543,
0.2942391335964203,
0.8852493166923523,
0.0819745883345604,
-0.06836412847042084,
-0.19938547909259796,
-0.35983335971832275,
0.2956883907318115... |
def get _ right _ wall ( self ) : x1, y1 = self. left + self. width - 1, self. top + 1 x2, y2 = x1, self. top + self. height - 2 return self. level. get _ tiles _ along _ line ( x1, y1, x2, y2 ) | [
0.5172665119171143,
0.19457103312015533,
0.8288795948028564,
1.5132942199707031,
-0.5537079572677612,
0.05983689799904823,
-0.08412149548530579,
-1.319580316543579,
-0.8539342284202576,
0.16284291446208954,
-0.5422808527946472,
0.09655789285898209,
-0.8128808736801147,
1.1420546770095825,
... |
def setup _ scrollbar ( self ) : self. containers [ " order _ frame " ]. grid _ propagate ( false ) self. containers [ " orders _ scrollbar " ]. grid ( row = const. archive _ widget _ config _ values [ " orders _ scrollbar " ] [ " row " ], column = const. archive _ widget _ config _ values [ " orders _ scrollbar " ] [ ... | [
0.34226328134536743,
0.27512064576148987,
1.0976896286010742,
0.09729792177677155,
0.5458967089653015,
-0.36835193634033203,
0.637327253818512,
-0.6274790167808533,
-0.041900355368852615,
-0.42508429288864136,
0.45609399676322937,
0.04496676102280617,
0.4226170480251312,
1.5136795043945312... |
def attack ( self, urls, payloads, query _ string ) : for url in urls : if self. pool : self. poll _ workers ( ) else : self. mothership. poll _ workers ( ) if not self. _ landing : self. attack _ url ( url, payloads, query _ string ) | [
-1.1317493915557861,
0.34229567646980286,
0.37425658106803894,
0.6662010550498962,
0.8972502946853638,
0.1530698537826538,
-0.29861950874328613,
-0.4142245352268219,
0.000094571580120828,
0.11678136885166168,
0.37792328000068665,
-0.32694217562675476,
-0.6101287007331848,
0.429769933223724... |
def process ( self, dataset = none, from _ dataset = false ) : self. _ assign _ dataset ( dataset = dataset ) self. _ call _ from _ dataset ( from _ dataset = from _ dataset ) return self. dataset | [
-0.1863580197095871,
0.26969969272613525,
0.5720938444137573,
-0.796314001083374,
-0.428379625082016,
-0.19307050108909607,
-0.3733334541320801,
0.5002661347389221,
0.6941909193992615,
-1.012772560119629,
0.4697052240371704,
1.1151059865951538,
-0.08992118388414383,
0.18530718982219696,
... |
def test _ get _ namespace _ slack _ no _ k8s _ config ( self, mock _ k8s _ corev1api, mock _ k8s _ config, mock _ k8s _ config _ in _ cluster ) : mock _ k8s _ config. side _ effect = config. configexception mock _ k8s _ config _ in _ cluster. side _ effect = config. configexception mock _ k8s _ api = mock _ k8s _ core... | [
0.12222927808761597,
0.7359484434127808,
0.7290750741958618,
0.23745737969875336,
0.3597109615802765,
0.3837197721004486,
-0.5536128878593445,
-0.8894310593605042,
0.27578482031822205,
-0.5586075186729431,
-0.48395437002182007,
0.6126749515533447,
-0.04318242147564888,
0.6985611319541931,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.