text
stringlengths
25
2.19k
embedding
listlengths
768
768
def yarascan ( self, rule _ file, is _ kernel = true ) : log. debug ( " executing volatility yarascan plugin on " " { 0 } ". format ( self. memdump ) ) results = [ ] if rule _ file is not none and os. path. exists ( rule _ file ) : self. _ _ config ( ) self. config. yara _ file = rule _ file if is _ kernel : self. conf...
[ 0.14506840705871582, -0.6372891068458557, 0.6706756949424744, -0.47011786699295044, 0.6157999634742737, -0.8057038187980652, 0.09990838915109634, 0.8605570793151855, -0.42269644141197205, 0.30163368582725525, 0.12982279062271118, 0.5673865675926208, 0.15857762098312378, 1.2499363422393799,...
def test _ implicit _ page _ handling ( self ) : response = self. client. get ( reverse ('test - pagination') ) self. assertequal ( " 0, 1, 2, 3, 4 ", response. content. decode ( ) )
[ -0.02477933280169964, 0.08655945211648941, 0.4379473328590393, -0.5090819001197815, 1.2103558778762817, 0.11348387598991394, 0.15574057400226593, -0.13461318612098694, 0.2861137092113495, -0.5103607773780823, -0.12533506751060486, -0.7549989819526672, -0.5246760249137878, -0.26964396238327...
def get _ partitions ( self, device _ name ) : if device _ name = = none : return [ ] blivet _ device = self. storage. devicetree. getdevicebyname ( device _ name ) partitions = [ ] partitions = self. storage. devicetree. getchildren ( blivet _ device ) partitions = self. get _ free _ space ( device _ name, partitions ...
[ -0.013481227681040764, 0.6416996121406555, 0.79503333568573, 0.7846249938011169, -0.42414340376853943, -0.4020105302333832, -0.33985912799835205, -0.42327651381492615, 0.9017372727394104, 0.25877252221107483, -0.5237284302711487, -0.6889441609382629, -0.343156099319458, 0.5799444317817688,...
def thread _ target _ extending ( q _ in, list _ q _ out, in _ streams, finished ='_ finished') : name _ to _ stream = { } for s in in _ streams : name _ to _ stream [ s. name ] = s while true : v = q _ in. get ( ) if v = = finished : for q _ out in list _ q _ out : q _ out. put ( finished ) break stream _ name, stream...
[ -0.0818154439330101, -0.42301905155181885, 0.4972273111343384, -0.05671181529760361, -0.2111644148826599, -0.10276499390602112, -0.7465546727180481, -0.5482435822486877, -0.4500950276851654, 0.09242390841245651, -0.6768537163734436, 0.6687144637107849, -0.4185705780982971, 0.46860197186470...
def testofconfunc ( j = 3 ) : wavelet ='db2'waveletcoef = np. flipud ( pywt. wavelet ( wavelet ). dec _ lo ) phi = pywt. wavelet ( wavelet ). wavefun ( level = 15 ) [ 0 ] [ 1 : ] al, ar = ot. orthomatrix ( j, waveletcoef, phi ) x = np. ones ( 2 * * j ) x [ 1 ], x [ - 1 ] = 0, 0 x [ 0 ] = 1 / al [ 0, 0 ] x [ - 2 ] = 1 /...
[ 0.4535093605518341, 0.2585878372192383, 0.8869215250015259, -0.04318339750170708, -0.22530607879161835, -0.36720725893974304, 1.2158156633377075, -0.2479080855846405, 0.037891119718551636, 0.07202375680208206, -0.7594225406646729, 0.46819087862968445, -0.2834804058074951, 0.531031012535095...
def greater ( a, b ) : if a > = b : return a elif a < b : return b else : print ('something weird happened') return 0
[ -0.02968192845582962, 0.17912372946739197, 0.48770672082901, 0.5593217015266418, 0.40879741311073303, 0.511745035648346, -1.0204052925109863, -0.294830322265625, -0.9956639409065247, -0.7711487412452698, 0.5736891031265259, 0.5694208145141602, -0.05575312674045563, 0.16936001181602478, -...
def sfc _ sfcgetnextprotectedfile ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " rpchandle ", " protfiledata " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ 0.06609448790550232, 0.4897098243236542, 0.6388047337532043, 0.466168075799942, 0.12858174741268158, 0.696429431438446, 0.7648525834083557, -0.5434374809265137, -0.5087571740150452, -1.2862741947174072, -0.16057461500167847, 0.32833266258239746, -1.0261787176132202, 0.34835511445999146, ...
def parse _ flowcell _ id ( flowcell _ id ) : fields = flowcell _ id. split ( ) fcid = none status = none if len ( fields ) > 0 : fcid = fields [ 0 ] if len ( fields ) > 1 : status = fields [ 1 ] return fcid, status
[ 0.4699501395225525, -0.7294169068336487, 0.37726008892059326, 0.1771276742219925, 0.3424123525619507, -0.4688040018081665, 0.07174813747406006, 0.0884002074599266, 0.33906471729278564, -0.19959627091884613, -0.6495956182479858, -0.4601302742958069, -0.16457310318946838, 0.2346099615097046,...
def test _ w _ update _ too _ many _ args ( self ) : r = rectangle ( 1, 1, 0, 0, 1 ) r. update ( 1, 1, 1, 1, 1, 2 ) self. assertequal ( str ( r ), " [ rectangle ] ( 1 ) 1 / 1 - 1 / 1 " )
[ -0.8820909857749939, -0.01257810927927494, 0.5403146147727966, -0.0651528388261795, -0.07773862779140472, -0.07559455186128616, 0.6456581950187683, -1.1785916090011597, -0.1458749771118164, 0.8003209829330444, 0.2579600214958191, -1.409427523612976, -0.9880036115646362, 0.3336551785469055,...
def design _ matrix ( self ) : return self. _ design _ matrix
[ -0.09587917476892471, 0.2499857395887375, -0.04670596495270729, 0.33145225048065186, 1.1106971502304077, 0.5865791440010071, 0.5484803318977356, -0.2812156677246094, 0.3708052933216095, -1.5831654071807861, 0.45275604724884033, 0.42653656005859375, 0.6150012612342834, -0.38185232877731323,...
def station _ stats ( df ) : print ('\ ncalculating the most popular stations and trip... \ n') start _ time = time. time ( ) # to do : display most commonly used start station popular _ pick = df ['start station']. mode ( ) [ 0 ] print ( " most common pickup point is : { } ". format ( popular _ pick ) ) # to do : disp...
[ -0.4327000379562378, 0.053384002298116684, 0.7396216988563538, -0.13885098695755005, 0.14492900669574738, 0.10755334794521332, 1.0065068006515503, -0.36557844281196594, -0.6563518643379211, 0.03522385284304619, 0.2262481302022934, -0.10579100251197815, 1.009691596031189, 0.7892137765884399...
def stop ( self ) : if not self. _ running : raise notrunningerror ('the broker is already stopped.') self. _ running = false def cancel _ broker _ task ( ) : self. _ broker _ task. cancel ( ) self. _ loop. call _ soon _ threadsafe ( cancel _ broker _ task ) self. join ( )
[ 0.26368996500968933, -0.0990339070558548, 0.2355336844921112, 0.6531179547309875, 0.2218693494796753, 0.6971957683563232, 0.8397958278656006, 0.8885763883590698, -0.9920059442520142, 0.2397296130657196, -1.0745984315872192, 0.22540313005447388, -1.443338394165039, 0.0541171059012413, 0.7...
def metric _ tuple ( line ) : return is _ metric _ line ( line ) and tuple ( line. split ( none, ( metric _ field _ count - 1 ) ) )
[ -0.174381822347641, 0.9655991792678833, 0.4516015648841858, 0.3717183470726013, 0.8309934735298157, 0.15458057820796967, 0.16897353529930115, -0.23919716477394104, -1.8341909646987915, 0.6968041658401489, 0.0878523662686348, -1.363424301147461, -0.4670771658420563, -0.9614428281784058, -...
def test _ multi _ fetch _ data _ multi _ series ( self ) : nodes = list ( self. finder. find _ nodes ( query ( self. metric _ prefix + ". leaf * " ) ) ) time _ info, data = self. finder. fetch _ multi ( nodes, int ( self. start _ time. strftime ( " % s " ) ), int ( self. end _ time. strftime ( " % s " ) ) ) self. asse...
[ -0.0693650022149086, 0.020061518996953964, 0.4739215672016144, 0.38368767499923706, 0.4359118640422821, 0.818886399269104, -0.5511516332626343, -0.6439385414123535, -0.6838932037353516, -0.7099589109420776, -0.041218195110559464, 0.5202241539955139, 0.6737145781517029, 0.681984543800354, ...
def update _ device ( libnms _ name, libnms _ ip, netbox _ name, netbox _ ip, libnms _ session ) : try : if libnms _ name! = netbox _ name : print ( libnms _ name, netbox _ name ) response = libnms _ session. patch ( libnms _ api + libnms _ name +'/ rename /'+ netbox _ name ) if response. json ( ) [ " status " ] = = " ...
[ -1.025102138519287, -0.46124833822250366, 0.7362070083618164, -0.19925673305988312, -0.4800764322280884, 0.17989397048950195, -0.4144061207771301, -0.5601427555084229, 0.5323989391326904, -0.042964499443769455, 0.014912000857293606, -0.10352856665849686, -0.5528298020362854, -0.04478817805...
def parseconfigfile ( filename ) : config _ data = json. load ( open ( filename,'r') ) directory = os. path. dirname ( os. path. abspath ( filename ) ) config = config ( ) config. tests = config _ data ['tests'] for state _ name, state _ property _ filenames in config _ data ['states'] : config. states [ state _ name ]...
[ -0.06339281797409058, -0.799211323261261, 0.5416879057884216, -0.7334480881690979, -0.29919949173927307, 0.2639094293117523, 0.619197428226471, 0.5694006681442261, -0.5550063848495483, 0.05968514829874039, -0.4320489168167114, -0.7478830218315125, 0.3149884045124054, 0.3327237367630005, ...
def post ( self ) : # safety third. as recommended in the docs, prior to calling # request. get _ data ( ), validate the size of the data is within # reason. cl = request. headers. get ('content - length ', none ) try : cl = int ( cl ) except valueerror : return ( {'error':'bad request'}, 400 ) if cl and cl > app. conf...
[ 0.14934872090816498, 0.08289958536624908, 0.7854961156845093, 0.7368543148040771, 0.6055662631988525, -0.6333062648773193, -0.03004061058163643, 0.32436418533325195, 0.41593798995018005, -0.06977537274360657, -0.5929630398750305, 0.46326395869255066, -0.05654541030526161, 1.002380847930908...
def getgraylevelnonuniformityfeaturevalue ( self ) : pg = self. coefficients ['pg'] nz = self. coefficients ['nz'] gln = numpy. sum ( pg * * 2, 1 ) / nz return gln
[ -0.5460352301597595, 0.09695710986852646, 0.20747484266757965, -0.38842591643333435, 0.830988883972168, 0.7625706791877747, 0.6040685176849365, -0.060869768261909485, -0.2086629718542099, -0.3613945245742798, -0.6846582889556885, 0.9402590394020081, -1.0386559963226318, 0.46292969584465027...
def get _ by _ urn ( cls, actor _ urn ) : with cls. _ actor _ refs _ lock : refs = [ ref for ref in cls. _ actor _ refs if ref. actor _ urn = = actor _ urn ] if refs : return refs [ 0 ]
[ -0.3632383346557617, -1.1652007102966309, 0.2779272794723511, -0.15695275366306305, 0.8712214231491089, -0.8119130730628967, 1.1633220911026, -0.4730941653251648, 0.71705162525177, -0.4420911967754364, 0.27139273285865784, 1.3287074565887451, -0.920770525932312, -0.266209214925766, 0.509...
def is _ displayed ( self ) : return self. browser. is _ displayed ( self. textbox )
[ -0.12729567289352417, -0.9178640246391296, 0.6088481545448303, 0.3865514099597931, 0.12342186272144318, 0.11396294087171555, 0.298417866230011, 0.6232346892356873, 0.8110513687133789, 0.5611344575881958, -0.07607264071702957, 0.15774470567703247, -0.1973007768392563, 0.6265503168106079, ...
def publish ( self ) : self. published _ at = timezone. now ( ) self. save ( )
[ -0.09765301644802094, -0.8631623983383179, 0.40131810307502747, 0.3423018753528595, 0.7919098138809204, 0.6919276714324951, -0.2708685100078583, 1.6230262517929077, -1.0505905151367188, 0.04812023043632507, -1.0525487661361694, -0.2628774642944336, -0.10821657627820969, 0.5321417450904846,...
def test _ check _ config _ params _ empty _ csv _ output _ folder _ path ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " csv _ output _ folder _ path " ] = " " with pytest. raises ( systemexit ) : gitdelv...
[ -0.0876605361700058, 0.280737966299057, 0.3140614926815033, 0.6535820364952087, 0.1946517676115036, 0.33326342701911926, 0.52238929271698, 0.34878820180892944, -0.7089935541152954, 0.1357133686542511, -0.5325912833213806, -0.020947059616446495, -0.47300007939338684, 0.7725268602371216, -...
def not _ owned ( schema ) : schema. data ['owned'] = false return schema
[ -1.183578610420227, -0.28314217925071716, 0.01521537359803915, 0.4249331057071686, 0.5992841720581055, -0.008948746137320995, 0.2846282124519348, 0.44398823380470276, -0.16172894835472107, -0.6673610806465149, 0.11733948439359665, 0.5619968771934509, 0.19742269814014435, -0.543812274932861...
def is _ click _ in _ circle ( click _ point, circle ) : circle _ center _ point = circle. getcenter ( ) a = circle _ center _ point. getx ( ) - click _ point. getx ( ) b = circle _ center _ point. getx ( ) - click _ point. gety ( ) if a * a + b * b < circle. getradius ( ) * circle. getradius ( ) : return true else : r...
[ 0.2465486079454422, -1.0926264524459839, 0.6676442623138428, -0.1921156495809555, -0.422969788312912, -0.05771574005484581, 0.47651705145835876, -0.27385222911834717, 0.1495216190814972, 0.5457985997200012, -0.20636484026908875, 0.502206563949585, -0.6187897324562073, -0.8018739223480225, ...
def retranslateui ( self, mainwindow ) : _ translate = qtcore. qcoreapplication. translate mainwindow. setwindowtitle ( _ translate ( " mainwindow ", " group activity scheduler " ) ) self. morning. settooltip ( _ translate ( " mainwindow ", " select the available morning activities " ) ) self. morning. setstatustip ( _...
[ -0.5396004319190979, -0.2799052298069, 0.8004552721977234, -0.2528747022151947, -0.8957494497299194, 0.42646777629852295, 0.6069434285163879, 0.1881931722164154, 0.09073115885257721, 0.3164057731628418, -0.09954831749200821, -0.6927406191825867, -0.28908777236938477, 0.3048911690711975, ...
def is _ pair _ difference ( n : list, a : int ) : hash _ keys = { } for number in n : hash _ keys [ number ] = 1 if hash _ keys. get ( number + a, 0 ) or hash _ keys. get ( number - a, 0 ) : return 1 return 0
[ -1.3658254146575928, 0.35381636023521423, 0.5985002517700195, 0.7863122224807739, 0.2089877426624298, 0.21823181211948395, 0.5470534563064575, 1.180930733680725, 0.7026150822639465, -0.20918631553649902, -0.7291624546051025, -0.696657121181488, -0.6812319159507751, 1.3003628253936768, 0....
def lineage _ run _ id ( task _ instance : taskinstance ) : return openlineageadapter. build _ task _ instance _ run _ id ( task _ instance. task. task _ id, task _ instance. execution _ date, task _ instance. try _ number )
[ 0.21433673799037933, -0.4002383053302765, 0.4520769715309143, -0.920019805431366, -0.03662068024277687, 0.7972264885902405, -0.13617263734340668, 0.06312412768602371, -0.20795956254005432, -0.3221931457519531, 0.26256370544433594, 0.824636697769165, 0.22192439436912537, -0.2180787771940231...
def json _ script _ data ( self, url ) : resp = self. get _ response ( url ) script _ data = html. fromstring ( resp. text ). xpath ('/ / script [ @ id = " _ _ next _ data _ _ " ] / text ( )') true ='true'false ='false'null ='null'script _ data _ json = eval ( script _ data [ 0 ] ) return script _ data _ json
[ -1.1124672889709473, -0.5749977827072144, 0.713182806968689, -0.7509196400642395, -0.7231848239898682, -0.6528891921043396, -0.26938188076019287, -0.6999684572219849, 0.4006495773792267, 0.8435843586921692, -1.1624608039855957, 1.1993383169174194, 0.6706211566925049, 0.30835843086242676, ...
def greeter _ setup ( self ) : # most implementations do nothing
[ -0.24204066395759583, 0.23660537600517273, 0.5617733597755432, 0.49645093083381653, 0.49555906653404236, 0.32593971490859985, 0.5272566676139832, -0.2988320291042328, 0.0534190870821476, -0.4616774022579193, -0.7700303196907043, -0.47812193632125854, -0.011171449907124043, 1.67642617225646...
def file _ begin _ mtime _ epoch ( self, file _ begin _ mtime _ epoch ) : if ( self. _ configuration. client _ side _ validation and file _ begin _ mtime _ epoch is not none and file _ begin _ mtime _ epoch < 0 ) : # noqa : e501 raise valueerror ( " invalid value for ` file _ begin _ mtime _ epoch `, must be a value gr...
[ -0.001390524790622294, -1.158261775970459, 0.09163413941860199, -0.24851135909557343, -0.28554198145866394, 1.0459104776382446, 0.1182221919298172, 0.8076187968254089, -0.9842591285705566, 0.2833186984062195, -0.3499072790145874, 0.15769760310649872, -0.6689882278442383, 0.6255156993865967...
def pseudo _ rerank _ nbest ( nbest, func ) : print ( " pseudo " ) best = nbest. sentences. min ( key = func ) nbest. sentences. remove ( best ) nbest. sentences. insert ( 0, best )
[ -0.23100337386131287, 0.17302879691123962, 0.4084867238998413, 0.2562822103500366, 0.0880429595708847, -0.6465553045272827, 0.030421491712331772, 0.7723351120948792, -0.6841511726379395, 0.4780922532081604, -0.8901911377906799, 1.1808018684387207, 0.08269930630922318, -0.11412464827299118,...
def start _ replication ( self, master, slave, replication _ type ='continuous ', buckets = none, bidir = false, suffix ='a') : master _ rest _ conn = restconnection ( master ) remote _ reference ='remote _ cluster _'+ suffix master _ rest _ conn. add _ remote _ cluster ( slave. ip, slave. port, slave. rest _ username,...
[ -0.10750990360975266, 0.1723768264055252, 0.8613889217376709, 0.33690768480300903, 0.09665282815694809, -0.3028707504272461, -0.18339665234088898, 0.4834195077419281, -0.4953669011592865, 0.11156530678272247, -0.8805400133132935, 0.9447040557861328, 0.2221195101737976, -0.35196182131767273...
def setup ( cls ) : super ( ). setup ( ) cls. ledger _ id = default _ ledger cls. is _ ledger _ tx = true cls. currency _ id = " some _ currency _ id " cls. unit _ price = 20 cls. service _ id = " some _ service _ id " cls. location = { " longitude " : 0. 127, " latitude " : 51. 5194, } cls. service _ data = { " key " ...
[ 0.11844205856323242, -0.4169274866580963, 0.5360536575317383, -0.23994404077529907, 1.1690099239349365, -0.049544915556907654, -0.3798951804637909, -0.2760527431964874, 0.47485244274139404, -0.07406012713909149, 0.12900181114673615, 0.5080512762069702, 1.2720448970794678, -0.39791786670684...
def asyncsenddatagram ( self, datagram, remoteaddr, ondatasent = none, ondatasentarg = none ) :...
[ -0.5670477747917175, 0.26009103655815125, 0.25128626823425293, -0.3296104669570923, -0.43641892075538635, -0.43475261330604553, -0.40693399310112, -0.20088127255439758, 1.1374592781066895, 0.22020575404167175, -0.7265721559524536, 1.3383818864822388, 0.35033103823661804, -0.056650027632713...
def v ( self, theta = none ) : if theta is none : if not hasattr ( self, " theta " ) : raise exception ( " no theta available, has to be specified " " by parameter " ) theta = self. theta return lambda x : np. dot ( theta, self. phi ( x ) )
[ -0.5648420453071594, -0.10556050390005112, 0.3736744821071625, -1.114196538925171, -0.13265377283096313, -0.19747012853622437, 0.6153130531311035, 0.18692490458488464, 0.5148255825042725, 0.508767306804657, -0.12404708564281464, 0.9909542202949524, 0.19865214824676514, 0.31538766622543335,...
def set _ minor ( self ) : self. _ call ('set _ minor')
[ 0.06859459728002548, -0.1331217736005783, 0.36530569195747375, 1.0750644207000732, 0.5848493576049805, 0.5238862037658691, 0.4456900656223297, -0.8851587176322937, -0.20084860920906067, -1.4206300973892212, -0.16190548241138458, 0.8497675657272339, -0.9610498547554016, 0.390147864818573, ...
def escanear _ filas ( self ) : var _ cero = self. elementos _ matcheados. idex ( 0 ) # obtenemos el indice donde esta la primera fila no matcheada for j in range ( self. filas ) : if self. matrix [ var _ cero ] [ j ] = = 0 : if self. elementos _ matcheados [ j ] = = 0 : pass # continuara....
[ 0.46153706312179565, -0.5592312216758728, 0.4676816761493683, 1.2337586879730225, -0.10722144693136215, 0.26458948850631714, 0.679671049118042, 0.09997673332691193, -0.27458590269088745, -0.15874895453453064, 0.7580434083938599, 0.3205565810203552, -0.700495183467865, 0.6104381084442139, ...
def assemble _ diagonal _ stiffness _ matrix ( n, eps, mu, basis, s ) : # calculate h h = 1 / n # get the local stiffness matrix a _ k = local _ diagonal _ stiffness _ matrix ( eps, mu, basis, s, h ) # construct the'global'matrix a = np. zeros ( ( n - 1, n - 1 ) ) i, j = np. indices ( a. shape ) a [ i = = j + 1 ] = a _...
[ -0.5004198551177979, -0.01784505322575569, 0.591973602771759, -0.5581009387969971, -0.24377129971981049, -0.5472630262374878, 0.5999879837036133, 0.6678475141525269, 0.26786530017852783, -0.35896414518356323, -0.35929763317108154, 0.5168502330780029, 0.08802160620689392, -0.076083056628704...
def test _ transaction _ external _ filter ( client, acc1 _ usd _ deposit _ transaction _ factory, acc2 _ eth _ withdrawal _ transaction _ factory, ) : deposit = acc1 _ usd _ deposit _ transaction _ factory ( client _ address ) acc2 _ eth _ withdrawal _ transaction _ factory ( client _ address ) encoded _ jwt = sep10 (...
[ 0.5563693046569824, 0.6279069185256958, 0.6236778497695923, 0.30896371603012085, -0.3625471591949463, 0.17093214392662048, -0.12176875025033951, -0.5438544750213623, 0.0313829630613327, -0.48226603865623474, -0.16816258430480957, 0.3612130880355835, 1.1540223360061646, -0.2849746346473694,...
def render _ error _ message ( self, * * kwargs ) : kwargs. update ( self. error _ template _ params ) message = unicode _ string ( self. error _ message _ template ) for k, v in kwargs. items ( ) : message = message. replace ( u'{ % s }'% k, v ) return message. encode ('utf - 8 ','replace')
[ -0.7634286284446716, 0.1886216402053833, 0.24921143054962158, -0.3240879476070404, -0.33945468068122864, 0.054820023477077484, -0.9562830924987793, 0.7303507924079895, -0.6462342739105225, 0.2701411843299866, -0.501546323299408, -0.07605094462633133, -1.0486446619033813, 0.2712899446487427...
def insert ( self, val ) : pos = len ( self. numloc ) self. num2pos [ val ]. append ( pos ) self. numloc. append ( val ) self. num2freq [ val ] = self. num2freq. get ( val, 0 ) + 1 return true if self. num2freq [ val ] = = 1 else false
[ -1.1731846332550049, 1.3641334772109985, 0.7618250846862793, -0.5301015973091125, -0.6027303338050842, 0.1744312345981598, 0.7718584537506104, -0.04320207238197327, -0.08040554076433182, -0.5477641820907593, -0.8608291745185852, -1.1517592668533325, -0.805391252040863, 0.3788489103317261, ...
def try _ again ( self ) : while self. endgame : pygame. mixer. music. fadeout ( 1 ) pygame. display. update ( ) screen. blit ( self. background. image, self. background. rect ) screen. blit ( self. game _ over _ pic. image, self. game _ over _ pic. rect ) self. handlingscore. scoreend. draw ( screen ) for text in self...
[ -0.7297700643539429, -0.18094775080680847, 0.720331072807312, 0.37465929985046387, 0.422176331281662, 0.7887778282165527, -0.06856919080018997, -1.2973458766937256, -0.6895166635513306, 0.5709207057952881, 0.020456356927752495, -0.4108749330043793, -1.0417664051055908, 0.6154249310493469, ...
def flat _ to _ sphere ( height, width ) : sphere = np. zeros ( ( height, width, 3 ) ) x _ to _ theta = np. zeros ( width ) y _ to _ phi = np. zeros ( height ) theta _ slope = 2 * np. pi / ( width - 1 ) phi _ slope = np. pi / ( height - 1 ) # linear map from [ y, x ] to [ phi, theta ] for x in range ( 0, width ) : x _ ...
[ -0.6081395149230957, -0.6471452116966248, 0.9153167605400085, -1.2611137628555298, -0.21015487611293793, -0.3436826467514038, 0.0232700165361166, -0.20177969336509705, 0.7010858654975891, 0.6856920719146729, -0.472835510969162, 0.26217684149742126, -0.18491216003894806, 0.02922143414616584...
def property ( variable, prop _ name, value ) : def class _ builder ( original _ class ) : new _ class = original _ class name = get _ name ( new _ class ) _ component _ info [ name ] ['property']. add ( ( variable, prop _ name, value ) ) # rebinds class with name _ class _ binding [ name ] = new _ class return new _ c...
[ -0.2279055267572403, -1.6931874752044678, 0.49861499667167664, 0.3513414263725281, -0.6127146482467651, 0.2710583806037903, -0.44367149472236633, 0.21749161183834076, 0.7759760618209839, -0.2963705360889435, 0.22045868635177612, -0.23255294561386108, 0.5934537053108215, -0.6040603518486023...
def plot _ linear _ fit _ plot ( fig, df, title = none, xlabel = none, ylabel = none, outfn = none, alpha = 0. 05 ) : # calculate linear fit x = sm. add _ constant ( df [ " lidar doppler velocity [ m s $ ^ { - 1 } $ ] " ]. values ) y = df [ " x - band doppler velocity [ m s $ ^ { - 1 } $ ] " ]. values model = sm. ols (...
[ 1.315104365348816, 0.42482060194015503, 1.045925259590149, -0.441030353307724, -0.668347179889679, 0.6329962015151978, 0.5356637239456177, 0.47532907128334045, -0.32358771562576294, -0.16047297418117523, 0.0294404998421669, 0.6832002401351929, 0.31075865030288696, -0.6219182014465332, 0....
def rules _ generator ( path _ to _ csv ) : df = pd. read _ csv ( path _ to _ csv ) for row in df. itertuples ( ) : current = [ ] current. append ( row. direction ) current. append ( row. protocol ) for field in [ " port ", " address " ] : temp = getattr ( row, field ). split ( " - " ) # if the port / address provided ...
[ -0.5363565683364868, -0.03744937852025032, 0.4196825623512268, -0.2956167459487915, 0.44140625, 0.6610245704650879, 0.35505977272987366, 0.4062078893184662, -0.21062219142913818, 0.48435327410697937, 0.6077669858932495, -0.00532677723094821, -0.34201741218566895, -0.3657749891281128, 0.0...
def _ request ( self, service, request, token, method ='get') : try : request _ func = getattr ( requests, method ) if request _ func and callable ( request _ func ) : url, payload = get _ service ( service, request, token ) if not url and payload : return response = request _ func ( url, params = payload ) if response...
[ -0.8442636728286743, 0.5784531831741333, 0.6093029379844666, 0.0879741907119751, 0.43983134627342224, -1.0129939317703247, -1.0231571197509766, -1.2423617839813232, 0.2558448314666748, -0.6191999316215515, 1.2505732774734497, 0.6399542093276978, 0.1262447088956833, -0.10088252276182175, ...
def input _ long _ sequence ( ) : ls = str ( input ('please give me a dna sequence to search :') ) new _ ls = ls. upper ( ) return new _ ls
[ -1.511324167251587, -0.009742110036313534, 0.33741292357444763, -0.30358296632766724, -0.9968276023864746, 0.29146862030029297, -0.5076063871383667, -0.19701004028320312, 0.8867700695991516, -0.05891657993197441, -0.4283469319343567, 0.5844777226448059, -0.12358558923006058, 0.500315189361...
def coarse _ stress ( self ) - > text : return " ". join ( cs. value for cs in self. coarse _ stress _ pattern )
[ 1.0762035846710205, -0.22420541942119598, 0.32761406898498535, -0.5216800570487976, -0.35540103912353516, 0.31249523162841797, -0.11287286132574081, -0.6584028601646423, 0.1364259123802185, 0.3774212598800659, -0.5954042077064514, 0.5970920324325562, -0.3750776946544647, -0.914867699146270...
def print _ current _ products _ in _ list ( list _ of _ product _ objects ) : print ( " * * * * * * * the current products are : * * * * * * * " ) for product in list _ of _ product _ objects : print ( product ) print ( " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * " ) print (...
[ -0.11921874433755875, -1.8547242879867554, 0.8065016269683838, 0.6062798500061035, 0.5697797536849976, 0.9079541563987732, 0.764978289604187, -0.35196393728256226, -0.05301910638809204, 0.38481569290161133, -0.40328601002693176, 1.3405935764312744, -0.1407645046710968, 1.221024990081787, ...
def test _ directory _ clean _ require _ in ( modules, tmp _ path, state _ tree ) : name = tmp _ path / " a - directory " name. mkdir ( ) good _ file = name / " good - file " wrong _ file = name / " wrong - file " wrong _ file. write _ text ( " foo " ) sls _ contents = " " " some _ dir : file. directory : - name : { na...
[ -0.03509938344359398, -0.2695622146129608, 0.599671483039856, -0.42257264256477356, -0.023139195516705513, 0.6882280111312866, 0.08656983822584152, 0.2908047139644623, 0.16009370982646942, 0.14458714425563812, -0.31966572999954224, 0.48622921109199524, 0.2828264534473419, 0.939051806926727...
def _ item _ removed ( self, key, item ) : # print ( " element removed in { } : { } ". format ( id, key ) ) if key = = self. _ index and key in self. _ dataframe. index : # remove the current row self. _ dataframe. drop ( item, inplace = true ) else : # remove the element from the curren col self. unbind ( key, item, n...
[ -0.4188956618309021, -0.5869444608688354, 0.392929345369339, 0.04585430398583412, -0.42797014117240906, -0.31899067759513855, 0.15254387259483337, 1.224846363067627, 0.34327253699302673, 0.18860609829425812, -0.3256986737251282, -0.15371191501617432, -0.29326462745666504, -0.45957159996032...
def result ( self ) : # get the time range used in the analysis st _ ts, end _ ts = self. get _ ts _ range ( ) # get the scaling multiplier if present in the parameters multiplier = self. chart _ params. get ('multiplier ', 1. 0 ) # start a list of building names and energy use values bldg _ names = [ ] values = [ ] # ...
[ -0.4322255551815033, 0.5999329686164856, 0.7240923047065735, -0.27170607447624207, -0.41709473729133606, -0.33102118968963623, 0.725055992603302, -0.3334406614303589, -1.1172430515289307, 0.12620455026626587, 0.7101849913597107, 0.3289584815502167, 0.22145220637321472, 1.111664891242981, ...
def get ( self, session : session = none ) - > response : return jsonify ( sorted ( plugin _ schemas ) )
[ -0.6303643584251404, -1.0960767269134521, 0.3164539933204651, 0.43437251448631287, 0.25690898299217224, -1.5189937353134155, 0.09526165574789047, -0.8924339413642883, 1.0630040168762207, -0.04601917415857315, -1.0058345794677734, 0.5953375697135925, 0.18000368773937225, -0.4666737914085388...
def notification _ handler ( sender, data ) : print ( " { 0 } : { 1 } ". format ( sender, data ) ) global dataflag dataflag = true
[ 1.3907490968704224, 0.02951069548726082, 0.35798513889312744, -0.5749161839485168, -0.001954288687556982, 1.037533164024353, 0.07521450519561768, 1.2405105829238892, -1.1338253021240234, -0.4228920042514801, -1.6795871257781982, 0.7891536951065063, 0.12906205654144287, 0.4352889955043793, ...
def check _ for _ interaction ( particle, dt, h ) : # unpack particle ( particle _ name, p _ x, p _ y, traj _ x, traj _ y ) = particle assert particle _ name in particle _ names if particle _ name in ['electron ','neutrino'] : # these two are stable in our model return false ( beta _ x, beta _ y ) = momentum _ to _ vel...
[ 0.13549935817718506, -0.2699015438556671, 1.0125961303710938, -0.17689043283462524, 0.026907803490757942, 0.9328798651695251, -1.001787781715393, 0.009949509054422379, -0.8714913129806519, 0.046519506722688675, 0.17641770839691162, -0.2734038531780243, -0.7975504398345947, 0.21124455332756...
def main ( * args ) : write _ my _ text ( " my first macro in python! " ) write _ 1 _ to _ 10 ( ) print ( " all done! " )
[ -0.39032572507858276, -0.1032041534781456, 0.3946710526943207, 0.7370604276657104, 1.363938570022583, -0.4232829213142395, 0.8392183184623718, 0.8412872552871704, -0.7311316728591919, -0.04242488741874695, -0.4178561270236969, 0.6525429487228394, -0.09240304678678513, 0.3680834174156189, ...
def get _ tenant _ topics ( self, tenant ) : project = tenant. upper ( ) found = dict ( ) topics = self. get _ topics ( project ) if topics is not none and " topics " in topics : topics = topics ['topics'] for topic in topics : name = topic [ " name " ] if name. endswith ('sync _ data') : found [ " sync _ data " ] = na...
[ 0.2540430426597595, 0.1562322974205017, 0.4879050552845001, -0.25066202878952026, -0.04339196905493736, 0.45863211154937744, -0.9169174432754517, -1.183754801750183, -0.8080728650093079, 0.9870510101318359, -0.01996798813343048, 0.08187572658061981, 1.0248878002166748, -0.04087051749229431...
def comp ( x, y ) : a, b = x c, d = y return array ( ( a * c - b * d, b * c + a * d ) )
[ 0.4368303716182709, -0.49086418747901917, 0.5979034304618835, -1.0711520910263062, 0.4487767219543457, 0.18192103505134583, 0.07751443237066269, -1.2065095901489258, -0.08153998106718063, 0.4369014799594879, 0.05835377052426338, 0.2669539153575897, 0.4205838739871979, -0.46342286467552185,...
def list _ order _ items _ at _ subscription _ level ( self, filter : optional [ str ] = none, expand : optional [ str ] = none, skip _ token : optional [ str ] = none, * * kwargs : any ) - > iterable [ " _ models. orderitemresource " ] : api _ version = self. _ get _ api _ version ('list _ order _ items _ at _ subscri...
[ -0.9101184010505676, 0.1049824208021164, 1.135379672050476, 0.6109709143638611, -0.5184634327888489, -0.32894647121429443, -0.6301516890525818, -1.0138413906097412, 0.23024679720401764, 0.08943620324134827, -0.26927414536476135, 0.8341597318649292, 0.0915379449725151, 0.2189790904521942, ...
def _ format _ device _ metadata ( self, label, description, id ) : return label +'('+ description + ','+ id +') '
[ -0.4581243693828583, -0.30600881576538086, 0.3482838571071625, -0.5982993841171265, 0.46881628036499023, 0.5168461203575134, -1.8441803455352783, -0.31129708886146545, -0.2985258996486664, 0.5702219009399414, 1.2647993564605713, 0.6437965631484985, -0.03901835158467293, 0.00149810651782900...
def csdfilename ( self ) : return self. csd
[ 1.6321204900741577, -1.5483827590942383, 0.42181363701820374, 0.10319007933139801, -0.9568236470222473, 1.5933005809783936, 0.03489692136645317, 0.5998439788818359, -0.471743643283844, -0.8513315320014954, 0.7409143447875977, -0.19176502525806427, 0.46822643280029297, 0.007013367954641581,...
def luma _ effect _ strength ( self ) : # type : ( ) - > float return self. _ luma _ effect _ strength
[ 1.101474642753601, -0.6526947021484375, 0.062309905886650085, -0.06780695170164108, 0.26225417852401733, 0.33300116658210754, 0.22503261268138885, 0.2410067915916443, 0.4559387266635895, -1.094749927520752, -0.830095112323761, 0.05724729597568512, -1.0073633193969727, -0.22466616332530975,...
def process _ file _ format ( self, context ) : if self. database. get _ authorised ( telegram _ id = context [ " from " ] [ " id " ] ) : prev _ file _ path = self. database. get _ filepath ( context [ " from " ] [ " id " ] ) if prev _ file _ path : text = context [ " text " ]. lower ( ) if text in self. document _ con...
[ -0.1911247968673706, -0.705879271030426, 0.8761141896247864, 0.5390768051147461, -0.016405317932367325, -0.04011838138103485, 0.22584296762943268, -0.19218000769615173, -0.5116495490074158, 0.38169947266578674, 0.48592841625213623, 0.24572719633579254, -0.6955781579017639, 0.73856830596923...
def read ( filename, record _ skip = 2 ) : f = open ( filename ). read ( ). split ('\ n') nt, dt, nr = f [ 0 ]. strip ( ). split ('' ) nt = int ( nt [ 0 : ] ) dt = float ( dt ) nr = int ( nr ) solutions = [ 0 ] * nr skip = 0 for i in range ( nr ) : solutions [ i ] = np. array ( f [ 1 + skip + nt * i : 1 + skip + nt * (...
[ -0.4957177937030792, 0.15550579130649567, 0.8397712111473083, -0.083979032933712, 0.45377418398857117, -0.017332281917333603, 0.9540385007858276, 0.10602577775716782, -0.8076324462890625, 0.9165521264076233, -0.14784486591815948, 0.23466786742210388, 0.5595198273658752, -0.0344283059239387...
def detach ( self ) : pass
[ 0.661406397819519, -1.0560017824172974, 0.097434401512146, 0.04047956317663193, -0.7151461839675903, 1.245400071144104, 1.175373911857605, 0.08659134060144424, -0.38073089718818665, -0.7665804624557495, -0.5103625655174255, 0.14667433500289917, -0.619036078453064, -0.0707482174038887, -0...
def check _ tenant ( self, tenant ) : project = tenant. upper ( ) # things that sould be present in ams definitions topics _ lookup = [ " sync _ data ", " metric _ data " ] subs _ lookup = [ " ingest _ sync ", " ingest _ metric ", " status _ sync ", " status _ metric ", " archive _ metric " ] users _ lookup = [ " proje...
[ 0.6957489252090454, -0.289103239774704, 0.5058940649032593, 0.020728938281536102, -0.23302346467971802, 0.42441773414611816, -0.4376893639564514, -0.198313370347023, -0.0616031289100647, 0.4378770589828491, 0.45513057708740234, 0.6791428923606873, 0.4699225127696991, 0.6489438414573669, ...
def finalize ( self ) : pass
[ -0.22776636481285095, -0.9896770715713501, 0.14085856080055237, 0.2445247620344162, 0.27537378668785095, 0.6752245426177979, 0.7339492440223694, -0.14556825160980225, -0.006433434784412384, -1.2477341890335083, -0.676364541053772, 0.08866133540868759, -0.43179047107696533, 1.08182966709136...
def menu ( ) : # getting the data print ( " wait a second while i am getting the current league version " ) current _ version = connectivity. get _ current _ version ( ) print ( " latest version retrieved! " ) print ( " \ ngetting the champion's data for that patch - might take a milisecond or two " ) championsdata = c...
[ 0.6356849074363708, -0.9544582366943359, 0.8315426111221313, 0.5402608513832092, 0.14584288001060486, 0.7474979162216187, 0.053105905652046204, -0.4490584433078766, 0.09087877720594406, -0.7859893441200256, -0.003845148952677846, 0.6007874608039856, -0.014941392466425896, -0.17132334411144...
def is _ short _ option ( argument ) : return len ( argument ) > = 2 and argument [ 0 ] = ='-'and argument [ 1 ]! ='- '
[ -0.34050625562667847, 0.42849981784820557, 0.5746914744377136, 0.4045044779777527, -0.20377402007579803, 0.6142711639404297, -0.14058110117912292, -0.28064802289009094, 0.7680630087852478, 0.6553784608840942, -0.7640464901924133, 0.835354208946228, 0.5728990435600281, 0.19312386214733124, ...
def handle _ jsonrpc ( self, request _ text ) : response = self. _ marshaled _ dispatch ( request _ text ) sys. stdout. write ('content - type : { 0 } \ r \ n '. format ( self. json _ config. content _ type ) ) sys. stdout. write ('content - length : { 0 : d } \ r \ n '. format ( len ( response ) ) ) sys. stdout. write...
[ 0.19519343972206116, -0.8259029984474182, 0.8505154848098755, -0.7759051322937012, 0.2152876853942871, -0.3765852451324463, -0.06423699110746384, -0.9206090569496155, -0.3521362841129303, -0.3408992886543274, 0.0451471284031868, 0.13897711038589478, -0.4980900287628174, 0.5814810991287231,...
def run ( labels _ path, predictions _ path, output _ path ) : labels = extract _ from _ json ( labels _ path,'key ','class') proba = extract _ from _ json ( predictions _ path,'key ','probabilities ', proc = ( lambda x : x [ 0 ] ) ) keys = set ( labels. keys ( ) ) & set ( proba. keys ( ) ) labels = np. array ( [ label...
[ -0.3626808524131775, -0.8523246645927429, 0.6824874877929688, 0.1585489809513092, 0.5074437856674194, 0.30676785111427307, 0.04517296701669693, 0.6616663932800293, -0.9412652850151062, 0.6367435455322266, 0.8501209020614624, 0.9606653451919556, 0.7944602966308594, -0.7246289253234863, 0....
def compute _ projection _ matrix ( self, znear, zfar, fov, aspect _ ratio, degrees ) : k = torch. zeros ( ( self. _ n, 4, 4 ), device = self. device, dtype = torch. float32 ) ones = torch. ones ( ( self. _ n ), dtype = torch. float32, device = self. device ) if degrees : fov = ( np. pi / 180 ) * fov if not torch. is _...
[ -0.4653305113315582, -0.09341046214103699, 0.8286313414573669, 0.30925482511520386, -0.5901098251342773, -0.6621611714363098, -0.08410919457674026, 0.31389811635017395, 0.4916270077228546, 0.6142164468765259, 0.0803397074341774, -0.4823831021785736, -0.11476340889930725, -0.013318998739123...
def get _ connectivity ( n _ mod, n _ ex _ mod, inter _ conn, xyz, cij ) : synapses = [ ] delay _ matrix = np. zeros ( ( n _ mod, n _ mod ) ) for i in range ( n _ mod ) : x, y, z = xyz [ i ] for j in range ( n _ mod ) : if cij [ i ] [ j ] > 0 : # delay = distance / speed, speed = 2 m / s x2, y2, z2 = xyz [ j ] delay _ ...
[ 0.025657638907432556, -0.7660863995552063, 0.7413101196289062, 0.516485333442688, 0.006114978343248367, -0.47396352887153625, 0.7944090962409973, 1.012309193611145, 0.33129221200942993, 0.5074787139892578, -0.15604569017887115, -0.673737645149231, -0.9413557648658752, -0.000271290307864546...
def _ _ repr _ _ ( self ) : if self. landmark! = cdna _ start _ codon : return " cdnacoord ( % d, % d,'% s') " % ( self. coord, self. offset, self. landmark ) else : return " cdnacoord ( % d, % d ) " % ( self. coord, self. offset )
[ -0.0924111008644104, -0.9221420288085938, 0.5595214366912842, -1.513307809829712, -0.8154705166816711, 0.8595234155654907, 0.08697796612977982, -0.403091698884964, 0.35101446509361267, 0.23014356195926666, -0.07313232868909836, 1.0547986030578613, 0.9657424092292786, -0.2791338264942169, ...
def _ _ parse _ prototype _ for _ user _ def _ un _ op ( self ) - > optional [ kal _ ast. prototype ] : self. _ _ eat _ tok ( ) #'unary'if self. curr _ tok. type! = tokentype. operator : raise parseerror ( " expected operator after'unary'" ) fn _ name = f " unary { self. curr _ tok. value } " self. _ _ eat _ tok ( ) # ...
[ -0.7001593112945557, 0.893883228302002, 0.5782855153083801, 0.4935758411884308, -0.658733606338501, -1.1643569469451904, 0.20177975296974182, 0.1714327335357666, 0.35166501998901367, 0.5709853172302246, 0.07236982882022858, -0.5220073461532593, 0.43407875299453735, 0.058748021721839905, ...
def data ( self ) : return self. _ data
[ -0.5384597778320312, -0.5367848873138428, 0.059275392442941666, -0.5492574572563171, -0.2639288902282715, 1.3846938610076904, -0.13776107132434845, -0.7707481980323792, 0.5946593284606934, -1.8873977661132812, -0.3920840919017792, 0.7535884380340576, 0.0695749819278717, -0.6371542811393738...
def target _ portal _ member ( self, target _ portal _ member ) : self. _ target _ portal _ member = target _ portal _ member
[ -0.7298348546028137, -1.3941203355789185, -0.15056845545768738, -0.19849397242069244, -0.4340357184410095, 1.7179840803146362, 0.05660296976566315, 0.026889335364103317, -0.3941337466239929, 0.060020811855793, -0.1414281725883484, 0.554511308670044, 0.032485656440258026, -1.059402346611023...
def _ build _ caption _ to _ image _ rep _ net ( caption _ rep, reuse = true, keep _ ph = none ) : net = caption _ rep net = slim. layers. fully _ connected ( net, config [ " hidden _ size " ], activation _ fn = tf. nn. relu ) net = slim. dropout ( net, keep _ prob = keep _ ph ) net = slim. layers. fully _ connected ( ...
[ -0.41754481196403503, -0.3146153688430786, 0.6388832330703735, -0.5487743616104126, 0.038088418543338776, 0.12517663836479187, 0.35219883918762207, 0.47094038128852844, 0.8394846320152283, 0.4540785849094391, -0.4844544231891632, 0.09510352462530136, 0.48234251141548157, -0.413958430290222...
def add _ calculation ( self, caption, formula, datatype, role, type, hidden ) : # dynamically create the name of the field name ='[ calculation _ { } ] '. format ( str ( uuid4 ( ). int ) [ : 18 ] ) field = self. add _ field ( name, datatype, role, type, caption, hidden ) field. calculation = formula return field
[ 0.3663567006587982, 0.6187378168106079, 0.8091457486152649, -0.2055589258670807, 0.10641264915466309, 0.4038284420967102, -0.09746367484331131, 0.026123518124222755, -0.327101469039917, -0.5355895161628723, -0.8867353200912476, -0.8011985421180725, -0.12660466134548187, -0.2561650276184082...
def idle _ blockchain _ policy ( blockchain _ alice, bob ) : random _ label = b'label : / /'+ os. urandom ( 32 ) policy = blockchain _ alice. create _ policy ( bob, label = random _ label, m = 2, n = 3 ) return policy
[ 0.10773847997188568, 0.22999607026576996, 0.43937501311302185, -0.9398892521858215, 1.2164121866226196, 1.5949716567993164, -0.8672424554824829, -0.8641798496246338, 0.7940368056297302, 0.6292697787284851, -0.9258503317832947, 0.16301441192626953, -1.4052114486694336, -1.1341278553009033, ...
def lessequalfunc ( self, data ) : return self. field. sortvalue ( data ) < = \ self. field. adjustedcomparevalue ( self. value )
[ 0.27510514855384827, -0.6733651757240295, 0.4557327628135681, -0.8998602628707886, -0.27636563777923584, 0.25577056407928467, 0.22850850224494934, -1.3950185775756836, 0.05471181869506836, -0.756892204284668, -0.8624151945114136, 0.040774472057819366, -0.6271445751190186, 0.213105484843254...
def download ( browser, download _ dir ) : browser. command _ executor. _ commands [ " send _ command " ] = ( " post ",'/ session / $ sessionid / chromium / send _ command') params = {'cmd':'page. setdownloadbehavior ','params': {'behavior':'allow ','downloadpath': download _ dir } } browser. execute ( " send _ command...
[ 0.036011844873428345, -0.3851171135902405, 0.5487378239631653, 0.9220021963119507, 0.9811654686927795, -0.11576162278652191, 0.42109447717666626, -0.42721107602119446, 0.6327084898948669, 0.39844009280204773, 0.17861714959144592, 0.9225241541862488, -0.418996661901474, 0.5408972501754761, ...
def focal _ loss ( gamma = 2., alpha =. 25 ) : def focal _ loss _ fixed ( y _ true, y _ pred ) : pt _ 1 = tf. where ( tf. equal ( y _ true, 1 ), y _ pred, tf. ones _ like ( y _ pred ) ) pt _ 0 = tf. where ( tf. equal ( y _ true, 0 ), y _ pred, tf. zeros _ like ( y _ pred ) ) return - k. mean ( alpha * k. pow ( 1. - pt ...
[ -0.017718208953738213, -0.607525110244751, 0.24557697772979736, -0.48497822880744934, -0.7786018252372742, -0.14402270317077637, 0.5105418562889099, 0.29409554600715637, -0.14519493281841278, 0.44234803318977356, 0.2381010204553604, 0.7297490835189819, 1.00141179561615, 0.45358946919441223...
def test _ sample _ data _ binary ( self ) : class userbinary ( base ) : _ _ tablename _ _ = " users _ binary " id = column ( integer, primary _ key = true ) name = column ( string ( 256 ) ) fullname = column ( string ( 256 ) ) nickname = column ( string ( 256 ) ) comments = column ( text ) age = column ( integer ) pas...
[ 0.134304940700531, -0.042396094650030136, 0.6181089282035828, -0.050802793353796005, -0.11233124136924744, 0.2646530270576477, -0.23145544528961182, -1.0178802013397217, 0.28325602412223816, -0.08810583502054214, -0.983234703540802, -0.19023749232292175, 0.01637936756014824, 0.315843939781...
def clear ( self ) : self. _ widget. clear ( )
[ 0.7306005358695984, 0.15736010670661926, 0.125498965382576, -0.5980068445205688, -0.05851577967405319, 0.6213933229446411, 0.009828124195337296, -0.3244398236274719, -0.4377289414405823, -0.6487259268760681, 0.049874503165483475, 1.1558184623718262, 0.5164403319358826, 0.38618576526641846,...
def home ( request ) : days = day. objects. order _ by ( " - date " ) [ : 14 ] site _ hits = [ ] site _ visitors = [ ] feed _ hits = [ ] feed _ visitors = [ ] paths = { } i = 0 for day in days : stats = day. the _ stats ( ) site _ hits. append ( [ time. mktime ( day. date. timetuple ( ) ) * 1000, int ( stats. get ( " h...
[ 0.12236952036619186, 0.372394323348999, 0.6503356695175171, 0.041843611747026443, -0.1940596103668213, 0.02924893982708454, 1.2298812866210938, -0.3793669044971466, 0.10323944687843323, -0.36642688512802124, 1.1331766843795776, -0.16164040565490723, 0.4329214096069336, 0.5922131538391113, ...
def test _ query _ single _ zipline _ bundle ( self ) : def mock _ download _ bundle _ file ( code, f, * args, * * kwargs ) : prices = pd. concat ( dict ( close = pd. dataframe ( dict ( fi12345 = [ 48. 90, 49. 40, 55. 49, 56. 78 ], fi23456 = [ 59. 5, 59. 59, 59. 34, 51. 56, ] ), index = [ " 2018 - 04 - 01t09 : 30 : 00 ...
[ -0.20441585779190063, 0.3328308165073395, 0.9897567629814148, -0.07789873331785202, 0.6885820627212524, -0.08553137630224228, 1.0591846704483032, 0.0026125323493033648, -0.4328303933143616, -0.1841006577014923, -0.4203542470932007, -0.5968520641326904, -0.3680237829685211, 0.14129661023616...
def bssc _ is _ up ( self, log ) : if self. _ bssc _ is _ up is none : self. _ bssc _ is _ up = self. bssc _ server. bes _ server _ host. sh _ is _ up ( log ) if not self. _ bssc _ is _ up : self. bssc _ failed = true return self. _ bssc _ is _ up
[ -0.7769098877906799, -0.15227340161800385, 0.9270927906036377, 0.5704624652862549, 0.029821716248989105, -0.33702772855758667, -0.5173379778862, -0.6768763065338135, -0.00657927431166172, 0.1223849281668663, -0.6059800386428833, 0.9941125512123108, -0.12871001660823822, -0.253569632768631,...
async def save _ teacher _ app ( self, message _ id : int, teacher _ id : int ) - > none : mycursor, db = await the _ database ( ) await mycursor. execute ('''insert into teacherapplication ( message _ id, teacher _ id ) values ( % s, % s )'' ', ( message _ id, teacher _ id ) ) await db. commit ( ) await mycursor. clos...
[ -0.5471352338790894, -0.27902600169181824, 0.5657074451446533, -0.002372323302552104, 0.6876725554466248, 0.6927280426025391, 0.11422029137611389, -0.20043621957302094, -0.5646113753318787, 1.4453195333480835, -0.5025559067726135, 0.12961667776107788, -1.305829405784607, 1.2013193368911743...
def getboardastuple ( self ) : return tuple ( map ( tuple, self. board ) )
[ -1.5458184480667114, 0.7200390696525574, 0.7544488906860352, 0.4158534109592438, 0.2757457494735718, 0.1855209469795227, -0.5908482074737549, 0.000774092972278595, -0.24030692875385284, 0.32942938804626465, -0.7721836566925049, -0.6726171374320984, -0.7767252922058105, -0.19844822585582733...
def _ translate _ _ interfaces ( input _ yang _ obj, translated _ yang _ obj = none ) : list _ obj = [ ] for k, listinst in input _ yang _ obj. interface. iteritems ( ) : interface _ obj = translated _ yang _ obj. ifm. interfaces. interface. add ( name = k ) inner _ obj = _ translate _ _ interfaces _ interface ( listin...
[ -0.9257755279541016, 0.07631915807723999, 0.41550272703170776, 0.03009381890296936, -0.26212602853775024, -0.24006855487823486, 1.0055663585662842, -0.26555949449539185, 1.0090547800064087, -0.15450967848300934, -1.0897587537765503, -0.6627640128135681, -0.5130996704101562, 0.4671301841735...
def _ parse _ parameter _ file ( self ) : raise notimplementederror
[ -0.5377589464187622, -0.8208427429199219, 0.38624247908592224, 0.012447839602828026, 0.18307282030582428, 1.2696921825408936, 0.46113625168800354, 0.6551750302314758, -1.3277201652526855, 0.7930538654327393, 0.6105903387069702, -0.2768239378929138, 0.2453039139509201, 0.4080161452293396, ...
def synthetic _ obs _ distribution ( rg, var _ names, hydro _ names, band ='c ', relh _ slope = 0. 001, par _ var = 0. 05 ) : uniform _ samples = rg. random ( size = 1000000, dtype = np. float32 ) synthetic _ obs = dict ( ) for var _ name in var _ names [ : - 1 ] : var _ dict = dict ( ) m _ arr = np. empty ( len ( hydr...
[ -0.06965387612581253, -0.2857252359390259, 0.9046091437339783, -0.33506307005882263, -0.2512667179107666, 0.17353740334510803, 0.7592166662216187, 0.2666568458080292, -0.676013171672821, 0.7240983247756958, -0.6049320101737976, 0.5251926183700562, 0.020561430603265762, 0.4734138548374176, ...
def start ( self ) : timer = timer ( self. frequency _ seconds, self. _ run _ nanny ) timer. name = " kadabrabatchednanny " self. timer = timer timer. start ( )
[ 0.6886987090110779, -0.06541843712329865, 0.31460028886795044, 0.45682293176651, 0.33368119597435, -0.6495697498321533, -0.46985751390457153, 0.3098544776439667, -0.2342231422662735, -1.1235941648483276, -0.7697815895080566, 1.1779680252075195, 0.6001334190368652, 1.4880015850067139, 0.6...
def get _ data ( filename ) : # hack to read just dbf file # https : / / github. com / geospatialpython / pyshp / issues / 35 dbf = shapefile. reader ( dbf = open ( filename, " rb " ) ) rows = dbf. records ( ) fields = dbf. fields [ 1 : ] field _ names = [ field [ 0 ] for field in fields ] df = pd. dataframe ( rows ) d...
[ 0.19679757952690125, 0.4366524815559387, 0.3277221918106079, -0.7224196195602417, 0.3169839084148407, 0.43772438168525696, 0.09141629189252853, 0.3711767792701721, -0.5346129536628723, -0.6559662222862244, -0.2044222205877304, 0.8468800187110901, -0.3380306363105774, -0.6921619772911072, ...
def eventhooks ( self ) : log. debug ( " executing volatility eventhooks plugin on " " { 0 } ". format ( self. memdump ) ) results = [ ] self. _ _ config ( ) command = self. plugins [ " eventhooks " ] ( self. config ) for session in command. calculate ( ) : shared _ info = session. find _ shared _ info ( ) if not share...
[ -0.3630002439022064, -1.391951084136963, 0.7352631092071533, -0.39988142251968384, 0.9152126908302307, -0.35254761576652527, -0.15934555232524872, -0.28153517842292786, 0.09045497328042984, 0.833659827709198, -0.4875493347644806, 0.18074199557304382, -0.6863905787467957, 0.3374795019626617...
def data ( self, key = none ) : parent _ data = super ( globalexplanation, self ). data ( key = key ) if key is none : return self. _ global _ data ( parent _ data ) elif key = = - 1 : global _ data = self. _ global _ data ( parent _ data ) specific = none if interpretdata. specific in parent _ data : specific = parent...
[ -0.14748309552669525, 0.20074105262756348, 0.7816504240036011, -0.8646671772003174, -0.7406308650970459, 0.6482451558113098, 0.26126840710639954, 1.1650828123092651, -0.11592914909124374, 0.18319955468177795, 0.299038827419281, 0.551856517791748, -0.3573715090751648, 0.8892849683761597, ...
def _ _ init _ _ ( self ) : self. num _ buckets = 4 self. buckets = [ none ] * 15000
[ 0.4044407308101654, 0.5840191841125488, 0.2960304617881775, 0.36028438806533813, 0.49670568108558655, -0.8956971764564514, 0.41254910826683044, -0.3413606584072113, 0.23661619424819946, -1.125544786453247, -1.9045504331588745, -0.7079693078994751, -0.023037221282720566, 0.0969439446926117,...
def processqueryvsm ( self, q ) : keywords = q. split ('' ) keywords = [ w. lower ( ) for w in keywords ] keywords = [ w for w in keywords if w not in self. stopwords ] weighted = { } for k in keywords : if k not in weighted : weighted [ k ] = 0 weighted [ k ] + = 1 nzvals = [ ] rowinds = [ ] colinds = [ ] for key, val...
[ 0.07690460979938507, -0.358818382024765, 0.5638979077339172, -0.35686343908309937, -0.6121843457221985, -0.1871781349182129, -0.5944986939430237, -0.5340298414230347, 0.5029873251914978, 0.9164307117462158, 0.7644467949867249, -0.21640615165233612, -0.36078378558158875, 0.6174315214157104,...