text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def compress _ libarchive ( format _ name, filter _ name, input _ files : [ str ], output _ archive ) : with libarchive. file _ writer ( output _ archive, format _ name, filter _ name ) as f : f. add _ files ( input _ files ) | [
0.3795330822467804,
-1.0674177408218384,
0.4826626181602478,
0.2528127133846283,
0.4432014226913452,
0.22683343291282654,
-0.2522328197956085,
0.6115379333496094,
-1.1519718170166016,
0.34178999066352844,
0.18228797614574432,
-0.6707074642181396,
0.011969226412475109,
0.080569788813591,
... |
def makecohortiddates ( self ) : self. cid _ dates = self. infections [ ['cohortid ','date'] ]. \ drop _ duplicates ( ). \ groupby ('cohortid'). \ apply ( lambda x : x. date. values ) | [
0.4551938474178314,
-0.65308678150177,
0.3421573042869568,
-0.5508133172988892,
0.31962838768959045,
0.20810842514038086,
0.5235251784324646,
0.1440647393465042,
0.10035194456577301,
0.17017175257205963,
0.38482242822647095,
1.2061436176300049,
-0.1209423616528511,
-0.7127547264099121,
0... |
def check _ access ( access ) : for current _ access in access : if not current _ access ( ) : abort ( 401 ) | [
-0.8270610570907593,
-1.1203563213348389,
0.6074623465538025,
0.6115880608558655,
-0.2379576861858368,
-0.12182753533124924,
0.11337815970182419,
-0.2753775417804718,
0.34865957498550415,
0.022354215383529663,
1.766725778579712,
0.6244387626647949,
-0.048987336456775665,
0.5362229943275452... |
def _ pretty _ print _ children ( lstart, lend, lexpr, out, mxdepth, mxargs, adsize, indent, curdepth ) : # write start banner out. write ( lstart ) nindent = indent + " | " if adsize : out. write ( " size : " + str ( get _ node _ count ( lexpr ) ) ) # write expressions nbargs = len ( lexpr ) curdepth + = 1 if ( mxargs... | [
0.6376739144325256,
0.2952382564544678,
0.9397467970848083,
-0.24183392524719238,
-0.8818773627281189,
0.11705896258354187,
-0.233454629778862,
-0.3695449233055115,
-0.9250950813293457,
0.20483607053756714,
-0.22458846867084503,
0.2824225425720215,
-0.37103188037872314,
0.7453779578208923,... |
def test _ adjacent _ false ( gr ) : gr. add _ node ('d') gr. add _ node ('e') assert not gr. adjacent ('d ','e') | [
-0.6632981896400452,
0.773342490196228,
0.4680165946483612,
-0.8354772329330444,
0.3809087872505188,
2.01574444770813,
0.5251414775848389,
-0.06845498830080032,
-1.1123026609420776,
-0.3700163662433624,
0.7180318236351013,
-0.29113292694091797,
-0.41549503803253174,
0.43344974517822266,
... |
def _ posttask ( blueprint _ id, o ) : " " " tasks appear to be preserved ( unlike other attrs ) on write. so since we don't want to take control state as authoritative at any time we first delete tasks. after delete we add tasks in the order specified. post https : / / control. ctl. io / blueprints / designer / delete... | [
-0.5457813739776611,
-0.15618129074573517,
0.8205163478851318,
-0.07263069599866867,
0.07698774337768555,
-0.15707197785377502,
0.5728989839553833,
0.27386823296546936,
-0.3956608772277832,
-0.10997425019741058,
-0.5649581551551819,
0.055636417120695114,
0.300849050283432,
0.54481369256973... |
def current ( args ) : manager = windowsproxymanager ( ) if not manager. current ( args. export ) : sys. exit ( 1 ) | [
0.11054778844118118,
-0.3978159427642822,
0.4732658863067627,
0.2447138875722885,
-0.17504332959651947,
0.7490273714065552,
0.5815718770027161,
0.03834275156259537,
-0.5621903538703918,
0.2722892761230469,
1.1907751560211182,
0.6541944742202759,
-1.3814499378204346,
0.07427045702934265,
... |
def test _ delete _ all _ groups _ on _ account ( self ) : list _ groups _ response = self. autoscale _ client. list _ scaling _ groups ( ) list _ groups = ( list _ groups _ response. entity ). groups for each _ group in list _ groups : self. empty _ scaling _ group ( each _ group ) self. autoscale _ client. delete _ s... | [
-0.25663742423057556,
0.3507954776287079,
0.4995664656162262,
0.37819528579711914,
1.0073398351669312,
-0.1791309416294098,
0.20747579634189606,
-0.9310566782951355,
0.24400345981121063,
0.3173818588256836,
-0.039084114134311676,
0.5099093914031982,
-0.49865487217903137,
1.0583596229553223... |
async def serve _ forever ( self ) : try : await asyncio. gather ( * [ server. serve _ forever ( ) for server in self. _ servers ] ) except asyncio. cancellederror : # cancel all client tasks as the tcp server leaves them # running. for client _ task in self. _ client _ tasks : client _ task. cancel ( ) self. _ client ... | [
0.47056692838668823,
0.7856010794639587,
0.5495542287826538,
0.3481513261795044,
0.765275776386261,
0.2699732482433319,
0.6297101974487305,
-0.2327127605676651,
-0.9723258018493652,
-0.06798497587442398,
-0.18699981272220612,
-0.2300487458705902,
-0.05906235799193382,
0.4095729887485504,
... |
def upload _ portfoliohaircut ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': new _ portfoliohaircut _ form = newportfoliohaircutform ( request. post ) if new _ portfoliohaircut _ form. is _ valid ( ) : new _ portfoliohaircut = new _ portfoliohaircut _ form. save ( commit = false ) ... | [
-0.28559228777885437,
0.09415280073881149,
0.6229581832885742,
0.49649351835250854,
0.5061544179916382,
0.6990860104560852,
0.033151715993881226,
-0.22790703177452087,
0.07166915386915207,
0.5169671773910522,
-0.14238186180591583,
0.12119405716657639,
-0.4802030026912689,
0.890600860118866... |
def pair _ setup ( ) : sshd _ config = execute ( " sed - e - i. bak { } { } ". format ( r "'s / ^ #? ( passwordauthentication | challengeresponseauthentication ). * $ / \ 1 no /'", " / etc / sshd _ config " ), capture = true, sudo = true ) if sshd _ config : click. echo ('disabled clear text passwords in sshd') user = ... | [
-0.0034039269667118788,
0.26875951886177063,
0.9130003452301025,
-0.013571193441748619,
-0.3944050371646881,
0.9628589153289795,
0.1274830549955368,
1.4488232135772705,
-0.1507015824317932,
0.2499704509973526,
-0.1222076341509819,
0.3628996014595032,
0.39498117566108704,
1.3975199460983276... |
def vlan _ num _ to _ id ( vlannum ) : print " * * * vlan info * * * " list = networkman. list _ vlans ( none, vlannum, none ) i = 0 for item in list : print " { : d } : ". format ( i ), item i + = 1 print " * * * * * * * * * * * * * * * " prompt = " specify which vlan ( 0 index ) : " i = not _ response ( prompt, i ) r... | [
0.11477378010749817,
-0.5707582235336304,
0.5797587633132935,
-0.025290977209806442,
0.03172916918992996,
0.454494446516037,
1.1219148635864258,
-0.8559370040893555,
0.7627050280570984,
0.38815343379974365,
-0.6009019613265991,
0.2017790824174881,
-0.4993806779384613,
-0.023062145337462425... |
def test _ should _ email ( ) : common. settings [ " pywwa _ email _ limit " ] = 10 for _ in range ( 30 ) : common. email _ timestamps. append ( utc ( ) ) assert not common. should _ email ( ) assert not common. email _ error ( none, none ) | [
0.07803627848625183,
1.4344334602355957,
0.3437232971191406,
-0.2918079197406769,
0.9219412803649902,
1.596975326538086,
-0.18667013943195343,
0.01790476217865944,
0.607793927192688,
0.43424248695373535,
-0.09531805664300919,
0.4151158332824707,
-0.4876564145088196,
-0.34720927476882935,
... |
def remove _ nans ( df ) : # check if all the records have uris logger. info ('dropping % d records with no uri :'% df. loc [ df. uri. isna ( ) ]. shape [ 0 ] ) logger. debug ('\ t'+ df. loc [ df. uri. isna ( ), ['paper _ id ','datestamp ','uri'] ]. to _ string ( ). replace ('\ n ','\ n \ t') ) df. dropna ( subset = ['... | [
0.07418897747993469,
0.261923611164093,
0.45110735297203064,
-0.7629315257072449,
0.13109873235225677,
-0.3172524571418762,
-0.19475285708904266,
1.1915408372879028,
-0.049687352031469345,
0.1069612205028534,
0.5631282329559326,
-0.2819826006889343,
0.14446717500686646,
-0.0407668240368366... |
def finnhylleplassering ( dic, tittel ) : if tittel in dic : print ( " { } er plassert paa plass { } i hylla. ". format ( tittel, dic [ tittel ] [ 3 ] ) ) | [
0.6052985191345215,
-0.37945783138275146,
0.39299023151397705,
-1.5232229232788086,
-0.48757392168045044,
1.0990002155303955,
-0.3038536012172699,
-0.14981159567832947,
-0.13563430309295654,
0.57724928855896,
0.012932692654430866,
0.9367270469665527,
-0.008218927308917046,
-0.0462525039911... |
def _ create _ test _ criteria ( self ) : criteria = [ ] max _ velocity _ criterion = maxvelocitytest ( self. ego _ vehicles [ 0 ], self. _ ego _ max _ velocity _ allowed, optional = true ) collision _ criterion = collisiontest ( self. ego _ vehicles [ 0 ] ) driven _ distance _ criterion = drivendistancetest ( self. eg... | [
0.01609565131366253,
-0.9841071367263794,
0.4931377172470093,
-0.37127310037612915,
1.2180757522583008,
0.26024821400642395,
0.018016286194324493,
0.6944469213485718,
0.19323264062404633,
0.3207555413246155,
0.5782181024551392,
-0.17534354329109192,
-0.282821923494339,
0.7656271457672119,
... |
def order _ search ( request ) : if request. method = ='post': # get search key data from search form search _ value = request. post. get ('search _ value') print ( " = = = = = = = = = = = = = = = = = = = = = = = = " ) # get all requirements in order status if request. user. has _ perm ('customer. customer _ view _ oth... | [
-0.0893743634223938,
0.0029727481305599213,
1.0912505388259888,
0.5043374300003052,
-0.23584739863872528,
0.5495786070823669,
0.2658970355987549,
0.5322968363761902,
-0.41278502345085144,
0.4016643762588501,
0.7898318767547607,
-0.223286971449852,
0.450249582529068,
1.0571790933609009,
-... |
def _ traced _ noop ( * args, * * keywords ) : obj = args [ 0 ] if args else none if obj is none : # treat ` @ traced ( )'as equivalent to ` @ traced'return _ traced _ noop if isclass ( obj ) or isroutine ( obj ) : # ` @ traced'class or function return obj else : # ` @ traced ( logger )'or ` @ traced ( " method _ name1... | [
-0.7056317329406738,
-0.3143726587295532,
0.8133178949356079,
-0.21904072165489197,
0.6838173866271973,
0.2854173481464386,
0.9562862515449524,
-0.765329122543335,
1.4454759359359741,
-0.40132930874824524,
0.2523331642150879,
0.521685779094696,
0.1704205572605133,
-0.5004943609237671,
-0... |
def validate _ email ( email _ user ) : return re. match ( " [ \. \ w ] { 2, } [ @ ] \ w + [. ] \ w + ", email _ user ) | [
-0.20402242243289948,
-0.2072593718767166,
0.40895551443099976,
0.6897802352905273,
-0.5792751908302307,
0.6704908013343811,
0.10140708088874817,
0.4096199870109558,
-0.674589216709137,
0.09195935726165771,
0.10885677486658096,
0.4932921528816223,
-0.46821966767311096,
-0.8122426271438599,... |
def gaussian _ differences ( lcs _ diff, delta = 2 ) : # - - print status. tstart = start ( " calculating gaussian differences. " ) lcs _ gd = np. ma. zeros ( lcs _ diff. shape, dtype = lcs _ diff. dtype ) lcs _ gd [ delta / / 2 : - delta / / 2 ] = lcs _ diff [ delta :, : ] - lcs _ diff [ : - delta, : ] lcs _ gd. mask ... | [
0.3035411238670349,
-0.5872212648391724,
0.8356873989105225,
-0.9599292874336243,
0.14358559250831604,
0.8008957505226135,
0.1232398971915245,
-0.539935827255249,
-0.01306525431573391,
-0.6380600929260254,
-0.24703297019004822,
0.6091631054878235,
-0.06710956245660782,
-0.06098893284797668... |
def create _ aligned _ time _ series ( self, device _ id, measurements _ lst, data _ type _ lst, encoding _ lst, compressor _ lst ) : data _ type _ lst = [ data _ type. value for data _ type in data _ type _ lst ] encoding _ lst = [ encoding. value for encoding in encoding _ lst ] compressor _ lst = [ compressor. value... | [
-0.89642333984375,
0.508045494556427,
0.18326516449451447,
0.009588755667209625,
0.4077094793319702,
0.7873011231422424,
-0.31352028250694275,
-0.7261538505554199,
-0.21989652514457703,
0.061394136399030685,
-0.5359957814216614,
0.25637298822402954,
-1.0155671834945679,
0.8214356899261475,... |
def test _ updatesnr ( self ) : device = self. _ test _ device ( ) # expected - pointer, measure expected = [ 2. 0, 4. 0 ] device. updatesnr ( 2. 0 ) device. updatesnr ( 4. 0 ) result = device. snr self. assertequal ( expected, result ) expected = 3. 0 for i in range ( 0, 2 ) : device. updatesnr ( 2. 0 ) device. update... | [
-0.8282637596130371,
0.38553330302238464,
0.5212420225143433,
0.8012620806694031,
0.3131635785102844,
-0.0837448313832283,
0.4219594895839691,
-0.4562753736972809,
0.06144591048359871,
-0.06247102841734886,
-0.6300449967384338,
-0.31110474467277527,
-0.4042801260948181,
0.4186244308948517,... |
def insertionsortlist ( self, head ) : comparator = lambda x, y : cmp ( x. val, y. val ) # open set & closed set # iterate through all the nodes dummy = listnode ( 0 ) # singly - linked list, thus need dummy _ head dummy. next = head closed _ tail = head while ( closed _ tail and closed _ tail. next ) : open _ head = c... | [
-0.7857697010040283,
0.7673856019973755,
0.7658104300498962,
-0.7196105122566223,
-0.7309167385101318,
0.08547597378492355,
0.5362524390220642,
0.10349024832248688,
-0.014547910541296005,
-0.10065846145153046,
-0.34218141436576843,
0.01780855655670166,
-1.1854307651519775,
0.60824710130691... |
def expression _ from _ tokens ( tokens : list ) - > exp : # type : ignore if not tokens : raise syntaxerror ( " unexpected eof " ) token = tokens. pop ( 0 ) if token = = " ( " : l : list [ exp ] = [ ] # type : ignore while tokens [ 0 ]! = " ) " : l. append ( expression _ from _ tokens ( tokens ) ) tokens. pop ( 0 ) # ... | [
0.7360309362411499,
-0.27681174874305725,
0.5178166627883911,
0.5144093632698059,
-0.6969586610794067,
-0.45166540145874023,
-0.5946913957595825,
0.5651959180831909,
0.6805728077888489,
0.27952855825424194,
-0.43123114109039307,
-0.10013455152511597,
-0.20192784070968628,
-0.35252013802528... |
def sym ( n = 0, s = " " ) : return { " at " : n, " txt " : s, " n " : 0, " mode " : none, " most " : 0, " issym " : true, " has " : { } } | [
-0.707724928855896,
0.4475957453250885,
0.2037152349948883,
-1.1237026453018188,
-0.8784033060073853,
-1.478054404258728,
0.18718549609184265,
-0.13783904910087585,
-0.12358502298593521,
-0.549440860748291,
-1.477810263633728,
-0.19494082033634186,
0.805821418762207,
0.689827561378479,
-... |
def plot _ multi _ ion _ series ( ax, xlist, seriestype, ionlist, timestepslist, mgilist, estimators, modelpath, dfalldata = none, args = none, * * plotkwargs, ) : assert len ( xlist ) - 1 = = len ( mgilist ) = = len ( timestepslist ) # if seriestype = ='populations': # ax. yaxis. set _ major _ locator ( ticker. multip... | [
-0.7447009682655334,
0.05431440845131874,
0.6760797500610352,
0.5059294104576111,
-0.3451659083366394,
0.6239140033721924,
0.1473667174577713,
-0.059773318469524384,
0.0461258739233017,
0.4757027328014374,
0.08207149803638458,
0.25535517930984497,
0.38495686650276184,
0.12491083890199661,
... |
def process _ doc ( doc, options ) : if options. all : features = feature _ utils. getfeatures ( d. getpath ( ), " features. default ", ( " prednom ", " appositive ", " alias " ) ) # reflexive _ heuristic ( d ) # # relative _ heuristic ( d ) predicate _ nominal _ heuristic ( d, features ) # predicate _ nominal _ heuris... | [
-0.531809389591217,
0.9166508913040161,
0.6641560196876526,
0.3191402852535248,
-0.10325134545564651,
-0.3252870440483093,
1.2453206777572632,
1.2157915830612183,
0.1959909349679947,
-0.39136821031570435,
-0.037874478846788406,
-0.8437390923500061,
0.6753987669944763,
0.7165938019752502,
... |
def get _ sub _ commands ( parser : argparse. argumentparser ) - > list [ str ] : sub _ cmds = [ ] # check if this is parser has subcommands if parser is not none and parser. _ subparsers is not none : # find the _ subparsersaction for the subcommands of this parser for action in parser. _ subparsers. _ actions : if is... | [
-0.1752297580242157,
-0.7132465243339539,
0.9214621186256409,
0.788972795009613,
0.16372139751911163,
-0.20869752764701843,
-0.20608346164226532,
-0.2244318276643753,
0.18201108276844025,
-0.6747557520866394,
-0.6717095375061035,
0.9372902512550354,
0.4161109924316406,
0.7981693744659424,
... |
def note _ action ( request, pk = none ) : if request. method = = " post " : if pk is none : form = noteform ( request. post ) else : notes = get _ object _ or _ 404 ( note, pk = pk ) form = noteform ( request. post, instance = notes ) if form. is _ valid ( ) : form. save ( ) return httpresponsepermanentredirect ( reve... | [
-0.0687817633152008,
0.4029172956943512,
0.8638707399368286,
0.4033273458480835,
1.2812944650650024,
0.651979923248291,
0.4510493278503418,
0.21760964393615723,
0.51228928565979,
-0.24322238564491272,
0.4426778554916382,
-0.0011943073477596045,
0.1703164279460907,
0.5744922161102295,
-0.... |
def plot _ trisurf ( x, y, z = np. array ( [ i for i in range ( 100 ) ] ), nombre ='sigmoide 3d') : fig = plt. figure ( figsize = ( 10, 10 ) ) ax = fig. gca ( projection ='3d') ax. plot _ trisurf ( x, y, z ) ax. set _ title ( f " { nombre } " ) plt. xlabel ('eje x') plt. ylabel ('eje y') plt. show ( ) | [
1.0118026733398438,
1.1476823091506958,
0.5080063343048096,
-0.34434759616851807,
-0.12478141486644745,
1.2051011323928833,
0.057011157274246216,
-0.29518923163414,
0.01596646197140217,
0.060569509863853455,
-0.06731323152780533,
1.0924484729766846,
-0.43078702688217163,
-0.735521018505096... |
def _ _ init _ _ ( self, column _ def ) : columndef. _ chk _ unsupported _ fields ( column _ def ) columndef. _ chk _ required _ fields ( column _ def ) self. _ set _ attrs ( column _ def ) | [
0.5182529091835022,
0.2659164369106293,
0.36878010630607605,
0.6604025959968567,
0.1295560747385025,
0.37286576628685,
0.7570208311080933,
0.9893585443496704,
-0.5335143804550171,
-0.030753888189792633,
-1.024130940437317,
0.12309088557958603,
0.6844363808631897,
0.7570834755897522,
0.25... |
def choose ( data, size ) : return [ data [ np. random. randint ( 0, len ( data ) ) ] for _ in xrange ( 0, size ) ] | [
-0.4388492703437805,
-0.1189112514257431,
0.5130842924118042,
-0.4421791732311249,
0.050260014832019806,
0.39440712332725525,
-0.6307010054588318,
-0.5862582325935364,
0.9323301315307617,
-0.03652075305581093,
-0.7480013966560364,
0.6760064363479614,
-0.47052061557769775,
-0.28220641613006... |
def get _ value ( response, location ) : try : print ( " parsing json response... ", end ='' ) json = ujson. loads ( response ) print ( " parsed ok! " ) for x in location : json = json [ x ] return json except valueerror : print ( " failed to parse json, retrying " ) return none | [
-0.3799576759338379,
-1.32262122631073,
0.4964873194694519,
-0.41640135645866394,
-0.36797359585762024,
-0.6435931921005249,
-0.3734889328479767,
-0.03830837458372116,
0.28836509585380554,
0.13944341242313385,
-0.13674689829349518,
-0.04594701901078224,
-0.16826963424682617,
-1.01444101333... |
def skip _ to _ next _ image ( self ) : self. seek _ bead _ num ( self. get _ num _ objects ( ) ) | [
-1.0805306434631348,
0.6392921805381775,
0.4023909270763397,
-0.33442991971969604,
0.33604589104652405,
0.9338959455490112,
2.785637140274048,
-0.6344737410545349,
-0.11957430839538574,
0.14317063987255096,
-0.33673104643821716,
0.9247980713844299,
-0.46340665221214294,
-0.2854738235473633... |
def run _ job ( self ) : self. bind _ job = self. job _ connect ( ) self. bind _ transfer = self. transfer _ connect ( ) with diskcache. cache ( tempfile. gettempdir ( ) ) as cache : while true : self. _ job _ loop ( cache = cache ) | [
-0.10460373014211655,
-0.5862818360328674,
0.5412644743919373,
0.3712879419326782,
-0.19422173500061035,
0.6550315022468567,
0.33024275302886963,
0.19841398298740387,
-0.8549284934997559,
-0.2846898138523102,
-0.07617072016000748,
-0.1658790558576584,
-0.4446007311344147,
0.579498708248138... |
def auto _ status _ code ( func : callable ) - > callable : @ wraps ( func ) def wrapper ( * args, * * kwds ) : result = func ( * args, * * kwds ) status _ code = 200 if isinstance ( result, dict ) : status _ code = result. get ( " status _ code ", 200 ) if not isinstance ( result, ( tuple, list ) ) : result = result, ... | [
-1.0191539525985718,
-0.6148711442947388,
0.48256969451904297,
0.3497462868690491,
0.0598248653113842,
-1.0289239883422852,
0.04047883301973343,
0.8250285387039185,
0.19738078117370605,
0.11176390200853348,
-0.40293174982070923,
0.5714898705482483,
1.3131659030914307,
0.06254152208566666,
... |
def get _ rotation ( chars, horizontal _ text, vertical _ text ) : rotation = " " hlen = len ( [ t for t in horizontal _ text if t. get _ text ( ). strip ( ) ] ) vlen = len ( [ t for t in vertical _ text if t. get _ text ( ). strip ( ) ] ) if hlen < vlen : clockwise = sum ( t. matrix [ 1 ] < 0 and t. matrix [ 2 ] > 0 f... | [
0.05077926442027092,
-0.19524496793746948,
0.5571455955505371,
-0.8071292638778687,
-0.06710866838693619,
-0.4068869650363922,
0.11210621893405914,
-0.2928890287876129,
-0.6348325610160828,
1.1130948066711426,
-0.2638649642467499,
-0.15700943768024445,
-1.4047094583511353,
-0.7328065037727... |
def _ assert _ small _ png ( self, json _ body : jsondict ) - > none : self. asserttrue ( json _ body [ " og : image " ]. startswith ( " mxc : / / " ) ) self. assertequal ( json _ body [ " og : image : height " ], 1 ) self. assertequal ( json _ body [ " og : image : width " ], 1 ) self. assertequal ( json _ body [ " og... | [
-0.41371244192123413,
0.48051121830940247,
0.7573283910751343,
-1.1316837072372437,
0.0629173219203949,
0.40360450744628906,
-0.2850097715854645,
-1.1510913372039795,
0.09165609627962112,
-0.05307206138968468,
-0.3309551477432251,
-0.16914960741996765,
0.211720272898674,
0.694083571434021,... |
def run ( self ) : _ check _ directory ( self. directory ) with directorycontextmanager ( self. directory ) : process = subprocess. popen ( self. arguments, shell = self. _ shell, env = self. env ) _, _ = process. communicate ( ) returncode = process. returncode if returncode! = 0 and not self. _ ignore _ errors : rais... | [
-0.5097485184669495,
-0.12283188104629517,
0.6565961837768555,
0.03891880810260773,
0.61666339635849,
0.44810712337493896,
0.42350971698760986,
0.42510199546813965,
-0.29066044092178345,
-0.035858966410160065,
0.7785558700561523,
0.552525520324707,
-0.15776562690734863,
0.20535220205783844... |
def get _ password ( password, salt = none ) : logger. debug ('activate the encrypten') kdf = pbkdf2hmac ( algorithm = hashes. sha256 ( ), length = 32, salt = salt or b'o \ xe6 \ x1b \ xf5 = \ xe5 \ xb2? \ xf2 \ x11 \ xd4b \ xbc \ x82 @ \ x05 ', iterations = 100000, backend = default _ backend ( ) ) return urlsafe _ b6... | [
0.0011049804743379354,
0.5733299255371094,
0.5533410906791687,
0.8698952794075012,
0.7246500253677368,
-0.8742005825042725,
-0.6045549511909485,
0.767927885055542,
0.10071402788162231,
0.12087078392505646,
-0.0022425642237067223,
0.30984410643577576,
-0.3735954165458679,
-0.055603865534067... |
def sent _ messages ( conn : sqlite3. connection ) : with conn : return conn. execute ('select sent _ timestamp, receiver _ contact, content, received _ timestamp from sentmessage order by sent _ timestamp desc'). fetchall ( ) | [
0.26381587982177734,
-0.2540362477302551,
0.4972282946109772,
-0.21530888974666595,
0.6963860988616943,
-0.70757657289505,
-0.30846816301345825,
-0.7256796360015869,
-0.48806798458099365,
0.163555309176445,
-0.012907000258564949,
-0.706389307975769,
-0.2515254616737366,
0.09254393726587296... |
def getevaluationfreq ( fs : float, minfreq : float ) - > np. ndarray : fmax : float = fs / 4 freq : list = [ ] i : int = 1 f : float = fmax while f > minfreq : f = fmax / math. pow ( 2, ( i - 1. 0 ) / 2. 0 ) freq. append ( f ) i = i + 1 return np. array ( freq ) | [
-0.44035786390304565,
0.3409491777420044,
0.3665810525417328,
0.29989734292030334,
-0.047683004289865494,
-0.881324291229248,
-0.11793474853038788,
-0.1358049213886261,
-0.2895243763923645,
-0.3921773433685303,
0.16960716247558594,
0.0906134769320488,
-0.2437572479248047,
-0.13278815150260... |
def cleanup ( self ) : if self. voptions. basic. delete _ memdump : try : os. remove ( self. memfile ) except oserror : log. error ( " unable to delete memory dump file at path \ " % s \ " ", self. memfile ) | [
1.4650315046310425,
0.051332347095012665,
0.4246791899204254,
0.0730368122458458,
-0.21153287589550018,
0.37443435192108154,
0.5083097815513611,
0.18358781933784485,
0.26681622862815857,
-0.8074084520339966,
0.8400918841362,
0.012590662576258183,
-0.8449007272720337,
0.8756280541419983,
... |
def _ _ init _ _ ( self, l _ h, f, c, l _ a, lr = 0. 1 ) : self. nclasses = c self. ninputs = f " " " define a list of matrices to be used as weights in each layer, these are initialised with random values " " " self. _ _ in = np. random. rand ( f, l _ h [ 0 ] ) self. _ _ hiddens = [ ] self. _ _ hiddens. append ( self.... | [
0.4024803638458252,
-0.11776821315288544,
0.8747466802597046,
-0.004443705081939697,
0.4910390377044678,
-0.036697112023830414,
0.7252980470657349,
0.4506785273551941,
-0.577932596206665,
-0.1988469660282135,
-0.5062368512153625,
-0.022768504917621613,
-0.06963342428207397,
1.1538496017456... |
def start ( self ) : if self. is _ running ( ) : raise inprogress ('race currently underway.') if not self. contestants : raise exception ('no contestants to race! try adding some...') executor = threadpoolexecutor ( max _ workers = self. get _ contestant _ count ( ) ) for fn, args, kwargs in self. _ homogenised _ cont... | [
-0.7286171317100525,
-0.2540830671787262,
0.9179026484489441,
0.7745440006256104,
-0.3161320984363556,
-0.5153930187225342,
0.0011459433007985353,
0.5692498683929443,
-0.6273444890975952,
-0.08147972822189331,
0.036977533251047134,
0.002761265728622675,
-0.49873265624046326,
0.309675872325... |
def _ _ getfilesize ( self, lfns ) : filesizes = { } zerosize = { } res = self. filecatalog. getfilesize ( lfns ) if not res ['ok'] : glogger. error ( " requestpreparation. _ _ getfilesize : failed to get sizes for files. ", res ['message'] ) return res failed = res ['value'] ['failed'] for lfn, size in res ['value'] [... | [
-0.7090672254562378,
0.2568069100379944,
0.5337222814559937,
-0.12790575623512268,
0.8129295706748962,
-1.0232999324798584,
-0.10805604606866837,
0.18898141384124756,
-0.5799881219863892,
-0.9366984367370605,
-0.2642692029476166,
-0.1495571881532669,
-0.011441254988312721,
0.92369937896728... |
def _ _ init _ _ ( self, amount = none, bank _ debit _ details = none, description = none, merchant _ op _ id = none, invoice _ id = none ) : # noqa : e501 # noqa : e501 self. _ amount = none self. _ bank _ debit _ details = none self. _ description = none self. _ merchant _ op _ id = none self. _ invoice _ id = none s... | [
1.07294762134552,
0.16127657890319824,
0.61429363489151,
0.005217556841671467,
0.25877001881599426,
-0.376220166683197,
-0.2435646951198578,
0.20316486060619354,
0.5518203377723694,
-0.30365362763404846,
0.33925697207450867,
0.47808408737182617,
-0.40418878197669983,
0.3144373297691345,
... |
def rgba _ to _ hex ( color ) : return " # % 02x % 02x % 02x % 02x " % ( * color, ) | [
-0.03806396946310997,
-1.125640869140625,
0.607994019985199,
-0.670754075050354,
0.8029611110687256,
0.4786672294139862,
-0.3981724977493286,
0.6422001123428345,
0.04599079117178917,
0.6119837760925293,
-0.4251140058040619,
0.04165405035018921,
0.45070189237594604,
0.4191599190235138,
0.... |
def pad _ lr ( x, fsize, fshift ) : m = num _ frames ( len ( x ), fsize, fshift ) pad = ( fsize - fshift ) t = len ( x ) + 2 * pad r = ( m - 1 ) * fshift + fsize - t return pad, pad + r | [
0.5682539939880371,
-0.27297472953796387,
0.5901182889938354,
-0.9459034204483032,
-0.7948569059371948,
0.3002685606479645,
-0.5768820643424988,
-0.02743159979581833,
0.9183922410011292,
-0.3932790756225586,
-0.12494931370019913,
-0.2389804869890213,
-0.15243087708950043,
1.439509987831115... |
def update ( self, instance, validated _ data ) : instance. description = validated _ data. get ('description ', instance. description ) instance. type = validated _ data. get ('type ', instance. type ) # for opt in validated _ data. get ('options ', instance. options ) : # print ( validated _ data ) instance. save ( )... | [
-0.7959522008895874,
-1.3583754301071167,
0.4746493399143219,
-0.6602323055267334,
-0.2135576605796814,
1.1704660654067993,
-0.6183590292930603,
0.40448904037475586,
0.631869375705719,
0.025533759966492653,
-0.07645972073078156,
0.28252384066581726,
-1.1985173225402832,
-0.409673810005188,... |
def created _ at ( self ) - > optional [ str ] : return pulumi. get ( self, " created _ at " ) | [
0.96734219789505,
0.05497800558805466,
0.36090025305747986,
0.07472114264965057,
1.5591542720794678,
1.2558351755142212,
-0.6035958528518677,
-0.8404825925827026,
-0.2902211844921112,
-0.5715280175209045,
0.08012035489082336,
0.4648800492286682,
1.3667932748794556,
-1.1198670864105225,
-... |
def iriga _ signal ( signal, sampling _ rate, year = 2000 ) : sampling _ rate = float ( sampling _ rate ) signal = signal > ( np. max ( signal ) + np. min ( signal ) ) * 0. 5 # # seperate signal into " high " and " low " # # this signal is a stream of bits. each bit is when the signal is high. the kind of bit is detemi... | [
-0.31096547842025757,
0.28259900212287903,
0.9529685378074646,
0.19128559529781342,
-0.17240172624588013,
-0.4382629692554474,
0.5661971569061279,
-0.321812242269516,
-0.03289458155632019,
0.7689289450645447,
-0.08455804735422134,
0.5682398080825806,
0.005797185935080051,
0.817961037158966... |
def query _ fasta _ vsearch ( self, input _ f, referencefasta, taxinfo, outdir, processes, simmilarity, coverage, extraargstring ) : # vsearch - - usearch _ global % s seeds. pick. fasta - - db.. / data / biocodepassed _ sap. txt - - id 0. 9 \ # - - userfields query + target + id + alnlen + qcov - - userout % sout - - ... | [
0.7767705917358398,
-0.4952445924282074,
0.7376529574394226,
0.855029284954071,
0.09170590341091156,
-0.16353125870227814,
1.0325654745101929,
-0.24446356296539307,
0.004553171340376139,
0.18037649989128113,
1.1737343072891235,
0.12634697556495667,
-0.3209756910800934,
0.12321598082780838,... |
def get _ title ( self, * * kwargs ) : item = kwargs. get ('item') return f'dk - { item. name }'if item else'' | [
-0.6490154266357422,
1.4371334314346313,
0.39659661054611206,
0.3212125599384308,
0.38306552171707153,
-0.4707275331020355,
-1.1788901090621948,
-0.9753401875495911,
0.23363518714904785,
0.414367139339447,
-0.037644241005182266,
-0.714316725730896,
-0.475677490234375,
-0.16165724396705627,... |
def test _ show _ homepage ( self ) : with app. test _ client ( ) as client : resp = client. get ('/') html = resp. get _ data ( as _ text = true ) self. assertequal ( resp. status _ code, 200 ) self. assertin ('< h1 class = " display - 1 " > recent posts < / h1 > ', html ) self. assertin ('< li class = " nav - item ho... | [
1.0301750898361206,
0.9799416661262512,
0.5479038953781128,
0.886553943157196,
0.5067630410194397,
0.7928662300109863,
0.304492712020874,
0.412200927734375,
0.2621175944805145,
0.27774500846862793,
0.39911043643951416,
-0.11071287095546722,
0.09864813089370728,
0.20540833473205566,
-0.03... |
def cross ( vec _ 1, vec _ 2 ) : # calculate the components of the cross - product vector cross _ product _ 1 = vec _ 1 [ 1 ] * vec _ 2 [ 2 ] - vec _ 1 [ 2 ] * vec _ 2 [ 1 ] cross _ product _ 2 = vec _ 1 [ 2 ] * vec _ 2 [ 0 ] - vec _ 1 [ 0 ] * vec _ 2 [ 2 ] cross _ product _ 3 = vec _ 1 [ 0 ] * vec _ 2 [ 1 ] - vec _ 1 ... | [
0.4424791634082794,
-0.35790759325027466,
1.0685856342315674,
0.14455318450927734,
0.7614372372627258,
0.41918131709098816,
-0.3991587162017822,
-0.10030273348093033,
-0.3354915678501129,
1.10245943069458,
-1.072738528251648,
0.36649182438850403,
-0.4797836244106293,
-0.8608533143997192,
... |
def is _ optional ( self ) : return self. presence = = _ pres _ optional | [
-0.11964509636163712,
-1.2878148555755615,
0.48678749799728394,
1.1812160015106201,
0.21103841066360474,
0.19538787007331848,
-0.7459136247634888,
-0.11271240562200546,
1.435003399848938,
0.8423944711685181,
0.4516941010951996,
-0.17230144143104553,
-0.6130156517028809,
0.6507527232170105,... |
def visit _ import ( self, node ) : for import _ in node. names : self. new _ module ( node. lineno, " import ", import _. name ) for alias in node. names : name = alias. asname or alias. name self. count _ name ( name, " import " ) self. count ( " import ", name ) self. generic _ visit ( node ) | [
-0.7942318916320801,
0.7119958400726318,
0.7179410457611084,
-0.4952714443206787,
0.23271790146827698,
0.2918236255645752,
0.936051070690155,
-0.1940627098083496,
-0.29755181074142456,
1.0444250106811523,
-0.6256760358810425,
0.2907255291938782,
1.6634273529052734,
0.8074271082878113,
0.... |
def uv2dirspeed ( u, v ) : windspeed = np. sqrt ( u * * 2 + v * * 2 ) winddirdeg = ( 180 / pi ) * np. arctan2 ( - u, - v ) winddirdeg = winddirdeg % 360 return winddirdeg, windspeed | [
-0.2895485460758209,
-0.4286770522594452,
0.4670743942260742,
-1.0209105014801025,
0.41566818952560425,
-0.056850366294384,
-0.10923708975315094,
1.0233535766601562,
-0.011467625387012959,
-0.3807526230812073,
-0.40109577775001526,
0.8949176073074341,
-0.24713031947612762,
0.13253267109394... |
def vectorselection ( data, timelag, sub _ samples, k = 1, l = 1 ) : _, sample _ n = data. shape x _ pred = data [ 0, sample _ n - sub _ samples - 1 : - 1 ] x _ hist = np. zeros ( ( k, sub _ samples ) ) y _ hist = np. zeros ( ( l, sub _ samples ) ) for n in range ( 1, ( k + 1 ) ) : # original form according to bauer ( ... | [
0.7249860763549805,
0.013802626170217991,
0.6378202438354492,
0.03248606249690056,
-0.2889307737350464,
-0.01833854615688324,
0.38241466879844666,
0.16295619308948517,
-0.20415499806404114,
0.5401251316070557,
-0.15889796614646912,
0.47584113478660583,
0.5483765602111816,
0.045205641537904... |
def get _ encoding _ dict ( ) : key1 = ['a ','b ','c ','d ','e ','f ','g ','h ','i ','j ','k ','l ','m ','n ','o ','p ','q ','r ','s ','t ','u ','v ','w ','x ','y ','z'] key2 = ['a ','b ','c ','d ','e ','f ','g ','h ','i ','j ','k ','l ','m ','n ','o ','p ','q ','r ','s ','t ','u ','v ','w ','x ','y ','z'] value = ['1 ... | [
-0.46862471103668213,
-0.5233170390129089,
1.3729217052459717,
-0.4700009524822235,
-2.044818878173828,
0.277801513671875,
0.24038751423358917,
-0.0865224078297615,
-0.9931572675704956,
1.011905312538147,
-1.6465678215026855,
-0.36857491731643677,
0.14899611473083496,
0.3463424742221832,
... |
def print _ draw _ predictions _ betting _ companies ( ) : data = getdata. load _ preprocessed _ data ( ) dra _ predictions = 0 for index, row in data. iterrows ( ) : if row ['avg _ draw _ odds'] > row ['avg _ home _ win _ odds'] and row ['avg _ draw _ odds'] > row ['avg _ away _ win _ odds'] : dra _ predictions = dra ... | [
-0.8666563630104065,
0.18133370578289032,
0.6181864142417908,
-0.5657603740692139,
-0.3482159674167633,
0.9549762606620789,
0.15956149995326996,
-0.4714105725288391,
-0.2511221766471863,
-0.013816170394420624,
0.6902783513069153,
1.0049042701721191,
0.7317128777503967,
0.4225529730319977,
... |
def current ( self, file ) : option = ( internet _ per _ conn _ option * 5 ) ( ) option [ 0 ]. dwoption = internet _ per _ conn _ flags option [ 1 ]. dwoption = internet _ per _ conn _ autoconfig _ url option [ 2 ]. dwoption = internet _ per _ conn _ proxy _ server option [ 3 ]. dwoption = internet _ per _ conn _ proxy... | [
-0.45680853724479675,
-0.1405583769083023,
0.7467783093452454,
-0.30405187606811523,
0.2510000765323639,
0.035679031163454056,
1.0515925884246826,
0.13001008331775665,
-0.9233371019363403,
0.15085110068321228,
-0.10319583117961884,
-0.16851702332496643,
-0.5998713374137878,
0.3841953575611... |
def add _ negative _ control ( df, control _ name ='dmso ', plate _ dims = [ 16, 24 ], exclude _ outer = 1, cell _ lines = [ ] ) : num _ treatment _ wells = len ( df ) # num _ outer _ wells = get _ boundary _ cell _ count ( plate _ dims, exclude _ outer ) # num _ available _ wells = ( plate _ dims [ 0 ] * plate _ dims ... | [
-0.3056764602661133,
0.14195215702056885,
0.621728241443634,
-0.3465036451816559,
0.12273987382650375,
0.28713110089302063,
-0.012525632977485657,
-0.7425397038459778,
0.41470906138420105,
-0.16576236486434937,
0.4196576476097107,
0.1910593956708908,
0.1248236671090126,
0.36370208859443665... |
def floor _ tiles ( self ) : floorlist = list ( ) for x in range ( self. left + 1, self. left + self. width - 1 ) : for y in range ( self. top + 1, self. top + self. height - 1 ) : floorlist. append ( self. level. get _ tile ( x, y ) ) return floorlist | [
-0.18721604347229004,
-0.7789520025253296,
0.4582187533378601,
0.8563697934150696,
0.018352767452597618,
0.3721446096897125,
0.39710551500320435,
-0.1562795341014862,
0.26331934332847595,
-0.26738470792770386,
-1.119214415550232,
-0.5184600353240967,
-0.6616408824920654,
1.8208894729614258... |
def call ( self, inputs, * args, * * kwargs ) : inputs, categories, mask _ positions = inputs [ 0 ], inputs [ 1 ], inputs [ 2 ] logger = tf. get _ logger ( ) training = kwargs [ " training " ] if self. params [ " mode " ] = = " debug " : logger. debug ( " categories " ) logger. debug ( categories ) if self. params [ " ... | [
-1.1930683851242065,
-0.41733548045158386,
0.8287181854248047,
0.3315580189228058,
0.5035296082496643,
-0.17729413509368896,
0.12043978273868561,
-0.22419604659080505,
0.06512422114610672,
0.13186898827552795,
0.1956528276205063,
-0.2031063735485077,
-0.02407877892255783,
0.249680235981941... |
def self _ link ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " self _ link " ) | [
-0.10138546675443649,
-0.5631867051124573,
0.5720475316047668,
0.6697279810905457,
0.40017446875572205,
0.5964094996452332,
1.1608846187591553,
0.3794645667076111,
0.42111867666244507,
-1.1339080333709717,
-0.4499659240245819,
1.888503074645996,
0.07773024588823318,
-1.0573618412017822,
... |
def to _ ddf ( self, columns = none, shuffle = false, seed = none ) : # use datasetengine to create ddf ddf = self. engine. to _ ddf ( columns = columns ) # shuffle the partitions of ddf ( optional ) if shuffle and ddf. npartitions > 1 : # start with ordered partitions inds = list ( range ( ddf. npartitions ) ) # use r... | [
-0.026525435969233513,
0.7623319625854492,
0.7561520934104919,
-0.12418804317712784,
-0.4314413070678711,
-0.3744622766971588,
0.42776283621788025,
0.3881714344024658,
0.0753404051065445,
-0.8442164063453674,
-0.3977033793926239,
0.23507726192474365,
0.5645080804824829,
-0.5994581580162048... |
def labeler ( files, etalon _ tree, tree _ path = ". ", rebuild = false ) : tree _ path = osp. abspath ( tree _ path ) # raxml needs absolute paths if rebuild : calculator = treeconstruction. distancecalculator ('blosum62') dist _ constructor = treeconstruction. distancetreeconstructor ( ) # construct all trees with up... | [
-0.11208340525627136,
-1.1021336317062378,
0.8595641851425171,
-0.058094512671232224,
0.663032054901123,
0.22931800782680511,
0.4074649512767792,
0.6697347164154053,
-0.46555501222610474,
1.0467320680618286,
0.17183248698711395,
-0.4834762215614319,
0.2534048855304718,
0.4030257761478424,
... |
def run _ command ( self, command ) : command = command. split ( " " ) if not 2 < = len ( command ) < = 3 : return " in valid batchsave aguments " try : batch = super ( ). get _ batch _ holder ( ). get _ batch _ by _ name ( command [ 1 ] ) except exception as error : return error if len ( command ) = = 2 : command. app... | [
-0.08284272998571396,
-0.07669620215892792,
0.7521764039993286,
0.9312092661857605,
0.8290660381317139,
0.8687666654586792,
-0.6772500276565552,
0.11671008914709091,
-0.1897597759962082,
-0.048351775854825974,
-0.7254065871238708,
0.17426221072673798,
-0.14498893916606903,
0.34635195136070... |
def _ _ init _ _ ( self, plot _ shape, png _ shape, plot _ origin = none, silent = false ) : self. image = np. full ( tuple ( png _ shape ) + ( 3, ), 255 ). astype ( np. uint8 ) self. plot _ shape = plot _ shape self. png _ shape = png _ shape if plot _ origin is none : plot _ origin = [ self. plot _ shape [ 0 ] / 2, s... | [
0.4320932924747467,
-0.3511182367801666,
0.5802686810493469,
-0.22738169133663177,
-0.46044257283210754,
0.6356714367866516,
-0.6542431116104126,
0.41138145327568054,
-0.279323935508728,
-0.15740099549293518,
-0.07693465799093246,
0.8458115458488464,
0.8200694918632507,
-0.3268803358078003... |
def merge ( self, other, sequencename = none ) : if other is none : raise runtimeerror ( " merge called on object of type none : did you forget to return a ca from a config function? " ) if not isinstance ( other, componentaccumulator ) : raise typeerror ( " attempt merge wrong type % s. only instances of componentaccu... | [
-0.4384811222553253,
0.04114203155040741,
0.8597992658615112,
0.2908182442188263,
-0.2765485942363739,
-0.18386244773864746,
0.390064537525177,
-0.5885188579559326,
0.5507231950759888,
-0.39444467425346375,
-0.6171687841415405,
0.1324310451745987,
0.0416393019258976,
0.42010995745658875,
... |
def _ _ init _ _ ( self, vg _ name, root _ helper, create _ vg = false, physical _ volumes = none, lvm _ type ='default ', executor = putils. execute, lvm _ conf = none ) : super ( lvm, self ). _ _ init _ _ ( execute = executor, root _ helper = root _ helper ) self. vg _ name = vg _ name self. pv _ list = [ ] self. vg ... | [
-0.1984677016735077,
-0.10422879457473755,
0.6727426648139954,
0.0005809989525005221,
0.2430771142244339,
-0.47442826628685,
-0.27297481894493103,
0.08945396542549133,
-0.06287706643342972,
0.40904781222343445,
0.42565450072288513,
0.21392382681369781,
0.024279095232486725,
1.2632623910903... |
def remove ( name : str, purge : bool = false, apache _ proxy : bool = true ) : log = _ create _ logger ('animal _ remove') s = str ( subprocess. check _ output ( f'docker - compose ps { name } ', shell = true ),'utf - 8'). split ( ) if name = ='traefik'or ( name in s and'up'in s ) : log. error ('cannot remove running ... | [
-0.6187155246734619,
-0.3143068253993988,
1.0275764465332031,
-0.690110981464386,
-0.5266978144645691,
0.10883674025535583,
0.2776707112789154,
0.30245840549468994,
-0.5775359869003296,
0.6943947076797485,
-0.3947814404964447,
0.28221532702445984,
-0.13859321177005768,
0.5909140706062317,
... |
def test _ neghbors _ invalid _ node ( gr ) : with pytest. raises ( valueerror ) : gr. neighbors ('a') | [
0.4518698751926422,
1.4184843301773071,
0.36621156334877014,
0.06785456091165543,
0.9278719425201416,
0.7954038381576538,
0.02069767750799656,
-0.27235057950019836,
-0.5741954445838928,
0.13671521842479706,
0.3905746340751648,
0.6803629398345947,
-0.26309263706207275,
0.40601012110710144,
... |
def get _ static _ predictions ( args, clip, r, score ) : c = args. clip _ y [ clip ] a _ test = r ['test _ mode'] c _ y = a _ test ['c'] y = a _ test ['y'] [ c _ y = = c ] y _ hat = a _ test ['y _ hat'] [ c _ y = = c ] return y _ hat, y | [
-0.8043555617332458,
-1.4558439254760742,
0.5513142943382263,
0.5243640542030334,
-0.28288692235946655,
0.4616752862930298,
0.4361037313938141,
-0.5269159078598022,
-0.014366880990564823,
0.8781895637512207,
0.0019719235133379698,
0.6901761293411255,
1.4430891275405884,
-0.1712922304868698... |
def group _ speed ( k, h, g = g ) : n = 1. 0 / 2 * ( 1 + ( 2 * k * h / np. sinh ( 2 * k * h ) ) ) cg = n * celerity ( k, h, g ) return cg | [
0.9584928154945374,
0.9982125163078308,
0.5340818166732788,
1.0362060070037842,
-0.7661941647529602,
-0.24113290011882782,
0.5427994728088379,
0.617224931716919,
-1.5036050081253052,
0.3885897696018219,
-0.22014397382736206,
0.12966111302375793,
-0.6964739561080933,
1.2366423606872559,
0... |
def test _ errorraisingerrback ( self ) : sd = synchronousdeferred ( synchronousfailure ( runtimeerror ( ) ) ) def errback ( ignored ) : 1 / 0 sd. adderrback ( errback ) l = [ ] sd. adderrback ( l. append ) self. assertequals ( len ( l ), 1 ) self. asserttrue ( l [ 0 ]. check ( zerodivisionerror ) ) | [
0.29705721139907837,
1.1034414768218994,
0.5778841376304626,
0.682733416557312,
1.3528062105178833,
0.1784132868051529,
0.0617324560880661,
0.6124082803726196,
-0.044080715626478195,
-1.1422502994537354,
-0.8205627799034119,
-0.06437133997678757,
-0.778571367263794,
1.3275550603866577,
1... |
def test _ deny _ completion _ for _ invisible _ task ( self ) : response = self. client. post ( self. url, { } ) self. assertequal ( response. status _ code, 400 ) | [
0.7426814436912537,
1.1190409660339355,
0.5834072232246399,
0.9191070199012756,
-0.0987292155623436,
1.7774691581726074,
0.03655669465661049,
-0.3878130316734314,
-0.3933839797973633,
0.19193771481513977,
-0.8604984879493713,
-0.14750590920448303,
0.06573737412691116,
0.8555366396903992,
... |
def set _ background ( self, value, field, * arguments, * * named ) : if self. _ context : callinguithread ( setattr, self. _ context. getscenegraph ( ), field. name, value ) | [
-0.12165315449237823,
0.5171182751655579,
0.593654453754425,
0.3794793486595154,
0.4210725724697113,
0.3681879937648773,
0.3066496253013611,
-1.450146198272705,
-0.2890951931476593,
0.6797911524772644,
-0.7003397345542908,
1.3173259496688843,
-1.2339805364608765,
-0.1330971121788025,
-0.... |
def _ log _ data _ angular ( self, timestamp, data, logconf ) : self. wx = data ['state. wx'] self. wy = data ['state. wy'] self. wz = data ['state. wz'] | [
-0.4169993996620178,
-0.6392626166343689,
0.23553936183452606,
-1.4226837158203125,
-0.4584522843360901,
-0.11432249844074249,
-0.7637749910354614,
-0.18782004714012146,
0.37961092591285706,
0.48102423548698425,
-0.9504578709602356,
0.3490862548351288,
0.4245464503765106,
-0.35313305258750... |
def verify _ eligibility ( request ) : data = { } # todo : need to make the user enter home address and add that to party address u = request. user profile = u. get _ profile ( ) form = verifyeligibilityform ( request. post or none, instance = profile ) if form. is _ valid ( ) : form. save ( ) messages. success ( reque... | [
0.8797051906585693,
-0.47846606373786926,
0.6025876402854919,
0.38882753252983093,
0.26677051186561584,
0.7149029970169067,
0.1627732515335083,
0.976641833782196,
0.3637758791446686,
-0.5836576223373413,
-0.06418797373771667,
0.10107787698507309,
0.04957618936896324,
0.4230167865753174,
... |
def retgenerator ( state, status, message, returnstateinstring ) : # decode bytes to string if ( not isinstance ( message, str ) ) : message = message. decode ('utf - 8') # get extended code from message extendedcode = findextendedcode ( message ) # translate states to strings if asked to do so from caller state = stat... | [
0.0873614251613617,
-0.014890726655721664,
0.6354588270187378,
-1.069604516029358,
-1.5144054889678955,
-0.7608830332756042,
-0.5498790740966797,
0.5152484774589539,
-0.3390524983406067,
-0.24115251004695892,
-0.38938799500465393,
-0.3537793755531311,
-0.9420228600502014,
-0.80170446634292... |
def promjeni _ alpha ( self, x ) : msg ='zahtjev za promjenom prozirnosti pomocnog kanala, alpha = { 0 } '. format ( str ( x ) ) logging. debug ( msg ) value = round ( float ( x ), 2 ) # postavi novu vrijednost self. defaultgraf [ 9 ] = value logging. debug ('vrijednost postavljena') # update boju gumba rgb = self. def... | [
0.015584862791001797,
0.22026589512825012,
0.561513364315033,
-0.7371158003807068,
-0.548544704914093,
0.5436530709266663,
0.35458043217658997,
-0.055522371083498,
-0.4417552947998047,
1.006365418434143,
-0.7567086815834045,
0.2830791175365448,
-0.4658105671405792,
1.376788854598999,
0.0... |
def get _ dependency _ links ( filename ) : with open ( filename ) as file : parsed _ requirements = file. read ( ). splitlines ( ) dependency _ links = list ( ) for line in parsed _ requirements : line = line. strip ( ) if line. startswith ('- - find - links') : dependency _ links. append ( line. split ('=') [ 1 ] ) r... | [
-0.7036641836166382,
-0.5920483469963074,
0.7788495421409607,
0.3774530589580536,
0.7791011333465576,
0.5282493233680725,
0.5408581495285034,
0.9922692775726318,
-0.6114832758903503,
0.33772778511047363,
-0.3752681612968445,
0.3553712069988251,
-0.1743360012769699,
1.3083046674728394,
-0... |
def schedule ( self, action, state = none ) : return self. invoke _ action ( action, state ) | [
-0.4574422538280487,
-0.4089620113372803,
0.41969048976898193,
0.4694923460483551,
-0.3225466012954712,
-0.6671556234359741,
-0.5697610974311829,
0.27303168177604675,
0.7591068744659424,
-0.03877563774585724,
0.08791619539260864,
0.7487419247627258,
-0.03645618259906769,
-0.944820165634155... |
def test _ get _ example _ new _ project _ description ( self ) : pass | [
0.4291191101074219,
0.2982499301433563,
0.4189547896385193,
0.8070210218429565,
0.5575047135353088,
0.8967674374580383,
-0.21233122050762177,
0.5955462455749512,
-0.11775500327348709,
0.2263181209564209,
-0.6392949223518372,
0.5042053461074829,
-0.44782188534736633,
0.37041333317756653,
... |
def _ _ ne _ _ ( self, other ) : if not isinstance ( other, vpptokensubscription ) : return true return self. to _ dict ( )! = other. to _ dict ( ) | [
-0.08510854095220566,
-0.09270929545164108,
0.6619553565979004,
0.08600848913192749,
-0.6334255337715149,
0.15152838826179504,
-1.8242007493972778,
-0.6338996291160583,
0.3061569929122925,
0.21675314009189606,
-0.9437858462333679,
0.5312098264694214,
-0.7530756592750549,
-0.364263236522674... |
def state ( self ) - > str : return value _ to _ state. get ( bool ( self. value ), state _ unknown ) | [
-0.5802963972091675,
-0.15109509229660034,
0.354505717754364,
-0.05429269000887871,
0.03782391548156738,
0.6232044100761414,
-0.07558076828718185,
-0.07486771047115326,
0.3311619162559509,
0.24561136960983276,
0.16373643279075623,
0.04320096969604492,
0.2703796923160553,
-0.653213500976562... |
def testsettaginstancewithbinaryvalue ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = uuid4 ( ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createbinarythriftvalue ('hello, world! ','text / plain') yield self... | [
-0.12751515209674835,
0.09285125881433487,
0.45561495423316956,
-0.7117196917533875,
-0.08737776428461075,
0.8045160174369812,
0.21435564756393433,
-0.572009801864624,
-0.3643692433834076,
-0.20609259605407715,
-1.2878624200820923,
0.3546123802661896,
-0.40594831109046936,
0.73228561878204... |
def max _ occupancy ( self ) : max _ dens = 0 for i in range ( self. n ) : for j in range ( self. n ) : for k in range ( self. n ) : max _ dens = max ( max _ dens, len ( self. g [ i ] [ j ] [ k ] ) ) return max _ dens | [
0.14363685250282288,
0.4548829197883606,
0.5927982330322266,
0.08290127664804459,
0.1822151094675064,
-0.1978539079427719,
0.33913642168045044,
-0.17947247624397278,
-0.2477429360151291,
0.3893490433692932,
1.0150737762451172,
-0.948488712310791,
-0.24028673768043518,
0.15204684436321259,
... |
def _ _ getnewreplicas ( self ) : # first obtain the new replicas from the cachereplicas table res = self. stagerclient. getcachereplicas ( {'status':'new'} ) if not res ['ok'] : glogger. error ( " requestpreparation. _ _ getnewreplicas : failed to get replicas with new status. ", res ['message'] ) return res if not re... | [
-1.5326734781265259,
-0.06460237503051758,
0.5334920883178711,
-0.2537042200565338,
-0.692646324634552,
-0.7582795023918152,
-0.6697620153427124,
0.05555101856589317,
-0.3116493821144104,
0.6364753246307373,
-0.5508984923362732,
0.24498525261878967,
0.16342060267925262,
0.7191928029060364,... |
def get _ part _ details ( self, e ) : item = self. footprint _ list. getselection ( ) row = self. footprint _ list. itemtorow ( item ) if row = = - 1 : return part = self. footprint _ list. gettextvalue ( row, 3 ) if part! = " " : dialog = partdetailsdialog ( self, part ) dialog. show ( ) | [
0.73631352186203,
0.4984420835971832,
0.375152587890625,
0.09152041375637054,
-0.013516961596906185,
0.5017499923706055,
-0.003775661578401923,
-0.025812601670622826,
0.6070922613143921,
-0.38288235664367676,
0.19354277849197388,
-0.022494753822684288,
-0.5347011089324951,
0.40720671415328... |
def deeplabv3 _ resnetd101b _ ade20k ( pretrained _ backbone = false, classes = 150, aux = true, * * kwargs ) : backbone = resnetd101b ( pretrained = pretrained _ backbone, ordinary _ init = false, bends = ( 3, ) ). features del backbone. final _ pool return get _ deeplabv3 ( backbone = backbone, classes = classes, aux... | [
-1.1736466884613037,
1.1725974082946777,
0.6196624636650085,
-0.4262023866176605,
0.7985623478889465,
0.4266570210456848,
0.42631927132606506,
0.7840779423713684,
0.2697144150733948,
0.21682830154895782,
-0.10124655067920685,
0.4357927739620209,
-0.5153257250785828,
-0.49818339943885803,
... |
def from _ futhark ( self, * dargs ) : self. _ errorcheck ( self. lib. futhark _ context _ sync ( self. ctx ) ) out = [ ] for d in dargs : out. append ( self. _ from _ futhark ( d ) ) self. _ errorcheck ( self. lib. futhark _ context _ sync ( self. ctx ) ) if len ( out ) = = 1 : return out [ 0 ] else : return tuple ( o... | [
-1.2613892555236816,
0.9755149483680725,
0.42855650186538696,
0.8227745294570923,
1.1291142702102661,
-1.1631789207458496,
0.12375328689813614,
-0.05106521397829056,
-0.588601291179657,
-0.4712574779987335,
-0.5348679423332214,
-0.8729492425918579,
-0.4057219922542572,
0.2968451976776123,
... |
def restore ( save _ filename, file _ format ) : if file _ format = ='n - data': return neventreader ( path = save _ filename ) elif file _ format = ='aer - data': return aereventreader ( path = save _ filename ) elif file _ format = ='numpy - data': return numpyeventreader ( path = save _ filename ) else : raise value... | [
0.5519992113113403,
-1.2015537023544312,
0.5642518997192383,
0.060438815504312515,
-0.06696317344903946,
-0.11842705309391022,
-0.7630153894424438,
0.5642648935317993,
-0.28650715947151184,
-0.31257766485214233,
0.8285035490989685,
0.2341425120830536,
-0.45438918471336365,
-0.5546923875808... |
def swiss _ pairings ( ) : standings = player _ standings ( ) pairings = [ ] if len ( standings ) % 2! = 0 : pick _ random _ player ( standings ) while len ( standings ) > 1 : idx = 1 prev _ opponents = execute _ query ( " " " select prev _ opponents from players where player _ id = % s " " ", ( standings [ 0 ] [ 0 ], ... | [
-0.5057553648948669,
-0.04768615961074829,
0.9810613393783569,
0.633285403251648,
-0.6634876728057861,
-0.43730562925338745,
0.42685458064079285,
0.82750403881073,
0.6739614009857178,
1.153536081314087,
-0.44040030241012573,
-0.5790513157844543,
-0.31847459077835083,
0.28392350673675537,
... |
def replay ( self ) : # for each timestep, play back the changed lines in affected files. for time, ( commit, timestep ) in enumerate ( self. timeline ) : for file in timestep : # move renamed files if file. renamed _ file : self. files [ file. b _ path ] = self. files [ file. a _ path ] del self. files [ file. a _ pat... | [
0.6327875852584839,
-0.5446601510047913,
0.5584607124328613,
-0.6853688955307007,
0.6478406190872192,
-0.10857194662094116,
0.39372506737709045,
0.2933652102947235,
-0.17932602763175964,
0.1835925132036209,
0.12686258554458618,
0.21565210819244385,
0.418006032705307,
0.06262615323066711,
... |
def get _ private _ section _ name ( config, name, prefix = notset, suffix = notset ) : assert isinstance ( config, configfile ) if prefix is notset : prefix = default _ section _ prefix prefix = config. get ( configuration _ extended, option _ builder _ prefix, prefix ) if prefix : prefix + ='_'if suffix is notset : s... | [
-0.35248151421546936,
-0.2107883095741272,
0.5938097238540649,
-0.8429388999938965,
-0.8026566505432129,
0.28103160858154297,
-0.4755745828151703,
-0.43222886323928833,
-0.10598905384540558,
0.3181735575199127,
-0.15430955588817596,
0.30137306451797485,
0.7766079306602478,
0.55233335494995... |
def make _ hdf ( left, ddict, sensor _ l, station, year ) : for i in sensor _ l : h = ddict [ i ] [ 0 ] [ 0 ] ddict [ h ] [ 1 ] = np. around ( ddict [ h ] [ 1 ], 2 ) left [ h ] = ddict [ i ] [ 0 ] [ 1 : ] + ['-'] + [ h ] + ddict [ i ] [ 1 ]. flatten ( ). tolist ( ) return left | [
-0.5467779040336609,
0.34490159153938293,
0.5064095258712769,
-0.5515794157981873,
0.13649021089076996,
0.813797116279602,
-0.6244184970855713,
0.2699754238128662,
-0.2095930427312851,
0.11224759370088577,
0.035739462822675705,
-0.4799720048904419,
0.06770434230566025,
0.15936386585235596,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.