text
stringlengths
25
2.19k
embedding
listlengths
768
768
def parse _ repeating ( scanner, repeating _ parser, next _ token ) : repeating _ parser _ results = [ ] try : while true : start _ token = scanner. peek ( ) repeating _ parser _ results + = [ repeating _ parser ( scanner ) ] except parseerror as error : if scanner. peek ( )! = start _ token : # error was a legitimate ...
[ -0.1374906748533249, 0.06013002619147301, 0.5634008049964905, 0.22793510556221008, 0.01639276184141636, -0.1396319568157196, -0.8046516180038452, 0.0671577975153923, -0.10442177951335907, 0.1713056117296219, -0.6476602554321289, 0.05739579349756241, -0.2376793473958969, 0.45349568128585815...
def _ make _ request ( self, endpoint, data ) : data. update ( {'dockid': self. dock _ id } ) url = self. base _ url % endpoint headers = {'content - type':'application / json'} req = urllib2. request ( url, data = json. dumps ( data ), headers = headers ) print ('opening url :'+ url ) return urllib2. urlopen ( req )
[ -0.9234756231307983, 0.0986587181687355, 0.6260011196136475, -0.3525351285934448, -0.013988415710628033, -0.11809050291776657, -0.8786696195602417, -0.22358156740665436, -0.21742869913578033, -0.6867780685424805, 0.4718516767024994, 0.45807385444641113, 0.02529577724635601, -0.551382660865...
def test _ libvirt _ rbd _ driver _ auth _ enabled _ flags _ secret _ uuid _ fallback ( self ) : libvirt _ driver = net. libvirtnetvolumedriver ( self. fake _ host ) connection _ info = self. rbd _ connection ( self. vol ) secret _ type ='ceph'connection _ info ['data'] ['auth _ enabled'] = true connection _ info ['dat...
[ 0.9285642504692078, -0.5226255059242249, 0.5085297226905823, 0.11052524298429489, 1.0386549234390259, 0.039880264550447464, -0.2957640588283539, 0.14452388882637024, 0.05862976983189583, 0.0012613737490028143, -0.38406673073768616, -0.08663779497146606, -0.6798077821731567, 0.2879455685615...
def activate _ debug _ logger ( ) : logging. basicconfig ( format ='( % ( levelname ) s ) % ( message ) s ', level = logging. debug )
[ 0.16873441636562347, -0.87615966796875, 0.4997195899486542, -0.2490975558757782, 0.2532406747341156, -0.5229470133781433, -0.9207102656364441, 0.08148340880870819, -0.48978957533836365, -0.046620264649391174, -0.6376344561576843, 0.7054710984230042, 0.042709652334451675, 0.885715901851654,...
def calc _ total ( self ) : total = 1 begin = ( 1 < < self. state _ word _ len ) - len ( self. state _ tran ) + 1 end = ( 1 < < self. state _ word _ len ) + 1 for i in xrange ( begin, end ) : total * = i return total
[ -0.20722973346710205, 0.5875441431999207, 0.49613502621650696, -0.9833011031150818, -0.16105404496192932, -0.7778806090354919, 1.09169602394104, 0.1841427981853485, 0.419650673866272, 1.0484412908554077, -0.9500879645347595, 0.03666960820555687, -0.6031538248062134, -0.9534475803375244, ...
def synth _ coeffs ( self, time, *, dim = none, deriv = none, extrapolate = none ) : if ( self. coeffs is none ) or ( self. coeffs. size = = 0 ) : raise valueerror ( f'coefficients of " { self. name } " are missing.') # handle optional argument : dim if dim is none : dim = self. dim elif dim > self. dim : warnings. war...
[ -0.35326337814331055, 0.42698460817337036, 0.7909908294677734, 0.21164557337760925, -0.006715298630297184, -0.34688758850097656, -0.28429800271987915, -0.3726513385772705, -0.4219329357147217, -0.5473245978355408, -0.45070818066596985, 0.3023069202899933, 0.027251752093434334, -0.125483825...
def shuffle _ dominoes ( dominoes ) : deck = [ ] for i in range ( 0, 27 ) : deck. append ( i ) random. shuffle ( deck ) for i in range ( 7 ) : dominoes [ deck. pop ( ) ] ['assigned'] ='computer'dominoes [ deck. pop ( ) ] ['assigned'] ='player'return dominoes
[ -1.2292944192886353, 0.41287049651145935, 0.6031530499458313, -0.36600616574287415, -0.5687187910079956, -0.03799230977892876, -0.01641632243990898, 0.9846815466880798, 0.15559910237789154, 0.762670636177063, 0.1472436934709549, -0.3114960491657257, -0.23448817431926727, 0.2924770712852478...
def size ( self ) : return len ( self. key _ list )
[ -0.6540136933326721, 0.5693801045417786, 0.15114711225032806, -0.746113121509552, 0.10956951975822449, 0.5115787386894226, -0.46305641531944275, 0.8632310628890991, -0.047429196536540985, -0.006840550806373358, -1.5092226266860962, 0.08503895252943039, -0.6982501745223999, 0.61052894592285...
def load _ string ( self, xml _ string, format _ ) : tree = format _ ( xml _ string ) tree. load ( ) self. _ root = self. _ load _ xml ( tree. root ) return self. _ root
[ 0.6105155944824219, -1.0504143238067627, 0.21798500418663025, -0.5339083075523376, -1.3257622718811035, -0.5517123341560364, -0.6205586791038513, -0.1534334123134613, 0.40927767753601074, -0.5378966927528381, 0.6876917481422424, 0.43959054350852966, -0.2986082434654236, -0.6958151459693909...
def status _ pin ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('post ', f'/ api / v1 / statuses / { id } / pin')
[ -1.4204751253128052, -0.17376357316970825, 0.14549313485622406, 0.1952720284461975, 0.1100245863199234, 0.68300461769104, -0.7410117387771606, -0.6093540787696838, 1.351013422012329, 0.5919060111045837, -1.1814866065979004, 0.9269528388977051, -0.363905131816864, -0.3309488296508789, 0.4...
def _ _ init _ _ ( self, tasks : dict, params : dict = none ) : self. tasks = tasks self. params = params if params else { } self. _ assign _ task _ params ( )
[ 0.2533964514732361, 0.5980040431022644, 0.39750102162361145, 0.7471298575401306, -0.013830463401973248, -0.17684435844421387, 0.490787535905838, 0.4670192003250122, -0.2128176987171173, 0.45395922660827637, -0.31993231177330017, -0.2689022421836853, 0.727597713470459, 1.24177086353302, -...
def setdone ( self, label ) : rowid = self. lookuprowid ( label ) self. database. updatecompletionstatus ( rowid, todotask. task _ done )
[ -0.6827544569969177, 0.011614442802965641, 0.7220855355262756, 0.4162268340587616, 0.5887727737426758, 0.5717946887016296, 0.2250102460384369, 0.17800581455230713, -0.12669911980628967, 1.1431553363800049, -1.1122111082077026, -0.6653766632080078, 0.61224365234375, 0.26978549361228943, -...
def register ( ) : if ( " file " not in request. files ) : abort ( ) " must specify file to upload ", 400 ) result = { " something " : " some thing " } return json. dumps ( result )
[ -1.2505379915237427, 0.6181637644767761, 0.5786195397377014, -0.21040189266204834, 0.8169504404067993, -0.7653366923332214, -0.529972493648529, -0.3245109021663666, -0.994268000125885, 0.181884765625, -0.6950606107711792, 0.20769399404525757, -0.5028116703033447, 0.6407904028892517, -0.4...
def getspatialp ( self, mesh, f ) : p = zero ( ) field = f. _ gloc ( self. projfield ) for strength, comp in zip ( self. orientation, [ " x ", " y ", " z " ] ) : if strength! = 0. 0 : p = p + strength * mesh. get _ interpolation _ matrix ( self. locations, field + comp ) return p
[ 0.9624409675598145, 0.24565446376800537, 0.6192137002944946, 0.7804252505302429, -0.1993994116783142, 0.7444908022880554, -0.02663317136466503, 0.4568921625614166, -0.5926249027252197, 0.27586010098457336, 0.25337401032447815, -0.8526461720466614, -0.9424431324005127, -0.19729933142662048,...
def setup _ analysis _ tool _ portfolio ( self, config _ location ) : tool _ factory = analysistoolfactory ( ) config = read _ json ( config _ location ) rules = read _ json ( '.. / data /'+ config [ " rules _ location " ] ) projects = read _ json ( '.. / data /'+ config [ " projects _ location " ] ) tool _ name = conf...
[ 0.5440722703933716, -0.3969997763633728, 0.44984492659568787, -0.557754635810852, 0.42493200302124023, 0.9107444882392883, 0.5782256722450256, -0.4941136837005615, -0.7216785550117493, 0.11043894290924072, -0.44521835446357727, 0.3210340738296509, 1.1737550497055054, -0.5781542658805847, ...
def sub ( self, input1, input2 ) : a, b = self. _ _ parseinput ( input1, input2 ) c = bin ( int ( a, 2 ) - int ( b, 2 ) ) if c [ 0 ] = ='-': return c [ 3 : ] else : return c [ 2 : ]
[ -0.35853010416030884, 0.0022890246473252773, 0.8416441082954407, 1.1184810400009155, -0.875985860824585, 0.8718634843826294, -0.7870506048202515, -0.3532934784889221, -0.8363747596740723, -0.4706033170223236, -0.6244291663169861, 0.7482153177261353, -0.9758131504058838, -0.9365503191947937...
def _ hg _ set _ state ( self, value ) : if self. _ state in self. _ data : self. _ data [ self. _ state ] = value
[ -0.738041341304779, 0.550975501537323, 0.3883083760738373, -0.9996058344841003, -0.263784259557724, 0.03409946709871292, -0.2217470407485962, -0.5018981695175171, -0.5534758567810059, -0.03432409465312958, -0.9872056841850281, 0.20396628975868225, 0.28610941767692566, 0.4478823244571686, ...
async def async _ added _ to _ hass ( self ) - > none : await self. _ api. start _ pin ( self. async _ write _ ha _ state )
[ 0.03870726004242897, 0.43109968304634094, 0.5029171705245972, 0.20967473089694977, 1.5818129777908325, 0.3750174641609192, -0.018287641927599907, 0.35155975818634033, 1.4292649030685425, 0.38301628828048706, -0.4578976333141327, 1.0782253742218018, 0.782174825668335, 0.22731913626194, 0....
def match _ templates ( grey _ img, threshold, templates, in _ img = none ) : h, w = grey _ img. shape out _ img = np. zeros ( ( h, w, 1 ), dtype = " uint8 " ) for template in templates : height, width = template. shape res = cv. matchtemplate ( grey _ img, template, cv. tm _ ccoeff _ normed ) loc = np. where ( res > =...
[ -0.42912691831588745, -0.20758184790611267, 0.7012754678726196, 0.022140592336654663, -0.8976031541824341, -0.3164404332637787, 0.5155606865882874, 0.36560261249542236, 0.6894181966781616, -0.08345110714435577, 0.3976486325263977, -0.3161354064941406, -0.0029277189169079065, 0.230255156755...
def _ touchandwrite ( path, data = none ) : fh = open ( path,'w') if data : fh. write ( data ) fh. close ( )
[ 0.2612644135951996, -0.5596653819084167, 0.34326404333114624, -0.4970061779022217, 0.32082268595695496, 0.462916761636734, 0.29384317994117737, 0.41256704926490784, 0.06777036935091019, -0.6088307499885559, 0.25843650102615356, -1.2654664516448975, -0.15563249588012695, -0.5231403112411499...
def get _ conversions _ between _ input _ and _ feature ( pre _ processed _ input _ image _ shape, feature _ map _ shape ) : # find shapes of feature maps and input images to the classifier cnn assert len ( pre _ processed _ input _ image _ shape ) in [ 3, 4 ] # either a 4d array with [ :, height, width, channels ] or ...
[ -0.2756773829460144, -0.9164373874664307, 1.0283632278442383, -0.33539268374443054, -0.34386056661605835, -0.4255615174770355, 0.46364009380340576, -0.07054673880338669, -0.8643144965171814, 0.8473054766654968, -0.3632948100566864, 0.2739056646823883, 0.2994431257247925, 0.6765719056129456...
def _ string _ from _ input ( self, value ) : if not value : return none if type ( value ) in ( list, tuple ) : return ( " ". join ( ['" % s "'% v for v in value if v ] ) ) return value
[ -0.23073486983776093, 0.22561199963092804, 0.4780868887901306, -0.16198213398456573, -0.21725651621818542, 0.2969723045825958, -0.752659022808075, -0.9627236723899841, -0.0018987787188962102, 0.4661899209022522, 1.0912741422653198, 0.3645087778568268, -0.2957523465156555, 0.113102883100509...
def getaction ( self, gamestate ) : # collect legal moves and successor states legalmoves = gamestate. getlegalactions ( ) # choose one of the best actions scores = [ self. evaluationfunction ( gamestate, action ) for action in legalmoves ] bestscore = max ( scores ) bestindices = [ index for index in range ( len ( sco...
[ 0.1307390332221985, -0.4831159710884094, 0.5355898141860962, -0.10887990146875381, 0.5694580674171448, 0.06310036778450012, -0.09742163121700287, -0.4725250005722046, 0.909479022026062, -0.2995849549770355, 0.3466402292251587, 1.1625252962112427, 0.15925578773021698, -0.5990135669708252, ...
def barrele _ version ( barrele _ command ) : # pylint : disable = unused - argument, protected - access logdir = barrele _ command. _ bec _ logdir log _ to _ file = barrele _ command. _ bec _ log _ to _ file simple = true if simple : logdir _ is _ default = ( logdir = = barrele _ constant. barrele _ log _ dir ) log, _...
[ 0.3601779639720917, -0.6316404342651367, 0.5968331098556519, 0.2501809298992157, 0.8934718370437622, 0.8932976126670837, 0.7726541757583618, 0.16526766121387482, -1.3641390800476074, 0.5371523499488831, -0.672110915184021, 0.9360612630844116, 0.05672680586576462, 1.0060429573059082, 1.58...
def mousemoveevent ( self, event ) : self. item = self. itemat ( event. scenepos ( ), qtransform ( ) ) if event. buttons ( ) = = qt. leftbutton : self. move = true # required for exchange super ( graphicsscene, self ). mousemoveevent ( event )
[ 0.006600895430892706, -0.2938961684703827, 0.6440812349319458, -0.02762741781771183, -0.20014688372612, 0.39786699414253235, -0.6714304089546204, -0.09251630306243896, 0.7429608702659607, 0.16259600222110748, -1.5277414321899414, -0.47579801082611084, 0.6111072301864624, 0.6320806741714478...
def calc _ nested _ root ( x, y, z ) : return math. sqrt ( x + math. sqrt ( y ) + math. sqrt ( z ) )
[ 1.38962984085083, -0.22132334113121033, 0.32964688539505005, 0.07902394235134125, -0.5012900829315186, -0.007436312735080719, -0.4262697696685791, -0.29307109117507935, 0.40261173248291016, -0.1068517193198204, -1.1648000478744507, 1.0218169689178467, -0.8625987768173218, -0.29251676797866...
def test _ _ parser _ _ lexer _ fail ( ) : lex = lexer ( config = fluffconfig ( overrides = { " dialect " : " ansi " } ) ) _, vs = lex. lex ( " select \ u0394 " ) assert len ( vs ) = = 1 err = vs [ 0 ] assert isinstance ( err, sqllexerror ) assert err. line _ pos = = 8
[ 0.35695165395736694, -0.3096172511577606, 0.3250334560871124, -0.01122993417084217, -0.3015587329864502, 0.2970865070819855, -0.8738470077514648, -0.17531442642211914, -0.04249885305762291, -0.6276826858520508, -0.8428251147270203, -0.4088209569454193, -0.05943917855620384, 0.0936169475317...
def put ( self ) : self. _ method _ not _ allowed ( )
[ -0.5857135057449341, 0.8753023147583008, 0.14124943315982819, 0.16813254356384277, 0.20411252975463867, 0.4131672978401184, 1.2780282497406006, -0.5277832746505737, -0.32255250215530396, -0.18349194526672363, 0.6330397129058838, 0.7349095344543457, -1.3966315984725952, 0.21942918002605438,...
def unique _ id ( self ) : return self. _ uuid
[ 0.30001300573349, -0.43877819180488586, 0.3152647316455841, -0.366206556558609, 0.3321496546268463, 0.736017107963562, 0.5611869096755981, 1.4350422620773315, 0.6610903739929199, -0.7213043570518494, 0.023556580767035484, 0.6915718913078308, -0.43017297983169556, -1.5068466663360596, -0....
def reset _ time _ trace ( self ) : self. time _ trace = [ ] self. time _ trace _ level = - 2
[ -0.22160477936267853, 0.2155819684267044, 0.35964077711105347, 0.488696426153183, 1.3290985822677612, 0.11036323010921478, -0.00016828093794174492, -0.37090688943862915, -0.6816157102584839, 1.4960678815841675, -1.2762963771820068, 0.2858262360095978, -0.5884404182434082, 0.866988718509674...
def default ( self, callback ) : self. _ default = callback return callback
[ 0.1345348060131073, -0.004669202025979757, 0.24367351830005646, 0.18509581685066223, 0.6728827357292175, 0.01517441589385271, 0.6843836903572083, 0.48517152667045593, 0.8587272763252258, -0.7507634162902832, -0.7922632098197937, -0.44680318236351013, -0.9128598570823669, 0.5284091830253601...
def overrides ( processed _ titles : dict [ str, set [ datnode ] ], config : config, input _ dat : dat ) - > dict [ str, set [ datnode ] ] : if input _ dat. clone _ list. overrides : eprint ('* applying clone list overrides... ', sep ='', end ='', flush = true ) report _ on _ match : bool = false warning _ given : bool...
[ -0.46315422654151917, 0.7062448263168335, 0.5825508832931519, -0.26100948452949524, -0.469014048576355, 0.01941998489201069, -0.1695173680782318, -1.0176259279251099, -0.5281083583831787, 0.051770057529211044, -0.06293312460184097, 0.4748818874359131, -0.4728033244609833, 0.533364832401275...
def _ _ ne _ _ ( self, other ) : if type ( other ) is type ( self ) : if self. type! = other. type : return notimplemented elif isinstance ( other, discordentity ) : if self. type not in other. _ _ class _ _. _ _ name _ _ : return notimplemented else : return notimplemented return ( self. id! = other. id )
[ -1.449385404586792, -0.5440355539321899, 0.8571443557739258, -0.6736699342727661, 0.2999745011329651, 0.05268945172429085, 0.004915573168545961, -1.0830435752868652, 0.5229892134666443, -0.022270264104008675, -0.8056595325469971, 0.22858373820781708, -0.0950244814157486, 0.71401447057724, ...
def create _ dummy _ computation _ tuple ( ) : names = ['a ','b ','c'] fn, fn _ type = create _ dummy _ computation _ tensorflow _ constant ( ) element _ value = pb. computation ( type = type _ serialization. serialize _ type ( fn _ type ), call = pb. call ( function = fn ) ) element _ type = fn _ type. result elements...
[ -0.8034308552742004, 0.3959631025791168, 0.7869744300842285, -0.056936848908662796, 0.9827305674552917, 0.017100511118769646, 0.11275581270456314, -0.36676326394081116, -0.8122467398643494, 0.34610888361930847, -1.0788451433181763, -0.5142987370491028, -0.3319474756717682, 0.33017763495445...
def email _ subject _ template _ id ( self ) : return self. _ email _ subject _ template _ id
[ 0.5535336136817932, -0.7426586747169495, 0.31587842106819153, -0.5482504963874817, -0.5780704617500305, 1.0013906955718994, 0.02740771882236004, -0.12984724342823029, 0.8651983141899109, 0.6561177968978882, -0.4826289415359497, 0.9508942365646362, -0.31138095259666443, -0.313063383102417, ...
def process ( ) : sentence = request. form ['query'] keyword : str = parser. sentence _ parser ( sentence ) geocode : dict = gmaps. geocode ( keyword ) try : wiki _ fetch = parser. address _ parser ( geocode ['address'] ) wiki : str = wikipedia. search ( wiki _ fetch ) wiki _ resume : str = wiki [ 0 ] wiki _ url : str ...
[ -0.2185339480638504, -0.5769066214561462, 0.8887437582015991, -0.6591830849647522, -0.39690929651260376, -0.5571491718292236, -1.2352031469345093, 0.29182931780815125, -0.004036149010062218, 0.4137492775917053, 0.18046240508556366, 0.3854312598705292, -0.6300063729286194, 0.488607555627822...
def test _ create _ recipe _ with _ tags ( self ) : tag1 = sample _ tag ( user = self. user, name ='tag1') tag2 = sample _ tag ( user = self. user, name ='tag2') payload = {'title':'sample title ','tags': [ tag1. id, tag2. id ],'time _ minutes': 5,'price': 10. 09 } res = self. client. post ( recipe _ url, payload ) sel...
[ 0.6763880848884583, 0.7337436079978943, 0.5318436622619629, 0.6730196475982666, 0.7085341215133667, -0.1774919033050537, -1.418725848197937, 0.044520970433950424, -1.1722736358642578, 0.03173775225877762, -1.2792112827301025, -0.7928940057754517, 0.4856843650341034, 0.7706679105758667, -...
def get _ area ( self ) : return 3. 14 * self. radius * self. radius
[ 0.49144959449768066, -0.5224071741104126, 0.39219754934310913, -0.4945595860481262, 0.09662133455276489, -0.033557482063770294, 0.21092577278614044, 0.21464209258556366, 0.4748506546020508, -0.04083866998553276, 0.5110930800437927, 0.36078089475631714, -0.689617395401001, -0.13114042580127...
def get _ all _ disallows _ from _ files ( ) : robot _ files = list _ all _ files ( ) for item in robot _ files : open _ txt _ file ( item ) print " [ * ] all files processed! " print " [ * ] items in disallow list : " + str ( len ( disallow ) ) os. chdir ( ".. " )
[ 0.7727187871932983, -0.29605400562286377, 0.7370536923408508, 0.5017565488815308, -0.34821173548698425, 0.42720383405685425, 0.27880212664604187, 1.5551167726516724, -0.8716795444488525, 0.46681898832321167, -0.013150093145668507, 0.6920516490936279, -0.08875581622123718, 0.430881947278976...
def get _ loss ( self, sem _ seg _ loss, results, inputs ) : labels = inputs ['label'] scores, labels = sem _ seg _ loss. filter _ valid _ label ( results, labels ) loss = sem _ seg _ loss. weighted _ crossentropyloss ( scores, labels ) return loss, labels, scores
[ -0.4501710534095764, -0.44973480701446533, 0.33307522535324097, 0.6116160750389099, 0.48265549540519714, -0.3544853925704956, 0.15403902530670166, -0.2470613420009613, 0.1941843181848526, 0.22257663309574127, 0.23131336271762848, -0.95998615026474, -0.20445516705513, -0.3613639175891876, ...
def dag _ avg _ deg ( p, k, w _ min = 1, w _ max = 1, return _ ordering = false, random _ state = none, debug = false ) : rng = np. random. default _ rng ( random _ state ) # generate adjacency matrix as if top. ordering is 1.. p prob = k / ( p - 1 ) print ( " p = % d, k = % 0. 2f, p = % 0. 4f " % ( p, k, prob ) ) if d...
[ -0.23029738664627075, 0.782174825668335, 0.8790683746337891, -0.26800620555877686, -1.2583688497543335, 0.3141506612300873, 0.6387604475021362, 0.6395519971847534, -0.05695773661136627, 0.7435812950134277, 1.0695124864578247, 0.23387418687343597, 0.3360134959220886, 0.21494552493095398, ...
def count _ hits ( space, positions, pi _ plus _ 4 _ vecs _ lab, pi _ null _ 4 _ vecs _ lab, r ) : return [ count _ double _ hits ( positions, pi _ plus _ 4 _ vecs _ lab, pi _ null _ 4 _ vecs _ lab, r = r, z _ detector = z ) for z in space ]
[ 0.3636816143989563, -0.3382975459098816, 0.17155346274375916, 0.5914657711982727, 1.127822995185852, 0.23250947892665863, 0.4376104772090912, -0.16054128110408783, 0.16600678861141205, 0.17800560593605042, -0.5979097485542297, -0.6483373045921326, 0.32269370555877686, 0.0750119611620903, ...
def regex _ validate ( plate : str, default _ mask : str ) - > bool : regex = re. compile ( default _ mask ) valid = regex. match ( plate ) if valid : return true else : raise exception ( " plate don't match with default plate validation " )
[ -0.05379863455891609, 0.015923364087939262, 0.6479570865631104, 1.0766375064849854, 0.37192201614379883, 0.6245644688606262, -0.44480881094932556, 0.15332306921482086, -0.5913876891136169, -0.016688067466020584, -0.5250628590583801, -0.0420650914311409, -1.4248859882354736, -0.232431456446...
def logtime _ to _ timestamp ( apachetime ) : format = " % d / % b / % y : % h : % m : % s " time _ in = time. strptime ( apachetime, format ) time _ out = time. mktime ( time _ in ) return int ( time _ out )
[ -0.7133657336235046, -0.22497914731502533, 0.8903152346611023, -0.9815168976783752, -0.42608463764190674, 0.044395387172698975, -0.3397029936313629, -0.7457610368728638, 0.29876986145973206, 0.8223807215690613, -0.767778754234314, -0.07557061314582825, -0.09460696578025818, -0.176033213734...
def inspectconnectingtointersection ( self, side ) : vtx1, vtx2 = side. endpoints if side. isunset ( ) and ( vtx1. isintersection ( ) or vtx2. isintersection ( ) ) : # also include the continuation of its link, if any hanginglink = sidelink. fromside ( side ) msg = " remove side connecting to intersection. " self. addn...
[ -0.10196597129106522, 0.03207366541028023, 0.6594151258468628, -0.28557002544403076, 0.5541589260101318, -0.46805304288864136, 0.5889309644699097, -0.11614583432674408, -0.028908826410770416, 0.3086242079734802, 0.4470170736312866, -0.23060719668865204, -0.8593798279762268, 0.4850859344005...
def plot _ series ( ax, xlist, variablename, showlegend, timestepslist, mgilist, modelpath, estimators, args, nounits = false, dfalldata = none, * * plotkwargs, ) : assert len ( xlist ) - 1 = = len ( mgilist ) = = len ( timestepslist ) formattedvariablename = at. estimators. get _ dictlabelreplacements ( ). get ( varia...
[ 0.5157632827758789, 0.3203566074371338, 0.6337815523147583, 0.8851506114006042, 0.33424875140190125, -0.2452543079853058, -0.351285457611084, -0.64720618724823, -0.2940062880516052, 0.6532948017120361, 0.25903981924057007, 0.7404237985610962, 0.7313255667686462, 0.9094634652137756, 0.006...
def from _ isodatetime _ 2 _ timestamp ( dtime, hours = 0, minutes = 0 ) : p = _ compile ( r'( \ d { 4 } ) - ( \ d { 2 } ) - ( \ d { 2 } ) \ s ( \ d { 2 } ) : ( \ d { 2 } ) : ( \ d { 2 } )') m = p. search ( dtime ). groups ( ) # year, month, day, hour, minute, second, microsecond t = _ datetime ( year = int ( m [ 0 ] )...
[ -0.616998016834259, 0.039551958441734314, 0.9273949265480042, -0.5392686724662781, -1.8299834728240967, -0.30088919401168823, -0.3104095160961151, -0.18490275740623474, -0.016880877315998077, 0.7297267913818359, -0.5048059225082397, -0.2952209413051605, 0.6525655388832092, -1.1409859657287...
def quicksortact ( list, low, high ) : if low < high : intermediary = partition ( list, low, high ) quicksortact ( list, low, intermediary ) quicksortact ( list, intermediary + 1, high )
[ 0.2733640968799591, -0.10807223618030548, 0.18381568789482117, -0.34281814098358154, -0.1993238478899002, -0.873060405254364, 0.33623889088630676, 0.03610013797879219, 0.7675661444664001, -1.2037464380264282, -0.5789026021957397, 0.1874958723783493, 0.04114685207605362, -0.1692771911621093...
def typesystem _ pyx ( ts, ns ) : nonuser _ annotations = ('type ','uniquetypeid') ctx = dict ( ts = ts, dbtypes = ts. dbtypes, cg _ warning = cg _ warning, npy _ imports = npy _ imports, stl _ cimports = stl _ cimports, set = set, repr = repr, sorted = sorted, enumerate = enumerate, annotations = annotations, nonuser ...
[ -0.8425316214561462, 0.2941950857639313, 0.49450933933258057, -0.8007993102073669, -0.2752222418785095, -0.38207918405532837, 0.2538968026638031, -1.0847917795181274, 0.41299140453338623, 0.17619329690933228, -0.007652744185179472, 0.49281907081604004, 0.3773338496685028, -0.04607959464192...
def hoursavailable ( self, date, resource = none ) :
[ -0.5033801794052124, -0.012758469209074974, 0.520580530166626, 0.44135046005249023, -0.571884036064148, 1.0792518854141235, -0.44411057233810425, -0.21339115500450134, -0.22056367993354797, 1.0883756875991821, -0.3993435800075531, -0.6983307003974915, 0.9671420454978943, 0.5720802545547485...
async def _ _ call _ _ ( self, scope : scope, receive : receive, send : send ) - > none : assert scope [ " type " ] in ( " http ", " websocket ", " lifespan " ) if " router " not in scope : scope [ " router " ] = self if scope [ " type " ] = = " lifespan " : await self. lifespan ( scope, receive, send ) return partial ...
[ -0.36457955837249756, 0.1016431450843811, 1.0850812196731567, -0.1851501315832138, 0.5340086221694946, -0.864258348941803, 0.09176940470933914, -0.47591331601142883, 0.3972609341144562, 0.18693853914737701, 0.02829946018755436, -0.21586918830871582, -0.22371581196784973, 0.2827199697494507...
def _ _ init _ _ ( self, breaks, order = none, *, coeffs _ tdep = none, coeffs _ static = none, coeffs _ sm = none, coeffs _ gsm = none, breaks _ delta = none, coeffs _ delta = none, breaks _ euler = none, coeffs _ euler = none, name = none, meta = none ) : self. timestamp = str ( datetime. utcnow ( ) ) # time - depend...
[ -0.7302873134613037, 0.0054412176832556725, 0.825867772102356, 0.38329461216926575, 0.2851547598838806, 0.30727535486221313, -0.12329631298780441, -0.2944240868091583, 0.27574512362480164, -0.5735799074172974, -0.8657318949699402, -0.9269848465919495, 0.6500630974769592, 0.1066596508026123...
def _ _ init _ _ ( self ) : self. label = " open an mxd " self. description = " opens an mxd using the job id number and tile preselected by the user. version { 0 } ". format ( tool _ version ) self. canruninbackground = false
[ 0.31936773657798767, -0.39893364906311035, 0.2948334813117981, 0.11146605759859085, -0.9891972541809082, 0.6473978161811829, 0.28991231322288513, 0.40956929326057434, -0.44089749455451965, -0.349444717168808, 0.07218368351459503, 1.3269951343536377, -0.5050357580184937, 0.93134605884552, ...
def fixed ( self, value ) : if not isinstance ( value, bool ) : raise typeerror ( " value must be a bool " ) setattr ( self, " _ fixed ", value )
[ -0.654689371585846, 0.7632789015769958, 0.5100158452987671, 0.16478800773620605, -0.4126957058906555, 0.9372411966323853, 1.4476126432418823, -0.2155964970588684, -0.6666459441184998, 0.389864057302475, -1.147613763809204, -0.45416373014450073, 0.0830921083688736, 0.5635896325111389, -0....
def test _ _ put _ name _ and _ sub _ command _ name _ stack _ into ( ) : for input _ value, defaults, expected _ output in ( ( ('', none ), false, {'name':'' } ), ( ('a ', none ), false, {'name':'a'} ), ( ('a ', ('hello ','there') ), false, {'name':'a hello there'} ), ( ('a ', ('there ','hello') ), false, {'name':'a t...
[ 0.3413606584072113, 1.0509804487228394, 0.6863366961479187, -0.12419493496417999, -0.0005466021248139441, -0.2089577168226242, 0.35081493854522705, -1.0061651468276978, -1.0283939838409424, -0.2543542981147766, -1.592079520225525, -0.25650516152381897, -0.670237123966217, -0.02313377708196...
def search ( self, q, start = false ) : self. ui. show _ wait ( " searching.. " ) self. action = action. search results = self. loop. run _ until _ complete ( self. gw. search ( query = q ) ) if not results : self. ui. show _ message ( " not found track with query = % s " % q ) else : self. search _ result. set ( resul...
[ -0.5756080746650696, 0.7626386880874634, 0.5317822098731995, 0.15911172330379486, 0.22621256113052368, 0.6532393097877502, 0.22999751567840576, -0.9476778507232666, -0.5646172761917114, -0.06537462770938873, -0.46455615758895874, 0.3107430636882782, -0.8300739526748657, 0.8654340505599976,...
def _ _ init _ _ ( self, dirout = none ) : self. set _ dirout ( dirout ) self. load _ filter _ config ( )
[ 0.09934699535369873, 0.3806949257850647, 0.2780584394931793, 0.7299938201904297, -0.7194234728813171, -0.7381012439727783, 0.6474087834358215, 1.1717079877853394, -0.16357560455799103, -0.3291935920715332, -0.38353607058525085, 0.9653844237327576, 0.24955886602401733, 0.8865106105804443, ...
def transform ( self, point, feat, label, splits ) : return {'point': point,'feat': feat,'label': label,'row _ splits': splits }
[ -0.4509347379207611, -0.05855671688914299, 0.2362579107284546, -0.29877808690071106, -0.7472318410873413, -0.5536072850227356, -0.6578899621963501, 1.0171064138412476, -0.40609949827194214, -0.4716009497642517, -1.024172067642212, -0.522736668586731, 0.5370152592658997, -0.5814369916915894...
def get _ arbo _ chap _ 19 _ df ( ramq _ data, categorie, sous _ categorie, sous _ sous _ categorie, chapter _ num, chapter _ name, column _ list ) : arbo _ df _ tmp = pd. dataframe ( columns = column _ list ) find _ result = none if sous _ sous _ categorie! ='' : find _ result = ramq _ data [ ramq _ data ['diagnostic ...
[ 0.1665833443403244, -0.4166955053806305, 0.5366958379745483, 0.0400671511888504, 0.6306295990943909, -0.29097822308540344, 0.06944585591554642, 0.6602096557617188, -1.0530391931533813, -0.4754558801651001, 0.2467605024576187, -0.03329687938094139, 0.06611370295286179, -0.6632567644119263, ...
def predict _ credit _ default ( ) : limit _ bal = request. args. get ('limit _ bal') age = request. args. get ('age') pay _ 1 = request. args. get ('pay _ 1') pay _ 2 = request. args. get ('pay _ 2') pay _ 3 = request. args. get ('pay _ 3') pay _ 4 = request. args. get ('pay _ 4') pay _ 5 = request. args. get ('pay _ ...
[ 0.17908328771591187, 0.37388670444488525, 1.1725646257400513, 0.5890748500823975, 0.059711750596761703, 0.7491204142570496, 0.0829644724726677, 0.4905126094818115, -0.8233920335769653, 0.34905487298965454, -0.10877478867769241, -0.2639286518096924, -0.25780099630355835, 0.4789256155490875,...
def find _ min _ cut ( adj _ list ) : while len ( adj _ list ) > 2 : # randomly choose a node from the adjacency list rand1 = random. randint ( 0, len ( adj _ list ) - 1 ) node1 = adj _ list [ rand1 ] # randomly choose a node that shares an edge with the node chosen above rand2 = random. randint ( 1, len ( node1 ) - 1 ...
[ -0.002495215041562915, -0.058716755360364914, 0.8886018395423889, 0.17552678287029266, -0.24155329167842865, -0.14556965231895447, 1.0445549488067627, -0.08898472785949707, 0.681265115737915, 1.1282169818878174, -0.353977233171463, 0.9017072916030884, -0.6524391174316406, 0.320166856050491...
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none ) - >'workflow': opts = pulumi. resourceoptions. merge ( opts, pulumi. resourceoptions ( id = id ) ) _ _ props _ _ = workflowargs. _ _ new _ _ ( workflowargs ) _ _ props _ _. _ _ dict _ _ [ " accelerators " ]...
[ 0.23805531859397888, -0.5163969397544861, 0.576216995716095, -0.36009281873703003, -0.0030481619760394096, -0.6141300201416016, -0.29830777645111084, -0.07109862565994263, 0.49479418992996216, -0.27901288866996765, -0.29856550693511963, 0.8927628397941589, -0.4502221345901489, -0.524517416...
def get ( self, capture _ id, * * params ) : if not capture _ id or not capture _ id. startswith ( self. resource _ id _ prefix ) : raise identifiererror ( f " invalid capture id :'{ capture _ id } '. a capture id should start with'{ self. resource _ id _ prefix } '. " ) return super ( ). get ( capture _ id, * * params...
[ 0.5734261870384216, -0.5811993479728699, 0.4062590003013611, 0.6088152527809143, 0.018483761698007584, 0.05543610826134682, -0.5176011323928833, -0.8070860505104065, 0.9694606065750122, 0.1141754537820816, 0.6544433236122131, 0.8237124681472778, 0.4568367898464203, 0.5046904683113098, 0....
def dectobin ( number ) : exponent = 0 shifted _ num = number while shifted _ num! = int ( shifted _ num ) : shifted _ num * = 2 exponent + = 1 if exponent = = 0 : return'{ 0 : 0b } '. format ( int ( shifted _ num ) ) binary ='{ 0 : 0 { 1 } b } '. format ( int ( shifted _ num ), exponent + 1 ) integer _ part = binary [...
[ -0.39162248373031616, -0.027513690292835236, 1.0750030279159546, 0.33275800943374634, -0.2162771075963974, 0.5387133359909058, 0.5474369525909424, -0.9481242895126343, 0.24080152809619904, -0.5334679484367371, -0.07640281319618225, 0.3244393467903137, 0.18768949806690216, 0.045283265411853...
def plot _ comparison ( coordinates, reference, solutions, description, coloration, save = true, path = none ) : plt. rcparams ['font. serif'] ='times new roman'plt. rcparams ['font. family'] ='serif'plt. rcparams ['figure. figsize'] = [ 9. 69, 6. 27 ] figure = plt. figure ( ) grid = grid _ spec. gridspec ( 1, len ( so...
[ -0.0774419829249382, 0.4171614944934845, 0.9181548357009888, -0.23060911893844604, 0.13131862878799438, 0.8403774499893188, 1.3334696292877197, -0.48725515604019165, -0.62784743309021, 0.7031939029693604, 0.1985170543193817, 1.2986822128295898, 0.6342149972915649, 0.5420415997505188, 0.2...
def testgetordersbystatement ( self ) : if not self. _ _ class _ _. order1 : self. testcreateorders ( ) filter _ statement = {'query':'where advertiserid = \'% s \'limit 500'% self. _ _ class _ _. advertiser _ id } self. assert _ ( isinstance ( self. _ _ class _ _. service. getordersbystatement ( filter _ statement ), ...
[ -0.2767360210418701, 1.0505768060684204, 0.28123316168785095, 0.1504860669374466, 0.31396758556365967, -0.3601604700088501, 0.0440157987177372, -0.9469836950302124, 0.7941290140151978, 0.2991487979888916, 0.1805364489555359, 0.5517284870147705, -0.4980821907520294, -0.36948680877685547, ...
def generate _ grid _ world _ transitions ( action _ labels, num _ rows = 3, num _ cols = 3 ) : num _ grid _ locs = num _ rows * num _ cols transition _ matrix = np. zeros ( ( num _ grid _ locs, num _ grid _ locs, len ( action _ labels ) ) ) grid = np. arange ( num _ grid _ locs ). reshape ( num _ rows, num _ cols ) it...
[ -0.5654390454292297, -0.4644605219364166, 0.9111426472663879, 0.016927216202020645, 0.049703728407621384, 0.010137772187590599, 0.5850751399993896, -0.04675687849521637, -0.14755010604858398, 1.2228573560714722, 0.05244089663028717, -0.17347566783428192, -0.1905999630689621, 0.015277282334...
def set _ size _ min ( self, mn ) : assert _ is _ cpo _ interval _ value ( mn ), " interval min should be an integer in [ interval _ min, interval _ max ] " assert mn < = self. size [ 1 ], " interval min should be lower or equal to interval max " self. size = ( mn, self. size [ 1 ] )
[ -0.10918495059013367, -0.32414934039115906, 0.3639968931674957, 0.14355264604091644, -0.5484533309936523, 1.228398084640503, 0.040358543395996094, -0.7395755648612976, -0.01434305403381586, -0.1987258940935135, -0.9651728272438049, 0.6365982294082642, -0.9072967171669006, 0.071868628263473...
def tablify _ universities ( universities : list ) - > str ( ) : grid ='< table class = " w3 - table w3 - bordered w3 - large " >'base _ row ='< tr class = " " > < th > % s % s < / th > < / tr >'for uni in universities : grid + = base _ row % ( uni ['logo'], uni ['href'] ) return grid
[ 0.07825363427400589, 0.582774817943573, 0.6312831044197083, -0.27504873275756836, -0.5470706224441528, 0.10100551694631577, -0.11976436525583267, 0.3032667934894562, 0.4827069342136383, 0.19167327880859375, 0.16855795681476593, 0.18421217799186707, 0.6052477359771729, 0.25074976682662964, ...
def test _ registerform _ get ( self ) : # get method. with patch ('user _ auth. views. registerform') as reg : self. client. get ('/ user _ auth / register /') # check if registerform is called with post method. self. asserttrue ( reg. called )
[ -0.26797249913215637, 1.3497647047042847, 0.36987459659576416, 0.39887359738349915, 1.3229750394821167, -0.6263630986213684, -0.3463328182697296, -0.21361763775348663, -0.15274454653263092, -1.4198806285858154, -0.6858626008033752, 0.8116989135742188, 0.45204001665115356, -0.23370184004306...
def _ _ init _ _ ( self, file _ path : path, * args, * * kwargs ) : super ( ). _ _ init _ _ ( * args, * * kwargs ) self. _ file = open ( str ( file _ path ),'wt') self. _ file _ path = file _ path self. _ writer = csv. writer ( self. _ file, delimiter = ',') self. _ writer. writerow ( self. _ keys )
[ -0.3567778468132019, -0.4179704785346985, 0.3001309335231781, 0.09024396538734436, 0.19103141129016876, -0.3122193217277527, -0.11387564986944199, 0.970792293548584, -1.0299009084701538, -0.14518094062805176, -0.19343629479408264, -0.2841019928455353, 0.7297865152359009, 0.1831212341785431...
def pop _ scope ( self, ends _ branch = false ) : if ( ( not ends _ branch and self. in _ if ( ) and len ( self. scopes ) < = self. get _ if _ starting _ scope _ depth ( ) ) or len ( self. scopes ) < = 1 ) : raise preprocessexception ('attempted to leave final scope. ', self. l ) self. scopes. pop ( )
[ -0.2506968080997467, 0.6500606536865234, 0.7472005486488342, -0.6297466158866882, -0.25589948892593384, -0.12916354835033417, 0.19072093069553375, -0.2957514226436615, -0.6927660703659058, 1.1374247074127197, 0.8014029860496521, 0.15376731753349304, -0.965084969997406, 0.4955558776855469, ...
def most _ wins ( self ) : return reduce ( lambda a1, a2 : a1 if self. _ players [ a1 ]. won > self. _ players [ a2 ]. won else a2, self. _ players )
[ -0.8995009660720825, -0.4216841757297516, 0.5306615829467773, 0.42899513244628906, 0.49260109663009644, -0.25707146525382996, -0.20229682326316833, 0.16330471634864807, -0.5673553347587585, 0.037097614258527756, 0.3187370002269745, 0.15762284398078918, 0.005633250810205936, 0.6317090988159...
def unit ( self ) - > str : return self. _ cfg. unit
[ -0.40090489387512207, -0.57930588722229, 0.4126911461353302, 0.09220770001411438, 0.6263234615325928, 1.1211851835250854, 0.7655926942825317, 0.4629322290420532, 0.39240050315856934, -0.201675146818161, -0.13228973746299744, 0.7726361751556396, -0.31139272451400757, -0.5616494417190552, ...
def register ( self, entity _ type, id ) : return self. context. register ( entity _ type, id )
[ -0.6612548828125, -0.0400029756128788, 0.3524562120437622, -0.14357566833496094, 1.1757844686508179, -0.20413896441459656, -1.2058786153793335, -0.6168070435523987, 0.30757153034210205, -0.045663099735975266, -0.3621649444103241, 0.9482266902923584, -0.18507160246372223, 0.5282453298568726...
def _ _ floordiv _ _ ( self, other ) : other = build _ cpo _ expr ( other ) assert self. is _ kind _ of ( type _ intexpr ) and other. is _ kind _ of ( type _ intexpr ), " operands of / / should be integer expressions " return cpofunctioncall ( oper _ int _ div, type _ intexpr, ( self, other ) )
[ -0.010222703218460083, -0.10017934441566467, 0.7078090310096741, 0.5304301381111145, -0.3011566400527954, 0.26073119044303894, 1.2986072301864624, -1.1127614974975586, -0.3402688503265381, 0.07756972312927246, -0.14894576370716095, 0.43377408385276794, -1.2712894678115845, 0.46714678406715...
def read _ log _ prior ( path ) : path = path ( path ) with path. open ( ) as f : arr = f. readline ( ). strip ( ). split ( ) arr. remove ('[') arr. remove (']') log _ prior = np. array ( arr, dtype = np. float32 ) return log _ prior
[ 0.27814263105392456, -1.0364325046539307, 1.0403121709823608, -1.4269932508468628, -0.7192957401275635, 0.27642202377319336, -0.2933026850223541, -0.3567633032798767, 0.15641313791275024, 0.055399078875780106, 0.46352115273475647, 1.274458408355713, -0.2601169943809509, -0.745271623134613,...
def _ make _ traceable _ function ( function, logger ) : proxy = _ functiontracingproxy ( function, logger ) @ wraps ( function ) def autologging _ traced _ function _ delegator ( * args, * * keywords ) : if logger. isenabledfor ( trace ) : # don't access the proxy from closure ( ironpython does not manage # co _ freev...
[ 0.1001858338713646, 0.2456311285495758, 0.9415408968925476, -0.4226546585559845, -0.1842481940984726, -0.28691157698631287, 0.1392444223165512, 0.0013805541675537825, 0.847679615020752, -0.28132492303848267, -0.02400214597582817, 0.2613500952720642, 0.31025978922843933, -0.1614177078008651...
def _ get _ proposal _ marginal ( self, given ) : v = list ( self. v ) candidates = np. delete ( np. array ( v ), given ) given = set ( given ) k = np. copy ( self. k ) p _ given = np. linalg. det ( k [ np. ix _ ( list ( given ), list ( given ) ) ] ) probs = np. zeros ( len ( candidates ) ) for i, el in enumerate ( can...
[ -0.2299530953168869, 0.024748679250478745, 0.594193696975708, -0.285766065120697, -0.6806399822235107, 0.5375792384147644, -0.2451583594083786, 0.5587653517723083, 0.4640234708786011, 1.2644857168197632, 1.5892773866653442, 0.49674710631370544, -0.8325517177581787, -0.19174127280712128, ...
def clean _ print ( s, * args ) : if len ( args ) = = 0 : raise typeerror ( " clean _ print only cleans interpolation parameters, and so only make sense with more than one parameter given " ) print ( clean _ format ( s, * args ) )
[ -0.05232967063784599, -0.5755962133407593, 0.6738294363021851, 0.4481141269207001, -0.02056904509663582, -0.13329185545444489, -0.11466127634048462, 0.02798669971525669, -0.3431943356990814, 0.30411389470100403, 0.6976343989372253, 0.676906168460846, -0.882514238357544, 0.6349517107009888,...
def make _ action ( self, observation, test = true ) : action = self. get _ action _ at _ test ( observation ) return action # self. env. get _ random _ action ( )
[ -0.8701146841049194, -0.5077110528945923, 0.36951372027397156, 0.07060982286930084, 0.5180838704109192, 0.8544542789459229, 0.815923810005188, -0.981389582157135, 0.4599606692790985, 0.26148632168769836, -0.1329054981470108, 0.8374738693237305, 0.22267840802669525, -0.4504869282245636, -...
def add _ benchmarked _ city ( city _ id ) : if not os. path. exists ( cache _ user _ json ) : print ('no api key registered yet') sys. exit ( 1 ) with open ( cache _ user _ json,'r') as user _ file : user _ cache _ content = user _ file. read ( ) if not user _ cache _ content : print ('no api key registered yet') sys....
[ 0.2722296714782715, -0.3899931311607361, 0.6498662829399109, -0.2629580497741699, -0.11404098570346832, 0.6589725017547607, 0.271062970161438, -0.041858986020088196, 0.377527117729187, 0.6853789687156677, -1.2365097999572754, 0.525794506072998, -0.36846426129341125, 0.7949507236480713, -...
def delete ( self ) : shutil. rmtree ( self. _ full _ path )
[ 1.4733747243881226, -0.5955373048782349, 0.3520991802215576, -0.06521682441234589, 0.3772093653678894, 0.32224375009536743, 1.2363979816436768, 1.0508729219436646, -0.07733331620693207, -0.9195592999458313, 0.06892941892147064, -0.4198083281517029, 0.3591992259025574, 0.1411443054676056, ...
def main ( ) : # the address to test with user = accounts. at ( decouple. config ( " test _ account " ), force = true ) badger = connect _ badger ( badger _ config. prod _ json ) console. print ( " [ blue ] = = = test env for account { } = = = [ / blue ] ". format ( user ) ) distribute _ test _ ether ( user, wei ( " 10...
[ -0.2272259145975113, -0.15770211815834045, 0.6419070363044739, 0.5202040672302246, 0.7959295511245728, 0.6373804211616516, 1.0548897981643677, -0.5373774766921997, 0.2071603238582611, -0.0019463065546005964, 0.3010871410369873, 0.5850289463996887, 0.0074905105866491795, -0.0116135887801647...
def status _ to _ str ( status ) : if status not in _ status _ to _ str : status = misc return _ status _ to _ str [ status ]
[ -0.16861416399478912, -1.1401252746582031, -0.05239102616906166, 0.010771481320261955, -0.5828555226325989, -0.3249237537384033, -1.191902756690979, -0.7191416025161743, 0.9679687023162842, 0.3690861761569977, 0.11782603710889816, 0.16721409559249878, 0.5494856834411621, -0.341458112001419...
def sentiment _ analysis ( parsed _ comments ) : parsed _ comments ['compound'] = 0. 0 parsed _ comments ['pos'] = 0. 0 parsed _ comments ['neu'] = 0. 0 parsed _ comments ['neg'] = 0. 0 sid = sentimentintensityanalyzer ( ) for index, row in parsed _ comments. iterrows ( ) : text = (''. join ( row ['full _ text _ ngramt...
[ -0.7031621336936951, -1.2365590333938599, 0.5833210349082947, -0.7783607840538025, 0.7383249402046204, -0.23646590113639832, -0.23026588559150696, 0.23700907826423645, -0.3442493975162506, 0.6094854474067688, -0.4805418848991394, -0.6618184447288513, -0.13545747101306915, 0.290656715631485...
def create _ variant ( self, sex ) : chrom ='1'position ='150'info ='cns = 3 ; callsource = acgh'format = [ ('cifer _ inheritance ','uncertain') ] # generate a test variant child = create _ cnv ( sex, " unknown ", extra _ info = info, format = format ) mom = create _ cnv ( " f ", " unknown ", extra _ info = info, forma...
[ 0.11312005668878555, 0.628196120262146, 0.535056471824646, 0.00008041112596401945, -0.15294940769672394, 0.3508901298046112, -0.6561811566352844, 0.10156995803117752, 0.10809840261936188, -0.5858016610145569, -1.4779634475708008, 0.2557159662246704, -0.16529065370559692, -0.861684143543243...
def send _ mail ( attached _ file _ name, recipients ) : email _ message = mimemultipart ( ) email _ message ['subject'] ='experiment data'email _ message ['from'] = email _ username email _ message ['to'] = ", ". join ( recipients ) email _ message ['date'] = formatdate ( localtime = true ) email _ message. attach ( m...
[ 0.1669817417860031, -0.3106725513935089, 0.6238275170326233, -0.21992389857769012, -0.5313509106636047, 0.42533665895462036, -0.578041136264801, 0.26536136865615845, -1.0941784381866455, 0.4845081567764282, -0.11909334361553192, 1.1179325580596924, -0.4378417134284973, -0.2452852576971054,...
def get _ boundary _ positions ( self, state ) : half _ x = self. x _ length / 2. 0 offset _ y _ neg = self. y _ length * 4 / 5. 0 offset _ y _ pos = self. y _ length * 1 / 5. 0 x, y, theta = state boundary = np. array ( [ [ x - half _ x, y - offset _ y _ neg ], [ x - half _ x, y ], [ x - half _ x, y + offset _ y _ pos...
[ -0.7061578035354614, -0.8207732439041138, 0.8896865248680115, -0.9202314019203186, 0.47899723052978516, 0.1463644653558731, 0.1984999030828476, -0.2716863751411438, 0.6248793601989746, 0.4950889050960541, -0.6880295872688293, -0.10022828727960587, 0.0009161812486127019, -0.2516583204269409...
def get _ bathy _ corr ( self ) : d _ r = s5 _ approach _ d ( ) true _ depth = d _ r ( self. rs ) self. d _ r = true _ depth corr _ factor = true _ depth / 216. 5 self. corr _ factor = corr _ factor self. corr _ grid _ r = corr _ factor * self. grid _ r self. corr _ grid _ z = corr _ factor * self. grid _ z return
[ -0.2683395445346832, 0.08680063486099243, 0.47710326313972473, -1.1155502796173096, 0.4877055287361145, -0.5916914939880371, 1.7720990180969238, -0.28802230954170227, -0.12957744300365448, -0.7934585809707642, -0.7293621301651001, 0.5814948678016663, -0.18576394021511078, 0.428060740232467...
def shearblitx ( dst, source, dest, xoffs, stripht, area = none, special _ flags = 0 ) : area = area or ( 0, 0, source. get _ width ( ), source. get _ height ( ) ) num _ strips = ( area [ 3 ] - 1 ) / / stripht + 1 x, y = dest [ : 2 ] strip _ origins = [ ( i * xoffs, i * stripht ) for i in range ( num _ strips ) ] args ...
[ 0.10895314067602158, 0.32833921909332275, 0.7756551504135132, -0.9083587527275085, -1.381264090538025, 0.6021991968154907, 0.28464365005493164, 0.4346327483654022, 0.8595893383026123, 0.2548995018005371, -0.1574755758047104, 1.080479383468628, 0.2873670756816864, 0.15039221942424774, 0.5...
def extract _ by _ squares ( self, gray, retry = true, extension = 6 ) : img = gray. copy ( ) gray = cv2. cvtcolor ( gray, cv2. color _ bgr2gray ) # apparently this does not generalize well for very large resolutions h, w = gray. shape [ 0 : 2 ] if max ( w, h ) > 6800 : new _ size = ( int ( w * 0. 8 ), int ( h * 0. 8 )...
[ -0.09388460218906403, 0.22272954881191254, 0.9786073565483093, 0.39910590648651123, -0.29070648550987244, -0.5945733189582825, 0.7325143814086914, -0.8483683466911316, 1.3550080060958862, 0.30828359723091125, -0.4148038923740387, -0.37095141410827637, 0.25109463930130005, 0.782270848751068...
def parsefromstring ( self, * args, * * kwargs ) : # real signature unknown pass
[ 0.45777642726898193, -1.1195433139801025, 0.327176958322525, 0.48842179775238037, 0.13367663323879242, -0.22092407941818237, 0.247590109705925, -0.10421841591596603, -0.2424708604812622, -0.6377314925193787, -0.8016798496246338, -0.396668940782547, -0.40179502964019775, -0.1950109452009201...
def update _ output _ dict ( self, system _ name, api _ response, request _ id, status, i ) : output _ dict = { } pnote ( " total number of requests in this step : { 0 } ". format ( i ) ) pnote ( " this is request number : { 0 } ". format ( i ) ) pnote ( " status : { 0 } ". format ( status ), " debug " ) pnote ( " api ...
[ -0.8616577386856079, -1.26584792137146, 0.8109163641929626, -0.9700747728347778, -0.724007785320282, -0.7900745868682861, 0.14468751847743988, -0.5641006827354431, -0.6321486234664917, 0.06362312287092209, -0.3763754963874817, -0.4493439793586731, -0.33843204379081726, 0.4440886974334717, ...
def get _ download _ link ( self, path, expires _ in _ sec = 24 * 60 * 60 ) : if path [ 0 ]! ='/': path ='/'+ path expires = int ( datetime. datetime. utcnow ( ). timestamp ( ) ) + expires _ in _ sec secret = md5 ( ( " % s % s % s " % ( expires, path, self. token ) ). encode ( ) ) secret = urlsafe _ b64encode ( secret....
[ -0.222309410572052, -0.163811594247818, 0.6516035795211792, 0.2492925226688385, -0.0897524282336235, -0.02791178971529007, -0.9232286214828491, -0.13811227679252625, -0.26032382249832153, -0.6714493036270142, -0.37310314178466797, 0.40047889947891235, 0.05584534630179405, -0.43844115734100...
def _ _ clean _ path ( self, clean _ path, path _ title = " unspecified " ) : clean _ path = str ( clean _ path ). replace ('\ \ ','/'). strip ( ) if ( not clean _ path. endswith ('/') ) : clean _ path =''. join ( ( clean _ path,'/') ) if ( not os. path. isdir ( clean _ path ) ) : raise runtimeerror ( "'% s'path specif...
[ -0.26958927512168884, -0.37503060698509216, 0.5221060514450073, 0.4570709466934204, -0.7203857898712158, 0.6740266680717468, 0.4034481644630432, 0.16896666586399078, -0.5581430196762085, 0.044926829636096954, 1.0177099704742432, 0.34896183013916016, -0.47771134972572327, 0.2004730701446533...
def _ _ str _ _ ( self ) : val = [ self. day, self. month, self. year _ str ] if self. calendar! = calendartype. gregorian : val = [ " @ # d { } @ ". format ( self. calendar. value ) ] + val return " ". join ( [ str ( item ) for item in val if item is not none ] )
[ -0.06912713497877121, -0.7280508279800415, 0.6044948697090149, -0.5709691643714905, -0.06234008073806763, 1.1975144147872925, -1.0236871242523193, -0.8064504265785217, -0.3288608491420746, -0.056686047464609146, 0.5568373203277588, 0.30265292525291443, 0.03663622960448265, 0.38740256428718...
def get _ sensor _ changes ( self, sensor _ id = none ) :
[ -0.35057660937309265, -0.3122064173221588, 0.07696819305419922, 0.4957711696624756, 0.28375282883644104, -0.9143945574760437, -0.3572988510131836, -0.6991698741912842, 0.9923132658004761, 0.026458758860826492, -0.6302081346511841, 1.087076187133789, 0.3540804982185364, 1.5369198322296143, ...
def progress _ bar _ stop ( message : optional [ str ] = none ) : daemon _ request. stop _ progress ( { } if message is none else { " text " : message } )
[ -0.7627734541893005, 0.1787487119436264, 0.31663498282432556, 0.06170114502310753, 0.07361002266407013, 0.4763658046722412, 0.21692019701004028, -0.2851630449295044, -1.0896430015563965, -0.3050445318222046, 0.3070386052131653, -0.2552764117717743, -2.00785756111145, 0.6602186560630798, ...
def test _ complain _ if _ cannot _ infer _ timezone _ from _ securities ( self ) : def mock _ get _ history _ db _ config ( db ) : return { " bar _ size " : " 5 mins ", " universes " : [ " aapl - arb " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ", " low " :...
[ 0.04442916437983513, 0.10419691354036331, 0.9692510962486267, 0.4929606318473816, 0.5840467810630798, -0.24916788935661316, 0.7770800590515137, -0.35033145546913147, -0.37810051441192627, -0.04778824746608734, -0.6341702342033386, -0.12180770933628082, 0.004346546251326799, 0.2539391517639...