text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ str ( self ) : latin = windowspath ( u'c : \ \ r \ xe9mi') nonlatin = windowspath ( u'c : \ \ you like \ u203d. txt') # repr ( ) self. assertequal ( repr ( latin ), " windowspath ( u'c : \ \ \ \ r \ \ xe9mi') " ) self. assertequal ( repr ( nonlatin ), " windowspath ( u'c : \ \ \ \ you like \ \ u203d. txt') "...
[ 0.7849278450012207, -1.0508726835250854, 0.6188389658927917, -0.4809945225715637, -0.46824875473976135, 1.1769018173217773, 0.17347709834575653, 0.4287625849246979, -0.026331692934036255, -0.2850342392921448, -0.5115401744842529, 0.3877103328704834, -0.9438549876213074, -0.8323980569839478...
def get _ checksum _ for _ outgoing _ message ( swift _ python _ object ) : swift _ ml = fswiftml. fswiftml ( ) xml = swift _ ml. pyobject _ to _ xml ( swift _ python _ object ) md5sum = hashlib. md5 ( xml ) return md5sum. hexdigest ( )
[ 0.5439558029174805, 0.13062319159507751, 0.618453323841095, -0.5371050238609314, -0.33330413699150085, 0.00040770164923742414, 0.762223482131958, -0.4415520429611206, -0.07210825383663177, -0.29525184631347656, -0.16837286949157715, -0.5195762515068054, -0.01268143393099308, 0.942943155765...
def count _ spikes _ in _ unit _ list ( unit _ list ) : if len ( unit _ list ) = = 0 : raise valueerror ('there must be at least one unit in the list.') n _ spikes = [ ] for unit in unit _ list : if unit is none : n _ spikes. append ( 0 ) else : n _ spikes. append ( unit ['timestamps']. size ) return tuple ( n _ spikes...
[ -0.5442227125167847, 0.5213069319725037, 0.3728587031364441, 0.18017849326133728, 1.5579767227172852, 0.1185668557882309, 0.39464133977890015, 0.5849995017051697, 0.1900598555803299, 0.4863518476486206, -1.456737995147705, -0.6869300007820129, -0.32912513613700867, 1.0351390838623047, -0...
def intersection ( heada, headb ) : lena = getlistlength ( heada ) lenb = getlistlength ( headb ) if lena > lenb : heada, headb = headb, heada # ensure that the linked list with heada is shorter count = 0 while count < abs ( lena - lenb ) : headb = headb. next count + = 1 while heada! = none and headb! = none : if head...
[ 1.1420356035232544, -0.3481026589870453, 1.0706627368927002, -0.4715447723865509, -0.5350145697593689, -1.0362297296524048, 0.2526441216468811, -0.4738394320011139, 0.47570279240608215, 0.1848403364419937, 0.39484915137290955, 0.24893848598003387, -1.0335015058517456, 0.20955531299114227, ...
def test _ graph _ command _ associations _ list ( self ) : pass
[ -0.3129338026046753, -0.20314748585224152, 0.14886429905891418, 0.6950944066047668, 1.2774829864501953, 0.3685821294784546, 1.6241446733474731, -0.805779755115509, 0.16104836761951447, -0.6208657026290894, -0.2778770327568054, 0.1546943634748459, -0.10450472682714462, 0.06355022639036179, ...
def fixed _ ip _ get ( context, id ) : return impl. fixed _ ip _ get ( context, id )
[ -0.7758626341819763, -0.26448360085487366, 0.11140870302915573, 0.49605220556259155, -0.5349957942962646, -1.056349515914917, -0.15381354093551636, -0.685634970664978, 0.23186135292053223, -0.24451380968093872, 0.5597245693206787, 0.4393584132194519, -0.18599097430706024, -1.47584140300750...
def filter _ annotations ( self, image _ group, annotations _ group, group ) : # test all annotations for index, ( image, annotations ) in enumerate ( zip ( image _ group, annotations _ group ) ) : # test x2 < x1 | y2 < y1 | x1 < 0 | y1 < 0 | x2 < = 0 | y2 < = 0 | x2 > = image. shape [ 1 ] | y2 > = image. shape [ 0 ] i...
[ -0.20645461976528168, -0.575893759727478, 0.7219125628471375, -0.49497517943382263, -0.8201737403869629, -0.07627380639314651, 0.6708213090896606, -0.6717835664749146, 0.163269504904747, 0.4026624858379364, 0.7955353856086731, 0.6913440227508545, -0.19645445048809052, 0.03258274495601654, ...
def light _ one _ led ( self ) : self. led. light _ led ( self. led _ nr, self. seconds )
[ 0.9501820802688599, 0.15687285363674164, 0.36711469292640686, -0.20890609920024872, 0.46193382143974304, 0.0405605211853981, -0.015394093468785286, -0.1646403819322586, 0.5630191564559937, -1.0318607091903687, -0.553377628326416, 0.5514143705368042, -0.4178555905818939, 1.2553073167800903,...
async def generate _ file _ url ( self, file _ key : str, root _ url : str, user : t. optional [ baseuser ] = none ) - > str : return " / ". join ( ( root _ url. rstrip ( " / " ), file _ key ) )
[ -0.14998847246170044, -0.19668114185333252, 0.5594024062156677, 1.0156550407409668, 0.0947752371430397, 0.396352082490921, -0.9691013693809509, 1.178690791130066, -1.7809879779815674, -0.07273918390274048, 0.4830801486968994, -0.3024102449417114, -0.00003844919410767034, 0.3493559956550598...
def get _ commerce _ transactions _ history _ buys ( self, token = none ) : # todo : add paging support! return self. _ request ( " commerce / transactions / history / buys ", access _ token = token ) if token else self. _ request ( " commerce / transactions / history / buys " )
[ 0.2105015069246292, 1.2922321557998657, 0.5189761519432068, 0.37603211402893066, 1.2975140810012817, -1.1686089038848877, -0.15289881825447083, 0.10581469535827637, 0.2960308790206909, -0.1257392317056656, -0.12128778547048569, 1.3863164186477661, 0.1070065051317215, 0.29478272795677185, ...
def _ _ init _ _ ( self ) : # construct the connection map internal structure self. _ connections = collections. defaultdict ( lambda : collections. defaultdict ( list ) )
[ -1.0301308631896973, 0.024790989235043526, 0.1735229194164276, -0.2854681611061096, 0.484661340713501, -0.6232480406761169, -0.012183409184217453, 0.7560805082321167, -0.4374334514141083, -0.7643411755561829, -0.886857271194458, -1.033551812171936, -0.6477376818656921, 0.6732057929039001, ...
def _ _ len _ _ ( self ) : return self. size ( )
[ 0.11770204454660416, -0.8839763402938843, 0.31462836265563965, -1.7149684429168701, 0.7010095119476318, 0.1591986119747162, 0.3031453788280487, 0.2543094754219055, 0.9830033183097839, -1.0282013416290283, -1.14131498336792, -0.3454422950744629, 0.3014976382255554, -0.645840585231781, -0....
def list _ split ( t _ list, t _ size ) : new _ length = int ( len ( t _ list ) / t _ size ) for i in range ( 0, t _ size - 1 ) : start = i * new _ length yield t _ list [ start : start + new _ length ] yield t _ list [ t _ size * new _ length - new _ length : ]
[ -0.3005579113960266, 0.10028958320617676, 0.4532988667488098, -0.019825516268610954, -0.25980421900749207, 0.4124394953250885, -0.10304442793130875, 0.9915674328804016, 0.2519102692604065, 1.075813889503479, -1.0474860668182373, -0.5643090009689331, -0.1350981742143631, 0.6809000968933105,...
def _ load _ partitions ( self ) : conditions = { } with open ( self. partition _ def _ path ) as defsource : subpartitions = { } for line in defsource : matches = re. match ('( [ ^ : ] + ) : * (. + ) ', line. strip ( ) ) if matches is none : continue name = matches. group ( 1 ) condition _ text = matches. group ( 2 )....
[ -0.0015045320615172386, 0.09748383611440659, 0.5491456389427185, -0.40127313137054443, -0.8648926019668579, -0.3902127742767334, -0.4277978241443634, 1.144891381263733, -0.34093818068504333, 0.5245662927627563, -0.2977527379989624, 0.01149503979831934, -0.183800607919693, -0.45707175135612...
def get _ distribution ( self, obs : th. tensor ) - > distribution : features = super ( ). extract _ features ( obs, self. pi _ features _ extractor ) latent _ pi = self. mlp _ extractor. forward _ actor ( features ) return self. _ get _ action _ dist _ from _ latent ( latent _ pi )
[ -0.21933993697166443, -0.1879311501979828, 0.31182780861854553, 0.12235522270202637, 0.10353706032037735, 0.14805753529071808, 0.30573296546936035, 0.7170141339302063, 0.5289837121963501, -0.21278207004070282, -0.10751929134130478, -0.1552915871143341, 0.8921607732772827, -0.71427631378173...
def test _ invalid _ image _ upload _ fail ( self ) : url = recipe _ image _ upload _ url ( self. recipe. id ) res = self. client. post ( url, {'image':'invalid - image'}, format ='multipart') self. assertequal ( res. status _ code, status. http _ 400 _ bad _ request )
[ -0.6488573551177979, 0.5371601581573486, 0.7923332452774048, 0.5684546232223511, 0.3529420495033264, 0.2806088924407959, -1.2266814708709717, 0.31849369406700134, -0.3576895296573639, -0.1782102733850479, -0.36604079604148865, -0.3150497078895569, -0.4186130464076996, 0.9529576897621155, ...
def _ get _ config ( config _ file = none ) : _ config _ file = expandvars ('$ pypint _ config') if config _ file is none else config _ file if _ config _ file = ='$ pypint _ config': # default config file location has not been overridden by user # - > taking default _ config _ file = expanduser ('~') +'/. pypint. conf...
[ 0.3878856599330902, -0.5106144547462463, 0.754486083984375, 0.8249177932739258, 0.3742373585700989, 0.05161821097135544, 0.5372203588485718, 0.09461584687232971, -1.2987934350967407, 0.3716579079627991, -0.07401219010353088, -0.4923778474330902, 0.3115735352039337, 0.8026617169380188, 0....
def show _ esn _ widevine _ dialog ( ) : from resources. lib. kodi. ui. xmldialog _ esnwidevine import esnwidevine return show _ modal _ dialog ( false, esnwidevine,'plugin - video - netflix - esn - widevine. xml')
[ -0.15486939251422882, -0.47021880745887756, 0.4365624487400055, 0.0014286258956417441, -0.45395511388778687, -1.056733250617981, -0.7392017841339111, 0.9051494598388672, 1.1675677299499512, 0.624237060546875, 0.20822922885417938, 0.7124612331390381, 0.14458709955215454, -0.1034824177622795...
def combine _ slices ( slice1, slice2, length ) : beg1, end1, step1 = slice1. indices ( length ) beg2, end2, step2 = slice2. indices ( length ) if step1 < 0 or step2 < 0 : raise valueerror ( " combine _ slices does not support slices with negative step " ) if beg2 > = end1 or end2 < = beg1 : return slice ( 0, 0, 1 ) be...
[ -0.3564341068267822, -0.807545006275177, 1.0216783285140991, 1.0561472177505493, -0.7971893548965454, 0.024603867903351784, -0.21120379865169525, -0.3707043528556824, -0.14360927045345306, 0.13717278838157654, 0.20504632592201233, 0.5346770882606506, -0.27352625131607056, -0.37271553277969...
def configure _ root _ logger ( level = logging. info ) : formatter = " % ( asctime ) s % ( levelname ) - 8s [ % ( name ) s ] % ( message ) s " logging. basicconfig ( level = level, format = formatter )
[ 0.04969650134444237, -0.8271474242210388, 0.7392953038215637, -0.2986648976802826, -1.0389213562011719, -0.33403444290161133, -1.0589829683303833, -0.23106268048286438, -0.37060245871543884, -0.18026840686798096, -0.20225198566913605, 0.11086880415678024, 0.15294450521469116, 2.28446984291...
def mac _ addr ( address ) : # print (': '. join ('% 02x'% compat _ ord ( b ) for b in address ) ) return''. join ('% s'% format ( compat _ ord ( b ),'0 > 8b') for b in address )
[ -0.32367897033691406, -0.8635057806968689, 0.6382145881652832, -0.4593048691749573, -0.9380819201469421, 0.42665648460388184, -0.4745023548603058, 0.09397055953741074, 0.825631856918335, 0.09145104885101318, 0.7063613533973694, 1.0079405307769775, 0.1482880562543869, 0.4601888954639435, ...
def is _ vector ( key ) : vec = false for tag in ('aa ','uu ','bb ','jj ','upot ','urot ','vort') : if key in tag : vec = true return vec
[ -0.5543047189712524, 0.0503244549036026, 0.433721125125885, -0.1401766985654831, -0.2916635274887085, 0.5471928119659424, -0.5213354229927063, 0.1343933492898941, -0.36353614926338196, 0.9567579627037048, -0.46433040499687195, -0.008453595452010632, -0.2495690882205963, 0.5672182440757751,...
def incident _ cells ( self, dart, degree, incidentdegree ) : results = [ ] alphas = range ( 3 ) alphas. remove ( degree ) incidentalphas = range ( 3 ) incidentalphas. remove ( incidentdegree ) marked = set ( ) for d in self. orbit ( dart, alphas ) : if not d in marked : results. append ( d ) marked | = set ( self. orb...
[ -0.4032609760761261, 0.5301244258880615, 0.41533634066581726, -0.07163017243146896, 0.8094422221183777, -0.26045340299606323, 0.024465667083859444, 0.047492798417806625, -0.4803222119808197, 0.4047638475894928, 0.9037579298019409, 0.20897340774536133, -0.04859507083892822, 0.08243156224489...
def update _ lr ( self ) : lr _ dict = self. cnf. train _ opts. get ( " lr _ steps ", { } ) lr _ epochs = list ( lr _ dict. keys ( ) ) lr = self. optimizer. param _ groups [ 0 ] [ " lr " ] if len ( lr _ epochs ) > 0 : assert len ( self. optimizer. param _ groups ) = = 1, " lr dicts not supported with multiple param gro...
[ -0.16078856587409973, -0.38881316781044006, 0.46859031915664673, -0.1197192519903183, -0.20273126661777496, 0.6355689167976379, -0.38293614983558655, 0.054755799472332, -1.1755681037902832, 1.1539047956466675, 0.07792548090219498, 0.6983445882797241, -0.691719651222229, 1.3908441066741943,...
def input _ to _ torch _ tensor ( self, x, device, mode ='inference ', force _ no _ preprocessing = false, sample _ ids = none ) : # fixme method is identical to the one used by the mnist dataset. if self. _ augment _ inputs and not force _ no _ preprocessing : if mode = ='inference': transform = self. _ test _ transfo...
[ -0.7663000226020813, 0.20007240772247314, 0.26443859934806824, -0.5146026611328125, 0.07824604958295822, 0.32989737391471863, 0.37522685527801514, 0.31416237354278564, -0.1138610914349556, 0.015516712330281734, -0.8027746081352234, 0.8211860060691833, 0.4896675646305084, -0.007960033603012...
def gethandle ( self ) : return _ dico. dico _ dictionaryoftransient _ gethandle ( self )
[ 0.08500125259160995, -0.11853514611721039, 0.33088380098342896, -1.0824792385101318, 0.9004300236701965, 0.46158507466316223, 0.35832735896110535, -0.3198709785938263, -0.23260389268398285, -1.1478708982467651, 0.3644493520259857, -1.0375348329544067, -0.6538521647453308, -0.72812348604202...
def f ( self, x, u ) : x1, x2 = x theta _ dot = x2 theta _ ddot = self. grav / self. l * np. sin ( x1 ) - self. mu / ( self. m * self. l * * 2 ) * x2 + 1. / ( self. m * self. l * * 2 ) * u return np. array ( [ theta _ dot, theta _ ddot ] )
[ -0.2412174791097641, -0.23295003175735474, 0.4132724702358246, -0.34880828857421875, -0.5429644584655762, 0.5020085573196411, 0.27852120995521545, 0.3440544009208679, -1.000494360923767, -0.5568984746932983, -0.036648817360401154, 1.331635594367981, 0.3438822627067566, -0.2935561239719391,...
def worker _ socket ( context, poller ) : worker = context. socket ( zmq. dealer ) # dealer identity = " work : % 04x - % 04x " % ( randint ( 0, 0x10000 ), randint ( 0, 0x10000 ) ) worker. setsockopt ( zmq. identity, identity ) poller. register ( worker, zmq. pollin ) worker. connect ( worker _ host ) worker. send ( pp...
[ -0.9112189412117004, -0.057010844349861145, 0.7313025593757629, -0.20657500624656677, -0.33655551075935364, 0.2196781188249588, -0.2583160102367401, -0.5770938396453857, 0.6043907999992371, -0.25646764039993286, -0.7527654767036438, -0.2709643542766571, -1.0333101749420166, -0.188471809029...
def last _ modified _ by _ type ( self ) - > optional [ str ] : return pulumi. get ( self, " last _ modified _ by _ type " )
[ 0.7330033779144287, 0.22814111411571503, 0.7114788293838501, 0.07113843411207199, 0.9002352356910706, 0.5063232779502869, 0.3435506522655487, -0.8300971984863281, 0.8467540740966797, 0.5242961049079895, 0.09136766195297241, 0.32278522849082947, 0.01656162180006504, -0.3848811089992523, -...
def account _ ledger ( self, name, start = date. min, end = date. max ) : act = self. findact ( name ) return act and accountledger ( act, start, end )
[ 0.22847341001033783, -1.16981840133667, 0.31298068165779114, 0.061971958726644516, -0.8265523314476013, 0.39919158816337585, 0.4434448480606079, -0.47188863158226013, 0.39326012134552, 0.12103629112243652, 0.7441549897193909, 1.4026249647140503, 0.4040420651435852, -0.293808251619339, -0...
def _ _ init _ _ ( self, dbh, address ) : assert isinstance ( address, emailaddress ) self. _ addr = address self. _ dbh = dbh self. _ gid = get _ gid ( self. _ dbh, self. _ addr. domainname ) if not self. _ gid : raise rerr ( _ ( " the domain'% s'does not exist. " ) % self. _ addr. domainname, no _ such _ domain, ) se...
[ 0.31708040833473206, 0.6613165140151978, 0.5371587872505188, -0.8768274188041687, -0.09380027651786804, -0.13566946983337402, -0.06645190715789795, 0.5798163414001465, 0.30377960205078125, 0.2195976823568344, -0.20246165990829468, 1.6844886541366577, 0.2695672810077667, 0.1226583793759346,...
def table _ all _ cells ( phototag _ data ) : print'exp _ name id latency jitter mean + sd failure'for i in range ( len ( phototag _ data. cell _ info ) ) : print ( phototag _ data. cell _ info [ i ] [ 0 ] +'' + str. format ('{ 0 :. 2g } ', phototag _ data. cell _ info [ i ] [ 1 ] ) +'' + str. format ('{ 0 :. 2g } ', p...
[ 0.6526375412940979, -0.4205783009529114, 0.8940815329551697, 0.1547250598669052, -0.4346509277820587, 0.010355472564697266, -0.4313558042049408, -0.39795809984207153, -0.7200433611869812, 0.2220155894756317, 0.2710097134113312, 0.5024857521057129, 0.921062707901001, 0.8675217032432556, -...
def get _ base _ line _ index ( self ) : if self. alpha _ has _ supers ( ) : return 1 return 0
[ -0.009859167970716953, -0.6069783568382263, 0.34094294905662537, 0.7194814682006836, 0.6309479475021362, 1.2491347789764404, 0.18991276621818542, 0.6350180506706238, -0.5431306958198547, -0.5885955095291138, -0.3488728106021881, 0.7075831294059753, -0.8579300045967102, 0.5866613984107971, ...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, entryinvitationitem ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _
[ -0.5804052948951721, -0.23382049798965454, 0.45956411957740784, 0.39853161573410034, -0.27364468574523926, 0.8723838925361633, -0.3399932086467743, 0.24178138375282288, 0.6362064480781555, 0.48874810338020325, -0.9492819309234619, -0.1969602257013321, -0.4096061587333679, -0.30847159028053...
def maxpresent _ mincost ( mydict, tup, tschedule ) : presenter = [ ] for pres in combinations ( mydict, 3 ) : thour = sum ( int ( mydict [ i ] [ 0 ] ) for i in pres ) tcost = sum ( int ( mydict [ i ] [ 1 ] [ 1 : ] ) for i in pres ) presenter. append ( ( pres, thour, tcost ) ) mydict ['presenter'] = presenter output = ...
[ -0.7155857682228088, -0.14214777946472168, 0.8561761975288391, -0.9123932719230652, -0.681246280670166, 0.01651725545525551, -0.4624776244163513, 1.3009583950042725, 0.041791755706071854, 0.5352627038955688, -0.7465610504150391, -1.000176191329956, 0.2603161931037903, -0.030492359772324562...
def mk _ dir _ if _ not _ exits ( self, file _ name, init _ required = true ) : file _ directory = os. path. dirname ( file _ name ) self. mk _ dir _ recursive ( file _ directory + " / ", init _ required )
[ -0.8351402282714844, 0.2805599272251129, 0.4833642244338989, 0.46179965138435364, -0.1812429577112198, 1.4204981327056885, 0.3885219395160675, 0.6206363439559937, -0.36366593837738037, -0.8178446888923645, 0.18160153925418854, -0.43486711382865906, -0.17525142431259155, 0.7245843410491943,...
def log ( info ) : with open ('log. txt ','a') as f : f. write ('\ n { } '. format ( info ) )
[ 0.6613057255744934, -0.9725376963615417, 0.5039305686950684, -0.23084601759910583, 0.3154549300670624, 1.79002845287323, -0.2778455913066864, 0.7283312082290649, -0.508417010307312, -0.2575673460960388, -1.0744671821594238, 0.02732216939330101, 0.32657548785209656, 0.06653746217489243, 0...
def set _ duplicated ( self ) - > bool : return self. redis. set ( self. redis _ payload, 1, ex = 5 * 60 )
[ -0.5811461806297302, 1.251889944076538, 0.5809096693992615, -0.4335422217845917, 0.3206992745399475, 0.04471331462264061, -0.6845816373825073, -1.2935608625411987, 0.20014435052871704, 0.8549861311912537, -1.4446419477462769, 0.06567957997322083, -0.9341633915901184, 0.3709827959537506, ...
def storeget ( self, order _ id ) : response = requests. get ( self. url + str ( order _ id ) ) logger. info ( " { } { } { } ". format ( response, order _ id, response. json ( ) ) ) return response
[ -0.4694119393825531, -0.8439825773239136, 0.3923240900039673, -0.46011632680892944, 0.33721426129341125, -0.8111103177070618, -1.3734362125396729, -0.7641916871070862, 1.0108511447906494, -0.3111198842525482, -0.4176819324493408, 0.9539220929145813, -0.5812753438949585, 0.12881061434745789...
def begin _ flashing ( self, variable, mode ) : # what ( state ) : string variable, either'pos'or'neg'if variable > 0 : self. flashing _ timer = variable if mode = ='pos': self. font _ color = ( 0, 255, 0 ) self. flashing _ state = self. font. render ('+ ', true, ( 0, 255, 0 ) ) if mode = ='neg': self. font _ color = (...
[ 0.17177508771419525, 0.09231369942426682, 0.6373046040534973, -0.9684048891067505, -0.9235098958015442, 0.28824248909950256, -0.45096132159233093, 0.16141127049922943, 0.6318373680114746, -0.001297804992645979, -0.7627679705619812, 0.6811878681182861, 0.5076751708984375, 1.5226902961730957...
def remove _ constant _ data ( func _ memdep, ro _ data _ json ) : logger. info ( " start to remove constant global variables from function dependency... " ) _ func _ memdep = { } for func, dependency in func _ memdep. items ( ) : gv _ set _ old = dependency [ " variables " ] gv _ set _ new = set ( ) for gv in gv _ set...
[ -0.6496203541755676, -0.31178519129753113, 0.7220087051391602, -1.2354921102523804, -0.7512252926826477, 0.23623701930046082, -0.10074931383132935, -0.0070754773914813995, -0.32255154848098755, 0.759280800819397, 0.007914186455309391, 0.8285118937492371, -0.5033819675445557, 0.518239140510...
def test _ qlibrary _ instantiate _ rectangle ( self ) : design = designs. designplanar ( ) try : rectangle except exception : self. fail ( " rectangle failed " ) try : rectangle ( design, " my _ name " ) except exception : self. fail ( " rectangle ( design, \ " my _ name \ " ) " ) try : rectangle ( design, " my _ name...
[ -0.09679330885410309, -0.030501212924718857, 0.5351764559745789, -0.3770795166492462, 0.10258306562900543, 0.9097891449928284, 0.48334410786628723, -0.46389371156692505, 0.2882903516292572, -1.1199815273284912, -0.22817468643188477, -0.6550403833389282, -0.2293478101491928, 0.1803001761436...
def list _ resources ( ) - > list [ str ] : raise notimplementederror
[ -0.1680230051279068, -0.4511691927909851, 0.46166670322418213, -0.14797300100326538, 0.26827049255371094, 0.18999682366847992, -0.7069997191429138, 0.571058452129364, 0.8383492827415466, 0.6023470163345337, -0.28714388608932495, -0.18791700899600983, 0.634395956993103, 0.4734925329685211, ...
def get _ groups _ for _ instructor ( self, svc, course : course, group _ set _ id ) - > optional [ list ] : # pragma : nocover return none
[ -0.8112486004829407, 0.9286092519760132, 0.04537399113178253, 0.15984860062599182, 0.5480144619941711, -0.59953373670578, -0.07711832970380783, -1.4478849172592163, -0.3012102246284485, 0.18917839229106903, 0.5771228075027466, 0.5112255215644836, -0.7078204154968262, -0.166632741689682, ...
def song _ liked _ by _ user ( self, obj ) : request = self. context. get ('request') user = request. user if user. is _ anonymous ( ) : from django. contrib. auth import get _ user _ model user = get _ user _ model ( ). objects. get ( username ='admin') # checking for user / band the session is _ band, band _ id = che...
[ 0.40613532066345215, -0.2761128544807434, 1.021761417388916, 0.3015345633029938, -0.2267482876777649, 1.3431321382522583, -0.030916227027773857, -1.1355040073394775, 0.6840815544128418, 0.4164731800556183, 0.3834405243396759, 0.8976942896842957, -0.5392662286758423, 0.2823207378387451, 0...
def cpre _ 1 ( antichain, graph, nbr _ functions, max _ value ) : if antichain. incomparable _ elements = = [ ] : return antichain cur _ antichain = antichain ( comparator _ generalized, intersector _ generalized ) for node in graph. get _ nodes ( ) : if graph. get _ node _ player ( node ) = = 1 : first _ iteration = t...
[ -0.06774063408374786, 0.5578119158744812, 0.7625179886817932, 0.4461534321308136, 0.41654154658317566, 0.07486623525619507, 0.740824282169342, 0.6837474703788757, -0.3649720549583435, 0.06416134536266327, 0.23654095828533173, 0.317666620016098, -1.3494021892547607, 0.2312040627002716, 0....
def test _ onelementnothandshake ( self ) : handshakes = [ ] streamerrors = [ ] xs = self. xmlstream xs. authenticator. onhandshake = handshakes. append xs. sendstreamerror = streamerrors. append element = domish. element ( ('jabber : component : accept ','message') ) xs. authenticator. onelement ( element ) self. asse...
[ -0.19597724080085754, 0.9451996088027954, 0.27965840697288513, 0.423164039850235, -0.27381157875061035, 0.8646577000617981, 0.13028593361377716, -0.22300972044467926, 0.5719051957130432, -0.32853636145591736, 0.3593691289424896, -0.3041169345378876, -0.8351114988327026, 1.0205885171890259,...
def network _ delete _ safe ( context, network _ id ) : return impl. network _ delete _ safe ( context, network _ id )
[ 0.05689798295497894, 0.3846336007118225, 0.01900547742843628, 0.12486331164836884, 0.8748488426208496, -0.4260033369064331, -0.12924352288246155, -0.7996542453765869, 1.4223089218139648, 0.07570938020944595, 0.24569076299667358, -0.5285824537277222, -0.3079296350479126, -0.4525207579135895...
def get _ scm _ config ( ) : import textwrap import subprocess import pathlib import setuptools _ scm version = setuptools _ scm. get _ version ( ) try : gitrev = subprocess. check _ output ('git rev - parse - - short head '. split ( ), encoding ='utf - 8') gitrev = gitrev. strip ( ) except subprocess. calledprocesserr...
[ -0.16951265931129456, -0.2805396318435669, 0.6192073822021484, 0.3377218544483185, 0.4725039303302765, -0.7084664702415466, -0.35311898589134216, 0.49499887228012085, -1.3513073921203613, -0.06856780499219894, -0.7425922155380249, 0.03841664269566536, 0.008540475741028786, 0.74512237310409...
def main ( ) : logger. setlevel ( logging. info ) repo = repository ( repo _ dir = constants. facebook _ sdk _ repo, cache _ ratio = 0. 2, branch ='master ', distance _ to _ fetch = 0. 1, pre _ fetch _ size = 0. 1 ) time = timeit. timeit ( repo. run _ fixcache, number = 1 ) print time print repo. hit _ count print repo...
[ 0.4471169114112854, 0.8414385318756104, 0.6905758380889893, 0.582639753818512, 0.3602756857872009, -0.336477130651474, 0.7242240905761719, 0.2782541513442993, -0.6727738380432129, -0.3193109929561615, -0.5298129916191101, -0.15216703712940216, 0.4234154224395752, 0.20223847031593323, 0.3...
def adjustpvalues ( ) : all _ sample _ data = { } for tissue in tissue _ comparison _ scores : for ( r, p, sample ) in tissue _ comparison _ scores [ tissue ] : all _ sample _ data [ sample ] = db = { } # # # populate this dictionary and create sub - dictionaries break for tissue in tissue _ comparison _ scores : for (...
[ 0.6697996258735657, 0.2147415280342102, 0.6765674352645874, -0.5117450952529907, -0.7702657580375671, 0.6849237084388733, 0.41310814023017883, 0.31749266386032104, 0.5539751052856445, -0.20673057436943054, 0.21400709450244904, -0.09820253401994705, -0.2586689591407776, 0.7163777351379395, ...
def complete _ previous ( self, count = 1, disable _ wrap _ around = false ) : if self. complete _ state : if self. complete _ state. complete _ index = = 0 : index = none if disable _ wrap _ around : return elif self. complete _ state. complete _ index is none : index = len ( self. complete _ state. current _ completi...
[ -0.5008249878883362, -0.04024461656808853, 0.9934675097465515, 0.05257486179471016, 0.0983930304646492, -0.34718814492225647, 1.3965563774108887, 0.019212661311030388, -0.3236493170261383, 0.3193880617618561, -0.05421160161495209, -0.5429368019104004, -0.22549393773078918, 0.13700792193412...
def min _ sine ( start, end ) : assert start < = end if start < = ( - np. pi / 2. 0 ) < = end : return - 1. 0 return min ( np. sin ( start ), np. sin ( end ) )
[ 0.46921244263648987, -1.4188646078109741, 0.49858373403549194, 0.669610857963562, -0.4211971163749695, 0.09394286572933197, -1.0174543857574463, -0.46886688470840454, -0.4699063301086426, -0.3850158154964447, 0.6776757836341858, 0.8731271028518677, -1.1599069833755493, -0.15224768221378326...
def _ calculate _ score _ for _ list ( self, lst : list ) : for elem in lst : # initialize variables sets = [ ] left = elem. clades [ 0 ] right = elem. clades [ 1 ] score = left. score + right. score # count parsimony score for every site ( self. length elements ) for u in range ( self. length ) : u _ score, u _ set = ...
[ -0.18914179503917694, 0.35616958141326904, 0.39080047607421875, 0.6937869787216187, 0.3792591094970703, 0.5812391042709351, 0.3168485164642334, 0.8063024878501892, 0.43304237723350525, 0.7692961692810059, -1.2792842388153076, -0.8478710651397705, 0.242610901594162, 0.8020337820053101, -0...
def get _ config _ dir ( dataset : str ) - > str : return os. path. join ( _ config _ base _ dir, dataset )
[ -0.9267648458480835, 0.18536816537380219, 0.15477408468723297, -0.456371545791626, -0.5195862650871277, 0.13007447123527527, 0.24201853573322296, 0.008373914286494255, -0.6776829957962036, -0.05324264615774155, 0.3184768557548523, 0.3267904818058014, 0.502280056476593, 0.12883441150188446,...
def _ get _ timeline _ posts _ with _ no _ filters ( self, max _ id = none ) : world _ circle _ id = self. _ get _ world _ circle _ id ( ) post = get _ post _ model ( ) posts _ select _ related = ('creator ','creator _ _ profile ','community ','image') posts _ prefetch _ related = ('circles ','creator _ _ profile _ _ b...
[ 0.6382219195365906, -0.22647131979465485, 0.7401853203773499, 0.36372390389442444, -0.01907115802168846, 0.11389248073101044, 0.7793753743171692, 0.030587350949645042, -0.43642082810401917, -0.31563225388526917, -0.3868718147277832, -0.21446850895881653, -0.2925512492656708, 0.315193027257...
def getroot ( self, a, b, shooting = false ) : count = 0 if shooting : while np. abs ( a - b ) > self. precision : function = self. f ( a, * self. f _ args ) bound1 = self. f ( a, * self. f _ args ) [ - 1 ] function = self. f ( b, * self. f _ args ) bound2 = self. f ( b, * self. f _ args ) [ - 1 ] x = b - bound2 * ( b ...
[ 0.7542820572853088, -0.19267570972442627, 0.653560221195221, 0.9297828078269958, 0.19661469757556915, -0.3334939479827881, -0.0219187643378973, -0.07013136893510818, -0.2773799002170563, 0.22257530689239502, 0.462259978055954, 0.7858330011367798, -0.158394917845726, 0.16317634284496307, ...
def invalidate ( self ) : if hasattr ( self, " _ avail _ backups " ) : del self. _ avail _ backups if hasattr ( self, " _ ips " ) : del self. _ ips if hasattr ( self, " _ transfer " ) : del self. _ transfer base. invalidate ( self )
[ -0.25886306166648865, -0.31231680512428284, 0.5342317819595337, -0.2889840602874756, -0.7655957937240601, -0.3780854642391205, -0.3940585255622864, -0.6696935892105103, 0.29454028606414795, -0.5912730693817139, -0.3340103030204773, -0.06267526745796204, -0.24865253269672394, 0.217844858765...
def user _ choice ( ) : answer = " " while answer not in [ " pierre ", " papier ", " ciseaux " ] : # the loop turn until answer is in list answer = input ( " choose pierre, papier or ciseaux " ). lower ( ) # if user enter a letter in uppercase. lower permit return answer # to put value in tiny
[ -0.5780076384544373, -0.7873336672782898, 0.316296249628067, 0.005007805768400431, -0.5807938575744629, 0.9748666882514954, 0.018934858962893486, -0.6947522759437561, 0.5093232989311218, -0.18266455829143524, -0.46230825781822205, -0.15135112404823303, -0.6414863467216492, -0.0792854577302...
def challenge ( ctx, challenge ) : ctx. obj = challenge ( challenge = challenge ) if ctx. invoked _ subcommand is none : display _ challenge _ details ( challenge )
[ 0.8604996204376221, 0.1419011503458023, 0.3061840534210205, 1.0824590921401978, 0.5734084248542786, 0.6552114486694336, 0.8766855597496033, -0.12405582517385483, 0.27003076672554016, -0.9608917236328125, -0.42447349429130554, 0.38742274045944214, 0.43075987696647644, 0.6145220398902893, ...
def merger ( primary _ path : str, secondary _ path : str, desired _ columns : list, shared _ column = " time " ) : primary _ df = fetch _ df ( primary _ path ) print ( primary _ df ) primary _ df [ shared _ column ] = pandas. to _ datetime ( primary _ df [ variablenames. vd _ ga _ timecol ], format = " % y - % m - % d...
[ 0.09664628654718399, 0.32775673270225525, 0.9079345464706421, 0.6295371651649475, 0.31404706835746765, -0.33291882276535034, 0.39696642756462097, -0.0019586796406656504, -0.7176100611686707, -0.8297829031944275, -0.22303736209869385, 0.28083163499832153, 0.22234109044075012, 0.097112789750...
def num _ gpus _ per _ worker ( self ) : return self. resources _ per _ worker. get ( " gpu ", int ( self. use _ gpu ) )
[ -0.2920876443386078, 0.7118837237358093, 0.6778391003608704, 0.5003347396850586, 0.3703966736793518, -0.013111179694533348, 0.3559473156929016, 0.07776039093732834, -0.5328620076179504, 0.007834894582629204, -0.13154719769954681, -0.792540431022644, -0.2530474364757538, -0.1326525360345840...
def parse _ related _ words ( self, relation _ id _ list = none ) : related _ words _ list = [ ] for related _ index, related _ id, relation _ type in relation _ id _ list : words = [ ] span _ tag = self. soup. find _ all ('span ', {'id': related _ id } ) [ 0 ] parent _ tag = span _ tag. parent while not parent _ tag. ...
[ 0.2919549345970154, 0.524681031703949, 0.5419242978096008, -0.7153124809265137, 0.5882144570350647, -0.05608515813946724, 0.3130929470062256, -0.09945223480463028, 0.7060187458992004, 0.3547028601169586, -0.5152995586395264, -0.42289480566978455, -0.7703576683998108, 0.812076985836029, -...
def push _ hook ( ) : payload = request. json builds. create ( payload ) ok = " ok " return ok
[ -0.7751224040985107, 0.34622621536254883, 0.5288167595863342, 0.520383894443512, 1.277011752128601, 1.0847944021224976, -0.9789876341819763, -0.338442325592041, -0.5938592553138733, 0.17477813363075256, 0.2517985701560974, 0.03883207589387894, -0.8030173182487488, -0.7332211136817932, 0....
def create _ topology _ graph ( list _ services, example _ folder _ path, example _ results _ path = " " ) : nodes = [ ] edges = { } for service in list _ services. keys ( ) : nodes. append ( service ) for neighbour in list _ services [ service ] : if neighbour + " | " + service not in edges. keys ( ) : edges [ service...
[ -0.7116360664367676, 0.24420851469039917, 0.4998731315135956, -0.5340545773506165, -0.45555591583251953, 0.6271497011184692, 0.4216477870941162, 0.5944909453392029, 0.39027827978134155, 0.25998935103416443, -0.08048592507839203, -0.180258110165596, 0.4525502324104309, 0.032289594411849976,...
def addmediaitem ( self, * * kwargs : dict ) - > dict : try : models. media ( media _ name = kwargs. get ('media _ name'), media _ type = kwargs. get ('media _ type') ). save ( ) ret _ val = {'responsecode': 200,'message':'item inserted successfully'} except ( databaseerror, dataerror, operationalerror ) as ex : ret _ ...
[ -1.3262739181518555, -0.0013035248266533017, 0.8890798091888428, 0.9125125408172607, 0.3271157741546631, 0.9481081962585449, -0.2487795501947403, 0.24774475395679474, 0.08344316482543945, 0.9617870450019836, -0.3398228585720062, -0.7144454717636108, -1.5905348062515259, 0.8962520956993103,...
def clean _ results ( * args ) : for fp in args : if _ path. isfile ( fp ) and _ path. exists ( fp ) : _ remove ( fp )
[ 0.29908373951911926, -0.3718905448913574, 0.515418291091919, 0.6214606761932373, 0.7895950078964233, 0.6404251456260681, 0.7581756711006165, -0.24993896484375, -1.1344833374023438, 0.1746881902217865, 0.05976877361536026, -1.1130931377410889, -0.6125484704971313, 0.7096421718597412, -1.6...
def initial _ params ( self ) : raise notimplementederror ( )
[ 0.1982019692659378, -0.6312490701675415, 0.499845415353775, 0.14965219795703888, 0.6188103556632996, 1.158834457397461, 0.21950732171535492, 0.37739282846450806, -0.7642490267753601, 0.007147219497710466, -1.0036526918411255, 0.5190912485122681, 0.2968160808086395, 1.5797313451766968, -1...
def is _ real _ num ( x ) : return isinstance ( x, ( int, float, bool ) )
[ -0.5913220047950745, 0.7345146536827087, 0.4061504304409027, 1.626988410949707, 0.2702566087245941, 0.25225570797920227, -0.22313851118087769, -0.3207049071788788, 0.5856291651725769, -0.09342160820960999, -1.2336894273757935, -0.38308843970298767, -0.5214755535125732, -0.49186939001083374...
def find _ maze _ start ( dungeon ) : starting = false map _ width, map _ height = dungeon. map. get _ width _ height ( ) while not starting : x = choice ( [ i for i in range ( 1, map _ width, 2 ) ] ) y = choice ( [ i for i in range ( 1, map _ height, 2 ) ] ) starting = dungeon. map. get _ tile ( x, y ) # can't start d...
[ -1.110015869140625, -0.11264130473136902, 0.8702216148376465, 0.03898452967405319, -0.4063437581062317, 0.18574842810630798, 1.3486907482147217, 0.2290806919336319, 0.3095948100090027, -0.06061466783285141, 0.4343932271003723, -0.3849133551120758, -1.3354473114013672, 0.39531394839286804, ...
def test _ passes _ gene _ inheritance _ unsupported _ inh ( self ) : gene = " test " inh = " mosaic " # check that non - supported inheritance modes fail, even if they # otherwise would cnv = self. create _ variant ( " female " ) cnv. child. info [ " cns " ] = " 1 " self. inh. known _ gene [ " inh " ] [ inh ] = { " in...
[ 0.12953510880470276, -0.07675670087337494, 0.5359132289886475, 0.8984733819961548, -0.16609501838684082, 1.5778993368148804, -0.6488280296325684, 0.4059560298919678, -0.8050642013549805, -0.06158387288451195, -1.5585756301879883, 0.2408878207206726, -0.38800135254859924, 0.4181512296199798...
def get _ idx _ path ( date _ or _ year, quarter = none, compressed = false ) : if quarter is none : quarter = _ get _ qtr ( date _ or _ year ) try : date _ or _ year = date _ or _ year. year except attributeerror : # then date _ or _ year is an integer. leave it be. pass return ( " / edgar / full - index / { 0 } / qtr...
[ -0.4138587713241577, -0.12040004879236221, 0.6715649962425232, 0.5430840253829956, -0.8597238063812256, 0.06169287487864494, 0.6172506809234619, -0.04373088851571083, 0.7711248993873596, -0.42603737115859985, 0.381290465593338, -0.4698489308357239, 0.12779738008975983, -0.41608962416648865...
def _ _ init _ _ ( self, webcam, endpoint ) : super ( halwebcamrepresentation, self ). _ _ init _ _ ( webcam ) self. endpoint = endpoint
[ 0.7106664776802063, 0.21250075101852417, 0.36558961868286133, 1.0125799179077148, 0.4553186893463135, -0.26215416193008423, -0.03441307321190834, 0.9280944466590881, 1.075441598892212, -0.23268413543701172, -0.19962355494499207, 0.5116310715675354, -0.15634246170520782, 1.0648010969161987,...
def plot _ over _ saturated _ zone ( self, color _ fill : str | list [ float ] = " # 0c92f6ff " ) - > psychrocurve | none : # ensure chart is plotted current _ ax = self. axes if ( curve _ sat _ zone : = make _ over _ saturated _ zone ( self. saturation, dbt _ min = self. config. dbt _ min, dbt _ max = self. config. db...
[ -0.14392629265785217, 0.36299532651901245, 0.37868988513946533, -0.9058419466018677, 0.11812108010053635, 0.3788417875766754, 0.753944456577301, -1.0833523273468018, 0.38005486130714417, -0.32449430227279663, -0.17308875918388367, 1.2853749990463257, 0.5525588393211365, -0.3546639978885650...
def driver _ id ( self ) : return self. _ driver _ id
[ 0.7416725158691406, -0.8630896806716919, 0.19576503336429596, 0.9830437898635864, 1.4075592756271362, 0.813425600528717, 0.5104522109031677, 0.9250047206878662, 1.1918433904647827, -0.882671594619751, 0.3851444125175476, 0.48144766688346863, -0.6953507661819458, 0.38976481556892395, 1.42...
def search _ menu ( self ) : while true : choice = menu. make ( menu. search ) if choice = = 1 : # search by exact date found _ tasks = search. search ( ). search _ by _ date ( self. task _ list ) elif choice = = 2 : # search by range of dates found _ tasks = search. search ( ). search _ by _ date _ range ( self. task ...
[ -0.9903143048286438, 0.24128122627735138, 0.9406256675720215, 0.7286003232002258, 0.22479285299777985, 0.1692420095205307, 1.1033272743225098, -0.34866443276405334, -0.2793692946434021, -0.15217411518096924, -0.29853975772857666, -0.7229145169258118, -0.2533836364746094, 0.3625726401805877...
def weight _ f _ helper ( x ) : t = x [ 1 ] if t < 0 : return b elif t > 0 and t < b : return t / np. float ( b ) else : return 1
[ -0.2902742028236389, -0.18285077810287476, 0.3909652829170227, 0.929818332195282, 0.007972205057740211, -0.09467916190624237, 0.0200628861784935, -0.5097218155860901, -0.7853835821151733, 0.3822246193885803, 0.9691705703735352, -0.32803696393966675, -0.184034526348114, 0.1027999222278595, ...
def combine _ output _ variables ( oblit, adverse ) : oblit = np. array ( oblit ) adverse = np. array ( adverse ) output = np. zeros _ like ( oblit, dtype = int ) output [ adverse > 0 ] = 1 output [ ( oblit > 0 ) & ( adverse = = 0 ) ] = 2 return output
[ -0.7411758303642273, -1.1991406679153442, 0.6688686609268188, 0.06539357453584671, -0.007093781605362892, 0.5867347717285156, -0.0000612829826422967, -0.4472218155860901, -1.1325092315673828, 0.871939480304718, 0.6439746022224426, 0.6487918496131897, 0.09238570928573608, -0.481113880872726...
def test _ get _ referred _ signup _ page ( self ) : random _ user _ id = choice ( user. objects. all ( ) ). id page = self. client. get ( reverse ( " referred _ signup ", kwargs = { " ref _ user _ id " : random _ user _ id } ), follow = true ) self. assertequal ( page. status _ code, 200 ) self. asserttemplateused ( p...
[ 0.285526305437088, 0.6793392300605774, 0.6993457674980164, 0.052906010299921036, 0.20706450939178467, 0.8777130246162415, 0.7058785557746887, -0.011729029007256031, 0.5496004819869995, 0.002828981727361679, 0.4799894094467163, 0.06736094504594803, 0.040061306208372116, 0.6090191006660461, ...
def new ( self, participant _ id, sample _ test, site = none ) : clone = self. _ _ class _ _ ( ) clone. _ participant _ id = participant _ id clone. _ sample _ test = sample _ test if site : clone. _ site = site else : clone. _ site = hpogen ( ). get _ random _ site ( ) return clone
[ 0.8279308080673218, -0.5872054100036621, 0.4481099247932434, 0.6055786609649658, -0.6257038116455078, 0.526231586933136, 0.03552039712667465, -0.12753868103027344, 1.415226697921753, -0.04539240151643753, -0.13208715617656708, 0.32522454857826233, -1.1942696571350098, -0.9422881603240967, ...
def get _ continent _ floors _ ids ( self, continent _ id ) : return self. _ request ( " continents / { } / floors ". format ( continent _ id ) )
[ -0.07397416979074478, -0.2973250448703766, 0.3572794497013092, 0.5527980923652649, 0.564817488193512, 0.7410646080970764, 0.18443521857261658, -0.2028253823518753, 0.10618869215250015, 0.3959035575389862, 0.1599055379629135, -0.16099728643894196, -1.56712806224823, 1.5285608768463135, 0....
def writecall ( functionname, numargs ) :
[ -0.9148788452148438, 0.6914834380149841, 0.37024226784706116, -0.14975909888744354, 1.02183198928833, -0.4198058843612671, -0.379180908203125, -0.09958023577928543, -0.4328218698501587, 0.1435462087392807, -0.267948180437088, -0.2511060833930969, -0.5869497060775757, -0.49668920040130615, ...
def test _ invalid _ personality _ contents _ not _ string ( self ) : self. server ['personality'] [ 0 ] ['contents'] = 4 self. assertraisesregexp ( validationerror, " 4 is not of type'string'", validate, self. server, group _ schemas. server )
[ -0.6114298105239868, -0.5219815969467163, 0.23765435814857483, -0.40262922644615173, -0.39171525835990906, 0.3638519048690796, -0.54226154088974, -0.7723796963691711, 0.0760285034775734, -0.18089129030704498, -0.27404898405075073, -0.19437642395496368, -1.5075914859771729, -0.0634875521063...
def _ attributes _ i _ del _ cb ( self, key, id = none, flow = _ down ) : # make sure interface is ready to use d = self. _ attributes _ t _ init ( key ) if flow = = self. _ down : self. _ attributes _ t _ call _ caller ( key, id, none ) # id = = none : remove all callbacks if not id : d ['attributes'] [ key ] ['callba...
[ 0.02555800788104534, -0.11875834316015244, 0.5875099897384644, -0.2764863073825836, -0.8251993060112, -0.5349680781364441, 0.442806214094162, 0.10860951989889145, 0.8900324702262878, 0.9715840220451355, 0.12825638055801392, -0.13164319097995758, -0.7178409695625305, 0.7340818643569946, 0...
def main ( ) : usage = " usage : % prog inputfile [ options ] \ n \ n " \ " inputfile is the mcnp or dag - mcnp input deck that is to be " \ " modified. \ nuse the - d option for dag - mcnp files. " parser = optionparser ( usage ) # output file name, and toggle for dag - mcnp problems parser. add _ option ( " - o ", " ...
[ -0.05288871377706528, 0.2987454831600189, 1.1768923997879028, -0.11555162817239761, -0.5284140110015869, -0.4813801050186157, 0.5608547329902649, 0.7464024424552917, 0.2092549353837967, -0.39985862374305725, 0.16208072006702423, 0.0020799285266548395, -0.2788718342781067, 0.043923910707235...
def calendar ( self ) : raise notimplementederror ( )
[ 0.28505635261535645, -0.7553253173828125, 0.42203661799430847, 0.414842426776886, -0.29175639152526855, 0.9584842324256897, 0.5999928712844849, 0.00537051260471344, 0.49799221754074097, -0.7083117961883545, 0.3732093870639801, 0.5568066835403442, 0.5334420204162598, 0.32178038358688354, ...
def _ from _ christian _ era ( s : str ) - > jptime : s = re. sub ( r " [ 年 月 日 ] ", " ", s ) try : dt = parser. parse ( s ) return from _ datetime ( dt ) except valueerror : raise parseerror ( f " cannot parse { s }. " )
[ 0.3718007206916809, -0.7432538270950317, 0.4375993311405182, 0.22703711688518524, -1.7278674840927124, -0.180992990732193, 0.03300948813557625, 0.29109621047973633, 0.4941558837890625, -0.26298215985298157, -0.35969099402427673, -0.5512291193008423, 0.08294707536697388, -0.4697895050048828...
def repo _ url ( self ) : raise notimplementederror # pragma : no cover
[ -0.2068464607000351, 0.1322973370552063, 0.5515851974487305, 0.29421380162239075, 0.4578150808811188, 0.9313323497772217, 0.1248457133769989, 1.2077467441558838, -0.17743825912475586, 0.11472886055707932, -0.374419242143631, -0.04235019534826279, 1.0970141887664795, -0.12410304695367813, ...
def dockenabled ( self ) - > docksides :
[ 1.3669090270996094, 0.6056261658668518, 0.4430042803287506, 1.2845968008041382, 0.4252151548862457, 0.5518774390220642, 0.41746506094932556, 0.7056552767753601, 0.6912005543708801, -0.675085723400116, -0.7723901867866516, -0.0630025714635849, -0.023557865992188454, 0.6417682766914368, -0...
def makeellipse ( self, c, p1, p2 ) : c, p1, p2 = ensurenumpyarray ( c ), ensurenumpyarray ( p1 ), ensurenumpyarray ( p2 ) d1, d2 = p1 - c, p2 - c da = 2 * pi / self. nb for i in range ( self. nb ) : a = i * da self. x [ i ] = cos ( a ) * d1 + sin ( a ) * d2 + c
[ -0.21056941151618958, 0.6165120005607605, 0.508522629737854, -0.5998422503471375, 0.2539777457714081, 1.3206844329833984, -0.477292537689209, 0.4879024028778076, -0.29888489842414856, 0.6244766712188721, -0.5570158958435059, -0.4280807673931122, 0.2514355480670929, -0.8214225172996521, 0...
def remediate ( session, alert, lambda _ context ) : bucket = alert ['resource _ id'] region = alert ['region'] s3 = session. client ('s3 ', region _ name = region ) try : result = s3. put _ bucket _ encryption ( bucket = bucket, serversideencryptionconfiguration = {'rules': [ {'applyserversideencryptionbydefault': {'s...
[ 0.9910508990287781, 0.24769139289855957, 0.5614844560623169, -0.6302379965782166, 0.3630056083202362, 0.2989715337753296, 0.31561535596847534, 0.2304731011390686, 0.4356743395328522, 1.185344934463501, -1.2211676836013794, 1.3943290710449219, -0.4152070879936218, -0.11883551627397537, 0....
def make _ groups ( self ) - > tuple [ set [ int ], set [ int ] ] : groups = [ set ( ), set ( ) ] # group n is stored in index n - 1 unvisited = set ( range ( 1, self. num _ students + 1 ) ) while unvisited : to _ visit = [ ( unvisited. pop ( ), 0 ) ] while to _ visit : student, group = to _ visit. pop ( ) groups [ gro...
[ -1.755802035331726, 1.022559642791748, 0.6147637367248535, -0.0433531329035759, 0.06324661523103714, -0.2614501118659973, 1.4638540744781494, -1.0570207834243774, -0.1800510585308075, 0.19465531408786774, -0.16989614069461823, -0.793205738067627, -0.24198922514915466, -0.19973576068878174,...
def run _ on _ off ( self ) : h = hvac ( self. energy _ cost, self. outdoor _ temps, low _ temp _ threshold = self. low _ thresh, high _ temp _ threshold = self. high _ thresh, initial _ building _ temperature = self. temperature, verbose = self. verbose, integer _ opt _ only = self. int _ opt _ only ) states, temps = ...
[ -0.4221540093421936, -0.46952006220817566, 0.36885780096054077, 0.19203776121139526, -0.16438286006450653, 0.14014296233654022, -0.3276268243789673, 0.7380959391593933, -0.4066564440727234, 0.06045963987708092, -0.1423848569393158, -0.1850651353597641, 0.061955004930496216, 0.8849391937255...
def scikitfolds ( data, target, learners, folds ) : learner _ err = [ ] for model in learners : err = [ ] kf = kfold ( len ( target ), n _ folds = folds, shuffle = true ) for fold, breakdown in enumerate ( kf ) : train, test = breakdown trn _ data = data [ train ] tst _ data = data [ test ] trn _ target = target [ trai...
[ -0.3588963747024536, -0.030213192105293274, 0.6573598384857178, 0.18959997594356537, 0.6833815574645996, 0.23959998786449432, -0.5304436683654785, 0.6918476819992065, -0.13897152245044708, 0.5596970319747925, 0.26332226395606995, -0.243068128824234, 0.5055541396141052, 0.5401748418807983, ...
def _ flyby _ is _ local _ minimum ( v _ in, v _ out, r ) : # get the dot products of v _ in and r, and v _ out and r : v _ in = np. asarray ( v _ in ) ; v _ out = np. asarray ( v _ out ) ; rv = np. asarray ( r ) ; dp _ in = np. dot ( rv, v _ in ) ; dp _ out = np. dot ( rv, v _ out ) ; # local minimum if dp _ in negati...
[ 0.15557117760181427, -1.2988673448562622, 0.6145735383033752, -0.04599231109023094, -0.10856238007545471, -0.005678008776158094, -0.6748249530792236, -0.26557043194770813, 0.9537160992622375, 0.8926117420196533, -0.4783918261528015, -0.19054459035396576, -0.39939525723457336, -0.1018082872...
def test _ creating _ referred _ user _ adds _ extra _ coins ( self ) : if settings. coins _ enabled : random _ existing _ user = choice ( user. objects. all ( ) ) existing _ users _ prior _ coins = usercoins. objects. get ( user = random _ existing _ user ). coins non _ referred _ user _ data = { " username " : " nore...
[ -0.07606858015060425, 0.44220495223999023, 0.6569162607192993, -0.7977389097213745, 0.2415664941072464, 0.8661738038063049, 0.7913944125175476, -0.7831008434295654, -0.007918963208794594, -0.05489636957645416, -0.5712409019470215, 0.4147799611091614, -0.09285904467105865, 0.174078509211540...
def _ equals ( self, other ) : # call super if not super ( cposequencevar, self ). _ equals ( other ) : return false # check equality of types if self. types! = other. types : return false # list of variables is processed as expression children return true
[ -0.9881329536437988, -0.4019774794578552, 0.43189436197280884, 0.346514493227005, 0.25235942006111145, -0.11293395608663559, 0.47014161944389343, -0.4002249836921692, 0.25712937116622925, 0.46912533044815063, -1.8071701526641846, 0.02101927064359188, -0.7731134295463562, 0.8949832320213318...
def calculate _ rsi ( ticker ) : # data pull pull _ query = ( ('select date, close, volume from " s & p - 500 " where name = " { } "'). format ( ticker ) ) c. execute ( pull _ query ) items = c. fetchall ( ) ticker _ dates = [ date [ 0 ] for date in items ] # ticker datetime ticker _ prices = [ price [ 1 ] for price in...
[ -0.7201528549194336, 0.5679671168327332, 0.7846459150314331, -0.2896784842014313, -0.008452542126178741, -0.690202534198761, 0.777551531791687, -0.29563549160957336, -0.07678820937871933, 0.8429787755012512, -0.09460275620222092, 0.21144232153892517, 0.2037346065044403, 0.05496284738183021...
def mergefilteredclustersaccordingtobox ( degeneracy, clustersfiltering ) : assert len ( degeneracy ) = = sum ( clustersfiltering ) newdegeneracy = [ ] for filtered in clustersfiltering : if filtered : newdegeneracy. append ( degeneracy. pop ( 0 ) ) else : newdegeneracy. append ( 0 ) return np. array ( newdegeneracy )
[ -1.6313059329986572, 0.13641636073589325, 0.61708003282547, 0.32954373955726624, 0.6304706931114197, -0.5418666005134583, 0.35361459851264954, -0.29055333137512207, -0.11257676780223846, 0.2748945653438568, 0.507588267326355, 0.47737109661102295, -0.24306656420230865, -0.06345707178115845,...
def _ _ init _ _ ( self, name, schedule, roundnumber, roomnumber ) : super ( room, self ). _ _ init _ _ ( ) self. name = name self. roundnumber = roundnumber self. roomnumber = roomnumber self. schedule = schedule self. roster = [ ]
[ 0.06500579416751862, -0.3719203770160675, 0.6705814003944397, 0.23201830685138702, -0.6349818110466003, 0.4460368752479553, 0.18737635016441345, 0.7915825247764587, -0.0032323068007826805, 0.33224260807037354, -0.3755948543548584, 0.27371451258659363, -0.19899111986160278, 0.75207221508026...