text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def smear _ selection ( data, model = none ) : # sanity check. if we are not dealing with a sas data1d # object, just return none # this checks for 2d data ( does not throw exception because fail is common ) if data. _ _ class _ _. _ _ name _ _ not in ['data1d ','theory1d'] : if data is none : return none elif data. dq... | [
0.2728428840637207,
0.0874776616692543,
0.6269740462303162,
-0.08796822279691696,
-0.945773184299469,
-0.22503875195980072,
0.3304974436759949,
-0.36832699179649353,
0.8068814277648926,
-0.6134746074676514,
0.29201558232307434,
0.10684866458177567,
-0.049133721739053726,
0.6364381313323975... |
def example _ 3 ( ) : def plus ( a, b ) : return a + b plus. _ _ name _ _ = " + " x : tuple [ int, float, int, float ] = ( 1, 2. 3, 3, 4. 2 ) x0 = 0. 0 res = fold ( x, plus, x0, debug = true ) print ( f " fold ( { x }, { plus. _ _ name _ _ }, { x0 } ) = { res } " ) | [
-0.17534787952899933,
0.14697079360485077,
0.6615937352180481,
-0.0006418099510483444,
-1.2545620203018188,
0.43753525614738464,
-0.08203136920928955,
0.09181045740842819,
0.3659904897212982,
0.05768332630395889,
-0.46244344115257263,
-0.18619674444198608,
1.0973542928695679,
-0.0846615955... |
def search ( self, index _ node ) : if self. is _ empty ( ) : print ( " list is empty " ) current = self. head count = 0 while count < = index _ node : if count = = index _ node : return current. value count + = 1 current = current. next | [
-0.013853926211595535,
0.7381255626678467,
0.6573199033737183,
0.3035711348056793,
0.3933418095111847,
-0.3388345241546631,
0.35534602403640747,
0.040643639862537384,
-0.224141463637352,
-0.416967511177063,
-0.0684896856546402,
0.4841901957988739,
-0.8383110165596008,
0.4204672873020172,
... |
def repetition _ count ( self ) - > union [ int, parameterdeclaration ] : return self. _ _ repetition _ count | [
0.38522735238075256,
0.38485464453697205,
0.5687850117683411,
0.07588516175746918,
1.1945165395736694,
-0.08016256988048553,
0.9363836646080017,
0.7753132581710815,
0.019096553325653076,
0.154864102602005,
-0.13640354573726654,
0.8807967305183411,
-0.09572851657867432,
0.5084170699119568,
... |
def get _ account ( self, accountid ) : return self. trading _ api _ request ('get ','/ api / v1 / accounts /'+ accountid ) | [
-0.849186360836029,
0.43360209465026855,
-0.015728935599327087,
0.5587827563285828,
1.0380197763442993,
-0.4444348216056824,
0.10695503652095795,
-0.805038332939148,
1.2907174825668335,
-0.16757746040821075,
0.340343177318573,
1.8901569843292236,
-0.23638729751110077,
0.2916691303253174,
... |
def _ callback ( self ) - > none : self. _ schedule _ call ( ) try : self. _ periodic _ callable ( ) except exception as exception : # pylint : disable = broad - except if not self. _ exception _ callback : # pragma : nocover raise self. _ exception _ callback ( self. _ periodic _ callable, exception ) | [
0.4567168951034546,
0.5518627762794495,
0.7042344808578491,
0.4590395390987396,
-0.48121777176856995,
-0.4397588074207306,
0.2716712951660156,
-0.2754910886287689,
0.3375130593776703,
-0.06243657320737839,
1.0368653535842896,
-0.02707192674279213,
0.10263755172491074,
0.045752838253974915,... |
def test _ atomic _ id _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 2. xsd ", instance = " nistdata / atomic / id / schema + instance... | [
0.1290835738182068,
-0.6408591270446777,
0.47917845845222473,
0.7688450217247009,
-0.20209886133670807,
0.0030177265871316195,
0.4361652433872223,
-0.3958466351032257,
-0.14616304636001587,
0.4180540442466736,
-0.1556703895330429,
0.2574162185192108,
0.1578950136899948,
0.11269667744636536... |
def read _ all ( self ) - > optional [ bytes ] : return self. read ( - 1 ) | [
0.25980252027511597,
0.0797179564833641,
0.6376605033874512,
0.9249902963638306,
0.8149013519287109,
-0.021519022062420845,
-1.3578964471817017,
-0.7943611741065979,
0.022208796814084053,
-0.9952533841133118,
0.6120215058326721,
0.3588704764842987,
-1.0752419233322144,
-0.2506445050239563,... |
def stark _ assert _ eq ( exp _ val, actual _ val, code : starkmsg, message : optional [ str ] = none ) : if exp _ val! = actual _ val : eq _ log = f'{ exp _ val }! = { actual _ val }'message = f'{ message } \ n { eq _ log }'if message else eq _ log raise starkexception ( code, message ) | [
0.21444366872310638,
-0.47307291626930237,
0.47825855016708374,
0.9071812629699707,
0.45107704401016235,
0.6438573598861694,
-0.11267570406198502,
0.2758273780345917,
-0.137612983584404,
0.04270521551370621,
0.5336377024650574,
0.8166883587837219,
0.09963855892419815,
1.1321077346801758,
... |
def _ _ init _ _ ( self, * args ) : pass | [
0.17309658229351044,
-0.5959532260894775,
0.3741130828857422,
0.9378101229667664,
1.0776631832122803,
0.46381834149360657,
0.31563350558280945,
0.10038095712661743,
-0.7510321736335754,
-0.9708048701286316,
-0.3367096185684204,
-0.08203879743814468,
-0.19481827318668365,
0.6378073692321777... |
def nm _ available ( ) - > bool : return bool ( nm ) | [
-0.9197866916656494,
0.13459189236164093,
0.2765161991119385,
0.46400997042655945,
-0.7828035950660706,
1.048670768737793,
-1.511042594909668,
-0.062002770602703094,
-0.5648272037506104,
0.4335898160934448,
-0.344984769821167,
-0.3219912052154541,
-0.10703760385513306,
0.7982831001281738,
... |
def set _ gpio _ low ( self, gpio ) : self. _ write _ command ( [ lcdbackpack. gpio _ low, gpio ] ) | [
0.28971701860427856,
0.852214515209198,
0.5337100625038147,
-0.1718059778213501,
0.5019506216049194,
0.6121516227722168,
0.6237508654594421,
-0.5338758230209351,
0.6060271263122559,
-0.760866105556488,
-0.44624778628349304,
1.3774646520614624,
-1.1086907386779785,
0.5122352838516235,
-0.... |
def plotscatter ( x, y, xlabel, ylabel ) : plt. scatter ( x, y ) plt. xlabel ( xlabel ) plt. ylabel ( ylabel ) plt. show ( ) | [
0.37012672424316406,
-0.05605419725179672,
0.518349826335907,
-0.5317729115486145,
-0.5514794588088989,
1.158626914024353,
-0.8948035836219788,
0.2771676182746887,
-0.18895280361175537,
0.20109418034553528,
0.17575566470623016,
1.5013617277145386,
0.4657134413719177,
-0.5146449208259583,
... |
def run ( bot _ loc, qnav _ loc, scnav, bot _ state, qmove _ nav, logger = none, testqueue = none ) : # setup logging if logger is none : logging. config. fileconfig ( " logging. conf " ) # todo this will break if not called from qwe. add check to fix based on cwd? logger = logging. getlogger ( _ _ name _ _ ) logger. d... | [
-0.3515320122241974,
-1.5845377445220947,
0.7000634074211121,
0.11870934069156647,
-0.12153000384569168,
0.5957541465759277,
0.8942610621452332,
0.8259102702140808,
0.5328768491744995,
-0.4615117907524109,
-0.3935481011867523,
0.5812914371490479,
0.5468496680259705,
-0.24747708439826965,
... |
def test _ parse _ id _ to _ taxonomy _ file ( self ) : lines = id _ to _ taxonomy _ string. splitlines ( ) p = blasttaxonassigner ( { } ) expected = { \ " ay800210 " : " archaea ; euryarchaeota ; halobacteriales ; uncultured ", \ " eu883771 " : " archaea ; euryarchaeota ; methanomicrobiales ; methanomicrobium et rel. ... | [
0.8047774434089661,
-1.0553150177001953,
0.4226541221141815,
-0.5496416091918945,
0.39374080300331116,
0.09439929574728012,
0.4626261293888092,
0.5427417755126953,
-0.5754597783088684,
-0.2437724769115448,
-0.23181787133216858,
-0.013394461944699287,
0.5637582540512085,
-0.8446352481842041... |
def seen ( request, pk = none ) : companion = user. objects. get ( pk = pk ) messages = chatmessage. objects. filter ( q ( sender = request. user, receiver = companion ) | q ( sender = companion, receiver = request. user ) ) \. filter ( seen = false ) messages. update ( seen = true ) return response ( { " code " : 1 } ... | [
-0.5536031723022461,
-0.2442496120929718,
0.5702517032623291,
-0.5739560127258301,
-0.17570124566555023,
0.3181976079940796,
0.940725564956665,
-0.6212578415870667,
-0.39915406703948975,
0.04123590886592865,
-0.8666166663169861,
0.3090110719203949,
0.06085405871272087,
0.8020986914634705,
... |
def index ( ) : range _ size = db. execute ( " select count ( * ) as count from finance where finance _ id = : finance _ id ", finance _ id = session [ " user _ id " ] ) size = range _ size [ 0 ] ['count'] get _ data = db. execute ( " select * from finance where finance _ id = : finance _ id order by symbol, name ", fi... | [
-0.26394423842430115,
-0.005561978090554476,
0.8670760989189148,
-0.21198634803295135,
0.5472238659858704,
-0.6754624247550964,
0.45885536074638367,
-0.35205399990081787,
-0.027386212721467018,
0.5337259769439697,
-0.42844903469085693,
-0.28298255801200867,
0.32456281781196594,
0.098009116... |
def test _ propensity _ migration _ herb ( self ) : assert self. o. propensity _ migration _ herb = = 0 | [
0.433044970035553,
-0.05621930584311485,
0.4696856439113617,
1.967427134513855,
1.3629674911499023,
1.6263850927352905,
0.47951561212539673,
0.25674697756767273,
0.3181886374950409,
-0.11182789504528046,
0.3653438091278076,
0.15239021182060242,
0.055885061621665955,
-0.22444990277290344,
... |
def dynamically _ scrape _ combined _ data ( data _ filename, sales _ filename, interval, num _ retries = 10 ) : old _ list = [ ] def job ( old _ list ) : new _ list = collect _ all _ featured _ links ( ) new _ links = remove _ old _ links ( old _ list, new _ list ) bad _ links = collect _ bad _ links ( new _ links ) c... | [
0.036094602197408676,
-0.4875963032245636,
0.6664710640907288,
1.2867664098739624,
1.03343665599823,
0.6451846957206726,
0.20326656103134155,
0.27323007583618164,
-1.0247776508331299,
-0.7643799185752869,
0.49251610040664673,
1.0533732175827026,
0.23729710280895233,
0.03401381894946098,
... |
def makepropertyvalue ( cname = none, uvalue = none, nhandle = none, nstate = none ) : opropertyvalue = createunostruct ( " com. sun. star. beans. propertyvalue " ) if cname! = none : opropertyvalue. name = cname if uvalue! = none : opropertyvalue. value = uvalue if nhandle! = none : opropertyvalue. handle = nhandle if... | [
0.22221264243125916,
-0.3442591428756714,
0.697812020778656,
0.4134626090526581,
-0.9712671637535095,
0.25559502840042114,
-0.3681791424751282,
0.2940530776977539,
-0.10067029297351837,
-1.6689785718917847,
-0.2322271764278412,
0.12309922277927399,
0.33305102586746216,
-1.0223556756973267,... |
def getkeywordplan ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!') | [
-0.7105104327201843,
0.3171347975730896,
0.6002653241157532,
0.613215446472168,
-0.5152279138565063,
0.42823752760887146,
-0.10916262865066528,
-1.1163567304611206,
0.4441030025482178,
0.32532641291618347,
-0.3594155013561249,
1.8662437200546265,
-1.224184513092041,
0.17284893989562988,
... |
def reset ( self ) : lat, lon, ve, vn, h, p, r, stamp = self. _ init _ values self. lat _ arr [ 0 ] = np. deg2rad ( lat ) self. lon _ arr [ 0 ] = np. deg2rad ( lon ) self. ve _ arr [ 0 ] = ve self. vn _ arr [ 0 ] = vn self. cnb _ arr [ 0 ] = dcm. from _ hpr ( h, p, r ) self. traj = pd. dataframe ( index = pd. index ( [... | [
-0.562554121017456,
0.15093669295310974,
0.517900288105011,
-0.16934190690517426,
0.8605194091796875,
0.07688536494970322,
-0.057603877037763596,
0.13408105075359344,
-0.7936436533927917,
-0.47307032346725464,
-0.09670991450548172,
0.02874506078660488,
0.18391983211040497,
0.16292443871498... |
def compute _ tot _ intersection ( bboxes ) : all _ combinations = itertools. combinations ( bboxes, 2 ) intersections = [ compute _ intersection ( * combination ) for combination in all _ combinations ] tot _ area = sum ( intersections ) return tot _ area | [
-0.3845415711402893,
0.3502112329006195,
0.7529740929603577,
0.21794573962688446,
0.007883857935667038,
-0.9546511769294739,
1.0605809688568115,
0.7522942423820496,
0.09898960590362549,
1.06114661693573,
-0.1753031313419342,
-1.2528196573257446,
-0.060244347900152206,
-0.2867511808872223,
... |
def train _ and _ eval ( ) : # train _ file _ name, test _ file _ name = maybe _ download ( ) # df _ train = pd. read _ csv ( # tf. gfile. open ( train _ file _ name ), # names = columns, # skipinitialspace = true ) # df _ test = pd. read _ csv ( # tf. gfile. open ( test _ file _ name ), # names = columns, # skipinitia... | [
-0.02359382063150406,
-0.19360953569412231,
0.7677466869354248,
-0.18988007307052612,
0.458615779876709,
0.0009643227676860988,
0.7132744193077087,
0.2304331511259079,
-0.8781743049621582,
-0.028979822993278503,
-0.42235448956489563,
0.2370074838399887,
1.233483076095581,
-0.22223281860351... |
def cn _ applywhiteningto ( self, image ) : depr ('applywhiteningto ', 1. 2,'whitenimage') return self. whitenimage ( image ) | [
-0.612795889377594,
0.4615582525730133,
0.5113674402236938,
-0.25959521532058716,
-0.28551197052001953,
-0.46071138978004456,
0.781080424785614,
-0.6026230454444885,
0.39449378848075867,
0.07492503523826599,
0.1556360125541687,
0.4704466760158539,
-0.5458512902259827,
1.4308832883834839,
... |
def test _ atomic _ language _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 3. xsd ", instance = " nistdata / atomic / l... | [
0.4404285252094269,
-0.30641815066337585,
0.419622540473938,
0.2727473974227905,
-0.29395315051078796,
0.3889346420764923,
-0.6963900923728943,
0.1470986008644104,
0.23224884271621704,
0.984302282333374,
-0.4971190392971039,
-0.05391239747405052,
0.258242130279541,
-0.03740721568465233,
... |
def run _ with _ params ( self, params ) : test _ process = mproc. process ( target = self. student _ submission. execute _ student _ plan, args = ( params ['area _ map'], params ['todo'], params ['max _ distance'], params ['max _ steering'], params ['horizon _ distance'] ) ) error _ message ='' sampled _ sites = 0 sco... | [
0.22079560160636902,
0.26798006892204285,
0.895208477973938,
0.037016741931438446,
0.5336988568305969,
0.7071482539176941,
0.6912603378295898,
-0.11621975898742676,
0.1683666706085205,
0.6253620982170105,
0.29902756214141846,
0.722739040851593,
-0.6240290999412537,
0.026451943442225456,
... |
def account _ exists ( self, account _ name ) : return account _ name in self. accounts. keys ( ) | [
-0.21031643450260162,
-0.1500856876373291,
0.1347704976797104,
0.27853700518608093,
0.8457301259040833,
0.22417978942394257,
-0.1654101014137268,
0.8018187880516052,
0.1808895617723465,
0.28230926394462585,
0.14337432384490967,
0.15144146978855133,
0.12044841051101685,
0.2196798175573349,
... |
def pop ( self ) : root = self. heap [ 0 ] x = self. heap. pop ( ) # enlever la derniere feuille if self : # si le tas n'est pas vide self. heap [ 0 ] = x # et la mettre a la racine self. sift _ down ( ) # maintenir l'ordre du tas print ( self ) return root | [
1.175207495689392,
-0.26462608575820923,
0.5277584791183472,
-0.6296848058700562,
-0.16198769211769104,
0.22759190201759338,
-0.5366465449333191,
-0.10043589025735855,
-0.2973490357398987,
-0.19886377453804016,
0.4502532482147217,
0.250376433134079,
-0.908001184463501,
0.18829813599586487,... |
def get _ start _ grid ( cols = 4, rows = 4 ) : grid = [ [ " " ] * cols for i in range ( rows ) ] for i in range ( 2 ) : empties = get _ empty _ cells ( grid ) y, x = random. choice ( empties ) grid [ y ] [ x ] = 2 if random. random ( ) < prob _ 2 else 4 return grid | [
-0.30216413736343384,
0.15965642035007477,
0.5817814469337463,
0.3587253987789154,
0.4052119851112366,
-0.3598879277706146,
-0.5363854765892029,
-0.23245368897914886,
0.09288372844457626,
0.3275713622570038,
-0.6029224395751953,
0.9572504162788391,
-0.2651956081390381,
-0.03972864151000976... |
def get _ dataset ( name, split _ name, dataset _ dir, file _ pattern = none, reader = none ) : if name not in datasets _ map : raise valueerror ('name of dataset unknown % s'% name ) return datasets _ map [ name ]. get _ split ( split _ name, dataset _ dir, file _ pattern, reader ) | [
-0.7636139392852783,
0.07830003648996353,
0.1728736162185669,
-0.7015324234962463,
-0.7897923588752747,
-0.6975812315940857,
0.20252087712287903,
0.8268300890922546,
0.1565765142440796,
-0.34995776414871216,
0.5853882431983948,
0.8017388582229614,
0.2679411470890045,
-1.0283092260360718,
... |
def transform _ pandas _ dataframe ( pandas _ df, new _ column _ name, transformation ) : document _ fields _ description = transformation ['input'] ['fields'] assert all ( field _ description ['type'] = ='double'or field _ description ['type'] = = ['double ','null'] for field _ description in document _ fields _ descr... | [
0.3178565502166748,
0.34586331248283386,
0.7660952806472778,
-0.0001724561006994918,
0.277699738740921,
-0.1572021245956421,
0.5063043236732483,
-0.45345357060432434,
-0.5338178873062134,
0.10471827536821365,
-0.855082631111145,
0.40320128202438354,
0.7992472052574158,
-0.6376248598098755,... |
def test _ atomic _ language _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 2. xsd ", instance = " nistda... | [
0.23371510207653046,
-0.4679734408855438,
0.29005080461502075,
0.7621052861213684,
-0.8098612427711487,
0.20441293716430664,
-0.05750477313995361,
-0.03638441488146782,
-0.4548102617263794,
0.6224889755249023,
-0.8865230679512024,
0.11406704038381577,
0.27841684222221375,
0.475584536790847... |
def _ optimize _ loop _ axis ( dim ) : sm _ count = _ get _ sm _ count ( ) griddim = min ( sm _ count, - ( ( - dim ) / / 32 ) ) items _ per _ block = - ( ( - dim ) / / griddim ) items _ per _ thread = 1 warps = - ( ( - items _ per _ block ) / / ( 32 * items _ per _ thread ) ) while ( warps > 4 and items _ per _ thread ... | [
0.2087266892194748,
0.6187095642089844,
0.9054834246635437,
0.1659323275089264,
-0.8002893924713135,
0.27815791964530945,
0.578205943107605,
-1.4160513877868652,
-0.7732015252113342,
0.26317068934440613,
-0.38957738876342773,
0.46989545226097107,
-0.6271945834159851,
-0.2841346859931946,
... |
def make _ gh _ token ( api _ url = none ) : click. echo ('go to https : / / github. com / settings / tokens to generate a new one with " repo " scope') return zazu. util. prompt ('enter new token') | [
-0.7406932711601257,
0.23311462998390198,
0.1258029043674469,
0.1686568409204483,
0.6905726790428162,
0.1175168827176094,
0.3759104311466217,
-0.038466937839984894,
-0.32112404704093933,
-0.36859601736068726,
-1.1015228033065796,
1.2797502279281616,
-0.10185721516609192,
-0.497146904468536... |
def train _ svm _ model ( best _ nodes, x _ train _ scaled, y _ train ) : clf = svm. svc ( gamma = best _ nodes [ " gamma " ], c = best _ nodes [ " c " ], class _ weight = best _ nodes [ " class _ weight " ], random _ state = 42 ) clf. fit ( x _ train _ scaled, y _ train ) print ( clf. score ( x _ train _ scaled, y _ t... | [
0.1841231733560562,
-0.07649827748537064,
0.5120869874954224,
0.11392239481210709,
0.8373090028762817,
-0.058838699012994766,
-0.5631998181343079,
0.4998963475227356,
-1.1217120885849,
0.2488882839679718,
-0.5929376482963562,
0.5169889330863953,
0.6594229936599731,
-0.5384196639060974,
-... |
def extract ( self, x0 ) : n, m, p = self. n, self. m, self. p # index of active elements xact = self. xactive yact = self. yactive ne = len ( xact ) nf = len ( yact ) e = self. e f = self. f a = x0. flat [ : n * * 2 ]. reshape ( ( n, n ) ) b = x0. flat [ n * * 2 + np. r _ [ : n * m ] ]. reshape ( ( n, m ) ) c = x0. fl... | [
0.0019552805460989475,
-0.9542556405067444,
0.6728862524032593,
-0.6215301156044006,
-0.27175816893577576,
-0.6844382286071777,
1.0717288255691528,
0.5857298374176025,
0.4277946352958679,
0.3172627091407776,
-0.7936336398124695,
-0.14575688540935516,
-0.07341316342353821,
-0.29586467146873... |
def lmer _ results _ summary ( roidata _ obj, write _ combo = true ) : if roidata _ obj. _ _ class _ _. _ _ name _ _ = ='roidata': arg _ is _ obj = true roidata _ dir = roidata _ obj. roidata _ dir else : arg _ is _ obj = false roidata _ dir = roidata _ obj # n. b. # logfile = roidata _ obj. roidata _ dir + " lmer _ fd... | [
0.06715355068445206,
-0.609400749206543,
0.5689283013343811,
-0.18277283012866974,
0.28870508074760437,
0.09505946934223175,
0.46466368436813354,
-0.5360314249992371,
-0.43869471549987793,
-0.35609179735183716,
0.6003746390342712,
-0.3127090632915497,
-0.4623597264289856,
0.220171198248863... |
def _ create _ url ( self, hostname, port ) : return url _ template. format ( hostname, port ) | [
0.09302487224340439,
-0.40884557366371155,
0.22322407364845276,
-0.8866823315620422,
0.41430598497390747,
0.0871586948633194,
-1.090704321861267,
0.6555861830711365,
-1.916648268699646,
-0.1293109506368637,
0.553625226020813,
-0.32129865884780884,
0.478677898645401,
-0.5511995553970337,
... |
def climate _ keeper _ mode ( self ) - > str : return self. _ vehicle _ data. get ( " climate _ state ", { } ). get ( " climate _ keeper _ mode " ) | [
-0.42761608958244324,
-0.11849159747362137,
0.13907305896282196,
0.1371108591556549,
0.6005595922470093,
2.08553409576416,
-0.36234742403030396,
0.26478663086891174,
-1.2120238542556763,
0.12393064051866531,
-0.44750455021858215,
-0.7837286591529846,
0.5392592549324036,
-0.0389005616307258... |
def calculate _ rms _ error ( values, true _ values ) : return np. sqrt ( ( ( np. array ( values ) - true _ values ) * * 2 ). mean ( ) ) | [
-0.42830103635787964,
0.3203184902667999,
0.13861793279647827,
0.09872347861528397,
-0.3361821472644806,
-0.17494894564151764,
-0.4589761197566986,
0.45682039856910706,
-0.1281164586544037,
1.2720909118652344,
-0.04388447478413582,
0.846560001373291,
-0.46436500549316406,
0.654105842113494... |
def _ forward _ jit ( self, x ) : # exponential _ average _ factor is self. momentum set to # ( when it is available ) only so that if gets updated # in onnx graph when this node is exported to onnx. if self. momentum is none : exponential _ average _ factor = 0. 0 else : exponential _ average _ factor = self. momentum... | [
0.34302327036857605,
0.22135129570960999,
0.7585082054138184,
-0.18649695813655853,
-0.66700279712677,
0.450511634349823,
0.5311419367790222,
0.0786515399813652,
-0.18493176996707916,
-0.6012327075004578,
0.9413896203041077,
0.44808682799339294,
0.4089221656322479,
0.9076391458511353,
-0... |
def prop _ resurface ( recs, k = 10, implicit _ matrix = none, i2p = none, u2i = none ) : prop _ resurface = [ ] for userid in recs. keys ( ) : past _ pages = [ i2p [ i ] for i in implicit _ matrix [ :, u2i [ userid ] ]. nonzero ( ) [ 0 ] ] rec _ pages = recs [ userid ] [ : k ] prop _ resurface. append ( np. mean ( np.... | [
-0.2280632108449936,
0.10706452280282974,
0.5323516130447388,
-0.04654809087514877,
-0.10497972369194031,
0.49619346857070923,
1.0678280591964722,
1.1173579692840576,
-0.171383798122406,
1.190224289894104,
0.8648467659950256,
0.1458972692489624,
-0.9106349945068359,
-0.5217587351799011,
... |
def _ make _ request ( self, endpoint, method = " get ", options = none ) : data = dict ( ) headers = {'x - honeydb - apiid': self. api _ id,'x - honeydb - apikey': self. api _ key } if options is not none : for key in options : data [ key ] = options [ key ] url = self. base _ url + endpoint result = none if method = ... | [
-1.237737774848938,
-0.03546346724033356,
0.9192859530448914,
0.20832820236682892,
0.43912914395332336,
-0.6921579241752625,
-0.9865001440048218,
-0.7269174456596375,
-0.31928789615631104,
0.10801103711128235,
0.04021714627742767,
0.10991587489843369,
-0.8016932606697083,
0.090693369507789... |
def subdivide ( self ) : slices = [ { } for _ in xrange ( self. p. p _ length ) ] for attr in self. components ( ) : temp = deep _ subdivide ( getattr ( self, attr ), self. p. p _ length, 2 ) for i, s in enumerate ( slices ) : s [ attr ] = deep _ index ( temp, i ) return [ volumetricslice. from _ attrs ( self. p, * * s... | [
0.12827901542186737,
-0.4254353940486908,
0.5312994718551636,
-0.07916051894426346,
0.07101935893297195,
0.5530000925064087,
-0.05042999982833862,
0.03580821305513382,
-0.35496607422828674,
-0.28019118309020996,
0.5115645527839661,
-0.1641337275505066,
-0.21161314845085144,
-0.284885108470... |
def addfinder ( self, finder ) : self. finders. append ( finder ) | [
-1.3807592391967773,
-0.5824637413024902,
0.18242549896240234,
0.6104055047035217,
-0.1397124081850052,
0.9894178509712219,
-0.4962626099586487,
-0.8439178466796875,
0.21038509905338287,
-0.927169144153595,
-0.5980643033981323,
0.2466593235731125,
-0.06985534727573395,
1.5495105981826782,
... |
def check _ high _ score ( stats, sb ) : if stats. score > stats. high _ score : stats. high _ score = stats. score sb. prep _ high _ score ( ) | [
1.4033175706863403,
0.763671338558197,
0.34357160329818726,
1.5176359415054321,
1.0937391519546509,
-0.3921607434749603,
-0.14737360179424286,
-0.28045499324798584,
0.7517887949943542,
-0.11799720674753189,
-0.4013158679008484,
0.8440881967544556,
1.1410324573516846,
0.5010291934013367,
... |
def test _ abundance _ of _ fodder _ carnivores _ result ( self ) : self. cell. animals = [ herbivore ( age = 4, weight = 20 ), carnivore ( age = 7, weight = 40 ) ] assert self. cell. abundance _ of _ fodder _ carnivores = = 0. 2 | [
0.10989077389240265,
-0.7147493958473206,
0.4007177948951721,
0.5566329956054688,
1.1810340881347656,
-0.9366708993911743,
-0.5213690400123596,
-0.6989648938179016,
-1.1132662296295166,
-0.16325335204601288,
-0.5120984315872192,
0.6340212225914001,
0.35106897354125977,
0.8435789942741394,
... |
def save ( self, data, * args ) : if len ( args ) < self. min _ nr _ arguments : raise exceptions. missinginputvariable ('need { } arguments, { } given '. format ( self. min _ nr _ arguments, len ( args ) ) ) if self. mandatory _ uuid and not any ( [ len ( arg ) = = 36 for arg in args ] ) : raise exceptions. missinginp... | [
-1.3873755931854248,
0.07214729487895966,
0.4866692125797272,
0.4891241490840912,
0.5733314752578735,
1.39775812625885,
0.009861195459961891,
0.13154412806034088,
-1.123137354850769,
0.5637888312339783,
-0.8011183738708496,
-0.4840971827507019,
-0.8625028729438782,
-0.2546771466732025,
-... |
def get _ global _ version _ managers ( _ cls = true ) : return templateversionmanager. get _ global _ version _ managers ( _ cls ) | [
-1.1816045045852661,
-0.034333012998104095,
0.4086615741252899,
1.0750732421875,
0.13578557968139648,
1.087721824645996,
0.10124098509550095,
0.09225927293300629,
-0.03199729323387146,
0.5184329748153687,
-1.3851219415664673,
0.8151098489761353,
-0.44360724091529846,
1.1204955577850342,
... |
def getwikidatainfo ( self ) : query = u " " " select? property? propertylabel? propertydescription? formatterurl? formatteruri where {? property wikibase : propertytype wikibase : externalid.? property wdt : p1630? formatterurl. optional {? property wdt : p1921? formatteruri }. service wikibase : label { #... include ... | [
-0.3331631124019623,
-0.29123353958129883,
0.5197425484657288,
-0.8652030229568481,
0.12252818048000336,
0.12607122957706451,
-1.650476336479187,
0.4161325693130493,
-0.5291928052902222,
-0.5328612327575684,
0.3900263011455536,
0.3861749470233917,
-0.4507579803466797,
0.7408493161201477,
... |
def printshortresponse ( r ) : if not 200 < = r. status _ code < 300 : printhtml ( getstatuscodehtml ( r. status _ code, r. reason, findxpath ( loads ( r. text ),'m2m : dbg') ) ) elif _ _ withresults : # only when results should be printed printhtml ( getstatuscodehtml ( r. status _ code, r. reason ) ) | [
0.6721329689025879,
-0.3371790945529938,
0.5085485577583313,
-0.053529657423496246,
-0.6875233054161072,
-0.13526152074337006,
-0.11260037869215012,
-0.8291906118392944,
1.0267164707183838,
-0.5921057462692261,
0.6057188510894775,
0.8381509184837341,
-0.4613057076931,
0.0841108039021492,
... |
def test _ isunicode _ str ( self ) : # in python 3 strings are unicode encoded by default. if six. py3 : assert isunicode ('hello, world!') else : assert not isunicode ('hello, world!') | [
0.3919018805027008,
-0.139791339635849,
0.18483342230319977,
1.099266529083252,
0.3842603862285614,
0.7120290398597717,
-0.15903891623020172,
0.5879496932029724,
1.1103352308273315,
-0.5941632390022278,
-0.7296925187110901,
0.47039729356765747,
-0.7508062124252319,
-0.5842844843864441,
-... |
def _ on _ storage _ save _ clicked ( self ) : try : self. _ do _ storage _ update _ or _ save ( ) except exception : logger. error ( traceback. format _ exc ( ) ) self. ui. storage _ info. settext ( " error occurred trying to save storage data! " " see the tk - desktop log for more info. " ) self. storage _ saved. emi... | [
-0.18561697006225586,
0.15028312802314758,
0.25509408116340637,
0.8000384569168091,
0.531930148601532,
-0.8284456133842468,
0.36320993304252625,
-0.22972272336483002,
-0.41144686937332153,
0.5750152468681335,
-0.6514830589294434,
-0.6366214156150818,
0.2761838734149933,
0.33371609449386597... |
def _ turnoffinherittransform ( self, item ) : mc. setattr ( item + ". inheritstransform ", 0 ) | [
-0.5303449630737305,
-0.4850536286830902,
0.4484281837940216,
-0.5478101372718811,
0.10011819750070572,
0.7897717356681824,
1.1938942670822144,
-0.21909116208553314,
0.5195919871330261,
-0.6845309734344482,
-2.158409357070923,
-0.12198328226804733,
-0.659063458442688,
-0.2142394483089447,
... |
def done ( self ) - > bool : return self. _ future. done ( ) | [
-0.2864200174808502,
0.9000487923622131,
0.6126981377601624,
0.5127775073051453,
0.3732731342315674,
-0.07432582229375839,
-0.4811317026615143,
0.2566087245941162,
-0.6472691297531128,
-0.8074364066123962,
-1.008705973625183,
-0.5119004845619202,
-0.2482031285762787,
-0.03154965117573738,
... |
def test _ atomic _ base64 _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 5. xsd ... | [
0.2134608030319214,
-0.2820151448249817,
0.34399130940437317,
1.041864037513733,
-0.26810187101364136,
-0.08998298645019531,
0.2232545167207718,
-0.7722837924957275,
0.02455943636596203,
0.5031034350395203,
-0.6571182608604431,
0.0891658291220665,
-1.1938269138336182,
0.1505802869796753,
... |
def get _ taxon _ query _ args ( self, parsed ) : terms = phrases = ranks = [ ] taxon _ id = none if " taxon _ id " in parsed : taxon _ id = int ( parsed [ " taxon _ id " ] [ 0 ] ) else : terms = [ ] phrases = [ ] for term in parsed [ " terms " ]. aslist ( ) : if isinstance ( term, list ) : terms + = term phrases. appe... | [
0.6017984747886658,
-0.6642764210700989,
0.3108252286911011,
-0.6513918042182922,
0.6542020440101624,
0.09753420203924179,
-0.8812400102615356,
0.6245855689048767,
-0.2575770616531372,
0.13701552152633667,
0.6506977081298828,
-0.19506433606147766,
-0.25406506657600403,
0.19834251701831818,... |
def create _ random _ parametrization ( self, s ) : seed ( s ) return [ a [ 0 ] + ( a [ 1 ] - a [ 0 ] ) / 4. 0 + rand ( ) * ( a [ 1 ] - a [ 0 ] ) / 2. 0 for a in self. init _ bounds ] # distribution of rand ( ) = uniform | [
-0.8970960974693298,
-0.25887900590896606,
0.33087342977523804,
-0.9018853902816772,
-0.022698823362588882,
0.005497388541698456,
0.4898601472377777,
-0.5862216353416443,
1.6394782066345215,
0.3384232521057129,
0.05800793692469597,
0.10910753160715103,
0.07980404049158096,
0.49439191818237... |
def copy ( self ) : new _ tsp = travelingsalesmanproblem ( self. path ) return new _ tsp | [
-0.029107367619872093,
-0.9998149871826172,
0.4142991006374359,
-0.02285352163016796,
-0.9191985130310059,
0.7457802891731262,
0.17026011645793915,
-0.25423160195350647,
0.8218813538551331,
0.8109053373336792,
-0.08073966205120087,
0.25745970010757446,
-0.39400842785835266,
-1.445626258850... |
def halt ( self, val = none ) : if val is none : return self. _ halt reg = self. i2c. readfrom _ mem ( self. addr, datetime _ reg, 1 ) [ 0 ] if val : reg | = chip _ halt else : reg & = ~ chip _ halt self. _ halt = bool ( val ) self. i2c. writeto _ mem ( self. addr, datetime _ reg, bytearray ( [ reg ] ) ) | [
-0.1060481145977974,
0.9933943152427673,
0.6392292380332947,
0.5137708187103271,
-0.3084799647331238,
0.980116069316864,
0.2113441526889801,
-0.21231180429458618,
0.03156434744596481,
-0.4516056776046753,
-0.09215493500232697,
0.5254754424095154,
-0.6073415279388428,
0.07391717284917831,
... |
def gen _ text ( num _ sentences : int = 10 ) - > str : sizes = ( randint ( 3, 12 ) for _ in range ( num _ sentences ) ) sentences = ( gen _ sentence ( size ) for size in sizes ) return '. '. join ( sentences ) + '. ' | [
0.7887670993804932,
0.13385207951068878,
0.7945077419281006,
-0.001893077278509736,
-0.785075843334198,
-0.036508411169052124,
-0.07485480606555939,
-0.06209118664264679,
0.7854270339012146,
0.6180081963539124,
-0.3130577802658081,
-1.0949801206588745,
-0.4776814579963684,
-0.6389378905296... |
def getflatreviewcontext ( self ) : if not self. flatreviewcontext : self. flatreviewcontext = self. flatreviewcontextclass ( self ) self. justenteredflatreviewmode = true # remember where the cursor currently was # when the user was in focus tracking mode. we'll try to # keep the position the same as we move to charac... | [
-0.5770147442817688,
-0.5471038818359375,
0.4886825680732727,
0.04649650678038597,
-0.3314225673675537,
0.6439436078071594,
-0.05111513286828995,
-0.28309398889541626,
0.2957422137260437,
-0.9282565712928772,
0.35616543889045715,
0.43484026193618774,
-1.0005024671554565,
-0.040465913712978... |
def cluster _ assign _ plotter ( dataframe ) : labels = dataframe. label. unique ( ) all _ tracks = [ ] for label in labels : all _ tracks. append ( plotly. graph _ objs. scatter ( x = dataframe [ dataframe. label = = label ]. compensation, y = dataframe [ dataframe. label = = label ]. dispersion, mode ='markers ', mar... | [
-0.11890765279531479,
0.5025665760040283,
0.6728531122207642,
-0.6489699482917786,
-0.3333902359008789,
0.4506418704986572,
0.5513867735862732,
-0.15167799592018127,
-0.7559340000152588,
0.3522248864173889,
0.9084552526473999,
0.5122174620628357,
0.27308180928230286,
-0.03395221382379532,
... |
async def set _ heated _ steering _ wheel _ level ( self, level : int ) - > none : data = await self. _ send _ command ( " remote _ steering _ wheel _ heat _ level _ request ", level = level ) if data and data [ " response " ] [ " result " ] is true : params = { " steering _ wheel _ heat _ level " : level } self. _ veh... | [
-0.6196542978286743,
0.2595049738883972,
0.5628984570503235,
-0.540939450263977,
0.6546688675880432,
0.6825404763221741,
-0.7810239195823669,
-0.026974769309163094,
-1.0712560415267944,
0.24194516241550446,
-1.5387630462646484,
0.6017794013023376,
-0.43384647369384766,
0.8167921900749207,
... |
def _ set _ date ( self, date _ selector : str, date _ input : datetime ) : time. sleep ( 3 ) calendar _ input = self. find _ element ( date _ selector ) time. sleep ( 3 ) # backspace was seeming more reliable than " clear " calendar _ input. send _ keys ( keys. backspace * 10 ) time. sleep ( 3 ) calendar _ input. send... | [
-0.5518741011619568,
0.23851855099201202,
0.3168744742870331,
0.2858167886734009,
0.34180086851119995,
0.4186902642250061,
-0.012586977332830429,
-0.9668636918067932,
-0.06509058177471161,
0.0816446840763092,
-0.33264675736427307,
0.544969916343689,
0.3513619005680084,
0.15183164179325104,... |
def test _ atomic _ boolean _ pattern _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 1. xsd ", instance = " nistdata / atomic / boolea... | [
-0.19523192942142487,
-0.5852375626564026,
0.5591704845428467,
1.118944764137268,
-0.2044314295053482,
0.3822181522846222,
0.12969225645065308,
0.08009752631187439,
-0.48094892501831055,
1.0753823518753052,
-0.28114184737205505,
0.3705615699291229,
0.08882684260606766,
-0.14288932085037231... |
def k _ means _ cluster ( x ) : y _ pred = kmeans ( n _ clusters = 5, random _ state = 9 ). fit _ predict ( x ) print ( metrics. calinski _ harabasz _ score ( x, y _ pred ) ) return y _ pred | [
0.283119797706604,
0.4643581211566925,
0.3248445689678192,
0.41041818261146545,
-0.8438112735748291,
0.6061578392982483,
-0.22615350782871246,
-0.5671977996826172,
0.9538015127182007,
-0.09242092818021774,
-0.451545774936676,
0.8938997983932495,
0.8048087358474731,
-0.1765332967042923,
0... |
def test _ atomic _ any _ uri _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 3. xsd ", instance = " nistdata... | [
0.23986808955669403,
-0.5992105007171631,
0.46655571460723877,
0.5815775394439697,
-0.4784327447414398,
0.07391159981489182,
-0.8430731296539307,
-0.17374910414218903,
0.42882218956947327,
-0.04609972983598709,
0.053603120148181915,
0.1373548060655594,
-0.43881332874298096,
-0.048297494649... |
def handle _ validation _ exception ( selfl, error _ field ) : return {'message':'parameter validation fail ','error': {'field': error _ field } }, 400 | [
-0.9912952184677124,
-0.2657308876514435,
0.38553428649902344,
-0.13339293003082275,
-0.028915535658597946,
0.4822714030742645,
-0.9085686206817627,
-0.287176251411438,
-0.14666035771369934,
1.0241844654083252,
-0.4279510974884033,
-0.7315199971199036,
-0.48274466395378113,
0.6437931060791... |
def start _ test _ latency ( self, test ) : @ asyncio. coroutine def get _ component _ info ( instance _ name ) : " " " retrieve component information for the given component instance arguments : instance _ name - the name of a component instance returns : a gi. repository. rwbaseyang. componentinfo object " " " compon... | [
0.8007224202156067,
-0.4920824468135834,
0.8244274854660034,
-0.796341598033905,
0.43214675784111023,
-0.15707477927207947,
0.21542319655418396,
-0.7524778246879578,
0.49845755100250244,
-0.3948628306388855,
0.006799676455557346,
0.19908380508422852,
-0.15125663578510284,
-0.17323142290115... |
def ontextofile ( self, value : textofile ) : self. onfile ( value ) # todo : index extractor should be global, and then definitions / references # added to the page. block = self. extractor. run ( value, self. page ) # note : we * inject * the structure at the end of the textofile's xml # content. this will make it po... | [
0.415438711643219,
-0.2531925141811371,
0.49155083298683167,
-0.337229460477829,
0.0350746288895607,
-0.3515385091304779,
0.21425868570804596,
-0.44292089343070984,
-0.14851631224155426,
0.04162401705980301,
-0.32038021087646484,
-0.7114812731742859,
0.19810166954994202,
0.7267845273017883... |
def _ createmastercontrol ( self ) : hindleg _ main _ ctl = mc. circle ( n = " { } _ { } _ ctl _ { } ". format ( self. side, self. name, self. instance _ num ), r = 1 ) [ 0 ] hindleg _ offset _ grp = mc. group ( hindleg _ main _ ctl, n = hindleg _ main _ ctl. replace ( " ctl ", " grp " ) ) hindleg _ zero _ grp = mc. gr... | [
0.48729705810546875,
0.3060493767261505,
0.8432101011276245,
-0.4999838173389435,
-0.10280990600585938,
0.09015381336212158,
0.9713026285171509,
-0.10162623226642609,
-0.8009202480316162,
-0.1260422170162201,
-0.006280486471951008,
-0.44286251068115234,
-0.282029390335083,
0.17815768718719... |
def test _ atomic _ any _ uri _ length _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 2. xsd ", instance = " nistdata / atomic / any... | [
-0.061646249145269394,
-0.3417256474494934,
0.44319698214530945,
0.8934386372566223,
-0.1776125431060791,
-0.049975648522377014,
-0.31996262073516846,
0.08700280636548996,
-0.25027579069137573,
-0.12869659066200256,
0.002883716020733118,
-0.3096935749053955,
-0.06490879505872726,
0.2521428... |
def sanitize _ dale ( s ) : if s = = dale _ utf8 : return dale _ safe elif s = = full _ dale _ utf8 : return full _ dale _ safe else : return s | [
0.49733051657676697,
-0.3537508249282837,
0.24079322814941406,
-0.48140814900398254,
-1.0076570510864258,
-0.28150635957717896,
-0.29402557015419006,
-0.9631569385528564,
0.767470121383667,
-0.07676713168621063,
0.2965889275074005,
-0.15648134052753448,
0.18716661632061005,
-0.662826657295... |
def meshgrid _ face _ indices ( w ) : rows = w r, c = map ( np. ravel, np. mgrid [ 0 : rows - 2 : complex ( rows - 1 ), 0 : w - 2 : complex ( w - 1 ) ] ) base = r * w + c f = np. array ( [ np. concatenate ( [ base + 1, base + w + 1 ] ), np. concatenate ( [ base + w, base + w ] ), np. concatenate ( [ base, base + 1 ] ) ... | [
-0.7550497651100159,
-0.4719278812408447,
0.6929059624671936,
-0.05996544659137726,
0.034379519522190094,
-0.3634176552295685,
1.3618334531784058,
-0.8280576467514038,
0.13068009912967682,
0.574856698513031,
0.019379476085305214,
-0.061742592602968216,
-0.2877310812473297,
0.62142860889434... |
def wait _ for _ process _ tasklet _ running ( process _ name, max _ retries = 30 ) : tasklet _ name = none process _ component = none tasklet _ component = none retry _ attempts = 1 while tasklet _ name = = none and retry _ attempts < = max _ retries : if process _ component is none : process _ component = yield from ... | [
0.3830786347389221,
-0.5324691534042358,
0.585066556930542,
-0.9344629645347595,
-0.29755961894989014,
0.6407511234283447,
-0.3962734341621399,
-0.20569823682308197,
0.03439509496092796,
-0.05509507283568382,
0.42368367314338684,
-0.046194542199373245,
-0.052574414759874344,
-0.25089275836... |
def create _ buffered _ bounds ( polygon, buffer _ m ) : if not isinstance ( polygon, polygon ) : # pragma : no cover raise typeerror ('object is not a polygon') return bounds ( * polygon. extent ). buffer ( buffer _ m ) | [
0.8509417176246643,
-0.9937763810157776,
0.47384095191955566,
0.5185470581054688,
-0.26311033964157104,
0.9575269222259521,
-0.5051699280738831,
-1.1136573553085327,
0.5435537695884705,
-0.4424639344215393,
-0.8024206161499023,
0.7650413513183594,
-0.7370327711105347,
-0.2625972628593445,
... |
def display _ trace ( self, grp _ by, ret _ aggr _ by ='date ', remove _ size _ null = true, remove _ adj _ cap _ nan = false, row _ hue _ col = none ) : instr _ df = self. _ get _ instr _ after _ remove ( remove _ size _ null, remove _ adj _ cap _ nan ) self. static _ display _ trace ( instr _ df, grp _ by, ret _ aggr... | [
0.27223482728004456,
0.7383179664611816,
0.558303713798523,
0.4909724295139313,
-0.3117949366569519,
-0.4597072899341583,
1.6639347076416016,
-0.17330078780651093,
0.17312495410442352,
0.595661997795105,
0.8853278756141663,
0.2341940701007843,
0.0113736717030406,
-0.012746404856443405,
0... |
def course _ delete ( course _ id ) : # desmatriculando alunos for course _ enrollment in courseenrollment. objects. filter ( course _ id = course _ id ) : courseenrollment. unenroll ( course _ enrollment. user, course _ id ) # deletando o curso delete _ course _ and _ groups ( course _ id, true ) | [
0.9692004919052124,
0.06564714014530182,
0.43831780552864075,
0.5103855133056641,
0.19995924830436707,
0.8149636387825012,
0.9682542681694031,
0.8098149299621582,
0.48427486419677734,
0.07745859771966934,
0.5907436013221741,
0.9421265721321106,
0.9881208539009094,
0.27432847023010254,
0.... |
def count _ lemmas ( corpus ) : return count _ types ( pre. lemmatize ( corpus ) ) | [
-0.317651629447937,
0.09714992344379425,
0.4890885651111603,
-0.3507063388824463,
0.8913903832435608,
0.014374523423612118,
-0.3613053858280182,
1.1109434366226196,
-0.5626729130744934,
0.25022733211517334,
-1.0635415315628052,
0.17434774339199066,
-0.5477890968322754,
1.3753949403762817,
... |
def bokeh _ scored _ polygons _ folium ( poly _ scores _ list : list [ pd. series ], use _ image _ list : list [ bool ], train _ geos : gpd. geoseries = none, test _ geos : gpd. geoseries = none, start _ zoom : int = 9, height : int = 600, width : int = 850, start _ location = ( 36. 4, 36. 4 ), file _ name : str ='foli... | [
-0.09248571842908859,
-0.19853384792804718,
0.9376598000526428,
-0.37940990924835205,
0.3815244734287262,
0.27608850598335266,
0.4788513779640198,
-0.14017480611801147,
0.2163434475660324,
0.34830236434936523,
-0.33472180366516113,
0.5071249604225159,
0.5145292282104492,
-0.400057733058929... |
def load _ files ( directory ) : txtfiles = dict ( ) with os. scandir ( directory ) as files : for file in files : if file. path. endswith ( ". txt " ) : with open ( file. path, encoding ='utf - 8') as content : txtfiles [ file. name ] = content. read ( ) return txtfiles | [
0.08221796154975891,
0.12694871425628662,
0.8831935524940491,
-0.9834581613540649,
-2.0161988735198975,
-0.6540801525115967,
-0.51494961977005,
-0.166453018784523,
-0.6752519011497498,
1.19345223903656,
-1.1034307479858398,
-0.7891836762428284,
-0.025074778124690056,
0.5219545960426331,
... |
def test _ atomic _ any _ uri _ enumeration _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 1. xsd ", instance = " nistdata / a... | [
-0.862178385257721,
-1.1162408590316772,
0.524111807346344,
0.9409428834915161,
-0.32233455777168274,
-0.26483485102653503,
0.158802330493927,
-0.05729110911488533,
-0.09823637455701828,
0.17145319283008575,
0.2389611154794693,
-0.10999740660190582,
0.0038116686046123505,
0.298720121383667... |
def fill _ gap ( newly _ persisted : blocknumber, base _ gaps : chaingaps ) - > gapinfo : current _ gaps, tip _ child = base _ gaps if newly _ persisted = = tip _ child : # this is adding a consecutive header at the very tail new _ gaps = ( current _ gaps, blocknumber ( newly _ persisted + 1 ) ) gap _ change = gapchang... | [
-0.5908119678497314,
-1.1757782697677612,
0.7209186553955078,
-0.036844417452812195,
0.14121626317501068,
-0.3541375994682312,
0.1375446766614914,
-0.020730258896946907,
0.160593643784523,
-0.20618152618408203,
0.1687343418598175,
0.2291552871465683,
-0.26383087038993835,
0.486384481191635... |
def _ calculate _ frame _ sizes ( self ) : if self. verbose : print _ stderr ( f " calculating frame size from { self. input _ file } " ) cmd = [ " ffprobe ", " - loglevel ", " error ", " - select _ streams " if self. stream _ type in { " video ", " audio " } else none, " v " if self. stream _ type = = " video " else n... | [
0.223184734582901,
-0.35147973895072937,
0.891326904296875,
0.15517404675483704,
-0.14263410866260529,
-0.8553017973899841,
0.2546802759170532,
-1.0210962295532227,
0.08917144685983658,
-0.1583765745162964,
0.21119628846645355,
0.7615643739700317,
-0.5418672561645508,
1.3233212232589722,
... |
def smoothgrad ( x, model, num _ samples = 50, mean = 0. 0, stddev = 0. 1, class _ index = none, func = tf. math. reduce _ mean, ) : x = tf. convert _ to _ tensor ( x ) if x. ndim! = 3 : raise valueerror ( f " expected input to have 3 dimensions but got { x. ndim } " ) _, l, a = x. shape x _ noise = tf. tile ( x, ( num... | [
-0.4595567584037781,
0.8782124519348145,
0.8862157464027405,
0.05312412232160568,
-1.0085870027542114,
1.1322816610336304,
-0.018491925671696663,
0.46736815571784973,
-0.054517392069101334,
0.8312619924545288,
-0.1888173222541809,
0.3436110019683838,
0.55042964220047,
-0.3404310643672943,
... |
def expr _ cls ( self ) - > type [ symbolicexpression ] : return symbolicexpression | [
0.6758648753166199,
-0.46813949942588806,
0.09662989526987076,
-0.09983054548501968,
0.2627866268157959,
-0.2511516511440277,
0.25644081830978394,
0.6425638794898987,
0.6559886932373047,
-0.40217164158821106,
-0.2027267962694168,
1.4168375730514526,
-0.11110810190439224,
0.4384737014770508... |
def convert ( img, width = 80, font _ aspect _ ratio = 0. 5, invert = false ) : out = [ ] sf = img. width / / width img = img. resize ( ( round ( img. width / / sf / font _ aspect _ ratio ), img. height / / sf ) ) chars = [ " ", ", ", " i ", " o ", " ^ ", " # ", " $ " ] for y in range ( img. height ) : out. append ( [ ... | [
-0.8255112767219543,
0.11804938316345215,
1.1183843612670898,
-0.35914021730422974,
-0.8226809501647949,
-0.5778303146362305,
-0.34914055466651917,
0.3257700800895691,
0.7038895487785339,
0.690740168094635,
-0.1406370997428894,
0.1705881953239441,
-0.15351930260658264,
0.9876610040664673,
... |
def alter _ add ( self, name, data _ type ) : index = self. _ _ columns. add ( name, data _ type ) started = false try : for row in self. _ _ data _ area. values ( ) : row [ index ] = data _ type ( ) started = true except typeerror : if started : raise for row in self. _ _ data _ area. values ( ) : row [ index ] = data... | [
-0.41757094860076904,
0.17228542268276215,
0.5888113975524902,
-0.40577375888824463,
0.16976459324359894,
0.042182259261608124,
-0.37750348448753357,
-0.23924684524536133,
-0.37679773569107056,
0.2883595824241638,
-0.14482666552066803,
1.1142276525497437,
-0.05585264787077904,
1.3199059963... |
def create _ feed _ dict ( self ) : pass | [
-0.00806195568293333,
-0.6342645287513733,
0.18609285354614258,
-0.7687115669250488,
-0.4853852689266205,
0.09772185236215591,
0.021961301565170288,
-0.26657822728157043,
-1.3506113290786743,
-0.7640679478645325,
-0.8121969699859619,
0.5686495900154114,
-0.26993608474731445,
0.530708014965... |
def getownerforfuzzer ( sources ) : for source in sources : if not os. path. exists ( source ) : continue with open ( source,'r') as source _ file _ handle : source _ content = source _ file _ handle. read ( ) if ('proto _ fuzzer'in source _ content or'llvmfuzzertestoneinput'in source _ content ) : # found the fuzzer s... | [
0.1371464878320694,
-0.03257446363568306,
0.4411437511444092,
0.5523837208747864,
0.019774002954363823,
-0.31780850887298584,
0.9847526550292969,
-0.19041968882083893,
-0.5106208324432373,
-0.8374501466751099,
-0.11763127148151398,
-0.39869242906570435,
-1.122362494468689,
0.86510509252548... |
def create _ post ( self, req, bp, version _ author, version _ comment = u'', verify _ only = false ) : warnings = [ ] # do basic checking for content existence warnings. extend ( bp. save ( version _ author, version _ comment, verify _ only = true ) ) # make sure name for the post is a valid name warnings. extend ( se... | [
0.05413680151104927,
-0.21261511743068695,
0.5866755247116089,
1.450111985206604,
0.6081925630569458,
-0.18607625365257263,
-0.3701784312725067,
-0.3587745428085327,
-0.16598214209079742,
0.5156561732292175,
-0.7369318008422852,
-0.778557538986206,
-0.9557488560676575,
0.16869334876537323,... |
def update _ position ( self, wolf _ pos, a, alpha _ pos, beta _ pos, delta _ pos ) : r1 = self. rand. uniform ( 0, 1, self. dim ) r2 = self. rand. uniform ( 0, 1, self. dim ) a1 = 2 * a * r1 - a c1 = 2 * r2 d _ alpha = fabs ( c1 * alpha _ pos - wolf _ pos ) x1 = alpha _ pos - a1 * d _ alpha r1 = self. rand. uniform ( ... | [
-0.6281823515892029,
-1.1086386442184448,
0.8072856664657593,
-0.9831457138061523,
-0.2671555280685425,
0.42423003911972046,
0.003954152576625347,
0.43587514758110046,
-0.22874999046325684,
0.302677184343338,
-0.4009855091571808,
-1.1186740398406982,
-0.5329896211624146,
-0.483974844217300... |
def get _ role _ from _ string ( string ) : if string = = " human " : return parser. role. human elif string = = " cpu " : return parser. role. cpu else : return parser. role. none | [
0.18098042905330658,
-0.7666634917259216,
0.27221062779426575,
-0.7490422129631042,
0.4473434090614319,
-0.22951272130012512,
-0.4174949824810028,
-0.4832719564437866,
-0.8053113222122192,
-0.4633409082889557,
0.49976807832717896,
0.79933762550354,
-0.6222832202911377,
-0.3541811406612396,... |
def movingstageproc ( serialnumber, pipe ) : import wx. lib. activex, threading class thorlabsaptmovingstage ( wx. lib. activex. activexctrl ) : " " " control moving stage " " " def _ _ init _ _ ( self, serialnumber, pipe ) : self. frame = wx. frame ( none, title = " moving stage sn : % d " % serialnumber ) panel = wx.... | [
-0.07138527184724808,
-0.4658518433570862,
0.843525230884552,
0.27106040716171265,
-0.4859708249568939,
-0.16996735334396362,
0.6109937429428101,
-0.7539460062980652,
-0.09096428006887436,
-0.5241355299949646,
0.16362452507019043,
-0.3294249475002289,
-0.47140035033226013,
0.46243524551391... |
def _ _ init _ _ ( self ) : raise notimplementederror | [
0.2879959046840668,
-0.5502353310585022,
0.37725508213043213,
0.47681111097335815,
0.2404680699110031,
0.7327427268028259,
0.6893680691719055,
0.261697381734848,
0.368490070104599,
-0.5233448147773743,
-0.7212250828742981,
0.04062676802277565,
0.38780394196510315,
0.7349810600280762,
0.2... |
def download _ user _ pages ( username, pagetype ) : offset = 0 try : downloadedcontent = [ ] while true : print ( f " downloading { username }'s { pagetype } ( page { offset + 1 } ) " ) r = requests. get ( f " https : / / api. scratch. mit. edu / users / { username } / { pagetype }? limit = 20 & offset = { offset * 20... | [
-0.6455639004707336,
-1.0864611864089966,
0.9164426922798157,
-0.05508643016219139,
-0.371918261051178,
0.4949738383293152,
-0.9203737378120422,
-1.3769116401672363,
0.5820667743682861,
0.720089852809906,
-0.3071157932281494,
0.42103311419487,
-0.4372086226940155,
0.6208775043487549,
0.2... |
async def error _ message ( description : str, ctx : context, author : bool = true ) : await ctx. send ( embed = make _ embed ( title ='error ', description = f'* * { description } * * ', ctx = ctx, color ='dark _ red ', author = author ), delete _ after = 30 ) | [
0.08674989640712738,
1.2479220628738403,
0.672823429107666,
0.4382097125053406,
0.3174425959587097,
0.9162145256996155,
-0.6817643046379089,
0.38388699293136597,
-0.09386342018842697,
0.18740305304527283,
0.020920872688293457,
1.8416236639022827,
-0.5565282702445984,
0.3824933171272278,
... |
def top _ files ( query, files, idfs, n ) : query _ tf _ idfs = dict ( ) for file in files : query _ tf _ idfs [ file ] = 0 for word in query : query _ tf _ idfs [ file ] + = idfs [ word ] * files [ file ]. count ( word ) sorted _ files = [ file for file in sorted ( query _ tf _ idfs, key = lambda x : query _ tf _ idfs... | [
-0.3002246916294098,
0.2530541718006134,
0.3964691460132599,
-0.3175005316734314,
0.10210753232240677,
-0.3686082661151886,
0.05906352028250694,
-0.1989474594593048,
-0.8208692669868469,
0.805665135383606,
0.6722444295883179,
-1.0078529119491577,
-0.3627146780490875,
-0.035724472254514694,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.