text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ init _ _ ( self, start : timetype, wait _ time : timetype, end : optional [ timetype ] = st. utctime _ now ( ) ) : self. wait _ time = wait _ time self. start = start self. end = end | [
-0.40211376547813416,
-0.40978822112083435,
0.6147353649139404,
1.04178786277771,
0.5482977032661438,
0.5201268196105957,
-0.5596586465835571,
0.7984411120414734,
-1.128899097442627,
0.927594006061554,
-0.35881826281547546,
-0.027982544153928757,
-0.08748924732208252,
0.42275741696357727,
... |
def rename _ columns ( df ) : old _ columns = df. columns. values. tolist ( ) new _ columns = { } for col in old _ columns : new _ txt = " " for letter in col : new _ txt + = letter new _ txt = new _ txt. replace ('cum ','total') if not new _ txt. startswith ('newcases') and not new _ txt. startswith ('newdeaths') : ne... | [
0.13658525049686432,
-0.906170129776001,
0.8661409616470337,
-0.30441156029701233,
-0.7078686356544495,
-0.2174072414636612,
-0.03236490860581398,
0.49481862783432007,
0.054651327431201935,
0.6926339864730835,
-0.3205464780330658,
0.15201476216316223,
0.592104971408844,
-0.1630448997020721... |
def check _ mac _ os ( ) : return true | [
0.24721799790859222,
0.3578126132488251,
0.3562262952327728,
1.4379795789718628,
-0.7334451079368591,
1.028676152229309,
0.006191167049109936,
0.5354675650596619,
-0.45341312885284424,
-0.9135517477989197,
0.013353445567190647,
0.3330613374710083,
0.16835227608680725,
0.13099785149097443,
... |
def commit _ settings ( self, param ) : try : pass except exception as e : self. emit _ status ( threadcommand ('update _ status ', [ getlineinfo ( ) + str ( e ),'log'] ) ) | [
-0.8328446745872498,
0.2859029471874237,
0.5256270170211792,
0.35816365480422974,
0.8711353540420532,
0.16019318997859955,
0.3915051221847534,
-0.3951493501663208,
-0.18211829662322998,
1.4965261220932007,
-0.3922451138496399,
0.2273513227701187,
-1.089107632637024,
0.46651017665863037,
... |
def trampoline ( func, args, kwargs ) : ignoring = false while true : # we can only set this if we know it will be immediately unset by func if hasattr ( func,'tco') : in _ tc _ stack [ 0 ] = true result = func ( * args, * * kwargs ) # for performance reasons, do not use pattern matching here if isinstance ( result, tu... | [
0.436868816614151,
0.9304285049438477,
0.8299843668937683,
-0.6972924470901489,
-0.4326850473880768,
-0.6442813277244568,
-0.06663317233324051,
-0.8687314391136169,
-0.27887311577796936,
0.8194651007652283,
0.04607072100043297,
-0.8203912973403931,
-0.4426131844520569,
-0.663058876991272,
... |
def _ build _ int _ var _ domain ( min, max, domain ) : # domain not given extensively if domain is none : if min is none : if max is none : return ( ( int _ min, int _ max ), ) _ check _ arg _ integer ( max, " max " ) return ( ( int _ min, max ), ) else : if max is none : # test that first argument is directly a domai... | [
-0.8844066858291626,
-0.16308407485485077,
0.5164811611175537,
-0.054856281727552414,
-0.19745196402072906,
0.0260568056255579,
0.032246749848127365,
-0.043362293392419815,
-0.10226145386695862,
-0.20779161155223846,
-0.10009687393903732,
0.8811249136924744,
-0.534271776676178,
0.056846808... |
def substitute _ elements _ in _ list ( a _ list, substitution _ rule ) : np _ array _ list = np. array ( a _ list ) for element in substitution _ rule. keys ( ) : np _ array _ list = np. where ( np _ array _ list = = element, substitution _ rule [ element ], np _ array _ list ) return list ( np _ array _ list ) | [
0.534286379814148,
-0.35972121357917786,
0.2493789792060852,
0.3062279224395752,
0.6854008436203003,
0.2682284414768219,
-0.8072013854980469,
2.0647966861724854,
0.6636835932731628,
1.329727053642273,
-0.3081408143043518,
1.0000392198562622,
-0.0541306734085083,
1.317689299583435,
0.7390... |
def kodi _ info ( self ) : return {'title': self. title,'plot': self. description,'mediatype':'movie ','duration': int ( self. duration _ ms ) / 1000 } | [
-0.18009844422340393,
-0.5995388627052307,
0.6042290329933167,
-0.10599949955940247,
-0.929327130317688,
-0.30140042304992676,
-1.0388195514678955,
-0.9303415417671204,
-0.5343235731124878,
0.8112789988517761,
-0.7743440270423889,
1.480635404586792,
-0.5755749344825745,
1.0079023838043213,... |
def delete _ event ( activity _ id, event _ id ) : with db _ session ( ) as db : activity = db. query ( models. activity ) \. filter _ by ( id = activity _ id ) \. one ( ) event = db. query ( models. event ) \. filter _ by ( id = event _ id, activity _ id = activity _ id ) \. one ( ) hosting = db. query ( models. hosti... | [
0.35730698704719543,
-0.27833640575408936,
0.9691187739372253,
0.8841132521629333,
0.3587726950645447,
0.31521502137184143,
0.6718145608901978,
0.13986355066299438,
-0.06527680158615112,
0.04475664719939232,
1.1169754266738892,
0.32028838992118835,
0.6371971368789673,
0.8921741247177124,
... |
def process _ scan ( self, msg ) : # update the distance on the front to find wall if msg. ranges [ 0 ]! = 0. 0 : self. front _ distance = msg. ranges [ 0 ] elif msg. ranges [ 1 ]! = 0. 0 : self. front _ distance = msg. ranges [ 1 ] elif msg. ranges [ 360 ]! = 0. 0 : self. front _ distance = msg. ranges [ 360 ] else : ... | [
0.38579925894737244,
-0.21897654235363007,
0.7360116839408875,
-0.4671449363231659,
0.7230756282806396,
0.13704437017440796,
0.4622569978237152,
-0.16082563996315002,
-0.6614044904708862,
-0.21042941510677338,
-0.12261555343866348,
0.3355642855167389,
-0.8202727437019348,
1.115412712097168... |
def build _ cpo _ transition _ matrix ( val ) : def normalize _ value ( val ) : assert not is _ string ( val ), " impossible to build a transition matrix expression from a string " assert not isinstance ( val, dict ), " impossible to build a transition matrix expression from a dictionary. select values ( ) or keys ( ).... | [
-0.9049074053764343,
0.006658194120973349,
0.1721692979335785,
0.4336651563644409,
-0.9392722249031067,
-0.2046223133802414,
0.4909857511520386,
-0.05219552293419838,
0.12646397948265076,
0.6473020315170288,
-0.1446758657693863,
0.10169312357902527,
-0.5460166931152344,
-0.0589813701808452... |
def touch ( self ) : return self. sensors [ 0 ] | [
0.4737618863582611,
-0.3286948502063751,
0.39388084411621094,
-0.35545194149017334,
0.4895692467689514,
0.147758349776268,
0.19889481365680695,
-0.5274718403816223,
0.6272631883621216,
-0.2252417504787445,
0.4392949938774109,
-0.4959792494773865,
-1.371825933456421,
-0.203999862074852,
-... |
async def createnewissue ( gl, event, jsonstr, project _ id, namespace, merge _ iid, source _ branch, path _ with _ namespace ) : url = f " / projects / { project _ id } / issues " description = f " default issue [ { source _ branch } ] for mr! { merge _ iid } "'''check for existing labels'''await checkorcreatelabels (... | [
-0.08427544683218002,
-0.15399837493896484,
0.7406124472618103,
0.10354124009609222,
0.6931880116462708,
0.5843861103057861,
-0.8665476441383362,
-0.25375500321388245,
-0.20673605799674988,
-0.1034574955701828,
-0.3114156424999237,
0.29340091347694397,
-1.3420740365982056,
0.81139069795608... |
def _ _ init _ _ ( self ) : self. trie = { } | [
0.3267459571361542,
-0.2466769814491272,
0.16796596348285675,
-0.8163129091262817,
-0.16671723127365112,
0.2012006938457489,
0.3480673134326935,
1.227048635482788,
-0.25865089893341064,
-0.13736467063426971,
-0.7341457009315491,
0.024994108825922012,
-0.4678804576396942,
0.7071191072463989... |
def exc _ handler ( self ) : return temporary ( self,'current _ exc _ handler ', self. create _ exc _ handler ( ) ) | [
0.7091555595397949,
-1.0203886032104492,
0.26943239569664,
0.07977686077356339,
-0.5749243497848511,
-0.03498829901218414,
0.19367577135562897,
0.47176864743232727,
0.6655373573303223,
-0.2773406505584717,
0.4254928231239319,
-0.07997992634773254,
-0.8200660943984985,
-0.7946025133132935,
... |
def move _ with _ four ( moves _ lst : list, n : int, source : int = 0, intermediate _ left : int = 1, intermediate _ right : int = 2, destination : int = 3 ) - > none : i = m ( n ) [ 1 ] if n > i and i! = 0 : move _ with _ four ( moves _ lst, n - i, source, intermediate _ right, destination, intermediate _ left ) move... | [
-1.2639297246932983,
0.7837530970573425,
0.49816960096359253,
0.4284723401069641,
0.021111732348799706,
-0.35253196954727173,
-0.06457170844078064,
-0.06512372195720673,
-0.29155024886131287,
0.5307192206382751,
-1.8740615844726562,
-1.1422898769378662,
0.11841525882482529,
0.1308780163526... |
def reduce _ sample _ dims ( transitions ) : return [ operate _ on _ frameset ( tx, reduce _ dims ) for tx in transitions ] | [
-0.5613787770271301,
0.017640117555856705,
0.4622974395751953,
0.5032114386558533,
-0.9248887300491333,
-1.2514126300811768,
0.5880413055419922,
0.032485608011484146,
0.33979493379592896,
0.5119466781616211,
-0.3313736617565155,
-0.3296847343444824,
0.43887484073638916,
0.7167403697967529,... |
def test _ four _ plots _ simple ( self ) : inch _ per _ unit = 1. 0 x _ units = 5 y _ units = 5 left = [ 1, 3 ] bottom = [ 3, 3, 1, 1 ] width = 1 height = 1 figsize, coords = pt. make _ coordinates ( inch _ per _ unit, x _ units, y _ units, left, bottom, width, height ) c = [ ( 0. 2, 0. 6, 0. 2, 0. 2 ), ( 0. 6, 0. 6, ... | [
0.2733144164085388,
0.5911758542060852,
0.7817360758781433,
-0.23649437725543976,
-0.042202387005090714,
0.9684813618659973,
0.8201583623886108,
-1.029559850692749,
-0.6656059622764587,
-0.8132832050323486,
-0.8276023864746094,
-0.6257062554359436,
-0.3010876774787903,
-0.6216703653335571,... |
def open ( self, filename, mode = " r " ) : | [
-1.1527584791183472,
-0.6378306150436401,
0.38362976908683777,
0.2950485348701477,
-0.6327752470970154,
0.9957281351089478,
0.9348054528236389,
1.257145643234253,
-0.9887922406196594,
-0.5196665525436401,
-0.04108482226729393,
-0.6580640077590942,
0.1316007524728775,
-0.4684261381626129,
... |
def parse _ args ( ) : parser = argumentparser ( ) parser. add _ argument ('problem _ id ', type = int ) parser. add _ argument ('- - field ', type = str, help ='extract field value') parser. add _ argument ('- - markdown ', type = bool, default = false, help ='print markdown content') parser. add _ argument ('- - cont... | [
0.1725010871887207,
-0.3910711109638214,
0.4470323622226715,
-0.6061505675315857,
0.5818954706192017,
0.3935104310512543,
-0.8119898438453674,
0.20328423380851746,
-0.4366295039653778,
-0.008873313665390015,
0.6363828182220459,
-0.25384992361068726,
-0.528239905834198,
0.2504684627056122,
... |
def _ get _ age ( self ) : return self. _ _ age | [
-0.839221715927124,
-1.0043524503707886,
0.47457054257392883,
-0.7026129364967346,
0.18426236510276794,
0.8204924464225769,
-0.05980119854211807,
-0.2508949935436249,
-0.5635805130004883,
-0.43096059560775757,
0.4922017753124237,
-0.30345362424850464,
0.06948740035295486,
-0.20256289839744... |
def parseargs ( p ) : p. set _ defaults ( func = func ) p. description = " package and compress ( archive ) files " p. usage = ('% ( prog ) s - l [ option ]... zipfile... \ n'' % ( prog ) s - t [ option ]... zipfile... \ n'' % ( prog ) s - e [ option ]... zipfile target \ n'' % ( prog ) s - c [ option ]... zipfile sour... | [
0.24438989162445068,
0.17767097055912018,
0.7566051483154297,
-0.8974559903144836,
0.523102343082428,
0.17033550143241882,
-0.049703311175107956,
0.7744234800338745,
-0.21391861140727997,
0.34625244140625,
0.16467566788196564,
-0.3926846385002136,
0.22409579157829285,
0.1512543112039566,
... |
def get ( self, fontstyle, mode = none ) : return wglfont. wgloutlinefont ( fontstyle = fontstyle, ) | [
0.5735231041908264,
-0.567854106426239,
0.09977242350578308,
-1.0390390157699585,
-1.128373622894287,
-1.0331448316574097,
-0.9798426032066345,
-0.12019852548837662,
0.3044891357421875,
-0.5110576152801514,
-0.2424842268228531,
0.6247246265411377,
-0.7753642201423645,
-1.0057621002197266,
... |
def load _ pickle ( cls, filename _ or _ file _ object ) : if hasattr ( filename _ or _ file _ object,'read') : fi = filename _ or _ file _ object else : fi = open ( filename _ or _ file _ object,'rb') rw = randomwriter ( ) rw. model. chain = pickle. load ( fi ) fi. close ( ) return rw | [
-0.33446669578552246,
-0.5343835949897766,
0.488350510597229,
-0.05167698487639427,
0.35602450370788574,
-0.30397462844848633,
0.22429220378398895,
0.18520545959472656,
-0.10559015721082687,
-0.8023395538330078,
0.4458586871623993,
-1.1680763959884644,
-0.252548485994339,
0.081248402595520... |
def add _ gen _ mc _ sg ( self, ns _ key, g _ start, g _ count = 1, s _ start = none, s _ count = 1 ) : return self. _ add _ remove _ gen _ mc _ sg ( ns _ key, g _ start, g _ count, s _ start, s _ count, " add " ) | [
-0.9390785098075867,
0.44496697187423706,
0.5801755785942078,
0.5588595867156982,
-0.5992283225059509,
-0.14156606793403625,
0.3432391881942749,
-0.46555623412132263,
-0.053414493799209595,
0.6695451140403748,
-0.22450943291187286,
0.16153177618980408,
-0.2204517126083374,
0.86345714330673... |
def _ _ init _ _ ( self, price ) : if price > 0 : self. price = price else : raise valueerror return none | [
0.009225052781403065,
-0.020584044978022575,
0.5001704096794128,
1.1377594470977783,
-0.032160501927137375,
0.20745684206485748,
-0.7216924428939819,
-0.044260211288928986,
0.17025713622570038,
-0.06197235733270645,
0.45540231466293335,
-1.1232678890228271,
-0.2588809132575989,
0.325084626... |
def make _ csv _ filename ( dbf _ filename, db _ table _ name ) : if db _ table _ name is none : # rename if db _ table _ name not supplied return dbf _ filename [ : - 4 ] + ". csv " else : # make dbf filename same as table name, put date information in extension return db _ table _ name + ". " + dbf _ filename [ : - 4... | [
0.33283349871635437,
0.18914133310317993,
0.6959701180458069,
0.9953597784042358,
0.07114960998296738,
-0.008121310733258724,
0.15254651010036469,
0.7294281721115112,
-0.41673049330711365,
0.006248050834983587,
0.6464473009109497,
0.7802432179450989,
0.7996671795845032,
0.22672311961650848... |
def _ from _ pb ( cls, pb ) : pass | [
0.342219740152359,
-0.5308567881584167,
0.20047661662101746,
0.9365571141242981,
0.3052409589290619,
1.2385772466659546,
-0.5432936549186707,
-0.0034704208374023438,
0.583013653755188,
-0.5794288516044617,
-0.32931917905807495,
-0.6397894620895386,
-0.6976920366287231,
-0.4712356925010681,... |
def nnls ( self, kk, ky, s = none, mask = none, tol = 1e - 9, max _ iter = none ) : if mask is none : mask = np. ones ( len ( kk ), dtype = bool ) else : kk = kk [ mask ] [ :, mask ] ky = ky [ mask ] if s is none : s = np. zeros ( len ( kk ) ) l = ky. copy ( ) p = np. zeros ( len ( kk ), dtype = bool ) else : s = s [ m... | [
0.043015461415052414,
0.16912724077701569,
1.053120732307434,
0.24282696843147278,
-0.4643327295780182,
-0.5053969621658325,
-0.7081567645072937,
0.31982842087745667,
0.8511926531791687,
1.1916106939315796,
0.43836596608161926,
-0.17187494039535522,
0.23554526269435883,
0.12641113996505737... |
def find _ largest _ prime _ factor _ 2 ( number ) : largest _ factor = 0 # the initial quotient is the input number itself quotient = number # the first, smallest factor i = 2 # continuously factor the number, we only need to do it from 2 to roughly the square root of the number while i < = int ( math. sqrt ( number )... | [
0.16345416009426117,
-0.4480457603931427,
0.9492698907852173,
-0.3818908929824829,
-0.6899847984313965,
-0.29448550939559937,
-0.17125383019447327,
-0.8881613612174988,
0.5374692678451538,
-0.8610081076622009,
-0.04663781076669693,
-0.13316448032855988,
-0.26929083466529846,
1.043791055679... |
def main ( ) : answer = 1 while answer : my _ list = [ ] menu ( ) answer = input ( ) if answer = = " 3 " : exit ( ) elif answer = = " 2 " : for i in range ( 0, 5 ) : my _ list. append ( random. randint ( 0, 1000 ) ) print ( f " случаиныи список : { my _ list } " ) bubble _ sort ( my _ list ) print ( f " отсортированныи... | [
-0.8070005178451538,
-0.09917934983968735,
0.9884492754936218,
1.0072025060653687,
-0.7979469895362854,
0.6963968276977539,
0.7720785140991211,
0.3995160162448883,
0.5557193756103516,
-0.33370140194892883,
-0.5518636703491211,
0.3703209161758423,
-0.9145920276641846,
0.4262441098690033,
... |
def process _ script ( self, node, cls ) : node. name = os. path. relpath ( self. path, self. metascript. dir ) node. first _ line, node. first _ col = int ( bool ( self. code ) ), 0 node. last _ line, node. last _ col = len ( self. lcode ), len ( self. lcode [ - 1 ] ) self. code _ blocks [ self. container _ id ]. docs... | [
-0.7168008089065552,
-0.23706591129302979,
0.9918777942657471,
-0.5167558193206787,
-0.4904004633426666,
-0.9314287900924683,
0.6089338660240173,
-0.3562566936016083,
0.0023245064076036215,
0.5894396305084229,
-0.5084842443466187,
0.25217509269714355,
0.46518123149871826,
0.671913564205169... |
def make _ custom _ fieldspos ( doc, method ) : region = get _ region ( doc. company ) if region not in ['saudi arabia'] : return if hasattr ( doc,'qr _ code') : if doc. get ('qr _ code') : file _ doc = frappe. get _ list ('file ', {'file _ url': doc. qr _ code,'attached _ to _ doctype': doc. doctype,'attached _ to _ n... | [
0.5995505452156067,
-0.01533456053584814,
0.49808868765830994,
-0.9728137254714966,
-0.25002428889274597,
-0.20514704287052155,
0.6102604269981384,
0.27452096343040466,
0.14444269239902496,
0.09565529227256775,
-0.027557116001844406,
-0.5949290990829468,
-0.06324849277734756,
-0.3936468362... |
def delete ( self, * args, * * kwargs ) : api = api ( ) # authentication is required for deletion api. authenticate ( ) # send api request, raises operationerror on unsuccessful deletion api. delete _ video ( self. video _ id ) # call the super method return super ( video, self ). delete ( * args, * * kwargs ) | [
-0.44756197929382324,
0.4867464601993561,
0.5531064867973328,
1.4219410419464111,
0.5879826545715332,
-0.2950439155101776,
-0.3722389340400696,
0.41338005661964417,
0.9647364020347595,
-0.592620849609375,
-0.04262220114469528,
0.9904354214668274,
-0.33462679386138916,
0.570019543170929,
... |
def getregexp ( self ) : transcript _ table = [ ] coord _ list = [ ] transcript _ name = self. header [ 3 ] print ( " running transvar for transcript " + transcript _ name + " of " + self. header [ 1 ] + "... " ) genename = self. header [ 1 ] aa _ index = 1 output = " initial output " ref _ seq _ aa _ sequence = " " wh... | [
0.20443494617938995,
-0.3035315275192261,
1.0283783674240112,
-0.3638754189014435,
0.18384438753128052,
-0.5214194059371948,
0.6179794073104858,
-0.04075927659869194,
-1.1022276878356934,
0.2296982705593109,
-0.2769321799278259,
-0.23246102035045624,
-0.22694504261016846,
-0.27602660655975... |
def print _ output _ precision ( results, baseline _ function = none, keys = none ) : if baseline _ function is none : baseline _ function = results ['outputs']. values ( ) [ 0 ]. keys ( ) [ 0 ] if keys is none : keys = results ['outputs']. values ( ) [ 0 ]. values ( ) [ 0 ] [ 0 ] [ 0 ]. keys ( ) for dataset _ name, da... | [
-0.3715462386608124,
-0.5693407654762268,
1.0310001373291016,
-0.10009527206420898,
0.06876720488071442,
-0.47615545988082886,
0.27786850929260254,
0.13189752399921417,
-1.0497593879699707,
-0.06774554401636124,
0.0023128280881792307,
0.4028947055339813,
-0.39410603046417236,
0.15053120255... |
def _ _ eq _ _ ( self, other ) : if isinstance ( other, eventmessage ) : return self. _ id = = other. id | [
-0.08625706285238266,
-0.6930532455444336,
0.6142889261245728,
-0.01766347326338291,
0.8960060477256775,
0.15873055160045624,
0.19114109873771667,
-0.9956879019737244,
0.6947224140167236,
-0.4346567690372467,
-0.4821471571922302,
0.6712564826011658,
-0.6867179870605469,
0.2204175740480423,... |
def put _ files ( self, files, content _ type = none, compress = none, cache _ control = none, block = true ) : for path, content in tqdm ( files, disable = ( not self. progress ), desc = " uploading " ) : content = compression. compress ( content, method = compress ) self. _ interface. put _ file ( path, content, cont... | [
-0.42158931493759155,
0.9092178344726562,
0.4743330180644989,
0.3466775715351105,
0.46474963426589966,
0.3109695613384247,
0.6014653444290161,
-0.34730780124664307,
-0.9225431680679321,
0.24234148859977722,
-0.31356245279312134,
-1.1252764463424683,
-1.42854905128479,
0.7718658447265625,
... |
def set _ led _ one ( self, r, g, b ) : self. _ set _ led ( self. command _ set _ led1, r, g, b ) | [
-0.3952527344226837,
0.0225659366697073,
0.3413800895214081,
0.6583158373832703,
1.0634965896606445,
0.9011836647987366,
0.5192338824272156,
-0.3409416377544403,
-0.030808009207248688,
-0.01749987155199051,
-0.7567952871322632,
0.5777674317359924,
-1.5320152044296265,
0.31464773416519165,
... |
def gauss2d _ sequence ( centers = none, sigma = 0. 5, size = [ 20, 20 ], borders = [ [ - 2, 2 ], [ - 2, 2 ] ] ) : if centers is none : t = np. arange ( 0, 200 * np. pi, 0. 1 ) x = np. sin ( t ) y = np. cos ( 0. 25 * t ) centers = np. array ( [ y, x ] ). t yc, xc = centers [ :, 0 ], centers [ :, 1 ] yy = np. linspace (... | [
-0.18485552072525024,
-0.5525716543197632,
0.843079149723053,
-0.7013950347900391,
-0.5468900203704834,
-0.7362914085388184,
-0.2312532365322113,
-0.2976212501525879,
0.5427113771438599,
0.19434881210327148,
-0.35138139128685,
1.01694917678833,
0.271971732378006,
0.3715030252933502,
0.39... |
def sub _ divide ( self, other, sub _ divisions, from _ self = true, include _ points = true ) : # todo need to generalise sub _ divde if from _ self : x _ spaced = [ float ( x ) for x in np. linspace ( self. x, other. x, 2 + sub _ divisions ) ] y _ spaced = [ float ( y ) for y in np. linspace ( self. y, other. y, 2 + ... | [
0.9309032559394836,
0.00794488750398159,
1.2089428901672363,
0.34047314524650574,
-0.2997775077819824,
1.111725926399231,
0.018749214708805084,
0.23279383778572083,
0.4179517328739166,
-0.17625999450683594,
-0.05396585911512375,
-0.17659924924373627,
0.08154458552598953,
0.0707923322916030... |
def allow _ remote _ vpc _ dns _ resolution ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " allow _ remote _ vpc _ dns _ resolution " ) | [
0.24831514060497284,
0.6186226606369019,
0.6484718322753906,
-0.30282244086265564,
0.4373290240764618,
1.7846722602844238,
-0.9765188694000244,
-0.26950815320014954,
0.3878070116043091,
-0.021511835977435112,
-1.3570547103881836,
0.6663384437561035,
-0.41349589824676514,
-1.501491308212280... |
def equatorial _ to _ galactic ( ra, decl, input = " sexigesimal ", output = " deg ", \ j2000 = true ) : # convert equatorial coords to radians if input = = " sexigesimal " : ra = protractor. convert ( ra, " hmsstr ", " rad " ) decl = protractor. convert ( decl, " dmsstr ", " rad " ) else : ra = protractor. convert ( r... | [
-0.5149656534194946,
-0.409500390291214,
1.0354273319244385,
-0.8020446300506592,
-0.4820484220981598,
0.12557445466518402,
-0.8150601387023926,
0.2944848835468292,
-0.6286947131156921,
0.53651362657547,
-0.1873660832643509,
0.6760869026184082,
0.15165209770202637,
0.8036239147186279,
1.... |
def clear _ blockchain _ transactions ( self, blockchain ) : for block in blockchain. chain : for transaction in block. data : try : del self. transaction _ map [ transaction. get ('id') ] except keyerror : pass | [
0.5918750762939453,
-0.5638142824172974,
0.6632760167121887,
0.1591421514749527,
0.1967550665140152,
-0.6971879005432129,
-0.8086992502212524,
-0.5500134229660034,
0.31911736726760864,
1.1485517024993896,
-0.6622503399848938,
-0.004921483341604471,
-1.0534781217575073,
0.3470187783241272,
... |
def _ _ init _ _ ( self ) : self. _ raise ( ) | [
0.8025709390640259,
0.08282320946455002,
0.3643602728843689,
0.7155933380126953,
0.19208355247974396,
-0.44547945261001587,
0.19979070127010345,
0.1914438009262085,
0.1298638880252838,
-0.33703479170799255,
-0.1404540240764618,
0.05503813549876213,
-0.40645962953567505,
0.6176912784576416,... |
def secret _ key ( self ) : return self. _ data. get ('inputs ', { } ). get ('password') | [
-0.363198846578598,
-0.29500070214271545,
0.34224218130111694,
0.12906891107559204,
0.5362189412117004,
0.1618122160434723,
-0.13316220045089722,
-0.17908762395381927,
-0.3198389708995819,
-0.34338125586509705,
-0.9263688921928406,
0.5247591733932495,
-0.3402957320213318,
0.051135301589965... |
def split _ descriptors ( df ) : logger. info ('splitting descriptors lists...') df. descriptors _ uris = df. descriptors. apply ( lambda x : get _ descriptors _ uris ( x ) ) df. descriptors = df. descriptors. apply ( lambda x : get _ descriptors _ text ( x ) ) df. domain _ codes = df. descriptors. apply ( lambda x : g... | [
-0.8676233887672424,
0.7796521782875061,
0.11988960206508636,
-0.1779288947582245,
0.8522486686706543,
-0.9115287661552429,
-0.44910094141960144,
1.1797960996627808,
-0.06798803806304932,
-0.18598058819770813,
0.012106494978070259,
0.626284122467041,
0.35227683186531067,
-0.078283935785293... |
def _ _ set _ filters ( self ) : # historic events self. history _ params = {'page _ size': 1000,'start _ time': self. args ['starttime'],'end _ time': self. args ['endtime'],'event _ types': ['temperature ','objectpresent'] } # stream events self. stream _ params = {'event _ types': ['temperature ','objectpresent'] } | [
-0.5302010774612427,
-0.24344463646411896,
0.5927246809005737,
-0.2890337407588959,
0.6478225588798523,
0.22537733614444733,
0.23619502782821655,
0.23519714176654816,
-1.0738025903701782,
0.5914260745048523,
0.20358701050281525,
1.1209927797317505,
-0.02164531871676445,
1.6754804849624634,... |
def _ get _ joystick _ vector ( joy _ x, joy _ y ) : magnitude = int ( math. sqrt ( joy _ x * joy _ x + joy _ y * joy _ y ) ) if magnitude > 100 : magnitude = 100 angle = 0. 0 if joy _ y > 0 : angle = math. atan ( abs ( 1. 0 * joy _ x ) / abs ( 1. 0 * joy _ y ) ) if joy _ x < 0 : angle = pi * 2 - angle elif joy _ y < 0... | [
-0.5951964855194092,
-0.718335747718811,
0.8688679933547974,
-0.4743750989437103,
-0.372144490480423,
-0.034112051129341125,
-0.17657196521759033,
-0.25903642177581787,
-0.01758635602891445,
0.09149356186389923,
-0.21138274669647217,
0.4537340998649597,
0.8305007219314575,
-0.5496510863304... |
def set _ modified _ time ( self, modified _ time ) : from datetime import datetime if modified _ time is not none and not isinstance ( modified _ time, datetime ) : raise sdkexception ( constants. data _ type _ error,'key : modified _ time expected type : datetime ', none, none ) self. _ _ modified _ time = modified _... | [
-1.5740258693695068,
0.36204856634140015,
0.19797733426094055,
0.009208103641867638,
-0.045078977942466736,
0.2958590090274811,
-0.6372039914131165,
0.4651046693325043,
0.14190277457237244,
1.1295382976531982,
-0.7632937431335449,
0.3505780100822449,
-0.5577420592308044,
1.1586847305297852... |
def debug _ msg ( name, tensor ) : return " { 3 } : { 0 } - { 1 } - { 2 } ". format ( tensor. shape, tensor. get _ device ( ), tensor. dtype, name ) | [
0.15450634062290192,
-0.44011572003364563,
0.4319659173488617,
-1.0272780656814575,
0.12892551720142365,
-0.10199212282896042,
-0.12525123357772827,
-0.7821820974349976,
-0.8569231033325195,
0.9112192988395691,
-0.11146073788404465,
1.0365431308746338,
0.2609136998653412,
-0.17992590367794... |
def print _ solution ( solution : [ str ], max _ width = none ) : if max _ width = = none : print ( " ". join ( solution ) ) elif len ( solution ) < = max _ width : print ( " ". join ( solution ) ) else : print ( " ". join ( solution [ 0 : max _ width ] ) ) print _ solution ( solution [ max _ width : ], max _ width ) | [
0.06787753850221634,
0.45284903049468994,
0.6230300068855286,
0.6747377514839172,
-0.1945996731519699,
-0.2837089002132416,
-0.25979453325271606,
-0.14765335619449615,
0.8863945603370667,
-0.02073143981397152,
0.2557506263256073,
0.3729170560836792,
-0.3045625388622284,
0.41178837418556213... |
def legends ( text, parabnd = default _ para _ bnd, # string that means paragraph boundary ) : return ( p for p in paragraphs ( text, parabnd = parabnd ) if legendre. match ( p ) ) | [
1.5633368492126465,
-0.9189152121543884,
0.46950310468673706,
0.2329103648662567,
-0.33106058835983276,
0.7417140603065491,
-1.5811597108840942,
0.5809382796287537,
0.012894611805677414,
0.8232144713401794,
-0.10773073881864548,
0.11015401780605316,
-1.190672755241394,
-0.4485790431499481,... |
def area ( self ) : return self. _ _ size * * 2 | [
-0.21086539328098297,
-0.7560749053955078,
0.400326132774353,
-0.05084773525595665,
-0.08520037680864334,
0.6013194918632507,
0.6685692071914673,
-0.20586737990379333,
0.6268900036811829,
-1.0211883783340454,
0.3757685720920563,
0.21245813369750977,
-0.2638740837574005,
0.9532212615013123,... |
def test _ create _ comment _ notification _ via _ signal ( self ) : self. comment. save ( ) self. assertequal ( notification. objects. count ( ), 1 ) self. assertequal ( str ( notification. objects. get ( ) ), f'{ self. user. display _ name } commented on { self. article. title }') | [
0.36222222447395325,
-0.4571344256401062,
0.21563351154327393,
-0.0101173659786582,
1.0795718431472778,
0.9595898985862732,
0.7420709133148193,
-0.35078054666519165,
-0.5925062298774719,
0.5451546907424927,
-2.0547573566436768,
-0.6008704900741577,
0.27571403980255127,
0.3413514494895935,
... |
def _ extract _ parent ( self, root, xmlns ) : parent _ elem = root. find ('% sparent'% xmlns ) if parent _ elem is not none : groupid = parent _ elem. find ('% sgroupid'% xmlns ) artifactid = parent _ elem. find ('% sartifactid'% xmlns ) version = parent _ elem. find ('% sversion'% xmlns ) if groupid is not none and a... | [
0.47721755504608154,
-0.5743682980537415,
0.5509713888168335,
0.11267658323049545,
-1.093344807624817,
-0.4345894157886505,
-0.26189985871315,
-1.1009033918380737,
0.43606993556022644,
0.10851947218179703,
0.7598752379417419,
-0.9731528759002686,
-0.49133560061454773,
-0.3202536404132843,
... |
def get _ template _ by _ name ( self, name, * * kwargs ) : templates = self. get _ templates ( * * kwargs ) for tpl in templates : # not all contain displayname if'displayname'in tpl and tpl ['displayname'] = = name : return [ tpl ] | [
-0.12761469185352325,
-0.7256419658660889,
0.6077868938446045,
0.649832010269165,
-1.3869280815124512,
-0.6136043071746826,
-0.709763765335083,
-0.6350159645080566,
0.576532781124115,
1.0551650524139404,
-0.8978788256645203,
-0.4474117159843445,
-0.698096752166748,
0.41680291295051575,
-... |
def get _ misclf _ or _ correctclf _ images ( x, y, df _ results, res, n = none, misclf = true ) : # get wrong _ class column from df idx _ series = df _ results [ df _ results. resolution = = res ]. wrong _ class # convert to one list with all indices indcs = [ ] for item in idx _ series : item = parse _ wrong _ class... | [
-1.0836842060089111,
-0.1533021628856659,
0.5495518445968628,
-0.07549871504306793,
0.15620344877243042,
-0.7654739022254944,
-0.08516408503055573,
-0.5209414958953857,
0.08658970892429352,
0.49599894881248474,
0.023747069761157036,
0.38610145449638367,
0.32934337854385376,
-0.333127617835... |
def setup _ option _ parser ( ) : parser = optionparser ( ) # add a fake'- c'option to work around an issue with recent versions of # plone. recipe. zope2instance's bin / interpreter script. # see https : / / dev. plone. org / ticket / 13414 parser. add _ option ( " - c ", " - - fake - option ", dest = " fake _ option ... | [
-0.008106274530291557,
-0.23801618814468384,
0.54594486951828,
-0.39748165011405945,
0.03499404713511467,
-0.3650456964969635,
0.4124196767807007,
0.8075832724571228,
0.5642584562301636,
0.39366790652275085,
-0.747018575668335,
-0.37719568610191345,
-0.3666386902332306,
0.2364233285188675,... |
def region ( self, region ) : self. _ region = region | [
-0.24496307969093323,
0.2497362345457077,
-0.2335263192653656,
-0.3198394179344177,
-0.1940561830997467,
0.9328451752662659,
0.9849399924278259,
0.503121018409729,
-0.18939290940761566,
-0.6156801581382751,
-1.179771065711975,
0.44515424966812134,
-0.030140426009893417,
0.4769258499145508,... |
def centroid _ loss ( enc _ feats, dec _ feats, src _ lengths, trg _ lengths, enc _ scores = none, dec _ scores = none, distance = " cosine ", pool _ func = " mean ", mapping : torch. tensor = none, * * kwargs ) : enc _ mask = sequence _ mask ( src _ lengths ). unsqueeze ( - 1 ). float ( ) dec _ mask = sequence _ mask ... | [
-0.20154893398284912,
0.18920409679412842,
0.6326603293418884,
-0.005410788115113974,
-0.6148555874824524,
-0.24296285212039948,
0.7772626280784607,
0.25194674730300903,
0.4216948449611664,
0.20494824647903442,
-0.01530246902257204,
-0.20720888674259186,
0.441476970911026,
-0.6155086159706... |
def _ firms _ remove _ minor _ fires ( self, df _ firms, minor _ fires _ thres ) : # drop minor fires for i in range ( np. unique ( df _ firms. event _ id ). size ) : if ( df _ firms. event _ id = = i ). sum ( ) < minor _ fires _ thres : df _ firms = df _ firms. drop ( df _ firms [ df _ firms. event _ id = = i ]. index... | [
0.02910947985947132,
-0.7013914585113525,
0.8430542945861816,
-0.18746480345726013,
-0.19458229839801788,
-0.6263226270675659,
0.7546333074569702,
0.22869141399860382,
0.1164277046918869,
-0.20775502920150757,
-0.17409782111644745,
0.45718052983283997,
-0.4043184220790863,
-0.0918534249067... |
def _ _ call _ _ ( self, request ) : if self. token : request. headers ['authorization'] = self. encode _ pair ( self. token. username, self. token. password ) | [
-1.2393983602523804,
-0.23347917199134827,
0.4384191930294037,
0.5132635235786438,
0.047818250954151154,
-0.652765154838562,
-1.0769906044006348,
-0.3402574062347412,
0.1985555738210678,
-0.0009251959854736924,
0.22445599734783173,
0.09541475027799606,
0.1437450498342514,
-0.05805740132927... |
def update _ destination ( self, targets ) : self. _ input. destination. set _ listbox ( targets ) | [
-2.08829665184021,
-0.5302636623382568,
0.30517053604125977,
-0.37051793932914734,
0.36042213439941406,
0.42225852608680725,
-0.4714638292789459,
-0.0036048293113708496,
-0.03234595060348511,
0.8264825344085693,
-0.5406356453895569,
0.8624675869941711,
0.3942258358001709,
-0.50181627273559... |
def testcreateorder ( self ) : order = {'advertiserid': self. _ _ class _ _. advertiser _ id,'currencycode':'usd ','name':'order # % s'% utils. getuniquename ( ),'traffickerid': self. _ _ class _ _. trafficker _ id } self. assert _ ( isinstance ( self. _ _ class _ _. service. createorder ( order ), tuple ) ) | [
-0.4023544192314148,
0.6390626430511475,
0.26670077443122864,
-0.4298357665538788,
0.5613018870353699,
0.050395261496305466,
-1.1558016538619995,
-0.28948602080345154,
0.12439393252134323,
0.11500754952430725,
-1.1754099130630493,
-0.9020964503288269,
-0.4842654764652252,
0.602492094039917... |
def gaussian _ entropy ( self, logstdev ) : logstdev = logstdev. flatten ( ) # where there are multiple latent features, unravel them into a vector. dims = len ( logstdev ) # see : https : / / statproofbook. github. io / p / mvn - dent # note that since the covariance matrix is diagonal : log ( det ( covar ) ) is equiv... | [
-0.5145063400268555,
0.11549043655395508,
0.64767986536026,
-0.4360639750957489,
-1.0902286767959595,
-0.2262750118970871,
0.5732380151748657,
0.3178635239601135,
-0.12813879549503326,
0.717482328414917,
0.4502953588962555,
0.2898493707180023,
0.27764058113098145,
-0.5028040409088135,
0.... |
def key ( self, data : any ) - > comparabletype : raise notimplementederror ( " implement the'key'method to convert data into a comparable value to sort by " ) | [
-0.4430848956108093,
-0.24964091181755066,
0.4690093994140625,
-0.1933506727218628,
-0.22544066607952118,
0.5965433120727539,
-0.16063830256462097,
-0.7228341698646545,
0.04097318276762962,
0.012566424906253815,
-0.1429666131734848,
0.304829865694046,
-0.3606060743331909,
0.579097092151641... |
def mo _ name ( self ) - > str : return pulumi. get ( self, " mo _ name " ) | [
0.3336678147315979,
-0.46630436182022095,
0.5979797840118408,
0.26520198583602905,
-0.13054054975509644,
0.7602929472923279,
-0.732331395149231,
-0.2070276141166687,
0.5740248560905457,
0.3448861539363861,
0.5606558918952942,
0.5927102565765381,
0.9829936027526855,
-0.9065024852752686,
-... |
def change _ block _ 1 ( self ) : cntimp = 0 for cnt, line in enumerate ( self. block1lines ) : linelower = line. lower ( ) # ignore comment lines if linelower. split ( ) [ 0 ] = ='c': continue # check for the case where only imp : n is being used if " imp : p " not in linelower and " imp : n " in linelower : line = li... | [
-0.5213919281959534,
-0.5991201400756836,
0.7196603417396545,
-0.14726682007312775,
0.04182060435414314,
0.014625165611505508,
0.6193416118621826,
0.4105980694293976,
-0.5629190802574158,
1.3838874101638794,
-0.14428149163722992,
1.0848644971847534,
-1.2128405570983887,
0.6265286803245544,... |
def _ set _ tile _ neighbors _ relationship ( self ) : for vertical _ index in range ( self. get _ height ( ) ) : for horizontal _ index in range ( self. get _ width ( ) ) : current _ tile = self. get _ tile _ at ( horizontal _ index, vertical _ index ) # north neighbor north _ neighbor = none if vertical _ index > 0 :... | [
-0.24011775851249695,
-0.11778586357831955,
0.7388395071029663,
-0.37361404299736023,
0.32942134141921997,
-0.22307676076889038,
0.5186178684234619,
-0.652089536190033,
-1.0309213399887085,
0.7766461968421936,
-0.3262697756290436,
0.18360216915607452,
-0.44105222821235657,
0.41917285323143... |
def execute _ last _ data _ query ( self, paths : list, last _ time : int ) - > sessiondataset : request = tslastdataqueryreq ( self. _ _ session _ id, paths, self. _ _ fetch _ size, last _ time, self. _ _ statement _ id, enableredirectquery = false, ) resp = self. _ _ client. executelastdataquery ( request ) return se... | [
-0.7987363934516907,
0.0205927025526762,
0.7340366244316101,
-0.6113101840019226,
0.17704105377197266,
-0.31503793597221375,
-0.6547331213951111,
-0.598385214805603,
0.5032883882522583,
-0.3418305814266205,
0.7465639710426331,
-0.010502788238227367,
-0.36203354597091675,
-0.627011358737945... |
def urltosoup ( url, selenium = false ) : if selenium : browser = webdriver. firefox ( ) # browser. set _ window _ size ( 1, 1 ) browser. get ( url ) soup = beautifulsoup ( browser. page _ source, " html. parser " ) browser. close ( ) else : htmldata = urllib. urlopen ( url ). read ( ) soup = beautifulsoup ( htmldata, ... | [
-1.1468695402145386,
0.17797699570655823,
0.5684770941734314,
0.6593297719955444,
-0.15577730536460876,
0.4157157838344574,
0.2944028675556183,
0.8529989123344421,
0.9557517766952515,
0.5563071966171265,
0.19650693237781525,
-0.12175677716732025,
0.5770071744918823,
0.013814051635563374,
... |
def test _ proper _ response _ on _ missing _ data ( self ) : faulty _ data = {'name':'emp _ name ','department':'emp _ department'} # email param is missing response = self. client. post ('/ employee / create / ', json. dumps ( faulty _ data ), content _ type ='application / json') self. assertequal ( response. json (... | [
0.05104559659957886,
-0.4503902196884155,
0.5392496585845947,
-0.5853683948516846,
0.7132220268249512,
1.181032419204712,
-0.6500992774963379,
-0.5062387585639954,
-0.4577631652355194,
0.26553595066070557,
-1.2190877199172974,
0.05510180816054344,
-0.2795690596103668,
0.43595701456069946,
... |
def test _ get _ group ( self ) : pass | [
0.20665715634822845,
1.1545542478561401,
-0.08090612292289734,
0.9869540929794312,
1.1395584344863892,
-0.1268356442451477,
1.3757824897766113,
-0.6185777187347412,
-0.5328237414360046,
-1.2722575664520264,
-0.03413792699575424,
0.37168341875076294,
-0.8606600165367126,
-0.0232950393110513... |
def main ( ) : # print ( normalizeduration ( " 1 : 23 : 32. 123 " ) ) pass | [
0.9798617959022522,
-0.5351735949516296,
0.3203447759151459,
0.912883996963501,
-0.6146847605705261,
0.6836811900138855,
0.5946511626243591,
0.28446245193481445,
0.2065867781639099,
0.17840063571929932,
-0.04080455005168915,
0.6485984921455383,
-0.6598246097564697,
-0.44337573647499084,
... |
def u _ rate ( intake, output ) : df = pandas. read _ csv ('{ }. csv '. format ( intake ), header = none, names = ['time ','1 ','2 ','3 ','4 ','5 ','6 ','7 ','8'] ) new _ data _ r = [ ] time _ start = df. iloc [ 0, 0 ] previous _ time = df. iloc [ 0, 0 ] time _ difference = 0 for row in df. itertuples ( ) : new _ row =... | [
0.39677825570106506,
0.008438807912170887,
0.7847911715507507,
0.7121921181678772,
0.39122462272644043,
-0.2829582393169403,
0.6028727889060974,
-0.07818610966205597,
0.5974106192588806,
0.16722655296325684,
-0.13426783680915833,
0.14347989857196808,
-0.1631963849067688,
0.5139814615249634... |
def vox _ ntrn _ content ( node _ id : int, child _ node _ id : int, layer _ id : int, translation : tuple [ int, int, int ] ) - > bytes : ( x, y, z ) = translation w = bytearray ( ) w. extend ( struct. pack ('< i ', node _ id ) ) w. extend ( vox _ dict ( [ ] ) ) w. extend ( struct. pack ('< i ', child _ node _ id ) ) ... | [
0.11262685060501099,
0.2506445646286011,
0.5463501214981079,
-1.1570734977722168,
-0.6818978190422058,
-0.6321277618408203,
-0.9671601057052612,
-0.9407221674919128,
-1.1452628374099731,
0.47294723987579346,
-0.8621684312820435,
-0.4530653655529022,
-0.18794234097003937,
-0.216409444808959... |
def build _ iterator ( train _ dataset, valid _ dataset, test _ dataset, batch _ size, device ) : # return train _ iterator, valid _ iterator, test _ iterator train _ iterator, valid _ iterator, test _ iterator = bucketiterator. splits ( ( train _ dataset, valid _ dataset, test _ dataset ), batch _ sizes = ( batch _ si... | [
-0.322815477848053,
-0.26663661003112793,
0.44786903262138367,
-0.3471829891204834,
-0.5046570301055908,
0.3544375002384186,
-0.05234242230653763,
0.408561646938324,
-1.1272163391113281,
-0.3855747878551483,
0.16743497550487518,
-0.1716013103723526,
-0.08950327336788177,
-1.262335538864135... |
def kcot _ from _ de ( self, deltae ) : k2 = self. tok2 ( deltae ) if self. d = = [ 0, 0, 0 ] : gamma _ val = 1. 0 z00 = self. z00. z00 ( k2 ) else : gamma _ val = self. gamma ( k2, self. d, self. l ) z00 = self. z00. z00d ( k2, gamma ) return 2. 0 * z00 / ( self. l * np. sqrt ( np. pi ) ) / gamma _ val | [
0.6240285038948059,
-0.21387828886508942,
0.6752117276191711,
-0.1423710733652115,
-1.2145615816116333,
0.3363271653652191,
0.10511348396539688,
0.0495329275727272,
-0.42203113436698914,
0.3119720220565796,
0.18465659022331238,
-0.6767979264259338,
0.03940396383404732,
0.12781333923339844,... |
def print _ param ( ) : print ( " bash script parameters : \ n " ) print ( " { : < 26 } : { } \ n ". format ( " name of bash script ", bsh ) ) print ( " { : < 26 } : { } / { } ". format ( " programme used ", prg. prog, prg. version ) ) print ( " { : < 26 } : { } ". format ( " jobname ", job ) ) print ( " { : < 26 } : {... | [
0.42338764667510986,
-0.43467336893081665,
0.8369445204734802,
-0.1791209876537323,
-0.31929051876068115,
0.48636484146118164,
-0.3982100486755371,
0.0554119348526001,
-0.9880297780036926,
0.4489375948905945,
0.13779523968696594,
2.3207879066467285,
-0.4413245916366577,
0.667948842048645,
... |
def stringify _ status ( status ) : enum = { goalstatus. pending : " pending ", goalstatus. active : " active ", goalstatus. preempted : " preempted ", goalstatus. succeeded : " succeeded ", goalstatus. aborted : " aborted ", goalstatus. rejected : " rejected ", goalstatus. preempting : " preempting ", goalstatus. reca... | [
-1.0910412073135376,
-0.834830641746521,
0.6726697087287903,
-1.082128882408142,
-0.6308848857879639,
0.39022862911224365,
-0.904757022857666,
-0.20559877157211304,
0.5658552646636963,
0.4912199378013611,
-0.5280584096908569,
-0.288196861743927,
0.6074967980384827,
0.09682269394397736,
0... |
def input _ to _ action ( usr _ in ) : acc = np. clip ( usr _ in [ 0 ], - global _ var. max _ acc, global _ var. max _ acc ) theta = np. clip ( usr _ in [ 1 ], - global _ var. max _ angle, global _ var. max _ angle ) return acc, theta | [
-0.486694872379303,
-0.821865975856781,
0.3589932322502136,
0.4046570658683777,
-0.18806174397468567,
0.9176539182662964,
1.4167804718017578,
-0.11534266173839569,
-0.18571506440639496,
0.8518394827842712,
-0.05302884802222252,
1.3674710988998413,
0.3143710792064667,
-0.23997890949249268,
... |
def get _ templates ( self, uuid = none, * * kwargs ) : return self. request ('templates ', uuid = uuid, * * kwargs ) | [
-1.321677565574646,
0.5949324369430542,
0.2997317612171173,
0.7840056419372559,
-0.10101562738418579,
-1.02354097366333,
-1.1993911266326904,
0.12099772691726685,
0.5018404722213745,
-0.019434403628110886,
-0.5951199531555176,
0.5098862648010254,
-1.0367670059204102,
-0.3096236288547516,
... |
def add ( self, vote ) : if vote. account in self. _ _ voters : self. _ _ voters [ vote. account ]. vote ( vote ) else : self. _ _ voters [ vote. account ] = account ( account = vote. account, segment = self ) | [
0.1919180303812027,
-0.28912657499313354,
0.5162675976753235,
0.5014762878417969,
0.8517722487449646,
0.5570358037948608,
-0.5379256010055542,
-0.018927428871393204,
0.9768803119659424,
-0.09030768275260925,
0.04057179391384125,
0.05890708044171333,
-0.657648503780365,
0.05176669731736183,... |
def _ insert _ rows ( self, instance _ name : str, number : int ) - > none : def _ insert ( txn : loggingtransaction ) - > none : for _ in range ( number ) : txn. execute ( " insert into foobar values ( nextval ('foobar _ seq'),? ) ", ( instance _ name, ), ) txn. execute ( " " " insert into stream _ positions values ('... | [
-0.5418003797531128,
1.3964985609054565,
0.7074558138847351,
-0.844824492931366,
0.5037552714347839,
-0.5633138418197632,
0.23553746938705444,
-0.041756387799978256,
-0.5463070869445801,
0.5975981950759888,
-0.8415318727493286,
-0.788692057132721,
-0.7677868604660034,
0.40961262583732605,
... |
def m _ step ( self ) : print ( " m _ step " ) # self. alpha = np. sum ( self. e, axis = 0 ) / self. sample _ num for j in range ( self. k ) : deno = 0 member = 0 for i in range ( self. sample _ num ) : member + = self. e [ i, j ] * self. x [ i, : ] deno + = self. e [ i, j ] self. alpha [ j ] = deno / self. sample _ nu... | [
0.08132778108119965,
-0.29486313462257385,
0.6664001941680908,
-0.008135407231748104,
-0.27907559275627136,
-0.0038575183134526014,
0.4312906563282013,
1.2038273811340332,
-0.26591697335243225,
0.29334115982055664,
-0.18036313354969025,
0.0676727369427681,
0.14473997056484222,
0.8160930871... |
def start _ story ( ) : user = input ( " what do they call you, unworthy adversary? " ) print ( ) print ( " welcome, ", user, ", to the labyrinth " ) sleep ( delay ) print ( " before you lies two paths. one path leads to treasures of unimaginable worth. " ) print ( " the other, certain death. choose wisely. " ) print (... | [
0.6855003237724304,
-0.2412140667438507,
0.610798716545105,
0.9501441717147827,
-0.3187975585460663,
0.4461302161216736,
0.7267504334449768,
-0.616525411605835,
-0.42882040143013,
-0.5362920761108398,
-0.11424154788255692,
0.5808814167976379,
0.0330197848379612,
-0.880607545375824,
0.716... |
def getsubsystem ( self, subsystem ) : # gives the values. if subsystem in self. subsystems : return self. subsystems [ subsystem ] return none | [
-0.11526284366846085,
0.8207500576972961,
0.30935394763946533,
0.5637522339820862,
-0.24020138382911682,
-0.46486252546310425,
-0.1716916710138321,
-1.8116379976272583,
0.4760001301765442,
-1.4589005708694458,
-0.2972967326641083,
1.246616244316101,
-0.49736079573631287,
0.0203296467661857... |
def _ _ check _ if _ archivation _ methods _ exist ( self ) : prcs = subprocess. popen ( [ self. archiving _ method, " - - help " ], stdin = subprocess. pipe, stdout = subprocess. pipe, stderr = subprocess. pipe ) try : output, err = prcs. communicate ( ) # print ( " output : ", output ) # print ( " error message : ", ... | [
-0.10873764008283615,
0.07064659148454666,
0.8508666753768921,
0.29562240839004517,
0.4251065254211426,
0.3224947452545166,
0.3805844485759735,
0.17993716895580292,
-0.8726900219917297,
0.17205755412578583,
0.9265092611312866,
-0.03794504702091217,
-0.27457141876220703,
0.5539746880531311,... |
def swap _ pels ( self ) : self. config. pelsheight, self. config. pelswidth = self. config. pelswidth, self. config. pelsheight | [
-0.565407931804657,
0.09720052778720856,
0.4470636546611786,
-0.6847906708717346,
-0.23567524552345276,
1.1049764156341553,
-0.08415602892637253,
0.0732802301645279,
0.6741536259651184,
0.5594357252120972,
-0.6971992254257202,
0.12827451527118683,
-0.4541173279285431,
0.5302900671958923,
... |
def is _ protect ( cls, staff _ obj, date _ min, date _ max ) : staff _ obj. new _ protect = false soe _ qs = stafforderevent. search ( * * {'order _ _ pay _ time _ _ gte': date _ min,'order _ _ pay _ time _ _ lte': date _ max,'is _ count':'countout'} ) if soe _ qs : staff _ obj. new _ protect = true | [
0.40930426120758057,
0.5205004811286926,
0.7256364226341248,
0.8806419372558594,
0.1093316599726677,
0.3968130350112915,
-0.37742725014686584,
-0.6513710618019104,
-0.1689232885837555,
0.12457054108381271,
-0.3041355609893799,
0.5907049179077148,
0.35015150904655457,
0.21581760048866272,
... |
def create _ a _ batch ( self, number, files _ list ) : # think about this, this is a lil'bit slow ret = [ x for x in files _ list if ( int ( x. split ( '.') [ 0 ] ) / / self. batchsize ) = = number ] return ret | [
-0.09382662922143936,
-0.19726301729679108,
0.5148085355758667,
0.8640671372413635,
0.3703724443912506,
-0.29410797357559204,
-0.6174800395965576,
0.022911181673407555,
-0.36538898944854736,
-0.2608659267425537,
-0.8824666738510132,
0.232391819357872,
-0.9152820110321045,
0.165133342146873... |
def _ set _ sequence _ number ( self, v, load = false ) : if hasattr ( v, " _ utype " ) : v = v. _ utype ( v ) try : t = yangdynclass ( v, base = restrictedclasstype ( base _ type = long, restriction _ dict = { " range " : [ " - 2147483648.. 2147483647 " ] }, int _ size = 32, ), is _ leaf = true, yang _ name = " sequen... | [
-0.660643458366394,
0.03073178231716156,
0.5852451324462891,
-0.44633322954177856,
0.39738935232162476,
-0.5241522192955017,
0.7390863299369812,
-0.3195978105068207,
-0.21647804975509644,
-0.3636572062969208,
-0.569891095161438,
-0.37502098083496094,
-0.21541720628738403,
0.697408020496368... |
def enabled ( self, enabled ) : self. _ enabled = enabled | [
0.6371456384658813,
-0.43074822425842285,
-0.24030068516731262,
1.009521484375,
0.47656506299972534,
1.458911657333374,
-0.26057371497154236,
1.8550450801849365,
-0.2086525857448578,
-1.0401723384857178,
-2.3100154399871826,
-0.04877988621592522,
-0.6907557845115662,
0.09781045466661453,
... |
def test _ status _ all _ subtask _ complete ( self ) : task1 = statussimulatingtaskproxy ( ) task2 = statussimulatingtaskproxy ( ) ctask = taskcontainer ('tester') ctask. add _ task ( task1 ) ctask. add _ task ( task2 ) self. verify _ status ( status _ complete, status _ complete, status _ complete, ctask ) | [
1.092245101928711,
0.45020243525505066,
0.6388041973114014,
1.6276121139526367,
0.07835768908262253,
1.091864824295044,
0.5046329498291016,
0.31536492705345154,
-0.3642227351665497,
-0.38836613297462463,
-1.694776177406311,
-0.2101779729127884,
0.5421468019485474,
0.9855969548225403,
-0.... |
def oneframe _ to _ onegraph ( frame, seuil ) : body = np. array ( frame [ " pose _ keypoints _ 2d " ] ) [ 0 ] [ : 9 ] handg = np. array ( frame [ " hand _ left _ keypoints _ 2d " ] ) [ 0 ] handd = np. array ( frame [ " hand _ right _ keypoints _ 2d " ] ) [ 0 ] nodes = np. concatenate ( ( body, handg ), axis = 0 ) node... | [
-0.4823809266090393,
0.08499307185411453,
0.6364396214485168,
-0.8080041408538818,
-0.4424629509449005,
-0.25256481766700745,
-0.006849183700978756,
0.22209924459457397,
1.1607041358947754,
0.9119873046875,
-0.16614703834056854,
0.3837812840938568,
0.07807542383670807,
0.24169234931468964,... |
def build _ dictionary _ for _ glove ( data _ frame, max _ df, min _ df ) : data _ frame. post = data _ frame. post. apply ( lambda x : " ". join ( x ) ) stops = set ( stopwords. words ('polish') ) vectorizer = tfidfvectorizer ( stop _ words = stops, min _ df = min _ df, max _ df = max _ df, use _ idf = false ) vectori... | [
-0.5106878280639648,
0.7574359178543091,
0.3343251347541809,
-0.8254306316375732,
-0.27356094121932983,
-0.3277992904186249,
-0.514394998550415,
0.7756257653236389,
-1.4102784395217896,
-0.29149824380874634,
-0.22094909846782684,
0.24286900460720062,
0.33841845393180847,
0.0988905280828476... |
def weight ( self ) : pass # pragma : no cover | [
0.2783489227294922,
-0.8641825318336487,
0.29593393206596375,
1.2637361288070679,
0.8277533650398254,
0.8862513303756714,
1.315186619758606,
-0.2646853029727936,
-0.5054280161857605,
-0.5562650561332703,
-0.3421382009983063,
-0.2645964026451111,
-0.008451440371572971,
0.8868430256843567,
... |
def _ _ repr _ _ ( self ) - > str : context = " ". join ( " { } = { } ". format ( k, v ) for k, v in self. _ solution. items ( ) ) return " < twilio. numbers. v2. hostednumberorderinstance { } > ". format ( context ) | [
-0.4196288287639618,
-0.4086613357067108,
0.5439385771751404,
-1.1610692739486694,
-1.0854710340499878,
1.0975415706634521,
0.13014747202396393,
0.3661714792251587,
0.4226078689098358,
-0.370266854763031,
-0.30531004071235657,
-0.4413127303123474,
0.1789354681968689,
-0.1346333622932434,
... |
def register _ device ( self, project _ id, credentials, device _ model _ id, device _ id ) : base _ url ='/ '. join ( [ device _ api _ url,'projects ', project _ id,'devices'] ) device _ url ='/ '. join ( [ base _ url, device _ id ] ) session = google. auth. transport. requests. authorizedsession ( credentials ) r = s... | [
-1.0786044597625732,
1.159489631652832,
0.4298689365386963,
0.41856926679611206,
1.1891361474990845,
0.5755662322044373,
-0.49752333760261536,
-0.42647677659988403,
-0.8190501928329468,
0.08510538190603256,
-0.5267638564109802,
1.1857805252075195,
-0.6038071513175964,
0.5396558046340942,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.