text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ check _ indentation ( line _ num ) : indent = int ( vim. eval ( " indent ( " + str ( line _ num ) + " ) " ) ) spaces = " " for i in range ( indent ) : spaces + = " " return spaces
[ 0.02412404492497444, -0.20274847745895386, 0.6344239115715027, 0.29294881224632263, 0.17691852152347565, -0.9538335800170898, 0.12941649556159973, 0.34022200107574463, 0.23813527822494507, 0.14528915286064148, 0.20627567172050476, -0.4635202884674072, -0.8013851642608643, 0.311913371086120...
def addsubmitjobresourceargs ( parser ) : arg _ specs = [ presentation _ specs. resourcepresentationspec ('job ', getsubmitjobresourcespec ( ), ('the batch job resource. if - - location not specified,'' the current batch / location is used.'), required = true, ), ] concept _ parsers. conceptparser ( arg _ specs ). addt...
[ 0.016875339671969414, -0.49762293696403503, 0.417574405670166, -0.5230787396430969, 0.6670215129852295, 0.5024559497833252, -0.14474157989025116, 1.1199358701705933, -0.4216594099998474, 0.10283280909061432, -0.06007540598511696, 0.4325520396232605, -0.044012490659952164, 1.076509475708007...
def system _ call ( command : str ) - > int : return ( subprocess. call ( shlex. split ( command ), shell = false ) )
[ -0.14824821054935455, 1.037807822227478, 0.8580732345581055, -0.4337008595466614, -0.742257833480835, 0.254849910736084, -0.8022775650024414, -0.4160580337047577, -0.12841615080833435, 0.18268561363220215, -0.5177254676818848, 0.5458082556724548, -0.7107530236244202, 0.6841262578964233, ...
def validate _ build ( ctx, release _ branch, * * _ ) : ci _ provider = ctx. obj. ci _ provider def _ pre _ pr ( ) : log. echo ('build is not a pr... ', break _ line = false ) def _ post _ pr ( ) : log. checkmark ( ) def _ pre _ tag ( ) : log. echo ('build is not a tag... ', break _ line = false ) def _ post _ tag ( ) ...
[ -0.22351738810539246, -0.4031718075275421, 0.6945933103561401, 1.36050283908844, 1.0104862451553345, 1.0960077047348022, 0.26682114601135254, 0.2094457894563675, -0.5085328817367554, -0.2817571461200714, -0.27334102988243103, 0.22914132475852966, -0.9542073607444763, 0.285042405128479, 0...
def set _ first _ item ( self ) : if self. _ widget. count ( ) : self. _ widget. setcurrentitem ( self. _ widget. itemat ( 0, 0 ) )
[ 0.1954888105392456, -0.3296995162963867, 0.5106765031814575, -0.11501359194517136, 1.2590683698654175, 0.6666334271430969, 0.206630140542984, 0.47888150811195374, -0.9153608083724976, 0.04176224023103714, -0.4492551386356354, -0.20038890838623047, -0.09905890375375748, 0.8854876756668091, ...
def find _ albums ( page, month ) : page = page + month res = requests. get ( page, headers = headers, verify = false ) if res. status _ code! = 200 : print ('web site does not exist') res. raise _ for _ status ( ) soup = beautifulsoup ( res. text,'html. parser') all _ heads = soup. find _ all ('h2') all _ subs = soup....
[ 0.18702754378318787, -0.7403598427772522, 0.8668343424797058, 0.3965427279472351, -0.5684146881103516, 0.44674885272979736, -0.10749990493059158, -0.8122501373291016, -0.24430066347122192, 0.6169379949569702, -0.6384694576263428, -0.39060720801353455, -0.2422993928194046, 0.474679648876190...
def _ _ distribute _ update _ ui ( self ) : if self. _ _ ui _ update : for output in self. selected _ outputs : output. ui. distribute = self. _ _ distribute _ combo _ box. current _ index ( )
[ -0.2726672291755676, -1.349016547203064, 0.49843651056289673, -0.0733262300491333, 0.3819778263568878, -0.09872967004776001, 1.4880201816558838, 0.030788887292146683, 0.2154880166053772, -0.38279762864112854, 0.9817118048667908, -0.5117518901824951, -0.6251530647277832, 0.7460804581642151,...
def ekey ( x ) : name = x [ 0 ] tag = x [ 1 ] [ " tag " ] abstract = x [ 1 ] [ " abstract " ] return ( " 0 " if tag = = " simpletype " else " 1 " if tag = = " complextype " else tag, " " if abstract else " x ", name, )
[ -1.0127087831497192, 0.08618995547294617, 0.42477738857269287, -1.1100283861160278, -0.13388533890247345, -0.1343393623828888, -0.6622236967086792, -0.07122424989938736, -0.33767151832580566, 1.3728861808776855, -0.8068584203720093, -0.29821541905403137, 1.071901559829712, 0.20635370910167...
def add _ implicit _ arguments ( unknown _ args, parser ) : num _ unknown _ args = len ( unknown _ args ) for i in range ( num _ unknown _ args ) : arg = unknown _ args [ i ] if arg. startswith ( ( " - ", " - - " ) ) : if any ( arg. endswith ( suffix ) for suffix in int _ param _ suffixes ) : arg _ type = possible _ in...
[ -0.5716254711151123, -0.4733487367630005, 0.7815542817115784, -0.37965846061706543, 1.0882853269577026, 0.7653477787971497, -0.235041081905365, 0.35274767875671387, -1.102677583694458, 0.6079494953155518, -0.06518758833408356, 1.1574641466140747, -0.5539479851722717, 1.1767057180404663, ...
def calc _ bit _ error _ rate ( b1, b2 ) : if len ( b1 )! = len ( b2 ) : raise valueerror ('list of bits differ in length') # calc difference element wise diff = np. array ( b1 ) - np. array ( b2 ) # sum up the absolute values to get the amount of bit errors if diff. ndim = = 1 : result = np. sum ( np. absolute ( diff ...
[ 0.18489204347133636, 0.9007238745689392, 0.8526189923286438, -0.10635019093751907, -0.09473048895597458, 0.19265075027942657, -0.15740497410297394, -0.5691266655921936, 0.03798484429717064, 0.5214837789535522, 0.21737156808376312, 0.8363263010978699, -0.9954050779342651, 0.8428157567977905...
def fill _ ddata ( station, year, sensor _ d, sensor _ l ) : lb = false if ( int ( year ) % 4 ) = = 0 : lb = true for i in range ( 1, 13 ) : fname = ( get _ filename ( station, year, i ) ) if ( lb ) and ( i = = 2 ) : data = pd. read _ csv ( fname, nrows = ( dim [ i - 1 ] + 11 ) ) else : data = pd. read _ csv ( fname, n...
[ -0.24892854690551758, 0.17776727676391602, 1.0277602672576904, -0.4100792407989502, -0.04535728320479393, 1.218585729598999, -0.1267053633928299, -0.2565477788448334, -0.383052259683609, -0.15792299807071686, 0.6641775965690613, 0.11487071961164474, 0.3004773259162903, 0.7529923915863037, ...
def get _ connections ( self ) : if float ( self. _ dsversion ) < 10 : connections = self. _ extract _ legacy _ connection ( ) else : connections = self. _ extract _ federated _ connections ( ) return connections
[ -1.084907054901123, 0.6549718379974365, 0.4606679081916809, 0.3836499750614166, 0.5044294595718384, -1.314143180847168, -0.6807096004486084, -0.00937565229833126, -0.03442566841840744, -0.14327409863471985, -0.04361098259687424, -0.22549453377723694, -0.19809477031230927, 0.204220443964004...
def pdftopng ( sourcepath, destdir, basename, verbosity, dpi ) : if [ ]! = list ( destdir. glob ( basename + " * " ) ) : raise valueerror ( " destdir not clean : " + repr ( destdir ) ) verbose _ run ( ( verbosity > verb _ print _ cmd ), [ " pdftocairo ", " - png ", " - r ", str ( dpi ), str ( sourcepath ), str ( destdi...
[ -0.34550490975379944, 0.2576778829097748, 0.6782277226448059, -0.3478158116340637, -0.06584369391202927, -0.4328640401363373, -0.28728604316711426, -0.20202146470546722, -0.3033851981163025, 0.9615181684494019, 0.4121207594871521, -0.16880980134010315, 1.1793137788772583, -0.04531968012452...
def bead _ ranges _ in _ chromosome ( chromosome, genome _ version, resolution ) : chromosomes _ dict = choose _ genome _ version ( genome _ version = genome _ version ) bead _ ranges = [ ] for i in range ( 0, chromosomes _ dict [ chromosome ], resolution ) : bead _ ranges. append ( ( i, i + resolution ) ) return bead ...
[ -0.4871092438697815, -0.33966416120529175, 0.24268858134746552, 0.5236707925796509, -0.2103545069694519, 0.9179787635803223, 0.7720829248428345, 1.172300934791565, -0.017158111557364464, 0.8480949401855469, -1.733447790145874, 0.40404486656188965, -1.026941180229187, 0.5223023295402527, ...
def on _ tcp _ receive ( self, message ) : self. reset _ heartbeat _ watchdog ( ) log. debug ( " received something with len { } ". format ( len ( message ) ) ) pdus = [ ] pdu = self. _ assemble _ dlep _ message ( message ) while pdu is not none : log. debug ( " extracted message pdu type { } len { } ". format ( pdu. t...
[ -0.09275484830141068, 0.10100872069597244, 0.6574540138244629, -0.7593982815742493, 0.6391237378120422, -0.32641953229904175, -0.30922189354896545, -0.1462940126657486, 0.6803016662597656, 0.33360710740089417, -0.129668727517128, -0.6368711590766907, -0.3235449492931366, -0.218660727143287...
def get _ cclassifier _ with _ name ( clf _ name, x, y ) : clfs = [ csvm ( x, y ), clinearsvm ( x, y ), cnearestneighbors ( x, y ), cquadraticdiscriminantanalysis ( x, y ), cgradientboostingclassifier ( x, y ), cdecisiontreeclassifier ( x, y ), crandomforest ( x, y ), cadaboost ( x, y ), cnaivebayes ( x, y ), ] list _ ...
[ 0.06542153656482697, -0.7218101024627686, 0.5193966627120972, 0.09286388754844666, 0.042512550950050354, -0.016928445547819138, -0.47311750054359436, -0.495950847864151, -0.5517849326133728, 0.2585158050060272, -0.4857623279094696, 0.8142902255058289, 0.22659604251384735, 0.285673826932907...
def is _ active ( self, is _ active ) : self. _ is _ active = is _ active
[ -0.004409611225128174, -1.4183369874954224, 0.25094732642173767, 0.7731937170028687, 1.1097674369812012, 0.9303713440895081, 0.4569041132926941, 1.0831316709518433, -0.21122251451015472, -0.033952172845602036, -0.6802052855491638, -0.3181327283382416, 0.29179930686950684, -1.65530979633331...
def test _ delete _ balise _ html ( ) : result = delete _ balise _ html ( " < h1 > bonjour. < / h1 > " ) assert result = = " bonjour. "
[ 0.7424411177635193, 0.5290096998214722, 0.2910730540752411, 1.0012928247451782, -0.4311978816986084, 0.19443488121032715, -0.21468792855739594, 0.36757954955101013, -0.19034308195114136, -0.37792959809303284, -0.003984589129686356, 0.14960506558418274, -0.9426831603050232, -0.5802414417266...
def plot _ index ( s, params, i, title ='' ) : if i = ='2': p = len ( params ) params = list ( combinations ( params, 2 ) ) indices = s ['s'+ i ]. reshape ( ( p * * 2 ) ) indices = indices [ ~ np. isnan ( indices ) ] errors = s ['s'+ i +'_ conf']. reshape ( ( p * * 2 ) ) errors = errors [ ~ np. isnan ( errors ) ] else ...
[ -0.3187941610813141, 0.24633029103279114, 0.5081738233566284, 0.03696982190012932, -0.3661949634552002, 0.05430474504828453, 1.1313557624816895, 0.5801495313644409, -0.22214403748512268, 0.22818653285503387, -0.26455754041671753, 1.0751184225082397, 0.13379615545272827, -0.6224871277809143...
def _ handlergridrightclick ( self, gridevent ) : pmenu = wx. menu ('points context menu') self. _ appendgridcommandstomenu ( pmenu, self. _ grid ) self. _ grid. popupmenu ( pmenu, gridevent. getposition ( ) )
[ 0.487180233001709, 0.5187078714370728, 0.7287919521331787, 0.26584675908088684, 0.11307875066995621, -0.5627976655960083, -0.17077423632144928, 0.3318258225917816, 0.09974423050880432, 0.1267005056142807, 0.6302321553230286, -0.26526302099227905, -0.03346747159957886, 0.6099522113800049, ...
def test _ get _ commits ( self ) : commits _ api _ response = json. dumps ( [ {'author':'myname ','id':'bfdde95432b3af879af969bd2377dc3e55ee46e6 ','date':'2015 - 02 - 13 22 : 34 : 01 - 0700 - 0700 ','message':'mymessage ','parent _ id':'304c53c163aedfd0c0e0933776f09c24b87f5944 ', }, {'author':'myname ','id':'304c53c16...
[ 0.5666001439094543, 0.5853516459465027, 1.1267964839935303, -0.5114162564277649, 0.7344298362731934, -0.5792173743247986, -0.22559687495231628, -0.9076973795890808, -0.7082549333572388, -0.26374492049217224, -0.5960221886634827, 1.1618362665176392, -0.629360020160675, 0.315730482339859, ...
def add _ centeredtext ( obj, text, font, fill = 0 ) : return deepcopy ( add _ text ( obj, text, font, xposition = " center ", yposition = " center ", fill = fill ) )
[ 0.5863782167434692, -0.5462493896484375, 0.7041566371917725, 0.20185503363609314, -1.2379530668258667, 0.16867418587207794, -0.5193612575531006, 0.2613919675350189, 1.4453790187835693, 0.6232203245162964, -0.2993026673793793, -0.3126640021800995, -0.6416196227073669, -0.6671377420425415, ...
def preprocessvsm ( self, l2normalize = false ) : nzvals = [ ] rowinds = [ ] colinds = [ ] row = 0 for word, invlist in self. invertedlists. items ( ) : for recid, bm25score in invlist : nzvals. append ( bm25score ) rowinds. append ( row ) colinds. append ( recid ) self. rowids [ word ] = row row + = 1 a = scipy. spars...
[ 0.03628417104482651, 0.2153850644826889, 0.6897458434104919, -0.059338390827178955, -0.5751723051071167, -0.8652956485748291, 0.2523432970046997, 0.6873896718025208, 0.0996200442314148, 0.565080463886261, 0.20563456416130066, 0.6795121431350708, -0.9698724150657654, 1.1291546821594238, -...
def get _ kingdom ( prayer ) : kingdom = none potential _ kingdoms = [ ] for key, val in kingdoms. iteritems ( ) : mentions = prayer. count ( key ) if mentions > 0 : potential _ kingdoms. append ( ( key, mentions ) ) if len ( potential _ kingdoms ) > = 1 : most _ frequent = sorted ( potential _ kingdoms, key = lambda x...
[ 0.010649316944181919, -0.4123576879501343, 0.3211476504802704, 0.04186715930700302, -0.3685474991798401, -0.3616379201412201, 0.8754584789276123, -0.13560514152050018, -0.576596200466156, -0.35963329672813416, 1.1872448921203613, 0.2226853221654892, -0.25287896394729614, 1.4744237661361694...
async def voices ( self ) - > voicesiterable : if not self. session : self. session = aiohttp. clientsession ( ) voices _ url = urljoin ( self. url, " voices " ) _ logger. debug ( voices _ url ) try : async with self. session. get ( voices _ url, ssl = self. ssl _ context ) as response : response. raise _ for _ status ...
[ -0.14435243606567383, -0.57670658826828, 0.427673876285553, -0.46678173542022705, 0.17519980669021606, -0.17652998864650726, -1.8063703775405884, -0.5615738034248352, -0.5170866847038269, 0.158571258187294, 0.023509925231337547, 0.45400410890579224, 0.2449394017457962, 0.17162729799747467,...
def merge _ temporal _ neighbors ( elements, unique _ elements, syllable _ start _ times, syllable _ end _ times, temporal _ neighbor _ merge _ distance _ ms, ) : merged _ elements = { } for element, st, et in tqdm ( zip ( unique _ elements, syllable _ start _ times, syllable _ end _ times ), total = len ( unique _ ele...
[ -0.21612310409545898, 0.2274371087551117, 0.6730852127075195, 0.0023730124812573195, -0.6004930138587952, 0.3252564072608948, 0.20961874723434448, 0.775942862033844, 0.2470417320728302, 0.7667480111122131, -0.6441788077354431, 0.48704198002815247, -0.31766027212142944, 0.4408324360847473, ...
def _ handshake ( self ) : while true : message = self. receive ( ) if message = ='ready': self. send ('ok') break
[ -0.2076280415058136, 0.30011221766471863, 0.601348340511322, -0.18040837347507477, 0.23755264282226562, -0.17849141359329224, -0.9163126349449158, -0.5708437561988831, -0.5353944301605225, 0.11399957537651062, 0.23889487981796265, -0.38621199131011963, -0.5185806751251221, -0.0282245352864...
def node _ checked ( self, * path, * * kwargs ) : leaf = self. expand _ path ( * path, * * kwargs ) if not self. is _ checkable ( leaf ) : return false return self. is _ checked ( leaf )
[ -0.6251924633979797, 0.49857982993125916, 0.5942851305007935, 1.377813458442688, -0.01836542971432209, 0.33316007256507874, -0.01875666156411171, 0.3526913821697235, -0.5865370035171509, 0.163994699716568, 0.403495728969574, -0.1351633369922638, -0.9316689372062683, -0.03420346602797508, ...
def graphs ( args, intake, output, limits ) : if'2'in args. graph or'4'in args. graph : for chamber in range ( 1, 9 ) : df = pandas. read _ csv ('{ } / ch { }. csv '. format ( intake, chamber ), header = 1, names = ['hour ','mean ','sd ','se ','start time ','end time ','n'] ) if args. sd : df. plot. scatter ( x ='hour ...
[ -0.19983895123004913, 0.6474534273147583, 1.0939029455184937, 0.08329707384109497, -0.3632233440876007, 0.5591577291488647, 0.4615875780582428, -0.3067682683467865, -0.19463972747325897, 0.7149657011032104, 0.1874946504831314, 0.418776273727417, 0.11357881128787994, -0.6118529438972473, ...
def request _ status ( request _ id ) : cur. execute ( " select * from requests where id = % s ; ", ( request _ id, ) ) requests = cur. fetchone ( ) return requests
[ -0.6418194770812988, -0.31860825419425964, 0.1601487398147583, -0.04881579056382179, 0.5292452573776245, -0.5417249798774719, -1.9157087802886963, -0.17931847274303436, 0.16026906669139862, 0.07795095443725586, 0.17477980256080627, -0.1913825273513794, 0.0761650875210762, 0.190094366669654...
def joined ( message ) : room = session. get ('room') join _ room ( room )
[ 0.36081862449645996, -0.29223811626434326, 0.20955142378807068, 1.123262882232666, 0.7530559301376343, -0.04018114507198334, -0.27877292037010193, 0.16750264167785645, 0.09698943793773651, 0.14368368685245514, -0.9968833923339844, 0.5561607480049133, -0.8618274927139282, 0.7978179454803467...
def hawki _ catalog ( include _ jwstmags = true ) : catalog _ dir = os. path. join ( local _ dir,'catalogs') if include _ jwstmags : hawki _ catalog _ jwstmags _ file = os. path. join ( catalog _ dir,'{ }. fits '. format ( hawki _ catalog _ jwstmags _ catalog _ name ) ) if os. path. isfile ( hawki _ catalog _ jwstmags ...
[ 0.6713622212409973, -0.02537159062922001, 0.8210513591766357, -0.0617331936955452, -0.7723143696784973, -0.1717463731765747, 0.06915894150733948, 0.14328350126743317, -0.694794237613678, 0.13710446655750275, 0.7873383164405823, 0.15866057574748993, 0.2789755165576935, -0.42745712399482727,...
def process _ session ( self, curr _ line ) : curr _ data _ fields = curr _ line. split ( ", " ) curr _ ip = str ( ) curr _ date = str ( ) curr _ time = str ( 0 ) try : curr _ ip = curr _ data _ fields [ self. data _ field _ index [ " ip " ] ] curr _ date = curr _ data _ fields [ self. data _ field _ index [ " date " ]...
[ -0.3281203508377075, -0.3563512861728668, 0.829918622970581, 0.2930816113948822, -0.2530972361564636, -0.27833712100982666, 0.018050437793135643, -0.17378541827201843, 0.05134425312280655, 0.6094807386398315, -0.08306943625211716, -0.34501174092292786, -0.22488373517990112, -0.360223501920...
def importable ( obj, alias ='', source = none, builtin = true ) : # note : we always'force ', and'lstrip'as necessary # note : for'enclosing ', use importable ( outermost ( obj ) ) if source is none : source = true if isfrommain ( obj ) else false elif builtin and isbuiltin ( obj ) : source = false tried _ source = tr...
[ -0.4479737877845764, 0.4301629066467285, 0.7110666036605835, -0.2350691556930542, -1.2305628061294556, -0.6511238813400269, 0.9079312086105347, -0.0750344842672348, 0.29147112369537354, 0.33980053663253784, -0.28656166791915894, 0.6294913291931152, -0.19660897552967072, -0.3032337129116058...
def chroma _ matrix _ vertical _ size ( self, chroma _ matrix _ vertical _ size ) : # type : ( int ) - > none if chroma _ matrix _ vertical _ size is not none : if not isinstance ( chroma _ matrix _ vertical _ size, int ) : raise typeerror ( " invalid type for ` chroma _ matrix _ vertical _ size `, type has to be ` int...
[ 0.04223046824336052, -0.40516164898872375, -0.1735398918390274, 0.7591698169708252, 0.14236845076084137, 0.5783677101135254, 0.5215731263160706, 0.0779624879360199, -0.6890862584114075, -0.24619413912296295, -1.1455025672912598, -0.08507928997278214, -0.9090390205383301, 0.3151442706584930...
def query ( self, key ) : if isinstance ( key, str ) : if key in ( " tree ", " prog " ) : raise syntaxerror ( " argument must be a field or integer. " ) self. _ root _ io. get _ fields ( self, fields = [ key ] ) if self. field _ info [ key ]. get ( " type " ) = = " analysis " : return self. _ field _ data. pop ( key ) ...
[ -0.4473079442977905, 0.74973464012146, 0.49557989835739136, -0.12571339309215546, -0.4041103720664978, -0.09061019122600555, 0.010089024901390076, -0.9409809112548828, -0.4782271087169647, -0.26806652545928955, 1.0610764026641846, -0.18428020179271698, -0.970191240310669, -0.05341326817870...
def checkmapping ( clinicaldf, primaryname, secondaryname, mapping, required = false, filetype = " patient " ) : warning = " " error = " " if clinicaldf. get ( primaryname ) is not none : race = primaryname else : race = secondaryname havecolumn = checkcolexist ( clinicaldf, race ) if not havecolumn : if required : err...
[ -0.05389249697327614, -0.25940659642219543, 0.8674711585044861, -0.3014892339706421, 0.38120537996292114, 0.41312697529792786, 0.11131590604782104, 0.5493612885475159, -1.0737954378128052, 0.3977607786655426, 0.4003088176250458, 0.6560013890266418, 0.632290780544281, 0.832974910736084, 0...
def login ( request ) : if request. post : # authenticate user credentials from anywhere on the site : try : request. post [ " auth " ] errors = models. user. objects. login _ validations ( request. post ) if len ( errors ) = = 0 : return redirect ( request. post [ " auth " ] ) else : return redirect ( request. post [ ...
[ -0.3329658508300781, -0.3962573707103729, 0.7690427303314209, 0.6707122325897217, -0.2257106900215149, 0.925728976726532, 0.2325812131166458, -0.105003722012043, 0.7254519462585449, -0.4986509084701538, 0.5629732012748718, 0.26852449774742126, 0.12284359335899353, -0.1317652463912964, -0...
def tell ( self ) : return 0
[ 0.2205483317375183, -0.3961329758167267, 0.1724797934293747, 0.34242498874664307, 0.9371148943901062, 1.222000002861023, 0.4949188828468323, -0.024170830845832825, -0.11720162630081177, -0.27364856004714966, -0.10234184563159943, 0.10571111738681793, -1.1540499925613403, 0.304452121257782,...
def predict9itemsbymodel ( self, model, newstates ) : # calculate value array for each item, each array has length newstates. shape [ 0 ] tmp = np. ctypeslib. as _ ctypes ( newstates ) newstates _ shared = sharedctypes. rawarray ( tmp. _ type _, tmp ) args = [ ( model, itemid ) for itemid in range ( 1, n _ items + 1 ) ...
[ 0.24232499301433563, -0.3114258348941803, 0.5902910828590393, 0.37188491225242615, 0.02866661362349987, -0.19363167881965637, -0.19578270614147186, -0.4679020047187805, -0.11629121005535126, 0.2113608419895172, -1.0396441221237183, -0.10968520492315292, 0.20851947367191315, 0.5271303057670...
def load _ stored _ item ( hashed _ grammar, path, item, cache _ path ) : item = _ load _ from _ file _ system ( hashed _ grammar, path, item. change _ time - 1, cache _ path ) return item
[ 0.22419580817222595, -0.2745314836502075, 0.1999715119600296, 1.005683422088623, -0.22772090137004852, 0.1334058940410614, -0.8830340504646301, -0.20486930012702942, -0.6390917897224426, 0.3156011998653412, -0.06713823974132538, 0.764378547668457, -0.25972455739974976, -1.0896834135055542,...
def test _ skip _ payments ( self, mock _ send _ email ) : payments = [ {'uuid':'wargle - aaaa ','processor _ id': 1,'recipient _ name':'john ','amount': 1700,'status':'pending ','created': datetime. now ( ). isoformat ( ) +'z ','modified': datetime. now ( ). isoformat ( ) +'z ','prisoner _ number':'a1409ae ','prisoner...
[ -0.3457639813423157, 0.11993451416492462, 0.6920967698097229, -0.5769330263137817, -0.14505904912948608, 0.35610106587409973, 0.3274680972099304, 0.02859935350716114, -0.460205078125, -0.00992183294147253, -0.08744016289710999, -0.2294960916042328, 0.2697071433067322, -0.10507560521364212,...
def _ computeccdexposureid ( self, dataid ) : visit = dataid ['visit'] return int ( visit )
[ -0.06390062719583511, 0.142768993973732, 0.1701972931623459, -0.7163541913032532, -0.5740404725074768, -0.522652804851532, 1.297442078590393, 0.7995506525039673, 0.4807929992675781, 0.8965550065040588, 0.6703094840049744, -0.27628374099731445, -0.0018148303497582674, -0.2921766936779022, ...
def end ( self ) : cmds. progressbar ( self. mmainprogressbar, edit = true, endprogress = true ) cmds. waitcursor ( state = false )
[ -0.073404461145401, -0.7588716745376587, 0.5456018447875977, 0.07945992052555084, 0.06745664775371552, 1.353094458580017, 0.5688035488128662, 0.5295870304107666, -0.8027528524398804, -0.018579047173261642, -0.12801593542099, -0.5560398101806641, -1.5821608304977417, 1.0397495031356812, 0...
def _ _ get _ resolution ( self, output = none ) : if output is none : output = self. output index = output. ui. resolution if index = = 2 : res _ scale = 75. 0 elif index = = 3 : res _ scale = 50. 0 elif index = = 4 : res _ scale = 25. 0 elif index = = 5 : res _ scale = 10. 0 elif index = = 6 : res _ scale = 5. 0 else...
[ -0.7017427086830139, -0.5629414319992065, 0.9543008208274841, -0.25736209750175476, 0.14455264806747437, -1.0711828470230103, 0.15426605939865112, -0.5818896889686584, -0.7170432209968567, -0.11488780379295349, -0.5197771191596985, -1.0685704946517944, -0.3765442371368408, -0.0955246090888...
def get _ encoder _ by _ name ( name, row, col, mine ) : module = importlib. import _ module ('encoders.'+ name ) constructor = getattr ( module,'create') return constructor ( row, col, mine )
[ 0.07739592343568802, -0.17863380908966064, 0.283234566450119, 0.5655076503753662, -0.7077288031578064, 0.06307654082775116, -0.5609332323074341, -1.625412106513977, -0.35772138833999634, 0.9149381518363953, -0.6462582349777222, 0.28805217146873474, -0.47082531452178955, 0.37814486026763916...
def tokenize ( text ) : # change to lower case format text = text. lower ( ) # remove punctuation characters text = re. sub ( r " [ ^ a - za - z0 - 9 ] ", " ", text ) stop _ words = stopwords. words ( " english " ) # tokenize words = word _ tokenize ( text ) # reduce words to their stems stemmed = [ porterstemmer ( ). ...
[ -0.3333995044231415, -0.8267349600791931, 0.4404793977737427, -0.41454416513442993, -0.27534836530685425, 0.4528239071369171, -0.9921358227729797, 0.985690712928772, 0.5225039124488831, 0.19337689876556396, -1.0294831991195679, -0.03828812390565872, -0.5825545787811279, 0.9448570013046265,...
def is _ displayed ( self ) : try : return " in " in self. browser. classes ( self ) except nosuchelementexception : return false
[ -0.5186067223548889, -0.3715524971485138, 0.818273663520813, 0.9009464383125305, 0.07502070814371109, 0.8303621411323547, 0.07841750234365463, 0.4365746080875397, 0.8072959184646606, 0.15133316814899445, 0.2480185478925705, -0.06544123589992523, -0.3806191086769104, 1.0343214273452759, -...
def test _ create _ event _ invalid _ input ( self ) : eventtype. insert _ event _ types ( ) eventcategory. insert _ event _ categories ( ) role = role. query. filter _ by ( name = " event organizer " ). first ( ) user = testmodelfactory. create _ user ( password = " password " ) user. role = role db. session. add ( us...
[ -0.13762906193733215, 0.4561273753643036, 0.9089221358299255, 0.40699559450149536, 0.6489373445510864, 0.7999727129936218, 0.49030226469039917, -0.02797774225473404, -0.32634875178337097, -0.8316953778266907, -0.46001046895980835, 0.059096019715070724, -0.007941968739032745, 0.584082782268...
async def async _ step _ reauth ( self, entry _ data : mapping [ str, any ] ) - > flowresult : return await self. async _ step _ reauth _ confirm ( )
[ -0.6514012813568115, -0.3146522641181946, 0.3362869918346405, 1.142995834350586, 0.34237000346183777, -0.8990646600723267, -0.0498846098780632, 1.0038809776306152, 0.48691797256469727, 0.23344290256500244, -0.22230079770088196, 1.3001165390014648, -0.00008650854579173028, -0.57417672872543...
def sms _ reply ( ) : # start twiml response resp = messagingreponse ( ) # get the user's text message text = request. values. get ('body ', none ) # add message to our response resp. message ( " two can play that game! \ n " + str ( text ) ) # return the message return str ( resp )
[ -0.1673106849193573, 0.22674979269504547, 0.45324620604515076, -0.7269898056983948, -0.2553536891937256, -0.41195499897003174, -0.5241988301277161, -0.04831783473491669, 1.1712324619293213, 0.10515585541725159, 0.09042417258024216, -0.07577573508024216, -1.1516910791397095, 0.1629067659378...
def create _ path ( faces _ path ) : try : isexist = os. path. exists ( faces _ path ) if not isexist : os. makedirs ( faces _ path ) except exception as e : messagebox. showerror ( " path creation error ", str ( e ) )
[ 0.254629522562027, 0.08208276331424713, 0.5942971110343933, 0.6128891110420227, 0.6715933084487915, 1.327301263809204, 1.6729731559753418, -0.8561566472053528, -0.2560134828090668, -0.5151131749153137, 0.1940874308347702, -0.6037394404411316, 0.2691871225833893, 0.7472009062767029, 0.194...
def _ _ init _ _ ( self, asyncsocketspool, socket, recvbufslot = none, sendbufslot = none ) :...
[ 0.13322772085666656, 0.6220049858093262, 0.5201332569122314, 0.4683258533477783, -0.6978870630264282, -0.6317713260650635, 0.7753109335899353, -1.1075414419174194, 0.21596196293830872, -0.6255268454551697, -0.07209473103284836, 1.0615237951278687, 0.31075114011764526, -0.06888211518526077,...
def probability ( self ) : odds = math. pow ( math. e, self. _ log _ odds ) return odds / ( odds + 1 )
[ -0.06910000741481781, 0.49175816774368286, 0.5482961535453796, -0.32323193550109863, -0.18087248504161835, 0.9543280601501465, 0.10167445242404938, 0.04348479583859444, 0.45806950330734253, -0.015124409459531307, 0.8963940739631653, -0.23294366896152496, -0.41409942507743835, -0.4665891528...
def write ( self, offset, data ) : if offset < 0 : raise valueerror ( " offset cannot be negative. " ) idx = offset > > 2 if offset % 4 : raise memoryerror ('unaligned write : offset must be multiple of 4.') # integer if type ( data ) is int : self. _ debug ('writing 4 bytes to offset { 0 : x } : { 1 : x } ', offset, d...
[ -0.49435532093048096, -0.000861912383697927, 0.5692023634910583, -0.9645655155181885, 0.565455436706543, 0.34456828236579895, -0.07910256832838058, -0.021903669461607933, 0.4089004695415497, 0.379500150680542, -0.30933278799057007, 0.5959803462028503, -0.8483859300613403, 0.892854928970336...
def test _ query _ eod _ history _ and _ realtime _ db ( self ) : def mock _ get _ history _ db _ config ( db ) : return { " bar _ size " : " 1 day ", " universes " : [ " usa - stk " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ", " low " : " float ", " volume...
[ 0.03129761293530464, 0.3166637420654297, 0.9489921927452087, 0.018824169412255287, 0.7167471051216125, -0.4056680202484131, 0.5906006693840027, -0.43323931097984314, -0.11767134070396423, -0.06052444502711296, -0.051474679261446, -0.08820690959692001, 0.11266105622053146, 0.626540601253509...
def registered _ events ( self ) - > list : # fixme, need to merge in manual registrations, which i don't have yet event _ bindings = uvicore. ioc. binding ( type ='event') events = [ ] for binding in event _ bindings. values ( ) : events. append ( {'name': binding. path,'description': binding. object. _ _ doc _ _,'is ...
[ -0.533551037311554, 0.5493543744087219, 0.46102866530418396, 1.1511156558990479, 0.9693219661712646, -0.5230314135551453, 0.28983932733535767, 0.560872495174408, -0.11031302064657211, 0.8777998089790344, -0.8275318145751953, 0.3311777412891388, 0.38400208950042725, 0.5123131275177002, 0....
def samplewithmoreinfo ( self, num ) : failtimes = 0 ; self. mdistsamples = [ ] while ( failtimes < num ) : rnd1 = randrange ( 0, self. mworld. mwidth ) ; rnd2 = randrange ( 0, self. mworld. mheight ) ; newsamp = true ; for sample in self. mdistsamples : if sample. withinarea ( rnd1, rnd2 ) : newsamp = false ; failtime...
[ -0.6030771136283875, -0.5561635494232178, 0.569800615310669, 0.13604600727558136, -0.6364115476608276, 0.25382038950920105, -0.010800948366522789, -0.93321692943573, 0.6424375772476196, 0.14188072085380554, 0.1319732666015625, 0.3003401458263397, -0.016563259065151215, 0.9103004336357117, ...
def install _ blockchains ( prefab ) : print ( " installing blockchains " ) prefab. system. base. install ( upgrade = true ) prefab. blockchain. tfchain. build ( ) prefab. blockchain. tfchain. install ( ) prefab. blockchain. bitcoin. build ( ) prefab. blockchain. bitcoin. install ( ) prefab. blockchain. atomicswap. bui...
[ -0.16158369183540344, 0.49196264147758484, 0.6467939615249634, 0.4427909553050995, 1.01760995388031, 0.09580303728580475, 0.38031381368637085, -0.9724728465080261, 0.23655925691127777, 0.9669517278671265, -1.119730830192566, -0.3230728805065155, -0.2518392503261566, 0.5051358342170715, -...
def plugins _ from ( option _ manager ) : return [ {'plugin': plugin. name,'version': plugin. version,'is _ local': plugin. local, } for plugin in sorted ( option _ manager. registered _ plugins ) ]
[ -0.4369901120662689, -1.2678660154342651, 0.3252065181732178, 0.047296568751335144, 0.2851795554161072, -0.2683233320713043, -0.28073954582214355, 0.0540461391210556, 0.36688414216041565, 1.1450661420822144, -1.3625702857971191, 0.6774410605430603, 0.2523287832736969, 0.21138806641101837, ...
def acl6pktsdeniedrate ( self ) : try : return self. _ acl6pktsdeniedrate except exception as e : raise e
[ 0.8146221041679382, 0.17112919688224792, 0.162763312458992, 0.22015273571014404, -0.5011871457099915, 0.2706729769706726, -0.3476593792438507, -0.6100874543190002, 0.44685205817222595, -0.8854241371154785, 0.8593850135803223, -0.040698617696762085, -0.1388300210237503, 0.3786565065383911, ...
def calcskye ( binwidth, sigma, periodcut, filenamein, filenameout, threshnameout, plotname, opt = none ) : # general idea # # 1 ) count the number of transits in the skygroup, and the number of bins # # 2 ) divide, that's the rate # # 3 ) multitple rate by s, that's the cutoff # # 4 ) cut out outliers, and count new n...
[ 0.2509894371032715, 0.3916887938976288, 0.6868063807487488, -0.30290210247039795, -0.7036442160606384, 0.00434843497350812, 0.7272791266441345, 0.7478737235069275, 0.23711566627025604, 0.8321504592895508, 0.4146641194820404, 0.31655153632164, 0.6404050588607788, 0.3879433572292328, 0.699...
def fake _ init ( self ) : self. _ dockermonitor _ _ container _ checker = none self. _ dockermonitor _ _ version _ lock = threading. rlock ( ) self. _ dockermonitor _ _ version = none
[ -0.13286589086055756, -0.281903475522995, 0.2999317944049835, 0.3054783046245575, 1.225329041481018, -0.19089241325855255, 0.8590768575668335, -0.9452709555625916, -0.10449087619781494, -0.3593272566795349, -1.6546224355697632, 0.586709201335907, -0.508102297782898, 1.4440962076187134, 0...
def type ( self ) : return self. _ get ( " _ _ type " )
[ -0.2530391216278076, 0.5941651463508606, 0.33127403259277344, 0.5828227400779724, 1.384368658065796, 0.45344531536102295, 1.022904872894287, -0.8871521353721619, 0.6944674849510193, -0.8040934801101685, 0.020079754292964935, 1.1413342952728271, -0.668596625328064, -0.20095720887184143, 0...
def check _ tfchain _ synced ( prefab, height _ threeshold = 10 ) : testnet _ explorer ='https : / / explorer. testnet. threefoldtoken. com / explorer'res = requests. get ( testnet _ explorer ) if res. status _ code = = 200 : expected _ height = res. json ( ) ['height'] _, out, err = prefab. core. run ( cmd ='tfchainc ...
[ 0.46178901195526123, 0.26644977927207947, 0.5012569427490234, -0.09475681930780411, 0.17718423902988434, 0.06458376348018646, 0.13720236718654633, -0.24163980782032013, -0.8282333016395569, 0.27032989263534546, -0.9047742486000061, 0.8859370946884155, -0.11862564831972122, -0.0174558404833...
def build ( self, * * kwargs ) : if self. _ graph is none : raise runtimeerror ( " please call'trainer. make _ data ( graph )'first. " ) use _ tfn = kwargs. get ( " use _ tfn ", true ) if self. backend = = " tensorflow " : with tf. device ( self. device ) : self. model, kwargs = gf. wrapper ( self. model _ step ) ( * *...
[ -0.502616822719574, 0.845177412033081, 0.550672173500061, 0.5899950265884399, 0.6715441942214966, 0.4428788721561432, -0.11343833059072495, 0.23979894816875458, -1.3379993438720703, -0.4492632746696472, -0.5838915109634399, -0.24435904622077942, 0.07979288697242737, -0.3937753140926361, ...
def remove _ duplicates _ from _ new ( self, new _ results : pd. core. frame. dataframe ) - > pd. core. frame. dataframe : df _ deduped = pd. dataframe ( columns = new _ results. columns ) for index, row in new _ results. iterrows ( ) : # gpid _ exists = self. dfloc. gpid. str. contains ('chijt'). any ( ) : gpid _ exis...
[ -0.10028683394193649, 0.014127897098660469, 0.36494144797325134, 0.04944644495844841, 0.39700642228126526, -0.23021981120109558, 0.3333243727684021, -0.5630263686180115, -0.478481650352478, 0.11971492320299149, 0.40622371435165405, -0.07211603969335556, -0.34492623805999756, 0.515788018703...
def _ _ next _ _ ( self ) : if self. n < self. max : res = 2 * * self. n self. n + = 1 return result else : raise stopiteration # to indicate foo loop that it stops
[ -0.9962790608406067, 0.6943721175193787, 0.5601643323898315, 0.7047067880630493, -0.45011961460113525, -0.26930123567581177, 0.11358539760112762, -0.5855997800827026, -0.633725643157959, -0.8609828352928162, -0.12745502591133118, -0.2670566737651825, -0.2587023377418518, -0.121811710298061...
async def async _ step _ timeout ( self, _ : none = none ) - > flowresult : return self. async _ abort ( reason = " operation _ took _ too _ long " )
[ -0.025775661692023277, 0.8171870708465576, 0.5356386303901672, 0.2958434820175171, 0.011125676333904266, -0.6015725135803223, 0.2566290497779846, 0.39145612716674805, -0.020745763555169106, 0.6017264723777771, 0.5763959884643555, -0.325105756521225, 0.3776555359363556, -0.4461677670478821,...
def test _ devicemanager _ load _ descriptions ( device _ manager, datadir, filename ) : os. chdir ( datadir ) device _ manager. add _ description ( filename ) assert device _ manager. modelname = ='fritz! box 7590 '
[ 0.19021101295948029, 0.8646799921989441, 0.2787350118160248, -0.4635610580444336, 0.04646456986665726, 0.34984925389289856, -0.43977227807044983, 0.4001547396183014, -0.4614005386829376, -0.7524414658546448, -0.20662134885787964, -0.042891763150691986, 0.48102009296417236, 1.08123278617858...
def finalize _ win32 ( self ) : sysver = sys. version _ info [ : 2 ] # add compiler - specific arguments : extra _ compiler _ args = [ ] if self. compiler _ is _ mingw ( ) : # default mingw compilation of python extensions on windows uses # only - o : extra _ compiler _ args. append ('- o3') # gcc - compiled python on ...
[ -0.1000489741563797, -0.4216741621494293, 0.7892203330993652, -0.14165137708187103, 0.04824845492839813, 0.41966503858566284, 0.0910661444067955, -0.2630932629108429, 0.05458344519138336, -0.38646066188812256, -0.4202888309955597, 0.17852896451950073, -0.7006723284721375, 1.947727799415588...
def sample _ to _ tsv ( df _ path, xml _ filename, save _ as _ tsv = true ) : print ( " original xml dateframe : ", xml _ filename ) tree = et. parse ( df _ path + xml _ filename ) root = tree. getroot ( ) # # # # # # # # # # # # # # # # # # data for subtask a + b # # # # # # # # # # # # # # # # # # # # # # # # df = cr...
[ 0.3824079930782318, 0.39397132396698, 0.961507260799408, -0.01676432229578495, -0.510604739189148, -0.0035683310125023127, 0.6328871250152588, 0.3722017705440521, -0.6628060340881348, -0.21961764991283417, -0.37544214725494385, -0.023814361542463303, 1.292433500289917, 0.2656020522117615, ...
def run _ local _ task ( task : tree. task, posix _ inputs : env. bindings [ value. base ], run _ id : optional [ str ] = none, run _ dir : optional [ str ] = none, copy _ input _ files : bool = false, logger _ prefix : str = " wdl : ", max _ workers : optional [ int ] = none, # unused ) - > tuple [ str, env. bindings ...
[ -0.4487820267677307, -0.4685783088207245, 0.8184182643890381, -0.21227474510669708, -0.35613566637039185, -0.3626965880393982, 0.607768714427948, 0.29641595482826233, -0.8040656447410583, 0.05307690054178238, -0.518441915512085, 0.5285574793815613, 0.9717724323272705, 0.7960034012794495, ...
def test _ md5 _ matching ( self ) : filepath ='my / random / file'file _ contents ='random file contents'checksum = hashlib. md5 ( file _ contents ). hexdigest ( ) m = magicmock ( spec = file, return _ value = io. bytesio ( file _ contents ) ) with patch ('s3yum. util. open ', m, create = true ) : self. asserttrue ( m...
[ 0.4956643283367157, 0.5298383831977844, 0.4966084659099579, 0.05801880359649658, 0.03416534885764122, 0.6379229426383972, 0.9370042085647583, 1.1622086763381958, 0.2929522395133972, -0.7210206985473633, -0.4575638175010681, -1.049865961074829, -0.05990704521536827, -0.42420104146003723, ...
def score _ to _ file ( cls, deployment, intake _ path, output _ path, * * kwargs ) : kwargs [ " intake _ settings " ] = { " type " : " localfile ", " file " : intake _ path, } kwargs [ " output _ settings " ] = { " type " : " localfile ", " path " : output _ path, } return cls. score ( deployment, * * kwargs )
[ 0.13882634043693542, -1.2891088724136353, 0.5984162092208862, -0.23298567533493042, 0.7314651608467102, 0.30133235454559326, -0.11964787542819977, -0.2039526104927063, -1.0749253034591675, 1.182451844215393, 0.4493698477745056, 0.036503713577985764, -0.16157060861587524, -0.462149769067764...
def test _ update _ incomplete _ payments _ doesnt _ sent _ email _ if _ no _ captured _ date ( self, mock _ send _ email ) : with responses. requestsmock ( ) as rsps : mock _ auth ( rsps ) rsps. add ( rsps. get, api _ url ('/ payments /'), json = {'count': 1,'results': [ payment _ data ], }, status = 200, ) rsps. add ...
[ -0.5294861793518066, 0.46403780579566956, 0.54059898853302, -0.3362274467945099, 0.17937137186527252, 0.33634206652641296, -0.03976457566022873, 0.038730964064598083, -0.24993468821048737, -0.33349135518074036, -0.4353962540626526, 0.5086496472358704, -0.05429839342832565, 0.42333281040191...
def start ( self ) : self. map. build ( ) self. state = game. state _ running ev = gamestartedevent ( self ) self. evmananger. post ( ev )
[ 0.11967860162258148, -0.9589647650718689, 0.5561501979827881, 0.32765698432922363, 0.566539466381073, 0.7067948579788208, -0.41038212180137634, 1.057893991470337, 0.0054344735108315945, -0.2449299544095993, -0.8414735198020935, 0.37981486320495605, 0.36090800166130066, 0.6296457648277283, ...
def _ _ encode _ params ( params ) : return urllib. parse. urlencode ( _ flatten _ params ( params ) )
[ -0.5810242891311646, -0.1625330001115799, 0.038859300315380096, -0.10265244543552399, 0.25126636028289795, 0.10746335238218307, -0.4791686236858368, 0.25867873430252075, -0.2522694766521454, 0.44618770480155945, 0.04564636945724487, 0.37647485733032227, -0.9587473273277283, 0.6874284744262...
def draw ( self, parent _ name : str, child _ name : str ) : edge = pydot. edge ( parent _ name, child _ name ) self. graph. add _ edge ( edge )
[ 0.3531644344329834, 0.1329018473625183, 0.4990999698638916, -0.8179584741592407, 0.03636439889669418, 0.8803886771202087, -1.050105333328247, 0.27035853266716003, -0.5800686478614807, -0.8825293779373169, -0.4915562570095062, 0.21056944131851196, 0.4835963547229767, -0.4883861541748047, ...
def reset _ board ( self ) : for pos in self. cells : self [ pos ] = none
[ -0.2510591745376587, 0.0004843473434448242, 0.22735948860645294, 0.16163977980613708, 0.937741756439209, -1.0998913049697876, -0.13049563765525818, 0.14680586755275726, -0.8034606575965881, -0.24826696515083313, -0.6926283836364746, 0.2966049313545227, -0.25008609890937805, 0.0700286179780...
def kendall _ tau _ prob ( tau, pairs ) : import numpy as np from scipy import special try : svar = ( 4. 0 * pairs + 10. 0 ) / ( 9. 0 * pairs * ( pairs - 1 ) ) except : svar = 1 try : z = tau / np. sqrt ( svar ) except : z = 1 return special. erfc ( np. abs ( z ) / 1. 4142136 )
[ 0.901637077331543, 0.03258346766233444, 0.5022872686386108, 0.1986381858587265, -0.7116096615791321, -0.1978517770767212, 0.07507508993148804, -0.28859803080558777, 0.8477761149406433, 0.27390673756599426, 0.8136833906173706, -0.34590810537338257, -0.7212732434272766, -0.3043208122253418, ...
async def quote ( self, ctx : context, member : optional [ member ] = none ) : channel = ctx. guild. get _ channel ( quote _ channel _ id ) message = await ctx. send ( f " getting quote from { channel. mention }... " ) quote : quote = await self. get _ quote ( member ) if quote is none : if member is none : await messa...
[ 0.5591982007026672, -0.1598641723394394, 0.5483561158180237, 0.8127825856208801, 0.8795228004455566, -0.5648425817489624, -0.499886691570282, 0.24739950895309448, 0.08611521869897842, -0.052284397184848785, 0.34147128462791443, 1.2051286697387695, -0.9831255078315735, 0.43589261174201965, ...
def packb ( obj, * * kwargs ) : return msgpack. packb ( obj, default = _ encode _ ext _ type, use _ bin _ type = true, * * kwargs )
[ 0.1778838038444519, 0.7694765329360962, 0.820412278175354, 1.7302230596542358, -0.3518657386302948, -0.026454458013176918, -0.2654866874217987, -1.077799916267395, 0.619189441204071, -0.20056885480880737, -1.019112229347229, 0.6344046592712402, -1.7988015413284302, 0.43278366327285767, 0...
def process _ message ( self, context ) : try : if " text " in context : self. process _ text ( context ) else : if self. database. get _ authorised ( telegram _ id = context [ " from " ] [ " id " ] ) : if " document " in context : if context [ " document " ] [ " file _ size " ] < = 2000000 : self. process _ media ( co...
[ -0.4169483184814453, 0.031907662749290466, 0.9149134159088135, 0.9549179673194885, 0.24427147209644318, 0.226949080824852, -0.09217366576194763, -0.7642971277236938, 0.10007381439208984, 0.3598564863204956, 0.1914079189300537, 0.3949161171913147, -0.09482178837060928, 0.6274556517601013, ...
def ancestors ( self, lhs, rhs ) : def _ search ( node ) : if node in lhs : return true if not node. parent : return false return _ search ( node. parent ) return [ node for node in rhs if _ search ( node ) ]
[ -0.6423678994178772, -0.3836042582988739, 0.6218699812889099, 0.03163189813494682, -0.16217444837093353, 0.38475778698921204, -1.2282391786575317, 0.25781551003456116, -1.0770002603530884, 1.3365877866744995, 0.2841217517852783, 0.8268374800682068, -0.22443035244941711, 1.1753337383270264,...
def avg _ precision ( outputs : torch. tensor, targets : torch. tensor ) - > torch. tensor : targets _ sort _ by _ outputs = process _ recsys _ components ( outputs, targets ) precisions = torch. zeros _ like ( targets _ sort _ by _ outputs ) for index in range ( outputs. size ( 1 ) ) : precisions [ :, index ] = torch....
[ -0.30827492475509644, -0.6388300061225891, 0.6940879225730896, -0.5192891359329224, -0.2235763818025589, -0.6137351393699646, 0.49847063422203064, -0.12146781384944916, -0.22956712543964386, 1.1170638799667358, 1.0392978191375732, 0.440494179725647, 0.6340135335922241, -0.06649955362081528...
def _ legacyinfertensorrepresentationfromschema ( schema : schema _ pb2. schema ) - > dict [ str, schema _ pb2. tensorrepresentation ] : result = { } for feature in schema. feature : if not _ shouldincludefeature ( feature ) : continue if feature. type = = schema _ pb2. featuretype. struct : result. update ( _ inferten...
[ -0.38516679406166077, -0.017482291907072067, 0.5345857739448547, 0.47843459248542786, -0.06991664320230484, -0.6925485730171204, 0.44502460956573486, 0.16717828810214996, -0.5071530938148499, -0.07392148673534393, -0.7696900367736816, 0.16729317605495453, 0.46468251943588257, 0.16726192831...
def grad ( self ) : return self. gradient ( )
[ -1.0013759136199951, 0.07654817402362823, 0.36644694209098816, -0.07281070947647095, 0.15807344019412994, 0.5502771735191345, 0.5389360189437866, 0.18118946254253387, -1.1955469846725464, -1.1044106483459473, -0.5909042358398438, 0.19309058785438538, -0.8635058999061584, 0.2326634824275970...
def display _ all _ legends ( self ) : for legend in self. _ legends. values ( ) : if not self. legend _ is _ displayed ( legend ) : self. browser. click ( legend )
[ 0.5340204238891602, -0.24082216620445251, 0.3927224576473236, 0.11073236912488937, 0.7480318546295166, 0.29536762833595276, 0.08048970997333527, 0.07293231785297394, 0.4351952075958252, 0.33522507548332214, 0.7698490023612976, 0.24471460282802582, 0.10801733285188675, 1.6916615962982178, ...
def main ( ) : # approach : # first, i looked up to find a page that defines all nba team mascots # then, i used beautiful soup to come up with the name of the city based on the nba team # next, i grabbed a page that ranks the popularity of team names # then, i used beautiful soup to come up witha score for each time b...
[ 0.4371158480644226, -0.17763379216194153, 0.9127941131591797, -0.5006166100502014, -0.04982937499880791, 0.2782025635242462, -0.17897534370422363, -0.4632440507411957, -0.7511959075927734, -0.3525238037109375, 0.3765351474285126, 0.046606194227933884, 0.1894976645708084, 0.0104792071506381...
def _ noop ( * args, * * kws ) : pass
[ -1.0301998853683472, 0.095551498234272, 0.5387099981307983, -0.4790157675743103, 0.5023366808891296, -0.13321341574192047, 0.20502528548240662, -0.5770832896232605, -0.2079402059316635, -0.15962742269039154, 0.08233469724655151, 0.2580321133136749, 0.5110623836517334, -0.4061013162136078, ...
def build _ graph _ from _ triples ( self, sub : str = none, pred : str = none, obj : str = none ) - > none : page = 1 page _ size = 1000 headers = {'accept':'application / n - triples'} url ='https : / / hdt. lod. labs. vu. nl / triple'count = self. count _ triples ( str ( obj ) ) max _ pages = round ( int ( count ) /...
[ -0.5308336615562439, 0.1206737756729126, 0.9268284440040588, -0.9565376043319702, -0.2514515519142151, 0.2125549018383026, -0.6033923625946045, 0.06668181717395782, -0.003577507333829999, 0.2704765200614929, 0.09707566350698471, 0.3226289749145508, -0.048141591250896454, -0.829079926013946...
def argument _ without _ setup _ requirements ( argv, i ) : if argv [ i ] in no _ setup _ requires _ arguments : # simple case : an argument which is either an option or a command # which doesn't need setup requirements. return true elif ( is _ short _ option ( argv [ i ] ) and all ( option in no _ setup _ requires _ a...
[ -1.6173855066299438, -0.37078186869621277, 0.5210296511650085, 0.25791534781455994, -0.14450834691524506, 0.07564062625169754, 0.594164252281189, -0.11385376751422882, 0.272233784198761, 0.8245497345924377, -0.5739752650260925, -0.6081323027610779, -0.4550371468067169, 0.5473201870918274, ...
def peak _ pick ( inp, thsld = none ) : diff1 = np. diff ( inp [ : - 1 ] ) diff2 = np. diff ( inp [ 1 : ] ) if thsld. any ( ) : pp = [ ] for ii in range ( inp. size - 2 ) : if ( ( diff1 [ ii ] * diff2 [ ii ] < 0 ) & ( diff1 [ ii ] > 0 ) ) & ( inp [ 1 + ii ] > = thsld [ 1 + ii ] ) : pp. append ( ii ) pp = np. array ( pp...
[ -0.46119576692581177, -0.7395574450492859, 0.6854965686798096, 0.8893936276435852, -0.6489543318748474, 0.20057015120983124, 0.5713091492652893, 0.19558833539485931, 0.3519102931022644, 0.7819856405258179, -0.09725220501422882, 0.30899766087532043, -0.45644646883010864, -0.3429434895515442...
def test _ gf _ write _ scenario _ header _ without _ tags ( given _ rule _ type, expected _ indentation, disabled _ colors, capsys, mocker ) : # given scenario = mocker. magicmock ( spec = scenario ) scenario. keyword = " scenario " scenario. rule = mocker. magicmock ( spec = given _ rule _ type ) scenario. short _ de...
[ -0.049547743052244186, -0.5475035905838013, 0.5069583654403687, 0.5981498956680298, 0.6243661642074585, 0.3358546495437622, -0.14264249801635742, 0.1687556356191635, -0.7417354583740234, -0.04459138214588165, -0.43466848134994507, -0.259397953748703, -0.4215955138206482, 0.0987543761730194...
def _ _ get ( self, action, request ) : try : response = false if self. _ _ checkserverparams ( ) : request _ url = self. _ _ getnewrequesturl ( action, request ) if self. debug : print ( request _ url ) response = requests. get ( request _ url ) # todo : check response data / code / header etc... # then return the tre...
[ -0.8595201373100281, -0.4031151533126831, 0.914265513420105, 0.2943401336669922, 0.26930996775627136, -0.14354091882705688, -1.0445749759674072, -0.48961496353149414, -0.24227893352508545, -0.22640664875507355, 1.1459285020828247, 0.271921306848526, -1.1371623277664185, 0.2394792139530182,...
def temp _ attach ( self, inc _ id, incident _ attachment _ list, requested _ attachments ) : remaining _ attachment _ list = requested _ attachments [ : ] attachment _ path = [ ] tempdir = mkdtemp ( ) for incident _ attachment in incident _ attachment _ list : file _ name = incident _ attachment [ " name " ] if file _...
[ -0.38151055574417114, -0.7466928362846375, 0.7841307520866394, 0.02517206035554409, 0.06831208616495132, 0.006929072085767984, -0.03192589804530144, -0.6798416376113892, -0.23370838165283203, 0.2326316237449646, 0.07815085351467133, -0.4823947548866272, -0.811157763004303, -0.4495374262332...
def unroll _ circuit _ op ( circuit : circuit _ type, *, tags _ to _ check : optional [ sequence [ hashable ] ] = ( mapped _ circuit _ op _ tag, ) ) - > circuit _ type : def map _ func ( m : ops. moment, _ : int ) : to _ zip = [ cast ( circuits. circuitoperation, op. untagged ). mapped _ circuit ( ) if _ check _ circui...
[ -0.29636824131011963, 0.6096920371055603, 0.5683699250221252, 0.11415549367666245, -0.45131716132164, -1.041703224182129, 0.8833823204040527, -0.10718728601932526, 0.5616532564163208, 0.4131806492805481, -0.46880748867988586, -0.26633691787719727, -0.0905069038271904, -0.000796460430137813...
def set _ padding ( data : bytearray, block _ size : int, pad _ mode : int ) - > bytearray : result = data if pad _ mode = = pad _ mode _ 1 : result = set _ pad _ mode _ 1 ( data, block _ size ) elif pad _ mode = = pad _ mode _ 2 : result = set _ pad _ mode _ 2 ( data, block _ size ) return result
[ -0.24637238681316376, 0.04519091919064522, 0.6167595982551575, 0.18225756287574768, -0.3637276887893677, -0.09358949214220047, 0.054147761315107346, -0.3778870701789856, -0.0002598710707388818, 0.47584185004234314, -0.6722699999809265, 0.41600701212882996, -0.3192775845527649, 0.7402392625...
def test _ insert _ element _ empty _ array ( self ) : # arr = array ( 0, 0 ) arr = [ ] res = insert ( arr, 1, 2 ) # print ('devuelve : ', res ) self. assertequal ( res, none )
[ -0.5885974764823914, -0.3792581856250763, 0.48478323221206665, 0.5278251767158508, 0.8063365817070007, 0.6116055846214294, 0.28493714332580566, 0.475052148103714, 0.15092191100120544, -0.31988123059272766, -1.3926585912704468, -0.1992395669221878, -1.3821083307266235, 0.20641778409481049, ...