text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def bank _ holidays ( _, nodes, region ) : holidays = { " allbankholidays " : 0b1111111111111110, " allholidaysexceptchristmas " : 0b0000000111111110, " newyearsday " : 0b0000000000000010, " jan2ndscotland " : 0b0000000000000100, " goodfriday " : 0b0000000000001000, " holidaymondays " : 0b0000000111110000, " eastermond... | [
-0.0005724065704271197,
-0.04720606282353401,
1.0974018573760986,
-0.21223361790180206,
-0.5272260904312134,
0.3138209283351898,
0.8815743327140808,
0.4530678689479828,
0.2567814886569977,
0.6560534238815308,
-0.12820515036582947,
-0.14963655173778534,
0.11957430094480515,
0.59759831428527... |
def get _ parser ( ) : parser = argparse. argumentparser ( description = " restores the backup files for the original data. " ) parser. add _ argument ( " data _ dir ", help = " full path of dataset root directory. " ) parser. add _ argument ( " - n ", " - - backup _ name ", default = backupmanager. default _ backup _ ... | [
0.34544306993484497,
0.015538540668785572,
1.0254355669021606,
-0.639340877532959,
0.27862152457237244,
0.02176547423005104,
0.035982657223939896,
0.7555681467056274,
-0.7418308854103088,
-0.3384970426559448,
0.031084535643458366,
0.5627738833427429,
-0.43356436491012573,
0.067801699042320... |
def request _ response ( func : typing. callable [ [ request ], typing. union [ typing. awaitable [ response ], response ] ] ) - > asgiapp : async def app ( scope : scope, receive : receive, send : send ) - > none : request = request ( scope, receive, send ) async def app ( scope : scope, receive : receive, send : send... | [
-0.4438260793685913,
0.0650157704949379,
0.5296181440353394,
0.3646048903465271,
-0.29851165413856506,
-0.4447801411151886,
0.2940908372402191,
-0.8155630826950073,
1.0377837419509888,
0.2986373007297516,
0.8300465941429138,
0.08566009253263474,
0.4835771322250366,
-0.7124070525169373,
1... |
def _ _ str _ _ ( self ) : return f " { self. _ meta. verbose _ name. title ( ) } # { self. id } " | [
0.8194795846939087,
-1.3611140251159668,
0.5811415314674377,
-0.3733758330345154,
0.21831892430782318,
0.16103333234786987,
-1.6755648851394653,
-0.8026034832000732,
-0.11630447953939438,
0.7627956867218018,
0.9677256345748901,
1.2313448190689087,
0.03931741788983345,
-0.4272093176841736,
... |
def preprocess _ lightcurves ( lc, width = 30 ) : # - - print status. tstart = start ( " preprocessing light curves. " ) mask = gf ( ( lc. lcs > - 9999 ). astype ( float ), ( width, 0 ) ) > 0. 9999 msk _ sm = gf ( mask. astype ( float ), ( width, 0 ) ) lcs _ sm = gf ( lc. lcs * mask, ( width, 0 ) ) / ( msk _ sm + ( msk... | [
0.38491612672805786,
-0.5935211181640625,
0.5925867557525635,
-0.8936528563499451,
0.14907877147197723,
-0.31376197934150696,
-0.020908547565340996,
-0.9793755412101746,
1.9131792783737183,
-0.012164955027401447,
-0.47283369302749634,
-0.13803283870220184,
-0.20718571543693542,
0.293198347... |
def get _ sari ( source _ ids, prediction _ ids, target _ ids, max _ gram _ size = 4 ) : # def get _ sari _ numpy ( source _ ids, prediction _ ids, target _ ids ) : " " " iterate over elements in the batch and call the sari function. " " " sari _ scores = [ ] keep _ scores = [ ] add _ scores = [ ] deletion _ scores = [... | [
0.3273075520992279,
0.16369307041168213,
0.7110031247138977,
0.705048143863678,
0.6421911120414734,
-0.20954957604408264,
-0.21282289922237396,
-0.20620563626289368,
-0.7875953316688538,
0.6183122992515564,
-0.36511099338531494,
0.8685063123703003,
0.11158604174852371,
-0.668205738067627,
... |
def get _ model _ metadata ( self, model _ name : str, model _ version : str =..., headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =..., ) - > service _ pb2. modelmetadataresponse : | [
-1.1086351871490479,
-0.7798157930374146,
0.6170274615287781,
0.5083116888999939,
0.222708061337471,
-0.16223782300949097,
-1.0975066423416138,
-1.111032247543335,
-0.40971916913986206,
0.8075129389762878,
-1.0917437076568604,
0.30165472626686096,
-0.046712931245565414,
-0.2985199093818664... |
def one ( ) : return [ [ 0, 1, 0 ], [ 1, 1, 0 ], [ 0, 1, 0 ], [ 0, 1, 0 ], [ 0, 1, 0 ], [ 0, 1, 0 ], [ 1, 1, 1 ], ] | [
-1.0484241247177124,
-0.08160122483968735,
0.5978428721427917,
0.4973887503147125,
1.3803791999816895,
-0.31642818450927734,
0.8316996097564697,
-0.19028374552726746,
0.8486787676811218,
-0.2710443437099457,
-1.100295066833496,
-0.5458590388298035,
-0.42845606803894043,
0.6744229793548584,... |
def to _ map _ with _ default ( value, default _ value ) : result = jsonconverter. to _ nullable _ map ( value ) return result if result! = none else default _ value | [
-0.5343329906463623,
-0.5903675556182861,
0.43959903717041016,
0.05118899419903755,
0.3394709825515747,
-1.0844357013702393,
-1.0708171129226685,
-0.14399339258670807,
0.17513857781887054,
0.6011496186256409,
-0.9478771686553955,
-0.08207552880048752,
0.37503573298454285,
-0.24482931196689... |
def get ( org _ id ) : try : status = request. args. get ('status'). upper ( ) if request. args. get ('status') else none roles = request. args. get ('roles'). upper ( ) if request. args. get ('roles') else none members = membershipservice. get _ members _ for _ org ( org _ id, status = status, membership _ roles = rol... | [
-0.4734366536140442,
-0.5580320954322815,
0.8133452534675598,
-0.011550567112863064,
0.6243577003479004,
-0.19905762374401093,
-0.8435055613517761,
0.6145738363265991,
-0.20226772129535675,
0.378363698720932,
0.06029235199093819,
0.5808815956115723,
-0.5875278115272522,
0.47475308179855347... |
def _ remove _ vea ( db _ vea, db _ vio _ server, context, db _ session ) : msg = ( ras. vif _ get _ msg ('info ','reconcile _ vea _ del _ start') % {'host': db _ vio _ server. get _ host _ name ( ),'vios': db _ vio _ server. lpar _ id,'adpt': db _ vea. name } ) ras. trace ( log, _ _ name _ _, ras. trace _ debug, msg )... | [
0.32685837149620056,
-0.7409093379974365,
0.6494840383529663,
-0.3740037977695465,
0.37049680948257446,
-0.8404642939567566,
0.6333832740783691,
0.4291467070579529,
1.2189087867736816,
0.2605789303779602,
0.19334129989147186,
0.5821558237075806,
-0.37425827980041504,
0.7318319082260132,
... |
def _ _ init _ _ ( self, * args, * * kwargs ) : pass | [
0.14918400347232819,
-0.5886707305908203,
0.3974885940551758,
0.6754076480865479,
0.61588054895401,
0.2657996416091919,
-0.11076602339744568,
-0.0064731077291071415,
-0.1269679218530655,
-0.8178178668022156,
-0.5421714186668396,
0.3264414966106415,
-0.2647148072719574,
0.42312508821487427,... |
def do _ delete ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ delete ( self, node _ id ) # pylint : disable = attribute - defined - outside - init # it is defined in ramstkdatamodel. _ _ init _ _ if _ error _ code! = 0 : _ error _ code = 2005 _ msg = _ msg +'ramstk error : attempted to delete non ... | [
0.5505754351615906,
0.24367719888687134,
0.7871842384338379,
-0.4970383644104004,
1.025852084159851,
-0.671544075012207,
0.12338194996118546,
0.6235820651054382,
-0.24855037033557892,
1.2205711603164673,
0.09420760720968246,
0.7056851387023926,
-0.42741522192955017,
0.6603179574012756,
0... |
def download _ files ( o _ path, input _ csv, org ) : with open ( input _ csv,'r') as f : csvreader = csv. reader ( f, delimiter = ", " ) # with threadpoolexecutor ( max _ workers = 12 ) as executor : for ( dname, did, dformat, durl ) in csvreader : filename = org + " " + dname + " _ " + did + ". " + dformat filename =... | [
-0.16341455280780792,
-0.0677027627825737,
0.6629109382629395,
0.6036731600761414,
0.3782140910625458,
0.13223178684711456,
0.2309233844280243,
-0.0398242361843586,
-0.1514289677143097,
0.0901336669921875,
-0.26499059796333313,
0.019458534196019173,
-0.09095457941293716,
0.2042474895715713... |
def number _ of _ free _ seats ( self, value ) : self. number _ of _ free _ seats _ value = value | [
-0.44017064571380615,
0.7378865480422974,
0.4572219252586365,
-0.3575286269187927,
-1.1654629707336426,
0.9736160039901733,
0.4968329668045044,
-0.8008764982223511,
-0.16845110058784485,
-0.19284342229366302,
-0.8433735966682434,
-0.3789959251880646,
0.4018017053604126,
0.8852322697639465,... |
def _ kosaraju ( self, graph, rgraph ) : n = len ( graph ) rstack = [ ] stack = [ ] tag = [ false ] * n # do depth - first searches in the graph # and push nodes to rstack " on the way up " # until all nodes have been pushed. # tag nodes so we don't visit them more than once for u in range ( n ) : if tag [ u ] : contin... | [
0.5307921767234802,
-0.043875835835933685,
0.8908320069313049,
0.4567067325115204,
-0.3323420584201813,
-0.7061177492141724,
0.26255229115486145,
0.2880478501319885,
0.11229593306779861,
0.6907366514205933,
-0.15692870318889618,
-0.09736200422048569,
-0.3690410852432251,
0.2183658927679062... |
def _ populate _ authors _ for _ comments ( comments, author _ set ) : for comment in comments : if isinstance ( comment, morecomments ) : continue if comment. author : author _ set. add ( comment. author. name ) _ populate _ authors _ for _ comments ( comment. replies, author _ set ) | [
-0.619232177734375,
-0.23542028665542603,
0.47435063123703003,
-0.3166537880897522,
1.1591960191726685,
-0.5680039525032043,
-0.006870431825518608,
-1.2377941608428955,
0.2954687774181366,
0.6585619449615479,
0.44182270765304565,
0.2823280394077301,
0.22423619031906128,
0.2799372673034668,... |
async def remove _ event _ messages ( self, messages : list ) - > mythicresponse : url = " { } { } : { } / api / v { } / event _ message / delete ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) msgs = [ m. id for m in messages ] resp = await self. post _ json ( url, ... | [
-0.9452704787254333,
-0.4273529648780823,
0.700245201587677,
0.3703708350658417,
0.9740585088729858,
-0.7049311995506287,
0.0594351626932621,
0.26628419756889343,
0.2928171157836914,
0.6863452792167664,
-0.6093209385871887,
-0.3915994465351105,
-1.3020704984664917,
0.721843421459198,
-0.... |
def allowed _ file ( filename ) : return ( '.'in filename and filename. rsplit ( '. ', 1 ) [ 1 ] in current _ app. config. get ('allowed _ extensions') ) | [
0.4359694719314575,
0.19500987231731415,
0.6366892457008362,
0.73288494348526,
-1.2198764085769653,
0.7506669163703918,
0.24199415743350983,
0.3899534046649933,
-0.3299010097980499,
0.6900042295455933,
0.7296332120895386,
0.6936814785003662,
-0.6155798435211182,
0.36688339710235596,
0.07... |
def decode _ request ( request : request ) - > httpx. request : method, url, headers, stream = request return httpx. request ( method, url, headers = headers, stream = stream ) | [
-0.8735380172729492,
-0.3113664388656616,
0.6213250160217285,
0.11976540088653564,
-0.585675060749054,
-0.431964635848999,
-1.0881296396255493,
-0.17746342718601227,
1.071311354637146,
-1.3012354373931885,
0.2524278461933136,
0.5708212852478027,
0.41556107997894287,
-0.3314054012298584,
... |
def test _ table _ 9 _ fail ( ) : cleanup ( ) print _ test _ separator ( " starting test _ table _ 9 " ) cat = csvcatalog. csvcatalog ( ) try : t = cat. create _ table ( " teams ", ".. / data / teams. csv " ) print ( " teams table ", json. dumps ( t. describe _ table ( ), indent = 2 ) ) t. add _ column _ definition ( c... | [
0.9210296869277954,
1.0906531810760498,
0.7035151720046997,
0.7436866760253906,
0.4008774161338806,
0.5841963887214661,
0.5469847917556763,
-0.968233585357666,
-0.99102783203125,
-0.5048984289169312,
-0.3033348321914673,
0.4148155152797699,
0.5499230027198792,
0.005443185567855835,
0.583... |
def standard _ env ( ) : env = { } env. update ( vars ( math ) ) scrub _ keys = [ " _ _ name _ _ ", " _ _ doc _ _ ", " _ _ package _ _ ", " _ _ loader _ _ ", " _ _ spec _ _ ", " _ _ file _ _ ", ] for key in scrub _ keys : env. pop ( key, none ) env. update ( { " + " : op. add, " - " : op. sub, " * " : op. mul, " / " : ... | [
0.16735610365867615,
-0.277121901512146,
0.7019459009170532,
-0.6130417585372925,
-0.9909266233444214,
0.04429379850625992,
0.24282269179821014,
-0.6130452752113342,
-0.06932342797517776,
0.030273910611867905,
-0.27558228373527527,
0.05373455211520195,
0.5100177526473999,
0.013064237311482... |
def next _ node ( self, value ) : if value is not none and not isinstance ( value, node ) : raise typeerror ( " next _ node must be a node object " ) else : self. _ _ next _ node = value | [
-0.6857638359069824,
0.6246954202651978,
0.35870808362960815,
-0.12197429686784744,
-0.4069855511188507,
0.3372230529785156,
0.33444440364837646,
-0.10188017785549164,
0.5605381727218628,
0.24417398869991302,
-0.46541762351989746,
0.9720222353935242,
-0.39462175965309143,
0.518827617168426... |
def meta _ properties ( self, query : dict = none ) : return self. bynder _ request _ handler. get ( endpoint ='/ api / v4 / metaproperties / ', params = query or { } ) | [
-0.8284866809844971,
0.3016800582408905,
0.3242146372795105,
0.3946578800678253,
-0.38375136256217957,
-0.6049442887306213,
-0.5783390402793884,
-0.2830413579940796,
0.20210148394107819,
0.3889766037464142,
0.5171644687652588,
1.53078293800354,
0.0808030217885971,
-0.24559496343135834,
-... |
def categorize _ sentiment ( result ) : # print'result ', result # print'type ', type ( result ) if result [ 0 ] ['sentiment'] = = " negative " : return'negative'elif result [ 0 ] ['sentiment'] = = " very negative " : return'very negative'elif result [ 0 ] ['sentiment'] = = " positive " : return'positive'elif result [ ... | [
-0.7827369570732117,
-0.6988143920898438,
0.6232813596725464,
-0.33561480045318604,
0.039702609181404114,
0.13503597676753998,
-1.0394002199172974,
-0.230880007147789,
0.1015736386179924,
0.44600486755371094,
0.390231728553772,
0.4949120283126831,
0.21948714554309845,
0.4119548201560974,
... |
def getfilelist ( self, filetype = " rst ", locale = " fr _ fr ", encoding = " utf - 8 " ) : filetype = filetype. lower ( ) # todo : ensure locale & encoding values are in a defined and controled # scope source _ dir = os. path. join ( " source ", " % s. % s " % ( locale, encoding ) ) files = [ ] for dirname, dirnames,... | [
0.08760693669319153,
-0.06998462229967117,
0.5997145175933838,
-0.041411492973566055,
0.10216792672872543,
-0.3671766221523285,
-0.11582440137863159,
0.6028594970703125,
0.3604993522167206,
0.30721208453178406,
-0.07491742819547653,
0.2640087604522705,
-0.3138890862464905,
1.25085949897766... |
def create _ all _ pts _ within _ observation _ window ( observation _ window _ hours ) - > str : view _ name = f " default. all _ pts _ { observation _ window _ hours } _ hours " query = f " " " create or replace view { view _ name } as with admits as ( select admits. subject _ id, admits. hadm _ id, admits. admittime... | [
-0.26929953694343567,
0.30498746037483215,
0.7109570503234863,
-0.32050132751464844,
-0.8645874857902527,
0.7255075573921204,
-0.08046364039182663,
-0.7515968084335327,
0.18166477978229523,
0.6689107418060303,
1.116337537765503,
0.7211498618125916,
0.054091598838567734,
0.8755365610122681,... |
async def get _ moderator _ app _ by _ channel ( self, channel _ id : int ) - > list [ str ] : mycursor, db = await the _ database ( ) await mycursor. execute ( " select * from moderatorapplication where txt _ id = % s ", ( channel _ id, ) ) moderator _ app = await mycursor. fetchall ( ) await mycursor. close ( ) retur... | [
-0.1539902687072754,
-0.671820342540741,
0.3099753260612488,
-0.8642213940620422,
0.3284945785999298,
-0.010930304415524006,
-1.194947600364685,
-0.2215893268585205,
0.3601536452770233,
1.2364000082015991,
0.12164656817913055,
0.3767121732234955,
-0.6936577558517456,
1.0419487953186035,
... |
def test _ packages ( self ) : self. asserttrue ( self. check _ package _ output ( " node - - version ", " v14. " ) ) self. asserttrue ( self. is _ package _ present ( " npm " ) ) | [
0.17519035935401917,
0.5845796465873718,
0.41109132766723633,
-0.051264915615320206,
1.0864484310150146,
0.41327905654907227,
-0.045721929520368576,
0.4735589325428009,
-0.015969207510352135,
-0.3146041929721832,
-0.2489023655653,
-0.15350472927093506,
0.5894874930381775,
0.403122872114181... |
def is _ model _ ready ( self, model _ name : str, model _ version : str =..., headers : dict [ str, t. any ] =..., ) - > bool : | [
-1.1849621534347534,
-0.7519031763076782,
0.7241517901420593,
0.1680428385734558,
-0.2919151484966278,
0.06667796522378922,
-1.1377992630004883,
-0.19194772839546204,
-0.5566341876983643,
0.9006853103637695,
-1.6951931715011597,
-0.14091086387634277,
0.3647688925266266,
-0.0547250285744667... |
def _ get _ normalized _ count ( self, header _ number, num _ alts, num _ samples ) : if header _ number = = " a " : return num _ alts elif header _ number = = " r " : return ( num _ alts + 1 ) elif header _ number = = " g " : return num _ samples elif header _ number. isdigit ( ) : # number = 0 implies one entry of bo... | [
-0.0964682549238205,
-0.6964749097824097,
0.5865520238876343,
-0.1367221176624298,
-0.48774033784866333,
-0.28183263540267944,
0.18520627915859222,
0.18153703212738037,
0.08711903542280197,
-0.33535221219062805,
0.6600263714790344,
0.28030267357826233,
-0.10225598514080048,
-0.052488580346... |
def do _ search ( ) : conn = get _ db ( ) conn. row _ factory = sqlite3. row cursor = conn. execute ('select * from foundations') items = cursor. fetchall ( ) # kind _ of _ boost = request. form. getlist ( " kindofboost " ) # kind _ of _ boost = handle _ checkboxes ( kind _ of _ boost ) broadness = request. form. getli... | [
-0.45642024278640747,
0.515972375869751,
0.6814323663711548,
0.7028018832206726,
0.42445454001426697,
0.30757513642311096,
0.34879565238952637,
-0.40378376841545105,
-0.8968424201011658,
-0.25831523537635803,
0.8048655986785889,
-0.7914713621139526,
-0.012956339865922928,
1.310726761817932... |
def format _ ongoing _ game ( _ n : int, item : kasupel. game ) - > str : mode = item. mode. name. title ( ) home = item. host. username away = item. away. username turn = f'move { item. turn _ number }, { item. current _ turn. name. lower ( ) } turn'return f'( { item. id } ) { mode } - { home } vs { away }, { turn } ' | [
-0.24671581387519836,
-1.437666416168213,
0.5757542252540588,
-0.6133090257644653,
-0.25474315881729126,
0.14641262590885162,
-0.6964033842086792,
-0.7428342700004578,
-0.4246062934398651,
1.3988926410675049,
0.30361074209213257,
-0.16965949535369873,
0.05896330624818802,
-0.68646931648254... |
def _ pretty _ perhour ( self, count, hours ) : if hours < 1 or count = = 0 : return count return " { } ( { : 0. 2f } / hr ) ". format ( count, count / hours ) | [
0.48581963777542114,
0.07336054742336273,
0.43977445363998413,
-0.41283556818962097,
-0.8657220602035522,
0.12920543551445007,
-0.37778347730636597,
-0.24785271286964417,
-1.3821505308151245,
0.7009999752044678,
1.4911713600158691,
-0.5520290732383728,
-0.1112527847290039,
0.58861386775970... |
def timeout _ func ( timeout : int, func : callable, * args, * * kwargs ) : # multiprocessing cannot run child with function defined in _ _ main _ _ # https : / / stackoverflow. com / questions / 43369648 / cant - get - attribute - function - inner - on - module - mp - main - from - e - python # when the multiprocessin... | [
1.270811915397644,
-0.7799696922302246,
0.9665314555168152,
-0.30107399821281433,
-0.5868407487869263,
-0.329996794462204,
-0.10399273037910461,
0.24678434431552887,
-0.3030363917350769,
1.0785125494003296,
-0.3466576635837555,
0.1357196569442749,
-0.3337535858154297,
-0.5881607532501221,
... |
def update _ action ( self, uuid, accept ) : return self. request ('actions ', method ='post ', uuid = uuid, query = f'accept = { self. _ bool _ to _ text ( accept ) }') | [
-1.7034772634506226,
-0.6381010413169861,
0.413193017244339,
0.0018978395964950323,
-0.8542661666870117,
0.4517984986305237,
-0.6657732725143433,
0.27134010195732117,
-0.31959766149520874,
1.831441879272461,
-0.22415249049663544,
1.2740495204925537,
-1.0530803203582764,
-0.3951875865459442... |
def save _ results ( scenario _ name, optimizer _ name, run, trajectory, f _ vals, dampings = none ) : # create folder here = os. path. abspath ( _ _ file _ _ ) here _ dir = os. path. dirname ( here ) optimizer _ path = os. path. join ( here _ dir, " results ", scenario _ name, optimizer _ name ) os. makedirs ( optimiz... | [
-0.5216370820999146,
-0.13680066168308258,
0.5134968757629395,
-0.18699783086776733,
0.10531069338321686,
-0.3014300763607025,
0.537604033946991,
-0.8233927488327026,
-0.94353187084198,
0.22526875138282776,
-1.1284799575805664,
-0.021493686363101006,
0.1598026305437088,
0.584831953048706,
... |
def _ installextpack ( self ) : svbox = self. _ getvboxinstallpath ( ffailifnotfound = true ) ; if svbox is none : return false ; sextpackdir = os. path. join ( svbox,'extensionpacks') ; if self. _ uninstallallextpacks ( ) is not true : return false ; sextpack = self. _ findfile ('oracle _ vm _ virtualbox _ extension _... | [
0.6668146252632141,
0.38402044773101807,
0.8681795001029968,
0.18714582920074463,
-0.21363043785095215,
-0.46105748414993286,
0.19768692553043365,
0.39372196793556213,
1.0051474571228027,
0.8028215169906616,
-0.3851398527622223,
-0.32861992716789246,
-0.23671254515647888,
-0.06534191966056... |
def test _ check _ config _ params _ missing _ verbose ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture. pop ( " verbose ", none ) with pytest. raises ( systemexit ) : gitdelver. _ check _ config _ params ( config _ params ) | [
0.38281485438346863,
0.4730304479598999,
0.3926019072532654,
0.5406258702278137,
0.5552121996879578,
0.05603151395916939,
-0.8232866525650024,
0.6375752687454224,
-0.876960039138794,
1.5685781240463257,
-0.6220600008964539,
-0.01699080504477024,
-0.642970621585846,
1.4653820991516113,
0.... |
def set _ unique _ slug ( self ) : set _ unique _ slug ( self, based _ on _ field ='name') | [
0.3699234426021576,
-0.14776286482810974,
0.2669374942779541,
-0.2388146072626114,
0.9203453063964844,
0.21349351108074188,
0.2882164418697357,
1.0719826221466064,
-0.9406415820121765,
-0.622566819190979,
-1.0253639221191406,
0.43325328826904297,
0.20708128809928894,
0.5281178951263428,
... |
def until _ x ( chatid, target ) : subject _ data = lecture. query. filter ( and _ ( lecture. chatid = = chatid, lecture. name = = " total " ) ). first ( ) attended = subject _ data. attended conducted = subject _ data. conducted x = symbol ('x') expr = eq ( ( ( ( int ( attended ) + x ) / ( int ( conducted ) + x ) ) * ... | [
-0.5481736660003662,
0.6019418239593506,
0.3918895125389099,
-1.0137767791748047,
-0.5806288719177246,
-0.057708799839019775,
0.5281273722648621,
-0.7861116528511047,
-0.3172139525413513,
0.4314367473125458,
0.5627970695495605,
0.34103596210479736,
-0.05519836023449898,
-0.4565045535564422... |
def from _ xml _ element ( cls, xml _ element : et. element ) - >'regsregister': name = xml _ element. attrib [ " name " ] if " name " in xml _ element. attrib else " n / a " offset = int ( xml _ element. attrib [ " offset " ], 16 ) if " offset " in xml _ element. attrib else 0 width = int ( xml _ element. attrib [ " w... | [
0.07658969610929489,
0.33966705203056335,
0.5177984237670898,
-0.3094800114631653,
0.00917148869484663,
-0.16288764774799347,
-0.1752001792192459,
-0.3171621263027191,
0.3789456784725189,
0.002490276237949729,
-0.25544068217277527,
-0.15546204149723053,
-0.4115598797798157,
0.1640351265668... |
def list _ postings ( self, skip = 0, limit = 0, location ='', commitment ='', team ='', department ='', level ='', group ='' ) : # remove params with an empty string as value params = { k : v for ( k, v ) in locals ( ). items ( ) if v not in ['', 0 ] } return [ posting ( * * posting ) for posting in self. session. get... | [
-1.3682039976119995,
0.6601481437683105,
0.6686228513717651,
0.35626280307769775,
0.4379566013813019,
-0.08202549815177917,
-0.5312131643295288,
0.31136104464530945,
0.2102215439081192,
0.815149188041687,
0.07938293367624283,
0.5667283535003662,
-0.9566027522087097,
0.2626819312572479,
-... |
def test _ insert _ records ( self, device _ ids, times, measurements _ lst, types _ lst, values _ lst ) : type _ values _ lst = [ ] for types in types _ lst : data _ types = [ data _ type. value for data _ type in types ] type _ values _ lst. append ( data _ types ) request = self. gen _ insert _ records _ req ( devic... | [
-1.079629898071289,
1.6796720027923584,
0.6781668066978455,
0.28424036502838135,
1.8266552686691284,
0.746350884437561,
-0.08709171414375305,
-0.08240626007318497,
-0.8086763024330139,
0.4534994661808014,
-1.0784118175506592,
-0.6076986789703369,
-1.5423142910003662,
0.6125473976135254,
... |
def get _ version ( package ) : init _ py = open ( os. path. join ( package,'_ _ init _ _. py') ). read ( ) mth = re. search ( " _ _ version _ _ \ s? = \ s? ['\ " ] ( [ ^'\ " ] + ) ['\ " ] ", init _ py ) if mth : return mth. group ( 1 ) else : raise runtimeerror ( " cannot find version! " ) | [
-0.5684067010879517,
-0.6418067216873169,
0.7547913789749146,
-0.06614281982183456,
0.18607781827449799,
-0.21044915914535522,
0.5325924754142761,
-0.030410952866077423,
-0.5926781892776489,
0.38882505893707275,
-0.15918418765068054,
-0.10395751893520355,
-0.5291052460670471,
0.31521207094... |
def main ( budget = 200 ) : test _ data = { " alice " : { " cost " : 10, " gkp " : 1, " def " : 0, " mid " : 0, " fwd " : 0, " id " : str ( uuid. uuid4 ( ) ), " points " : 2 }, " bob " : { " cost " : 20, " gkp " : 1, " def " : 0, " mid " : 0, " fwd " : 0, " id " : str ( uuid. uuid4 ( ) ), " points " : 0 }, " charlie " ... | [
-0.24927815794944763,
0.06516996771097183,
0.9875805377960205,
0.29941657185554504,
0.21922144293785095,
0.16337819397449493,
0.29664164781570435,
0.6709407567977905,
-0.023700429126620293,
0.5512402057647705,
-0.5867946743965149,
-0.3465093672275543,
0.11435102671384811,
-0.33863207697868... |
def add _ suggestions ( self, is _ folloup _ suggestion = true, exclusions = none, query = none, custom _ radius = none, cnt = none ) : if query is none : query = self. get _ suggestion _ query ( ) location = self. form ['city'] if self. last _ affirmed _ place is not none : location = self. last _ affirmed _ place cou... | [
-0.9676011800765991,
0.2290259152650833,
0.7230644226074219,
-0.29518312215805054,
0.24721339344978333,
0.08070148527622223,
-0.5282569527626038,
-0.4852170944213867,
0.4705691933631897,
0.21923188865184784,
0.3075098395347595,
0.22085696458816528,
-0.4426398277282715,
1.1308552026748657,
... |
def prep _ df ( df ) : # drop nas in opinion pdf = df. dropna ( subset = [ " target " ] ) pdf = pdf [ pdf. target! = " null " ] pdf [ ['from ','to'] ] = pdf [ ['from ','to'] ]. astype ( int ) # if from > to, switch positions pdf. loc [ pdf ['to'] < pdf ['from'], ['from ','to'] ] = pdf. loc [ pdf ['to'] < pdf ['from'], ... | [
-0.7743251323699951,
-1.1771163940429688,
0.7229084372520447,
-1.6271083354949951,
0.509955883026123,
0.2934855818748474,
-0.5556952953338623,
0.5327767133712769,
-0.014657214283943176,
0.3734871447086334,
0.8608509302139282,
-0.22928768396377563,
1.180590033531189,
-0.19308234751224518,
... |
def setup _ gene ( panelapp _ data ) : data = { " symbol " : panelapp _ data [ " gene _ data " ] [ " hgnc _ symbol " ], " hgnc _ id " : panelapp _ data [ " gene _ data " ] [ " hgnc _ id " ], } gene _ data = panelapp _ data [ " gene _ data " ] if " ensembl _ genes " in gene _ data : ensembl _ dict = { } if gene _ data [... | [
0.5205761790275574,
-0.34644249081611633,
0.4900299310684204,
-0.45598503947257996,
0.055533286184072495,
-0.011141489259898663,
-0.8243296146392822,
0.10668092966079712,
-1.1419097185134888,
0.49354857206344604,
-0.2175067812204361,
0.1496901959180832,
0.22099252045154572,
0.8679060935974... |
def hasdefinition ( self, name ) : return ( name in self. consts or name in self. roles or name in self. states or name in self. qualifiers or name in self. messages or name in self. events or name in self. transitions ) | [
-0.25002095103263855,
-0.3340231776237488,
0.6056227087974548,
-0.07104592770338058,
-0.14725415408611298,
-0.2518695890903473,
-0.5048972964286804,
0.26186907291412354,
-0.25566670298576355,
0.23362435400485992,
-0.8440266847610474,
0.002800298621878028,
0.08495945483446121,
1.83051514625... |
def _ _ add _ aton _ overrides ( self ) : if self. ipr. isactive ( ) : with hou. undos. disabler ( ) : self. output. remove _ callbacks ( ) # main attributes self. output. user _ options = self. output. origin _ user _ options self. output. user _ options + = " " if self. output. user _ options else " " self. output. u... | [
0.1422806680202484,
-1.0227396488189697,
0.9366880059242249,
0.24220430850982666,
-0.4386496841907501,
-0.20409980416297913,
0.4547719359397888,
-0.6791948080062866,
0.08547736704349518,
-0.3496760129928589,
-0.05273409187793732,
-0.21218296885490417,
-0.1828608512878418,
0.091340400278568... |
def build _ run ( self, job _ run ) : new _ run = actionrun ( self ) new _ run. id = " % s. % s " % ( job _ run. id, self. name ) new _ run. state _ callback = job _ run. state _ callback new _ run. complete _ callback = job _ run. run _ completed new _ run. node = self. node _ pool. next ( ) if self. node _ pool else ... | [
-0.18204715847969055,
-1.694745659828186,
0.6097670197486877,
0.37862932682037354,
0.25675392150878906,
-0.0851377323269844,
0.20575286448001862,
-0.5683193802833557,
0.2243591696023941,
-0.4322347044944763,
0.10809483379125595,
1.059898853302002,
-0.054212912917137146,
0.17388826608657837... |
def check _ bridge _ exists ( ) : if os. path. isfile ('/ etc / default / lxd - bridge') : cfg = configobj ('/ etc / default / lxd - bridge') else : cfg = configobj ( ) ready = cfg. get ('lxd _ ipv4 _ addr ', none ) if not ready : return false return true | [
-0.6125238537788391,
-0.1768067330121994,
0.6052313446998596,
-0.3570004999637604,
0.1813839226961136,
1.3560333251953125,
-0.6363918781280518,
0.7180063128471375,
-0.1779273897409439,
-0.7699170708656311,
-0.3353760242462158,
-0.296958863735199,
-0.4092855155467987,
0.7232738137245178,
... |
def fit ( self, x, y = none ) : return self | [
0.10948468744754791,
-0.044206175953149796,
0.41228675842285156,
0.8390803933143616,
-0.39750227332115173,
0.23443971574306488,
-0.5726636052131653,
-0.5849395394325256,
0.5196332335472107,
-1.599941372871399,
-0.7772167325019836,
1.130820870399475,
-0.7264917492866516,
-0.1953565031290054... |
def load ( filename, fields = [ ] ) : if not exists ( filename ) : raise filenotfounderror ( ) # dispatch to _ load _ dir for directories, or _ load _ file for filenames. if isdir ( filename ) : obj = _ load _ dir ( filename, fields ) else : obj = _ load _ file ( filename, fields ) # _ load _ dir or _ load _ file may r... | [
-0.2747475802898407,
-0.0440826490521431,
0.5416491031646729,
0.050340574234724045,
0.13242439925670624,
0.13176578283309937,
0.4486393332481384,
0.08099222928285599,
-0.3805256187915802,
-0.5511382818222046,
-0.44167816638946533,
0.00914190337061882,
0.5386834740638733,
-0.093932569026947... |
def extract _ ingredients ( drink, with _ measures ) : ingredients = [ ] for i in range ( 15 ) : ingredient = drink [ f'stringredient { i + 1 }'] measure = drink [ f'strmeasure { i + 1 }'] if ingredient : if with _ measures and measure : ingredients. append ( f " { measure } { ingredient } " ) else : ingredients. appen... | [
-0.12948139011859894,
-0.5569521188735962,
0.27203306555747986,
-0.561160683631897,
-0.5403908491134644,
-0.9535481333732605,
-0.9024838805198669,
-0.1377364993095398,
0.11015675961971283,
0.8872717022895813,
0.47922828793525696,
-0.29206109046936035,
-0.49891671538352966,
0.17385964095592... |
def basic _ skyplot ( self, ax, glon, singlat, c, title = none, ecliptic = false, labels = true, colorbar = false, cbtext ='', aspect = 180., * * scatter _ kw ) : cb _ kw = scatter _ kw. pop ('cb _ kw ', { } ) ecliptic = scatter _ kw. pop ('ecliptic ', false ) scat = ax. scatter ( glon, singlat, c = c, * * scatter _ kw... | [
0.3575960695743561,
0.2789610028266907,
1.0277867317199707,
-0.6300820708274841,
-1.0765314102172852,
0.5784318447113037,
-0.6415245532989502,
0.16701743006706238,
0.8633894324302673,
-0.46662163734436035,
0.16283637285232544,
0.25586414337158203,
0.33138948678970337,
-0.09378060698509216,... |
def train ( self, data, num _ epochs = 1, batch _ size = 10 ) : for _ in range ( num _ epochs ) : self. run _ epoch ( data, batch _ size ) update = self. get _ params ( ) comp = num _ epochs * ( len ( data ['y'] ) / / batch _ size ) * batch _ size * self. flops return comp, update | [
-0.9191707968711853,
0.29913756251335144,
0.5437460541725159,
0.005822093691676855,
0.03338393196463585,
-0.8370283246040344,
0.43536725640296936,
0.9473224878311157,
0.12113625556230545,
-0.17140088975429535,
-0.9431285858154297,
-0.22073908150196075,
0.48445212841033936,
0.28441512584686... |
def make _ finite ( self, substitute = 0. 0 ) : print ('handling nans and infs...') self. processed. values [ ~ np. isfinite ( self. processed. values ) ] = substitute self. update _ history ('make _ finite ','substitute : { substitute }') | [
0.2023177295923233,
0.9075968861579895,
0.21145527064800262,
-0.2506672441959381,
0.20280390977859497,
-0.18854078650474548,
-0.20550359785556793,
1.099036455154419,
-0.4711320698261261,
-1.0773752927780151,
-0.35666146874427795,
0.550447940826416,
-0.09467598050832748,
0.687932014465332,
... |
def pdf ( self, state1, state2 ) : pass | [
-0.18086954951286316,
-0.9487444758415222,
0.26345518231391907,
-0.15533065795898438,
-0.15517494082450867,
-0.2214394360780716,
-0.7142006754875183,
-0.10984870046377182,
-0.3689475655555725,
-0.24064986407756805,
0.6828042268753052,
0.24431833624839783,
0.7144089937210083,
-1.02763485908... |
def sharpen ( self, kernel _ size = 9 ) : kernel = np. zeros ( ( kernel _ size, kernel _ size ), np. float32 ) kernel [ int ( kernel _ size / 2 ), int ( kernel _ size / 2 ) ] = 2. 0 # identity, times two! # create a box filter : boxfilter = np. ones ( ( kernel _ size, kernel _ size ), np. float32 ) / float ( kernel _ s... | [
-0.29547902941703796,
-0.051652051508426666,
0.82878178358078,
0.9414801597595215,
-0.012585117481648922,
-0.5595125555992126,
-0.18766610324382782,
-1.0592248439788818,
0.3031682074069977,
-0.8752394914627075,
-0.015924934297800064,
0.8561709523200989,
0.09976248443126678,
0.7043163776397... |
def get _ speed ( self ) : return ( self. _ _ x _ speed, self. _ _ y _ speed ) | [
-0.0017032393952831626,
0.09459225833415985,
0.6319065093994141,
0.058177147060632706,
0.8947516083717346,
-0.15825007855892181,
-0.4809199869632721,
-0.6529179811477661,
-0.7528336048126221,
0.3756188750267029,
-0.6520136594772339,
-0.19719292223453522,
-0.35918962955474854,
0.22296331822... |
def age _ transform ( age, adult _ age = 20 ) : age = ( age + 1 ) / ( 1 + adult _ age ) horvath = np. where ( age < = 1, np. log ( age ), age - 1 ) return horvath | [
-0.36400651931762695,
-0.25743433833122253,
0.5053895115852356,
0.11412744224071503,
-0.5568450093269348,
0.17945021390914917,
0.07057034969329834,
-0.4084935188293457,
-0.02044694870710373,
0.5861270427703857,
-0.37467771768569946,
0.3030448257923126,
0.22027824819087982,
-0.2682752013206... |
def to _ beta _ binomial ( ks, ns ) : if np. shape ( ns ) = = ( ) : ns = np. full ( shape = ks. shape, fill _ value = ns, dtype = float ) for x, n in zip ( ks, ns ) : if x < 0 or x > n : logging. warning ('data out of domain for beta - binomial') arr _ ks = np. asarray ( ks, dtype = float ) n = len ( arr _ ks ) # see "... | [
-0.00018562990589998662,
-0.4333174228668213,
0.8471901416778564,
0.34842514991760254,
0.10420812666416168,
-0.10588593780994415,
-0.3683757781982422,
-0.597088098526001,
-0.09919469803571701,
0.042775992304086685,
0.018729472532868385,
1.0058952569961548,
0.40480488538742065,
0.5327921509... |
def request ( self, args ) : verify _ certs = false if args. insecure else true return self. _ request ( * self. _ retrieve _ http _ params ( args ), verify _ certs ) | [
-1.111943244934082,
0.5301539897918701,
0.39047759771347046,
1.4609050750732422,
1.5922200679779053,
-0.07466338574886322,
-0.3308652639389038,
-0.7858194708824158,
-0.3781886696815491,
0.0789605975151062,
0.12722261250019073,
-0.03323166072368622,
-1.1256917715072632,
-0.4031771123409271,... |
def compute _ best _ test _ losses _ case2 _ with _ details ( data, k, total _ queries ) : results = [ ] for query in range ( k, total _ queries + k, k ) : best _ arch = sorted ( data [ : query ], key = lambda i : i [ 4 ] ) [ 0 ] test _ error = best _ arch [ 5 ] results. append ( ( query, test _ error ) ) val _ distrib... | [
-0.07542110979557037,
-0.2139662504196167,
0.38607046008110046,
-0.45589324831962585,
0.02338189259171486,
-0.06620687991380692,
0.2420930117368698,
0.5915136933326721,
0.5053833723068237,
0.2776648700237274,
0.05002574622631073,
0.06302019208669662,
0.586712121963501,
0.5864617824554443,
... |
def open ( self, out, source _ path, * * kw ) : | [
-0.40075555443763733,
-0.19620007276535034,
0.10529056191444397,
0.6805100440979004,
-1.1473758220672607,
0.0960063710808754,
0.7469916343688965,
1.402465581893921,
-0.14676102995872498,
-0.6216859221458435,
0.09715113043785095,
0.41171514987945557,
0.5297191739082336,
-0.3741782307624817,... |
def _ computecost ( self, currentmid, target, correctionmatrix ) : difference = target - np. dot ( correctionmatrix, currentmid ) # calculate sum of square differences and gradient return ( np. dot ( difference, difference ), np. dot ( correctionmatrix. transpose ( ), difference ) * - 2 ) | [
-0.14596565067768097,
-0.6995891332626343,
0.29875466227531433,
-0.4752863943576813,
-0.6336389780044556,
-0.2715024948120117,
0.5603342056274414,
0.3799847960472107,
0.30617088079452515,
1.4697635173797607,
0.11588644981384277,
0.5930050611495972,
-0.25916048884391785,
0.2318512350320816,... |
def test _ daily _ schedule _ conversion ( self ) : variable. delete ( " rb _ status _ " + self. report _ form _ sample _ daily. report _ title. data ) report _ saver = reportformsaver ( self. report _ form _ sample _ daily ) report _ saver. extract _ report _ data _ into _ airflow ( report _ exists = false ) report _ ... | [
-0.1442834585905075,
-0.31087422370910645,
0.5509340167045593,
0.35395944118499756,
0.5987083315849304,
-0.08681729435920715,
-0.11751139163970947,
-0.3647490441799164,
-0.2137911468744278,
-0.1851978749036789,
-0.24404776096343994,
-0.16109338402748108,
-0.5159640908241272,
-0.18706262111... |
def set _ pcp ( self, value ) : orig _ value = self. get _ byte ( 2 ) self. set _ byte ( 2, ( orig _ value & 0x1f ) | ( ( value & 0x07 ) < < 5 ) ) | [
0.6925461292266846,
-0.17550258338451385,
0.7187103033065796,
-0.20237725973129272,
-0.9237899780273438,
0.9089929461479187,
0.6293904781341553,
-1.1799473762512207,
0.3745637536048889,
0.6079280972480774,
-0.08150709420442581,
-0.3370979428291321,
-1.0817267894744873,
0.007749286014586687... |
def surrogate _ team _ keys ( self, surrogate _ team _ keys ) : self. _ surrogate _ team _ keys = surrogate _ team _ keys | [
-0.03378722071647644,
0.5294391512870789,
0.02835005894303322,
-0.20934267342090607,
-0.7398963570594788,
1.186767816543579,
-0.47127845883369446,
-0.08603010326623917,
-1.3028066158294678,
-0.1799638867378235,
-0.6652042269706726,
0.5771698951721191,
-0.2150324434041977,
-0.83650255203247... |
def db _ handler ( dataset, variant _ dict, vars _ to _ beacon, connect _ string, reference = " grch37 " ) : conn = none if connect _ string is none : # extract connection params from settings file # connect using mysqlconfig file : connect _ string = set _ db _ params ( ) conn = use _ mysqlalchemy ( connect _ string )... | [
-0.257278710603714,
0.4180842339992523,
0.6309263706207275,
-0.49828487634658813,
0.04126681387424469,
-0.259662002325058,
0.24722297489643097,
0.5955184102058411,
-0.7337582111358643,
0.6531771421432495,
-0.523892343044281,
-1.183505654335022,
-0.7291629314422607,
-0.01435493491590023,
... |
def tag _ insult ( node, context ) : return do _ noun ( word _ from _ file ('data / insults'), node. attribute. split ( ) ) | [
-0.16743820905685425,
0.5410150289535522,
0.1384836882352829,
-1.3139146566390991,
0.7269013524055481,
-0.4769294559955597,
-0.11338843405246735,
0.12087254971265793,
-0.8142002820968628,
1.0775108337402344,
-0.18001492321491241,
0.5301803350448608,
0.30337944626808167,
-0.5695671439170837... |
def evaluate ( self, x ) : pass | [
-0.7348663806915283,
-0.458427757024765,
0.01703924685716629,
-0.30592337250709534,
0.08002886176109314,
0.8093959093093872,
-0.630551815032959,
0.016715824604034424,
-0.20375961065292358,
-1.1245933771133423,
-1.3418021202087402,
0.13573263585567474,
0.04235421121120453,
-0.18150623142719... |
def status ( s ) : print ('\ 033 [ 1m { 0 } \ 033 [ 0m '. format ( s ) ) | [
0.6901730895042419,
-1.2023130655288696,
0.4131142497062683,
-0.16717994213104248,
-0.5457531809806824,
0.6242205500602722,
-0.5842157602310181,
0.34783536195755005,
0.8393341898918152,
-0.09905348718166351,
-0.7265536785125732,
1.0552200078964233,
-0.13964170217514038,
0.05515987426042557... |
def convert _ arg _ line _ to _ args ( arg _ line ) : # remove commented lines and after argument comments for arg in re. sub ( r'\ # (. *? ) $ ', r'', arg _ line ). split ( ) : if not arg. strip ( ) : continue yield arg | [
0.3412928283214569,
-0.7783209085464478,
0.4612565040588379,
-0.5500911474227905,
0.2778897285461426,
0.2637159526348114,
-0.7730151414871216,
0.5861981511116028,
-0.6316891312599182,
1.1066240072250366,
0.04426003620028496,
0.22083653509616852,
0.2767958343029022,
0.2919584810733795,
-0... |
def producer ( cond ) : logging. debug ('starting producer thread') with cond : logging. debug ('making resource available') cond. notifyall ( ) | [
1.0130407810211182,
-0.3294477164745331,
0.3573513329029083,
0.6194141507148743,
-0.7269079089164734,
0.5777668356895447,
0.5189325213432312,
0.9165705442428589,
0.05830422788858414,
0.30971717834472656,
0.4671371877193451,
0.7143069505691528,
0.4428085386753082,
0.3349093198776245,
-0.0... |
def get _ order _ item _ by _ name ( self, order _ item _ name : str, resource _ group _ name : str, expand : optional [ str ] = none, * * kwargs : any ) - > _ models. orderitemresource : api _ version = self. _ get _ api _ version ('get _ order _ item _ by _ name') if api _ version = ='2020 - 12 - 01 - preview': from.... | [
-0.9550844430923462,
-0.40171489119529724,
0.8746668100357056,
0.4573421776294708,
-1.00321364402771,
-0.32287538051605225,
-0.2834066152572632,
-1.2085658311843872,
-0.08060891181230545,
0.3584098219871521,
0.11194037646055222,
-0.02153531275689602,
-0.533979058265686,
-0.1744967401027679... |
def _ _ eq _ _ ( self, other ) : if isinstance ( other, c2profileparameters ) : return self. _ name = = other. name and self. _ c2 _ profile = = other. c2 _ profile return false | [
-0.4253689646720886,
-0.84711092710495,
0.5788532495498657,
0.4683513343334198,
0.25447002053260803,
0.9055690169334412,
0.2951093018054962,
-1.440294861793518,
0.08597695082426071,
0.34559574723243713,
-1.101511001586914,
0.43056467175483704,
-0.5774974822998047,
-0.2819760739803314,
-0... |
def read _ dpad ( self ) : byte = self. info [ self. p2shape ] & 15 return [ ( byte = = 0 or byte = = 1 or byte = = 7 ), ( byte = = 1 or byte = = 2 or byte = = 3 ), ( byte = = 3 or byte = = 4 or byte = = 5 ), ( byte = = 5 or byte = = 6 or byte = = 7 ) ] ; | [
-1.6444766521453857,
0.2076805979013443,
0.7150880694389343,
-0.3225040137767792,
0.013510387390851974,
0.27845391631126404,
0.024857638403773308,
-0.9366168975830078,
0.2963041663169861,
0.2732072174549103,
-0.5479173064231873,
-0.23477381467819214,
-0.6591623425483704,
-0.011210928671061... |
def test _ progress _ auto _ weighting ( self ) : task1 = statussimulatingtaskproxy ( ) task2 = statussimulatingtaskproxy ( ) ctask = taskcontainer ('tester') ctask. add _ task ( task1 ) ctask. add _ task ( task2 ) self. assertequal ( ctask. progress ( ), 0,'both task progresses are zero, container progress should be z... | [
0.6901019215583801,
0.4638250470161438,
0.7400831580162048,
0.9109827280044556,
0.28760895133018494,
0.6735868453979492,
0.822854220867157,
-0.35451140999794006,
-0.8708939552307129,
-0.32453975081443787,
-0.352944940328598,
-0.67902010679245,
0.06056462228298187,
1.2916491031646729,
0.1... |
def get _ top _ hotels ( arrival _ date, departure _ date, destination, budget, n ) : location = get _ lat _ long ( city = destination ) # uses yiyi's get _ lat _ long helper function if location is none : return none else : url ='https : / / api. sandbox. amadeus. com / v1. 2 / hotels / search - circle'params = dict (... | [
-0.5764508843421936,
0.6035383343696594,
0.6733366250991821,
-0.045221876353025436,
-0.15581382811069489,
-0.722581684589386,
-1.362851858139038,
-0.6458395719528198,
-0.9109832048416138,
0.5489241480827332,
-0.3418234884738922,
0.46822842955589294,
0.43374738097190857,
-0.2656928896903991... |
def aliascheck ( ievent ) : try : cmnd = ievent. txt. split ( ) [ 0 ] alias = aliases. data [ cmnd ] ievent. txt = ievent. txt. replace ( cmnd, alias, 1 ) ievent. alias = alias ievent. aliased = cmnd except ( indexerror, keyerror ) : pass | [
0.010707727633416653,
-1.19142484664917,
0.6120264530181885,
-0.9325317144393921,
0.4808709919452667,
0.9357094168663025,
0.27107104659080505,
1.3601787090301514,
-0.09818689525127411,
0.759495735168457,
-0.13146477937698364,
0.7192871570587158,
-0.6750138401985168,
0.4219212234020233,
0... |
def lap ( self, s, gtype ='tri ', btype = 1 ) : if gtype = ='tri': # sflux _ n = self. sflux _ n # ensure passed array is of the correct length : assert ( len ( s ) = = self. n _ tverts ), " length of array passed to grad is not tri _ verts length " # calculate grad of s : gs = self. grad ( s, gtype ='tri') # calculate... | [
-0.07521568238735199,
-0.0184689499437809,
0.5409732460975647,
-0.44858741760253906,
-0.6809884309768677,
0.18836215138435364,
0.22590751945972443,
-0.21069061756134033,
0.6673344969749451,
0.11199300736188889,
0.12491597980260849,
0.37711402773857117,
-0.7031272649765015,
0.47485741972923... |
def importallrepeatsfromucsc ( infile, outfile ) : pipelineucsc. getrepeatsfromucsc ( dbhandle = connecttoucsc ( ), repclasses = none, outfile = outfile ) | [
0.4861099123954773,
0.23618248105049133,
0.35291194915771484,
0.521583616733551,
0.18413707613945007,
0.20438598096370697,
0.8973033428192139,
0.09420783817768097,
-0.444001168012619,
-0.17511358857154846,
-0.46402299404144287,
0.6822740435600281,
0.33803755044937134,
-0.9503546357154846,
... |
def _ _ eq _ _ ( self, other ) : return np. array _ equal ( self. state, other. state ) | [
-0.6222419738769531,
-0.9985218048095703,
0.521497905254364,
-0.3848096430301666,
0.7476497292518616,
0.48839840292930603,
-0.29033565521240234,
-0.8184648156166077,
0.8371057510375977,
0.2867893576622009,
-0.9402793049812317,
0.6098989844322205,
0.11111106723546982,
-0.6379314661026001,
... |
def read _ dwh _ config ( config _ file _ path ) : config = configparser. configparser ( ) config. read _ file ( open ( config _ file _ path ) ) config _ dict = { " key " : config. get ('aws ','key'), \ " secret " : config. get ('aws ','secret'), \ " dwh _ cluster _ type " : config. get ( " dwh ", " dwh _ cluster _ typ... | [
-0.7161598205566406,
0.2144523710012436,
0.8542798757553101,
-0.9716203808784485,
-0.508581817150116,
0.7229781746864319,
-0.09685489535331726,
-0.06433816254138947,
-1.1651737689971924,
0.640815019607544,
-0.9662790894508362,
0.3825823962688446,
0.09165317565202713,
0.9777092933654785,
... |
def _ _ init _ _ ( self, asset _ class = none, brokers = none, category = none, create _ date = none, currency _ code = none, cusip = none, description = none, exchange = none, id = none, image = none, industry = none, is _ active = none, isin = none, metadata = none, name = none, proxy _ id = none, secondary _ id = no... | [
0.3763902187347412,
-0.3456765115261078,
0.6924765706062317,
-0.4358873665332794,
0.018956609070301056,
-0.7313441634178162,
0.3050711750984192,
-0.47301703691482544,
0.5197846293449402,
0.4361896812915802,
-0.49333852529525757,
0.08950645476579666,
-0.2885749936103821,
-0.2594839632511139... |
def read _ img _ data ( ) : df _ img _ feat = pd. read _ csv ( file _ img _ data, index _ col = 0, header = none ) d _ img _ feat = { k : v for ( k, v ) in zip ( df _ img _ feat. index. tolist ( ), df _ img _ feat. values. tolist ( ) ) } return d _ img _ feat, len ( list ( d _ img _ feat. values ( ) ) [ 0 ] ) | [
-1.096545934677124,
-0.07519977539777756,
0.5337122678756714,
-0.43818777799606323,
-0.6094594597816467,
-0.30959552526474,
0.2236940562725067,
1.135298252105713,
-0.83576899766922,
-0.2913186252117157,
-0.3186301589012146,
0.5268362760543823,
1.0985089540481567,
0.2734479308128357,
0.96... |
def draw _ to _ svg ( self, dwg ) : alines = dwg. add ( dwg. g ( id ='a - { } '. format ( self. arrow _ id ), stroke ='black') ) alines. add ( dwg. line ( start = ( self. a [ 0 ] * mm, self. a [ 1 ] * mm ), end = ( self. b [ 0 ] * mm, self. b [ 1 ] * mm ) ) ) if self. hastip : alines. add ( dwg. line ( start = ( self. ... | [
-0.229970782995224,
0.29557961225509644,
0.8050786256790161,
-0.7600545287132263,
0.08568950742483139,
0.11656863242387772,
-0.12096969783306122,
-0.44264891743659973,
0.9329264760017395,
0.12067180126905441,
0.5077177882194519,
0.23496584594249725,
1.2224665880203247,
-0.02000020071864128... |
def set _ process _ variables ( self, executor ) : self. _ _ thread _ executor = executor self. _ _ q _ in. set _ process _ variables ( executor ) self. _ _ q _ out. set _ process _ variables ( executor ) self. _ _ q _ cancel. set _ process _ variables ( executor ) | [
0.2880108952522278,
-0.566140353679657,
0.4919378459453583,
0.10425916314125061,
-0.47970739006996155,
-0.22812281548976898,
-0.205065056681633,
0.29901358485221863,
-0.23095948994159698,
-0.00037897180300205946,
-0.6271628737449646,
0.3721502125263214,
-0.012627540156245232,
0.83487534523... |
def drawgraphdetails ( graph, component ) : graph. create _ text ( maingraph. maingraphdefaultwidth - 35, 10, fill = " # 72b2d6 ", font = " times 10 italic bold ", text = f " { component } usage " ) positiony = 0 while positiony < maingraph. maingraphdefaultheight : if positiony! = 0 and positiony! = maingraph. maingra... | [
0.36021310091018677,
0.0630754753947258,
0.9648556709289551,
-0.9022769331932068,
0.6608079075813293,
0.11080633103847504,
0.2574167251586914,
-0.034546222537755966,
-0.02490222081542015,
-0.0610731840133667,
0.5489208698272705,
-0.01897783763706684,
-0.2418600171804428,
0.1687035411596298... |
def _ _ init _ create _ chunks ( self, audio _ segment ) : temp _ dir = create _ temp _ dir ( ) normal _ chunks = [ ] overlapping _ chunks = [ ] # create normal and overlapping chunks self. _ _ create _ chunks ( audio _ segment, temp _ dir, normal _ chunks, false ) self. _ _ create _ chunks ( audio _ segment, temp _ di... | [
-0.6146692037582397,
-0.5859411358833313,
0.3970292806625366,
-0.1276012361049652,
0.6840652227401733,
0.4047092795372009,
0.8584511876106262,
0.387952595949173,
-0.48853009939193726,
0.12543095648288727,
0.1286608874797821,
-0.45353755354881287,
0.6647665500640869,
1.1324059963226318,
0... |
def load _ aggregation ( self, agg _ fn, agg _ ids = none ) : with open ( agg _ fn ) as fin : for line in fin : aggs = json. loads ( line. strip ( ) ) docid = aggs ['docid'] del aggs ['docid'] if docid not in self. docs : if self. verbose : print ('[ warn ] doc { 0 } is not loaded yet '. format ( docid ) ) continue sel... | [
-0.03734550252556801,
-0.3507075011730194,
0.4972264766693115,
-0.2706766128540039,
0.34297579526901245,
-0.17459385097026825,
-0.24081671237945557,
0.16058073937892914,
-0.9176180362701416,
0.8598260283470154,
0.14055109024047852,
0.3739461302757263,
0.5134127140045166,
0.510604739189148,... |
def projectfvfile ( fp, proj _ dim = 15 ) : matrix = [ ] # test code # matrix = readvectorfile ('random _ proj _ matrix. txt') # printvectorfile ( matrix ) # sys. exit ( 0 ) sim _ proj _ matrix = { } index = 1 for vector in matrix : # print vector # import pdb ; pdb. set _ trace ( ) sim _ proj _ matrix [ index ] = vect... | [
-0.08147060871124268,
0.6113166213035583,
0.8413708806037903,
0.8020778298377991,
-0.533946692943573,
-0.266008198261261,
1.3236041069030762,
0.42422497272491455,
0.17431500554084778,
0.0877465307712555,
0.492868572473526,
-0.32574114203453064,
-0.6241222620010376,
0.17608052492141724,
-... |
def _ _ str _ _ ( self ) : return f " { self. text [ : 50 ] }... " | [
0.1818050742149353,
-1.1465805768966675,
0.2861063480377197,
-1.2894309759140015,
-0.9775205254554749,
0.06040941923856735,
-0.36621174216270447,
-0.4129893481731415,
0.24668799340724945,
0.21817071735858917,
0.1426476091146469,
1.0962172746658325,
0.07150638848543167,
-0.7492011189460754,... |
def do _ select _ all ( self, * * kwargs ) : _ revision _ id = kwargs ['revision _ id'] _ session = ramstkdatamodel. do _ select _ all ( self ) for _ hardware in _ session. query ( ramstkhardware ). filter ( ramstkhardware. revision _ id = = _ revision _ id ). all ( ) : # we get and then set the attributes to replace a... | [
0.4700452983379364,
0.406282514333725,
0.6053947806358337,
0.10336645692586899,
0.5743377804756165,
-0.4384186863899231,
-0.19028058648109436,
-0.2363671362400055,
-0.10892443358898163,
0.4157833456993103,
0.46177151799201965,
0.08407043665647507,
-0.446627140045166,
0.7287393808364868,
... |
def filter _ clips ( args, save = false ) : print ('filtering clips') annotations = json. load ( open ('data _ gen / anno. json ','r'), object _ pairs _ hook = ordereddict ) df = pd. dataframe ( columns = ['video _ name ','video _ class ','action _ ids ','num _ clips ','clips ','train'] ) for anno in tqdm ( annotations... | [
-0.3239060044288635,
0.27082738280296326,
0.7936546802520752,
-0.1812271624803543,
-0.5052382349967957,
-0.294006884098053,
-0.010662596672773361,
-0.2101680487394333,
-0.029488487169146538,
0.10158293694257736,
0.054972466081380844,
0.9796907901763916,
1.0709809064865112,
-0.4783240854740... |
def _ _ init _ _ ( self, lrate, loss _ fn, in _ size, out _ size ) : super ( neuralnet, self ). _ _ init _ _ ( ) self. lrate = lrate self. loss _ fn = loss _ fn self. in _ size = in _ size self. out _ size = out _ size self. hidden _ unit = nn. linear ( self. in _ size, 128, true ) self. out = nn. linear ( 128, self. o... | [
0.8225826621055603,
0.11637944728136063,
0.715696394443512,
0.5439937710762024,
-0.18495766818523407,
-0.4440448582172394,
-0.6100127696990967,
0.05754534527659416,
-0.20753447711467743,
-0.30829328298568726,
-0.5258433222770691,
0.3813817799091339,
0.27032771706581116,
-0.1933495104312896... |
def mainmenu ( ) : def prompt ( text ) : " " " internal function. prompts user for menu selection. validates data, ensuring user input passed along is an integer in range 1 - 5. : param text string. the prompt text printed to console before the program waits for user input. : return integer in range 1 - 5. " " " try : ... | [
0.13311012089252472,
-0.5260027050971985,
0.7781593799591064,
0.534771203994751,
-0.3332373797893524,
0.33056268095970154,
1.0259793996810913,
-1.018296718597412,
0.48663461208343506,
-0.7997607588768005,
0.22187060117721558,
-0.1823280155658722,
-0.82997727394104,
0.05846359208226204,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.