text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def getactivedevices ( self, options ) : activedevices = ( apiclient. usagemgmt +'/ active - devices') % ( self. host ) r = requests. get ( activedevices, auth = self. credentials, params = options, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " active devices = ", r. json... | [
-1.431389570236206,
-1.0186529159545898,
0.698539137840271,
0.28583425283432007,
0.3816983997821808,
-0.8640120029449463,
0.40074148774147034,
-0.6349112391471863,
0.09373876452445984,
0.8188247680664062,
-0.12514416873455048,
0.8990628719329834,
-1.5170961618423462,
-0.24523043632507324,
... |
def perform _ fits ( self ) : for ind, structure in enumerate ( self. structures ) : running = false with open ( self. jobs _ fname, " rw " ) as job _ file : flines = job _ file. readlines ( ) for line in flines : if structure. title in line : running = true break if not running : sg = self. space _ groups [ ind ] with... | [
-0.22497959434986115,
-0.7686574459075928,
0.669126570224762,
0.17339296638965607,
0.11901048570871353,
0.5518631935119629,
0.8206638097763062,
0.2535032629966736,
-1.2571429014205933,
-0.7375479340553284,
0.5992475152015686,
-0.22904963791370392,
-0.5261213779449463,
1.0614142417907715,
... |
def parse ( self, line ) : print ( line, file = sys. stderr ) sys. stderr. flush ( ) # send entire log line to sentry self. data [ " log " ] = line csv _ list = line. split ( ", " ) regex = re. match ( self. pattern, csv _ list. pop ( 0 ) ) if not regex : self. level = " fatal " self. message = line return self. data [... | [
-0.1245666891336441,
-0.2742695212364197,
0.762320339679718,
0.21151569485664368,
0.4058168828487396,
0.212420254945755,
-0.898370087146759,
0.45888352394104004,
-0.6894298195838928,
0.055372536182403564,
-0.6357423067092896,
0.06686749309301376,
-0.07772932201623917,
0.04132578894495964,
... |
def count _ hi ( string : str ) : # wastes # after _ h = false # cnt = 0 # # need to scan the string only once # for char in string : # if char = ='h': # after _ h = true # elif char = ='i'and after _ h is true : # cnt + = 1 # after _ h = false # else : # after _ h = false # return cnt return string. count ( " hi " ) | [
0.603662371635437,
-0.14129431545734406,
0.5091034173965454,
1.007929801940918,
-0.03941471874713898,
0.3781232535839081,
0.961552083492279,
0.337970107793808,
-1.0304725170135498,
-0.1733488291501999,
-1.290496587753296,
-0.2752176821231842,
-0.7991912961006165,
-0.28056859970092773,
1.... |
def serve _ home ( ) : return flask. render _ template ( " index. html ", * * globals ( ) ) | [
0.5233191251754761,
0.0005332806031219661,
0.25433439016342163,
1.0383251905441284,
0.1195208877325058,
0.3396575450897217,
0.3940187096595764,
0.20466896891593933,
-0.555826723575592,
0.5870637893676758,
0.17326439917087555,
0.5911688208580017,
-0.8326395153999329,
-0.032101795077323914,
... |
def pending _ transfers ( self ) : url = lendingclub _ url ('accounts ', self. investor _ id,'funds ','pending') response = self. session. get ( url = url ) response. raise _ for _ status ( ) response _ parsed = response. json ( ) return ( [ ] if'transfers'not in response _ parsed else [ namedtuple _ from _ json ('lend... | [
-0.7146281599998474,
-0.1052267923951149,
0.3473135530948639,
-0.18964755535125732,
0.3300797939300537,
-0.019124634563922882,
-1.0783203840255737,
-0.9575772285461426,
0.24557937681674957,
-0.5038594007492065,
-0.3659074008464813,
-0.2606239914894104,
-0.6612065434455872,
0.83040803670883... |
def systemuserspawner _ configured _ app ( app, named _ servers ) : with mock. patch. dict ( app. tornado _ settings, { " spawner _ class " : systemuserspawner } ) : yield app | [
-0.23215846717357635,
-0.34851035475730896,
0.29963287711143494,
0.9370729327201843,
-0.6031143665313721,
0.6730900406837463,
0.37598761916160583,
-0.40096232295036316,
1.2995551824569702,
0.859718382358551,
-0.9121309518814087,
-0.45296791195869446,
0.005940599367022514,
0.432450860738754... |
def mt19937 _ oracle ( ) - > tuple [ int, int ] : time. sleep ( random. randint ( 40, 1000 ) ) curr _ time = int ( time. time ( ) ) mt = mt19937 ( ) mt. seed _ mt ( curr _ time ) time. sleep ( random. randint ( 40, 1000 ) ) return mt. extract _ number ( ), curr _ time | [
0.17109474539756775,
0.23908446729183197,
0.5041830539703369,
-0.04657132178544998,
-0.3176252245903015,
-0.528912365436554,
0.5931775569915771,
-0.49362584948539734,
0.5149354338645935,
0.43724995851516724,
-0.3143938183784485,
0.16913163661956787,
0.5010371208190918,
0.07626162469387054,... |
def _ traverse _ right ( self, start, stop, step, color, right, skipped = [ ] ) : validmoves = { } last = [ ] for r in range ( start, stop, step ) : if right > = cols : break current = self. board [ r ] [ right ] if current = = none : if skipped and not last : break elif skipped : validmoves [ ( r, right ) ] = last + s... | [
-0.8223006129264832,
0.6957780718803406,
0.7485930323600769,
0.2607868015766144,
-1.2676576375961304,
-0.6278542876243591,
0.07244325429201126,
-0.9398016929626465,
-0.7617321014404297,
0.7660530209541321,
-0.4948447644710541,
-0.6193221807479858,
0.13953998684883118,
0.5322797894477844,
... |
def make _ config ( pargs, parser ) : pdict = pargs. _ _ dict _ _ # create a namedtuple object for fast attribute lookup key _ list = pdict. keys ( ) arg _ list = [ pdict [ k ] for k in key _ list ] config = namedtuple ('config ', key _ list ) nt _ config = config ( * arg _ list ) return nt _ config | [
-0.8040366172790527,
0.25537875294685364,
0.15822720527648926,
-0.9568268656730652,
-0.5746240615844727,
0.1681699901819229,
-0.6879429221153259,
0.28546440601348877,
-1.476274013519287,
0.8268468976020813,
-0.6337606906890869,
-1.4413732290267944,
0.5187497735023499,
0.5852578282356262,
... |
def possible _ hit _ scores ( board, ships, coordinate, hit _ option, heuristics ) : seq _ length = hit _ option ['seq _ length'] cell _ modifiers = np. ones ( ( len ( board ), len ( board [ 0 ] ) ), dtype = float ) # modifiers to apply to each coordinate. ship _ modifiers = { } # modifiers to apply to ship. # a dict o... | [
-1.092814564704895,
0.2511819005012512,
0.6475039720535278,
-0.9026970267295837,
0.19215330481529236,
-0.5566396713256836,
0.23920807242393494,
0.2199290543794632,
-0.18817853927612305,
0.8348411321640015,
0.05524398386478424,
0.5648529529571533,
0.31336790323257446,
-0.38774335384368896,
... |
def create ( ctx, # mandatory main parameter name, # mandatory main parameter accountid, # mandatory main parameter totalsize, # optional main parameter enable512e = none, # optional subparameter of optional main parameter. miniops = none, # optional subparameter of optional main parameter. maxiops = none, # optional s... | [
0.6044495105743408,
0.03715018555521965,
1.0068299770355225,
0.2986769676208496,
-0.775921642780304,
0.3531069755554199,
-0.18016822636127472,
-0.6841872930526733,
0.8960617780685425,
0.2863911986351013,
-0.626470148563385,
0.14446866512298584,
-0.4378810524940491,
-0.6344109177589417,
-... |
def list _ instances ( self ) : return self. client. _ perform _ json ( " get ", " / apps / % s / instances / " % self. app _ id ) | [
-0.6724119186401367,
0.25429871678352356,
0.38702720403671265,
-0.4683416783809662,
0.6507593989372253,
-0.04353557154536247,
-1.4947140216827393,
0.43285664916038513,
0.3926760256290436,
0.45296937227249146,
-0.18070587515830994,
1.0239124298095703,
-1.0856558084487915,
0.2883105278015136... |
def gen _ keypair ( nbits = 2048 ) : p = getstrongprime ( nbits / 2 ) q = getstrongprime ( nbits / 2 ) pub = publickey ( p * q ) return pub, privatekey ( pub, p, q ) | [
-0.5662335753440857,
0.5726029276847839,
0.28177058696746826,
0.5299516916275024,
-0.7044752836227417,
0.08746324479579926,
-0.638132631778717,
-0.2961435317993164,
-0.10227180272340775,
0.37595540285110474,
-0.7629697322845459,
0.012269377708435059,
-1.0426898002624512,
0.6703674793243408... |
def nvidiadaemon ( self, logdata = false ) : while true : gpuprocs = self. _ _ monitornvidiagpu ( ) if ( logdata ) : # if file does not exist write header if not os. path. isfile ( os. path. join ( self. data _ path,'nvidia _ log. csv') ) : gpuprocs. to _ csv ( os. path. join ( self. data _ path,'nvidia _ log. csv'), i... | [
-0.5691406726837158,
-0.49769169092178345,
0.7969101071357727,
0.9300111532211304,
0.5911635160446167,
-0.07803016155958176,
-0.25278958678245544,
-0.5034242272377014,
0.15648269653320312,
0.048576027154922485,
0.7328014969825745,
0.33413323760032654,
-0.28401583433151245,
0.23133860528469... |
def executetest ( self, testfun ) : with self. graph : testfun ( self ) | [
-0.06568045914173126,
-0.25723209977149963,
0.002038102364167571,
0.7571024298667908,
1.066079020500183,
-0.05520091950893402,
1.3979287147521973,
-0.10885265469551086,
-0.05954530090093613,
-0.2611417770385742,
-0.012006331235170364,
0.5392619967460632,
-0.6476199626922607,
-1.00134158134... |
def collection _ medias _ by _ name ( self, name : str ) - > list : for item in self. collections ( ) : if item [ " collection _ name " ]. lower ( ) = = name. lower ( ) : return self. collection _ medias ( item [ " collection _ id " ] ) raise collectionnotfound ( ) | [
-0.2519538998603821,
-1.4802485704421997,
0.6016646027565002,
-0.4022330641746521,
0.45471787452697754,
-0.4024476706981659,
-0.4400266408920288,
-1.3947157859802246,
-0.024958202615380287,
1.029223918914795,
-0.35439151525497437,
0.3304208815097809,
-0.6788318753242493,
1.1827315092086792... |
def test _ atomic _ base64 _ binary _ white _ space _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ white _ space _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - whitespace - 1. xsd "... | [
-0.42546212673187256,
-0.10570569336414337,
0.4074978530406952,
0.8012607097625732,
0.018281089141964912,
0.0339072085916996,
0.8066535592079163,
-0.6828216910362244,
0.11386215686798096,
0.605650782585144,
-0.18778260052204132,
0.36344587802886963,
-0.7098780870437622,
1.1050903797149658,... |
def find _ films _ year ( year ) : films _ year = [ ] with open ( " sorted _ films. txt ", " r ", encoding = " utf - 8 " ) as f : for line in f : if int ( line [ : 4 ] ) = = int ( year ) : line = line. strip ( ). split ( " | " ) films _ year. append ( line [ 1 : ] ) return films _ year | [
-0.5258163809776306,
-1.173202633857727,
0.7691664695739746,
0.2533751130104065,
-0.5856862664222717,
0.806708574295044,
-0.16394563019275665,
-0.08084465563297272,
-0.2060304880142212,
0.5477125644683838,
-0.7368402481079102,
-0.04809326305985451,
-0.4086294174194336,
0.7474395632743835,
... |
def get _ kl _ multi ( self ) : kl = 0 for i in range ( self. layers - 1 ) : kl = kl + self. get _ kl ( self. mean _ w [ i ], self. log _ var _ w [ i ], self. prior _ mean _ w [ i ], self. log _ prior _ var _ w [ i ] ) kl + = self. get _ kl _ z ( ) return kl | [
0.1827102154493332,
0.10155186802148819,
0.5479733943939209,
0.7420140504837036,
-0.07322704792022705,
-0.15905670821666718,
0.17902573943138123,
-0.25543394684791565,
0.2367473691701889,
0.5876221060752869,
-0.25436702370643616,
-0.27496129274368286,
-0.4209553301334381,
1.062948822975158... |
def test _ api _ shared _ live _ media _ delete _ by _ video _ organization _ instructor ( self ) : user = userfactory ( ) # a playlist where the user is an instructor, with a video organization = organizationfactory ( ) playlist = playlistfactory ( organization = organization ) video = videofactory ( playlist = playli... | [
0.5116593241691589,
-0.2265760600566864,
0.5414599180221558,
1.2780574560165405,
-0.21904918551445007,
0.8049818277359009,
1.6819020509719849,
0.23982876539230347,
1.1078929901123047,
0.44163963198661804,
-0.19760185480117798,
0.5304055213928223,
-0.5147768259048462,
-0.07080786675214767,
... |
def has _ object _ permission _ static ( request, obj, is _ admin = false ) : if request. user. is _ superuser or request. user. team = = epicmember. team. manage : return true if request. method = = " delete " : return false return request. user = = obj | [
-0.046714041382074356,
0.2669944763183594,
0.5931393504142761,
1.768471360206604,
-0.20010079443454742,
0.6936125159263611,
0.6163787841796875,
-0.7721222043037415,
0.10867208242416382,
0.35907647013664246,
-0.16035670042037964,
0.5283525586128235,
0.5062114000320435,
0.028561435639858246,... |
def test _ example _ input _ two _ valid _ input _ interval ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input two " ) input _ page. entity2. e... | [
-0.1872221827507019,
0.1838771104812622,
0.6285622715950012,
0.5953637361526489,
0.33139312267303467,
1.1919314861297607,
-0.3686501979827881,
-0.3421166241168976,
-0.37453222274780273,
0.16016164422035217,
-0.6166465282440186,
-0.23326341807842255,
-0.3100864589214325,
0.03857229277491569... |
def init _ params ( options ) : params = ordereddict ( ) # embedding params ['wemb'] = norm _ weight ( options ['n _ words _ src'], options ['dim _ word'] ) # encoder : gru params = get _ layer ( options ['encoder'] ) [ 0 ] ( options, params, prefix ='encoder ', nin = options ['dim _ word'], dim = options ['dim'] ) # d... | [
0.11047017574310303,
0.29091066122055054,
0.5629310011863708,
-0.07246869057416916,
-0.36037346720695496,
-0.6348351836204529,
0.030689014121890068,
-0.22219932079315186,
-0.5621809363365173,
0.40525296330451965,
-0.6611917018890381,
0.042592793703079224,
-0.25076428055763245,
1.3660713434... |
def do _ mousebutton ( client, btn, behavior = none ) : ret = client. mousebutton ( btn, behavior ) if'result'not in ret : logging. error ( " mousebutton ( { }, { } ) response error : { } ". format ( btn, behavior, ret. get ( " error ", " undefined " ) ) ) raise commanderrorresponse ( ) else : logging. info ( " mousebu... | [
-0.050169430673122406,
-0.5293964147567749,
0.36449283361434937,
0.5417462587356567,
0.9732437133789062,
-0.2213822603225708,
-0.4610658586025238,
0.37174472212791443,
0.5520449280738831,
0.41102778911590576,
-0.5368850231170654,
0.35100558400154114,
-0.5876395106315613,
0.0307026673108339... |
def test _ name ( self ) : print ( f'{ self. test _ name. _ _ name _ _ }'f': executing unit test for property " name " of class " slashnexthostreport ".') self. assertequal ( self. host _ report _ action. name, self. name ) | [
0.44179031252861023,
-0.020068475976586342,
0.38071000576019287,
0.049482736736536026,
1.0704874992370605,
0.9522371292114258,
1.1230629682540894,
-0.4162684977054596,
-0.4495762884616852,
-0.09411801397800446,
-0.3642190098762512,
0.09141780436038971,
-0.5118631720542908,
-0.1358447521924... |
def test _ get _ github _ link ( self ) : pass | [
0.14468836784362793,
0.5844561457633972,
0.11586256325244904,
1.7693963050842285,
1.3836612701416016,
0.17862367630004883,
0.8125506639480591,
0.3551766574382782,
-0.33972373604774475,
-1.3471390008926392,
-0.194843128323555,
0.9489819407463074,
-1.2088420391082764,
-0.38431331515312195,
... |
def get _ all _ tracked ( self, as _ np = false ) : pass | [
-0.38641592860221863,
-0.0948215201497078,
0.6648102402687073,
1.6944580078125,
0.848723828792572,
0.8631434440612793,
-0.28413984179496765,
-0.4818146526813507,
0.032979268580675125,
-0.46012821793556213,
0.0511883981525898,
1.2801787853240967,
0.23344303667545319,
0.4746968746185303,
-... |
def test _ project _ model _ str ( self ) : livestock _ task _ list = mommy. make ( " tasking. project ", name = " livestock tasks " ) expected = " livestock tasks " self. assertequal ( expected, livestock _ task _ list. _ _ str _ _ ( ) ) | [
-0.06669589132070541,
0.06549417972564697,
0.0900944396853447,
0.09439807385206223,
-0.0737641379237175,
1.5052357912063599,
0.002255295170471072,
-0.5773873925209045,
-0.8077471256256104,
0.45021167397499084,
-0.5604314804077148,
-0.28791895508766174,
0.3674623966217041,
-0.42687532305717... |
def test _ atomic _ base64 _ binary _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 3. xsd ... | [
-0.3998185396194458,
-0.2938413619995117,
0.6380636692047119,
0.9017150402069092,
0.20971451699733734,
0.4657716453075409,
-0.0365937277674675,
-0.028148513287305832,
0.5019503235816956,
0.8516085147857666,
-0.3176147937774658,
0.12802113592624664,
-0.41682615876197815,
-0.2829631865024566... |
def _ _ init _ _ ( self, var _ name = none, var _ value = none, var _ type _ name = none, exp _ type _ name = none, message = none, skip _ frames = 0 ) : super ( h2o4gputypeerror, self ). _ _ init _ _ ( message ) self. _ var _ name = var _ name self. _ var _ value = var _ value self. _ var _ type _ name = var _ type _ ... | [
-0.47973915934562683,
0.18692772090435028,
0.6784932613372803,
0.5347892045974731,
0.17691268026828766,
-0.37290745973587036,
0.5186115503311157,
-0.5240609645843506,
-1.1631337404251099,
0.35368239879608154,
0.28485536575317383,
0.3826163113117218,
-0.32149675488471985,
0.5214101076126099... |
def _ create _ new _ storage ( self ) : # get all existing storages to provide to the dialog all _ storages = self. _ storage _ model. storages existing _ storage _ names = [ storage [ " code " ] for storage in all _ storages ] # prompt the user for a new storage name create _ dialog = createstoragedialog ( existing _ ... | [
-0.004372942727059126,
0.09504391252994537,
0.4522886872291565,
0.9098398685455322,
0.17501360177993774,
0.25303003191947937,
0.5977680683135986,
-0.881976842880249,
-0.2380678355693817,
-0.3254607915878296,
-0.4085986614227295,
-0.6386695504188538,
0.2860598564147949,
0.7567950487136841,
... |
def auto _ renew ( self ) - > pulumi. output [ bool ] : return pulumi. get ( self, " auto _ renew " ) | [
0.8298075199127197,
0.37460532784461975,
0.5413382053375244,
0.9928678870201111,
0.4287750720977783,
0.4666295051574707,
-0.3568291962146759,
0.605117917060852,
-0.16839800775051117,
-0.10973417013883591,
-0.7194613218307495,
1.0674757957458496,
-0.4294740557670593,
-0.919007420539856,
-... |
def reset _ button _ method ( self ) : print ( " you called the toggle _ button _ recls _ method ( ) method. " ) # self. toggle _ button. setcheckable ( true ) self. graphics _ scene. is _ classifing = true self. graphics _ scene. temp _ coord = [ ] self. graphics _ scene. coord _ list = [ ] self. graphics _ scene. hig... | [
-0.4597702920436859,
-0.3865000009536743,
0.5459979772567749,
-0.18386605381965637,
0.7544268369674683,
0.16628830134868622,
1.0895719528198242,
0.4352163076400757,
-0.19216303527355194,
-0.32566025853157043,
-0.44959670305252075,
0.1819256842136383,
-0.3972409665584564,
0.2592380046844482... |
def is _ prime ( n ) : " * * * your code here * * * " def help ( n, i ) : if ( i = = 1 ) : return true if ( n % i = = 0 ) : return false return help ( n, i - 1 ) return help ( n, n - 1 ) | [
-1.118107557296753,
0.6790847182273865,
0.3036673963069916,
1.4652669429779053,
0.6628126502037048,
-0.32843881845474243,
0.3672599196434021,
-0.09677714854478836,
1.0787532329559326,
-0.2835237383842468,
-0.8393403887748718,
-0.7442222237586975,
-1.0689098834991455,
0.26119303703308105,
... |
def _ _ repr _ _ ( self ) : format _ string ='cricle ( center = point ( { } ), radius = { } ) '. format ( self. center, self. radius ) return format _ string | [
0.6637024879455566,
-1.995945930480957,
0.47721895575523376,
-1.2751646041870117,
-0.2831062972545624,
0.42223474383354187,
-0.2098693996667862,
0.29476431012153625,
-0.2426723688840866,
0.6862474083900452,
0.3009643852710724,
0.5414881706237793,
0.3486931622028351,
-0.11266226321458817,
... |
def dec _ quick _ sort ( self, array : arraylist [ tuple ] ) - > none : start = 0 end = len ( array ) - 1 self. quick _ sort _ aux ( array, start, end ) | [
-0.22958317399024963,
0.3699607849121094,
0.5719214677810669,
0.21463605761528015,
-0.24349354207515717,
-0.13821014761924744,
0.40971338748931885,
-0.4182734489440918,
0.365025132894516,
-0.01364103052765131,
-0.14398624002933502,
0.023920614272356033,
0.23182794451713562,
0.6012901067733... |
def continuous _ agg _ dict _ features ( n, n _ feats, ks ) : features = [ ] for k in range ( ks ) : features. append ( continuous _ dict _ features ( n, n _ feats ) ) return features | [
-0.3037039339542389,
0.40044111013412476,
0.5710081458091736,
1.1740851402282715,
-0.1261894255876541,
-0.14022545516490936,
-0.8305282592773438,
1.1935803890228271,
-0.5749242305755615,
0.02351147122681141,
-0.518803596496582,
-0.4451144337654114,
0.37266865372657776,
0.5019052624702454,
... |
def findpath ( graph, path, fillfunction = isfilledge ) : # mark any part of the path coming in used # hack - - i hate that for ( p1, p2 ) in pairwise ( path ) : markused ( graph, p1, p2 ) ; s = path [ - 1 ] ; searchchoices = [ ] ; for n in graph. neighbors ( s ) : if n in path : continue ; if isused ( graph, n, s ) : ... | [
0.15400689840316772,
0.42768481373786926,
0.7882529497146606,
0.6262585520744324,
-0.21214669942855835,
-0.2520362138748169,
0.5381534099578857,
-0.5755451917648315,
0.14536592364311218,
-0.016324367374181747,
0.3663264513015747,
0.14494259655475616,
-0.7641388773918152,
0.0472432896494865... |
def update ( self, request, pk = none ) : nonsmoker = nonsmoker. objects. get ( user = request. auth. user ) # do mostly the same thing as post, but instead of # creating a new instance of post, get the post record # from the database whose primary key is ` pk ` reward = reward. objects. get ( pk = pk ) reward. redeeme... | [
-0.6875043511390686,
0.08871564269065857,
0.5073224902153015,
0.36704012751579285,
0.4001241624355316,
-0.37210291624069214,
-0.6652185320854187,
0.613187313079834,
0.7676048874855042,
0.32558372616767883,
-0.507328450679779,
-0.2105945348739624,
-0.523722231388092,
0.5351254343986511,
-... |
def _ padmsg ( msg, block _ size ) : return pkcs7 ( msg, block _ size ) | [
0.9608224034309387,
0.87096107006073,
0.36423608660697937,
-0.513663649559021,
-0.8099633455276489,
-0.5622033476829529,
-0.5787087082862854,
-0.4488855302333832,
0.2712830901145935,
-0.10595874488353729,
1.0320661067962646,
-0.12184680253267288,
-0.7378643155097961,
1.1404088735580444,
... |
def confirm _ actor _ data ( actor ) : print ( " " ) print ( " = " * 80 ) print ( " following actor will be created : " ) print ( " = " * 80 ) print ( " { : < 21 } { } ". format ( " name : ", actor ['name'] ) ) print ( " { : < 21 } { } ". format ( " description : ", actor ['desc'] ) ) print ( " { : < 21 } { } ". format... | [
-0.13845951855182648,
-0.9301416277885437,
0.7911442518234253,
0.21130508184432983,
-0.3409746587276459,
1.0803698301315308,
0.6834424138069153,
-0.8982398509979248,
0.2748261094093323,
0.29797419905662537,
-0.5496501922607422,
1.5522875785827637,
-0.051070358604192734,
0.7243320941925049,... |
def set _ x ( self, x ) : with self. lock : self. _ _ set _ x _ _ ( x ) | [
-1.3092461824417114,
0.8995556235313416,
0.2248603254556656,
0.25059372186660767,
-0.20086561143398285,
0.6045193076133728,
-0.008026864379644394,
-1.0503877401351929,
0.3637140989303589,
-0.43299809098243713,
-1.6264897584915161,
0.9329403638839722,
-0.31146734952926636,
-0.41232392191886... |
def univariate _ lf _ all ( self, params, mc, zdist _ mag ) : self. params = params for i in range ( len ( self. zarray ) ) : z = self. zarray [ i ] # the schechter function at redshift z m = self. model _ z ( params, z, none, mc ). sum ( axis = 1 ) * self. pixdx [ 1 ] self. lf0 [ i ] = m. copy ( ) * zdist _ mag. dvdz ... | [
0.12041772156953812,
-1.1738502979278564,
0.425182580947876,
0.461762011051178,
0.3289130628108978,
0.41255316138267517,
0.6664757132530212,
1.1975092887878418,
0.4412103295326233,
-0.03179037943482399,
-0.23129555583000183,
0.10192960500717163,
-0.020612167194485664,
1.248724341392517,
... |
def test _ evaluation _ and _ gradient _ three _ models _ peer ( self ) : ninputs = 2 nnodes = 3 discrep _ order, scaling _ order = 1, 0 graph = setup _ peer _ mfnets _ graph ( nnodes ) discrep _ indices = compute _ hyperbolic _ indices ( ninputs, discrep _ order ) scaling _ indices = compute _ hyperbolic _ indices ( n... | [
0.38036996126174927,
0.5915913581848145,
0.9474353194236755,
-0.23874202370643616,
0.7255209684371948,
0.5610515475273132,
0.5242847800254822,
-0.18343204259872437,
-0.37286388874053955,
-0.0956546887755394,
-0.5127410292625427,
-0.4218922555446625,
-0.3060309588909149,
0.3897266983985901,... |
def attach ( self, gui ) : # pragma : no cover gui. add _ view ( self ) | [
-0.10929542779922485,
-0.31295084953308105,
0.28141820430755615,
-0.07774420082569122,
-0.5939003229141235,
1.101913571357727,
0.07453222572803497,
-0.1395769864320755,
0.29104432463645935,
-1.917065143585205,
0.38786497712135315,
0.8158957362174988,
-0.4493565261363983,
1.9708507061004639... |
def get _ basic _ summary ( df _ return, frequency = " daily " ) : # average annual return ann _ return = df _ return. mean ( ) * ret _ annualizer ( frequency = frequency ) # volatility of all assets & portfolios ann _ vol = df _ return. std ( ) * vol _ annualizer ( frequency = frequency ) sharpe = ann _ return / ann _... | [
-0.33075425028800964,
0.5146044492721558,
0.4709199368953705,
-0.37604278326034546,
-0.054402053356170654,
-0.26299557089805603,
0.027576522901654243,
-0.7687858939170837,
0.18115995824337006,
0.1454997956752777,
1.1305829286575317,
0.14488597214221954,
0.33526647090911865,
-0.509903907775... |
def repeat ( self, repeat ) : q = urllib. parse. urlencode ( { " state " : repeat } ) url = " me / player / repeat " self. put _ api _ v1 ( url, q ) | [
-2.0794756412506104,
0.7033888697624207,
0.4489637017250061,
0.06308989971876144,
0.30387023091316223,
0.07055798172950745,
-0.5231913328170776,
-0.5826606154441833,
0.6958812475204468,
0.40359625220298767,
-1.6225144863128662,
0.503858208656311,
-1.2913775444030762,
-1.4814163446426392,
... |
def run _ backwards ( app, migrations, ignore = [ ], fake = false, db _ dry _ run = false, verbosity = 0 ) : def record ( app _ name, migration ) : # record us as having not done this record = migrationhistory. for _ migration ( app _ name, migration ) record. delete ( ) return run _ migrations ( toprint = " < % s : % ... | [
0.0371808260679245,
0.7259772419929504,
0.7612507343292236,
0.20778746902942657,
0.040475163608789444,
-0.05000839754939079,
-0.41153189539909363,
0.035052668303251266,
-0.13701775670051575,
0.8380499482154846,
-0.32135209441185,
1.0068541765213013,
0.1560877114534378,
0.04861567169427872,... |
def parsecoordinates ( x ) : lat = x. split ('n') [ 0 ]. strip ( ) longi = x. split ('n') [ 1 ]. strip ( ). split ('e') [ 0 ]. strip ( ) return float ( lat ), float ( longi ) | [
-0.23089660704135895,
-0.39220941066741943,
0.5336018800735474,
-1.0343053340911865,
-0.2135833203792572,
0.2884732484817505,
-1.3025124073028564,
0.4860033392906189,
-0.7667092084884644,
0.2368135154247284,
-1.0429682731628418,
-0.6267369985580444,
0.19245177507400513,
0.17171713709831238... |
def _ _ pathexists ( self, path ) : return os. access ( str ( path ), os. f _ ok ) | [
-0.40163683891296387,
-1.2660740613937378,
0.40957343578338623,
-0.9224194884300232,
0.33943814039230347,
0.5022383332252502,
0.20320695638656616,
-0.1353953778743744,
-0.3746222257614136,
-0.08550966531038284,
1.0785341262817383,
-0.6606698632240295,
0.21274234354496002,
-1.02251267433166... |
def test _ list _ integer _ enumeration _ 1 _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 2. xsd ", instance = " nistdata / list / ... | [
-1.182551622390747,
-0.6717998385429382,
0.5378637909889221,
0.6299318671226501,
-0.2837527096271515,
0.11568781733512878,
-0.38697072863578796,
0.4613768756389618,
0.9776598811149597,
0.5015699863433838,
-0.9061478972434998,
-0.11878132075071335,
-0.10290689766407013,
0.7559241652488708,
... |
def is _ binary _ string ( obj ) : if py2 : # python 2 return isinstance ( obj, str ) else : # python 3 return isinstance ( obj, bytes ) | [
-0.426183819770813,
-0.6772053837776184,
0.5992287397384644,
1.064518690109253,
-0.6270428895950317,
0.9192625284194946,
-0.22954529523849487,
-1.551881194114685,
0.8385790586471558,
-0.16399921476840973,
-1.1055114269256592,
0.3801735043525696,
-0.6421846151351929,
-0.32745981216430664,
... |
def batch _ iter _ one _ way ( data, batch _ size, shuffle = false, key = none ) : batch _ num = math. ceil ( len ( data ) / batch _ size ) index _ array = list ( range ( len ( data ) ) ) if shuffle : np. random. shuffle ( index _ array ) for i in range ( batch _ num ) : indices = index _ array [ i * batch _ size : ( i... | [
-0.1565539687871933,
0.2306358963251114,
0.6874769926071167,
-0.29374340176582336,
-0.43334561586380005,
-0.14078567922115326,
0.3534376323223114,
-0.44388943910598755,
0.4169181287288666,
0.4417150914669037,
0.00421169213950634,
0.5772051215171814,
-0.34524038434028625,
0.9985822439193726... |
def test _ atomic _ any _ uri _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 1. xsd ", instance = " nistdata / atomic / anyuri ... | [
-0.06987427920103073,
-0.3810048997402191,
0.40961718559265137,
1.016489028930664,
-0.2610395848751068,
-0.2951439619064331,
-0.057161711156368256,
0.07938643544912338,
-0.31198954582214355,
0.06140299513936043,
0.09636160731315613,
-0.2997364103794098,
0.020747799426317215,
0.515543818473... |
def _ dumppagesfrommemoryappendtofile ( self, start _ page _ index, page _ count ) : logging. info ('dump from page index 0x % x with count 0x % x ', start _ page _ index, page _ count ) if start _ page _ index + page _ count > self. _ adump. max _ dump _ pages : raise memorydumpererror ('wrong page range, start : 0x %... | [
0.4047546088695526,
-0.12001045048236847,
0.6046680212020874,
-0.5376606583595276,
-0.29490023851394653,
0.37545111775398254,
0.32001039385795593,
-0.2574741244316101,
0.2340344786643982,
0.19694699347019196,
0.5334776639938354,
0.7621814012527466,
-0.1387585699558258,
0.6099457740783691,
... |
def remove _ alphanumerics ( text ) : txt = [ ] for each in text. split ( ) : if not any ( x in each. lower ( ) for x in " 0123456789 " ) : txt. append ( each ) txtsent = " ". join ( txt ) return txtsent | [
0.4163573384284973,
-1.01204252243042,
0.5404699444770813,
-0.656748354434967,
-0.4655630886554718,
0.7051401734352112,
0.048001136630773544,
0.8122701644897461,
0.16386552155017853,
0.6221244931221008,
-0.7070395946502686,
-0.9315474033355713,
-1.2624197006225586,
0.5745332837104797,
-0... |
def stem _ text ( text, stemmer ='snowball') : # text = remove _ inside _ braces ( text ) the function remove _ inside _ braces does not exist. we need to see what it does tokens = word _ tokenize ( text ) if stemmer = ='snowball': text _ stem = " ". join ( [ sb _ stem. stem ( w ) for w in tokens ] ) else : text _ stem... | [
0.5406310558319092,
0.3830345869064331,
0.4150997996330261,
0.7468995451927185,
-1.015605092048645,
-0.0049483077600598335,
-0.6285749077796936,
0.5067105293273926,
0.3071563243865967,
0.6814565062522888,
-0.42541155219078064,
-0.2019091546535492,
-0.8025041222572327,
0.27555692195892334,
... |
def get _ exchange _ symbols _ filename ( exchange _ name, is _ local = false ) : name ='symbols. json'if not is _ local else'symbols _ local. json'exchange _ folder = get _ exchange _ folder ( exchange _ name ) return os. path. join ( exchange _ folder, name ) | [
-0.44420763850212097,
0.16233904659748077,
0.5972002148628235,
-1.0296767950057983,
-0.12230243533849716,
0.2254142016172409,
0.7511574029922485,
0.21352256834506989,
-0.000821779016405344,
0.8272106051445007,
-0.3107270896434784,
0.1969204545021057,
0.5164945125579834,
0.26753124594688416... |
def testjournalfieldblanksearch ( self ) : form = self. form form. enter _ value ('accids ','j : 41759') form. click _ search ( ) # finds the results table and iterates through the table table _ element = self. driver. find _ element ( by. id, " resultstable " ) table = table ( table _ element ) # finds the doi id colu... | [
0.2946903109550476,
1.0017179250717163,
0.34011101722717285,
-0.10442392528057098,
1.511611819267273,
-0.009583917446434498,
0.7981775999069214,
-0.6985687613487244,
-0.029936762526631355,
-1.1010624170303345,
0.06111863628029823,
-0.3480040431022644,
-0.9363710880279541,
0.217187762260437... |
def _ _ str _ _ ( self ) : return " % s " % self. img | [
-0.46492984890937805,
-1.5861986875534058,
0.3916572332382202,
-1.2167069911956787,
-0.6240643262863159,
0.6222518682479858,
-0.3773857653141022,
0.04144253209233284,
0.0466201975941658,
-0.054003942757844925,
1.1971575021743774,
0.6537704467773438,
0.5743521451950073,
0.6913846135139465,
... |
def _ collect _ quantities ( cls, cockpit _ quantities, track _ interval ) : if cockpit _ quantities is none : cockpit _ quantities = cls. default _ quantities quants = [ ] for q in cockpit _ quantities : if inspect. isclass ( q ) : quants. append ( q ( track _ interval ) ) else : quants. append ( q ) return quants | [
-0.046659696847200394,
-0.5986691117286682,
0.3939126133918762,
0.6405858993530273,
0.8416094779968262,
0.49729594588279724,
-0.9183003306388855,
-1.0476877689361572,
-0.41676968336105347,
-0.07526931166648865,
0.23755264282226562,
-0.4950944781303406,
0.5396592617034912,
1.224799156188964... |
def parse _ secondary ( path : str ) - > pd. dataframe : if not os. path. isfile ( path ) : raise assertionerror ( f " cannot find file'{ path }'" ) logging. info ( f " parsing :'{ path }'" ) parsed _ lines : list [ tuple [ str, float ] ] = [ ] with open ( path, " r " ) as ih : for line in tqdm ( ih, desc = " parsing o... | [
0.7393771409988403,
-0.3921266496181488,
0.469786137342453,
-0.5122397541999817,
-0.7329904437065125,
-0.9454440474510193,
0.39708858728408813,
-0.48220065236091614,
-0.9853452444076538,
-0.5010234713554382,
-0.3266724944114685,
0.952968418598175,
0.5668326020240784,
-0.12325938791036606,
... |
def location ( self, f ) : self. add _ handler ( f, type ='location') return f | [
-0.3523048162460327,
-0.21561521291732788,
0.564002513885498,
0.24481911957263947,
-0.3426126539707184,
0.898880660533905,
1.2288291454315186,
0.5868108868598938,
0.0041364096105098724,
-1.0158077478408813,
0.14595212042331696,
0.16079430282115936,
1.0196183919906616,
-0.4535435140132904,
... |
def decode ( cls, raw : bytes ) - >'request': request = cls ( ) setattr ( request,'bytes ', raw ) raw = raw. decode ( ) print ( raw ) fields = raw. splitlines ( ) body _ start = 0 # determines where the body of the request starts request _ line = fields [ 0 ]. split ( ) del fields [ 0 ] method = request _ line [ 0 ] ur... | [
-0.8882273435592651,
-0.6329009532928467,
0.9339688420295715,
-0.6100597977638245,
-0.8646650314331055,
-0.29824376106262207,
-1.0426605939865112,
0.02613181434571743,
0.423985093832016,
-0.9830074310302734,
-0.3331752121448517,
0.04940963163971901,
0.04365810751914978,
-0.6617199778556824... |
def get _ span _ type ( cls : type [ spaczzattrs ], span : span ) - > optional [ str ] : if cls. _ all _ equal ( [ token. _. spaczz _ type for token in span ] ) : return span [ 0 ]. _. spaczz _ type else : return none | [
0.760914146900177,
-0.054812218993902206,
0.22730886936187744,
0.5592579245567322,
0.29364538192749023,
0.16191163659095764,
0.386222779750824,
-0.8339487314224243,
1.1222575902938843,
0.10576668381690979,
-0.2715815007686615,
0.7724906206130981,
-0.11781308799982071,
0.47546741366386414,
... |
def compare ( self, data _ left : list, data _ right : list, tablefill : str = " - - ", nocomp : bool = false ) : if not nocomp : self. logger. debug ( " comparing sides " ) uniqueleft = [ item for item in data _ left if item not in data _ right ] uniqueright = [ item for item in data _ right if item not in data _ left... | [
-0.004124670289456844,
0.1772540956735611,
0.916823148727417,
-0.7176944017410278,
-0.16676700115203857,
-0.20471736788749695,
-0.6361295580863953,
-0.1770201176404953,
-0.19832538068294525,
-0.12263883650302887,
-0.4942258596420288,
-0.3857381343841553,
-0.09140908718109131,
1.26042520999... |
def generate _ account _ number ( self ) : acc _ first _ five _ char = " 98001 " last _ five _ digit = randint ( 10000, 99999 ) str _ d = acc _ first _ five _ char + str ( last _ five _ digit ) acc _ number = int ( str _ d ) logging. info ( " account number generated " ) return acc _ number | [
-0.3688783049583435,
-0.32502996921539307,
0.6487739682197571,
-0.3319876194000244,
0.1981448382139206,
-0.43687447905540466,
2.107212543487549,
0.585748016834259,
0.7995582818984985,
-0.7209120988845825,
-0.3925754427909851,
0.30672913789749146,
0.4179673194885254,
-0.3138948380947113,
... |
def _ _ getattribute _ _ ( self, attribute : str ) : try : return super ( ). _ _ getattribute _ _ ( attribute ) except attributeerror : if attribute. startswith ( " _ " ) : raise return none | [
0.03858528658747673,
0.10412821173667908,
0.6479905843734741,
-0.2839132249355316,
-0.5990426540374756,
-0.7138344645500183,
0.03287910297513008,
-1.1318374872207642,
0.29142045974731445,
-0.16259552538394928,
0.3603781759738922,
0.0001072711093001999,
0.5289719104766846,
0.117995046079158... |
def test _ invalid _ boolean ( self ) : with self. assertraises ( vol. invalid ) : util. boolean ('foobar') | [
0.8682169914245605,
0.152276873588562,
0.17049270868301392,
0.49760162830352783,
0.1813066601753235,
0.875924825668335,
0.08935622870922089,
1.3303632736206055,
-1.0127390623092651,
-0.39143988490104675,
-0.21400819718837738,
-0.3914276361465454,
-0.5975031852722168,
-0.08821746706962585,
... |
def create _ object ( self, container _ name, object _ name, data = none, headers = none, params = none, requestslib _ kwargs = none ) : url ='{ 0 } / { 1 } / { 2 } '. format ( self. storage _ url, container _ name, object _ name ) response = self. put ( url, data = data, headers = headers, params = params, requestslib... | [
-0.8221572637557983,
-0.5242713689804077,
0.8788161873817444,
0.28267040848731995,
0.22277972102165222,
0.2220097780227661,
-0.6100701689720154,
-0.9048174023628235,
0.07246897369623184,
0.5656564235687256,
-1.1107897758483887,
0.19151964783668518,
-0.28595542907714844,
-0.826158344745636,... |
def get _ user ( email : str ) : try : return user. objects ( ). get ( email = email ). to _ mongo ( ). to _ dict ( ) except : raise doesnotexist ( " user does not exist! " ) | [
-0.39646467566490173,
0.892789900302887,
0.5982131361961365,
0.24879206717014313,
0.3291376233100891,
0.3561888635158539,
-0.6415194272994995,
-0.4140586853027344,
-0.27806273102760315,
1.3570665121078491,
-0.8592538833618164,
-0.06465249508619308,
0.16133509576320648,
-0.2701261639595032,... |
def _ check _ install ( self ) : try : subprocess. check _ output ( ['which ','tlgu'] ) except exception as exc : logger. info ('tlgu not installed : % s ', exc ) logger. info ('installing tlgu.') if not subprocess. check _ output ( ['which ','gcc'] ) : logger. error ('gcc seems not to be installed.') else : tlgu _ pat... | [
0.357687383890152,
-0.5883815288543701,
0.7460252046585083,
-0.07772456109523773,
0.4127970337867737,
0.5059219002723694,
1.066288709640503,
-0.004510244820266962,
-0.7355971932411194,
0.6271740198135376,
0.18141280114650726,
0.45840203762054443,
-0.5080527067184448,
0.8319474458694458,
... |
def sync _ stream ( self ) : while true : data = self. serial. read ( 5 ) for i, byte in enumerate ( data ) : if byte & sync : self. serial. read ( i ) # throw away subsequent i bytes return | [
0.4200730323791504,
0.24792568385601044,
0.3766464591026306,
0.036614250391721725,
-0.4132227599620819,
-0.406903475522995,
0.7957726716995239,
-1.9548852443695068,
-0.3169255256652832,
-0.13738027215003967,
-0.366261750459671,
0.7304646968841553,
-1.379536509513855,
0.2696898579597473,
... |
def read _ all _ file _ names ( directory, extension, key ) : assert extension. startswith ( ". " ) file _ paths = glob. glob ( directory +'* * / *'+ extension, recursive = true ) file _ paths = sorted ( file _ paths, key = key ) assert len ( file _ paths ) > 0, ( f " something went wrong. found no { extension } files ... | [
0.7282655239105225,
-0.16805072128772736,
0.67845219373703,
1.1895877122879028,
-0.7245529890060425,
-0.035103313624858856,
-0.6874889135360718,
-0.17557723820209503,
-0.43641939759254456,
0.8926787972450256,
0.6227907538414001,
0.24420252442359924,
0.28161683678627014,
0.2712189257144928,... |
def config _ get ( self, config, section, option ) : return self. strip _ quotes ( config. get ( section, option ) ) | [
0.19449394941329956,
-0.8709290027618408,
0.4731926918029785,
-0.03473818302154541,
-0.3255828619003296,
-0.7725129723548889,
-1.0760211944580078,
-0.06151743605732918,
-0.49725091457366943,
1.4427721500396729,
0.16123482584953308,
0.39019665122032166,
0.18511658906936646,
-0.0430875755846... |
def test _ list _ decimal _ enumeration _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 1. xsd ", instance = " nistdata / list / deci... | [
-0.826931357383728,
-0.742322564125061,
0.6928752660751343,
0.7626190185546875,
0.24276719987392426,
-0.2533368170261383,
0.2762514650821686,
0.6499536037445068,
1.2502468824386597,
0.14824940264225006,
-0.6165798902511597,
-0.4771633744239807,
0.09885400533676147,
0.5123251676559448,
-0... |
def generate _ release _ notes ( lines ) : header = textwrap. dedent ( " " " < h1 > hubble space telescope < br / > < dtml - var title > < / h1 > < dtml - if " ( _. has _ key ('navigation') ) and ( navigation. isviewable ( request ) ) " > < dtml - var navigation > < / dtml - if > < div id = " info " > < article > < h2 ... | [
-0.17820362746715546,
-0.01026927586644888,
0.5846163630485535,
-0.24594013392925262,
-0.19210393726825714,
-0.8582307696342468,
-0.6678702235221863,
-0.239532470703125,
-0.4768836200237274,
0.5287492275238037,
0.4429929852485657,
-0.7319448590278625,
-0.014244417659938335,
-0.080297604203... |
def compute _ shape ( coords, reshape _ len = none, py _ name ='' ) : if not reshape _ len : return [ len ( coord ) for coord in coords. values ( ) ] # get the shape of the coordinates bigger than 1 shape = [ len ( coord ) for coord in coords. values ( ) if len ( coord ) > 1 ] shape _ len = len ( shape ) # return an er... | [
-0.7000637650489807,
0.32894423604011536,
0.5337517857551575,
-0.04688772186636925,
0.3892655074596405,
-0.4596315622329712,
-0.1725708544254303,
0.7276595830917358,
-0.3323131203651428,
0.19798997044563293,
0.0511934719979763,
-0.547910749912262,
0.2722627520561218,
-0.21814100444316864,
... |
def cosh ( x ) : try : return variable ( x. name, np. cosh ( x. val ), { k : v * np. sinh ( x. val ) for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : return np. cosh ( x ) | [
0.8598275780677795,
0.3096032440662384,
0.4892210066318512,
0.11152932047843933,
-1.0301034450531006,
0.4281252324581146,
-0.893359899520874,
-0.3357698619365692,
-0.023726219311356544,
-0.501737654209137,
0.06486259400844574,
0.3482523262500763,
0.41078928112983704,
-0.14206452667713165,
... |
def addtolist ( self, music ) : if self. playing = = 0 : self. music. insert ( 0, music ) self. updateinterface ( ) self. currentindex = 0 else : self. music. insert ( self. currentindex + 1, music ) self. updateinterface ( ) | [
-1.075348973274231,
0.40392711758613586,
0.7254186272621155,
-0.13001751899719238,
0.5500404834747314,
1.6261696815490723,
0.4730342924594879,
-0.22574321925640106,
1.0717209577560425,
0.07408945262432098,
-0.32199496030807495,
-0.3813699781894684,
-1.6882877349853516,
-0.00484772259369492... |
def compute _ fundamental ( x1, x2 ) : n = x1. shape [ 1 ] if x2. shape [ 1 ]! = n : raise valueerror ( " number of points don't match. " ) # build matrix for equations a = np. zeros ( ( n, 9 ) ) for i in range ( n ) : a [ i ] = [ x1 [ 0, i ] * x2 [ 0, i ], x1 [ 0, i ] * x2 [ 1, i ], x1 [ 0, i ] * x2 [ 2, i ], x1 [ 1, ... | [
0.9713230133056641,
0.1444448083639145,
1.044329285621643,
-0.1272740662097931,
-0.007955255918204784,
-0.6589295864105225,
-0.4800288677215576,
0.07044807821512222,
-0.6310952305793762,
0.5946135520935059,
0.5459902286529541,
0.6562846899032593,
-0.22738315165042877,
-1.0284205675125122,
... |
def employees ( ) : surn = request. args. get ('surn') q = request. args. get ('q') dat _ 1 = request. args. get ('dat _ 1') dat _ 2 = request. args. get ('dat _ 2') sort = request. args. get ('sort') if surn : employees = user. query. filter ( user. first _ name = = surn ). all ( ) return render _ template ( " employe... | [
-0.4879976511001587,
-0.07676282525062561,
0.9134677052497864,
0.6899287104606628,
-0.2568269968032837,
0.6857973337173462,
-0.2135019600391388,
0.08806656301021576,
-0.5801791548728943,
-0.07979091256856918,
0.5821971297264099,
0.4605301320552826,
0.6199389696121216,
0.6383728981018066,
... |
def train _ in _ point ( self, train : train, point _ id : int ) : msg = " train is in point, train : { }, point : { } ". format ( train, self. map. point [ point _ id ] ) post _ id = self. map. point [ point _ id ]. post _ id if post _ id is not none : msg + = ", post : {! r } ". format ( self. map. post [ post _ id ]... | [
-0.1276821792125702,
-0.2453552484512329,
0.5196349620819092,
0.5639947652816772,
-0.0428764708340168,
0.07409372180700302,
-0.14960356056690216,
0.4488362669944763,
-0.6775939464569092,
0.03435708209872246,
-0.4904538094997406,
0.7107188701629639,
-0.14508280158042908,
0.09095879644155502... |
def tokenise ( sample ) : processed = sample. split ( " " ) return processed | [
-0.053484395146369934,
-0.44813549518585205,
0.2630363702774048,
-0.45766958594322205,
-1.0355949401855469,
-1.1814709901809692,
-0.43553903698921204,
0.7363814115524292,
-0.20980864763259888,
0.4369155466556549,
-0.8561010360717773,
0.35287585854530334,
-0.7792508006095886,
-0.20927812159... |
def all ( promises : list ['promise [ s ]'] ) - >'promise [ list [ s ] ]': def executor ( resolve : resolvefunc [ list [ s ] ] ) - > none : was _ resolved = false def recheck _ resolve _ status ( _ : s ) - > none : nonlocal was _ resolved # we're being called from a promise that is holding a lock so don't try to use # ... | [
0.2721068859100342,
0.1059526726603508,
0.4928174614906311,
1.679417610168457,
0.7301540970802307,
-0.42325082421302795,
-1.170137882232666,
-0.087093785405159,
0.11148417741060257,
-0.3439294397830963,
-0.2811226546764374,
-0.6767444610595703,
-0.36158591508865356,
1.40050208568573,
-0.... |
def addtoaccessgroup ( ctx, # mandatory main parameter volumeaccessgroupid, # mandatory main parameter volumes ) : " " " volumes to a specified volume access group. " " " cli _ utils. establish _ connection ( ctx ) volumes = parser. parse _ array ( volumes ) ctx. logger. info ( " " " : " " " " " " volumeaccessgroupid =... | [
-0.8269020318984985,
-0.6712836623191833,
0.5759778618812561,
-0.865634024143219,
0.30999496579170227,
-0.15453030169010162,
0.057569898664951324,
-0.47388413548469543,
0.15332280099391937,
0.5237452983856201,
0.814588725566864,
0.9919912219047546,
-0.5838072299957275,
0.319246381521225,
... |
def _ plot _ 3d _ radar _ cams ( radar _ matrix, model _ metadata _ dict, cam _ colour _ map _ object, max _ colour _ prctile _ for _ cam, output _ dir _ name, class _ activation _ matrix = none, ggradcam _ output _ matrix = none, storm _ ids = none, storm _ times _ unix _ sec = none ) : pmm _ flag = storm _ ids is non... | [
0.25168558955192566,
0.30784112215042114,
0.6410366296768188,
0.3660726547241211,
0.028512902557849884,
0.43233487010002136,
0.5094186663627625,
-0.4013696312904358,
-0.5267915725708008,
0.45797446370124817,
0.10358564555644989,
-0.04308655112981796,
-0.06737644970417023,
0.245732441544532... |
def initialize _ state ( self, item ) : pass | [
-0.9664724469184875,
-0.7311764359474182,
0.24966056644916534,
0.3281649947166443,
0.45803311467170715,
0.142882838845253,
0.31015387177467346,
0.024292126297950745,
1.2239371538162231,
0.014438997022807598,
-1.832379937171936,
-0.34954801201820374,
0.40478506684303284,
-0.1662385463714599... |
def from _ string _ blockstate ( cls, blockstate : str ) : namespace, block _ name, properties = cls. parse _ blockstate _ string ( blockstate ) return cls ( namespace, block _ name, properties ) | [
0.8940352201461792,
-1.0627988576889038,
0.19410839676856995,
0.3708522319793701,
-1.091354250907898,
0.0249195359647274,
-0.533386766910553,
-0.5393741726875305,
0.4508332908153534,
0.16470617055892944,
-0.6160774230957031,
0.508293867111206,
-0.19496119022369385,
-0.9625457525253296,
0... |
def load _ data _ file ( ) : df = pd. read _ excel ( io = settings. data _ file, sheet _ name ='sheet1 ', usecols ='a : d') logger. info ('pandas dataframe loaded from { }. '. format ( os. path. split ( settings. data _ file ) [ 1 ] ) ) return df | [
0.24351753294467926,
0.4408801794052124,
0.3792857825756073,
0.028616314753890038,
0.5328693985939026,
0.7919389605522156,
0.003233495866879821,
0.18903343379497528,
-1.1754008531570435,
-0.7175324559211731,
0.3392869532108307,
0.9138340950012207,
0.003717272076755762,
-1.1404794454574585,... |
def check _ subpath _ in _ all ( all _ path ) : data = [ ] length = len ( all _ path ) for i in range ( length ) : for j in range ( i + 1, length ) : if set ( all _ path [ i ] ) < set ( all _ path [ j ] ) and not check _ path _ contains _ in _ result ( all _ path [ j ], data ) : data. append ( all _ path [ j ] ) elif s... | [
0.24319855868816376,
-0.26218995451927185,
0.8255900740623474,
1.4989612102508545,
-0.3916468918323517,
0.5139302611351013,
0.12224412709474564,
0.36920392513275146,
-0.24905556440353394,
-0.14047789573669434,
-0.4603884518146515,
-0.11997706443071365,
-0.4420947730541229,
0.82001399993896... |
def test _ debug _ setting ( self ) : from backoffice import settings for result, words in self. _ variants. items ( ) : for word in words : # print ( word, result ) with patch. dict ('os. environ ', { self. env _ var _ debug : word } ) : importlib. reload ( settings ) assert self. env _ var _ debug in os. environ self... | [
-0.08653751760721207,
-0.018308116123080254,
0.43778911232948303,
-0.4993653893470764,
0.8597854375839233,
0.7726719379425049,
0.14299869537353516,
-0.7535656094551086,
-0.6920942664146423,
0.6166453957557678,
-0.8313416838645935,
0.034657590091228485,
-0.6335782408714294,
0.68975347280502... |
def _ _ init _ _ ( self, a, b, dim = false, index = none ) : self. iv = iv. mpf ( [ a, b ] ) self. iv _ lambda = iv. mpf ( [ 0, 0 ] ) if dim : assert isinstance ( dim, int ) assert isinstance ( index, int ) and 0 < = index < dim self. iv _ prime = np. array ( [ iv. mpf ( [ 0, 0 ] ) for _ in range ( dim ) ] ) self. iv _... | [
-0.15165887773036957,
0.24234157800674438,
0.5268879532814026,
0.21394188702106476,
0.2627716660499573,
-0.34295421838760376,
-0.011313313618302345,
0.5202474594116211,
0.5785003900527954,
0.43188586831092834,
-0.4864707291126251,
0.8968012928962708,
-0.3198329508304596,
-0.484102994203567... |
def sys ( x, t = 0 ) : # generate an array for the integration data y = np. zeros ( len ( x ) ) # notation : # x [ 0 ] ~ x, x [ 1 ] ~ y # y [ 0 ] ~ x ', y [ 1 ] ~ y'y [ 0 ] = x [ 1 ] y [ 1 ] = gamma1 * np. cos ( omega1 * t ) - ( delta1 * x [ 1 ] + x [ 0 ] * ( alpha1 + beta1 * x [ 0 ] * * 2 ) ) return y | [
-0.5267536640167236,
-0.14765675365924835,
0.5409206748008728,
-0.9394873380661011,
0.3793577253818512,
-0.08606798946857452,
-0.045785821974277496,
-0.6602748036384583,
-0.6553778052330017,
0.3784535825252533,
-1.25727379322052,
0.5411689877510071,
0.2256965935230255,
-0.23284420371055603... |
def test _ atomic _ any _ uri _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 3. xsd ", instance = " nistdata / atomic / any... | [
0.2568556070327759,
-0.22768184542655945,
0.4506216049194336,
0.7442481517791748,
-0.0019773177336901426,
-0.08962992578744888,
-0.4321567714214325,
-0.11571190506219864,
-0.04776720330119133,
0.03748757019639015,
0.09959094226360321,
-0.4017878770828247,
-0.33812445402145386,
-0.011233594... |
def get _ mopad _ html ( url ) : s = re. search ( " ^ http. * mozilla \. org / (. * ) ", url ) if s is not none : pad _ name = s. groups ( ) [ 0 ] else : raise valueerror ( " " ) request _ url = " https : / / etherpad. mozilla. org / ep / pad / export / { } / latest? format = html ". format ( pad _ name ) text = urllib... | [
-0.7955271601676941,
0.31965184211730957,
0.7290058135986328,
0.857070803642273,
-1.2701776027679443,
0.11933665722608566,
-0.25224125385284424,
-0.11023639142513275,
0.6622412204742432,
1.073336124420166,
0.19295634329319,
0.27994778752326965,
-0.5566468238830566,
0.3439368009567261,
0.... |
def media _ title ( self ) - > str | none : item = self. _ currently _ playing. get ( " item " ) or { } return item. get ( " name " ) | [
-0.3317601978778839,
-0.5962739586830139,
0.4438890516757965,
0.02732689119875431,
0.13444581627845764,
-0.5453162789344788,
-0.7014110088348389,
-1.1388572454452515,
0.2723604738712311,
0.6080590486526489,
0.2036372870206833,
0.34761127829551697,
-0.7042770981788635,
-0.5518256425857544,
... |
def getnumber ( self ) : return self. number | [
-0.6937885284423828,
-0.33341455459594727,
0.44537225365638733,
1.0324138402938843,
0.8529316782951355,
0.04653804004192352,
1.274539828300476,
0.8171548843383789,
0.4744821786880493,
-1.7651103734970093,
-0.9578405022621155,
0.4411099851131439,
0.10551673173904419,
0.0025712400674819946,
... |
def welcome ( ) : return ( f " available routes : < br / > " f " / api / v1. 0 / precipitation < br / > " f " / api / v1. 0 / stations < br / > " f " / api / v1. 0 / tobs < br / > " f " / api / v1. 0 / start < br / > " f " / api / v1. 0 / start / end " ) | [
-0.21551290154457092,
-0.6022456884384155,
0.677099347114563,
-0.764420211315155,
0.2236769050359726,
-0.09827364236116409,
-1.275723934173584,
0.4482615292072296,
-0.6749553680419922,
0.9644494652748108,
-0.35322365164756775,
0.6129596829414368,
0.19064170122146606,
0.5712365508079529,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.