text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def iskeyid ( self, * args ) : return _ snap. tintflth _ iskeyid ( self, * args ) | [
0.396788090467453,
-0.5609135031700134,
0.28440171480178833,
0.965105414390564,
0.1566973179578781,
0.05500141158699989,
-0.4475499987602234,
-0.22669076919555664,
0.29410168528556824,
-0.048892080783843994,
-0.2242022603750229,
0.41192352771759033,
-1.9323954582214355,
1.0407788753509521,... |
def generate _ triple _ moves _ with _ collision ( self, black _ marbles : list, white _ marbles : list, turn : chr, marble _ pairs : list ) : result = [ ] moves = [ ] marbles = black _ marbles + white _ marbles forbidden = self. forbidden _ spots if turn = ='b': enemy _ marbles = white _ marbles else : enemy _ marbles... | [
-0.5905771255493164,
-0.0752054825425148,
1.0653891563415527,
-0.5212584733963013,
0.37928107380867004,
0.03968069702386856,
0.42452794313430786,
0.18346406519412994,
-0.2354743480682373,
1.176220417022705,
-0.3268950283527374,
-0.48887190222740173,
-0.43957871198654175,
-0.501571834087371... |
def getoutdegcnt _ pungraph ( * args ) : return _ snap. getoutdegcnt _ pungraph ( * args ) | [
-0.41330549120903015,
0.9565973281860352,
0.28861331939697266,
0.3224802017211914,
-0.3723527789115906,
-0.4831444025039673,
0.9198632836341858,
0.8609372973442078,
-0.3002428710460663,
-0.19691742956638336,
-0.2141341269016266,
-0.4542333781719208,
-0.118174247443676,
0.2080260068178177,
... |
def _ _ call _ _ ( self, * args ) : return _ snap. tsoutmnp _ _ _ call _ _ ( self, * args ) | [
-0.7143996953964233,
0.881953239440918,
0.5143746733665466,
-0.5762279033660889,
-0.7812373638153076,
-0.05162600427865982,
-0.20156581699848175,
-0.0245500598102808,
-0.5441956520080566,
0.6015111207962036,
-0.5806971788406372,
-1.778856635093689,
-0.36949312686920166,
-0.434776246547699,... |
def append ( self, text ) : self. text + = text | [
-0.008392675779759884,
-0.1801661103963852,
0.2063123732805252,
-0.3340672254562378,
-0.6655674576759338,
1.067681074142456,
-1.3121923208236694,
0.19373993575572968,
0.8258033990859985,
-0.24582503736019135,
-0.4898819029331207,
0.15258054435253143,
-0.8782821297645569,
0.6519101858139038... |
def reshape _ 1d ( self, dat ) : if dat. ndim = = 1 : dat = np. ones _ like ( self. data ) * dat [ :, np. newaxis ] if ( dat. shape! = self. data. shape ) : raise shapeerror ('% s! = % s : reshaped variables must have same shape as data.'% ( repr ( dat. shape ), repr ( self. data. shape ) ) ) try : mask = self. data. m... | [
-0.15698891878128052,
0.2159474641084671,
0.604010283946991,
-0.4447050392627716,
0.053683772683143616,
0.2554623782634735,
0.539449155330658,
-0.9111605882644653,
0.3267002999782562,
-0.45135635137557983,
0.25813376903533936,
0.7527019381523132,
-0.25946149230003357,
0.15792754292488098,
... |
def _ add _ file _ reads ( self, node, files ) : for file in files : if file : nextid = len ( self. nodemetadata ) frnodename = " file read { 0 } ". format ( nextid ) self. nodemetadata [ frnodename ] = dict ( ) self. nodemetadata [ frnodename ] ['pid'] = node self. nodemetadata [ frnodename ] ['file'] = file self. nod... | [
-0.17099352180957794,
-0.06744281947612762,
0.6628992557525635,
-1.1434963941574097,
0.9225860238075256,
0.5032379627227783,
-0.9640682339668274,
0.699709951877594,
-0.6400514245033264,
-0.15009629726409912,
1.1452677249908447,
0.21428443491458893,
0.2533567249774933,
-0.34785670042037964,... |
def _ _ init _ _ ( self ) : self. id = " # " self. collidable = false | [
0.6008632779121399,
-0.3169420659542084,
0.3697947561740875,
-0.017739584669470787,
0.250484436750412,
0.9234545826911926,
0.42974305152893066,
0.49641239643096924,
-0.2615582346916199,
-0.08995404839515686,
-0.9454182386398315,
-1.0380005836486816,
-0.7310413122177124,
0.40611812472343445... |
def on _ key _ press ( self, key, modifiers ) : # checks if the key pressed matches the current enemy health target if self. target _ selected is true : if self. target. health [ self. count ] = = 1 and key = = arcade. key. key _ 1 : self. target. health [ self. count ] = 0 self. count + = 1 elif self. target. health [... | [
-0.888519823551178,
-0.9113897085189819,
1.095937728881836,
-0.7286565899848938,
0.4917251765727997,
-0.05801006779074669,
0.36085766553878784,
0.32273247838020325,
0.1424681544303894,
0.7032378315925598,
0.15572063624858856,
-0.41613471508026123,
-0.07471289485692978,
-0.03114747814834118... |
def sxxxxx ( p, nss ) : sc = wavefunction ( 1 ) sc [ 2 ] = complex ( 1., 0. ) sc [ 0 ] = complex ( p [ 0 ] * nss, p [ 3 ] * nss ) sc [ 1 ] = complex ( p [ 1 ] * nss, p [ 2 ] * nss ) return sc | [
0.23821786046028137,
-0.009510449133813381,
0.40907976031303406,
0.37679147720336914,
-0.5896807312965393,
-0.09788081049919128,
-0.26308849453926086,
-0.07663978636264801,
0.8615451455116272,
-0.10621953755617142,
-1.1582168340682983,
0.3794984221458435,
-0.20757408440113068,
-1.090037584... |
def issuffix ( self, * args ) : return _ snap. tcha _ issuffix ( self, * args ) | [
-0.3293844759464264,
0.15451711416244507,
0.5136988162994385,
-0.11114120483398438,
0.8439818620681763,
-0.014798233285546303,
0.4121757745742798,
0.5116882920265198,
-0.20417335629463196,
0.36280614137649536,
-1.1637071371078491,
0.5541970133781433,
-0.1816243827342987,
1.4496785402297974... |
def build _ monthly _ summary ( df, select _ value ) : month _ list = np. array ( ['jan ','feb ','mar ','apr ','may ','jun ','jul ','aug ','sep ','oct ','nov ','dec'] ) dat _ list = np. zeros ( [ 12, 5 ] ) for indx in range ( 12 ) : smpl _ df = df. loc [ df ['month'] = = indx + 1 ] vals = smpl _ df [ select _ value ]. ... | [
-0.24037396907806396,
0.41455748677253723,
0.5732464790344238,
-0.4390828311443329,
-0.2613414525985718,
-0.23275846242904663,
0.0694093257188797,
-0.3879927098751068,
0.48517096042633057,
-0.3941648602485657,
0.36648645997047424,
1.0307905673980713,
0.10358234494924545,
-0.642328262329101... |
def tstr _ putfbaseifempty ( * args ) : return _ snap. tstr _ putfbaseifempty ( * args ) | [
-0.21204392611980438,
0.9515786170959473,
0.6411246061325073,
0.2834061086177826,
1.3209099769592285,
-0.23873071372509003,
0.713781476020813,
-0.8533410429954529,
-1.6541929244995117,
0.6512212753295898,
-0.5040578842163086,
-0.3213590681552887,
-1.2730932235717773,
0.5548690557479858,
... |
def read _ map ( filename, nest = false, hdu = none, h = false, verbose = true ) : data, hdr = fitsio. read ( filename, header = true, ext = hdu ) nside = int ( hdr. get ('nside') ) if verbose : print ('nside = { 0 : d } '. format ( nside ) ) if not healpy. isnsideok ( nside ) : raise valueerror ('wrong nside parameter... | [
-0.4872579276561737,
-0.17497651278972626,
0.8921424746513367,
0.03805559128522873,
-0.38423559069633484,
-0.12431111186742783,
-0.19913025200366974,
-0.3449317514896393,
0.10734082758426666,
-0.2167506217956543,
0.3304223120212555,
0.6983461380004883,
0.25989285111427307,
0.12389926612377... |
def getintattrinddate ( self, * args ) : return _ snap. pneanet _ getintattrinddate ( self, * args ) | [
-0.22274261713027954,
0.277360737323761,
0.6156466603279114,
0.30109065771102905,
0.42483359575271606,
1.2269819974899292,
-0.27092263102531433,
-0.9033940434455872,
-1.016318678855896,
-0.7963972091674805,
0.27092087268829346,
-0.39226096868515015,
-1.9318807125091553,
0.4839296340942383,... |
def map _ line _ words ( fn : callable [ [ t1 ], t2 ], list _ of _ lines : iterable [ iterable [ t1 ] ] ) - > list [ list [ t2 ] ] : return [ [ fn ( word ) for word in line ] for line in list _ of _ lines ] | [
0.2029399275779724,
-0.7166507840156555,
0.550044596195221,
0.0775323212146759,
0.31852588057518005,
-0.4970936179161072,
-1.1985102891921997,
1.0402553081512451,
-0.11741778999567032,
-0.05845717340707779,
0.051729969680309296,
0.03724616393446922,
1.1682918071746826,
1.1424565315246582,
... |
def get _ storage _ accounts ( self ) : from azure. keyvault import storageaccountid # list the storage accounts in the vault print ('list and get storage accounts managed by the vault') storage _ accounts = list ( self. keyvault _ sp _ client. get _ storage _ accounts ( vault _ base _ url = self. sample _ vault _ url,... | [
0.7090825438499451,
-0.8786165118217468,
0.4233608841896057,
1.4798277616500854,
0.1259864866733551,
-0.4214116930961609,
-0.31148648262023926,
-0.6084040999412537,
0.6198354363441467,
-0.24977190792560577,
-0.28388622403144836,
0.44642317295074463,
-0.27283230423927307,
0.4144749641418457... |
def check ( self, result _ a, result _ b, random _ seed = none ) : self. statistics = self. energy _ call ( result _ a, result _ b ) self. p _ value = - 1 cut _ off = 0. 001 if self. statistics < cut _ off : self. p _ value = 1 else : self. p _ value = 10e - 6 if isinstance ( self. p _ value, torch. tensor ) : self. p ... | [
0.03611573204398155,
0.022876298055052757,
0.43003806471824646,
0.45978572964668274,
0.2226589471101761,
-0.12891650199890137,
-0.13024458289146423,
-0.21447578072547913,
-0.0025196934584528208,
0.28880834579467773,
0.9626369476318359,
-0.07745865732431412,
-0.10875633358955383,
0.41200527... |
def test _ get _ ratings _ unavailable _ article ( self ) : data _ string, status _ code = self. get _ ratings ( is _ found = false ) self. assertin ('error ', data _ string ) self. assertequal ( 404, status _ code ) | [
-0.19797952473163605,
0.8970393538475037,
0.3408798575401306,
-0.17401070892810822,
0.8616233468055725,
1.5531556606292725,
-0.29898884892463684,
0.5817896723747253,
-0.9064780473709106,
0.5692406296730042,
0.2811415195465088,
0.3748500645160675,
-1.1408140659332275,
-0.19521966576576233,
... |
def get _ plugin _ templates ( ) : config = app. config ['default _ config'] pluginmanager = plugin. get _ pluginmanager ( config ) scanner _ extensions = [ plugin. capturehooksmixin, plugin. triggerhooksmixin ] processor _ extensions = [ plugin. processhookmixin, plugin. outputhookmixin ] if app. config ['mode'] = ='s... | [
-0.28670719265937805,
-0.6304967403411865,
0.5531057715415955,
-0.048839155584573746,
-0.7335370779037476,
-1.3810051679611206,
-0.21212700009346008,
0.02326032891869545,
0.38051852583885193,
0.7100583910942078,
-1.4030742645263672,
-0.47284170985221863,
-0.1106107085943222,
0.343237310647... |
def rearrange _ digits ( input _ list ) : # insert all digits in a max - heap # se we can extract then in descending order heap = heap ( heap _ type = " max " ) for digit in input _ list : heap. insert ( digit ) left, right = 0, 0 # extract the digits one by one from the max - heap # and distribute them evenly between ... | [
-0.025421740487217903,
0.1556212455034256,
0.49754875898361206,
0.19959858059883118,
0.6808600425720215,
-0.8013081550598145,
0.29791101813316345,
0.7982547879219055,
0.524246096611023,
0.013896808959543705,
-0.4002052843570709,
-0.5837059020996094,
-0.8861438632011414,
1.3011997938156128,... |
def get _ revision _ class ( self ) : if not self. type : return none class _ name ='% srevision'% ( self. type. capitalize ( ) ) try : revision _ class = getattr ( sys. modules ['app. models. % s'% ( self. type ) ], class _ name ) except attributeerror : return none return revision _ class | [
0.029258111491799355,
-0.7512309551239014,
0.5392934679985046,
0.23360173404216766,
0.8163052797317505,
0.3007362186908722,
-0.2716507315635681,
0.07680850476026535,
0.5092988610267639,
0.014397621154785156,
0.42120131850242615,
0.05319666117429733,
0.1784081608057022,
0.22667546570301056,... |
def get _ nn _ interactions ( site1, site2, gyro ) : r1 = site1. positions r2 = site2. positions i1 = state _ vector ( site1. index ) i2 = state _ vector ( site2. index ) # add equation to calculate interaction hamiltonian return site _ hamiltonian | [
-0.3535458445549011,
0.0010602304246276617,
0.3951641023159027,
0.06485447287559509,
0.599473237991333,
-0.11399281024932861,
0.9177150130271912,
-0.6180911660194397,
-0.6208365559577942,
0.25339388847351074,
-1.0219022035598755,
0.30840325355529785,
-0.7987023591995239,
-0.608611941337585... |
def test _ get _ involved _ renders ( self ) : c = client ( ) response = c. get ( reverse ('getpage ', args = ['involved'] ) ) self. assertequal ( response. status _ code, 200 ) self. asserthasgoogleanalytics ( response ) | [
0.7293779253959656,
0.7563304901123047,
0.5270642042160034,
-0.4456900358200073,
1.528965950012207,
1.1492944955825806,
0.5980190634727478,
0.37477749586105347,
-0.2925502061843872,
-1.2281922101974487,
0.27114245295524597,
0.3056851923465729,
-0.3771674931049347,
0.10733160376548767,
0.... |
def adjust _ learning _ rate ( optimizer, base _ lr, epoch, epochs, warm _ up _ epochs = 3 ) : if warm _ up _ epochs > 0 and epoch < warm _ up _ epochs : lr = base _ lr * ( ( epoch + 1 ) / ( warm _ up _ epochs + 1 ) ) else : alpha = 0 cosine _ decay = 0. 5 * ( 1 + np. cos ( np. pi * ( epoch - warm _ up _ epochs ) / ( e... | [
0.17491769790649414,
-0.6086170673370361,
0.504526674747467,
-0.183927983045578,
-0.332531601190567,
-0.10988215357065201,
-0.4511372447013855,
0.763676643371582,
-0.3413010239601135,
-0.1622031331062317,
0.3145331144332886,
0.1544436365365982,
0.08760332316160202,
0.877331018447876,
0.2... |
def parsetostatementtermlist ( texttoparse, codedefinitionpoint, namescope ) : statementtermlistorerror = \ foranative. parsestringtostatementtermswithlocationinfo ( texttoparse, codedefinitionpoint, namescope ) if isinstance ( statementtermlistorerror, foranative. functionparseerror ) : raise parseexception. parseexce... | [
-0.32103100419044495,
-1.142568826675415,
0.16989924013614655,
0.37792378664016724,
-0.2601323425769806,
-0.6618790626525879,
-0.8741714954376221,
0.23947204649448395,
0.5395440459251404,
0.634121298789978,
-0.4026101529598236,
-0.3727644085884094,
-0.11116276681423187,
0.4919703006744385,... |
def pizzas ( request ) : pizzas = pizza. objects. order _ by ('date _ added') context = {'pizzas': pizzas } return render ( request,'pizzas / pizzas. html ', context ) | [
0.40953323245048523,
0.6631842255592346,
0.42691928148269653,
0.5181321501731873,
-0.6428179144859314,
0.2859632074832916,
0.27525579929351807,
1.0566481351852417,
-0.09437713027000427,
-0.012360919266939163,
0.434648722410202,
-0.3957023024559021,
0.295387327671051,
1.0036439895629883,
... |
def equivalent ( self, qc, * args, * * kwargs ) : from pyzx import circuit zxqc _ a = circuit. from _ qasm ( self. to _ qasm ( ) ) zxqc _ b = circuit. from _ qasm ( qc. to _ qasm ( ) ) ans = zxqc _ a. verify _ equality ( zxqc _ b ) return ans | [
0.2375236600637436,
-0.37500640749931335,
0.6435174942016602,
-0.5053848624229431,
0.07120198756456375,
-0.2847853899002075,
-0.04978877678513527,
-1.7080543041229248,
1.0761744976043701,
-0.0385495126247406,
-0.3933829963207245,
0.37013089656829834,
-0.7496464848518372,
0.0910023897886276... |
def get _ artist _ info _ from _ name ( self, artist _ name ) : artist _ id = self. get _ artist _ id ( artist _ name ) if artist _ id : return self. get _ artist _ info _ from _ id ( artist _ id ) return none | [
0.2011149823665619,
-1.0185173749923706,
0.29937487840652466,
-0.07355127483606339,
-0.6239882111549377,
-1.0077139139175415,
-0.5901186466217041,
-0.564967691898346,
0.6355845928192139,
-0.14709831774234772,
-0.6063802242279053,
-0.000213817271287553,
-0.17840532958507538,
0.3410608470439... |
def modify _ schema ( cls ) : # everything in declared _ fields was pulled out by our metaclass, time # to add them back in for parent in cls. mro ( ) : if cls. _ meta. proxy : # proxy models already had their fields added via the parent # model, so don't add them again. continue try : declared _ fields = parent. decla... | [
-0.32873138785362244,
0.04711383581161499,
1.0639997720718384,
-0.2836795449256897,
0.7548826932907104,
-0.0123712457716465,
0.5368261337280273,
0.061157312244176865,
-0.023316683247685432,
-0.19827517867088318,
-0.40722453594207764,
-0.026727553457021713,
0.25690749287605286,
0.3655816018... |
def _ do _ create _ revision ( self, publisher, indexer, state ) : kwargs = { } if ( state = = states. baseline ) : kwargs ['created'] = publisher. created kwargs ['modified'] = publisher. modified else : kwargs ['created'] = datetime. now ( ) kwargs ['modified'] = kwargs ['created'] revision = publisherrevision ( # re... | [
0.3250816762447357,
-0.5457440614700317,
0.4409520626068115,
-0.19579799473285675,
-0.19717364013195038,
0.01566469296813011,
-0.6169831156730652,
1.1618783473968506,
-0.1045483723282814,
0.4754924476146698,
-0.11973849684000015,
-0.15266826748847961,
-0.5448676943778992,
-0.84144175052642... |
def loadcrossnettonet ( * args ) : return _ snap. loadcrossnettonet ( * args ) | [
-0.22240297496318817,
0.4746682941913605,
0.4297567903995514,
0.09047170728445053,
0.271920382976532,
0.39920851588249207,
0.6253272294998169,
-0.6940374970436096,
-0.723717451095581,
0.14520281553268433,
-1.3151613473892212,
-0.8357668519020081,
-0.9096256494522095,
0.5079336762428284,
... |
def test _ extends _ base _ class ( self ) : self. asserttrue ( issubclass ( omniformemailhandler, omniformhandler ) ) | [
0.6169769763946533,
0.24609622359275818,
0.37553414702415466,
1.2219632863998413,
-0.30008211731910706,
1.4561821222305298,
-0.9353491067886353,
0.5686231851577759,
0.9984996914863586,
-0.931350588798523,
-1.351540446281433,
0.18169166147708893,
-0.38702693581581116,
0.43542319536209106,
... |
def transition _ matrix ( self, sequences ) : for seq in sequences : self. seq _ counts [ seq ] + = 1 for i in range ( len ( seq ) - 1 ) : try : c = self. tm _ dict [ seq [ i ] ] [ seq [ i + 1 ] ] except keyerror : self. tm _ dict [ seq [ i ] ] [ seq [ i + 1 ] ] = 0 self. tm _ dict [ seq [ i ] ] [ seq [ i + 1 ] ] + = 1... | [
-0.6237196922302246,
-0.6368025541305542,
0.7207256555557251,
-0.4623805582523346,
0.05703411251306534,
-0.40560922026634216,
0.4725237786769867,
0.7449910044670105,
0.1036839634180069,
0.41391387581825256,
0.11164134740829468,
-0.6577511429786682,
-0.21866300702095032,
0.21713879704475403... |
def ylabel ( self, v ='' ) : return str ( v ) | [
-0.8362834453582764,
-1.2029410600662231,
0.47151243686676025,
-0.8089038133621216,
-0.2326202690601349,
0.976333737373352,
0.016715608537197113,
-0.5953564643859863,
0.7896764874458313,
0.19055640697479248,
-0.5240089893341064,
0.6286563873291016,
-0.4523300230503082,
-0.2500223219394684,... |
def name _ get ( self, cr, uid, ids, context = none ) : if not len ( ids ) : return [ ] res = [ ] for record in self. browse ( cr, uid, ids, context = context ) : name = record. start _ place. name +'-'+ record. end _ place. name res. append ( ( record. id, name ) ) return res | [
-1.3047171831130981,
-0.7335711717605591,
0.5407013893127441,
-0.009740205481648445,
-0.3066641688346863,
-0.1612398773431778,
-0.36384499073028564,
0.11227621138095856,
0.5118329524993896,
1.0652862787246704,
-0.542116105556488,
-0.020320018753409386,
-0.09698179364204407,
0.2038268595933... |
def addmp ( self, * args ) : return _ snap. tfltprv _ addmp ( self, * args ) | [
-1.1322602033615112,
0.3667643666267395,
0.34190505743026733,
-0.12144562602043152,
0.5535062551498413,
0.4474846422672272,
0.20667512714862823,
0.6918929815292358,
-0.821017324924469,
-0.425071656703949,
0.9072601199150085,
-1.4719499349594116,
-1.116186499595642,
1.3171716928482056,
0.... |
def generate _ mastermaps ( austin _ save _ path = none, dallas _ save _ path = none, houston _ save _ path = none ) : txhousing. analysis. mastermaps. create _ austin _ mastermap ( save _ path = austin _ save _ path ) txhousing. analysis. mastermaps. create _ dallas _ mastermap ( save _ path = dallas _ save _ path ) t... | [
0.09090136736631393,
-0.45534831285476685,
0.6402266025543213,
0.9230978488922119,
0.5603973865509033,
1.3053104877471924,
0.35339877009391785,
0.7373902797698975,
-0.13970108330249786,
-0.09018512070178986,
-1.104716181755066,
-0.8763123154640198,
0.4407936632633209,
0.0406700074672699,
... |
def onquitbuttonclicked ( self ) : pass | [
1.649923324584961,
-1.0533108711242676,
0.25874823331832886,
-0.485107421875,
0.14718498289585114,
1.050359845161438,
0.5655240416526794,
-0.6865488886833191,
-0.2119286209344864,
-0.09626264870166779,
-0.382276326417923,
0.22112329304218292,
-0.05993019789457321,
-0.005690570455044508,
... |
def _ _ init _ _ ( self, * args ) : _ snap. tintprflthi _ swiginit ( self, _ snap. new _ tintprflthi ( * args ) ) | [
-0.42969825863838196,
0.12495243549346924,
0.2890554964542389,
0.1400683969259262,
0.01650390401482582,
0.28238922357559204,
-0.3328416645526886,
-0.6292773485183716,
-0.5182204842567444,
-0.903110921382904,
-0.341603547334671,
-0.6381877064704895,
-0.834921658039093,
1.8124260902404785,
... |
def _ resolve _ output _ placeholders ( debug, name _ tokens, step _ config, step _ data, step _ runner ) : for itm in step _ config. cmd : if isinstance ( itm, util. placeholder ) : test _ data = step _ runner. placeholder ( name _ tokens, itm ) if isinstance ( itm, util. inputplaceholder ) : debug. write _ line ('cle... | [
-0.352334588766098,
-0.1490730345249176,
0.4642517566680908,
-0.2075170874595642,
0.061497073620557785,
0.18027566373348236,
0.6439086198806763,
0.08594813942909241,
-1.1905368566513062,
-0.2694237530231476,
-0.1850918084383011,
-0.9981182813644409,
-0.3159775137901306,
1.3495455980300903,... |
def getdat ( self, * args ) : return _ snap. tstrintfltprhi _ getdat ( self, * args ) | [
0.6277649998664856,
0.4132188856601715,
0.4746971130371094,
-1.7516891956329346,
0.7292002439498901,
1.2209151983261108,
0.0868551954627037,
-1.1398018598556519,
-1.3161044120788574,
-0.8055939078330994,
0.0766826942563057,
0.0886235386133194,
-0.9120504260063171,
0.3309858441352844,
0.0... |
def blur ( im, filter _ vec, brighten = false ) : if brighten : kernel = filter _ vec * 2 else : kernel = filter _ vec # perform a convolution in both directions blur = convolve ( im, kernel ) # full _ blur = convolve ( x _ blur, kernel. transpose ( ) ) return blur | [
0.7605295181274414,
-0.032240718603134155,
0.6382899284362793,
1.4383050203323364,
-0.751490592956543,
-0.5186493396759033,
0.20805278420448303,
0.18822944164276123,
-0.22969873249530792,
0.12164473533630371,
0.001135832048021257,
0.9771312475204468,
0.4226432740688324,
0.2678000032901764,... |
def load _ mp3 _ config ( config, config _ file ) : logger = logging. getlogger ( _ _ name _ _ ) mp3config _ section _ name = " name2mp3 " if mp3config _ section _ name not in config. sections ( ) : raise configexception ( f " config file { config _ file } does not include " f " the { mp3config _ section _ name } secti... | [
0.13529635965824127,
-1.1037895679473877,
0.8943963050842285,
-0.26655125617980957,
-0.7749813795089722,
0.6925330758094788,
0.08404822647571564,
0.34313490986824036,
-0.5950201749801636,
0.5234451293945312,
0.5640333294868469,
0.016886644065380096,
-0.7455657124519348,
-0.1731478571891784... |
def load _ data ( database _ filepath ) : engine = create _ engine ( f'sqlite : / / / { database _ filepath }') df = pd. read _ sql _ table ( " emergency ", engine ) x = df. message. values y = df. loc [ :, " related " : ]. values return x, y | [
0.15909896790981293,
0.7413773536682129,
0.4851771891117096,
-1.0538182258605957,
0.4896089434623718,
-0.008021547459065914,
-0.2971392273902893,
0.011472200974822044,
-0.8822189569473267,
0.3463587760925293,
0.2857925295829773,
-0.3540288209915161,
-0.014516285620629787,
-0.65751761198043... |
def ncl _ version ( ) : ncl = which ('ncl') if not ncl : raise recipeerror ( " recipe contains ncl scripts, but cannot find " " an ncl installation. " ) try : cmd = [ ncl,'- v'] version = subprocess. check _ output ( cmd, universal _ newlines = true ) except subprocess. calledprocesserror : logger. error ( " failed to ... | [
0.23300395905971527,
0.20434997975826263,
0.5302940607070923,
0.09110021591186523,
-0.056506868451833725,
-0.07329128682613373,
0.5468290448188782,
-0.5700402855873108,
-0.6736300587654114,
0.12519901990890503,
-0.26049676537513733,
-0.14044345915317535,
0.18044856190681458,
0.632954001426... |
def tch _ getstr ( * args ) : return _ snap. tch _ getstr ( * args ) | [
0.89439857006073,
0.08338174223899841,
-0.0475798174738884,
0.0914381816983223,
0.7832943797111511,
0.4817860722541809,
0.024908840656280518,
-0.7417846322059631,
-0.7816362977027893,
-0.25429460406303406,
-0.3897820711135864,
-0.9351590871810913,
-0.2873839735984802,
-0.3451277017593384,
... |
def get _ application _ case _ reference ( lock _ manager : " lockmanager ", application : " imporexp " ) - > str : if application. is _ import _ application ( ) : prefix = prefix. import _ app else : if application. process _ type = = processtypes. gmp : prefix = prefix. export _ app _ ga else : prefix = prefix. expor... | [
0.4530511498451233,
-0.42113378643989563,
0.7629871964454651,
0.6838107109069824,
-0.7861520051956177,
0.5777671337127686,
0.21532995998859406,
-1.0301227569580078,
0.936487078666687,
1.985908031463623,
1.5223838090896606,
0.6678523421287537,
-0.21700917184352875,
-0.0410294383764267,
0.... |
def unread _ inbox _ count ( parser, token ) : args = token. contents. split ( ) if len ( args ) > 1 : if len ( args )! = 3 : raise templatesyntaxerror ( " unread _ inbox _ count tag takes either no arguments or exactly two arguments " ) if args [ 1 ]! ='as': raise templatesyntaxerror ( " first argument to unread _ inb... | [
0.027905212715268135,
-0.808762788772583,
0.6712160110473633,
-0.6970735192298889,
-0.8794978260993958,
-0.5744030475616455,
0.2613581418991089,
0.042798448354005814,
-0.9775116443634033,
-0.7774532437324524,
0.24886219203472137,
-0.28930163383483887,
-0.09630957990884781,
0.08868435770273... |
def attrnameei ( self, * args ) : return _ snap. pneanetmp _ attrnameei ( self, * args ) | [
-0.6174042224884033,
0.30011671781539917,
0.19002331793308258,
0.7735883593559265,
0.27170562744140625,
0.37183859944343567,
0.37405580282211304,
-0.08621425926685333,
-0.9910898208618164,
0.3915727138519287,
-0.3156771659851074,
-1.10065495967865,
-0.33642908930778503,
0.425755113363266,
... |
def call _ command ( self, cmd, directory = none ) : proc = self. start ( cmd, stdin = none, stdout = none, stderr = none, directory = directory ) retcode = get _ kernel ( ). run ( _ call _ proc ( proc ) ) return exitstatus. exitstatus ( 0, name = proc. progname, returncode = retcode ) | [
-0.3746753931045532,
0.2900054156780243,
0.8636974692344666,
0.6713875532150269,
-0.4513991177082062,
-0.19022494554519653,
-0.5641356706619263,
0.09004252403974533,
0.5655232071876526,
-0.12081626057624817,
0.23898452520370483,
0.6960733532905579,
-0.5101518034934998,
0.7379838824272156,
... |
def get _ available _ addons ( event, user, is _ strict = false ) : filter _ and, filter _ or = get _ addon _ access _ filter ( user, is _ strict = is _ strict ) q _ obj = none if filter _ and : q _ obj = q ( * * filter _ and ) if filter _ or : q _ obj _ or = reduce ( operator. or _, [ q ( * * { key : value } ) for key... | [
-0.12720537185668945,
-0.7820835113525391,
0.9054091572761536,
0.9406439065933228,
-0.7193312048912048,
0.2961796522140503,
-0.6333732604980469,
-0.0687166154384613,
0.6543160676956177,
0.7390680909156799,
-0.31492501497268677,
1.07089102268219,
0.10737314820289612,
0.095269575715065,
-0... |
def _ run _ collect _ allelic _ counts ( pos _ file, pos _ name, work _ dir, data ) : out _ dir = utils. safe _ makedir ( os. path. join ( dd. get _ work _ dir ( data ), " structural ", " counts " ) ) out _ file = os. path. join ( out _ dir, " % s - % s - counts. tsv " % ( dd. get _ sample _ name ( data ), pos _ name )... | [
1.5009747743606567,
-0.21845006942749023,
0.8845181465148926,
-0.6127578616142273,
-0.24150945246219635,
0.07302015274763107,
0.09436383843421936,
0.095754474401474,
-0.3458823561668396,
0.5870682001113892,
0.9026423096656799,
0.4176097512245178,
0.82417231798172,
-0.355650395154953,
-0.... |
def test _ field _ name _ unique _ for _ form ( self ) : form = omnimodelformfactory. create ( ) field = omnifield ( name ='a ', label ='a ', widget _ class ='a ', form = form ) field. save ( ) field. pk = none # remove the pk to make the instance think it's new self. assertraises ( integrityerror, field. save ) | [
-0.18070080876350403,
0.6694158315658569,
0.40656304359436035,
-0.3592301905155182,
0.8669021129608154,
0.42459070682525635,
-0.37712112069129944,
0.6669255495071411,
0.4152461588382721,
-0.48444700241088867,
-1.7472339868545532,
-1.5879993438720703,
-0.3207095265388489,
0.2471278011798858... |
def gettreerootnid _ pungraph ( * args ) : return _ snap. gettreerootnid _ pungraph ( * args ) | [
0.021890269592404366,
0.32309430837631226,
0.34549814462661743,
0.9099162817001343,
-0.18440277874469757,
-0.16493363678455353,
-0.4665529727935791,
0.008923407644033432,
-0.3650023937225342,
-0.18796488642692566,
-0.3279545307159424,
0.9215698838233948,
-0.8136118054389954,
0.438308537006... |
def get _ nosql _ database _ url ( ) - > optional [ str ] : # pytest if test _ environment : return " http : / / localhost : 8000 " # aws lambda if ( os. environ. get ( " lambda _ task _ root ", none ) is not none # running inside lambda and bool ( os. getenv ( " aws _ sam _ local " ) ) is false # but not on sam local ... | [
0.17343971133232117,
0.3950484097003937,
0.5195196270942688,
0.7170073390007019,
0.6943180561065674,
0.46378862857818604,
0.42204439640045166,
0.1888902634382248,
-0.35087117552757263,
-0.17129477858543396,
-0.04016086086630821,
0.7133076786994934,
0.22546331584453583,
1.0533655881881714,
... |
def torch _ vid2flow ( vid ) : fr, h, w, ch = vid. shape return vid. permute ( 1, 2, 0, 3 ). reshape ( h, w, - 1 ) | [
0.3650239408016205,
-1.0849751234054565,
0.5861415266990662,
0.7457019686698914,
0.07027940452098846,
-0.2678067684173584,
0.45616981387138367,
-0.02051127701997757,
0.783984363079071,
0.10406509786844254,
-0.7679834365844727,
0.5993301272392273,
0.16453620791435242,
-0.6094340085983276,
... |
def report _ metrics ( proxy _ reporter, direct _ reporter ) : # counter c _ 1 = reg. counter ('foo _ count ', tags = {'counter _ key':'counter _ val'} ) c _ 1. inc ( ) # delta counter d _ 1 = delta. delta _ counter ( reg,'foo _ delta _ count ', tags = {'delta _ key':'delta _ val'} ) d _ 1. inc ( ) d _ 1. inc ( ) # gau... | [
0.3445058763027191,
0.4820716679096222,
0.6554096937179565,
-0.9144832491874695,
1.2347636222839355,
0.647494912147522,
1.0098823308944702,
0.718109130859375,
-1.5684025287628174,
-0.3997964560985565,
-0.030719786882400513,
0.13932709395885468,
0.14069150388240814,
0.7674184441566467,
0.... |
def percentile ( n, percent, key = lambda x : x ) : if not n : return none k = ( len ( n ) - 1 ) * percent f = floor ( k ) c = ceil ( k ) if f = = c : return key ( n [ int ( k ) ] ) d0 = key ( n [ int ( f ) ] ) * ( c - k ) d1 = key ( n [ int ( c ) ] ) * ( k - f ) return d0 + d1 | [
-0.07896915823221207,
0.6722276210784912,
0.3821974992752075,
0.04172994941473007,
-0.9050528407096863,
-0.2592173218727112,
-0.6021204590797424,
-0.2524593472480774,
-0.7143999934196472,
0.32689210772514343,
-0.2795669138431549,
-1.261016607284546,
-0.7344958186149597,
-0.3299991190433502... |
def test _ form _ widgets ( self ) : self. assertin ('django. forms. widgets. fileinput ', omnifilefield. form _ widgets ) | [
0.3185611963272095,
-0.1333530992269516,
0.1744905263185501,
0.09208223223686218,
0.5512993335723877,
0.6854322552680969,
-0.094641774892807,
0.8756029009819031,
0.007703309413045645,
-1.0233898162841797,
-0.9436975121498108,
-0.4629078507423401,
-0.4457962214946747,
1.025679111480713,
-... |
def getkcore _ pngraph ( * args ) : return _ snap. getkcore _ pngraph ( * args ) | [
-0.46734124422073364,
1.0402324199676514,
0.38490551710128784,
0.2883785367012024,
-0.7526960372924805,
-0.6192018389701843,
-0.7294010519981384,
-0.6956906914710999,
-0.15076889097690582,
0.6746195554733276,
-0.46590882539749146,
0.024958008900284767,
-0.817047119140625,
-0.16105130314826... |
def tstr _ getnrfmid ( * args ) : return _ snap. tstr _ getnrfmid ( * args ) | [
0.22940731048583984,
-0.2530525326728821,
0.3318091630935669,
-0.1814582794904709,
0.7264360785484314,
-0.03418385982513428,
0.01647419109940529,
-0.6878074407577515,
-0.3253985643386841,
-0.30138665437698364,
0.20256361365318298,
0.1594792753458023,
-0.4751844108104706,
1.122748613357544,... |
def getdat ( self, * args ) : return _ snap. tinttrinthi _ getdat ( self, * args ) | [
0.38699039816856384,
-0.13498297333717346,
0.24264690279960632,
-1.4271963834762573,
1.1326979398727417,
0.6975048184394836,
0.4625890851020813,
-1.454807996749878,
-0.8422141075134277,
-0.9161244630813599,
-0.09124729037284851,
0.3768250644207001,
-0.602709949016571,
-0.621107280254364,
... |
def run _ as _ user ( self, user _ name, script _ file, script _ binary, script _ arguments ) : pass | [
-0.6358816623687744,
-0.630807101726532,
0.5211862325668335,
1.66757333278656,
0.09812422841787338,
0.22704343497753143,
0.6917757391929626,
-0.24166862666606903,
-0.9913768768310547,
0.3938073515892029,
-0.7639651894569397,
1.2936378717422485,
0.22795237600803375,
0.14534635841846466,
0... |
def get _ token ( filename ) : token = " " try : with open ( filename,'r ', encoding = " utf - 8 " ) as file : token = file. readline ( ). strip ( ) if len ( token ) > 0 : params [ " access _ token " ] = token else : print ( f " не удалось прочитать токен. расместите токен в фаиле \ " { filename } \ " в папке с програм... | [
-0.004024225287139416,
-0.6543941497802734,
0.6865518093109131,
-0.693308413028717,
0.4036184847354889,
-0.14251025021076202,
0.44993817806243896,
0.936863124370575,
-1.0786852836608887,
0.1724131852388382,
0.16491319239139557,
0.6497052907943726,
0.47057124972343445,
0.07663557678461075,
... |
def default _ render _ failure ( request, message, status = 403, template _ name ='google _ plus / failure. html') : data = render _ to _ string ( template _ name, dict ( message = message ), context _ instance = requestcontext ( request ) ) return httpresponse ( data, status = status ) | [
-0.36085355281829834,
0.6254696846008301,
0.38468801975250244,
-0.05755671486258507,
-0.875847578048706,
0.08811106532812119,
-0.9585493803024292,
0.2398407757282257,
-0.29660218954086304,
-0.20044295489788055,
0.2484072893857956,
-0.6667918562889099,
-0.9585704803466797,
-0.14584620296955... |
def click _ to _ interval ( self, click, side ) : corrected _ side = side if click > 0 else ( side + 1 ) % 2 return np. sign ( click ) * self. _ click _ to _ interval [ corrected _ side ] [ abs ( click ) - 1 ] | [
-0.774770975112915,
-0.1700485795736313,
0.6050228476524353,
0.34616729617118835,
-0.5631211400032043,
0.37918809056282043,
0.2237776666879654,
-0.37786543369293213,
-0.3647422790527344,
0.32945334911346436,
0.07751240581274033,
0.2933623492717743,
-0.22190974652767181,
-0.5059942603111267... |
def interpolate ( self, newtimes ) : ts = filestoragemanagersingleton. get ( self. _ id ) arrayinterpolate = ts. interpolate ( newtimes ) return smtimeseries ( arrayinterpolate. times ( ), arrayinterpolate. values ( ) ) | [
-0.4929299056529999,
0.2613021433353424,
0.3850780129432678,
-0.3285568654537201,
-0.4042256474494934,
-0.4528486728668213,
-1.3701672554016113,
-0.5743698477745056,
0.4639865756034851,
0.7165093421936035,
-0.03068743273615837,
0.31263405084609985,
-0.7003045082092285,
0.19251030683517456,... |
def mult _ matrix ( * attrs ) : return _ create _ and _ connect _ node ('mult _ matrix ', * attrs ) | [
-0.8960720300674438,
0.8715775012969971,
0.3629780411720276,
0.15421350300312042,
-0.3282630443572998,
-0.6312958002090454,
0.6847088932991028,
-0.5297201871871948,
0.0049309502355754375,
-0.4193571209907532,
0.019153451547026634,
-0.25548091530799866,
0.19989825785160065,
-0.4383481442928... |
def test _ get _ year _ wise _ generator _ with _ year _ and _ file ( self ) : # patch ` extracted _ data _ dir _ path ` to ` test / data ` directory functions. extracted _ data _ dir _ path = \ os. path. join ( os. path. dirname ( _ _ file _ _ ), " data " ) # call to func : func : ` get _ year _ wise _ generator ` yea... | [
0.17102746665477753,
0.12900376319885254,
0.7062075734138489,
-1.3933175802230835,
-0.7295393347740173,
0.48884856700897217,
0.24157202243804932,
0.26408854126930237,
-0.12266135215759277,
-1.0904901027679443,
-0.6493069529533386,
-0.06055492162704468,
0.735592246055603,
0.3452903032302856... |
def _ _ lt _ _ ( self, * args ) : return _ snap. tstrvintvhi _ _ _ lt _ _ ( self, * args ) | [
1.0692296028137207,
-0.6487084031105042,
0.1271713227033615,
-0.4905696511268616,
0.7951950430870056,
-0.11080941557884216,
-0.33811822533607483,
-0.5155980587005615,
-1.3999533653259277,
0.3029163181781769,
-0.5159679055213928,
-0.5483853816986084,
-0.9201861619949341,
0.6040695905685425,... |
def get _ localhost _ ip ( ) : # try to get the ipv4 or ipv6 default gateway, then open a socket # to discover our local ip gw = none for protocol in ( socket. af _ inet, socket. af _ inet6 ) : try : gw = netifaces. gateways ( ) ['default'] [ protocol ] [ 0 ] if protocol = = socket. af _ inet6 : gw = gw +'%'+ netifaces... | [
0.47502607107162476,
-0.4736495018005371,
0.6098363995552063,
-0.17460857331752777,
-0.755578875541687,
-0.5889675617218018,
0.71257084608078,
-0.13485726714134216,
0.5351607203483582,
0.09270691871643066,
0.704910933971405,
0.0024782607797533274,
-0.7338311672210693,
-0.11037154495716095,... |
def ceaser _ cipher ( input _ text, shift _ number ) : encrypted _ text = [ ] for i in input _ text : if i. isalpha ( ) : if i. islower ( ) : if ( ord ( i ) + shift _ number ) > ord ('z') : encrypted _ text. append ( chr ( ( ord ('a') - 1 ) + ( ( ord ( i ) + shift _ number ) - ord ('z') ) ) ) continue else : if ( ord (... | [
0.1462063193321228,
-0.805772602558136,
0.9184899926185608,
-0.036789603531360626,
-0.8295722603797913,
0.3827977776527405,
0.44205307960510254,
-0.6374714970588684,
0.5900754928588867,
0.49105700850486755,
-0.36405038833618164,
0.08030305802822113,
-1.1038514375686646,
0.33704090118408203... |
def delete ( ) : print request. args. get ('file') if request. args. get ('file') : found = false for key in bucket. list ( ) : if key. name. encode ('utf - 8'). split ('/') [ 1 ]! ='' and request. args. get ('file') = = key. name. encode ('utf - 8') : key. delete ( ) message ='deleting % s'% key. name. encode ('utf - ... | [
-0.4267292320728302,
-0.1424912065267563,
0.7360696196556091,
0.04447362944483757,
0.5262754559516907,
0.10167178511619568,
0.14281879365444183,
-0.0936848595738411,
-1.0279757976531982,
0.45168444514274597,
0.5272743105888367,
-0.41878005862236023,
-0.6389742493629456,
0.89227294921875,
... |
def save _ attachment ( ) : if not outlook _ running ( ) : os. startfile ( " outlook " ) outlook = dispatch ( " outlook. application " ). getnamespace ( " mapi " ) inbox = outlook. getdefaultfolder ( " 6 " ) all _ emails = inbox. items subject = " daily report data " input _ path = os. path. join ( application _ path, ... | [
-0.030697064474225044,
-1.4309518337249756,
0.7440025210380554,
-0.300893634557724,
0.2759666442871094,
0.7562499046325684,
0.28420740365982056,
-0.18981000781059265,
-0.2896467447280884,
-0.38741540908813477,
0.009794852696359158,
-0.04752669110894203,
-0.6065486073493958,
0.0978822186589... |
def sayphrase ( self, obj, startoffset, endoffset ) : phrase = self. utilities. expandeocs ( obj, startoffset, endoffset ) if not phrase : return if len ( phrase ) > 1 or phrase. isalnum ( ) : if phrase. isupper ( ) : voice = self. voices [ settings. uppercase _ voice ] else : voice = self. voices [ settings. default _... | [
-0.8120903372764587,
-0.205657958984375,
0.8149824142456055,
-0.4805523753166199,
-0.1551225632429123,
0.31287091970443726,
-1.0538244247436523,
-0.4574144780635834,
0.7159677743911743,
0.6057558655738831,
0.27922511100769043,
0.07357615977525711,
-0.6208813786506653,
-0.27710846066474915,... |
def _ _ isub _ _ ( self, * args ) : return _ snap. tlflt _ _ _ isub _ _ ( self, * args ) | [
-0.3204999268054962,
0.3299671709537506,
0.2088010311126709,
-0.4821481704711914,
-0.5640823841094971,
0.3270103931427002,
0.578394889831543,
0.8823821544647217,
-0.4745505750179291,
-0.8202733993530273,
-0.5514295101165771,
-0.0949501246213913,
-0.04510476812720299,
0.5800552368164062,
... |
def subtotal ( self, subtotal ) : self. _ subtotal = subtotal | [
0.2596374452114105,
-0.10963740944862366,
0.2924771010875702,
0.32398319244384766,
0.05412475764751434,
0.6735292077064514,
-0.17493395507335663,
-0.13999617099761963,
-1.0099331140518188,
0.09469687193632126,
-1.729244589805603,
0.5245452523231506,
0.2418590486049652,
-1.1649473905563354,... |
def main ( ) : random. seed ( 10 ) assert create _ username ( first _ name = " johnny ", last _ name = " appleseed " ) = = " japple83 " assert create _ username ( first _ name = " paul ", last _ name = " bunyan " ) = = " pbunya14 " assert create _ username ( first _ name = " thomas ", last _ name = " sawyer " ) = = " t... | [
0.34504610300064087,
-0.08625835180282593,
0.7865179181098938,
0.5477216839790344,
0.9425554871559143,
0.8838855624198914,
0.6837146282196045,
-0.016087735071778297,
-0.17637693881988525,
-0.6311365365982056,
-0.4743519723415375,
-0.18641459941864014,
0.014105060137808323,
-0.0801014453172... |
def add ( self, test _ case _ id, http _ interaction _ container ) : existing _ interaction _ container = self. interactions _ by _ testcase. get ( test _ case _ id, {'interaction': testcaseinteractioncontainer ( ),'success': true } ) existing _ interaction _ container ['interaction']. merge ( http _ interaction _ cont... | [
-0.33474060893058777,
-0.36718228459358215,
0.5183179974555969,
0.07951091974973679,
1.2713980674743652,
-0.08786586672067642,
1.1886954307556152,
-0.7261238694190979,
1.1669847965240479,
-0.045481376349925995,
-0.08827563375234604,
-0.06925099343061447,
-0.9235438108444214,
0.311646133661... |
def is _ active ( self ) : for i in self. state : if i = ='state _ active': return true return false | [
-0.8842415809631348,
-0.93515545129776,
0.5204582214355469,
0.945548951625824,
0.7846251130104065,
-0.4608415365219116,
-0.09774444997310638,
0.5148361325263977,
0.024982115253806114,
-0.0024067224003374577,
-0.6557754874229431,
-0.40499088168144226,
-0.07114270329475403,
-0.67373156547546... |
def get _ shows ( ) : # connect to the database db = connect _ minerva _ db ( ) # return all the shows as a list shows = list ( db. shows. find ( ) ) return shows | [
-0.11033123731613159,
0.3471681773662567,
0.13315804302692413,
0.39450499415397644,
0.7183429598808289,
0.6764959692955017,
-1.2159332036972046,
0.7686829566955566,
0.2612251937389374,
0.14046187698841095,
0.01108343806117773,
0.09296312183141708,
-0.35106322169303894,
0.34100425243377686,... |
def note ( self ) : field _ note = outil. get _ valid _ attribute ( self. _ node,'_ note') return field _ note | [
-0.17423370480537415,
0.6387778520584106,
0.3236493766307831,
-0.5327898859977722,
0.6100718379020691,
0.5449878573417664,
0.848515510559082,
-0.19956225156784058,
-0.29732242226600647,
-0.34184062480926514,
0.7032829523086548,
-0.17634062469005585,
-0.06246356666088104,
-0.996688604354858... |
def test _ terminated _ exits _ immediately ( self ) : self. replay _ mocks ( ) self. _ watcher. terminate ( ) result = self. _ watcher. watch ( [ ], self. _ health _ check ) assert result is none, ('expected instances none : returned instances ( % s )'% result ) self. verify _ mocks ( ) | [
-0.07785924524068832,
0.20221857726573944,
0.4324033558368683,
0.539168655872345,
1.2462725639343262,
0.4953864514827728,
-0.08162044733762741,
-0.4284628927707672,
-0.2906034290790558,
-0.7987997531890869,
-0.39875486493110657,
-0.32316818833351135,
-0.15393893420696259,
0.376267403364181... |
def cntselfedges _ pneanet ( * args ) : return _ snap. cntselfedges _ pneanet ( * args ) | [
-0.8573837280273438,
0.014238369651138783,
0.10800211131572723,
-0.03626938536763191,
0.054795436561107635,
-0.2900563180446625,
-0.23350360989570618,
-0.34694308042526245,
-0.684674084186554,
0.17701616883277893,
-1.34423828125,
-0.6663742065429688,
0.08474331349134445,
0.0742883682250976... |
def convertsubgraph _ pngraph _ pngraph ( * args ) : return _ snap. convertsubgraph _ pngraph _ pngraph ( * args ) | [
-0.6488763689994812,
0.7384884357452393,
0.2614145874977112,
0.7078537344932556,
-0.8512875437736511,
0.2823450565338135,
-0.4480501115322113,
-0.46764102578163147,
-0.4016019403934479,
0.13049019873142242,
-1.3384102582931519,
0.6503379940986633,
0.018294518813490868,
-0.27453991770744324... |
def apply _ topology ( switch, outgoing, graph ) : output = defaultdict ( set ) for pkt, port in outgoing : ( target _ switch, target _ port ) = graph. node [ switch ] ['port'] [ port ] if not ( target _ switch in graph. node and graph. node [ target _ switch ] ['isswitch'] ) : continue pkt = pattern ( pkt, in _ port =... | [
-0.30058687925338745,
0.3847402036190033,
0.5543269515037537,
-0.2436220645904541,
-0.24389076232910156,
0.12216270714998245,
0.12477362900972366,
0.6909447312355042,
-0.22711524367332458,
0.31544408202171326,
0.06729613244533539,
-0.1423051953315735,
0.5291325449943542,
-0.703116953372955... |
def test _ form _ widgets ( self ) : self. assertin ('django. forms. widgets. emailinput ', omniemailfield. form _ widgets ) | [
-0.03025963343679905,
0.553612470626831,
0.13334214687347412,
-0.31414133310317993,
0.47015324234962463,
0.8247901797294617,
-0.2714903950691223,
0.4616397023200989,
0.18992796540260315,
-0.7044243216514587,
-1.1749956607818604,
-0.092195063829422,
-0.5472327470779419,
0.6366963982582092,
... |
def get _ institutions _ section ( ) : from django. template. loader import get _ template from django. template import context tinst = get _ template ('app / userregistration / inst _ form. html') csection = context ( {'section': _ ( u'fall 3 : angehorige ( r ) anderen institution') } ) return tinst. render ( csection... | [
0.16016794741153717,
0.5647428631782532,
0.14836491644382477,
-0.7477457523345947,
-0.11872942745685577,
0.3885250985622406,
0.35885438323020935,
0.2736240327358246,
-0.09687580913305283,
0.20487111806869507,
0.8098777532577515,
0.3095170855522156,
-0.3125387132167816,
0.21622996032238007,... |
def test _ two _ values ( self ) : # broadcasting in the first dimension with numbers expected = np. array ( [ [ 3, 4 ] ] * 10 ) for x in ( [ 3, 4 ], [ [ 3, 4 ] ] ) : result = _ as _ pairs ( x, 10 ) assert _ equal ( result, expected ) # and with dtype = object obj = object ( ) assert _ equal ( _ as _ pairs ( [ " a ", o... | [
-0.4848524034023285,
0.5121780037879944,
0.9356780052185059,
-0.15056639909744263,
-0.24223534762859344,
-0.0896959975361824,
0.2658080756664276,
-0.38531869649887085,
0.09448932856321335,
0.2748630940914154,
-0.3170599639415741,
0.5410663485527039,
0.0418592169880867,
0.9095660448074341,
... |
def initialize _ generators ( generators ) : for i in range ( randint ( 10, 100 ) ) : for g in generators : next ( g ) | [
-1.1848514080047607,
0.4711337685585022,
0.48210152983665466,
0.08797667920589447,
0.9170347452163696,
-0.02162623032927513,
0.311583548784256,
-0.047769695520401,
-0.27930909395217896,
-0.2746834456920624,
-0.8430818915367126,
-0.14204701781272888,
-0.32324719429016113,
0.7453687787055969... |
def filter _ installed _ repos ( self, repos, check _ revision = true ) : # todo : find a speedier algorithm. not _ installed _ repos = [ ] already _ installed _ repos = [ ] if check _ revision : # if we want to check if revisions are equal, flatten the list, # so each repository - revision combination has its own entr... | [
-0.23394201695919037,
-0.06701010465621948,
0.4262145757675171,
0.1694372445344925,
0.4475944936275482,
-0.5193239450454712,
0.29064178466796875,
-0.34442076086997986,
0.2653338611125946,
0.8670056462287903,
-0.01051284559071064,
-0.7254738807678223,
-0.7290126085281372,
0.9017898440361023... |
def create _ users ( users : dict ) : if users is none : return none users _ list = [ ] random _ users = create _ random _ users ( users. get ('random _ user _ count') ) if isinstance ( random _ users, list ) : users _ list. extend ( random _ users ) base. update ( {'random - user': random _ users } ) if users. get ('u... | [
-0.9676148295402527,
0.23018334805965424,
0.4369547367095947,
0.2049940973520279,
0.9547402262687683,
0.2794193625450134,
-0.3723735809326172,
0.3065919280052185,
0.7916357517242432,
1.0531306266784668,
-0.8538608551025391,
-0.8581931591033936,
0.3172939121723175,
1.1902912855148315,
0.1... |
def get _ prediction ( model, image, names ) : pred = [ ] tensor = transform _ image ( image ) outputs = model. forward ( tensor ) confidence = torch. nn. functional. softmax ( outputs, dim = 1 ). cpu ( ). tolist ( ) confidence, names = zip ( * sorted ( zip ( confidence [ 0 ], names ), reverse = true ) ) for idx, conf ... | [
-0.7102504968643188,
-0.6012834906578064,
0.4108479917049408,
0.3819688856601715,
-0.6108280420303345,
-0.39930325746536255,
-1.099062204360962,
0.522170901298523,
-1.178117275238037,
0.853783905506134,
-0.5089741945266724,
-0.38438764214515686,
0.47924235463142395,
0.6720114946365356,
0... |
def buy _ item ( self, item _ name, cost, additional _ cps ) : if cost < = self. _ current _ cookies : self. _ current _ cookies - = cost self. _ current _ cps + = additional _ cps self. _ history. append ( ( self. _ current _ time, item _ name, cost, self. _ total _ cookies ) ) | [
-0.018192686140537262,
-0.01621939428150654,
0.6125601530075073,
0.847248375415802,
0.17685028910636902,
-0.01814902201294899,
-0.027455292642116547,
0.39363032579421997,
-0.24365587532520294,
0.4828244149684906,
-0.3524364233016968,
0.2969493269920349,
-0.0745985358953476,
-0.681248843669... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, executionevent ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.45651042461395264,
-0.2734226882457733,
0.8608432412147522,
-0.04394235461950302,
-0.05516831949353218,
0.6605905294418335,
0.14286427199840546,
-0.39273372292518616,
0.8223538398742676,
-0.054431043565273285,
-0.5320649743080139,
-0.05352190136909485,
-0.01214358676224947,
-0.038583744... |
def _ bresenhamtriangle _ planeformulaversion ( p0, p1, p2, iscan _ iline = none ) : # generalization for triangle if p2 = = none : return bresenhamfunction ( p0, p1 ) # in case the last argument is none just use a plane... p = np. array ( [ p0, p1, p2 ] ) iscan, iline, borderpts = _ brestribase ( p0, p1, p2, dss _ rer... | [
0.5133846402168274,
-0.4557635486125946,
0.49358806014060974,
0.7574646472930908,
0.09111366420984268,
-0.29116448760032654,
-0.711792528629303,
0.2910281717777252,
-0.3296660780906677,
-0.22615136206150055,
0.06532502174377441,
0.6904414296150208,
0.3707074820995331,
-0.5961951613426208,
... |
def _ resolve _ arm _ id _ for _ sweep _ job ( self, job : job, resolver : callable ) - > job : if job. trial. code is not none and not is _ arm _ id _ for _ resource ( job. trial. code, azuremlresourcetype. code ) : job. trial. code = resolver ( code ( base _ path = job. _ base _ path, path = job. trial. code ), azure... | [
0.23532308638095856,
0.10186995565891266,
0.49066460132598877,
-0.17402254045009613,
0.010403107851743698,
0.5290940403938293,
-0.5722391605377197,
0.34181007742881775,
-0.021606169641017914,
-0.6088994145393372,
0.14104792475700378,
0.0901910588145256,
0.3854171335697174,
0.66325640678405... |
def selectatomicstrconst ( self, * args ) : return _ snap. ttable _ selectatomicstrconst ( self, * args ) | [
0.03285549581050873,
-0.6735756993293762,
0.11518125236034393,
-0.9472869634628296,
0.1262073516845703,
0.255273699760437,
0.35216283798217773,
-1.0865532159805298,
-1.4372570514678955,
0.5231294631958008,
0.15781402587890625,
0.158157616853714,
0.5761133432388306,
-0.8371483683586121,
-... |
def del _ by _ key _ value ( self, key, value, category = none, silent = true ) : if category is none : stm = " select * from % s where key ='% s'and value ='% s'and creation _ date is not null order by creation _ date desc " % ( self. dname, key, value ) else : stm = " select * from % s where key ='% s'and value ='% s... | [
-0.12053924798965454,
0.9440096020698547,
0.976844310760498,
0.47191163897514343,
-1.2032595872879028,
-0.04009418562054634,
-0.3596378266811371,
0.6634224057197571,
-0.6471291780471802,
0.39450907707214355,
0.5391018390655518,
-0.28487053513526917,
-0.03151142969727516,
0.3546615839004516... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.