text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ login _ url ( self ) : login _ url = self. login _ url or settings. login _ url if not login _ url : raise improperlyconfigured ('define { 0 }. login _ url or settings. login _ url or override'' { 0 }. get _ login _ url ( ). '. format ( self. _ _ class _ _. _ _ name _ _ ) ) return force _ string ( login _ url... | [
-1.1338049173355103,
-0.030045336112380028,
0.4378975033760071,
1.0178316831588745,
0.8134087324142456,
0.1618034839630127,
-0.21763813495635986,
-0.004220896400511265,
0.5922181606292725,
-0.08849086612462997,
0.12818627059459686,
0.48400449752807617,
0.010541221126914024,
-0.094635270535... |
def sync _ lowstate ( target ) : data = _ process _ resource ( target,'state. show _ lowstate ','lowstate') if'body'in data and'ok'in data ['body'] : log. info ( " architect runner lowstate request was successful " ) return true else : log. warning ( " problem with architect runner lowstate request " ) return false | [
-0.2782292366027832,
0.44084295630455017,
0.6158759593963623,
-1.0151185989379883,
-0.2597958743572235,
0.11689070612192154,
-0.62895667552948,
-0.9217586517333984,
0.8995664715766907,
0.14653365314006805,
-0.48235079646110535,
1.5866800546646118,
-0.015185792930424213,
-0.0250649675726890... |
def _ write _ status ( self, value ) : f = open ( self. status _ pathname + ". new ", " wb " ) pickle. dump ( value, f, protocol = - 1 ) f. close ( ) os. rename ( self. status _ pathname + ". new ", self. status _ pathname ) | [
-0.0039529865607619286,
-1.2587246894836426,
0.46187013387680054,
0.5841181874275208,
0.13541007041931152,
0.6754461526870728,
0.6398972272872925,
0.4778817594051361,
0.1306975781917572,
0.4173101782798767,
-1.4324390888214111,
-0.42617252469062805,
0.6105546951293945,
0.5853043794631958,
... |
def load _ config ( filename ) : with open ( filename, " r " ) as file : return k. models. model _ from _ json ( file. read ( ) ) | [
-0.6886468529701233,
-0.5856060981750488,
0.25844278931617737,
-0.703222930431366,
-0.6473734378814697,
0.5227317810058594,
-0.7868050932884216,
0.4256426990032196,
-1.2395281791687012,
1.3837320804595947,
-0.7545138001441956,
-0.9222970008850098,
0.3755961060523987,
-0.3158140778541565,
... |
def start _ chicken _ game ( cls, voice _ transcript, skill ) : tags = cls. _ extract _ tags ( voice _ transcript, skill ['tags'] ) for tag in tags : reg _ ex = re. search ( tag, voice _ transcript ) print ( reg _ ex ) try : if reg _ ex : url = " https : / / i. imgur. com / fc2htf2. png " cls. response ('sure') subproc... | [
-0.035458363592624664,
-0.4091625511646271,
0.48215600848197937,
0.39305418729782104,
0.11266548186540604,
-0.6270826458930969,
-0.24057501554489136,
0.27669447660446167,
-0.2865549623966217,
-0.32106146216392517,
-0.6757115125656128,
0.5328589081764221,
0.3646557629108429,
0.5969898104667... |
def validate _ data _ type ( df, column _ name, datatype ) : for index, row in df. iterrows ( ) : value = row [ column _ name ] try : # attempt data conversion to schema data type datatype ( row [ column _ name ] ) except valueerror as e : raise valueerror ( f'error in row { index + 1 }, value { value }') | [
-0.02400585636496544,
0.5709148645401001,
0.43604087829589844,
-0.18750376999378204,
0.14467023313045502,
-0.5160059332847595,
-0.4874526262283325,
0.2165669947862625,
-0.5217825174331665,
0.1673075258731842,
0.1903577297925949,
0.5770259499549866,
0.5985422730445862,
0.43010976910591125,
... |
def bulge _ prior _ model _ tag ( self ) - > str : if self. bulge _ prior _ model is none : return " " tag = conf. instance [ " notation " ] [ " prior _ model _ tags " ] [ " light " ] [ self. bulge _ prior _ model. name ] return f " _ _ bulge _ { tag } " | [
0.5307517647743225,
-0.6963750123977661,
0.6018367409706116,
-0.5939884781837463,
1.0885146856307983,
0.25640711188316345,
0.32087603211402893,
-0.3435046076774597,
-0.24741053581237793,
-0.01083618588745594,
-0.33492448925971985,
0.5273495316505432,
0.21879225969314575,
1.2408678531646729... |
def dropout ( self, dropout ) : self. _ dropout = dropout | [
0.5318869352340698,
-0.09873725473880768,
0.12193398922681808,
0.3373628854751587,
-0.003137615043669939,
1.5662741661071777,
0.4955066442489624,
1.1022000312805176,
-0.9400537014007568,
-0.3997594118118286,
-1.1014457941055298,
-0.44735780358314514,
0.3315504491329193,
0.10562685132026672... |
def map _ to _ private ( environ, start _ response ) : identifier = environ ['wsgiorg. routing _ args'] [ 1 ] ['identifier'] host, target _ uri, user = _ map _ to _ uri ( environ, identifier ) environ ['tiddlyweb. usersign'] = _ proxy _ user ( environ, user ) try : target _ uri, query _ string = target _ uri. split ( '... | [
-1.3134821653366089,
-0.6043720245361328,
0.6281933784484863,
-0.789174497127533,
0.11573140323162079,
-0.11338294297456741,
0.4479764699935913,
-0.5313220620155334,
0.13583065569400787,
0.023031126707792282,
0.10092120617628098,
0.3479583263397217,
0.18480056524276733,
-0.0402056798338890... |
def test _ atomic _ qname _ white _ space _ nistxml _ sv _ iv _ atomic _ qname _ white _ space _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - whitespace - 1. xsd ", instance = " nistdata / atomic /... | [
-0.3214982748031616,
-0.4318982660770416,
0.4268783628940582,
-0.24188172817230225,
-0.34362173080444336,
0.13705569505691528,
0.5586722493171692,
-1.1349844932556152,
0.5229294896125793,
0.575572669506073,
-0.15290196239948273,
0.12293720245361328,
-0.14435595273971558,
0.8979905843734741... |
def _ _ str _ _ ( self ) : return str ( self. board [ 0 ] ) + " | " + str ( self. board [ 1 ] ) + " | " + str ( self. board [ 2 ] ) + " \ r \ n " + " - - " + " - - " + " - - " + " \ r \ n " + str ( self. board [ 3 ] ) + " | " + str ( self. board [ 4 ] ) + " | " + str ( self. board [ 5 ] ) + " \ r \ n " + " - - " + " - ... | [
0.12067065387964249,
-0.7403684258460999,
1.321458339691162,
-0.10291726142168045,
-0.4307812750339508,
0.7637726664543152,
-0.2214462012052536,
-0.33234235644340515,
-0.39208006858825684,
0.36957788467407227,
0.40393003821372986,
-0.04452678933739662,
-0.24998344480991364,
0.0671976506710... |
def get _ content _ with _ type ( self, message, contenttype ='text / plain') : maintype, subtype = contenttype. split ('/') parts = [ part for part in typed _ subpart _ iterator ( message, maintype, subtype ) ] body = [ ] for part in parts : charset = self. get _ charset ( part, self. get _ charset ( message ) ) body.... | [
0.12639030814170837,
-0.45495733618736267,
0.6762340664863586,
-0.14604896306991577,
-0.8825437426567078,
-0.3335922658443451,
-0.4313284456729889,
-0.8929208517074585,
-0.6398786902427673,
0.3019058108329773,
0.29757922887802124,
0.649937093257904,
-1.1670078039169312,
0.05659235641360283... |
def network ( self, network ) : self. _ network = network | [
-1.4576752185821533,
-0.12232662737369537,
-0.34590816497802734,
0.9480446577072144,
1.3220525979995728,
0.601262092590332,
-0.009931392036378384,
0.4562757909297943,
-0.16886766254901886,
-1.1284172534942627,
-1.342947244644165,
-0.5824912190437317,
-0.2361477166414261,
0.7584119439125061... |
def initcurvature ( img ) : # define global variables for smoothining purpose global runningcur global smoothcurvature # warp image warped = roadperspectivetransformation ( pfile _ cb, img, hood _ pixels = 0 ) # detect lanes lrlanes = lane _ detection _ pipeline ( warped, pfile _ cb, kernels = 5, hood _ pixels = 0 ) lr... | [
0.20058825612068176,
-0.9174696803092957,
0.7532459497451782,
-0.35091444849967957,
-0.40066131949424744,
0.21400699019432068,
0.4612981081008911,
0.2978219985961914,
-0.35437822341918945,
0.41187867522239685,
0.000277511338936165,
0.7885444760322571,
0.050655145198106766,
0.84469908475875... |
def wltopix ( self, wl ) : pix = ( ( wl - self. s3d. wave [ 0 ] ) / self. s3d. wlinc ) return max ( 0, int ( round ( pix ) ) ) | [
0.2017829865217209,
-0.264957457780838,
0.46106383204460144,
-1.0498716831207275,
-1.1728767156600952,
0.22371980547904968,
0.09643059223890305,
-0.6350937485694885,
1.2148587703704834,
0.43169593811035156,
-0.13444021344184875,
-0.2920130789279938,
-0.731465220451355,
0.8190445899963379,
... |
def test _ atomic _ any _ uri _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 4. xsd ", instance = " nistdata / atomic / ... | [
-0.25477612018585205,
-0.5020126700401306,
0.4994707703590393,
0.8102108836174011,
-0.44268015027046204,
-0.16598376631736755,
-0.157443106174469,
-0.0792546197772026,
-0.3904295563697815,
-0.11090295761823654,
-0.05697346106171608,
-0.45929786562919617,
-0.2966861426830292,
-0.12890760600... |
def test _ api _ shared _ live _ media _ delete _ anonymous ( self ) : shared _ live _ media = sharedlivemediafactory ( ) response = self. client. delete ( self. _ delete _ url ( shared _ live _ media. video, shared _ live _ media ), ) self. assertequal ( response. status _ code, 401 ) | [
0.2948974668979645,
-0.7354333996772766,
0.505822479724884,
1.0144838094711304,
-0.18659628927707672,
0.9045710563659668,
0.283791720867157,
0.8527179956436157,
1.1678634881973267,
-0.12428425252437592,
-0.9453306198120117,
0.5258599519729614,
-0.5306636095046997,
0.22601962089538574,
0.... |
def generate _ checksum ( msg ) : return reduce ( lambda x, y : x ^ y, msg ) | [
0.12053647637367249,
0.7992024421691895,
0.34412869811058044,
-0.046749673783779144,
1.027961015701294,
-0.38878655433654785,
0.16113628447055817,
0.5996439456939697,
-0.17253045737743378,
-0.17213459312915802,
-0.09583595395088196,
-0.3537248373031616,
-0.5401408672332764,
0.4754478931427... |
def upgrade _ state _ dict _ named ( self, state _ dict, name ) : if isinstance ( self. embed _ positions, sinusoidalpositionalembedding ) : weights _ key ='{ }. embed _ positions. weights '. format ( name ) if weights _ key in state _ dict : del state _ dict [ weights _ key ] state _ dict ['{ }. embed _ positions. _ f... | [
0.07148163765668869,
-0.6538335084915161,
0.7186782360076904,
-0.23946742713451385,
-1.2356969118118286,
-0.26742449402809143,
0.482923686504364,
0.4047180116176605,
0.25783082842826843,
1.4458619356155396,
-0.16128987073898315,
-0.426562637090683,
0.0633215382695198,
0.2895272374153137,
... |
def getdistance ( self, positionbis ) : dx = abs ( self. position [ 0 ] - positionbis [ 0 ] ) dy = abs ( self. position [ 1 ] - positionbis [ 1 ] ) distance = dx + dy return distance | [
-0.4110899567604065,
-0.7536967396736145,
0.6956941485404968,
0.45813411474227905,
0.17734792828559875,
0.49926093220710754,
-0.19507625699043274,
-0.3055388629436493,
-0.20690028369426727,
0.424629271030426,
-1.0195839405059814,
-0.7209470868110657,
-0.7203292846679688,
-0.403833061456680... |
def read _ hand3d ( ) : images = pickle. load ( open ( ". / pickle / images. pickle ", " rb " ) ) labels = pickle. load ( open ( ". / pickle / labels. pickle ", " rb " ) ) classes = pickle. load ( open ( ". / pickle / classes. pickle ", " rb " ) ) return np. array ( images ), np. array ( labels ), classes | [
-0.5740761756896973,
-0.7980862259864807,
0.8001075983047485,
-0.5358655452728271,
0.6056644320487976,
0.7884269952774048,
-0.1934172511100769,
-0.13649886846542358,
-0.6548215746879578,
-0.02661091834306717,
0.15824200212955475,
-0.1494082361459732,
-0.14457564055919647,
-0.36530888080596... |
def _ halt _ competition ( self, reason ) : self. stopping = true self. stopping _ reason = reason self. log ( " halting competition : % s " % reason ) | [
0.1542557328939438,
-0.30925142765045166,
0.21165451407432556,
-0.65787672996521,
0.19508276879787445,
1.4099918603897095,
-0.15111613273620605,
-0.007902857847511768,
-0.16592924296855927,
0.42755845189094543,
0.1912914663553238,
0.9475268125534058,
-0.03691523149609566,
-0.53262853622436... |
def write ( self, vals ) : context = dict ( self. env. context or { } ) for vehicle in self : if not context. get ('assignment ', false ) : if'vehicle _ driver _ id'in vals : if vehicle. vehicle _ driver _ id : vehicle. vehicle _ driver _ id. action _ unassign _ vehicle ( ) if vals. get ('vehicle _ driver _ id ', false... | [
-1.5231671333312988,
-1.4093725681304932,
0.4354270398616791,
0.018953591585159302,
1.1484545469284058,
-0.9237726330757141,
-0.1704370528459549,
0.8247196078300476,
-0.342947393655777,
0.61578768491745,
0.7092023491859436,
-0.13800287246704102,
0.4226607084274292,
1.0685648918151855,
-0... |
def isregistered ( ) : if not login ( ) : return false if loginnotblank ( ) : return true | [
-1.1069430112838745,
1.1578772068023682,
0.32815855741500854,
0.7232428789138794,
1.0978535413742065,
-0.07494310289621353,
-0.13387447595596313,
0.8493291139602661,
0.48133209347724915,
-0.5589600801467896,
-0.6390987038612366,
0.70587158203125,
-0.49395108222961426,
0.5585147142410278,
... |
def has _ edge ( self, v : int, w : int ) - > bool : if w in self. _ adj [ v ] and v in self. _ adj [ w ] : return true return false | [
-0.10467027127742767,
-0.2745867073535919,
0.36536523699760437,
-0.6373160481452942,
0.07676716893911362,
0.2115965038537979,
-0.21734124422073364,
0.09278564900159836,
0.3553416430950165,
0.49255064129829407,
0.3726752996444702,
0.4462052285671234,
-0.7661522626876831,
0.4436531960964203,... |
def prepare _ request _ uri ( self, uri, redirect _ uri = none, scope = none, state = none, * * kwargs ) : return prepare _ grant _ uri ( uri, self. client _ id,'code ', redirect _ uri = redirect _ uri, scope = scope, state = state, * * kwargs ) | [
-0.6178852319717407,
0.32374611496925354,
0.7948775887489319,
0.03656117990612984,
-0.26419249176979065,
-0.09249009191989899,
-0.10589949041604996,
0.694402277469635,
1.391266942024231,
-0.8012287020683289,
0.8841388821601868,
0.6938775181770325,
-0.28488174080848694,
-0.3453577756881714,... |
def rnncrf _ run ( config, model _ class, target _ dsets, y _ codebook, num _ epochs, wrk _ dir, rank, to _ gpu, memmap, modelstatedict _ path = none, options = { } ) : pid = " { } - { } ". format ( os. getpid ( ), rank ) # process id description print ( " process id ", pid ) fdtype, ldtype = get _ tensordtypes ( to _ ... | [
-0.45311033725738525,
0.11667490750551224,
0.8309137225151062,
0.3014962375164032,
0.08381938189268112,
-0.5764703750610352,
0.17568165063858032,
0.2604837417602539,
-0.24519281089305878,
-0.43930718302726746,
-0.12089656293392181,
0.3456785976886749,
0.16839434206485748,
0.493910312652587... |
def get _ center ( self ) : center = none if author. centroidtype = = centroidoption. aggregatematrix : center = self. _ _ aggregate _ matrix ( ) elif author. centroidtype = = centroidoption. averagematrix : center = self. _ _ average _ matrix ( ) else : raise runtimeerror ( " unspecified centroid option. " ) return ce... | [
0.9422571063041687,
-0.5048367381095886,
0.3389321267604828,
1.2468293905258179,
0.7366415858268738,
0.005142810754477978,
0.8590637445449829,
-0.5694432258605957,
1.0828770399093628,
0.1723085641860962,
1.4427732229232788,
0.5867812037467957,
-0.32560858130455017,
-0.1994023323059082,
0... |
def nvgparse ( nvgfile ) : points = [ ] polylines = [ ] polygons = [ ] circles = [ ] objs = ['point ','polyline ','polygon ','circle'] # feature types to extract # get the xml elements tree = et. elementtree ( ) tree. parse ( nvgfile ) root = tree. getroot ( ) # # due to the stuctue of nvg versions we need to modify th... | [
-0.24899668991565704,
-0.7683978080749512,
0.7189906239509583,
-0.36954137682914734,
-0.3379572927951813,
0.03664161264896393,
-0.18466605246067047,
-0.6170874238014221,
-0.3108006417751312,
0.5580378770828247,
-0.6849256157875061,
-0.38321739435195923,
0.04459556192159653,
0.4298670291900... |
def get _ score _ dictionary ( scores, encoding ='utf - 8') : if isinstance ( scores, collections. mapping ) : return scores. copy ( ) # else, load scores from predefined score file in shifterator try : lexicon = scores. split ('_') [ 0 ] score _ f ='lexicons / { } / { }. tsv '. format ( lexicon, scores ) all _ scores ... | [
-0.8888475298881531,
-0.3706524074077606,
1.0199134349822998,
-0.06713948398828506,
-0.7072336077690125,
0.17972125113010406,
-0.376934677362442,
-0.13961058855056763,
-0.7393986582756042,
0.6885450482368469,
-0.5469011664390564,
-0.20789773762226105,
0.3522304892539978,
0.3707194924354553... |
def jsonify ( data, status = none ) - > response : if status is none : status = 200 if isinstance ( data, dict ) : response = flask. json. jsonify ( * * utils. flatten ( data ) ) elif isinstance ( data, list ) : response = flask. json. jsonify ( utils. flatten ( data ) ) else : response = flask. json. jsonify ( data ) ... | [
-0.7135719060897827,
-0.4618547856807709,
0.567897617816925,
0.3295801281929016,
-0.5681567788124084,
-0.8011484146118164,
-0.5996246337890625,
0.9576930403709412,
0.8038689494132996,
-0.6510835289955139,
-1.3912031650543213,
0.38783782720565796,
-0.318364679813385,
0.450126588344574,
0.... |
def _ _ init _ _ ( self, channel, interceptor = none ) : self. _ _ _ _ desc = servicedesc ( [ x for x in filedescriptor. service if x. name = = " usermanager " ] [ 0 ], filedescriptor. package ) self. _ _ _ _ stub = _ usermanagerstub ( channel ) self. _ _ _ _ interceptor = interceptor | [
0.4624673128128052,
-0.2193317413330078,
0.6085850596427917,
-0.7593346238136292,
0.14255408942699432,
-0.11492222547531128,
0.02108813263475895,
0.30789464712142944,
0.38319671154022217,
-1.3473670482635498,
0.13132473826408386,
0.3483428657054901,
0.21421316266059875,
0.9133361577987671,... |
def merge ( self, other, normalize = true ) : isotope _ abundance = self. as _ atoms ( ) isotope _ abundance = isotope _ abundance. fillna ( 0. 0 ) # merge abundance and isotope dataframe modified _ df = isotope _ abundance. add ( other, fill _ value = 0 ) if normalize : norm _ factor = modified _ df. sum ( axis = 0 ) ... | [
-0.7178888916969299,
0.3823449909687042,
0.6610587239265442,
0.640841007232666,
0.09891394525766373,
0.26911023259162903,
-0.3003104329109192,
-0.13455137610435486,
-0.03386867046356201,
-0.028455175459384918,
0.8097102642059326,
-0.31671369075775146,
-0.3653644621372223,
0.018049459904432... |
def update ( self, delta _ time ) : # makes it so that self. health can not be a negative if self. health < 0 : self. health = 0 # only updates enemies and triggers wave manger if health is above 0 if self. health! = 0 : for enemy in self. enemy _ list : enemy. update ( ) if self. enemies _ dead = = 10 : self. wave _ m... | [
-0.45975908637046814,
-1.2556220293045044,
0.8600549101829529,
0.6331655383110046,
0.32474955916404724,
1.319920539855957,
-0.9587031602859497,
0.8572319149971008,
-0.1253006011247635,
0.12855759263038635,
-0.10891605168581009,
-0.5802953243255615,
-0.0822458416223526,
1.7329380512237549,
... |
def clr ( self, dodel = false ) : return _ snap. tstrpool64 _ clr ( self, dodel ) | [
-0.4050268828868866,
0.4253402650356293,
-0.1639879196882248,
-0.0922439843416214,
-0.5683683753013611,
0.20423543453216553,
0.7171567678451538,
0.06951846182346344,
-0.5418975949287415,
-0.14701208472251892,
0.3316352367401123,
-0.008514774031937122,
-0.4877218008041382,
0.879145205020904... |
def tch _ isalnum ( * args ) : return _ snap. tch _ isalnum ( * args ) | [
0.4753664433956146,
-1.1821070909500122,
0.5354363322257996,
-0.16455578804016113,
0.01946629397571087,
1.0208061933517456,
-0.025896204635500908,
0.5189988613128662,
-0.3594810664653778,
0.7553471922874451,
-0.54753178358078,
-0.43869271874427795,
-0.10439920425415039,
-0.4939351081848144... |
def validation _ metrics ( self ) : if self. _ validation _ metrics is none : # builds the per - task metrics and losses. self. _ validation _ metrics = { } for name, task in self. task. tasks. items ( ) : self. _ validation _ metrics [ name ] = task. build _ metrics ( training = false ) return self. _ validation _ met... | [
-0.7323977947235107,
0.20903953909873962,
0.2973285913467407,
0.3854656219482422,
-1.0153855085372925,
0.8364185094833374,
0.6886951327323914,
-0.46046093106269836,
-0.7532285451889038,
-0.2440524846315384,
-0.6414467692375183,
-0.2268170267343521,
0.38736242055892944,
0.24958114326000214,... |
def chunk _ version ( fritzing _ version ) : return tuple ( int ( part ) if part. isdigit ( ) else part for part in fritzing _ version. split ( '.') ) | [
-0.4861231744289398,
-0.48319920897483826,
0.43450525403022766,
0.11320196837186813,
0.5111604332923889,
-0.4025041460990906,
-0.08421145379543304,
0.10799416899681091,
-0.35685431957244873,
0.7273738384246826,
-0.708270788192749,
-0.7568086981773376,
-0.4958493411540985,
-0.41809538006782... |
def geturl ( self ) : return self. group. geturl ( ) + \ " events / " + self. uniqueid + " / " | [
0.36295127868652344,
-0.576728880405426,
0.46854186058044434,
0.12430725991725922,
0.33919039368629456,
0.5397647619247437,
0.1491270661354065,
1.241545557975769,
0.13975107669830322,
-0.7427322268486023,
0.30074796080589294,
0.33578264713287354,
-0.3786996304988861,
0.30567631125450134,
... |
def peak _ memory _ mb ( ) : if resource is none or sys. platform not in ('linux ','darwin') : return 0. 0 # todo ( joelgrus ) : for whatever, our pinned version 0. 521 of mypy does not like # next line, but later versions ( e. g. 0. 530 ) are fine with it. once we get that # figured out, remove the type : ignore. peak... | [
-0.32388240098953247,
0.3531683385372162,
0.6335331201553345,
0.300260454416275,
-0.5220901370048523,
-0.47996917366981506,
-0.4564554691314697,
-0.24135109782218933,
0.496906578540802,
0.08254575729370117,
0.23473820090293884,
0.5134810209274292,
-0.7662796378135681,
0.7083476781845093,
... |
def lookup _ build _ dep ( self, depname ) : # error out if we don't have the require dep if not depname in self. build _ deps : args = ( self. name, depname ) msg ='toolset " % s " does not have a package for : " % s "'% args raise exception ( msg ) # return the desired dep! return self. build _ deps [ depname ] | [
-0.6879037618637085,
-0.8000181913375854,
0.5444221496582031,
-0.5983003377914429,
0.0726180374622345,
0.42106443643569946,
0.4141111373901367,
-0.8273290991783142,
-0.01344984583556652,
-0.25558656454086304,
0.7678332924842834,
0.06806840747594833,
-0.10841234028339386,
0.2745057940483093... |
def _ as _ parent ( self, process ) : for k, p in process. _ pipes. items ( ) : if not p. direct : os. close ( p. child ) process. handles [ k ] = os. fdopen ( p. parent, _ fd _ modes [ k ] ) # user doesn't need these del process. _ pipes return process | [
0.2437661588191986,
-1.0506868362426758,
0.6732288599014282,
-0.7873474359512329,
-0.78481125831604,
0.8914320468902588,
0.7195234894752502,
-0.5667603611946106,
-0.24097543954849243,
-0.6995141506195068,
-0.018322281539440155,
-0.4520343244075775,
0.6254918575286865,
0.08890120685100555,
... |
def modify ( ident ) : story = data _ manager. get _ table _ from _ file ( ) for row in story : if row [ 0 ] = = str ( ident ) : data = row return render _ template ( " form. html ", title = " edit story ", data = data, action = " / modify / " + data [ 0 ] ) | [
-0.6082630157470703,
-0.25170019268989563,
0.5006841421127319,
-0.5310326814651489,
-0.16581691801548004,
-0.6270370483398438,
-0.2676317095756531,
0.7013336420059204,
-0.6256868839263916,
-0.21532486379146576,
0.7289632558822632,
-0.7023509740829468,
0.18818919360637665,
0.283725172281265... |
def trnd _ loadtxt ( * args ) : return _ snap. trnd _ loadtxt ( * args ) | [
-0.6543887853622437,
0.8917267918586731,
0.19846691191196442,
-0.571982204914093,
-0.505476176738739,
-0.16011275351047516,
-0.26748016476631165,
-0.006283879280090332,
-1.1332025527954102,
0.20649446547031403,
-1.0921471118927002,
-1.150089979171753,
-0.8361983299255371,
0.007271119393408... |
def in _ pixels ( lon, lat, pixels, nside ) : pix = ang2pix ( nside, lon, lat ) return np. in1d ( pix, pixels ) | [
-0.1300974190235138,
0.08699922263622284,
0.2957378625869751,
-1.3123422861099243,
-0.7035819888114929,
0.2745738625526428,
-1.4243748188018799,
-0.456355482339859,
0.4315072000026703,
0.18952512741088867,
0.09846575558185577,
0.08824522793292999,
-0.8498984575271606,
0.15599755942821503,
... |
def bool2int ( var ) : var _ out = deepcopy ( var ) if isinstance ( var, bool ) : var _ out = int ( var ) elif len ( var ) > = 1 : for i in range ( 0, len ( var ) ) : var _ out [ i ] = int ( var [ i ] ) return var _ out | [
-0.7499338388442993,
-0.02495473064482212,
0.5118853449821472,
0.37772634625434875,
-0.4536195695400238,
-0.20146474242210388,
0.6682743430137634,
0.35693055391311646,
-0.5676287412643433,
0.7206746339797974,
-0.8337973952293396,
0.9190988540649414,
-0.5164657831192017,
-0.1486461907625198... |
def analyse _ text ( text ) : plus _ minus _ count = 0 greater _ less _ count = 0 range _ to _ check = max ( 256, len ( text ) ) for c in text [ : range _ to _ check ] : if c = ='+'or c = ='-': plus _ minus _ count + = 1 if c = ='<'or c = ='>': greater _ less _ count + = 1 if plus _ minus _ count > ( 0. 25 * range _ to... | [
-0.13700635731220245,
-0.025285309180617332,
0.5737733244895935,
-0.16522866487503052,
-1.2042185068130493,
0.09664280712604523,
0.6434442400932312,
-0.20298902690410614,
0.49352213740348816,
-0.5650679469108582,
-0.3357287645339966,
0.33727559447288513,
-0.8226495385169983,
1.048215866088... |
def timestamp _ to _ dotnet _ ticks ( timestamp _ column : union [ str, column ] ) - > column : if not isinstance ( timestamp _ column, ( str, column ) ) : raise valueerror ( f " given column must be a column name ( str ) or column instance ( column ) : { type ( timestamp _ column ) } " ) sc = sparkcontext. _ active _ ... | [
-0.4442959427833557,
0.17644661664962769,
0.4575366973876953,
-0.1732407808303833,
0.4359578490257263,
-0.7068377137184143,
0.6817049980163574,
-0.668409526348114,
1.1413259506225586,
-0.006274096667766571,
-0.35301560163497925,
0.2581859827041626,
0.9435692429542542,
-0.6129634380340576,
... |
def buildplist ( nbiindex, nbitype, nbidescription, nbiosversion, nbiname, nbienabled, isdefault, destdir = _ _ file _ _ ) : # read and parse platformsupport. plist which has a reasonably reliable list # of model ids and board ids supported by the os x version being built nbipath = os. path. join ( destdir, nbiname + '... | [
-0.29171913862228394,
-0.11606048047542572,
0.670650064945221,
0.1389416605234146,
-0.16353090107440948,
0.3713257908821106,
-0.12073273211717606,
0.3729957938194275,
0.05360138788819313,
0.7123425602912903,
-1.4990097284317017,
-0.6980119943618774,
-0.5536073446273804,
0.9863580465316772,... |
def effectiv _ numdata _ points ( self ) : n = self. multiband. numdata _ evaluate ( compute _ bool = self. _ compute _ bool ) num _ param, _ = self. param. num _ param ( ) return n - num _ param - 1 | [
0.02669345773756504,
0.562312126159668,
0.4663897454738617,
0.3100195825099945,
0.2666926085948944,
0.7039581537246704,
0.8449678421020508,
0.8614944815635681,
-0.31211453676223755,
-0.33887699246406555,
-0.6265480518341064,
0.9493755102157593,
-0.313044011592865,
0.5922931432723999,
0.1... |
def save ( self, * args, * * kwargs ) : if not self. transaction _ id : self. transaction _ id = self. _ generate _ transaction _ id ( ) super ( ). save ( * args, * * kwargs ) | [
-0.3249966502189636,
0.48442718386650085,
0.4624297618865967,
0.0421343632042408,
1.0656766891479492,
-0.3695215582847595,
-0.12092064321041107,
0.6345687508583069,
0.052052270621061325,
0.5091429352760315,
-1.139810562133789,
-0.6256512403488159,
-0.4043995440006256,
0.9677038192749023,
... |
def test _ atomic _ hex _ binary _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 5. xsd ", instance ... | [
-0.7008811831474304,
-0.20303098857402802,
0.5529811382293701,
0.5573280453681946,
-0.2719181180000305,
0.44565919041633606,
-0.05825776606798172,
-0.44281578063964844,
-0.00273293349891901,
0.5198457837104797,
-0.7650018334388733,
-0.6617252230644226,
-0.6784197092056274,
0.40736919641494... |
def test _ create _ insert _ query ( self ) : query = " " " use analytics ; create external table if not exists example _ 1 ( id int, count bigint ) partitioned by ( dt string ) location's3n : / / fakebucket / fake / path /'; insert overwrite table example _ 1 partition ( dt ='% ( end _ date ) s') select distinct id, c... | [
0.030898552387952805,
0.303936630487442,
0.5304972529411316,
0.029211610555648804,
0.32998067140579224,
0.1527322232723236,
0.4402894973754883,
0.09426282346248627,
-0.646201491355896,
0.3809283971786499,
-0.02688833326101303,
-0.1194516122341156,
-0.033564332872629166,
-0.1394842118024826... |
def sample _ points _ from _ plane ( p, projected _ pts, iscan, iline ) : p = np. asanyarray ( p ) shifted _ pts = projected _ pts - p [ 0, ( iscan, iline ) ] pts _ diff = p [ 1 : ] - p [ 0 ] # p1 - p0, p2 - p0 mat = pts _ diff. t [ ( iscan, iline ), ] inv = np. linalg. inv ( mat ) s, t = np. dot ( inv, shifted _ pts. ... | [
0.26595795154571533,
-0.6389271020889282,
0.3782511055469513,
0.46581971645355225,
-0.5709154009819031,
0.9574155211448669,
-0.4649774432182312,
0.5359818935394287,
0.058713361620903015,
0.4879825711250305,
0.5377979874610901,
0.07264499366283417,
0.12789343297481537,
-0.4866858422756195,
... |
def cluster _ request ( self ) : return self. _ cluster _ request | [
-0.7576569318771362,
0.3102216124534607,
0.350748747587204,
0.5593854188919067,
0.29934394359588623,
0.06978727877140045,
0.4931252896785736,
-0.3302517235279083,
0.575428307056427,
-0.4273000657558441,
1.2686126232147217,
1.943789005279541,
-0.017354721203446388,
-1.0681594610214233,
0.... |
def transform ( self, x ) : result = [ self. my _ operation ( text ) for text in x ] return pd. dataframe ( result, columns = ['gpe _ cnt ','person _ cnt ','org _ cnt'] ) | [
-0.8447602987289429,
0.8434301018714905,
0.3377651572227478,
0.17061671614646912,
-0.47760695219039917,
-0.20036710798740387,
0.2508312165737152,
0.8305479288101196,
-0.5416580438613892,
-0.3731979429721832,
-0.12312927097082138,
-0.6374573707580566,
-0.45652711391448975,
-0.87123864889144... |
def delete _ image _ file _ on _ update ( sender, instance, * * kwargs ) : try : old _ image = sender. objects. get ( pk = instance. pk ). image except sender. doesnotexist : return false # if old image is the default profile image then it shouldn't be deleted otherwise delete old image if not old _ image. url. endswit... | [
0.19871389865875244,
-0.6604164838790894,
0.6500837802886963,
0.3893708288669586,
0.13347886502742767,
0.7412012815475464,
0.22871315479278564,
0.18912208080291748,
-0.2195138782262802,
0.6986849308013916,
-0.11275401711463928,
-0.9915555715560913,
0.10248612612485886,
0.6822108626365662,
... |
def modulehacker _ register ( obj ) : bredala. _ hackers. append ( obj ) | [
-1.0137284994125366,
0.7999611496925354,
0.29791533946990967,
0.9541056752204895,
0.9794346690177917,
0.5741910338401794,
-0.8209282755851746,
-0.2182518094778061,
0.4272896349430084,
-0.5824944972991943,
-1.3388465642929077,
1.1408432722091675,
-0.001620173454284668,
0.7733638286590576,
... |
def handle _ completed _ callback ( result ) : # todo : this might not be bullet proof here. we copy _ _ log _ processors and then update it at the end # we could be susceptible to exceptions thrown in the middle of this method, though now should. add _ events _ request. close ( ) total _ bytes _ copied = 0 # use the t... | [
-0.4378872513771057,
0.14758367836475372,
0.9069737792015076,
-0.3170735538005829,
-0.6374860405921936,
-0.4640597999095917,
0.6853234171867371,
-0.5927165150642395,
0.35437318682670593,
0.3600907027721405,
-0.22871194779872894,
-0.2752450108528137,
-0.6581225991249084,
0.6354379057884216,... |
def test _ extract _ errors ( self ) : msg ='fatal : password authentication failed for user " wronguser "'result = redshiftenginespec. extract _ errors ( exception ( msg ) ) assert result = = [ superseterror ( error _ type = superseterrortype. connection _ access _ denied _ error, message ='either the username " wrong... | [
0.19855578243732452,
0.2657988369464874,
0.5075389742851257,
-0.05438264086842537,
0.8132997751235962,
-0.019275391474366188,
0.19905619323253632,
0.5880451202392578,
-0.10870764404535294,
-0.8049777150154114,
-0.2424292415380478,
-0.28933748602867126,
0.22445982694625854,
0.18168281018733... |
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none, role : optional [ pulumi. input [ str ] ] = none, token _ id : optional [ pulumi. input [ str ] ] = none ) - >'acltokenroleattachment': opts = pulumi. resourceoptions. merge ( opts, pulumi. resourceoptions (... | [
0.5461283326148987,
-0.46087872982025146,
0.2776983380317688,
-1.3114981651306152,
-0.6002318263053894,
0.1890242099761963,
-0.930584192276001,
-0.9302770495414734,
0.933533787727356,
0.09404055029153824,
0.6443108320236206,
1.739357352256775,
-0.22974719107151031,
-0.5286393165588379,
0... |
def obfuscate _ header _ match ( self, name, original _ value, expected _ obfuscated _ value, header _ obfuscator = headerobfuscator. default _ header _ obfuscator ( ) ) : obfuscated _ value = header _ obfuscator. obfuscate _ header ( name, original _ value ) self. assertequal ( expected _ obfuscated _ value, obfuscate... | [
-0.23195375502109528,
0.20319563150405884,
0.3857956826686859,
0.7880863547325134,
-0.7451273202896118,
0.6998935341835022,
-0.34362584352493286,
-0.10983852297067642,
-0.0490780733525753,
-0.7072811722755432,
-0.5222193002700806,
0.10954706370830536,
-1.0038682222366333,
-0.53780406713485... |
def gdp _ state _ table ( ) : t _ name ='gdp _ state'db _ operator = database ( ) column _ name, column _ data = get _ gdp _ data ( ) column _ list = ['text'] + ['int'] * ( len ( column _ name ) - 1 ) table _ dict = dict ( name = t _ name, column = list ( zip ( column _ name, column _ list ) ), key = column _ name [ 0 ... | [
-0.4837624132633209,
1.1249868869781494,
0.857818067073822,
-0.4725050926208496,
0.2294483184814453,
0.0020076946821063757,
0.45956775546073914,
-0.027420151978731155,
-0.9177468419075012,
0.6275292634963989,
-0.6339902877807617,
-0.6096252799034119,
-0.05555327236652374,
-0.59763270616531... |
def load ( self ) : f = open ( self. fpath + ". py ", " r " ) m = imp. load _ module ( self. name, f, self. fpath + ". py ", [ ". py ", " r ", imp. py _ source ] ) self. _ m = m self. _ _ dict _ _. update ( m. _ _ dict _ _ ) | [
-0.9892957210540771,
-0.28961560130119324,
0.3543793857097626,
-0.9030995965003967,
0.05303660407662392,
0.43216103315353394,
0.27040889859199524,
0.21070894598960876,
0.11390481889247894,
0.2384808212518692,
-1.1112172603607178,
0.15719377994537354,
0.054364778101444244,
-0.13607370853424... |
def random _ secret _ exponent ( self ) : while true : # generate a random 256 bit hex string # is token hex random enough # 32 byte number, so 256 bit random _ hex = token _ hex ( 32 ) # print ( f " \ nhex : { random _ hex } " ) random _ int = int ( random _ hex, 16 ) # print ( f " \ nint : { random _ int } " ) # rand... | [
-0.3653053641319275,
-0.5352433323860168,
0.6083414554595947,
-0.7130810618400574,
-0.6121998429298401,
0.6359768509864807,
-0.40365836024284363,
0.030759362503886223,
0.42790457606315613,
-0.8090035319328308,
-0.5689405798912048,
0.6071317195892334,
-1.092012643814087,
0.15124431252479553... |
def setopponent ( self, op ) : self. opponent = op | [
-0.7573603987693787,
-0.6090712547302246,
0.5348584055900574,
-0.2775859832763672,
-0.5922732353210449,
0.34636032581329346,
0.24352943897247314,
1.081589698791504,
0.1384839415550232,
0.6480756998062134,
-0.8523653745651245,
-0.354439377784729,
0.0646563246846199,
-0.9837793111801147,
0... |
def getrnd ( range = 0 ) : return _ snap. tint _ getrnd ( range ) | [
-0.3604331910610199,
-0.2708108425140381,
0.1357894092798233,
1.3241345882415771,
0.330186665058136,
0.5253854990005493,
-0.13156954944133759,
-0.8088111281394958,
-0.6893635392189026,
-0.9866707921028137,
-0.4675064980983734,
0.9273344874382019,
-1.7761650085449219,
0.9127734899520874,
... |
def _ create _ user ( self, email, password, * * extra _ fields ) : if not email : raise valueerror ('the given email address must be set') email = self. normalize _ email ( email ) user = self. model ( email = email, * * extra _ fields ) user. set _ password ( password ) user. save ( using = self. _ db ) return user | [
-0.024515168741345406,
0.6640397906303406,
0.2900875508785248,
-0.2105420082807541,
0.19196872413158417,
0.5939054489135742,
-0.6180831789970398,
0.595241367816925,
0.037728093564510345,
0.5433290004730225,
-0.7690344452857971,
-0.5911228060722351,
-0.12307975441217422,
-0.5479795336723328... |
def reset ( self ) : for i in range ( len ( self. _ _ encountered _ word ) ) : self. _ _ encountered _ word [ i ] = false | [
-0.4599805474281311,
-0.37036260962486267,
0.22264045476913452,
-1.2407937049865723,
1.0772942304611206,
0.7841407060623169,
1.0214331150054932,
0.21327759325504303,
-1.3140138387680054,
1.1530299186706543,
-0.2491319626569748,
1.731100082397461,
-1.417902946472168,
0.8573453426361084,
-... |
def fitparams ( self, discountcurves ) : | [
0.37907564640045166,
-0.006193454377353191,
0.22603045403957367,
0.7546870708465576,
0.4711141288280487,
0.41339853405952454,
0.7892338633537292,
-0.21740439534187317,
0.030670614913105965,
0.41732552647590637,
-0.4011525511741638,
0.625737726688385,
-0.3305034339427948,
0.6289345622062683... |
def do _ post ( self ) : logger = logging. getlogger ( _ _ name _ _ ) if not self. headers. get ( " user - agent " ) = = " grafana " : logger. info ( " not a grafana post request, ignoring " ) self. _ set _ response ( 400 ) return now = datetime. now ( ) if now. hour < self. server. start _ hr or now. hour > self. serv... | [
-0.8273955583572388,
-0.12057271599769592,
0.933100700378418,
0.1698860377073288,
0.10249804705381393,
-0.17415396869182587,
0.1707826405763626,
-1.0426641702651978,
-0.713994026184082,
-0.573373556137085,
0.6479700207710266,
-0.22114817798137665,
-0.31023818254470825,
0.39146333932876587,... |
def test _ solve _ with _ simple _ input ( self ) : expected = " 1368 " # the sum of 123 + 456 + 789 simple _ input = " 123456789 " size = 3 actual = solve ( simple _ input, size ) self. assertequal ( expected, actual ) | [
0.0494401641190052,
-0.061852555721998215,
0.6128503084182739,
0.3017682731151581,
-0.17819622159004211,
0.5019447803497314,
0.23642146587371826,
-0.36579272150993347,
1.2470725774765015,
-0.7638508081436157,
-1.6542149782180786,
-1.0936535596847534,
-0.4114214777946472,
-0.968952298164367... |
def _ create _ individual _ artist _ dict _ 2 ( self ) : temp _ dict = {'id': self. id,'name': self. name,'genres': self. genres,'city': self. city,'state': self. state,'phone': self. phone,'website': self. website,'facebook _ link': self. facebook _ link,'seeking _ venue': self. seeking _ venue,'seeking _ description'... | [
-1.074840784072876,
-1.1498064994812012,
0.3450409471988678,
-1.1511425971984863,
-1.429402232170105,
0.2710671126842499,
0.2057388871908188,
0.3234241306781769,
0.12558788061141968,
-0.41744962334632874,
-0.9882757663726807,
0.4286338984966278,
-0.1440027803182602,
0.5634894371032715,
0... |
def validate _ email _ addr ( email, err _ obj, err _ key ) : if not email : err _ obj [ err _ key ] ='email address required'return if not re. match ('[ ^ @ ] + @ [ ^ @ ] + \. [ ^ @ ] + ', email ) : err _ obj [ err _ key ] ='invalid email address'return return true | [
-0.8580940365791321,
-0.827639102935791,
0.6536773443222046,
-0.4031744599342346,
-0.8259174823760986,
0.3733058273792267,
0.004507268313318491,
0.9428890943527222,
0.13323736190795898,
0.615998387336731,
-0.24639065563678741,
0.9687575697898865,
0.1231299564242363,
-0.012241323478519917,
... |
def _ clear _ signal _ handlers ( self ) - > none : if len ( self. _ old _ handlers ) < self. _ depth : return old _ handlers = self. _ old _ handlers [ - 1 ] for signum, old _ handler in old _ handlers. copy ( ). items ( ) : signal. signal ( signum, old _ handler ) del old _ handlers [ signum ] self. _ old _ handlers.... | [
-0.5792106986045837,
0.05789218470454216,
0.7043886184692383,
0.23422656953334808,
-0.24496814608573914,
0.5446006059646606,
0.5580389499664307,
-0.5935837030410767,
-0.22817279398441315,
0.4582778513431549,
-0.9107034802436829,
0.8308377265930176,
-0.2660346031188965,
0.5215449333190918,
... |
def generate _ file _ name ( report _ file ) : # if no filename is specified, use the file id instead. file _ name = report _ file ['filename'] or report _ file ['id'] extension = '. csv'if report _ file ['format'] = ='csv'else '. xml'return file _ name + extension | [
0.5708785057067871,
0.13883212208747864,
0.4093020260334015,
0.4963887631893158,
0.6149519085884094,
0.16792941093444824,
-0.610514223575592,
0.8158652186393738,
-0.13372491300106049,
0.16388444602489471,
0.7527297139167786,
-0.9083837866783142,
0.4071899652481079,
0.14977048337459564,
0... |
def plot _ hist _ kde ( y, xlabel, title ='', groups = ('all ', ), bools = none, clrs = ('g ', ) ) : if bools is none : bools = ( [ true ] * len ( y ), ) elif isinstance ( bools, dict ) : dict _ of _ bools = bools. copy ( ) bools = [ ] for g in groups : bools. append ( dict _ of _ bools [ g ] ) # set up figure fig, ax1... | [
0.684255063533783,
0.12200968712568283,
0.8931772708892822,
0.04560823366045952,
-0.800020694732666,
0.12483461946249008,
0.3257277011871338,
-0.06747519969940186,
-0.34856417775154114,
0.252293199300766,
0.5029391646385193,
0.9286613464355469,
0.32279130816459656,
0.021401453763246536,
... |
def get _ entity _ type _ cluster ( corpus _ entity ) : entity _ type _ cluster = defaultdict ( set ) for i, x in enumerate ( corpus _ entity ) : if len ( x ) = = 0 : continue for d in x : entity _ cnt + = 1 entity _ type _ cluster [ d ['entity'] ]. add ( d ['name'] ) for k, v in entity _ type _ cluster. items ( ) : en... | [
-0.37141484022140503,
0.1855858415365219,
0.4870063066482544,
-1.209665060043335,
0.45752158761024475,
0.08747565001249313,
0.45317506790161133,
-0.053932346403598785,
-0.7339297533035278,
1.1003787517547607,
-0.3955979347229004,
0.26472821831703186,
0.028776051476597786,
0.025172017514705... |
def binary _ focal _ loss ( gamma = 2., alpha =. 25 ) : def binary _ focal _ loss _ fixed ( y _ true, y _ pred ) : " " " : param y _ true : a tensor of the same shape as ` y _ pred ` : param y _ pred : a tensor resulting from a sigmoid : return : output tensor. " " " y _ true = tf. cast ( y _ true, tf. float32 ) # defi... | [
0.2513205111026764,
-0.708663821220398,
0.5392422080039978,
-0.16115759313106537,
-0.5818579792976379,
-0.8187960386276245,
0.26319384574890137,
0.40116438269615173,
-0.1175212562084198,
0.5845577120780945,
-0.5022784471511841,
0.7156686186790466,
0.40154004096984863,
0.06223655864596367,
... |
def initiatedevicemanagementrequest ( self, devicemanagementrequest ) : mgmtrequests = apiclient. mgmtrequests % ( self. host ) r = requests. post ( mgmtrequests, auth = self. credentials, data = json. dumps ( devicemanagementrequest ), headers = {'content - type':'application / json'}, verify = self. verify ) status =... | [
-2.1692087650299072,
0.2667415738105774,
0.7455016374588013,
-0.0345592126250267,
-0.6577917337417603,
-0.4165725111961365,
0.14277659356594086,
-0.41319626569747925,
0.08766944706439972,
0.14119702577590942,
0.18538612127304077,
1.1025820970535278,
-1.036478042602539,
0.6145909428596497,
... |
def test _ propensity _ migration _ herb ( self ) : assert self. m. propensity _ migration _ herb = = 0 | [
0.48389431834220886,
-0.05999445170164108,
0.4606478810310364,
2.0318496227264404,
1.3782386779785156,
1.704696774482727,
0.2642606794834137,
0.2811231315135956,
0.21379105746746063,
-0.2107791304588318,
0.5414308905601501,
-0.008032359182834625,
-0.019676832482218742,
-0.03014383837580681... |
def test _ n _ user _ dir ( self ) - > none : # warning : following lists depend on the account under which tests are run defined _ dirs = ['contacts ','downloads ','libraries ','links ','localappdatalow ','roamingtiles ','savedgames ','savedsearches'] for dir _ key in user _ dirs _ windows : if dir _ key in defined _ ... | [
-0.0007596650393679738,
0.14363370835781097,
0.47826749086380005,
1.1501179933547974,
0.19428424537181854,
0.395904541015625,
0.8119117021560669,
-0.08407429605722427,
0.5697156190872192,
0.020487701520323753,
-0.4014153778553009,
-0.12768173217773438,
-0.07945097982883453,
0.8757835626602... |
def test _ mom _ with _ network _ failure ( ) : # get mom ip mom _ ip = ip _ of _ mom ( ) print ( " mom ip : { } ". format ( mom _ ip ) ) app _ def = get _ resource ( " { } / large - sleep. json ". format ( fixture _ dir ( ) ) ) with marathon _ on _ marathon ( ) : client = marathon. create _ client ( ) client. add _ ap... | [
0.815205454826355,
-0.23955664038658142,
0.6850438714027405,
1.0601062774658203,
0.36669138073921204,
0.2464277744293213,
0.5052780508995056,
-0.1676182895898819,
0.27627018094062805,
-0.22981023788452148,
0.0590532012283802,
-0.5015067458152771,
-0.1050378829240799,
0.24041521549224854,
... |
def _ _ le _ _ ( self, other ) : if type ( self ) is not type ( other ) : return notimplemented return other. _ is _ greater _ than _ same _ type ( self ) or self. _ is _ equal _ same _ type ( other ) | [
-0.629559338092804,
-0.12781617045402527,
0.7919825315475464,
-0.21487069129943848,
0.5170130729675293,
0.3418036699295044,
-0.46948716044425964,
-1.2742342948913574,
0.7287296652793884,
0.3400154411792755,
-0.6829549074172974,
0.028930235654115677,
-0.09754513204097748,
0.4992232620716095... |
def test _ list _ decimal _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ length _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 2. xsd ", instance = " nistdata / list / decimal / schem... | [
-0.25163301825523376,
-0.5309802889823914,
0.4705706834793091,
0.6409667730331421,
-0.0823407992720604,
-0.2568131387233734,
0.290996253490448,
0.32188212871551514,
0.033367738127708435,
-0.0054174624383449554,
-1.5075099468231201,
-0.3285517990589142,
0.16107580065727234,
1.04182147979736... |
def unpack _ target ( target : cst. baseexpression, ) - > unpackedbindings : if isinstance ( target, cst. tuple ) : return [ annotationspreader. unpack _ target ( element. value ) for element in target. elements ] else : return target | [
-2.078150987625122,
0.24242699146270752,
0.43460825085639954,
0.7247307896614075,
-0.8602674007415771,
0.05105353146791458,
-0.10274247825145721,
0.1995067149400711,
1.0396735668182373,
0.14601144194602966,
0.48005422949790955,
-0.08090832084417343,
0.2283492237329483,
-0.29251277446746826... |
def dec ( self, key : str ) - > none : if key in self. map : if self. map [ key ] = = 1 : del self. map [ key ] else : self. map [ key ] - = 1 | [
-0.2504558265209198,
-0.03599420189857483,
0.8351718187332153,
0.24865363538265228,
-0.5831580758094788,
0.7557237148284912,
0.39038267731666565,
0.6929304003715515,
0.2529461681842804,
0.4805876910686493,
0.3941915035247803,
0.007044837344437838,
-0.5887360572814941,
0.9287194609642029,
... |
def copy _ s3 ( self, input _ node, dest _ uri ) : if not ( isinstance ( input _ node, s3node ) and isinstance ( dest _ uri, s3path ) ) : raise etlinputerror ('input _ node and uri have type mismatch') # create s3 node for output output _ node = self. create _ s3 _ data _ node ( dest _ uri ) # create new input node if ... | [
-0.11505328863859177,
-0.5070982575416565,
0.8571663498878479,
0.05735097825527191,
-0.9881072044372559,
0.882149875164032,
0.0174427330493927,
-0.025250284001231194,
0.4757246971130371,
0.7928152084350586,
0.7880225777626038,
0.6337393522262573,
-0.24775075912475586,
-1.511987566947937,
... |
def test _ long _ multipage _ query ( client ) : fields = [ " id ", " abc ", " ghi ", " def ", " jkl ", " prs ", " mno ", " tuw ", " zyz ", " abc1 ", " def1 ", " jkl1 ", " prs1 " ] client. sql ('drop table longmultipagequery if exists') client. sql ( " create table longmultipagequery ( % s, % s ) " % \ ( fields [ 0 ] +... | [
-0.1116931289434433,
0.6153504848480225,
0.7569014430046082,
-0.12158196419477463,
0.5549454092979431,
0.31017887592315674,
0.008895570412278175,
0.2382325977087021,
0.2707883417606354,
0.2510582506656647,
-0.47583940625190735,
-0.9876404404640198,
-0.4386996030807495,
0.6246463656425476,
... |
def to _ image _ coords ( self, boxes, dim ) : h, w = dim [ 0 ], dim [ 1 ] box _ coords = [ int ( boxes [ 0 ] * h ), int ( boxes [ 1 ] * w ), int ( boxes [ 2 ] * h ), int ( boxes [ 3 ] * w ) ] return np. array ( box _ coords ) | [
-1.3926005363464355,
-0.34723687171936035,
0.6206730008125305,
-0.06179068610072136,
-0.08103403449058533,
-0.09376200288534164,
-0.22453393042087555,
-0.042674921452999115,
-0.37368252873420715,
0.6843493580818176,
-0.4570609927177429,
0.15269137918949127,
-0.16689862310886383,
-0.2937350... |
def get _ datamodel ( database : database ) : return latest _ datamodel ( database, report _ date _ time ( ) ) | [
0.06273442506790161,
0.8746145963668823,
0.21359595656394958,
0.23630183935165405,
0.9936482906341553,
0.5831602811813354,
-0.5641982555389404,
0.4054698944091797,
-0.47192883491516113,
-0.45881325006484985,
-0.3453305959701538,
-0.2817404270172119,
0.6281100511550903,
0.14362522959709167,... |
def create _ player _ hands ( hands ) : player _ 1 = poker ( hands. split ( ) [ : 5 ] ) player _ 2 = poker ( hands. split ( ) [ 5 : ] ) return player _ 1, player _ 2 | [
-0.3930682837963104,
-0.6690534353256226,
0.5283927917480469,
0.35079196095466614,
-0.0039012504275888205,
0.4232807159423828,
-0.27444353699684143,
-0.7352175712585449,
-0.989827036857605,
0.9785293340682983,
0.08301344513893127,
-0.6358698606491089,
-0.8843031525611877,
-0.49773705005645... |
def rnncrf _ modelinspect ( config, model _ class, target _ dsets, y _ codebook, num _ epochs, wrk _ dir, rank, to _ gpu, memmap, modelstatedict _ path = none, options = { } ) : pid = " { } - { } ". format ( os. getpid ( ), rank ) print ( " process id ", pid ) fdtype, ldtype = get _ tensordtypes ( to _ gpu ) if ( is _ ... | [
-0.6847544312477112,
-0.4388204514980316,
0.6957950592041016,
-0.2963610291481018,
0.028049588203430176,
-0.5390630960464478,
0.11045470088720322,
0.5070776343345642,
-0.4430218040943146,
-0.06364955753087997,
-0.062344688922166824,
0.5584585070610046,
0.4054604470729828,
0.145666465163230... |
def test _ atomic _ qname _ length _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 2. xsd ", instance = " nistdata / atomic / qname / schem... | [
-0.017765812575817108,
-0.6895676851272583,
0.40820878744125366,
0.3229217529296875,
-0.4396410882472992,
0.21845051646232605,
-0.2893911302089691,
-0.29178065061569214,
-0.13129258155822754,
0.40808185935020447,
-0.6991399526596069,
0.15353266894817352,
0.5485807657241821,
0.1336549073457... |
def configure _ optimizers ( self ) - > tuple [ list [ torch. optim. optimizer ], list [ dict ] ] : optimizer = torch. optim. adam ( self. model. parameters ( ), self. lr ) lr _ scheduler = { " scheduler " : torch. optim. lr _ scheduler. lambdalr ( optimizer, lr _ lambda = lambda x : lr _ update ( num _ updates = x, wa... | [
-0.12081320583820343,
-0.20467641949653625,
0.783233642578125,
-0.14547964930534363,
-0.35078150033950806,
-0.5572597980499268,
-0.8762988448143005,
0.5487684607505798,
-0.024567488580942154,
0.14627403020858765,
-0.7147740125656128,
-0.5247220993041992,
0.48226478695869446,
0.940225601196... |
def flowcommand _ list ( options = " 0 " ) : l = " flow " if options = = " usage " : l = [ " flow - - create, \ flow - - sh, \ flow - - create, \ flow - - delete, \ flow - - control, \ flow - - reset, \ flow - - activate, \ flow - - deactivate, \ flow - - show aa, \ flow - - help, \ ", \ ] if options = = " all " : l = ... | [
0.5827852487564087,
-0.9509089589118958,
0.9383540153503418,
0.1804887354373932,
0.2410033941268921,
0.21784965693950653,
0.7123560905456543,
-0.20882366597652435,
1.1436188220977783,
-0.45153316855430603,
-0.5563948750495911,
0.12737120687961578,
-0.1940559297800064,
0.6288132667541504,
... |
def check _ status ( status ) : try : myclusterprops = redshift. describe _ clusters ( clusteridentifier = dwh _ cluster _ identifier ) ['clusters'] [ 0 ] while redshift. describe _ clusters ( clusteridentifier = dwh _ cluster _ identifier ) ['clusters'] [ 0 ] ['clusterstatus']! = status : prettyredshiftprops ( myclust... | [
-0.21906757354736328,
-0.1926431804895401,
0.42201200127601624,
0.2166707068681717,
0.6079956889152527,
0.40077516436576843,
-0.18075251579284668,
-0.3043276369571686,
1.044156551361084,
-0.032356686890125275,
-0.3477812111377716,
1.1543079614639282,
-0.36839425563812256,
0.951068341732025... |
def upd _ user ( ) : global username, email, message, link, link _ name o = codecs. open ( " user / " + email + ". txt ", " r ", " utf - 8 " ) txt = o. readlines ( ) profile _ pic = txt [ 3 ] o. close ( ) link _ name = link _ name link = link message = message return template ( " updatedprofile ", link _ name = link _ ... | [
0.015985529869794846,
-0.5795391798019409,
0.48971831798553467,
-0.4356967806816101,
-0.6869431734085083,
0.588512122631073,
0.6992130279541016,
0.6555207967758179,
-0.6835967302322388,
0.2802547812461853,
-0.5127834677696228,
-0.35768142342567444,
-0.32299384474754333,
-0.7803868055343628... |
def load _ data ( self ) : if self. name = = " cam6 " : data _ root = path ( " / volumes / drudonna / f. e21. fhist _ bgc. f09 _ f09 _ mg17. cmip6 - amip. 001 _ cosp1 / atm / proc / tseries / month _ 1 " ) data _ files = sorted ( data _ root. glob ( f " f. e21. fhist _ bgc. f09 _ f09 _ mg17. cmip6 - amip. 001 _ cosp1. ... | [
0.158543661236763,
-0.5045871138572693,
0.8115538358688354,
-0.18422868847846985,
0.12991969287395477,
-0.0972495973110199,
0.39863699674606323,
-0.5565242767333984,
0.08688021451234818,
-0.25563666224479675,
-0.16229687631130219,
0.3645111322402954,
-0.29745519161224365,
0.708966314792633... |
def upload _ part ( cls, upload _ id, part _ number, data, key ) : resp = cls. current _ bucket. upload _ multipart ( key, upload _ id = upload _ id, part _ number = part _ number, body = data ) if resp. status _ code! = http _ ok _ created : cls. uni _ print ( resp. content ) return false else : return true | [
-0.3864438831806183,
0.13794977962970734,
0.7990949749946594,
0.14194712042808533,
0.364055871963501,
0.7632171511650085,
-1.1222726106643677,
-0.6387766599655151,
-0.43103742599487305,
-0.035592637956142426,
-0.7169543504714966,
-0.44589605927467346,
-1.2515491247177124,
-0.43345612287521... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.