text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def dijkstra ( self, start _ vids, end _ vids ) : sql = " " " select *, v. lon : : double precision, v. lat : : double precision from pgr _ dijkstra ('select { id } as id, { source } as source, { target } as target, { cost } as cost, { reverse _ cost } as reverse _ cost from { edge _ table } ', % s, % s, { directed } )... | [
-0.7895934581756592,
0.009506696835160255,
0.6083696484565735,
-0.39054110646247864,
-0.5925660729408264,
-0.450977623462677,
-0.6860496997833252,
0.07926739007234573,
-0.9591659903526306,
1.2027087211608887,
-0.5314552187919617,
0.4279480576515198,
-0.3005945384502411,
0.26233041286468506... |
def gf _ pow ( f, n, p ) : assert n > = 0 if not n : return [ 1 ] elif n = = 1 : return f elif n = = 2 : return gf _ sqr ( f, p ) h = [ 1 ] while true : if n & 1 : h = gf _ mul ( h, f, p ) n - = 1 n > > = 1 if not n : break f = gf _ sqr ( f, p ) return h | [
-0.4468614161014557,
0.8117812275886536,
0.6426276564598083,
1.4914395809173584,
0.13806183636188507,
0.18774859607219696,
-0.33144137263298035,
0.45449531078338623,
-0.9235203862190247,
0.6708187460899353,
-0.20940496027469635,
-0.6161991953849792,
-0.550717830657959,
0.1744244545698166,
... |
def _ create _ df ( self, vcf, variant _ list, num _ variants ) : df _ dict = defaultdict ( list ) samples = vcf. samples # iterate over all variants in variant list. for var _ idx in range ( num _ variants ) : variant = variant _ list [ var _ idx ] # iterate over each allele in variant to split up multi alleles. alts ... | [
-0.2830421030521393,
0.14958855509757996,
0.5337544679641724,
-0.06121155247092247,
-0.337348997592926,
-0.7583041191101074,
0.21410338580608368,
0.2963797450065613,
-0.813543438911438,
0.0825740322470665,
-0.3136018216609955,
-0.1175030991435051,
0.23579539358615875,
-0.08881048113107681,... |
def view _ rules ( ) : print ( " \ n * * * game rules * * * \ n " ) print ( " goal : get as close to 21 as you can without going over. if you get closer to 21 than the dealer does, you win. \ n " ) print ( ( " - minimum bet : $ { } ". format ( rules ['min _ bet'] ) ) ) print ( ( " - doubling allowed on { }. only one ad... | [
0.13222794234752655,
0.26228660345077515,
0.6973951458930969,
-1.2186981439590454,
-0.10106371343135834,
0.4484735429286957,
-0.27367115020751953,
-0.31816086173057556,
-0.7389817237854004,
0.4986819624900818,
0.703691840171814,
1.261508822441101,
0.07687889784574509,
0.165114164352417,
... |
def init _ filters ( ) : defaults ='{ " app " : " * ", " uri " : " * ", " status " : [ 200, 300, 400, 500 ], " apply _ filter " : false }'filters = json. loads ( getenv ( " filters ", defaults ) ) return filters | [
-0.7173580527305603,
-0.22703565657138824,
0.5923863053321838,
0.25297123193740845,
0.3097592294216156,
-0.252116858959198,
-1.204633116722107,
-0.2412436455488205,
-0.17083525657653809,
0.7285110950469971,
-1.0741770267486572,
0.4188925623893738,
-0.3134300112724304,
0.6228914260864258,
... |
def test _ create _ user ( self ) : email = " test @ recipeapi. com " password = " password _ for _ test _ create _ user " user = get _ user _ model ( ). objects. create _ user ( email = email, password = password ) self. assertequal ( user. email, email ) self. asserttrue ( user. check _ password ( password ) ) | [
0.12387830018997192,
0.32356929779052734,
0.08006910234689713,
0.5367946624755859,
1.15630304813385,
0.7564569115638733,
0.1608237773180008,
0.5308979749679565,
-0.21400998532772064,
-0.17256376147270203,
-0.8385710120201111,
-0.5851455926895142,
0.21758580207824707,
-0.054500091820955276,... |
def vault _ address ( self, value ) : self. _ update _ values ('hashi _ vault _ addr ', value, parent _ attribute ='inputs') | [
-0.12484848499298096,
-0.042332351207733154,
0.47360435128211975,
0.6944857835769653,
0.2822559177875519,
0.7340940237045288,
0.8770725131034851,
-0.8508162498474121,
0.7312266230583191,
0.07639005780220032,
-0.22459836304187775,
0.046244435012340546,
0.4984807074069977,
0.0168292224407196... |
def main ( ) : print ( " launch main. py plz " ) | [
1.0181539058685303,
-0.8587019443511963,
0.24467118084430695,
1.3001197576522827,
-0.39094987511634827,
1.3181195259094238,
1.0689910650253296,
0.7825465202331543,
0.05565263330936432,
-0.2841181457042694,
-0.11582646518945694,
1.0169124603271484,
-0.21603645384311676,
-0.00001268527103093... |
def choose ( myindices, t ) : maresult = numpy. ma. choose ( myindices, list ( map ( _ makemaskedarg, t ) ) ) f = getattr ( t, " fill _ value ", 1. e20 ) return transientvariable ( maresult, fill _ value = f ) | [
-0.43171560764312744,
0.030458291992545128,
0.2971779406070709,
-0.6583659052848816,
0.14804530143737793,
-0.8488618731498718,
0.36755678057670593,
-0.7685087323188782,
-0.4054974317550659,
0.43002569675445557,
-0.41689375042915344,
-0.07210168242454529,
0.3609258234500885,
-1.170516967773... |
def save _ model ( model, model _ filepath ) : pkl _ filename = model _ filepath with open ( pkl _ filename,'wb') as file : pickle. dump ( model, file ) with open ( pkl _ filename,'rb') as file : pickled _ model = pickle. load ( file ) return pickled _ model | [
0.00957009382545948,
-0.9707485437393188,
0.16831819713115692,
-0.3734281063079834,
0.4368382394313812,
0.8325660228729248,
-0.16339011490345,
-0.18771275877952576,
-0.24472635984420776,
1.4073762893676758,
-1.1231200695037842,
-1.0951334238052368,
0.3022388219833374,
-0.05994511395692825,... |
def convert _ node _ indep _ type ( node ) : knot = node if knot. type = = elsupenum. elsupenum. support _ fixed _ end. value : knot. type = elsupenum. elsupenum. support _ fixed _ joint. value if knot. type = = elsupenum. elsupenum. support _ roller _ end. value : knot. type = elsupenum. elsupenum. support _ roller _ ... | [
-0.3500133156776428,
0.19289745390415192,
0.9412726163864136,
-0.3935166299343109,
-0.39922747015953064,
1.0390772819519043,
0.6134133338928223,
0.5435106754302979,
-0.34307825565338135,
0.03148801252245903,
-0.38985803723335266,
1.6907427310943604,
-0.2746550440788269,
-0.0121683059260249... |
def test _ resolution _ with _ channels ( ) : import kwcoco dset = kwcoco. cocodataset. demo ('vidshapes8 - msi - multisensor') coco _ img = dset. coco _ image ( 1 ) coco _ img. img ['resolution'] ='1 meter'# test with a channel that does / does not exist chan = coco _ img. channels. fuse ( ). to _ list ( ) [ 0 ] shape... | [
0.6319221258163452,
0.1606951802968979,
0.5562384724617004,
-0.21927909553050995,
0.22098848223686218,
-0.31346210837364197,
-0.28878068923950195,
-0.35659414529800415,
0.7228890657424927,
-0.6699587106704712,
-0.6131387948989868,
-0.7047408819198608,
0.3116978108882904,
0.5468777418136597... |
def test _ absorb1 ( self ) : shield = battleshield ( shield ( ) ) damage = shield. defense ( ) * 2 damage _ unabsorbed = shield. absorb ( damage ) self. assertequal ( shield. _ defense _ left, 0 ) self. assertequal ( damage _ unabsorbed, shield. defense ( ) ) | [
0.7939995527267456,
0.41035643219947815,
0.6099894046783447,
0.27193889021873474,
0.7806121706962585,
1.1574736833572388,
0.21571126580238342,
-0.49229949712753296,
1.0207325220108032,
-1.1618808507919312,
-0.7010217308998108,
0.16239683330059052,
0.40862542390823364,
1.0849257707595825,
... |
def cleanprevioussimulation ( output _ path, alltrajs ) : equilibration _ folders = glob. glob ( os. path. join ( output _ path, " equilibration * " ) ) for folder in equilibration _ folders : try : shutil. rmtree ( folder ) except oserror as exc : if exc. errno! = errno. enoent : raise # if another process deleted the... | [
0.6910273432731628,
-0.1826392114162445,
0.9578858017921448,
0.3294386565685272,
-0.2262997180223465,
-0.44089701771736145,
1.806839942932129,
-0.43071606755256653,
-0.19918464124202728,
0.7137882709503174,
0.4502045512199402,
-0.7861895561218262,
-0.20336580276489258,
0.5813195705413818,
... |
def createmappingforfirstepoch ( initialstructures, topologies, processors ) : topologymapping = list ( range ( 1, len ( initialstructures ) ) ) + [ 0 ] topologymapping = topologymapping * int ( np. ceil ( processors / len ( initialstructures ) ) ) topologies. topologymap [ 0 ] = topologymapping [ : processors ] | [
-0.7593620419502258,
1.0146710872650146,
0.4167284369468689,
-0.44271910190582275,
0.5798450708389282,
0.5522027611732483,
1.1802740097045898,
0.41587576270103455,
0.8369000554084778,
-0.10311900079250336,
-0.2136542946100235,
-0.7506783604621887,
0.4022197723388672,
0.2988716661930084,
... |
def text ( self, value ) : assert isinstance ( value, six. text _ type ),'got % r'% value assert self. cursor _ position < = len ( value ) # don't allow editing of read - only buffers. if self. read _ only ( ) : raise editreadonlybuffer ( ) changed = self. _ set _ text ( value ) if changed : self. _ text _ changed ( ) ... | [
-0.400258868932724,
0.30837157368659973,
0.3344002664089203,
0.2883841097354889,
-0.23559439182281494,
0.13087621331214905,
0.7215673923492432,
-0.821445643901825,
0.4401550590991974,
0.47156137228012085,
-0.664508044719696,
0.651111364364624,
-0.29488059878349304,
0.2347218245267868,
-0... |
async def tcp _ connect ( self ) : if self. tc _ sock : self. tc _ sock. close ( ) self. tc _ sock = socket. socket ( ) self. tc _ sock. setblocking ( false ) while true : try : await self. loop. sock _ connect ( self. tc _ sock, ( self. ip, self. port ) ) except oserror as e : if _ _ debug _ _ : print ( " trying to co... | [
-0.4919569790363312,
0.23681576550006866,
0.3483053147792816,
-0.21895815432071686,
0.18867667019367218,
-0.3838750422000885,
-0.11123617738485336,
-0.23266054689884186,
-1.0042146444320679,
0.4121955335140228,
0.7019590735435486,
-0.2580038011074066,
-0.04758518561720848,
-0.5102216005325... |
def parse _ topology ( example _ folder _ path, example _ results _ path = " " ) : print ( " executing the topology parser... " ) time _ start = time. time ( ) # checks if the services are specified. services = get _ services ( example _ folder _ path ) # get name mapping from service names to image names. mapping _ na... | [
-0.6659864783287048,
0.17692488431930542,
0.8125141263008118,
-0.20171695947647095,
-0.5388032793998718,
-0.13981850445270538,
0.6276664733886719,
0.0717034786939621,
-0.34284526109695435,
-0.048873573541641235,
-0.142717182636261,
-0.0013689022744074464,
0.677830696105957,
0.9166256785392... |
def loaddata ( self, data ) : super ( footcomponentguide, self ). loaddata ( data ) self. anklectrl. xfo = data. get ('anklexfo') self. toectrl. xfo = data. get ('toexfo') self. toetipctrl. xfo = data. get ('toetipxfo') self. backpivotctrl. xfo = data. get ('backpivotxfo') self. frontpivotctrl. xfo = data. get ('frontp... | [
-0.5182603001594543,
0.2036716192960739,
0.497515469789505,
-0.7795677185058594,
0.30854055285453796,
0.14016534388065338,
0.13087907433509827,
-0.35023927688598633,
0.021951213479042053,
-0.20093326270580292,
-0.38414862751960754,
-1.2448571920394897,
-0.24278506636619568,
0.4769149422645... |
def get _ vm _ name ( name ) : return name. split ( '. ', 1 ) [ 0 ] | [
-0.685435950756073,
0.19838939607143402,
0.5598092675209045,
0.44443923234939575,
-0.011378908529877663,
0.003820903366431594,
-0.5944522023200989,
-0.30676013231277466,
0.306352823972702,
1.0653071403503418,
0.059681959450244904,
0.543181836605072,
-0.38620296120643616,
-0.552223622798919... |
def logistic ( y, p ) : assert p. shape [ 0 ] = = 1 p = p [ 0 ] assert ( ( y = = 1 ) | ( y = = 0 ) ). all ( ) ll = ( ( y = = 1 ) * np. log ( p ) + ( y = = 0 ) * np. log ( 1 - p ) ) return - ll | [
0.4884614944458008,
-0.4392109513282776,
0.6995726227760315,
0.622914731502533,
0.4332844316959381,
0.4701962471008301,
-1.3529199361801147,
-0.5515281558036804,
0.47772201895713806,
1.0436996221542358,
0.1706571877002716,
0.621783435344696,
-0.2539713382720947,
-0.21972298622131348,
-0.... |
def test _ domain _ list ( self ) : pass | [
-0.5157207250595093,
0.3442969024181366,
-0.010229724459350109,
1.1970851421356201,
0.6898193359375,
0.6777026653289795,
0.34898141026496887,
0.5071865320205688,
0.6981404423713684,
-0.8337435126304626,
-1.3822903633117676,
0.979435384273529,
-0.21382589638233185,
1.4273791313171387,
-0.... |
def mkdiffy ( ) : y = ypoints # the c function : c = ones ( m, dtype ='d') c [ 0 ] = 2. 0 c [ m - 1 ] = 2. 0 # set up the differentiation matrix dy = zeros ( ( m, m ), dtype ='d') dy [ 0, 0 ] = ( 2. 0 * ( m - 1 ) * * 2 + 1 ) / 6. 0 dy [ m - 1, m - 1 ] = - ( 2. 0 * ( m - 1 ) * * 2 + 1 ) / 6. 0 for n in range ( m ) : for... | [
0.35992780327796936,
-0.21015428006649017,
0.8238954544067383,
-0.01801370643079281,
0.06231605261564255,
0.26663079857826233,
0.7881575226783752,
-0.07255768775939941,
-0.31765666604042053,
-0.623487114906311,
-0.18929241597652435,
0.04305151477456093,
0.2643876373767853,
0.55796486139297... |
def fizzbuzz ( n ) : result = [ ] for i in range ( 1, n + 1 ) : if i % 3 = = 0 and i % 5 = = 0 : value = " fizzbuzz " elif i % 3 = = 0 : value = " fizz " elif i % 5 = = 0 : value = " buzz " else : value = str ( i ) result. append ( value ) return result | [
-1.0142014026641846,
0.4923659563064575,
0.42752838134765625,
0.46911728382110596,
0.2384907305240631,
0.0072113387286663055,
0.14078573882579803,
-0.351644903421402,
0.27201393246650696,
-0.011389058083295822,
-1.3926830291748047,
-0.39946097135543823,
-0.8475661277770996,
0.9503703117370... |
def generatetrajectoryselectionstring ( epoch, epochoutputpathtempletized ) : return " [ \ " " + os. path. join ( epochoutputpathtempletized % epoch, constants. trajectorybasename ) + " \ " ] " | [
-0.7681137919425964,
-1.0196716785430908,
0.39882928133010864,
-0.5049413442611694,
-0.06073914095759392,
-0.03402747958898544,
0.5074223279953003,
-0.8707229495048523,
-0.6288142204284668,
0.9108551144599915,
-0.21273542940616608,
-0.09102503210306168,
0.5595073103904724,
-0.6100216507911... |
def _ attributes _ set _ final ( self, key, val = none, flow = _ down ) : # make sure interface is ready to use us _ key = self. _ attributes _ t _ underscore ( key ) d = self. _ attributes _ t _ init ( us _ key ) newval = val oldval = d ['attributes'] [ us _ key ] ['value'] if none = = newval : # freeze at current val... | [
-0.8623313903808594,
0.1736995428800583,
0.6482787728309631,
-0.33027350902557373,
-0.5883290767669678,
-0.45550647377967834,
0.35550978779792786,
0.046550996601581573,
-0.18840615451335907,
0.755635142326355,
0.16622543334960938,
0.26808425784111023,
0.2615169584751129,
0.9812338352203369... |
def conv _ block ( inputs, growth _ rate, name, bottle _ neck = false ) : bn _ axis = 3 if k. image _ data _ format ( ) = ='channels _ last'else 1 x = inputs if bottle _ neck : x = batchnormalization ( axis = bn _ axis, epsilon = 1. 001e - 5, name = name +'_ 0 _ bn') ( x ) x = activation ('relu ', name = name +'_ 0 _ r... | [
-0.03846820071339607,
-0.0553557425737381,
1.0671844482421875,
0.7760008573532104,
-0.687652051448822,
0.3015250265598297,
-0.5401638746261597,
-0.9674032330513,
-0.6591579914093018,
0.27242839336395264,
0.03055485710501671,
0.5564693808555603,
0.15324224531650543,
0.028211189433932304,
... |
def create _ heatmap _ query ( sql _ add ) : print ('creating heatmap') try : df = pd. read _ sql _ query ('select lat, lon from ticket _ data t1 join address _ data t2 on t1. address = t2. address'" where " + sql _ add, conn ) except : print ('invalid query') return if df. shape [ 0 ] > 50000 : df = df. sample ( n = 5... | [
0.658610999584198,
-0.2756441831588745,
0.6666826009750366,
-0.0009359605610370636,
-0.07330641895532608,
0.36711764335632324,
0.3160704970359802,
0.40990298986434937,
0.5390660166740417,
-0.034863680601119995,
0.4181267023086548,
0.23265931010246277,
0.17616263031959534,
0.298026025295257... |
def select _ features ( df ) : return df [ [ " pclass ", " sex " ] ] | [
-1.2447130680084229,
-0.1942443698644638,
0.26857268810272217,
1.0897544622421265,
0.4295985698699951,
0.29171231389045715,
0.027241067960858345,
0.2357202172279358,
0.1559154987335205,
-0.8932215571403503,
-0.21823514997959137,
1.1058812141418457,
0.15074250102043152,
-0.6149417161941528,... |
def test _ more255 _ metadata _ invalid ( self ) : invalid = deepcopy ( group _ examples. launch _ server _ config ( ) [ 0 ] ) invalid ['args'] ['server'] ['metadata'] = {'ab'* 150 :'ag'} self. assertraises ( validationerror, validate, invalid, group _ schemas. launch _ server ) invalid ['args'] ['server'] ['metadata']... | [
-0.6910984516143799,
0.6003991365432739,
0.351730614900589,
-0.15039272606372833,
-0.253139853477478,
0.4470919370651245,
-0.44953951239585876,
0.26766473054885864,
-0.4904100000858307,
0.3355438709259033,
-0.5204080939292908,
0.94398432970047,
0.22196932137012482,
0.9606986045837402,
1.... |
def test _ cancel _ direct _ paid _ does _ create _ transfer _ block ( self ) : self. assertfalse ( block. objects. exists ( ) ) event = baker. make _ recipe ('booking. future _ pc ', cost = 10 ) direct _ paid _ booking = baker. make _ recipe ('booking. booking ', user = self. user, event = event, paid = true, payment ... | [
0.8265528678894043,
0.3038131892681122,
0.5520402193069458,
0.9087055325508118,
-0.23517580330371857,
1.8218920230865479,
0.1296202689409256,
-0.12323397397994995,
-0.17590099573135376,
-0.5036791563034058,
-0.8131287097930908,
-0.27425581216812134,
0.1103060245513916,
0.4903976619243622,
... |
def to _ bytes ( self ) : chunks = [ png _ sign ] chunks. extend ( c [ 1 ] for c in self. chunks ) return b " ". join ( chunks ) | [
-0.4508601129055023,
-0.01393579225987196,
0.5666927695274353,
-0.367552250623703,
0.47149354219436646,
0.1287260502576828,
-0.8650693893432617,
-0.9326971173286438,
-0.06165029853582382,
-0.5717738270759583,
-0.8009024858474731,
-0.2051711082458496,
-0.5361650586128235,
0.0798542648553848... |
def extend _ step ( self, cached _ states : nestedmap, inputs : jtensor, *, time _ step : jtensor, segment _ mask : optional [ jtensor ] = none, cross _ inputs : optional [ jtensor ] = none, cross _ paddings : optional [ jtensor ] = none, cross _ segment _ mask : optional [ jtensor ] = none ) - > tuple [ jtensor, neste... | [
-0.20676949620246887,
-0.2596380412578583,
0.6805382966995239,
0.5436282753944397,
-0.11078688502311707,
-0.3272363543510437,
0.22432281076908112,
-0.55449378490448,
0.13694995641708374,
-0.2635546624660492,
-0.5388725996017456,
0.13186296820640564,
1.2562756538391113,
0.6615695953369141,
... |
def type _ addr ( payload ) : try : parsed = ipaddress. ip _ address ( payload ) except valueerror : try : parsed = ipaddress. ip _ network ( payload ) except exception as exc : # pylint : disable = broad - except logger. error ( " got invalid address / network : % s : % s : % s ", payload, exc. _ _ class _ _. _ _ name... | [
-0.04534938931465149,
-0.908226490020752,
0.9468064308166504,
-0.9689224362373352,
0.10239827632904053,
-0.7008969187736511,
-0.013024418614804745,
-0.4554413855075836,
0.34558606147766113,
-0.02898906171321869,
0.31435564160346985,
0.15104526281356812,
0.023414691910147667,
-0.46015986800... |
def reconfig _ eyeq _ get _ horizontal _ phase ( fpgaid, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " taken together, the horizontal phase and vertical height specify the cartesian x - y coordinates of the point on the eye diagram that you want to sample. you can increment through 64 phases over 2 ui on the h... | [
-0.12143097817897797,
0.03629105165600777,
0.8352504968643188,
-0.09544658660888672,
-0.7416796684265137,
-0.30165302753448486,
0.04041840881109238,
-0.04150879755616188,
-0.14038865268230438,
0.5582191348075867,
0.04467843100428581,
0.4516147971153259,
-0.6272866725921631,
0.5104005336761... |
def force _ to _ date ( obj ) : if type ( obj ) is date : return obj elif type ( obj ) is datetime : return obj. date ( ) raise typeerror ('must be a datetime. date or datetime. datetime, not % s'% type ( obj ) ) | [
-0.37644538283348083,
0.19413472712039948,
0.6473001837730408,
0.3859691023826599,
0.19241556525230408,
1.0271563529968262,
-0.06941225379705429,
-0.5269015431404114,
0.5620259046554565,
-0.016315288841724396,
-0.0008867002325132489,
0.249193012714386,
-0.7171764373779297,
0.38225820660591... |
def _ _ init _ _ ( self ) : self. unique _ id = none # ga. js sets all three timestamps to now for visitors, so we do the same now = datetime. now ( ) self. first _ visit _ time = now self. previous _ visit _ time = now self. current _ visit _ time = now self. visit _ count = 1 self. ip _ address = none self. user _ ag... | [
-0.43690019845962524,
0.4251708388328552,
0.5659667253494263,
0.10787355899810791,
0.9073678255081177,
-0.02690507099032402,
1.0862622261047363,
-0.1607944667339325,
0.06996173411607742,
0.13146960735321045,
-0.633084237575531,
0.5098240375518799,
0.3447985351085663,
0.7338599562644958,
... |
def residue _ count ( self ) : return len ( self. residues ( ) ) | [
0.7830384969711304,
0.05418192595243454,
0.23606939613819122,
-1.1695821285247803,
1.4411109685897827,
0.07140835374593735,
-0.3277346193790436,
1.0904877185821533,
-0.002089696703478694,
-1.090923547744751,
-0.5095012784004211,
0.12628662586212158,
0.23060989379882812,
-0.5091947317123413... |
def save ( self, filename, compress = false, transformer = none, computation = none ) : if self. getter is none : self. setup _ save ( transformer = transformer, computation = computation ) tensors = dict ( ) if self. getter _ type = ='old': tensors = { name : tensor. copy ( ) for name, tensor in zip ( self. getter _ o... | [
-1.2175779342651367,
0.052045099437236786,
0.5443181395530701,
-0.18813754618167877,
0.2259742170572281,
-0.18844683468341827,
0.7344002723693848,
0.45491114258766174,
-0.7735873460769653,
0.35758301615715027,
-0.6239901185035706,
-0.7864564657211304,
0.3756144046783447,
0.5088279843330383... |
def override _ camera _ res ( self ) : if self. _ _ rop is not none : return self. _ _ rop. parm ( " override _ camerares " ). eval ( ) | [
-0.2606149911880493,
-0.10319734364748001,
0.6040142774581909,
0.36227118968963623,
0.8704054355621338,
-0.8894844055175781,
1.0202888250350952,
-0.01694083772599697,
1.1665847301483154,
-0.8964964747428894,
-0.2453283667564392,
-0.2545945644378662,
-1.1629817485809326,
-0.0902104601264,
... |
def _ set _ text ( self, value ) : working _ index = self. working _ index working _ lines = self. _ working _ lines original _ value = working _ lines [ working _ index ] working _ lines [ working _ index ] = value # return true when this text has been changed. if len ( value )! = len ( original _ value ) : # for pyth... | [
-0.8433848023414612,
0.052086055278778076,
0.4769737422466278,
-0.5858849287033081,
-0.5802006125450134,
-0.41356340050697327,
-0.24001652002334595,
-0.3441656231880188,
0.18335764110088348,
0.39097660779953003,
-0.1823263317346573,
-0.12103136628866196,
-0.49617454409599304,
-0.4830562472... |
def sort ( array ) : n = array. len ( ) for i in range ( n, - 1, - 1 ) : heapify ( array, n, i ) for i in range ( n - 1, 0, - 1 ) : array. swap ( 0, i ) heapify ( array, i, 0 ) victorylap ( array ) | [
-0.3460729718208313,
-0.03251119703054428,
0.9134491682052612,
0.6433326601982117,
-0.2552962303161621,
0.18206560611724854,
-0.1613520085811615,
-0.5339756608009338,
0.740128219127655,
0.38586243987083435,
0.00010378296428825706,
0.17173965275287628,
0.028424030169844627,
1.17849755287170... |
def find _ parsing _ errors ( self ) : if self. _ parsing _ errors is not none : return self. _ parsing _ errors self. _ parsing _ errors = [ * self. find _ all _ table _ parsing _ errors ( ), * self. find _ all _ row _ parsing _ errors ( ), ] return self. _ parsing _ errors | [
-0.47558149695396423,
0.09150715917348862,
0.3739622235298157,
0.264001727104187,
0.8877461552619934,
0.0886043831706047,
0.2909463346004486,
-0.04829416051506996,
-0.16488902270793915,
-0.7240316867828369,
-0.5481796860694885,
-0.48163914680480957,
0.001284402096644044,
1.542033076286316,... |
def test _ frequency2scale ( ) : import pywt scale = 5 sr = 44100 wavelet = " morl " f _ hz = pywt. scale2frequency ( wavelet, scale ) * sr assert sp. frequency2scale ( f _ hz, wavelet, sr ) = = scale | [
0.2160930335521698,
-0.14896763861179352,
0.32020172476768494,
-0.20107288658618927,
-0.12213103473186493,
-0.13129647076129913,
-0.5941666960716248,
-1.163637399673462,
-0.01461337972432375,
-0.3998284339904785,
-0.589521586894989,
-0.2940334975719452,
-0.1430414915084839,
0.9363064169883... |
def _ activate _ provisioning _ service _ block ( self ) : config = self. _ config. plugins [ self. full _ name ] policy _ file = self. _ mountpoint + " / " + config. get ('policy _ file _ path ','' ) + " / " + \ config. get ('policy _ file ','' ) if os. path. isfile ( policy _ file ) : log. debug ( " removing % s ", p... | [
0.6174387335777283,
-0.9172314405441284,
0.817289412021637,
-0.0870680883526802,
0.24326345324516296,
-0.014565527439117432,
-0.19078131020069122,
0.5602262020111084,
-0.21841876208782196,
0.6677078008651733,
-0.3961062729358673,
-0.03169235587120056,
-0.8715121150016785,
0.073880672454833... |
def test _ invalid _ personality _ no _ path ( self ) : del self. server ['personality'] [ 0 ] ['path'] self. assertraisesregexp ( validationerror, "'path'is a required property ", validate, self. server, group _ schemas. server ) | [
-0.4701995849609375,
-0.08656387031078339,
0.28334149718284607,
0.15776686370372772,
-0.20127533376216888,
1.3965122699737549,
0.21198444068431854,
0.6422643661499023,
-0.38926321268081665,
-0.44687870144844055,
-0.05344649404287338,
0.029111456125974655,
-1.4236136674880981,
0.43058857321... |
def enumerate _ cartesian _ product ( *, design _ grid : mapping [ str, sequence ], descriptors : list [ descriptor ], name : str, description : str ='' ) - > enumerateddesignspace : # check that the grid size is small enough to not cause memory issues grid _ size = np. prod ( [ len ( grid _ points ) for grid _ points ... | [
-0.7958431243896484,
0.8383731842041016,
0.5249815583229065,
0.053584057837724686,
0.18015365302562714,
-0.6857348084449768,
-0.1995272934436798,
-0.5056752562522888,
-0.2776881456375122,
-0.2649553120136261,
0.23925746977329254,
0.7008839845657349,
0.7511103749275208,
-0.7376084923744202,... |
def _ _ progressive _ update _ ui ( self ) : if self. _ _ ui _ update : for output in self. selected _ outputs : output. ui. progressive = self. _ _ progrssive _ check _ box. is _ checked ( ) | [
-0.4417685866355896,
-0.7426877021789551,
0.5744556784629822,
0.5740349292755127,
-0.14799508452415466,
0.056742969900369644,
0.39351075887680054,
-0.6937854290008545,
-0.7184481620788574,
-0.008707474917173386,
0.9120193719863892,
0.06425391882658005,
-1.3552080392837524,
0.82324743270874... |
def _ _ init _ _ ( self, owner, amount = 0 ) : self. owner = owner self. amount = amount self. _ transactions = [ ] | [
0.5864333510398865,
0.23363718390464783,
0.6430312991142273,
0.7874395847320557,
-0.5322021245956421,
-1.2572622299194336,
-0.0505414642393589,
0.01601259410381317,
0.7304934859275818,
0.047718748450279236,
-0.7350624203681946,
-0.3271506130695343,
0.3851061463356018,
0.30586567521095276,
... |
def _ _ init _ _ ( self, path ) : super ( indexrstoutputwriter, self ). _ _ init _ _ ( ) self. _ file _ object = none self. _ path = path | [
-0.11623554676771164,
-0.7125046849250793,
0.3065760135650635,
0.25311946868896484,
-0.2803657054901123,
-1.2109450101852417,
1.4424599409103394,
0.048955004662275314,
-0.38569915294647217,
-0.26598089933395386,
-0.5401681661605835,
-0.36480364203453064,
-0.1368134319782257,
-0.11602960526... |
def _ register _ operator ( cls, operator ) : if not isinstance ( operator, operator ) : raise typeerror cls. _ available _ operators. append ( operator ) | [
-1.4277727603912354,
0.921456515789032,
0.4824902415275574,
0.46581873297691345,
0.2463756799697876,
0.08586160838603973,
-0.7147126197814941,
0.0006534531712532043,
0.68901526927948,
-0.18754351139068604,
-0.9250925779342651,
0.22793397307395935,
-0.19579096138477325,
0.5245591998100281,
... |
def grab _ data ( self, naverage = 1, * * kwargs ) : if self. debug : print ('enter grab _ data ', time. perf _ counter ( ) ) channel = self. settings. child ( ('channels') ). value ( ) ['selected'] # self. controller. writestring ( r " " " vbs?'return = app. acquisition. horizontal. numsegments'" " ", 1 ) # numsegment... | [
0.31557929515838623,
-0.6090388298034668,
0.8532983064651489,
0.10142368823289871,
0.23136083781719208,
-0.4812547266483307,
0.6495363116264343,
-0.8088375329971313,
0.4749063551425934,
-0.366534024477005,
-0.41960206627845764,
0.3970220685005188,
-0.5058926343917847,
0.4415684640407562,
... |
def check _ version _ now ( self ) : try : self. updater. checkversionnow ( ) except exception as sub _ error : self. logger. warning ( u " update checker error : { 0 } ". format ( sub _ error ) ) | [
-0.45239633321762085,
-1.491700291633606,
0.48817023634910583,
1.157702922821045,
-0.07525777816772461,
1.3121992349624634,
-0.2684241235256195,
0.15100447833538055,
-1.3735036849975586,
1.2234257459640503,
0.17606212198734283,
0.2732582688331604,
-0.5096659064292908,
0.8967232704162598,
... |
def corr ( x, y, alternative ='greater ', reps = 10 * * 4, seed = none, plus1 = true ) : prng = get _ prng ( seed ) tst = np. corrcoef ( x, y ) [ 0, 1 ] sims = [ np. corrcoef ( permute ( x, prng ), y ) [ 0, 1 ] for i in range ( reps ) ] left _ pv = ( np. sum ( sims < = tst ) + plus1 ) / ( reps + plus1 ) right _ pv = ( ... | [
0.010957825928926468,
0.4273463189601898,
0.5640055537223816,
-0.7390048503875732,
-1.3683563470840454,
0.12568014860153198,
-0.3791485130786896,
-0.1796002984046936,
-0.35103684663772583,
1.0326104164123535,
0.05234678089618683,
0.26150742173194885,
0.15142658352851868,
-0.244611039757728... |
def _ arguments _ types ( cls ) : return {'name': co. basicoption ( str, none ),'fix _ bnd': co. booloption ( false ),'empty _ holes': co. booloption ( false ),'base': co. basicoption ( str ),'plus': co. listofoptions ( unitegrids. option ( ) ),'angle0': co. basicoption ( float, 1. ),'filler': co. basicoption ( str,'3'... | [
-0.5948264002799988,
-0.08347108960151672,
0.361969530582428,
-1.3835439682006836,
0.5485224723815918,
-0.06017846241593361,
-0.0188754815608263,
-0.7892768383026123,
-0.607559323310852,
0.8856003880500793,
-0.8832797408103943,
-0.08505309373140335,
-0.18673501908779144,
0.5985638499259949... |
def find _ all _ components _ by _ name ( self, * component _ names ) : try : return tuple ( self. _ components [ name ] for name in component _ names ) except keyerror : return none | [
-1.0414913892745972,
-0.37079140543937683,
0.47213903069496155,
-0.2234114706516266,
0.5651153326034546,
-0.5112798810005188,
-1.3462607860565186,
-1.1979366540908813,
-0.2849384844303131,
0.1262698620557785,
-0.17699430882930756,
-1.2649856805801392,
-0.7415799498558044,
0.101149581372737... |
def size _ region ( init _ pos, end _ pos ) : size _ x = end _ pos. x - init _ pos. x + 1 size _ z = end _ pos. z - init _ pos. z + 1 size _ y = end _ pos. y - init _ pos. y + 1 return vec3 ( size _ x, size _ y, size _ z ) | [
0.7494515180587769,
-0.45534366369247437,
0.7351384162902832,
-0.8246052265167236,
-0.08694645017385483,
0.3768114447593689,
-0.04364650696516037,
0.0013419465394690633,
-0.11811761558055878,
0.04500797390937805,
-0.44781485199928284,
0.4705192744731903,
-0.054803960025310516,
-0.895648777... |
def main ( ) : print ('* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n'' * * \ n'' * welcome to your therapist - - to end, simply type " exit "... * \ n'' * * \ n'' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | [
0.7983464598655701,
-0.40583470463752747,
1.1402477025985718,
0.3533669114112854,
-0.6114844679832458,
0.6099599599838257,
0.9094087481498718,
-0.246524378657341,
-0.04983463138341904,
0.34689968824386597,
-0.15024439990520477,
0.6948936581611633,
-0.38669463992118835,
-0.6806730031967163,... |
def get _ delta _ func ( self, symbols ) : delta = none for d in self. delta _ functions : if self. state = = d. start _ state and symbols = = d. inputs : delta = d if delta is none : # print " tm. get _ delta _ func ( ) : no delta for input symbol : % s " % symbol # print " current state : % s " % self. state # sys. e... | [
0.1018061712384224,
-0.6152685880661011,
0.6770276427268982,
-0.16897714138031006,
0.5424190163612366,
0.0968327522277832,
1.2953686714172363,
-0.5205445289611816,
0.3200993239879608,
-1.0290125608444214,
-0.03503287211060524,
-0.17660194635391235,
-0.13908281922340393,
-0.2291315793991089... |
def calc _ gc _ content ( file ) : gccount = 0 gcname = " " for record in seqio. parse ( file, " fasta " ) : if gccount < gc ( record. seq ) : gccount = gc ( record. seq ) gcname = record. id print ( gcname ) print ( gccount ) | [
1.537194013595581,
-0.6011139154434204,
0.5662249326705933,
-0.3446213901042938,
-0.011755929328501225,
-0.29068630933761597,
1.011590600013733,
-0.5874567031860352,
-1.1354883909225464,
0.5367459654808044,
-0.2714463770389557,
-0.18229424953460693,
-0.2996191084384918,
0.5840135812759399,... |
def get _ month ( self ) : return self. datetime. month | [
0.7579753398895264,
-0.027849355712532997,
0.43556493520736694,
0.6992229223251343,
0.5140010118484497,
1.358721375465393,
0.4641375243663788,
0.24110469222068787,
0.4250573217868805,
-1.5275405645370483,
0.6900481581687927,
0.6545149087905884,
-0.37072327733039856,
-0.42157015204429626,
... |
def test _ creation _ with _ scaling _ policies _ valid ( self ) : validate ( {'groupconfiguration': self. config,'launchconfiguration': self. launch,'scalingpolicies': group _ examples. policy ( ) }, rest _ schemas. create _ group _ request ) | [
0.590280294418335,
-0.03339112177491188,
0.23453859984874725,
0.3160097301006317,
-0.5182383060455322,
1.5309162139892578,
-0.9190795421600342,
-0.24259649217128754,
-0.16381452977657318,
0.9874856472015381,
-0.2432197630405426,
-0.3140495717525482,
-0.3787127137184143,
0.6370902061462402,... |
def get _ job _ type ( buildername ) : if not buildername : return none for job _ type in job _ type _ buildername : for pat in job _ type _ buildername [ job _ type ] : if pat. match ( buildername ) : return job _ type return none | [
0.16119569540023804,
0.0040525635704398155,
0.6240373849868774,
0.8299127221107483,
-0.1880989819765091,
-0.5424129366874695,
0.5578463077545166,
0.16428419947624207,
-0.16085152328014374,
-0.7148113250732422,
-0.20896288752555847,
0.06206414848566055,
-0.7610293030738831,
0.10810711234807... |
def feature _ importance ( self ) : num _ features = self. _ component _ obj. n _ features _ in _ return np. zeros ( num _ features ) | [
-0.5710790753364563,
-0.23935014009475708,
0.27198803424835205,
0.20775218307971954,
1.6899442672729492,
-0.25913161039352417,
0.7517213225364685,
0.646153450012207,
0.14664162695407867,
-0.5822567343711853,
-0.9229661226272583,
0.4378909170627594,
-0.40783873200416565,
-0.4287196099758148... |
def create3b ( scfw, outfile, app, m4, dcd, scd, csf, offset, version ) : try : boot _ image = bootimg3b ( 0, offset, version ) with open ( scfw,'rb') as f : boot _ image. add _ image ( f. read ( ), enumapptype. scfw ) # open and load app segment if app is not none : images _ list = app. split ( " ; " ) images _ type =... | [
-0.04103078693151474,
-0.1790824979543686,
0.689160943031311,
0.5558757781982422,
-0.020786691457033157,
0.15056344866752625,
-0.17889176309108734,
-0.18129289150238037,
-0.10252415388822556,
0.10776568204164505,
0.36252883076667786,
-0.4034395217895508,
0.321455717086792,
0.64597564935684... |
def virtual _ interface _ get _ all ( context ) : return impl. virtual _ interface _ get _ all ( context ) | [
-0.22236362099647522,
0.23546051979064941,
0.14607948064804077,
1.3557603359222412,
-0.2647258937358856,
0.08044341206550598,
-0.48449215292930603,
-0.7796238660812378,
0.37838423252105713,
0.03271198645234108,
-0.4664357304573059,
0.588347852230072,
-0.7433362603187561,
0.2135206311941146... |
def to _ percent ( value, return _ float = true ) : def percent ( p ) : if return _ float : return float ( p ) else : return int ( round ( p * 100 ) ) if isinstance ( value, int ) : value = float ( value ) / 100. if value < = 0 : return percent ( 0 ) else : return percent ( value ) | [
-0.14668172597885132,
-0.038057100027799606,
0.48067614436149597,
0.4000824987888336,
0.06470640748739243,
0.20986172556877136,
0.10148070007562637,
-0.44652092456817627,
0.15364009141921997,
0.9166843295097351,
0.5800307989120483,
-0.8668953776359558,
-0.8879461288452148,
-0.4051197767257... |
def decompose _ plant _ data _ frame _ into _ resources ( df, resources, grid ) : _ check _ data _ frame ( df, " pg " ) plant _ id = set ( df. columns ) _ check _ plants _ are _ in _ grid ( plant _ id, grid ) resources = _ check _ resources _ are _ in _ grid _ and _ format ( resources, grid ) df _ resources = { r : df ... | [
-0.04198594018816948,
-0.01856820471584797,
0.21571381390094757,
-0.16168145835399628,
-0.14424508810043335,
-0.9437663555145264,
0.4963858127593994,
-0.194925919175148,
-0.6657419800758362,
0.041928812861442566,
0.30766433477401733,
-0.6356719136238098,
0.2886095345020294,
-0.280580192804... |
def include _ cookies ( self ) - > typing. optional [ bool ] : return self. _ values. get ('include _ cookies') | [
1.1435655355453491,
1.3466737270355225,
0.5402906537055969,
1.3816405534744263,
-0.07266099750995636,
0.7014560699462891,
0.6942532658576965,
0.7777818441390991,
0.40348753333091736,
0.18760251998901367,
0.29419639706611633,
0.4361180365085602,
-0.8543473482131958,
-0.009197806008160114,
... |
def bounds ( self ) : return self. _ shape. bounds | [
0.07194885611534119,
-1.288100004196167,
0.14871186017990112,
0.5784336924552917,
0.555087149143219,
0.819295346736908,
0.32544979453086853,
-0.6818426847457886,
0.43135419487953186,
-0.8603007793426514,
-1.0411310195922852,
0.7123628854751587,
0.43476226925849915,
0.4847622513771057,
0.... |
def fits ( self, xj, rho ) : a = ( xj > = ( self. midpoint ( ) - rho / 2 ) ) b = ( xj < = ( self. midpoint ( ) + rho / 2 ) ) return a and b | [
0.49853524565696716,
-0.9398170709609985,
0.5437870621681213,
0.7239572405815125,
-0.3616164028644562,
0.412139356136322,
-0.3068079650402069,
-1.1603057384490967,
-0.04681854322552681,
-0.006722758524119854,
0.16832250356674194,
0.3945046067237854,
-1.1304446458816528,
0.42180290818214417... |
def _ _ init _ _ ( self, initial _ size = 3 ) : self. images = { " head " : load _ png ( head _ img ), " body _ straight " : load _ png ( body _ straight _ img ), " tail " : load _ png ( tail _ img ), " body _ turn " : load _ png ( turn _ img ) } self. initial _ size = initial _ size self. coords = [ [ int ( map _ size... | [
-0.7645695209503174,
-0.05763494223356247,
0.6517360210418701,
-0.04791567102074623,
-0.10235483944416046,
0.41351383924484253,
0.5696032047271729,
-0.13243359327316284,
0.0681162104010582,
-0.18207663297653198,
-0.4075045585632324,
0.08849034458398819,
0.16736304759979248,
1.0196729898452... |
def getfieldfactory ( self ) - > ghidra. app. util. viewer. field. fieldfactory :... | [
0.5906787514686584,
0.40798813104629517,
0.2551310956478119,
0.12989777326583862,
0.21958531439304352,
0.03376765176653862,
0.5890290141105652,
-0.43212488293647766,
0.08825285732746124,
-2.3758316040039062,
-0.3736512362957001,
0.5629795789718628,
0.1302514523267746,
-0.22265222668647766,... |
def train ( self, x, y ) : self. x _ tr = x self. y _ tr = y | [
-0.5546143054962158,
0.5316329002380371,
0.315142959356308,
-1.2251261472702026,
0.525729238986969,
-0.14303089678287506,
-0.7962042689323425,
-0.17349873483181,
-1.2728005647659302,
0.1277286559343338,
-1.0492591857910156,
0.2773808538913727,
1.0839039087295532,
-0.9375531077384949,
-0.... |
def testmirrorimageconf ( self ) : ( q, n ) = conftest. mirrorimageconf ( ) self. assertequal ( q, true ) self. assertequal ( len ( n ), 2 ) # i believe the correct answer is 2 | [
-0.30754873156547546,
0.0671759769320488,
0.1722753793001175,
-0.21425624191761017,
-0.0016222854610532522,
0.28769436478614807,
0.225811168551445,
1.4048006534576416,
-0.07922447472810745,
-0.32377931475639343,
-1.8566975593566895,
0.03333060070872307,
0.1582336723804474,
0.95917624235153... |
def two _ sample ( x, y, reps = 10 * * 5, stat ='mean ', alternative = " greater ", keep _ dist = false, seed = none, plus1 = true ) : # set up potential outcomes ; under the null, all units are exchangeable pot _ out _ all = np. column _ stack ( [ np. concatenate ( [ x, y ] ), np. concatenate ( [ x, y ] ) ] ) # if sta... | [
-0.15497221052646637,
-0.09678182005882263,
0.7110034227371216,
-0.17299312353134155,
-1.0909227132797241,
-0.22671709954738617,
-0.40638187527656555,
-0.25875967741012573,
-0.09538154304027557,
1.1368030309677124,
-0.06956972926855087,
0.7988645434379578,
1.177720069885254,
-0.18907630443... |
def execute ( self, freq _ stats = 0 ) : # start time self. time _ init = time ( ) # creates a new report if reportadapter is not none. if self. reportadapter : self. reportadapter. open ( ) # initialize the pso engine self. initialize ( ) # already evaluates all particles print " starting loop over evolutionary algori... | [
0.4460195302963257,
-0.23298466205596924,
0.722010612487793,
-0.07668538391590118,
0.7922992706298828,
-0.3127601146697998,
1.130536675453186,
-0.30572396516799927,
-0.3837090730667114,
-0.9025218486785889,
-0.012880649417638779,
-0.5451422929763794,
0.1830868124961853,
1.2478188276290894,... |
def stored _ high _ score ( self, high _ score ) : with open ( self. filename,'w') as f _ obj : f _ obj. write ( str ( high _ score ) ) | [
0.4946202337741852,
-1.0754175186157227,
0.3972388803958893,
0.25202739238739014,
0.7371100783348083,
0.9039914011955261,
0.37209317088127136,
0.6745947003364563,
0.10369134694337845,
-0.2576350271701813,
-1.562389612197876,
0.6414658427238464,
0.35942766070365906,
-0.24573057889938354,
... |
def insert ( self, layer _ class : type [ tf. keras. layers. layer ], layer _ registry _ function : type _ aliases. registryfunction, ) : layer _ key = hash ( layer _ class ) self. _ layer _ class _ dict [ layer _ key ] = layer _ class self. _ registry [ layer _ key ] = layer _ registry _ function | [
-0.6074032783508301,
0.9062802195549011,
0.38176608085632324,
-0.2526090443134308,
1.046796441078186,
0.44050389528274536,
0.4408939778804779,
0.9119393229484558,
-0.3573988080024719,
-0.35969385504722595,
-1.0745954513549805,
0.8260911107063293,
0.1456768959760666,
0.6881956458091736,
1... |
def get _ ngram _ freq _ features ( ngram _ seq, ngram _ library, get _ duration = false, ngram _ counts = none ) : # # initialize arrays ngr _ freq = np. zeros ( ( len ( ngram _ seq ), ngram _ library. shape [ 0 ] ) ) if get _ duration : if ngram _ counts is none : raise valueerror ('you need to give the ngram counts ... | [
0.007321374956518412,
0.1435319036245346,
0.5560827851295471,
0.3616948425769806,
0.5499633550643921,
-1.053883671760559,
0.6318463087081909,
0.2871614396572113,
-0.04907594248652458,
0.8538979887962341,
0.09745366126298904,
0.3976643681526184,
-0.23562772572040558,
0.5520222187042236,
0... |
def train _ prior ( x, indices, type ='noprior ', hyperparameters = [ ], savepath = none ) : if type = ='normal': parameters = compute _ parameters _ normal ( remove _ excluded ( truncate ( x ), indices, type ='numpy') ) if savepath is not none : with open ( f ". / models / { savepath }. pkl ", " wb " ) as file : pickl... | [
-0.5304409861564636,
0.36334228515625,
0.9965436458587646,
0.19222398102283478,
0.33980613946914673,
-0.3589600622653961,
0.28973931074142456,
-0.08228162676095963,
0.4578099250793457,
1.2500402927398682,
-0.3387969136238098,
0.017933456227183342,
-0.5441332459449768,
-0.308615118265152,
... |
def combine _ html _ css ( html _ template _ chunk : str, css _ template _ chunk : str ) - > str : html _ out = html _ template _ chunk if len ( css _ template _ chunk. strip ( ) ) > 0 : html _ out + ='\ n < style > \ n'+ css _ template _ chunk +'\ n < / style > \ n'return html _ out | [
0.26751360297203064,
-0.45272088050842285,
0.4812963902950287,
0.2566809058189392,
-0.09472035616636276,
-0.08761327713727951,
-1.2163000106811523,
0.02137080952525139,
-0.9036023616790771,
-0.19893041253089905,
0.65101158618927,
-0.06423313915729523,
0.3586304485797882,
0.0118255764245986... |
def process _ set _ waypoint _ cmd ( self, t, dt ) : assert ( type ( self. direction _ cmd ). _ _ name _ _ = ='setwaypointcmd') waypoint _ tolerance = 10. 0 x _ c, y _ c = ( self. direction _ cmd. x _ c, self. direction _ cmd. y _ c ) x, y = ( self. platform. x, self. platform. y ) dx = x _ c - x dy = y _ c - y distanc... | [
0.050167109817266464,
-0.7704756259918213,
0.6198770403862,
-1.0087956190109253,
0.47826361656188965,
0.7955935597419739,
0.37051764130592346,
-0.47796615958213806,
-0.41849786043167114,
0.6244256496429443,
0.19812411069869995,
0.8184477090835571,
0.10159702599048615,
0.33005601167678833,
... |
def cov _ to _ invcov ( m ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # from scipy import linalg q = linalg. lapack. dpotri ( linalg. lapack. dpotrf ( m ) [ 0 ] ) [ 0 ] q = q + q. t n = len ( q ) q [ rang... | [
-0.2942940294742584,
-0.49196213483810425,
0.6107900738716125,
-0.13007096946239471,
-1.0331807136535645,
-0.41570237278938293,
0.5681254863739014,
1.016674280166626,
-0.45240214467048645,
1.0097661018371582,
-0.09821212291717529,
-0.3920130729675293,
-0.6830635666847229,
-0.73713314533233... |
def save ( self, filename ) : path _ name = os. path. dirname ( filename ) if not os. path. exists ( path _ name ) : os. makedirs ( path _ name ) fname = os. path. join ( path _ name, " model. statetxt " ) cfg _ file = open ( fname,'w') vals = dict ( [ ( x. name, x. get _ value ( ) ) for x in self. params ] ) numpy. sa... | [
-0.3810224235057831,
-0.33196747303009033,
0.7820981740951538,
-0.6245789527893066,
0.12179513275623322,
-0.04033110663294792,
0.6648399233818054,
-0.2891019880771637,
-0.8460568785667419,
0.7832918167114258,
-1.1424036026000977,
-0.4120026230812073,
-0.24333636462688446,
1.069611072540283... |
def count _ unauthenticated _ public _ posts _ for _ user _ with _ username ( cls, username ) : public _ posts = cls. get _ unauthenticated _ public _ posts _ for _ user _ with _ username ( username = username ) return public _ posts. count ( ) | [
-0.8469783663749695,
0.2427075207233429,
0.3847609758377075,
0.22038112580776215,
-0.2521132826805115,
0.7452467083930969,
0.24774833023548126,
0.5773485898971558,
-0.8147937059402466,
-0.4067116975784302,
-1.5985368490219116,
0.13121096789836884,
-0.36588215827941895,
0.3621465265750885,
... |
def _ delete ( self, p ) : node = self. _ validate ( p ) if self. num _ children ( p ) = = 2 : raise valueerror ('cannot delete, position has two children') child = node. _ left if node. _ left is not none else node. _ right if child is not none : child. _ parent = node. _ parent if node is self. _ root : self. _ root ... | [
0.4835665822029114,
0.3091086447238922,
0.8526405096054077,
-0.10394677519798279,
-0.43620458245277405,
0.22845324873924255,
0.45893749594688416,
0.23769742250442505,
0.4654165208339691,
-0.0070625897496938705,
-0.05972575396299362,
-0.27969667315483093,
-0.9072251319885254,
-0.47916021943... |
async def test _ missing _ system _ info _ initial ( caplog, v3 _ server ) : async with aiohttp. clientsession ( ) as session : simplisafe = await get _ api ( test _ email, test _ password, session = session, client _ id = test _ client _ id ) systems = await simplisafe. get _ systems ( ) assert systems = = { } assert ... | [
0.14778517186641693,
-0.1715470552444458,
0.31979718804359436,
-0.33465248346328735,
0.8155611753463745,
1.2688924074172974,
0.20731420814990997,
-0.40217697620391846,
0.20289622247219086,
-1.1137163639068604,
-0.5639511346817017,
0.08571802079677582,
0.41733458638191223,
0.533447325229644... |
def test _ contains _ last ( ) - > none : lst = linkedlist ( ) node1 = _ node ( 1 ) node2 = _ node ( 2 ) node3 = _ node ( 3 ) node1. next = node2 node2. next = node3 lst. _ first = node1 assert ( 3 in lst ) is true | [
0.0713861733675003,
0.4775156080722809,
0.5875391364097595,
-0.33671075105667114,
0.5099192261695862,
0.06438904255628586,
-0.2750142514705658,
-0.19933563470840454,
-0.058569636195898056,
0.2876032292842865,
-0.5703568458557129,
0.22028499841690063,
-0.971629798412323,
-0.0501930862665176... |
def insert _ by _ model ( self, user ) : self. db. query ( user. insert _ sql _ query ) | [
-0.682275652885437,
1.3830903768539429,
0.36898306012153625,
0.9074280261993408,
0.0349951796233654,
0.45945417881011963,
0.8735182881355286,
-0.3010522127151489,
-1.1149355173110962,
0.2713213264942169,
-1.4804507493972778,
-0.6882615685462952,
-0.4231627583503723,
0.6065536141395569,
-... |
def _ _ init _ _ ( self, path ) : super ( markdownoutputwriter, self ). _ _ init _ _ ( ) self. _ file _ object = none self. _ path = path | [
0.1009761169552803,
-0.8649969696998596,
0.4301839768886566,
0.3976267874240875,
-0.5212791562080383,
-0.3954075574874878,
1.1086721420288086,
0.8935084342956543,
-0.8975961208343506,
-0.9588148593902588,
0.24928812682628632,
-0.8483576774597168,
0.019578522071242332,
0.49304306507110596,
... |
def test _ 1 _ 23 _ 456 ( self ) : self. spawn ( ". / digits " ). stdin ( " 1 " ). stdin ( " 23 " ). stdin ( " 456 " ). stdout ( " digits : 6 \ n ", " digits : 6 \ n " ). exit ( 0 ) | [
-0.058976754546165466,
0.391355961561203,
0.7287908792495728,
0.4398164451122284,
0.3526289761066437,
0.5992556214332581,
-0.025799734517931938,
-0.3949529826641083,
0.2511637508869171,
-0.12522843480110168,
-0.24656341969966888,
0.7092649340629578,
-0.057634320110082626,
0.498315185308456... |
def update _ table ( self ) : self. cursor. execute ( " " " select * from medicalrecords " " " ) result = self. cursor. fetchall ( ) self. tree. delete ( * self. tree. get _ children ( ) ) for item in result : self. tree. insert ('','end ', text = item [ 0 ], values = item [ 1 : ] ) | [
-0.015300849452614784,
-0.1364409327507019,
0.7730617523193359,
-0.604076087474823,
-0.26389816403388977,
0.2095590978860855,
-0.5224644541740417,
0.6361106038093567,
-1.1219381093978882,
0.908226490020752,
0.8461935520172119,
0.24186407029628754,
-0.7655271887779236,
0.7972096800804138,
... |
def parse _ hypothesis ( hyp, char _ list ) : # remove sos and get results tokenid _ as _ list = list ( map ( int, hyp ['yseq'] [ 1 : ] ) ) token _ as _ list = [ char _ list [ idx ] for idx in tokenid _ as _ list ] score = float ( hyp ['score'] ) # convert to string tokenid = " ". join ( [ str ( idx ) for idx in tokeni... | [
-0.11128655076026917,
-0.5154996514320374,
0.6875867247581482,
-0.25181230902671814,
0.5982858538627625,
-0.7052459716796875,
-0.9229146242141724,
0.015856271609663963,
-0.6105550527572632,
1.1026525497436523,
-1.3384859561920166,
0.18998199701309204,
-0.158335343003273,
-0.232557475566864... |
def gf _ diff ( f, p ) : df = gf _ degree ( f ) h, n = [ 0 ] * df, df for coeff in f [ : - 1 ] : coeff * = n coeff % = p if coeff : h [ df - n ] = coeff n - = 1 return gf _ strip ( h ) | [
-0.020993541926145554,
0.6626520156860352,
0.5341132283210754,
0.24951127171516418,
0.04808596149086952,
0.754892885684967,
0.030321214348077774,
0.30734676122665405,
-0.7730575203895569,
0.25198328495025635,
0.0318431630730629,
0.10557466745376587,
-0.552407443523407,
-0.8436022400856018,... |
def protprot _ onechain _ ref _ caprimodule ( protprot _ input _ list, protprot _ onechain _ list, params ) : reference = protprot _ onechain _ list [ 0 ]. rel _ path model = protprot _ input _ list [ 1 ]. rel _ path capri = capri ( identificator = 42, reference = reference, model = model, path = golden _ data, params ... | [
-0.2805061638355255,
-0.8324640393257141,
0.4643552303314209,
0.04122389107942581,
0.27753424644470215,
0.9967599511146545,
0.5068289637565613,
-0.37284064292907715,
0.22857479751110077,
0.685421884059906,
0.15570931136608124,
0.7020173072814941,
-0.6039085984230042,
0.058015838265419006,
... |
def get _ dispersion ( self, codigo ) : # se definie el query de la consulta. sql _ string = " " " select codigo, tipo _ zona, sum ( distancia _ recorrida ) / count ( * ) as distancia from evolucion _ log as tmp where estado ='adulto'and sexo ='hembra'and tmp. codigo = % ( codigo ) s group by tmp. codigo, tipo _ zona o... | [
-0.2556180953979492,
0.42675548791885376,
0.6355501413345337,
-0.6393201351165771,
-0.22985641658306122,
-0.4385209381580353,
0.25050562620162964,
-0.2898154556751251,
-0.10371720045804977,
0.7858480215072632,
0.00823310948908329,
-0.06912833452224731,
-0.01701895333826542,
0.7435032129287... |
def vpnvserver _ authenticationpolicy _ bindings ( self ) : try : return self. _ vpnvserver _ authenticationpolicy _ binding except exception as e : raise e | [
-0.7813846468925476,
-0.3614236116409302,
0.29166775941848755,
1.4103052616119385,
-0.6732590198516846,
1.8190693855285645,
-0.003918600734323263,
-0.08003811538219452,
1.4878042936325073,
0.8082938194274902,
-0.7756729125976562,
0.6197722554206848,
-0.9733417630195618,
-0.2222132086753845... |
def actualizar ( self, signal = true ) : if signal : row _ count = self. tabla. rowcount ( ) + 1 self. tabla. setrowcount ( row _ count ) else : row _ count = self. tabla. rowcount ( ) - 1 self. tabla. setrowcount ( row _ count ) # row _ count = 0 ventas = get _ all _ ventas ( ) if not ventas : return else : for index,... | [
-0.38752177357673645,
-0.21319705247879028,
0.7573069930076599,
0.6489658951759338,
0.1806524395942688,
0.15016992390155792,
0.018267851322889328,
0.49618035554885864,
-0.7025026082992554,
0.3198871612548828,
0.0645674616098404,
0.048832979053258896,
0.415680468082428,
1.0198872089385986,
... |
def _ load _ data ( self ) : data = np. zeros ( self. natoms, [ ('a _ position ', np. float32, 3 ), ('a _ color ', np. float32, 4 ), ('a _ radius ', np. float32, 1 ) ] ) data ['a _ position'] = coordinates data ['a _ color'] = color data ['a _ radius'] = radius # * view. transforms. pixel _ scale self. shared _ program... | [
0.45977669954299927,
-0.041412632912397385,
0.561728835105896,
-0.9669458866119385,
0.1960320770740509,
0.4184216856956482,
0.6933699250221252,
-0.9634552001953125,
0.18085774779319763,
-0.3620051145553589,
-0.7287831902503967,
0.45249074697494507,
-0.044578876346349716,
0.1059582084417343... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.