text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ nodes ( self ) : return [ node ( self, x ) for x in self. redis. smembers ( self. nodes _ key ) ] | [
-1.2328948974609375,
0.15337519347667694,
-0.058543380349874496,
-0.646354079246521,
0.829312801361084,
-0.5925731062889099,
-1.0392428636550903,
0.9090842008590698,
0.21596117317676544,
0.7822199463844299,
-0.46193817257881165,
0.38446521759033203,
0.07675069570541382,
-0.3530287444591522... |
def _ create _ bullet ( self ) : if len ( self. bullets ) < = self. settings. bullets _ allowed : bullet = bullets ( self ) se. bullet _ fire. play ( ) # add the new bullet to the bullets group. self. bullets. add ( bullet ) # if bullet passes outside the screen it will remove bullets. for bullet in self. bullets. copy... | [
-0.26130211353302,
0.5593419671058655,
0.391449898481369,
0.7501285076141357,
0.3043287694454193,
0.20536576211452484,
-0.3979777991771698,
-1.2564009428024292,
0.4770229160785675,
-0.2427896112203598,
0.3488645553588867,
0.0518549419939518,
-1.0063639879226685,
0.3883698284626007,
0.459... |
def setvalues ( self, values ) : if isinstance ( values, dict ) : indices, values = list ( zip ( * values. items ( ) ) ) indices = utils. totuplearray ( indices ) if any ( isinstance ( value, basestring ) for value in values ) : values = list ( map ( str, values ) ) self. _ impl. setvaluestastr ( indices, values, len (... | [
-0.7843993306159973,
0.700181245803833,
0.6834675073623657,
-0.36900049448013306,
0.9227851629257202,
-0.32128506898880005,
-0.2744055688381195,
0.4342750608921051,
-0.034726738929748535,
-0.7432935833930969,
0.7631956934928894,
-0.29377856850624084,
0.5971027612686157,
0.8881038427352905,... |
def identifyavatar ( self, doid ) : if base. cr. doid2do. has _ key ( doid ) : return base. cr. doid2do [ doid ] else : return self. identifyfriend ( doid ) | [
-1.1003667116165161,
-0.22413603961467743,
0.5189061760902405,
0.24197959899902344,
-0.49053317308425903,
0.01933184452354908,
0.3147174119949341,
-1.683546543121338,
1.3589500188827515,
-0.048760976642370224,
0.27428558468818665,
0.4710898697376251,
0.6849953532218933,
0.4538712203502655,... |
def add ( self, item ) : self. push ( item ) | [
-0.3973117470741272,
0.36270859837532043,
0.2797147333621979,
0.6498764753341675,
0.7878988981246948,
1.4215972423553467,
-0.7422853112220764,
-0.2007041871547699,
0.38649874925613403,
-0.17873194813728333,
-0.9055905938148499,
0.3085947036743164,
-0.41638270020484924,
-0.3445360064506531,... |
def setstartindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriuc3iuc2 _ setstartindex ( self, * args ) | [
-0.6091185808181763,
-0.4545094966888428,
0.38297271728515625,
-0.12642794847488403,
0.12646818161010742,
1.1456023454666138,
0.5323582887649536,
0.47044986486434937,
-0.4010255038738251,
-0.07016386836767197,
-1.5066428184509277,
0.8141381144523621,
-0.5302676558494568,
-0.568464100360870... |
def set _ cfg ( self, ns _ key, mtu, dmac ) : ver _ args = [ {'name':'ns _ key ','arg': ns _ key,'t': emunamespacekey }, {'name':'mtu ','arg': mtu,'t':'mtu'}, {'name':'dmac ','arg': dmac,'t':'mac'}, ] emuvalidator. verify ( ver _ args ) dmac = mac ( dmac ) return self. emu _ c. _ send _ plugin _ cmd _ to _ ns ('igmp _ ... | [
-1.3974450826644897,
0.7961964011192322,
0.5148019790649414,
-0.5744490623474121,
-0.2806091606616974,
-0.7228596806526184,
-0.588851809501648,
-0.2621634006500244,
-0.6058976054191589,
0.4547874331474304,
-0.9608874320983887,
0.7706710696220398,
-0.6857978105545044,
0.9757409691810608,
... |
def create _ or _ update _ resource _ request _ notifications ( sender, instance, created, * * kwargs ) : notification = import _ module ('apps. notifications. models'). notification # notify the user notification. objects. filter ( notify _ id = instance. member. id, instance _ id = instance. id ). delete ( ) notifica... | [
0.04375232756137848,
-0.2411167472600937,
0.7510541677474976,
0.5161227583885193,
0.19735434651374817,
0.17002440989017487,
-0.03477142006158829,
0.390960693359375,
-0.02488628216087818,
-0.10362681746482849,
-0.7066748738288879,
0.17365051805973053,
0.7044647336006165,
0.15128707885742188... |
def unarchive _ path ( dest, src, verbose = false ) : assert dest and os. path. isdir ( dest ) assert src and src. endswith ( '. tar') and os. path. isfile ( src ) cmd = ['tar'] cmd. append ('- - extract') if verbose : print'\ nunarchive _ path ( % s, % s )'% ( dest, src ) cmd. append ('- - verbose') cmd. append ('- - ... | [
0.17211288213729858,
0.4298572242259979,
0.8644407391548157,
-0.06442461162805557,
-0.0816962942481041,
0.14652936160564423,
0.18255633115768433,
0.36834242939949036,
-0.17002712190151215,
0.24658595025539398,
0.5014486908912659,
0.27204498648643494,
0.2697066366672516,
-0.5087400674819946... |
def get _ group ( self, group : str ) : if group not in self. groups : raise exception ( f'unkown group { group }') return self. class _ groups [ self. groups. index ( group ) ] | [
-1.0017915964126587,
0.8940785527229309,
0.034932032227516174,
0.25212976336479187,
0.1236630529165268,
-0.4362868368625641,
0.03465070575475693,
-1.627028465270996,
-0.1839185655117035,
-0.24978962540626526,
1.0790867805480957,
1.236984133720398,
-0.08848949521780014,
0.18602703511714935,... |
def _ display _ menus _ buttons ( self ) : self. hit _ button. display _ button ( ) self. hit _ count _ button. display _ button ( ) self. bullet _ left _ button. display _ button ( ) self. target _ miss _ button. display _ button ( ) | [
-0.8197570443153381,
-0.6599777936935425,
0.5495175123214722,
-0.01641288958489895,
0.5611127614974976,
0.6342940926551819,
0.2905541658401489,
0.22136907279491425,
0.08583929389715195,
0.5386395454406738,
-0.38455212116241455,
0.2305246889591217,
0.4867193102836609,
0.6552760004997253,
... |
def read _ fasta ( filename ) : f = open ( filename, " r " ) lines = f. readlines ( ) f. close ( ) keys = [ ] vals = [ ] for l in lines : val = " " if l [ 0 ] = = " > " : keys. append ( l [ 1 : ]. strip ( ) ) vals. append ( " " ) else : vals [ - 1 ] + = " ". join ( l. strip ( ) ) return dict ( zip ( keys, vals ) ) | [
-0.8044021725654602,
-0.7257987856864929,
0.7167314291000366,
-0.6502858996391296,
-1.283703327178955,
-0.35995692014694214,
0.05525599420070648,
1.3832542896270752,
-1.0524866580963135,
-0.004219326190650463,
-0.13064010441303253,
-0.008250441402196884,
0.8710582852363586,
0.6550394892692... |
def name ( self ) : raise notimplementederror ( ) | [
-0.2908332347869873,
-1.0947320461273193,
0.5146737098693848,
0.1707519143819809,
-0.9123941659927368,
1.1867506504058838,
0.27876007556915283,
-0.37803781032562256,
0.21733389794826508,
0.32034245133399963,
-0.96009361743927,
0.07543124258518219,
1.0586895942687988,
0.49133017659187317,
... |
def registration ( request ) : if request. post : errors = models. user. objects. registration _ validations ( request. post ) if len ( errors ) > 0 : request. session [ " errors " ] = errors return redirect ( " / registration " ) else : # create new user new _ user = models. user. objects. create ( first _ name = requ... | [
-0.2850700914859772,
0.8255059719085693,
0.9807701706886292,
1.2517645359039307,
0.5800142884254456,
0.13039115071296692,
0.45026907324790955,
-0.24373428523540497,
0.1886686533689499,
-0.07273978739976883,
0.2464722990989685,
0.08238554745912552,
0.027399983257055283,
0.9299830794334412,
... |
def has _ disklabel ( self, device _ name ) : blivet _ device = self. storage. devicetree. getdevicebyname ( device _ name ) assert blivet _ device. _ type = = " disk " return blivet _ device. format. type = = " disklabel " | [
-0.2572590410709381,
-0.27823445200920105,
0.6389294862747192,
0.47780150175094604,
0.4569040834903717,
0.6912780404090881,
-0.14738735556602478,
-0.3959251344203949,
0.10800858587026596,
0.41104820370674133,
0.10443082451820374,
-0.06829040497541428,
-0.20567992329597473,
0.40027776360511... |
def write _ to _ disk ( self, path : str, add _ timestampe : bool = true ) - > none : if add _ timestampe : time _ stamp = str ( datetime. now ( ) ). replace ('','_') path = path. split ( '.') [ 0 ] path + = time _ stamp try : self. _ database. to _ csv ( path + '. tsv ', sep ='\ t ', index = false ) except exception a... | [
-0.5524433851242065,
0.5987445116043091,
0.7529619932174683,
0.09865649044513702,
0.8084418177604675,
0.649632453918457,
0.06870993226766586,
0.024701334536075592,
-0.5822518467903137,
0.414980947971344,
-0.13032007217407227,
-0.10436996817588806,
-0.05344008654356003,
0.355592280626297,
... |
def test _ get _ steps ( self ) : pass | [
0.5872201919555664,
1.001397728919983,
-0.008426528424024582,
1.8543624877929688,
1.2690081596374512,
0.673417866230011,
0.9020025730133057,
-0.7428661584854126,
-0.4431180953979492,
-1.6155155897140503,
-0.3482935130596161,
-0.22625742852687836,
-0.7864003777503967,
0.4726554751396179,
... |
def opening ( self, kernel _ size = 5 ) : return ( cv2. morphologyex ( self. im, cv2. morph _ open, np. ones ( ( kernel _ size, kernel _ size ) ) ) ) | [
-0.7496616840362549,
0.4053749144077301,
0.5528596043586731,
0.6194973587989807,
-1.3482961654663086,
-0.5015086531639099,
0.1952051967382431,
0.24469786882400513,
1.1204802989959717,
-0.07388431578874588,
0.21938399970531464,
-0.10545649379491806,
-0.37188848853111267,
0.08864358067512512... |
def calc _ additional _ charge ( self, base _ amount, item _ kind, * marge _ other _ charge ) : from serializers import additionalchargeserializer amt = 0. 0 data = [ ] charges = additionalcharge. objects. all _ by _ natural _ key ( self. product. user, item _ kind, self. product. category ) for charge in charges : c =... | [
0.28169336915016174,
-0.650608241558075,
0.5692472457885742,
-0.08186254650354385,
-0.03469201549887657,
-0.5694920420646667,
-0.513314425945282,
-0.6406917572021484,
0.36135610938072205,
-0.1327034831047058,
-0.22385933995246887,
-0.4811224341392517,
-0.10477873682975769,
0.66707855463027... |
def get _ biggest _ groups ( n ) : user = tk. get _ action ('get _ site _ user') ( {'ignore _ auth': true }, { } ) context = {'user': user ['name'] } data _ dict = {'all _ fields': true,'sort':'packages'} groups = tk. get _ action ('group _ list') ( context, data _ dict ) if len ( groups ) > n : return groups [ - 1 : -... | [
-1.0130172967910767,
1.3922463655471802,
0.4483584463596344,
0.4608766436576843,
0.3622477650642395,
-0.33228492736816406,
0.019459931179881096,
-0.6969189643859863,
-0.3018113076686859,
-0.17252132296562195,
-0.13088102638721466,
0.4845268428325653,
-0.20568397641181946,
0.616235971450805... |
def show ( task ) : preview ( task ) | [
0.21602484583854675,
0.8754680752754211,
0.19048874080181122,
0.3423483073711395,
-1.9165321588516235,
0.3518613874912262,
1.0479695796966553,
1.3116061687469482,
0.14207129180431366,
0.2153395712375641,
0.14937905967235565,
1.0987082719802856,
1.4358631372451782,
0.42913779616355896,
-0... |
def agario _ efficiency ( rewards : np. ndarray, episode _ length : int, num _ pellets : int, arena _ size : int ) : g = rewards. sum ( ) pellet _ density = num _ pellets / pow ( arena _ size, 2 ) efficiency = g / ( episode _ length * pellet _ density ) return efficiency | [
0.8193172216415405,
0.9721618890762329,
0.44984427094459534,
-0.27451014518737793,
0.5799527764320374,
-0.07367437332868576,
0.0877855122089386,
0.035223588347435,
0.4793168008327484,
1.6291385889053345,
0.615028977394104,
0.2565275728702545,
0.5987651348114014,
-0.3345176577568054,
1.14... |
async def on _ ready ( self ) : for guild in self. guilds : if guild. name = = self. guild : break print ( f'{ self. user } is connected to the following guild : \ n'f'{ guild. name } ( id : { guild. id } )') rythm _ channel = self. get _ channel ( self. rythm _ channel _ id ) await rythm _ channel. send ( f " { self. ... | [
0.5331730842590332,
-0.3950216770172119,
0.5998485684394836,
-0.5126999020576477,
0.7859495878219604,
-0.5759720206260681,
-0.8419585824012756,
-0.6970354318618774,
0.13298751413822174,
0.7523087859153748,
-0.9966647624969482,
1.421846628189087,
-0.07420162856578827,
0.8923733234405518,
... |
def replacewithspaces ( regex, string ) : def tospaces ( matchobject ) : return " ". join ( [ " " ] * ( matchobject. end ( 0 ) - matchobject. start ( 0 ) ) ) return regex. sub ( tospaces, string ) | [
0.8971293568611145,
-0.5403493046760559,
0.6216596961021423,
0.06957872956991196,
-0.45840489864349365,
-0.2422957718372345,
0.4120177626609802,
0.7336670160293579,
-0.2102966159582138,
-0.17957155406475067,
-0.6422055959701538,
0.6408687233924866,
-0.3528672456741333,
-0.6268864870071411,... |
async def _ get _ lastest _ paste _ ids ( self ) - > list [ str ] : data = await self. _ fetch ( _ pastebin _ archive _ url ) tree = document _ fromstring ( data ) table = tree. find ( ". / / table [ @ class ='maintable'] / tbody " ) # pastebin are stupid. they're blocking us from the # archive page if we scrape too fa... | [
-0.6821538209915161,
0.4828191101551056,
0.5123536586761475,
0.27926674485206604,
-0.11637383699417114,
-0.22466647624969482,
-0.0277022123336792,
0.5016483068466187,
0.5387753844261169,
0.7911794185638428,
-0.29332101345062256,
0.015172421000897884,
-0.4765758514404297,
0.5850715637207031... |
def estimate ( self, item ) : item = str ( item ) h = hashes ( item, self. d, self. packed ) h2 = [ ] for hi in h : v = hi - 1 if hi % 2 = = 0 else hi + 1 h2 + = [ v ] g = self. pub. group. generator ( ) o = self. pub. group. order ( ) elist = [ ] for i, [ hi, hpi ] in enumerate ( zip ( h, h2 ) ) : v1 = self. store [ i... | [
-0.7077349424362183,
0.2111130803823471,
0.5161055326461792,
0.31969112157821655,
-0.3926558196544647,
-0.4597715735435486,
0.21282535791397095,
0.18209663033485413,
-0.4742419719696045,
0.40335333347320557,
-0.6011231541633606,
-0.29920852184295654,
-0.8284948468208313,
0.6976965069770813... |
def get _ observed ( self ) : return self. observed | [
0.26478761434555054,
-1.411291480064392,
0.5004517436027527,
-0.2789756953716278,
0.5390124917030334,
0.6158826351165771,
-0.07850461453199387,
-0.4801124036312103,
-0.125883087515831,
-1.049874186515808,
-1.0218628644943237,
1.0123614072799683,
-0.3587091863155365,
-0.42342960834503174,
... |
def convert _ string _ to _ dict ( string, key = none ) : if string = = " none " : return none string = strip _ quotes ( string ) # convert equals to colons string = string. replace ( " = ", " : " ) string = string. replace ( " ", " " ) string = re. sub ( r'( [ a - za - z / \. 0 - 9 \ - \ + ] [ ^ \ [ \ ], : " } ] * ) '... | [
0.15702830255031586,
-1.0621472597122192,
0.6802468299865723,
-1.079423189163208,
-1.3291218280792236,
-0.9590842723846436,
-0.1405380666255951,
0.3972909450531006,
-0.7783322930335999,
0.5834409594535828,
-0.11827604472637177,
0.5439098477363586,
-0.029563317075371742,
0.5226638317108154,... |
def opacity ( self ) : return self. color [ 3 ] | [
-0.11077265441417694,
-0.508539617061615,
0.26220881938934326,
-0.10627055168151855,
0.6385905146598816,
0.9226427674293518,
0.8717524409294128,
-0.4130592346191406,
0.10566221922636032,
0.11603080481290817,
-0.24079467356204987,
-0.04880029708147049,
0.1471366286277771,
-0.181914001703262... |
def test _ devicemanager _ load _ json _ check _ actions ( device _ manager _ from _ data ) : dm = device _ manager _ from _ data dm. scan ( ) for service in dm. services. values ( ) : assert service. actions is not none | [
-0.38396140933036804,
0.3146146237850189,
0.4848943054676056,
-0.24462644755840302,
-0.04790657386183739,
-0.5959125757217407,
-0.12407108396291733,
-0.9480906128883362,
0.6109262704849243,
-0.7887819409370422,
0.050916433334350586,
0.13375897705554962,
0.21101292967796326,
0.4695207476615... |
def number ( word ) : for n in resourcepool ( ). numbers : if word. startswith ( n [ 1 ] ) : return 1 if word. startswith ( n [ 0 ] ) : # we have adjective - number if word. endswith ('th') : return 2 else : return 1 return 0 | [
-0.2069014608860016,
-0.2245352417230606,
0.6571341753005981,
0.18511871993541718,
-0.24235568940639496,
0.10254312306642532,
0.36072978377342224,
-0.004422771278768778,
-0.22999507188796997,
-0.15859174728393555,
-0.3278213143348694,
0.18521584570407867,
0.015711674466729164,
0.8859758377... |
def eval ( self, program : str ) - > exp : # type : ignore tokens = tokenise ( program ) result = none while tokens : expr = expression _ from _ tokens ( tokens ) # type : ignore result = eval ( expr, self. env ) if result is none : return " " return result | [
-0.006195335183292627,
-0.3246575891971588,
0.4178842306137085,
-0.43023377656936646,
-0.6595977544784546,
0.30847713351249695,
-0.4290224313735962,
0.2170707732439041,
0.10401446372270584,
0.10923202335834503,
-0.2691911458969116,
0.16651201248168945,
-0.6201989054679871,
-0.4411292970180... |
def test _ discover _ platform ( self, mock _ demo _ setup _ scanner, mock _ see ) : assert device _ tracker. domain not in self. hass. config. components discovery. load _ platform ( self. hass, device _ tracker. domain,'demo ', {'test _ key':'test _ val'}, { } ) self. hass. block _ till _ done ( ) assert device _ tra... | [
-0.12101737409830093,
1.1755938529968262,
0.5422099828720093,
0.33532848954200745,
0.6950182318687439,
0.27969837188720703,
0.6542096734046936,
-0.5858756303787231,
0.19516177475452423,
-0.9144231677055359,
-0.5030900239944458,
-0.6169226765632629,
-0.1503254920244217,
1.2322101593017578,
... |
def test _ string _ form _ check ( ) : test _ obj = uvtest ( ) test _ obj. string2 = 1 pytest. raises ( valueerror, test _ obj. check ) | [
0.44087693095207214,
0.24181286990642548,
0.23910029232501984,
0.6012958288192749,
0.32879525423049927,
0.25676724314689636,
0.36552396416664124,
-0.03800050541758537,
-0.41454026103019714,
-0.2964998483657837,
-0.13213829696178436,
0.30098333954811096,
-0.39058932662010193,
0.517805576324... |
async def get _ locked _ coins ( self ) - > dict [ bytes32, walletcoinrecord ] : all _ pending = [ ] pending _ accept = await self. get _ offers _ with _ status ( tradestatus. pending _ accept ) pending _ confirm = await self. get _ offers _ with _ status ( tradestatus. pending _ confirm ) pending _ cancel = await self... | [
-0.026671748608350754,
0.40462926030158997,
0.474867045879364,
-1.2409186363220215,
0.023818781599402428,
-0.7741381525993347,
-0.5271690487861633,
-0.9108731150627136,
-0.018616655841469765,
0.674519956111908,
-0.19425004720687866,
1.300999641418457,
-0.638056218624115,
0.1792263090610504... |
def test _ successful _ update ( self ) : data = {'name':'updated name ','description':'updated testing ','visibility': 0,'difficulty': 0, } response = self. client. post ( self. url, data ) self. assertredirects ( response, reverse ('tasks : home'), status _ code = 302, target _ status _ code = 200 ) # we refresh the ... | [
0.1816202700138092,
-0.23193921148777008,
0.6398501992225647,
0.9881677031517029,
-0.12265769392251968,
1.3339866399765015,
-0.07119894027709961,
0.2670063078403473,
0.29092127084732056,
0.11806584894657135,
-1.130302906036377,
-0.3449161648750305,
0.709537923336029,
-0.1177171990275383,
... |
def _ _ load _ image ( self ) : # pre - process the image for classification image _ arr = image. open ( self. _ _ image _ path ) if self. _ _ sign = = true : # if it is a new image - black letter and white background image _ arr = pil. imageops. invert ( image _ arr ) # make the letter white and the background black i... | [
-1.2974934577941895,
-0.3958669602870941,
0.8142793774604797,
-0.354319304227829,
0.27771398425102234,
0.08208414167165756,
0.09081950783729553,
0.5791398882865906,
0.2876264750957489,
1.0774788856506348,
0.7365296483039856,
0.8463678359985352,
-0.6771243810653687,
1.151741862297058,
1.2... |
def dialog ( self, message ) : box = qmessagebox ( self ) box. settext ( message ) return box | [
0.11963672190904617,
0.2526252269744873,
0.4056389331817627,
-1.0656042098999023,
-1.0007498264312744,
-0.12529949843883514,
-0.17182660102844238,
-0.8622748255729675,
0.5889816284179688,
-1.2799426317214966,
0.0197701845318079,
0.29742589592933655,
-0.4241890013217926,
0.497041791677475,
... |
def crashed ( self ) : return self. health < = 0 | [
0.048388175666332245,
-0.4701445698738098,
0.7708758115768433,
1.5542436838150024,
0.5993642210960388,
1.0281697511672974,
-1.0187536478042603,
-0.2831496298313141,
0.41195929050445557,
-0.49382680654525757,
0.3142755925655365,
-0.1432492434978485,
-0.8618034720420837,
0.3653915822505951,
... |
def _ _ computefullycoupledratios ( self, fctable ) : temp = copy. deepcopy ( fctable ) temp [ np. diag _ indices _ from ( temp ) ] = 0 # temp [ np. tril _ indices _ from ( temp ) ] = 0 fcpairs = np. where ( temp = = 1 ) npairs = len ( fcpairs [ 0 ] ) nrxns = self. numberofreactions tempgem = self. gem. copy ( ) fcrati... | [
-0.40499529242515564,
0.6389579176902771,
0.5887302160263062,
0.24118702113628387,
0.5670508742332458,
-1.2865487337112427,
0.44764629006385803,
0.0699274018406868,
0.06551690399646759,
0.2677008807659149,
0.16369210183620453,
-0.28506073355674744,
-0.051559362560510635,
0.2005379348993301... |
def testresolvequerywithunknownpaths ( self ) : with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. resolvequery ( session,'unknown / tag = 26') error = yield self. assertfailure ( deferred, tnonexistenttag ) self. assertequal ('unknown / tag ', error. path ) | [
0.25019440054893494,
0.5735260844230652,
0.40755248069763184,
0.2509795129299164,
0.9397410750389099,
0.12327709048986435,
-0.18615654110908508,
-0.13805943727493286,
-0.4005163311958313,
-1.1960663795471191,
-0.3715217113494873,
-1.4096899032592773,
0.5893983244895935,
0.6521040201187134,... |
def delete _ deployment ( self, name, config = none, endpoint = none ) : final _ config = { " region _ name " : self. region _ name, " archive " : false, " synchronous " : true, " timeout _ seconds " : 300, " assume _ role _ arn " : self. assumed _ role _ arn, } if config : self. _ apply _ custom _ config ( final _ con... | [
-0.10041613131761551,
-0.16738134622573853,
0.6734612584114075,
-0.35538676381111145,
-0.24583379924297333,
-0.46268346905708313,
0.008672324940562248,
1.1121665239334106,
0.6249021887779236,
1.337253451347351,
-0.3614765405654907,
0.2432660013437271,
0.10112465173006058,
0.260810196399688... |
def respond ( self, statement, min _ confidence = 0 ) : responses = self. find _ responses ( statement ) resp = responses [ 0 ] self. say ( resp ) | [
0.33918073773384094,
-1.1148383617401123,
0.3554045259952545,
0.3363354802131653,
0.22656972706317902,
-0.4982561767101288,
-0.34615227580070496,
-0.7118287086486816,
1.4053270816802979,
-0.4467528462409973,
0.2840665578842163,
0.1580859124660492,
-0.9343951344490051,
-0.15254716575145721,... |
def update ( self ) : self. _ _ update _ outputs _ and _ cost ( ) self. _ _ updateweights ( ) self. _ _ updatebiases ( ) | [
-0.44067755341529846,
-1.036157250404358,
0.3559240996837616,
0.7856839895248413,
-0.22182005643844604,
0.0773998573422432,
0.356821209192276,
-0.30382877588272095,
-0.9176439642906189,
0.34103941917419434,
0.30832698941230774,
-0.26907262206077576,
-0.2759248912334442,
0.8877074718475342,... |
def load _ graphs ( files = [ ], pathname = none ) : if not pathname is none : for infile in glob. glob ( os. path. join ( pathname,'*. pickle') ) : files. append ( infile ) models = { } for infile in files : f = open ( infile,'r') m _ name = infile [ infile. rfind ('/') + 1 : ]. rstrip ( '. pickle') models [ m _ name ... | [
-0.5207083821296692,
0.6736510992050171,
0.8381357789039612,
0.4689662456512451,
-0.28632137179374695,
-0.05101073160767555,
0.7357857823371887,
-0.20799295604228973,
-1.284907579421997,
0.922850489616394,
-0.8490872979164124,
-0.8740134239196777,
-0.5595769286155701,
-0.4087057411670685,
... |
def host ( self ) : return self. _ data. get ('summary _ fields ', { } ). get ('host') | [
-0.4221145510673523,
0.49725013971328735,
0.40006330609321594,
0.00444477004930377,
0.0183414313942194,
1.2801425457000732,
0.21428565680980682,
0.32512202858924866,
-0.4303681552410126,
0.09938255697488785,
0.2743890583515167,
0.01513544749468565,
-0.3132721483707428,
-1.55581796169281,
... |
def desktop _ environment _ setup ( self, desktop _ environment ) : # many implementations do nothing | [
-1.039076805114746,
0.3786756694316864,
0.39517080783843994,
0.3593238294124603,
0.06999951601028442,
0.6466806530952454,
1.0282061100006104,
-0.14846408367156982,
0.38032054901123047,
-0.3326411545276642,
-0.12284401804208755,
-0.4354333281517029,
0.5756736397743225,
1.368949055671692,
... |
def get _ string ( dump _ fn, routines, prefix = " file ", * * kwargs ) : output = stringio ( ) dump _ fn ( routines, output, prefix, * * kwargs ) source = output. getvalue ( ) output. close ( ) return source | [
-0.08070965111255646,
0.33294492959976196,
0.20500679314136505,
-0.4793379604816437,
-0.9117864370346069,
-0.6217465400695801,
0.11820440739393234,
-0.4362003803253174,
-0.42053329944610596,
-0.6733067035675049,
-0.08521958440542221,
0.1396838128566742,
0.2542712688446045,
-1.0364580154418... |
def test _ 504 _ kruskal _ unmatched ( self ) : np. random. seed ( 987654321 ) x _ parms = [ 1. 7, 1 ] z _ parms = [ 0. 8, 1 ] x _ input _ array = st. norm. rvs ( * x _ parms, size = 100 ) y _ input _ array = st. norm. rvs ( * x _ parms, size = 100 ) z _ input _ array = st. norm. rvs ( * z _ parms, size = 100 ) alpha =... | [
0.0034143845550715923,
-0.326107919216156,
0.612594485282898,
-0.31880491971969604,
-0.23357971012592316,
0.8963775038719177,
1.0802850723266602,
-0.5685121417045593,
-0.7164180278778076,
-0.06832943111658096,
0.4645945727825165,
0.3950980305671692,
-0.8832711577415466,
0.7614877820014954,... |
def append _ ext ( id ) : return str ( id ) + ". jpg " | [
-0.3288082778453827,
-0.8217683434486389,
0.47584789991378784,
0.0037758024409413338,
-1.451028823852539,
0.22153975069522858,
-1.4956458806991577,
-0.11569499969482422,
1.6703262329101562,
0.15494924783706665,
-0.03010803461074829,
0.5785378813743591,
0.22022269666194916,
0.94413858652114... |
def recursive _ items ( dictionary ) : stack = [ dictionary. items ( ) ] while stack : first = stack. pop ( 0 ) for key, value in first : if isinstance ( value, dict ) : stack. append ( [ ( ( key, 0, ikey ), ival ) \ for ikey, ival in value. items ( ) ] ) elif isinstance ( value, ( list, tuple ) ) : j = - 1 for i in va... | [
-1.2087562084197998,
0.9461084008216858,
0.7420286536216736,
0.1506165862083435,
-0.8596361875534058,
-0.17899860441684723,
0.08443243056535721,
-0.027759214863181114,
-0.213405579328537,
-0.19369719922542572,
-0.27071067690849304,
-0.9443355798721313,
0.23387449979782104,
0.50893855094909... |
def deposit _ search ( request ) : if request. method = ='post': # get search key data from search form search _ value = request. post. get ('search _ value') print ( " = = = = = = = = = = = = = = = = = = = = = = = = " ) # get all requirements in deposit status if request. user. has _ perm ('customer. customer _ view _... | [
0.04465906322002411,
0.1273464858531952,
0.9482845664024353,
0.4460202753543854,
-0.25237882137298584,
0.7755226492881775,
0.9746606945991516,
0.4040325880050659,
-0.6138139367103577,
0.5796456336975098,
0.5197864770889282,
-0.16973502933979034,
0.2520889639854431,
1.007180094718933,
0.0... |
def closeevent ( self, event ) : if self. ipr is not none : if self. ipr. isactive ( ) : self. ipr. killrender ( ) self. _ _ remove _ aton _ overrides ( ) self. _ _ remove _ callbacks ( ) self. setparent ( none ) self. deletelater ( ) self. destroy ( ) | [
0.4886453151702881,
-0.25361037254333496,
0.6267836093902588,
0.25018858909606934,
-0.566283106803894,
-0.026928458362817764,
0.14368250966072083,
0.007442323025316,
0.3918286859989166,
-0.5725260376930237,
0.14200808107852936,
-0.8531280755996704,
-1.350567102432251,
0.4470232427120209,
... |
def nearby _ agents ( location : tuple, agents : dict [ str, dict ] ) - > dict [ str, dict ] : neighbors = { label : agent for label, agent in agents. items ( ) if is _ neighbor ( agent ['location'], location ) } return neighbors | [
-0.4106570780277252,
-1.7619744539260864,
0.2539215087890625,
-0.49434757232666016,
-1.1315933465957642,
-0.03568728268146515,
-0.9080154299736023,
0.21388675272464752,
-0.4794120192527771,
1.3491761684417725,
-0.4466401934623718,
-0.298334538936615,
0.42385825514793396,
-0.102937512099742... |
def testleaseduration ( self ) : n = nat. nat ( dmroot = devicemodelroot ( ) ) p = n. portmapping ( ) p. leaseduration = 0 # should succeed self. assertraises ( valueerror, setattr, p,'leaseduration ', 1 ) | [
0.37666216492652893,
0.45912134647369385,
0.35383814573287964,
-0.2929036319255829,
-0.10659221559762955,
1.5162992477416992,
-0.23432283103466034,
0.2615118622779846,
0.567939817905426,
-0.14951466023921967,
-0.13517510890960693,
0.22894197702407837,
0.4655648469924927,
0.8241922855377197... |
def update _ row ( self, cursor, values ) : if not isinstance ( cursor, arcpy. da. updatecursor ) : raise typeerror ('invalid cursor') cursor. updaterow ( values ) | [
-0.7917691469192505,
0.2930569350719452,
0.12558813393115997,
0.5124324560165405,
-0.58254474401474,
0.056567635387182236,
-0.29117605090141296,
0.31767305731773376,
0.1422944962978363,
-0.17050990462303162,
0.5823367238044739,
0.0908065065741539,
0.435268372297287,
0.8889127373695374,
0... |
def _ attack ( self ) : super ( ). _ attack ( ) self. _ add _ ground _ directed _ force ( self. _ attack _ strength, self. my _ dir ( ) ) mes = basemessage ( sermess. messagetype. orange _ roll, sermess. target. orange _ player + str ( self. id ) ) server. get _ instance ( ). send _ important _ mes _ all ( mes ) timer.... | [
-0.8308490514755249,
-0.1743927299976349,
0.4890531301498413,
-0.0892576053738594,
0.6874313354492188,
-0.17669568955898285,
0.44328436255455017,
-0.12240400165319443,
-0.29717016220092773,
-0.3386032283306122,
-0.668835461139679,
0.5854794979095459,
-0.3162740468978882,
0.1909078955650329... |
def discard _ letters ( self ) : try : # checks if the letters cand be discarded self. gm. attempt _ discard _ letters ( self. user _ input. get ( ) ) # updates widgets self. log _ window. insert ( end, " \ n { } discarded :'{ }'". format ( self. gm. get _ active _ player ( ) [ " name " ], self. user _ input. get ( ). ... | [
-0.30434152483940125,
-0.5515058636665344,
0.6769302487373352,
-1.0450267791748047,
-0.16605141758918762,
0.685508131980896,
0.426347941160202,
-0.15055696666240692,
0.10469561815261841,
0.748857319355011,
-0.09688686579465866,
0.8322314620018005,
-1.1891090869903564,
0.6371272802352905,
... |
def _ generate _ page _ link ( self, url _ sulfix : str, page _ id : str ) - > str : page _ number = page _ id. split ('_') [ - 1 ] page _ link = f'{ url _ sulfix } { page _ number }. jpg'return page _ link | [
-0.5173910856246948,
-0.17149049043655396,
0.4338626265525818,
-0.03575669229030609,
0.6562454700469971,
-0.00037746925954706967,
-0.7738511562347412,
0.9022585153579712,
0.12422950565814972,
0.07858128100633621,
0.356224000453949,
0.48731163144111633,
0.48007121682167053,
0.19859316945075... |
def test _ create _ conflict ( self ) : work _ entry _ 1 = self. create _ work _ entry ( datetime ( 2018, 10, 10, 9, 0 ), datetime ( 2018, 10, 10, 12, 0 ) ) self. assertnotequal ( work _ entry _ 1. state,'conflict ', " it should not conflict " ) work _ entry _ 2 = self. create _ work _ entry ( datetime ( 2018, 10, 10, ... | [
-0.2184170037508011,
0.2870209515094757,
0.773105263710022,
0.49489113688468933,
1.6492061614990234,
0.8945878744125366,
0.4219796061515808,
-0.16037827730178833,
-0.16896569728851318,
-0.04368685930967331,
-0.8759724497795105,
-0.8904696702957153,
-0.5261988639831543,
-0.14844465255737305... |
def map _ repo _ to _ labels ( repo, final _ labels, non _ destructive = true ) : log. info ( " fetching initial labels... " ) initial _ labels = { label. name. casefold ( ) : label for label in repo. get _ labels ( ) } log. success ( f " done. found { len ( initial _ labels ) } labels. " ) log. info ( " parsing final ... | [
-0.8083356618881226,
-0.5953720808029175,
0.6965662240982056,
-0.5884857773780823,
1.0387800931930542,
0.2838861346244812,
-0.37700697779655457,
-0.357148140668869,
0.03802850469946861,
1.1311405897140503,
-0.015999983996152878,
-0.007729504257440567,
0.21474459767341614,
0.064525485038757... |
def base _ point ( self ) : return jacobianpoint ( self, self. gx, self. gy ) | [
0.8392897248268127,
-1.462501883506775,
0.46720314025878906,
-0.1665618121623993,
0.18624761700630188,
0.9461011290550232,
0.3391156494617462,
-1.0087504386901855,
-0.010203835554420948,
0.04932984709739685,
0.2881605625152588,
0.4470054507255554,
-0.5236810445785522,
-0.8597859144210815,
... |
def get _ url ( self ) : return self. url | [
-0.159519225358963,
-0.48068538308143616,
0.12447135895490646,
0.2795894742012024,
0.743719220161438,
0.862874448299408,
0.30610936880111694,
0.674027144908905,
-0.009066364727914333,
-0.78783118724823,
0.08108331263065338,
0.6870018839836121,
-0.5648038983345032,
-0.21417951583862305,
-... |
def game _ 4 ( ) : choice _ firstinoffice _ safebox = input ( " " " * now, would you like to : \ n 2. check out the exit 3. go to the lobby \ n > " " " ) if choice _ firstinoffice _ safebox = = str ( 2 ) : print ( " % " * 80 ) print ( " " " the exit is locked and it requires a valid user's fingerprint to open. " " " ) ... | [
0.3079897165298462,
0.2745836079120636,
0.7037602066993713,
0.9225572347640991,
0.4863646328449249,
0.6625552773475647,
0.49579766392707825,
-0.5741868019104004,
-0.6212724447250366,
0.008935017511248589,
-0.24765445291996002,
0.7543684840202332,
-0.47322720289230347,
-0.005863815080374479... |
def all ( self ) : items = [ ] for path in self. allpaths : if os. path. isdir ( path ) : items. append ( dir ( path ) ) else : items. append ( file ( path ) ) return items | [
-0.05563295632600784,
-0.3352625370025635,
0.457491397857666,
2.0147202014923096,
0.18755295872688293,
0.6646409630775452,
-0.029138702899217606,
1.0988959074020386,
0.7298796772956848,
-0.7228049635887146,
0.5343397259712219,
-0.29500073194503784,
-0.10359895974397659,
0.9440900683403015,... |
def init _ default _ storage _ path ( ) : try : uri = current _ app. config ['base _ files _ location'] if uri. startswith ('/') and not os. path. exists ( uri ) : os. makedirs ( uri ) loc = location ( name = " default ", uri = uri, default = true ) db. session. add ( loc ) db. session. commit ( ) return loc except exc... | [
0.04168367385864258,
0.549535870552063,
0.6543078422546387,
0.6644529700279236,
0.7734171748161316,
0.22952847182750702,
0.8859740495681763,
-0.12283170968294144,
-0.6244404911994934,
-0.1099228784441948,
-0.156757652759552,
-1.534716010093689,
-1.0737709999084473,
-0.41509899497032166,
... |
def clean _ text ( doc ) : words = re. sub ( " <? /? [ a - z ] +? > | \ n ", " ", doc ) words = tokenize _ text ( words ) words = lemmatize _ text ( words ) words = remove _ stopwords ( words ) doc = [ w for w in words if w. isalnum ( ) ] doc =''. join ( doc ) return doc | [
-0.21578902006149292,
-0.7126932144165039,
0.6364448070526123,
0.19641190767288208,
-1.2728873491287231,
0.24241404235363007,
-0.15481959283351898,
0.8470059633255005,
-0.03236045315861702,
0.6953474879264832,
0.03733670338988304,
-0.35357096791267395,
-0.26307013630867004,
0.7195495963096... |
def translate _ object ( obj, language _ code ) : translations = next ( ( lang for lang in obj. translations if lang. language _ code = = language _ code ), none ) if translations is not none : for key, value in translations. _ _ dict _ _. iteritems ( ) : if ( value is not none and not key. startswith ('_') and hasattr... | [
0.11304978281259537,
-0.24351735413074493,
0.7139196991920471,
-0.774023711681366,
-0.5949172973632812,
-0.8936676383018494,
-0.3102109730243683,
-0.3274206519126892,
0.2642960846424103,
0.5903944969177246,
-0.8281438946723938,
-0.4910968244075775,
0.7076941132545471,
-0.24967753887176514,... |
def monthremover ( time, data ) : for month _ i in range ( 12 ) : # loop over each month month _ index = np. arange ( month _ i, len ( time ), 12 ) # determine the climatology mean per month data _ month = np. mean ( data [ month _ index ] ) # subtract the climatology monthly mean data [ month _ index ] = data [ month ... | [
0.8423268795013428,
-0.054560672491788864,
0.8823956847190857,
-0.747006893157959,
-0.4932667911052704,
1.1680691242218018,
-0.11063214391469955,
0.6564543843269348,
0.15857729315757751,
0.4316765069961548,
0.16622233390808105,
0.47936972975730896,
-0.6427868604660034,
0.2089618444442749,
... |
def get _ field _ type ( self ) : return " data : { } ". format ( self. data _ type ) | [
0.2861051559448242,
0.13639125227928162,
0.5697654485702515,
-1.5472279787063599,
1.286540150642395,
0.7300968170166016,
-0.6318060159683228,
-0.0523199699819088,
0.10052717477083206,
-0.6262206435203552,
-0.6244552135467529,
0.9081032872200012,
-0.08475338667631149,
0.009376251138746738,
... |
def delete ( self, layer ) : resource _ id = self. request. get ('resource _ id') resource = util. getinstance ( model. resource, resource _ id, layer ) if _ isresourcereferenced ( resource ) : raise util. badrequest ('a reference to this resource was found.') # note : may leave an inaccessible orphan blob if delete fa... | [
0.8288936614990234,
-0.5982317328453064,
0.39480793476104736,
-0.04883779212832451,
0.12839341163635254,
0.42522621154785156,
0.6231727600097656,
-0.8115888237953186,
0.007624433375895023,
0.0038400173652917147,
0.1758505403995514,
0.13374623656272888,
-0.26867249608039856,
1.0737367868423... |
def _ _ authenticate ( self, basic _ auth = none ) : try : # call delayed _ _ init _ _ ( ) method from parent class. args, kwargs = self. _ _ delayed _ args super ( jira, self ). _ _ init _ _ ( basic _ auth = basic _ auth, * args, * * kwargs ) # inject cached cookies. for k, v in self. _ _ cached _ cookies. items ( ) :... | [
-1.0761290788650513,
0.1970418095588684,
0.9285025000572205,
0.7254664897918701,
-0.6520432829856873,
-0.5279784202575684,
-0.10535167157649994,
-0.5115832686424255,
-0.27717384696006775,
-0.5437036156654358,
-0.09395572543144226,
-0.7266319394111633,
0.42101767659187317,
0.356831580400466... |
def callback _ query _ start _ quiz ( self, bot : bot, update : update ) - > none : self. logger. info ( " callback query'start _ quiz'from % s ", self. _ log _ user ( update. callback _ query. from _ user ) ) bot. answer _ callback _ query ( callback _ query _ id = update. callback _ query. id, ) with self. db _ sessi... | [
0.10500069707632065,
-1.076930046081543,
0.7156967520713806,
0.47427308559417725,
-0.7599296569824219,
-0.04967902973294258,
0.44880375266075134,
-0.4899824559688568,
0.8030439615249634,
0.007968420162796974,
0.3437943756580353,
0.09108520299196243,
-0.5698524117469788,
-0.2522286772727966... |
def create _ link _ names ( catg, dtype, mtype, ptype ) : link = [ ] discript = [ ] for dtype _ t in ('week ','short ','year ','five ','long') : if dtype = = dtype _ t : this ='' else : this = create _ out _ name ( catg, dtype _ t, mtype, ptype ) if dtype _ t = ='week': text ='one week'elif dtype _ t = ='short': text =... | [
0.1304679960012436,
0.3621201813220978,
0.7217573523521423,
-0.05876345932483673,
-0.6053808331489563,
-0.02039051428437233,
-0.007605327293276787,
-0.14343778789043427,
-0.13068504631519318,
0.18672870099544525,
0.055621564388275146,
0.622203528881073,
0.5217633247375488,
1.01285958290100... |
def setup _ streams ( input _ streams ) : return [ datastream ( data _ type = int, name = " integer _ out " ) ] | [
0.19853836297988892,
-0.2823427617549896,
0.37322235107421875,
-0.14161287248134613,
0.23636813461780548,
-0.5751675367355347,
-0.09653101861476898,
-0.5678421258926392,
0.37930330634117126,
-0.11544160544872284,
-0.72479248046875,
-0.09502741694450378,
-0.597062349319458,
0.98216283321380... |
def build _ whole _ regtree ( text ) : interp = text [ find _ supplement _ start ( text ) : ] part = find _ cfr _ part ( text ) reg _ tree = build _ reg _ text _ tree ( text, part ) interps = build _ interp _ tree ( interp, part ) appendices = appendix _ trees ( text, part, reg _ tree. label ) reg _ tree. children. ext... | [
0.25158870220184326,
0.30051669478416443,
0.7552384734153748,
-1.0306552648544312,
-0.2652066946029663,
-0.18519984185695648,
0.6034238934516907,
0.6690576672554016,
1.0019797086715698,
-0.3772744834423065,
-0.17946401238441467,
0.15233267843723297,
-1.237205982208252,
0.3889392912387848,
... |
def _ dict _ to _ string ( self, d ) : s = ['{ 0 } : { 1 } '. format ( key, self. _ check _ type ( value ) ) for key, value in d. items ( ) ] return ', \ n '. join ( s ) | [
-1.0112117528915405,
-0.8002970218658447,
0.6227695345878601,
-0.8668975830078125,
-0.22682377696037292,
0.40333792567253113,
-0.9482842683792114,
-0.2559003531932831,
0.2669932544231415,
0.8612108826637268,
0.8337722420692444,
0.32884591817855835,
0.7279341220855713,
-0.14806149899959564,... |
def getaccountviewfromemail ( self, email ) : accv = [ accv for accv in self. _ account _ views if accv. email = = email ] if len ( accv ) = = 0 : return none else : return accv [ 0 ] | [
0.4049972891807556,
0.22916153073310852,
0.5606215000152588,
0.16141605377197266,
-0.6358901858329773,
-1.1057673692703247,
0.7724537253379822,
-0.5790984034538269,
0.8263103365898132,
-0.7336724400520325,
1.8945783376693726,
0.9561834931373596,
0.06744852662086487,
-0.10281874239444733,
... |
def infinite ( self, * args ) : return _ topods. topods _ tshape _ infinite ( self, * args ) | [
-0.26527830958366394,
0.4161350131034851,
0.2967032492160797,
-0.2980758547782898,
0.7190035581588745,
0.6885656118392944,
0.06686805188655853,
0.1990317404270172,
-1.0786291360855103,
-0.041733402758836746,
-0.7807897329330444,
-0.2668679654598236,
-0.6605316996574402,
-0.4711323380470276... |
def _ propagate _ replica ( self, replica _ index ) : # create and cache integrator and context if needed. if not hasattr ( self,'_ context') : self. _ cache _ context ( ) # retrieve state. state _ index = self. replica _ states [ replica _ index ] # index of thermodynamic state that current replica is assigned to stat... | [
-0.5281317234039307,
-0.22270289063453674,
0.765174925327301,
-0.3328510820865631,
-0.5141623616218567,
-0.10189753025770187,
0.6407492160797119,
-0.21060876548290253,
0.7503509521484375,
0.050351276993751526,
0.15970902144908905,
0.34286972880363464,
0.05426666885614395,
-0.34313750267028... |
def mqtt _ exit ( ) : # disconnect the mqtt client from the broker local _ vars ['mqtt _ client']. loop _ stop ( ) logger. info ( f " mqtt client disconnect being called " ) local _ vars ['mqtt _ client']. disconnect ( ) | [
0.7533759474754333,
-1.0989617109298706,
0.20565862953662872,
-1.0721333026885986,
-0.23555314540863037,
0.6161150336265564,
-0.5183749794960022,
0.26718005537986755,
-0.7942625880241394,
0.6801514625549316,
0.09395498782396317,
-0.16594181954860687,
-0.7783189415931702,
0.5202356576919556... |
def test _ neg _ metagraph _ split _ and _ merge ( ) : from wbia. algo. graph import demo from wbia. algo. graph. state import incmp, negtv, postv, unkwn, unrev # noqa # create a graph with 4 ccs, with 3 - pos - redun, and no negative edges infr = demo. demodata _ infr ( num _ pccs = 4, pcc _ size = 5, pos _ redun = 3,... | [
-0.24668699502944946,
0.31738749146461487,
0.8230430483818054,
-0.4126201570034027,
-0.07233598083257675,
0.5850852727890015,
-0.03789954632520676,
0.10582899302244186,
0.5392612814903259,
0.10184098780155182,
-0.1517716497182846,
-0.6336027383804321,
-0.8911827206611633,
-0.29383906722068... |
def get _ object ( self ) : return self. api. get _ comment ( self. kwargs [ " comment _ id " ] ) | [
-0.0021953980904072523,
-1.0642573833465576,
0.38896751403808594,
0.1013210266828537,
1.33829927444458,
-0.46687012910842896,
0.060189422219991684,
-0.6464118957519531,
0.24727900326251984,
0.16183573007583618,
0.16163665056228638,
0.6531371474266052,
-0.13195191323757172,
-0.7447724938392... |
def update ( self ) : self. _ _ data. update ( self. _ _ wheel, self. _ _ info ) self. _ _ data _ log. append ( copy. copy ( self. _ _ data ) ) for component in self. _ _ components : ac. glcolor4f ( * colors. white ) component. update ( self. _ _ data ) | [
-0.37873145937919617,
-1.0821667909622192,
0.34651389718055725,
-1.4232038259506226,
0.04802319407463074,
0.4035876393318176,
-0.34443458914756775,
-0.44273272156715393,
-0.3350916802883148,
-0.11212102323770523,
0.14727523922920227,
0.32190680503845215,
0.42404109239578247,
1.046598672866... |
def get _ iurls _ titles _ ratings _ link _ from _ res ( gres ) : infos = gres. json ( ) ['data'] titles = list ( map ( lambda x : x ['title'], infos ) ) gurls = list ( map ( lambda x : x ['images'] ['original'] ['url'], infos ) ) ratings = list ( map ( lambda x : x ['rating'], infos ) ) glinks = list ( map ( lambda x ... | [
-0.8944910168647766,
-0.1353960633277893,
0.5854000449180603,
-1.4198167324066162,
0.04452203959226608,
0.30955538153648376,
-0.8651014566421509,
-0.0975184440612793,
-0.5030545592308044,
0.18155547976493835,
-0.6542266011238098,
-0.1811085194349289,
0.2549712657928467,
-0.2026311457157135... |
def test _ io _ error ( db _ update _ connect ) : with pytest. raises ( ioerror, match = r " file does not exist. " ) : url _ parser. store ( db _ update _ connect, " files / test1. txt " ) | [
0.35555246472358704,
0.13694284856319427,
0.36243054270744324,
0.2959291338920593,
1.2950904369354248,
1.2392864227294922,
0.46931639313697815,
0.9687137007713318,
-1.2338550090789795,
-0.14624379575252533,
-0.3509741425514221,
-0.7951453924179077,
-0.21376200020313263,
-0.0653194114565849... |
def setmenu ( self, menu ) : raise notimplementederror | [
-1.4810826778411865,
-0.34451568126678467,
0.3752453029155731,
1.256771206855774,
0.39336729049682617,
0.4418588876724243,
-0.40902096033096313,
0.4730844497680664,
0.5023468732833862,
-0.9104647040367126,
-0.409041166305542,
0.3032291829586029,
-0.11295551806688309,
1.2592741250991821,
... |
def test _ find _ series _ glob _ expansion ( self ) : query = query ('{ % s }'% ( self. metric _ prefix ) ) nodes = [ node. name for node in self. finder. find _ nodes ( query ) ] self. asserttrue ( self. metric _ prefix in nodes, msg = " node list does not contain prefix'% s'- % s " % ( self. metric _ prefix, nodes )... | [
0.7988857626914978,
1.3699818849563599,
0.5911323428153992,
-0.24780836701393127,
0.11955507844686508,
0.5509111285209656,
0.2294457107782364,
-0.8222542405128479,
-0.0006850644713267684,
0.1447439342737198,
0.6464259624481201,
0.25873416662216187,
-0.03880361467599869,
0.249563068151474,
... |
def predict _ proba ( self, dataset ) : return self. ridge. predict _ proba ( dataset ) | [
0.5600103139877319,
0.0930885374546051,
0.30793508887290955,
0.22153493762016296,
0.22743381559848785,
-0.19102659821510315,
-0.8249388337135315,
-0.009086289443075657,
-0.7178114056587219,
0.27830055356025696,
1.0530178546905518,
0.15878254175186157,
-0.24777942895889282,
0.01566794328391... |
def decrypt ( self, data : bytearray ) - > bytearray : if not isinstance ( data, ( bytes, bytearray ) ) : self. clear ( ) raise gostciphererror ('invalid ciphertext data') gamma = bytearray ( ) result = bytearray ( ) for i in range ( get _ num _ block ( data, self. block _ size ) ) : gamma = self. _ cipher _ obj. encry... | [
-0.3171459436416626,
0.5361398458480835,
0.9351844191551208,
0.11354680359363556,
-0.11857341229915619,
-0.5983654260635376,
1.112410306930542,
-0.38592323660850525,
0.4397360682487488,
0.30371519923210144,
-0.9920124411582947,
0.14299064874649048,
-1.4353010654449463,
0.17163561284542084,... |
def test _ valid _ read ( self ) : valid1 ='e000100000026 { " error " : " unknown operation \ " echo \ " " }'message = read _ message ( valid1, _ proto _ version ) self. assertisinstance ( message, errorresultmessage ) self. assertequal ( message. request _ id, " 0001 " ) self. assertequal ( message. payload,'{ " error... | [
-0.1496955007314682,
0.15184834599494934,
0.6559857130050659,
0.39572516083717346,
-0.08594518154859543,
0.4996360242366791,
-0.15500405430793762,
-0.4553704559803009,
0.24705465137958527,
-1.1434820890426636,
0.44745227694511414,
0.07933753728866577,
-0.4877460300922394,
-1.06652760505676... |
async def stop _ cover ( self, device _ id : str ) : await self. _ send _ zone _ create _ request ( device _ id, " stop " ) | [
-1.1479668617248535,
0.11374693363904953,
0.23144127428531647,
1.013689398765564,
0.0532006099820137,
0.8459653258323669,
0.8976488709449768,
-0.4561661183834076,
0.4773854613304138,
0.2640833854675293,
-0.7126681804656982,
0.6379141211509705,
-0.1787429302930832,
0.041687965393066406,
0... |
def main ( argv ) : files = flags ( argv ) [ 1 : ] # vendor implementations must be named correctly, i. e. iosdevice. vendor _ classname = flags. vendor. lower ( ). capitalize ( ) +'device'class _ path = '. '. join ( [ flags. vendor. lower ( ), vendor _ classname ] ) pusher = checkflags ( files, class _ path ) if not f... | [
-0.08670163154602051,
0.485709011554718,
0.9361906051635742,
1.019079566001892,
0.5008503794670105,
-0.3419957756996155,
0.935246467590332,
0.09625435620546341,
-0.32171639800071716,
0.31498652696609497,
0.3809221386909485,
-0.04788167402148247,
0.041473664343357086,
0.6117108464241028,
... |
def set _ data _ from _ numpy ( self, input _ tensor : ndarray [ t. any ] ) - > none : | [
-0.1049581989645958,
-0.35888996720314026,
0.28229305148124695,
-0.24898691475391388,
0.795667290687561,
0.9260803461074829,
0.034108035266399384,
-0.4892421066761017,
0.22793245315551758,
0.11933920532464981,
-0.4469654858112335,
1.2439602613449097,
0.8007835745811462,
-0.3041739165782928... |
def gauss ( alpha, beta ) : from scipy. linalg import eig _ banded a = np. vstack ( ( np. sqrt ( beta ), alpha ) ) x, v = eig _ banded ( a, lower = false ) w = beta [ 0 ] * sp. real ( sp. power ( v [ 0, : ], 2 ) ) return x, w | [
0.6892603039741516,
-0.7075974345207214,
0.3409729599952698,
-0.8043192028999329,
0.46946078538894653,
0.03949999436736107,
-0.49029549956321716,
0.0719088539481163,
-0.21041208505630493,
0.6128730177879333,
-0.07516282051801682,
0.6665648818016052,
-0.02795090712606907,
1.0110608339309692... |
def test _ streamstartednoto ( self ) : streamerrors = [ ] xs = self. xmlstream xs. sendstreamerror = streamerrors. append xs. makeconnection ( self ) xs. datareceived ( " < stream : stream xmlns ='jabber : component : accept'" " xmlns : stream ='http : / / etherx. jabber. org / streams'> " ) self. assertequals ( 1, le... | [
0.4418579041957855,
0.21288996934890747,
0.4683610498905182,
-0.46372565627098083,
0.40899619460105896,
0.1428702175617218,
0.1331704705953598,
0.20227766036987305,
0.2553076446056366,
-0.7920299172401428,
-0.6790077090263367,
0.7398377656936646,
-0.08032736927270889,
0.4895710349082947,
... |
def loop _ switch ( self, next _ loop : str ) : if next _ loop = = " gameloop " : self. current _ loop = gameloop ( ) elif next _ loop = = " startloop " : self. current _ loop = startloop ( ) elif next _ loop = = " scoreloop " : self. current _ loop = scoreloop ( ) elif next _ loop = = " exit " : self. running = false | [
-0.49381154775619507,
-0.3939076364040375,
0.6664935350418091,
0.18103379011154175,
-0.19475433230400085,
1.3273475170135498,
-0.543082594871521,
-0.7474012970924377,
-0.20153231918811798,
1.0322599411010742,
-0.28872203826904297,
0.3235400319099426,
-0.808714747428894,
0.05240438133478165... |
async def async _ setup _ entry ( hass : homeassistanttype, config _ entry : configtype, async _ add _ entities ) : entities _ to _ create = hass. data [ data _ ampio ] [ binary _ sensor. domain ] unsub = async _ dispatcher _ connect ( hass, signal _ add _ entities, functools. partial ( discovery. async _ add _ entitie... | [
0.30718088150024414,
0.4023529291152954,
0.4382399022579193,
-0.18495874106884003,
0.9726475477218628,
-0.086781807243824,
-0.1221066489815712,
-0.18192195892333984,
0.24650150537490845,
0.05646267160773277,
-0.5604065656661987,
0.17398566007614136,
0.8563024401664734,
0.9274532794952393,
... |
def scrape _ rankings ( driver, url, ranking _ headers, bio _ headers ) : # use selenium to load first n rows of table and scroll down to the nth row to load the rest of the rows driver. get ( url ) table = driver. find _ element _ by _ xpath ( " / / * / table [ @ id ='ranking - table'] " ) last _ row = table. find _ e... | [
-0.8999993801116943,
0.7470963001251221,
1.1900960206985474,
-0.13686122000217438,
0.13091802597045898,
-0.6264734864234924,
0.6388928294181824,
-0.17944809794425964,
-0.21364590525627136,
0.6581043004989624,
0.371286004781723,
-0.32462936639785767,
0.22376646101474762,
-0.1868346929550171... |
def update _ visibility ( widget ) : if widget is none or not hasattr ( widget, " actions " ) : return visible = false for action in widget. actions ( ) : if not action. isseparator ( ) and action. isvisible ( ) : visible = true break if isinstance ( widget, q. qtoolbar ) : simplify _ separators ( widget ) widget. setv... | [
-0.150369331240654,
0.002593614859506488,
0.5839993953704834,
0.16496197879314423,
-0.541902482509613,
-0.1203342005610466,
0.10137101262807846,
0.3360109031200409,
0.7206729054450989,
0.45380711555480957,
0.14624528586864471,
-1.4718941450119019,
0.4128013253211975,
1.2229747772216797,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.