text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def cal _ ssim ( clean, noisy, normalized = true ) : if normalized : clean = clean. add ( 0. 5 ). mul ( 255 ). clamp ( 0, 255 ) noisy = noisy. add ( 0. 5 ). mul ( 255 ). clamp ( 0, 255 ) clean, noisy = to _ numpy ( clean ), to _ numpy ( noisy ) ssim = np. array ( [ compare _ ssim ( clean [ i, 0 ], noisy [ i, 0 ], data ... | [
-0.13347218930721283,
0.2545396685600281,
0.5676590204238892,
0.22293290495872498,
-0.7904861569404602,
-0.43695154786109924,
-0.43494194746017456,
-0.5458183288574219,
0.3879343271255493,
1.1890685558319092,
-0.86407870054245,
0.6607586145401001,
-0.21985459327697754,
0.09764351695775986,... |
def parse _ authorization _ header ( authorization _ header ) : auth _ scheme ='oauth '. lower ( ) if authorization _ header [ : len ( auth _ scheme ) ]. lower ( ). startswith ( auth _ scheme ) : items = parse _ http _ list ( authorization _ header [ len ( auth _ scheme ) : ] ) try : return list ( parse _ keqv _ list (... | [
-0.39695024490356445,
-0.17328989505767822,
0.76413494348526,
1.4422086477279663,
-0.6591517329216003,
-0.7011628150939941,
-0.49757641553878784,
0.19898609817028046,
0.7477617859840393,
1.1537553071975708,
0.3309045433998108,
-0.04426850751042366,
-0.10695069283246994,
0.2997116446495056,... |
async def start _ serving ( self, address = none, sockets = none, * * kw ) : if self. _ server : raise runtimeerror ('already serving') server = dgserver ( self. _ loop ) loop = self. _ loop if sockets : for sock in sockets : transport, _ = await loop. create _ datagram _ endpoint ( self. create _ protocol, sock = sock... | [
-1.128588318824768,
1.1774389743804932,
0.566796064376831,
-0.23642390966415405,
-0.0037332153879106045,
-0.0588347390294075,
0.05960564687848091,
-0.09173325449228287,
0.0008633504621684551,
-0.2595711946487427,
-0.40737879276275635,
1.0007432699203491,
-0.5078526735305786,
0.575858771800... |
def get _ disable _ global _ version _ manager ( _ cls = true ) : return templateversionmanager. get _ disable _ global _ version _ manager ( _ cls ) | [
-0.987293541431427,
-0.32011672854423523,
0.5719054937362671,
0.6327228546142578,
-0.8765409588813782,
1.626251459121704,
0.9631450772285461,
0.32163387537002563,
0.11638243496417999,
-0.025942688807845116,
-1.023270845413208,
0.2796359360218048,
-0.9132665395736694,
0.8799699544906616,
... |
def merge4d ( self, rawdatapath, outdatapath, outname ) : if isinstance ( rawdatapath, np. ndarray ) : rawdatapath = rawdatapath. tolist ( ) header = nib. load ( rawdatapath [ 0 ] ). get _ header ( ) datashape = nib. load ( rawdatapath [ 0 ] ). get _ data ( ). shape nsubj = len ( rawdatapath ) outdata = np. zeros ( ( d... | [
-1.1642924547195435,
-0.17368187010288239,
1.0119205713272095,
0.18221841752529144,
-0.5736759305000305,
0.2717553973197937,
0.3640266954898834,
-0.2951727509498596,
0.14413315057754517,
0.1730334311723709,
-0.2606206238269806,
-0.7346110939979553,
-0.719071090221405,
0.1726580411195755,
... |
def gradiente _ reg ( theta, x, y, lamb ) : m = np. shape ( x ) [ 0 ] n = np. shape ( x ) [ 1 ] h = sigmoid ( np. dot ( x, theta ) ) g = 1 / m * x. transpose ( ). dot ( h - y ) reg = np. ones ( n, ) reg [ 0 ] = 0 reg = ( lamb / m ) * reg * theta return g + reg | [
-0.13931557536125183,
1.0391274690628052,
0.6730926632881165,
-0.736375629901886,
0.8865622282028198,
-0.2165532410144806,
-0.34898459911346436,
0.11772539466619492,
-1.1202961206436157,
0.6331842541694641,
-0.12041033059358597,
0.9774197340011597,
-1.1987498998641968,
0.13061943650245667,... |
def add _ snmp _ v3 _ user ( self, port, username, securityengineid, authkey = none, privkey = none, authprotocol = none, privprotocol = none ) : status = true wdesc = " add snmp v3 user for trap and inform " utils. testcase _ utils. psubstep ( wdesc ) status = ws. add _ user ( port, username, securityengineid, authkey... | [
-0.4552418291568756,
0.2333495020866394,
0.47619789838790894,
0.1482628583908081,
-0.36848193407058716,
1.1875923871994019,
-0.2780369520187378,
-0.1639104187488556,
0.9431285858154297,
-0.01948324404656887,
-0.6515892148017883,
0.4220559895038605,
-1.231573462486267,
-0.2952798306941986,
... |
def transform ( self ) - > tuple [ list [ np. ndarray ], list [ str ], list [ str ] ] : resized _ rgb _ images : list [ np. ndarray ] processed _ files : list [ str ] skipped _ files : list [ str ] resized _ rgb _ images, processed _ files, skipped _ files = read _ and _ process _ images ( path _ to _ source = self. _ ... | [
-0.9293890595436096,
0.3653044104576111,
0.7835423946380615,
-0.24395030736923218,
0.6326907277107239,
-0.13969190418720245,
0.5730469822883606,
0.02340284176170826,
-0.8822576403617859,
0.6640282273292542,
-0.11321710050106049,
-0.016569549217820168,
0.3553577959537506,
-0.031935263425111... |
def test _ atomic _ language _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 2. xsd ", instance = " nistda... | [
-0.4396480619907379,
-1.3091212511062622,
0.5111964344978333,
0.627277135848999,
-0.4316435158252716,
-0.11058671772480011,
0.07113522291183472,
-0.0041022649966180325,
-0.27989739179611206,
0.7070283889770508,
-0.3611772656440735,
0.16673004627227783,
0.7207305431365967,
0.306078433990478... |
def test _ get _ all _ questions ( self ) : response = self. client. get ('/ api / v2 / questions ', data = json. dumps ( self. questions ), headers = self. authheaders ) self. assertequal ( response. status _ code, 200 ) | [
0.09260957688093185,
-0.6223850250244141,
0.43982475996017456,
0.46655699610710144,
0.6228459477424622,
0.9528020620346069,
-1.168040156364441,
0.29789313673973083,
-0.15308953821659088,
-0.526412308216095,
-0.18876375257968903,
0.30526217818260193,
0.3504198491573334,
-0.17468859255313873... |
def genname ( self, suffix = true ) : planet _ name = " " length = random. randint ( 2, 3 ) initial = random. randint ( 0, self. size - 2 ) while length > 0 : while 1 not in self. freq [ initial ] : initial = random. randint ( 0, self. size - 2 ) planet _ name + = self. syllables [ initial ] initial = self. freq [ init... | [
-0.43548381328582764,
-0.15581995248794556,
0.8406872749328613,
-0.5242548584938049,
-0.673401415348053,
1.5632253885269165,
-0.4403163492679596,
0.3128817081451416,
-0.3941943943500519,
-0.19688652455806732,
-0.2185320407152176,
-0.244521826505661,
-0.4369356036186218,
0.4624546468257904,... |
def timed ( f ) : @ wraps ( f ) def wrapper ( * args, * * kwargs ) : import time time _ start = time. time ( ) return _ = f ( * args, * * kwargs ) time _ end = time. time ( ) time _ delta = time _ end - time _ start return time _ delta, return _ return wrapper | [
-0.6123389601707458,
-0.3270638883113861,
1.0097612142562866,
0.08250272274017334,
0.21897879242897034,
0.7771312594413757,
0.18085426092147827,
0.4979632794857025,
-0.4404033124446869,
0.5617755651473999,
-0.8281896710395813,
-0.25924423336982727,
0.34279024600982666,
0.6106595993041992,
... |
def is _ rev _ gte ( left, right ) : def all _ numeric ( l ) : return not l or all ( isinstance ( i, int ) for i in l ) if all _ numeric ( left ) and all _ numeric ( right ) : return left > = right else : for i, ( l _ e, r _ e ) in enumerate ( izip _ longest ( left, right ) ) : if isinstance ( l _ e, int ) and isinstan... | [
-0.2819359302520752,
0.16200092434883118,
1.0503113269805908,
-0.3177981376647949,
-0.29862073063850403,
0.10089851915836334,
-0.8248384594917297,
0.22117803990840912,
-0.45108798146247864,
0.22165797650814056,
-0.2450559288263321,
0.22201873362064362,
-0.977236807346344,
0.261467605829238... |
def getynstr ( * args ) : return _ snap. tbool _ getynstr ( * args ) | [
0.28998634219169617,
0.6937793493270874,
0.18065911531448364,
1.318224549293518,
0.9342366456985474,
0.5132254362106323,
0.8219639658927917,
-1.029295563697815,
-1.0573899745941162,
-0.7559556365013123,
0.07481323927640915,
0.08257562667131424,
-0.5128387808799744,
0.3770347833633423,
0.... |
def zbadaj _ zdj ( image ) : width, height = image. size kolor _ lini = image. getpixel ( ( 0, 0 ) ) w _ 1 = false szer _ lini = 0 szer _ kom = 0 lista _ kolorow = [ ] for y in range ( height ) : for x in range ( width ) : pixel = image. getpixel ( ( x, y ) ) if pixel not in lista _ kolorow : lista _ kolorow. append ( ... | [
-0.4778588116168976,
-0.8852350115776062,
0.8576821684837341,
-0.46156373620033264,
-0.8245794177055359,
0.49820056557655334,
0.3792053759098053,
-0.4562547504901886,
-0.17049165070056915,
0.7065272331237793,
-0.3923875689506531,
-0.8531192541122437,
-0.7512460947036743,
0.7539635300636292... |
def apply _ restriction ( x, y, restriction ) : restricted = [ restriction ( x, y ) for x, y in zip ( x, y ) ] return restricted | [
-0.7979944944381714,
0.2285338193178177,
0.46125391125679016,
0.5644737482070923,
-0.14349664747714996,
-0.4251605272293091,
-1.1869291067123413,
-0.5329535007476807,
0.18825553357601166,
0.7488973140716553,
-0.3801914155483246,
0.42158448696136475,
0.3803654909133911,
-0.569508969783783,
... |
def over _ payment _ credit ( self, over _ payment _ credit ) : self. _ over _ payment _ credit = over _ payment _ credit | [
-0.09982690960168839,
-0.4683275520801544,
0.32207438349723816,
-0.10196229815483093,
-0.9858033061027527,
0.9820421934127808,
-0.1005481705069542,
-0.14818014204502106,
-0.4410955309867859,
0.40312498807907104,
1.2081971168518066,
-0.14436282217502594,
0.285614937543869,
-0.24815575778484... |
def _ ensure _ leading _ sample _ dims ( arrays, sample _ dim = 0 ) : return [ _ ensure _ leading _ sample _ dim ( a, sample _ dim = sample _ dim ) for a in arrays ] | [
1.1597999334335327,
-0.8171764612197876,
0.47616511583328247,
0.9838032722473145,
-0.19658423960208893,
0.49592265486717224,
0.48510563373565674,
-0.5221899151802063,
1.0961929559707642,
0.6504440307617188,
0.4042923152446747,
0.13281451165676117,
0.4243521988391876,
1.1405949592590332,
... |
def write _ data _ hashes ( ) : data _ files = get _ data _ file _ paths ( ) with open ('data _ hashes. txt ','w') as output _ file : for data _ file in data _ files : hash = hashlib. sha1 ( open ( data _ file,'r'). read ( ) ). hexdigest ( ) output _ file. writelines ( " % s, % s \ n " % ( data _ file, hash ) ) | [
0.4206959903240204,
-0.889618456363678,
0.3450250029563904,
0.40337812900543213,
1.2171636819839478,
1.505820870399475,
0.15799272060394287,
1.4044983386993408,
-1.2037475109100342,
0.0035114591009914875,
-0.4091458320617676,
0.023909293115139008,
0.5683342218399048,
-0.20669373869895935,
... |
def set _ checkbox _ off ( self, name ) : selector = self. wait _ for _ element _ found ( name,'select ','previous') self. unselect _ checkbox ( selector ) | [
-0.4725489020347595,
0.0013149717124179006,
0.43769338726997375,
-0.382988840341568,
0.20719747245311737,
0.27314475178718567,
0.9871393442153931,
-0.23537127673625946,
0.06218815967440605,
0.6784691214561462,
-0.801400363445282,
0.6247029304504395,
-0.8075495958328247,
0.05078841373324394... |
def credit _ card _ gateway ( data ) : pass | [
0.19042253494262695,
0.0047522676177322865,
0.21284298598766327,
0.24968145787715912,
0.01683119684457779,
0.16110043227672577,
-0.2007443904876709,
0.730563223361969,
0.25444158911705017,
-0.28506729006767273,
-0.09075318276882172,
0.7694705724716187,
-0.6177104115486145,
0.80699992179870... |
def copy _ citation ( ) : now = time. localtime ( ) data = [ { " id " : " http : / / dx. doi. org / 10. 3133 / ofr20151175 ", " type " : " gis database ", " title " : " geology of the joshua tree national park geodatabase : u. s. geological survey " " open - file report 2015 - 1175 ", " container - title " : " united s... | [
0.20342594385147095,
-0.9257093667984009,
0.9769774079322815,
-0.47954609990119934,
-0.10817290842533112,
0.7551144957542419,
0.8576703667640686,
0.03940068185329437,
-0.30763790011405945,
0.5500651001930237,
-0.411378413438797,
0.2884257137775421,
0.05759137496352196,
-0.0681803971529007,... |
def print _ node ( node ) : print ( " = = = = = = % s id % s : " % ( node. resource _ type, node. id ) ) pp. pprint ( node ) | [
0.22981029748916626,
-0.47823792695999146,
0.5893049240112305,
-1.1281030178070068,
0.16414080560207367,
0.6015537977218628,
-0.640781819820404,
-0.2951720356941223,
0.0867525190114975,
-0.05690518394112587,
0.45271503925323486,
1.4143346548080444,
-0.0463494211435318,
0.16337279975414276,... |
def get ( self, * args, * * kwargs ) : self. write ( self. db. packages ) | [
-1.4504344463348389,
0.11936802417039871,
0.13673900067806244,
-0.32451948523521423,
1.3953583240509033,
-0.25645679235458374,
-0.4775007665157318,
0.0249767005443573,
-0.21405495703220367,
-0.6098248362541199,
-0.3124433755874634,
-0.16817151010036469,
-0.4643074572086334,
0.1798343658447... |
def set _ player _ num _ of _ dealer ( self, dealer _ player _ num ) : for player _ num in range ( len ( self. players ) ) : if player _ num = = dealer _ player _ num : self. players [ player _ num ]. is _ dealer = true self. dealer _ num = player _ num else : self. players [ player _ num ]. is _ dealer = false | [
-1.1567802429199219,
-0.7030907869338989,
0.5485605597496033,
0.6178637146949768,
0.5395331382751465,
-0.28843003511428833,
0.3162136673927307,
0.7008419632911682,
0.2953145503997803,
0.06658430397510529,
-0.27621355652809143,
0.7102348208427429,
-0.14888113737106323,
0.73470139503479,
0... |
def token _ id ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " token _ id " ) | [
1.3847395181655884,
-0.4028588533401489,
0.32955896854400635,
0.24151694774627686,
0.7967652678489685,
0.8638062477111816,
0.21866409480571747,
0.7102058529853821,
0.9052183628082275,
-0.5909999012947083,
0.03188407048583031,
1.198949933052063,
0.5742656588554382,
-0.8427346348762512,
-0... |
def gettracesfor ( self, part ) : if not isinstance ( part, tracedatapart ) : raise typeerror ('part must be a tracedatapart instance') return self. _ raw _ data. get ( part. raw _ field _ name, [ ] ) | [
-0.08287367969751358,
0.16351889073848724,
0.6242555975914001,
-0.5309528112411499,
0.3481975495815277,
1.0067821741104126,
-0.24380508065223694,
-1.1196101903915405,
0.5888285040855408,
-0.3803909718990326,
-0.7976521253585815,
0.37662485241889954,
-0.6156225800514221,
-0.3627935647964477... |
def usable _ songs ( self ) : with self. con : cur = self. con. cursor ( mdb. cursors. dictcursor ) cur. execute ( " select * from songs where songs. usable like 1 " ) res = cur. fetchall ( ) for d in res : d ['file _ path'] = self. unescape ( d ['file _ path'] ) d ['artist'] = self. unescape ( d ['artist'] ) d ['title... | [
-0.90947425365448,
-0.14956194162368774,
0.5591345429420471,
-0.507857084274292,
-0.2547920346260071,
0.47671985626220703,
-0.9289846420288086,
0.8005248308181763,
-1.126168966293335,
0.9840642213821411,
-0.7232820987701416,
-0.14578485488891602,
0.0034856796264648438,
0.30533459782600403,... |
def attempt _ read _ and _ call ( uhandle, method, * * keywds ) : line = safe _ readline ( uhandle ) passed = not _ fails _ conditions ( * ( line, ), * * keywds ) if passed : method ( line ) else : uhandle. saveline ( line ) return passed | [
-0.4707012474536896,
0.3857193887233734,
0.3095909059047699,
0.6908202767372131,
-0.0026076126378029585,
0.32353758811950684,
-0.6461635231971741,
-1.1025965213775635,
0.03875654190778732,
-0.5776323080062866,
0.9899933934211731,
-0.8102249503135681,
-0.5598413348197937,
0.109920434653759,... |
def send _ 2 _ factor ( toaddrs ) : two _ factor = random. randint ( 1000, 9999 ) # generate authentication key # the email that we are currently using is a gmail that was made for # this project. it sends emails for authentication. fromaddr ='pythontest57 @ gmail. com'password ='pythontest5'message = " subject : two -... | [
-0.8365192413330078,
-0.254507452249527,
0.5464115738868713,
-0.23629672825336456,
-0.3718448877334595,
-0.3556616008281708,
-0.23504602909088135,
-0.1641222983598709,
0.1462513953447342,
0.02728356420993805,
-0.5961018800735474,
1.354468584060669,
-0.5312455892562866,
-0.2996577322483063,... |
def test _ list _ decimal _ max _ length _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 1. xsd ", instance = " nistdata / list / deci... | [
-0.25887835025787354,
0.042642492800951004,
0.2897692322731018,
0.8554105758666992,
-0.08293314278125763,
-0.06252051889896393,
-0.3540162444114685,
0.26493409276008606,
1.1010149717330933,
-0.04618920013308525,
-0.9510211944580078,
-0.6493236422538757,
-0.22765113413333893,
0.539935469627... |
def create _ timelapse _ video ( fps, has _ audio ) : image _ files = [ f " { image _ folder } / { img } " for img in sorted ( os. listdir ( image _ folder ) ) if is _ valid _ image ( img ) ] resize _ images ( image _ files ) resized _ images = [ f " { resized _ image _ folder } / { img } " for img in sorted ( os. list... | [
-0.313905268907547,
0.39500874280929565,
0.8430243134498596,
0.7390612363815308,
0.11544761806726456,
-0.34170594811439514,
-0.3668331801891327,
0.028914185240864754,
0.28854915499687195,
0.7217355966567993,
0.41393527388572693,
-0.6622844338417053,
0.7048178911209106,
0.8741703033447266,
... |
def attention _ mask ( x ) : mask = torch. zeros ( len ( x ), len ( x [ 0 ] ), 1, device = device ) for i in range ( len ( x ) ) : try : index = np. where ( x [ i ] = = 1 ) [ 0 ] [ 0 ] mask [ i ] [ index : ] = - np. inf except : pass return mask | [
-0.383825421333313,
-0.37572962045669556,
0.4591006338596344,
0.9507259726524353,
0.309996098279953,
0.10127170383930206,
0.9932612180709839,
-0.1312243938446045,
0.2962905168533325,
0.7009289860725403,
0.29681965708732605,
0.5327408313751221,
-0.2235483080148697,
0.11367952823638916,
0.... |
def assigning _ extensions ( self, links, index, extensions ) : if links [ - 4 : ] in extensions : image _ name = f " { self. folder } / image { index + 1 } { links [ - 4 : ] } " else : image _ name = f " { self. folder } / image { index + 1 }. jpg " return image _ name | [
-0.9850705862045288,
-0.4290594160556793,
0.39415302872657776,
-0.038116682320833206,
-0.058959174901247025,
-0.6427677273750305,
0.051315806806087494,
0.2815874516963959,
0.5586677193641663,
0.2907560169696808,
0.5905550718307495,
0.35016298294067383,
-0.2055482119321823,
0.16529282927513... |
def test _ complex _ assign ( ) : a = ( 1 + 2j ) * physicalquantity ( 1,'v') assert str ( a ) = ='( 1 + 2j ) v ' | [
-0.791915237903595,
-1.8939869403839111,
0.2016000896692276,
0.24441328644752502,
-0.677434504032135,
0.227700874209404,
0.2746945321559906,
-0.22504134476184845,
0.35075703263282776,
-0.023449135944247246,
-0.05905582755804062,
0.010999428108334541,
-0.021951179951429367,
-0.4619409441947... |
def make _ token ( self, newsletter _ recipient ) : return self. _ make _ token _ with _ timestamp ( newsletter _ recipient, self. _ num _ days ( self. _ today ( ) ) ) | [
-0.8757330775260925,
-0.06476129591464996,
0.14937886595726013,
-0.7457824349403381,
-0.6159206628799438,
-0.36529359221458435,
-0.5085716247558594,
-0.02337082102894783,
0.2582348585128784,
-1.2510923147201538,
-0.46031126379966736,
-0.10061457008123398,
0.9943960309028625,
-0.67750692367... |
def isstrin ( self, * args ) : return _ snap. tcha _ isstrin ( self, * args ) | [
-0.4665089249610901,
-0.3809020221233368,
0.2658753991127014,
-0.08520939946174622,
-0.014538267627358437,
0.3711813986301422,
1.0756628513336182,
0.3709013760089874,
-0.39948877692222595,
0.07554332166910172,
-1.1658016443252563,
0.45367661118507385,
-0.8895842432975769,
0.519484460353851... |
def _ _ init _ _ ( self, source : datasource, source _ type : type [ s ], transform : callable [ [ s ], t ], sinks : mapping [ _ sinkhandler, bool ] ) - > none : self. _ source = source self. _ source _ type = source _ type self. _ transform = transform self. _ before _ transform = { sink for sink, do _ transform in si... | [
-0.9200726747512817,
0.47820401191711426,
0.4032154977321625,
-0.7193445563316345,
-0.0522686205804348,
-1.2244877815246582,
0.31221118569374084,
0.29437801241874695,
0.34953561425209045,
-0.774906575679779,
-1.2446224689483643,
0.4185704290866852,
0.5982552766799927,
0.6621330976486206,
... |
def _ two _ pos _ args ( f : typing. callable ) - > typing. union [ int, float ] : if not callable ( f ) : return false required, available, kwargs _ only = 0, 0. 0, false for param in signature ( f ). parameters. values ( ) : if param. kind = = parameter. positional _ only : required + = 1 elif param. kind = = paramet... | [
-0.8057036995887756,
-0.40198957920074463,
0.7580406665802002,
0.20909078419208527,
-0.16717514395713806,
-0.46716615557670593,
-0.3750405013561249,
0.6014835834503174,
-1.1171389818191528,
0.38314154744148254,
-0.5116901993751526,
-0.640053927898407,
0.26301178336143494,
1.458009004592895... |
def write ( self, fname ) : with open ( fname,'w') as f : f. write ('# bundle file v0. 3 \ n') f. write ('{ } { } '. format ( self. num _ cameras ( ), self. num _ points ( ) ) ) for camera in self. cameras : f. write ('\ n'+ str ( camera ) ) for point in self. points : f. write ('\ n'+ str ( point ) ) | [
-0.1460384875535965,
-0.5778096318244934,
0.5231271982192993,
0.1275143176317215,
0.276821494102478,
1.1057918071746826,
0.9684891700744629,
0.6772588491439819,
-0.5120199918746948,
0.2618081569671631,
-0.3049927353858948,
-0.6991376280784607,
0.3015597462654114,
0.27381932735443115,
-0.... |
def test _ moment _ plus ( ) : pytest. debug _ func ( ) base = m ( " 2018 - 02 - 01 " ) # payload assert base + d ( hours = 3 ) = = m ( " 2018 - 02 - 01 03 : 00 : 00 " ) # payload assert base + 23 * 3600 = = m ( " 2018 - 02 - 01 23 : 00 : 00 " ) with pytest. raises ( typeerror ) as err : # payload assert base + m ( " 2... | [
-0.3671302795410156,
-0.37331831455230713,
0.8277870416641235,
-0.0828874334692955,
0.09930696338415146,
0.8702889084815979,
-0.4534909427165985,
-1.200268030166626,
0.6460952758789062,
-0.24869318306446075,
-0.6317346096038818,
0.12860895693302155,
-0.12194662541151047,
0.9560148119926453... |
def argsort _ desc ( scores ) : return np. column _ stack ( np. unravel _ index ( np. argsort ( - scores. ravel ( ) ), scores. shape ) ) | [
-0.5248580574989319,
0.7013143301010132,
0.5928001403808594,
-0.26466768980026245,
0.6151226758956909,
0.36312922835350037,
0.8687968254089355,
-0.5585070848464966,
-0.8356282711029053,
1.0051299333572388,
0.728578507900238,
0.5136796832084656,
0.44439372420310974,
-0.5071116089820862,
-... |
def call _ sites ( args ) : utils. print _ log _ header ( classpath = true ) utils. print _ arguments ( args ) # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # validate inputs # = = = = = = = = = = = = = = = = = = = =... | [
0.2221238613128662,
-0.27482613921165466,
1.3101882934570312,
0.27277594804763794,
0.34431278705596924,
0.477053701877594,
0.830483615398407,
-0.9936010241508484,
0.02874774858355522,
0.3462437391281128,
0.5181122422218323,
0.7132200598716736,
-0.1780882626771927,
0.23413440585136414,
0.... |
def delete _ container ( client, resource _ group _ name, name, * * kwargs ) : return client. container _ groups. delete ( resource _ group _ name, name ) | [
-0.1359502226114273,
0.36616405844688416,
0.2189236879348755,
-0.3110784888267517,
-0.6606744527816772,
-1.1583592891693115,
-0.005979369394481182,
-0.903188943862915,
-0.3034723699092865,
0.34478840231895447,
0.6344320774078369,
0.10749426484107971,
-0.6813331246376038,
0.3505420088768005... |
def loop ( self ) : self. logger. debug ( " entering inf motion command handling loop " ) while true : self. logger. info ( " blocking while waiting for command from queue with id : " + str ( self. qmove _ nav ) ) # signal that we nav is no longer running and is waiting for a goal pose move _ cmd = self. qmove _ nav. g... | [
-0.3468930423259735,
-0.8324964046478271,
0.8007624745368958,
0.009024928323924541,
0.13004054129123688,
-0.27639153599739075,
0.05925343930721283,
-0.6688918471336365,
-0.08522693812847137,
-0.4192439019680023,
0.2720465064048767,
0.45110368728637695,
-0.17125120759010315,
0.2264707386493... |
def tcallbacknotify _ new ( * args ) : return _ snap. tcallbacknotify _ new ( * args ) | [
0.41161879897117615,
-0.4308626055717468,
0.13085296750068665,
-0.27828362584114075,
-0.5628429055213928,
-0.4817505180835724,
0.5339319705963135,
0.3163328170776367,
-1.4307141304016113,
0.1659603714942932,
-1.2717316150665283,
-1.357153058052063,
0.6896762847900391,
0.6509135961532593,
... |
def test _ recipe _ are _ limited _ to _ user ( self ) : other _ user = user. objects. create _ user ( " other @ test. com ", " pass1234 " ) sample _ recipe ( user = self. user ) sample _ recipe ( user = other _ user ) response = self. client. get ( recipes _ url ) recipes = recipe. objects. filter ( user = self. user ... | [
0.6194983124732971,
0.7061407566070557,
0.5731134414672852,
0.7945572137832642,
0.21964727342128754,
0.443386048078537,
-0.2033485621213913,
0.6159095764160156,
0.08449947088956833,
-0.7864516377449036,
-0.4438285529613495,
0.36775508522987366,
0.1269281953573227,
-0.20256519317626953,
-... |
def getgladeprojectcssfilename ( filename, do _ realpath = true ) : search _ lines = txtfile _ func. searchlinesintextfile ( filename, glade _ css _ signature ) if search _ lines : search _ line = search _ lines [ 0 ]. strip ( ) search _ line _ list = [ item for item in search _ line. split ('' ) if '. css'in item or '... | [
0.34313634037971497,
-0.39864978194236755,
0.9553282260894775,
0.43767961859703064,
0.1129184141755104,
0.44385552406311035,
0.43220221996307373,
0.18489184975624084,
-0.6742738485336304,
0.4736000895500183,
0.09476816654205322,
-0.49589380621910095,
-0.03198174014687538,
-0.47533515095710... |
def abnormalreturn ( self, firm, date, t1 _ offset, t2 _ offset ) : dates = list ( self. dates. keys ( ) ) if ( date not in dates ) or ( dates. index ( date ) + t1 _ offset ) < 0 or ( dates. index ( date ) + t2 _ offset ) > = len ( dates ) : return - 1 start _ ind = dates. index ( date ) + t1 _ offset end _ ind = dates... | [
-0.5359247326850891,
-0.48121610283851624,
0.6994596719741821,
-0.14653849601745605,
-0.9093369841575623,
0.5616391897201538,
0.44590693712234497,
-0.0670693889260292,
-0.4293716549873352,
0.170125812292099,
1.1187422275543213,
1.1460859775543213,
0.17854179441928864,
-0.5113192796707153,
... |
def test _ get _ no _ token ( client, session, model ) : response = client. get ( " / models / 1 " ) assert response. status _ code = = 404 | [
-0.6281061768531799,
0.057467058300971985,
0.22200404107570648,
0.01662733033299446,
0.8724550008773804,
0.6861786842346191,
-0.01282372884452343,
-0.46080121397972107,
-0.14071255922317505,
-0.9118821024894714,
-0.947859525680542,
0.3747904300689697,
0.4877324402332306,
-0.585668861865997... |
def col _ tuple ( tmpdir ) : old _ cwd = os. getcwd ( ) my _ col = collection ( tmpdir / " collection. anki2 " ) col _ obj = testcollection ( my _ col, old _ cwd ) try : yield col _ obj finally : my _ col. close ( ) | [
-0.9127644300460815,
-0.9447015523910522,
0.6500234603881836,
-0.37997323274612427,
-0.2766253352165222,
0.5563756823539734,
1.1923840045928955,
-1.1012741327285767,
-1.0653111934661865,
-0.27510714530944824,
-0.10209059715270996,
-0.8414867520332336,
-0.11544648557901382,
-0.2459131926298... |
def finalscreen ( self, score, totalquestions ) : self. canvas. delete ( " all " ) # clear the screen self. canvas. create _ image ( 300, 300, image = self. bimage ) # displaying background image self. canvas. create _ text ( 300, 50, # displaying title of the window text = " your final score ", font = " courier 30 ita... | [
0.0939147099852562,
0.2064281851053238,
0.6835657358169556,
-0.3435094356536865,
0.018738465383648872,
0.1787685602903366,
0.9985800385475159,
-1.1392314434051514,
0.6824239492416382,
0.2877025902271271,
0.7630715370178223,
0.1235630065202713,
-0.2958165109157562,
0.8528006672859192,
0.4... |
def initreseau ( self ) : self. nodes = { i : node ( i, 0. 3, self. verbose ) for i in range ( self. size ) } for i in self. nodes : self. nodes [ i ]. connect ( self. nodes ) | [
0.14277303218841553,
0.8889002799987793,
0.3668615520000458,
-0.5692126750946045,
1.3101454973220825,
-0.524566113948822,
0.7552311420440674,
0.06795595586299896,
-0.3277502954006195,
0.34787943959236145,
-0.6531825661659241,
-0.4152890741825104,
-0.9713876843452454,
-0.7753252983093262,
... |
def _ _ len _ _ ( self ) : return ( self. end - self. start ) | [
-0.34596896171569824,
-0.86314457654953,
0.44652223587036133,
-1.2897188663482666,
0.48195475339889526,
0.8336492776870728,
0.17888197302818298,
0.5663066506385803,
0.13034707307815552,
-0.09970976412296295,
-1.2589915990829468,
-0.3959996700286865,
0.03297833353281021,
-0.661803126335144,... |
def create _ token _ response ( self, request, token _ handler ) : headers = {'content - type':'application / json ','cache - control':'no - store ','pragma':'no - cache ', } try : log. debug ('validating refresh token request, % r. ', request ) self. validate _ token _ request ( request ) except errors. oauth2error as... | [
0.044802337884902954,
-0.8710140585899353,
0.3945528268814087,
0.08237805962562561,
-0.33854585886001587,
-0.2662465274333954,
0.03885665535926819,
-1.0024667978286743,
0.11242984980344772,
-0.29795119166374207,
-0.389861136674881,
0.17554962635040283,
0.7017822265625,
0.009876671247184277... |
def build _ for _ pages ( path ) : messages = [ ] for ( basepath, folders, files ) in os. walk ( path ) : if os. path. basename ( os. path. dirname ( basepath ) ) = = " page " : messages _ js, messages _ py = [ ], [ ] for fname in files : if fname. endswith ( '. js') : messages _ js + = get _ message _ list ( os. path.... | [
-0.46120724081993103,
-0.7543405294418335,
0.788466215133667,
-0.46259811520576477,
0.6889575123786926,
0.011915060691535473,
1.0971516370773315,
-0.817629337310791,
0.5468649864196777,
0.020107420161366463,
0.2554464638233185,
-0.08353684842586517,
0.38855454325675964,
1.1758108139038086,... |
def generate ( number = none, seperator ='', color = true ) : if number! = none : for _ in range ( number ) : print ( seperator. join ( [ choice ( adj ), choice ( noun ) ] ). title ( ) ) else : for _ in range ( 20 ) : print ( seperator. join ( [ choice ( adj ), choice ( noun ) ] ). title ( ) ) if seperator : print ( se... | [
-0.3572176992893219,
0.9470791220664978,
0.6501479148864746,
-0.48327237367630005,
-0.4705955684185028,
0.2128801792860031,
-0.7927579879760742,
-0.36044856905937195,
-0.017672693356871605,
-0.19121406972408295,
-0.13178320229053497,
-0.209341362118721,
0.24517056345939636,
0.8864580988883... |
def _ _ init _ _ ( self, * args ) : _ snap. tuint64 _ swiginit ( self, _ snap. new _ tuint64 ( * args ) ) | [
-1.5711071491241455,
0.9464319944381714,
-0.31073278188705444,
1.1180182695388794,
0.42475375533103943,
-0.5761749744415283,
0.4894181489944458,
0.4353558421134949,
-1.06318199634552,
0.33476731181144714,
0.15263010561466217,
-1.7139012813568115,
-0.24019508063793182,
0.27868926525115967,
... |
def _ _ init _ _ ( self, predictive _ distribution, observations, seed = none ) : super ( gaussianprocessprobabilityofimprovement, self ). _ _ init _ _ ( predictive _ distribution = predictive _ distribution, observations = observations, seed = seed ) | [
0.8027896881103516,
0.5821331739425659,
0.630196213722229,
0.8246272206306458,
-0.12060293555259705,
0.44738680124282837,
0.30480334162712097,
0.8679566979408264,
0.43467977643013,
0.5252643823623657,
0.3387620747089386,
0.35199442505836487,
-0.15074695646762848,
-0.07735823839902878,
0.... |
def value ( self, state ) : num _ conflicts = 0 for ( r1, c1 ) in enumerate ( state ) : for ( r2, c2 ) in enumerate ( state ) : if ( r1, c1 )! = ( r2, c2 ) : num _ conflicts + = self. conflict ( r1, c1, r2, c2 ) return - 1 * num _ conflicts | [
-1.0787278413772583,
0.23792752623558044,
0.8066796660423279,
0.03669828549027443,
0.6435742974281311,
-0.5658676028251648,
0.5601120591163635,
-0.1341174989938736,
0.48744699358940125,
-0.32248738408088684,
-0.42913877964019775,
-0.8939117193222046,
-0.5022704005241394,
-0.385454654693603... |
def get _ original _ scopes ( self, refresh _ token, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.') | [
-0.3390061855316162,
-0.5988988280296326,
0.8325493931770325,
0.4416997730731964,
-0.2509342432022095,
-0.07521068304777145,
-0.21759672462940216,
-1.3841413259506226,
0.5360302925109863,
0.34650424122810364,
0.20564495027065277,
0.8649834990501404,
0.3864485025405884,
0.10645260661840439,... |
def preprocessing ( ) : df = import _ dataset ('fake _ job _ postings. csv') train _ col = " text " valid _ col = " fake " df = df. drop _ duplicates ( subset = [ " description ", " requirements " ], keep = " first " ). reset _ index ( drop = true ) columns = [ train _ col, valid _ col ] index = range ( 0, len ( df ) )... | [
0.06969320774078369,
0.6759821772575378,
0.8645459413528442,
-0.45672887563705444,
-0.464608371257782,
-0.04384453967213631,
-0.3617335855960846,
0.4995311498641968,
-0.43959715962409973,
0.24651296436786652,
-0.003947743680328131,
0.8108472228050232,
0.22212150692939758,
0.249262332916259... |
def contextual _ embeddings ( data, seq _ lengths, insertion _ perm = none ) : # sort by length ( keep idx ) seq _ lengths, idx _ sort = np. sort ( seq _ lengths ) [ : : - 1 ]. copy ( ), np. argsort ( - seq _ lengths ) idx _ original = np. argsort ( idx _ sort ) # original sorting idx idx _ sort = torch. from _ numpy (... | [
0.20391617715358734,
-0.19529680907726288,
0.7341476082801819,
-0.3397478759288788,
-0.7101431488990784,
0.20154543220996857,
0.6512482166290283,
0.3922001123428345,
0.46468761563301086,
0.5414561033248901,
-0.08060144633054733,
0.3109811842441559,
0.004870730452239513,
-0.0696248486638069... |
def _ _ isub _ _ ( self, * args ) : return _ snap. tint _ _ _ isub _ _ ( self, * args ) | [
-0.5680414438247681,
-0.02027742937207222,
0.47941115498542786,
0.48000505566596985,
0.18604697287082672,
0.3043363392353058,
0.20114099979400635,
0.37742850184440613,
-0.4382310211658478,
-0.6498990654945374,
-0.5106752514839172,
0.8082441687583923,
-0.729121744632721,
-0.4857800602912903... |
def computesimilarities ( self, msg ) : simhashcode = simhash ( unicodetoascii ( msg ['description'] ) ) retlist = [ ] for i in range ( len ( self. _ simhashlist ) ) : id = self. _ simhashlist [ i ] [ 0 ] val = self. _ simhashlist [ i ] [ 1 ]. similarity ( simhashcode ) retlist. append ( ( id, val ) ) retlist. sort ( k... | [
-0.1910833716392517,
0.8196035027503967,
0.34732961654663086,
0.18652193248271942,
0.2521306276321411,
0.3091263175010681,
0.005989272613078356,
0.4581628739833832,
0.045279134064912796,
0.6637787818908691,
-0.5911321043968201,
0.1391339749097824,
-1.1955550909042358,
1.047494649887085,
... |
def add ( x, y, name = none ) : with ops. name _ scope ( name, " add ", [ x ] ) as name : x = ops. convert _ to _ tensor ( x, name = " x " ) y = ops. convert _ to _ tensor ( y, dtype _ hint = x. dtype. base _ dtype, name = " y " ) if x. dtype = = dtypes. string : return gen _ math _ ops. add ( x, y, name = name ) else ... | [
-0.33855336904525757,
0.10767771303653717,
0.8799992203712463,
0.07315860688686371,
-0.9754420518875122,
-0.14206109941005707,
-0.8877216577529907,
-1.344265341758728,
-0.07745330035686493,
0.6111690998077393,
0.23074321448802948,
0.8894101977348328,
0.767376184463501,
-0.868701696395874,
... |
def is _ event _ with _ params ( self, event, event _ names, params ) : if'event'in event and event ['event'] in event _ names : for k in params : if k not in event : return false return true return false | [
-0.0625467523932457,
-0.7866146564483643,
0.5593224763870239,
0.543743371963501,
0.1913391351699829,
0.3350653052330017,
-1.509454607963562,
0.5431112051010132,
-0.45189717411994934,
1.4229533672332764,
-0.0014133885269984603,
-0.04736872762441635,
-0.10430613160133362,
1.4069631099700928,... |
def _ get ( self, relative _ url, headers = none, params = none, raise _ on _ error = true ) : if not params : params = { } if not self. _ host : raise apiexception ( " cannot call api. _ host configuration is missing. " ) headers = self. _ regulate _ headers ( headers ) api _ url = self. _ get _ api _ url ( relative _... | [
-0.3922937214374542,
0.2406543344259262,
0.8383913040161133,
0.21052762866020203,
0.049689505249261856,
-0.34206846356391907,
-1.1432751417160034,
-0.4691775441169739,
-0.7602978944778442,
0.5876894593238831,
0.5455175042152405,
0.1234828531742096,
-0.24212130904197693,
-0.1498183757066726... |
def replace _ initializer _ by _ constant _ of _ shape ( onx, threshold = 128, ir _ version = none ) : if isinstance ( onx, functionproto ) : for node in onx. node : if node. op _ type = = " constant " : raise notimplementederror ( f " node { node. op _ type! r } is not handled yet. " ) return onx if isinstance ( onx, ... | [
0.042940277606248856,
-0.11310523003339767,
0.634107768535614,
0.04316573217511177,
-0.7267373204231262,
-0.12810049951076508,
0.8379851579666138,
-0.48774927854537964,
0.347452849149704,
0.4803036153316498,
-0.12398488819599152,
0.3771612346172333,
0.13432104885578156,
-0.2984221279621124... |
def health _ bars ( self ) : " " " dif _ 1 = three number pattern dif _ 2 = three numbers dif _ 3 = 4 four number pattern dif _ 4 = 4 numbers dif _ 6 - 10 = 6 - 10 numbers " " " if self. dif = = 1 : numbers = [ 1, 2, 3 ] random. shuffle ( numbers ) numbers. pop ( 1 ) numbers3 = numbers. copy ( ) numbers. pop ( 1 ) numb... | [
-0.3216266334056854,
-0.013746554031968117,
1.0125985145568848,
0.0758531391620636,
0.49862635135650635,
1.3937419652938843,
1.3337613344192505,
-0.23822790384292603,
0.3848136365413666,
-0.5394588708877563,
-0.47913986444473267,
-0.555784285068512,
-0.5407750010490417,
0.43678003549575806... |
def standard _ model _ branching _ ratio ( self, lepton _ mass ) : return self. fermi _ coupling _ constant * * 2 * self. b _ meson _ mass * lepton _ mass * * 2 / ( 8 * numpy. pi ) \ * ( 1 - ( lepton _ mass / self. b _ meson _ mass ) * * 2 ) * * 2 \ * self. decay _ constant * * 2 * self. v _ ub * * 2 * self. b _ meson ... | [
0.3827964961528778,
0.1082487478852272,
0.6453779935836792,
0.3425164222717285,
-0.3295009136199951,
1.0110535621643066,
-0.48023542761802673,
1.0916813611984253,
-0.6538800001144409,
-0.12078932672739029,
-0.3147602379322052,
-0.5941495895385742,
-0.7491229176521301,
0.46382102370262146,
... |
def testseqorder ( self ) : self. sf. addconsumer ('a') self. sf. buffer _ file. truncate ( ) self. sf. produce ( [ self. e1 ] ) stream = self. sf. consume ('a') seq, _ = stream. _ next ( ) self. assertequal ( seq, 1 ) stream. commit ( ) self. sf. buffer _ file. truncate ( ) self. sf. produce ( [ self. e1, self. e1 ] )... | [
-0.14311042428016663,
-0.04586624726653099,
0.6949865221977234,
0.2556754946708679,
0.6624076962471008,
-0.6876559853553772,
0.4385055899620056,
-0.32358208298683167,
-0.1317359358072281,
0.0023956510704010725,
-0.6267617344856262,
0.00994849856942892,
-0.13918732106685638,
0.3844718933105... |
def dirwav ( q, n ) : if n = = 0 : return pi * * ( 3 / 4 ) * np. exp ( - ( q * * 2 ) / 2 ) * ( ( 2 / np. sqrt ( pi ) ) * np. exp ( q * * 2 ) - q * special. erfi ( q ) ) else : wf = irwav ( q, n - 1 ) return ( 1 / np. sqrt ( 2 * ( n - 1 ) + 2 ) ) * ( ( 2 * ( n - 1 ) + 2 ) * wf + q * dirwav ( q, n - 1 ) - ( q * * 2 ) * w... | [
-0.4173067510128021,
0.31997236609458923,
0.6828723549842834,
-0.6121890544891357,
-0.8509505391120911,
0.004567613825201988,
0.28645825386047363,
0.15697228908538818,
1.0721548795700073,
-0.9177421927452087,
-0.0883512943983078,
0.30405110120773315,
-0.2479051947593689,
0.7554565668106079... |
def strip _ clipboard _ contents ( self, mode ) : try : cl = qapplication. clipboard ( ) t = cl. text ( ) if t and t. strip ( )! = t : # qclipboard. blocksignals not working with qt 5. 15 on windows, so we need the above additional # protection to avoid infinite loop when setting a new clipboard value cl. blocksignals ... | [
-0.0219582486897707,
-0.5889429450035095,
0.5650762319564819,
-0.30985891819000244,
-1.7086416482925415,
0.9431522488594055,
0.2598939836025238,
-0.5029232501983643,
0.16595211625099182,
0.2338963896036148,
-0.4734615683555603,
-0.6058769822120667,
-0.23820972442626953,
0.14365603029727936... |
def storprop _ cdromenabledigitalplayback ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " devinfo ", " devinfodata ", " forceunknown " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.8452016711235046,
0.5405168533325195,
0.5262683033943176,
-0.20008520781993866,
-0.2612687051296234,
0.3265843093395233,
0.9518284797668457,
-0.41743385791778564,
0.13625116646289825,
0.35428449511528015,
-1.1306219100952148,
0.4143435060977936,
-0.8509712219238281,
0.030059628188610077... |
def mafia ( self ) - > bool : return self. role is mafia | [
-0.03189763426780701,
-0.29463425278663635,
0.5105941295623779,
1.0305800437927246,
0.29531964659690857,
-0.13055260479450226,
-0.61240553855896,
-0.36861729621887207,
0.6923484802246094,
-0.17646507918834686,
0.31864064931869507,
0.23529329895973206,
0.05584080144762993,
0.766767263412475... |
def echoprevioussentence ( self, obj ) : try : text = obj. querytext ( ) except notimplementederror : return offset = text. caretoffset - 1 previousoffset = text. caretoffset - 2 if ( offset < 0 or previousoffset < 0 ) : return [ currentchar, startoffset, endoffset ] = \ text. gettextatoffset ( offset, pyatspi. text _ ... | [
0.00019117476767860353,
-0.3267415165901184,
1.0778285264968872,
-0.146085724234581,
-0.5315365195274353,
-0.9343448281288147,
0.12367978692054749,
-0.782156765460968,
0.5418763160705566,
0.35549497604370117,
0.004417416639626026,
-0.0037015529815107584,
-0.44160324335098267,
-0.2020865082... |
def test _ swaps _ taxability ( accountant : accountant, taxable : bool ) - > none : pot = accountant. pots [ 0 ] event _ accountant = pot. events _ accountant event _ accountant. _ process _ swap ( timestamp = timestamp ( 1469020840 ), out _ event = evmevent ( tx _ hash = make _ evm _ tx _ hash ( ), sequence _ index =... | [
0.3221648633480072,
0.36574113368988037,
0.9437955021858215,
-0.2839911878108978,
0.041120581328868866,
-0.22347776591777802,
0.631571352481842,
0.5710817575454712,
0.4443124830722809,
-0.16258904337882996,
0.0326484777033329,
-0.1749049723148346,
0.4180755019187927,
-0.7099018692970276,
... |
def dowhereami ( self, inputevent, basiconly ) : obj = orca _ state. locusoffocus self. updatebraille ( obj ) return self. whereami. whereami ( obj, basiconly ) | [
0.6228752136230469,
-0.7686075568199158,
0.17726020514965057,
-0.07280214130878448,
-0.23418614268302917,
-0.2944003641605377,
0.7457175850868225,
-0.6616545915603638,
-0.00019547675037756562,
0.46713998913764954,
0.3920891284942627,
0.17522801458835602,
-0.511768639087677,
-0.680181264877... |
def mass _ prior _ model _ with _ updated _ priors _ from _ result ( self, result : af. result, unfix _ mass _ centre = false ) : mass = self. _ cls _ to _ prior _ model ( cls = self. mass _ prior _ model. cls ) mass. take _ attributes ( source = result. model. galaxies. lens. mass ) if unfix _ mass _ centre and isinst... | [
-0.48525699973106384,
-0.8393741250038147,
0.4793875813484192,
-0.5623944401741028,
-0.3487696349620819,
0.04380299523472786,
0.1949273943901062,
-0.4865280091762543,
0.45265084505081177,
-0.08689422905445099,
0.09718508273363113,
-0.29558876156806946,
0.19104117155075073,
0.66838240623474... |
def find _ boundary _ fc ( f _ min, f _ max, erb _ scale _ factor = 1 ) : a = 6. 23e - 6 * erb _ scale _ factor b = 93. 39e - 3 * erb _ scale _ factor c = 28. 52 * erb _ scale _ factor am = 0. 5 / ( 700 + f _ min ) bm = 700 / ( 700 + f _ min ) cm = - 0. 5 * f _ min * ( 1 + 700 / ( 700 + f _ min ) ) bv = ( b - bm ) / ( ... | [
0.5377403497695923,
-1.0229763984680176,
1.0307890176773071,
0.4846227765083313,
0.18593746423721313,
-0.43591564893722534,
-0.41458308696746826,
-0.625714898109436,
-0.5799704194068909,
-0.27757778763771057,
-0.76416015625,
0.21567802131175995,
-0.28449511528015137,
0.2207711786031723,
... |
def getyesnostr ( * args ) : return _ snap. tbool _ getyesnostr ( * args ) | [
-0.2253788858652115,
0.680965006351471,
0.1613427847623825,
0.6374867558479309,
0.4167126417160034,
0.5471319556236267,
0.5298527479171753,
-0.8913306593894958,
-1.7027090787887573,
-1.035200595855713,
-0.6809017062187195,
0.23453634977340698,
-0.4108693301677704,
-0.10397277027368546,
0... |
def _ convert _ input _ type _ range ( img : np. ndarray ) - > np. ndarray : img _ type = img. dtype img = img. astype ( np. float32 ) if img _ type = = np. float32 : pass elif img _ type = = np. uint8 : img / = 255. else : raise typeerror ('the img type should be np. float32 or np. uint8,'f'but got { img _ type }') re... | [
-0.8521779179573059,
-0.09833618253469467,
0.6924958229064941,
-0.15150146186351776,
0.21112573146820068,
0.8527154922485352,
0.5494661927223206,
-1.1513601541519165,
0.5412079691886902,
0.37839555740356445,
0.9117905497550964,
0.6624124050140381,
-0.11522208899259567,
1.2103679180145264,
... |
async def send _ group ( self, group _ id, message ) : # check they are in this group if group _ id not in self. groups : raise clienterror ( " group _ access _ denied " ) # get the group and send to the group about it group = await get _ group _ or _ error ( group _ id, self. scope [ " user " ] ) # save message to dat... | [
-0.6444706916809082,
0.4491528868675232,
0.32879117131233215,
0.12412060052156448,
1.0861536264419556,
-0.3316265940666199,
0.13390929996967316,
-0.7934399247169495,
-1.1743003129959106,
0.5469232797622681,
-0.07774879783391953,
1.3252943754196167,
-0.9939836859703064,
1.2126649618148804,
... |
def isnum ( * args ) : return _ snap. tch _ isnum ( * args ) | [
0.028607964515686035,
0.05411260947585106,
0.49853989481925964,
1.0612941980361938,
1.0703158378601074,
0.5971918702125549,
0.6319071054458618,
-0.13505300879478455,
0.19054022431373596,
-0.08159925788640976,
-1.0047134160995483,
-0.44433605670928955,
-0.2958182692527771,
0.641465246677398... |
def test _ list _ entries _ for _ column ( self ) : course _ id = none # change me!! id = none # change me!! r = self. client. list _ entries _ for _ column ( course _ id, id, include _ hidden = none ) | [
0.28849706053733826,
0.30017930269241333,
0.2655973732471466,
0.4121752679347992,
0.8717254996299744,
0.1733013242483139,
0.02440214715898037,
-0.1749686896800995,
0.08919787406921387,
-0.21835781633853912,
-0.8822126984596252,
0.9424338340759277,
0.38725972175598145,
0.6140475869178772,
... |
def plate _ map _ vis ( myseries, cmap ='dflt ', path ='dflt') : num _ cats = len ( myseries. unique ( ) ) cat2num = dict ( zip ( myseries. unique ( ), range ( num _ cats ) ) ) data = myseries. apply ( lambda x : cat2num [ x ] ) if cmap = ='dflt': if num _ cats < 10 : cmap ='tab10'maxcats = 10 else : camp ='tab20'maxca... | [
-0.48188546299934387,
-0.0525670126080513,
0.6366979479789734,
-1.070066213607788,
-1.0025231838226318,
0.3386217951774597,
-0.04770450294017792,
0.30577656626701355,
0.5865021347999573,
-1.0679700374603271,
-0.39902931451797485,
0.6598146557807922,
0.5383256077766418,
-0.18630914390087128... |
def _ _ init _ _ ( self, bulge _ prior _ model : af. priormodel ( lp. lightprofile ) = lp. ellipticalsersic, disk _ prior _ model : af. priormodel ( lp. lightprofile ) = lp. ellipticalexponential, envelope _ prior _ model : af. priormodel ( lp. lightprofile ) = none, light _ centre : ( float, float ) = none, light _ ce... | [
0.2403429001569748,
-0.5150298476219177,
0.8778178095817566,
-0.4211905598640442,
0.3756067752838135,
0.1050892174243927,
0.508271336555481,
-0.3541969656944275,
0.30108168721199036,
-0.3390585482120514,
-0.19557926058769226,
0.21945887804031372,
0.11716251820325851,
0.8425970077514648,
... |
def test _ list _ integer _ enumeration _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 1. xsd ", instance = " nistdata / list / inte... | [
-0.9389370679855347,
-0.7820242643356323,
0.41982346773147583,
0.5253424048423767,
-0.4823370575904846,
-0.2178444266319275,
0.5743024945259094,
0.44943729043006897,
1.020941138267517,
0.8921996355056763,
-1.0977487564086914,
-0.319247841835022,
-0.5781211256980896,
0.9820026755332947,
0... |
def calc _ total _ energy ( self ) : energy = 0 for x in range ( self. _ x ) : for y in range ( self. _ y ) : # gets the on - lattice neighbours for spin ( x, y ) using periodic boundaries neighbours = self. get _ neighbours ( x, y ) for neighbour in neighbours : energy + = - self. _ spins [ y, x ] * neighbour return e... | [
0.22085040807724,
-0.1373094618320465,
0.39399832487106323,
-0.20441408455371857,
-0.5898158550262451,
0.1469498723745346,
0.02512822113931179,
0.6812586188316345,
-0.18934300541877747,
0.7498066425323486,
-0.8009966015815735,
0.17556370794773102,
-1.1317940950393677,
0.06946215778589249,
... |
def plot _ pygac _ runtime _ and _ errors ( cursor, satellite ) : import collections # initialize plot ( figrun, figerr ) = init _ pygacloc _ plot ( ) logger. info ( " read all available pygac processing versions " ) pygac _ versions = get _ pygac _ versions _ dict ( cursor = cursor ) l1b _ dates = list ( ) errors _ di... | [
-0.1627202183008194,
-0.18394272029399872,
0.768764317035675,
-1.030112862586975,
-0.3391931354999542,
-0.21138231456279755,
0.2363061159849167,
-0.6116564273834229,
-0.40793725848197937,
1.0566192865371704,
-0.13146883249282837,
1.1690889596939087,
0.09985716640949249,
1.3249279260635376,... |
def _ update _ loadbalancer _ status ( self, service, timed _ out = false ) : loadbalancer = service. get ('loadbalancer ', { } ) provisioning _ status = loadbalancer. get ('provisioning _ status ', plugin _ const. error ) if ( provisioning _ status = = plugin _ const. pending _ create or provisioning _ status = = plug... | [
-0.16543850302696228,
-1.4332107305526733,
0.5448489785194397,
-0.4651719927787781,
-0.05363296717405319,
0.7119488716125488,
-1.2016805410385132,
0.2989118695259094,
0.1650915890932083,
1.1127345561981201,
-0.3134894073009491,
0.6157476305961609,
-0.8453902006149292,
0.5865116715431213,
... |
def new _ pop ( newborn, aged ) : aged ['persons'] = np. where ( ( ( aged ['type'] = ='hp') & ( aged ['mildep'] = ='y') ), # special case aged ['survived'], # no in migration aged ['survived'] + aged ['mig _ in _ net'] ) # else aged = aged. drop ( ['survived ','mig _ in _ net'], 1 ) pop = pd. concat ( [ newborn, aged ]... | [
-1.0082255601882935,
-0.2814779579639435,
0.5623312592506409,
0.2355092614889145,
0.13245999813079834,
1.0096092224121094,
-1.1077630519866943,
-0.26423048973083496,
-0.8582077026367188,
0.9857890009880066,
0.6281906366348267,
0.5824458599090576,
0.6906355023384094,
0.4752919375896454,
0... |
def cut _ convex ( conv _ hull, range _ cut, dim _ img _ cut ) : cut _ hull = conv _ hull - range _ cut cut _ hull = np. maximum ( cut _ hull, np. zeros ( cut _ hull. shape ) ) cut _ hull = np. minimum ( cut _ hull, dim _ img _ cut [ 1 ] * np. ones ( cut _ hull. shape ) ) # threshold threshold = 300 if np. sum ( cut _ ... | [
-0.28128165006637573,
-0.7394058704376221,
0.8311712145805359,
1.2089523077011108,
-0.6634292602539062,
0.20877403020858765,
0.04257386177778244,
-0.012351654469966888,
0.7146005630493164,
1.1790921688079834,
-0.215304434299469,
1.4324243068695068,
-0.07816827297210693,
-0.4627830088138580... |
def first _ lexicographic _ rotation ( s ) : n = len ( s ) ordering = sorted ( range ( n ), key = lambda i : rotate ( s, i ) ) best = ordering [ 0 ] return best, rotate ( s, best ) | [
0.16608673334121704,
0.5228596925735474,
0.4080881178379059,
-0.07074032723903656,
0.015884889289736748,
-1.5518935918807983,
-0.14160402119159698,
0.021272633224725723,
0.07709884643554688,
-0.061516206711530685,
-0.37018510699272156,
0.025170044973492622,
-0.28253939747810364,
-0.6083274... |
def get _ sroot ( dir _ name ) : code, output, error = run _ cmd _ output ( os. path. join ( dir _ name,'setup. sh'), shell = true ) for line in output. split (';') : line = line. strip ( ) myprint ( line ) if line and line. startswith ('export') : parts = line. split ('= ', 1 ) name = parts [ 0 ]. replace ('export ','... | [
0.2754531502723694,
-0.09150924533605576,
0.9851630330085754,
0.36533939838409424,
-0.7998948097229004,
-0.8848773241043091,
0.7246490120887756,
-0.7075876593589783,
0.09098870307207108,
1.0349072217941284,
0.4773830771446228,
1.1783599853515625,
-1.3901753425598145,
0.5509781837463379,
... |
def go ( self ) : if self. n < = 0 : pygame. mixer. music. pause ( ) self. t. stop ( ) self. n = 1. 0 else : self. n - = 0. 05 pygame. mixer. music. set _ volume ( self. n ) | [
-0.11242252588272095,
0.03408870846033096,
0.44651690125465393,
-0.27659910917282104,
0.5417739748954773,
0.04344477131962776,
0.3931877315044403,
-0.671920895576477,
-1.261535882949829,
0.1348251849412918,
-0.29527145624160767,
-0.3465834856033325,
-0.3911606967449188,
0.2275029718875885,... |
def delete _ state _ and _ output ( self ) : for pathname in [ self. log _ pathname, self. status _ pathname, self. command _ pathname, self. history _ pathname, self. report _ pathname, ] : if os. path. exists ( pathname ) : try : os. remove ( pathname ) except environmenterror, e : print > > sys. stderr, e for pathna... | [
0.8251392841339111,
-0.7481992840766907,
0.4856494665145874,
0.36346808075904846,
-0.05950420722365379,
0.5047025084495544,
1.428993821144104,
0.06419093161821365,
-0.2656748294830322,
-0.4214087128639221,
0.8738658428192139,
-0.2491879165172577,
-0.38769352436065674,
0.6201510429382324,
... |
def mfcc ( audio, sample _ rate, win _ len, freq _ min, freq _ high, method ='single ', fft _ size = 2048, hop _ size = 512, dct _ filter _ num = 14, mel _ filter _ num = 128 ) : # dividing audio on frames with overlap audio _ framed = frame _ audio ( audio, frame _ len = fft _ size, hop _ size = hop _ size, sample _ r... | [
0.33172300457954407,
-0.42783981561660767,
0.9597066044807434,
0.5535632967948914,
-1.1052149534225464,
-0.6165132522583008,
-0.2735733091831207,
0.6455487012863159,
0.12135470658540726,
-0.017896411940455437,
0.4312211573123932,
0.14353497326374054,
1.0854771137237549,
1.4580157995224,
... |
def _ wrap _ ele ( self, block, view, frag, extra _ data = none ) : wrapped = super ( runtime, self ). _ wrap _ ele ( block, view, frag, extra _ data ) wrapped. add _ resource _ url ( self. resource _ url ('js / vendor / jquery - 3. 0. 0. min. js'),'application / javascript ', placement ='head ', ) wrapped. add _ javas... | [
-0.7445661425590515,
0.37453463673591614,
0.577663242816925,
0.11904046684503555,
-0.7088133692741394,
-0.3373466730117798,
-0.16377075016498566,
0.4427495002746582,
0.413021445274353,
-0.16167742013931274,
0.2481095939874649,
0.09569793194532394,
0.42068716883659363,
0.9438889026641846,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.