text
stringlengths
25
2.19k
embedding
listlengths
768
768
def argmin ( seq, fn ) : best = seq [ 0 ] ; best _ score = fn ( best ) for x in seq : x _ score = fn ( x ) if x _ score < best _ score : best, best _ score = x, x _ score return best
[ 0.23377874493598938, -1.136637568473816, 0.5254467725753784, 0.4925830662250519, 0.011151711456477642, -0.4542265236377716, -0.9178560376167297, 0.7824607491493225, -0.18241079151630402, 0.1390918791294098, 0.05694399029016495, 0.2613164186477661, 0.8217219114303589, -0.10046014934778214, ...
def isword ( self, wsprefixp = true, firstucallowedp = true ) : return _ snap. tstr _ isword ( self, wsprefixp, firstucallowedp )
[ -0.001719876192510128, 0.5275575518608093, 0.2513635456562042, 0.5677265524864197, 0.10845690220594406, 0.5109626650810242, 0.7049049735069275, 0.023628240451216698, -0.15087150037288666, 0.8739492297172546, 0.0008857347420416772, 0.06961120665073395, -0.29296132922172546, 0.19746991991996...
def enumerate _ repo ( cls, path ) : # make list of rpm files relative to path rpmlist = list ( ) for dirpath, dirnames, filenames in os. walk ( path ) : rpmlist + = [ name for name in filenames if name. endswith ('rpm') ] cmd = ['rpm ','- q ','- - queryformat = % { name } ','- p ', ] cmd. extend ( rpmlist ) # run comm...
[ -0.10790461301803589, -0.3006993234157562, 0.9859856367111206, -0.40725451707839966, -0.18951478600502014, -0.1451796293258667, 0.26841792464256287, -0.6886969208717346, 0.03861680626869202, 0.6039667725563049, 0.13099747896194458, -0.19344697892665863, -0.28786444664001465, -0.13442181050...
def test _ atomic _ boolean _ white _ space _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 4. xsd ", instance = " nistdat...
[ -0.2752714157104492, 0.1788184642791748, 0.42475956678390503, 0.22910746932029724, 0.0693879947066307, 0.1881348043680191, 0.144849956035614, -0.6637912392616272, 0.16304852068424225, 0.749305248260498, -0.05242259427905083, -0.11696907132863998, -0.3713453710079193, 0.12797865271568298, ...
def node _ count ( self ) - > int : return pulumi. get ( self, " node _ count " )
[ 0.44343096017837524, 1.2958142757415771, 0.3907812237739563, -0.015725433826446533, 1.4712483882904053, 0.8679965734481812, 0.3945239186286926, 0.6969262361526489, -0.2591327726840973, 0.1269855797290802, -0.33051803708076477, 1.2432993650436401, 0.4796237349510193, -1.3082407712936401, ...
def neighborhood ( self, neighborhood ) : self. _ neighborhood = neighborhood
[ 0.12345807254314423, -0.3600448668003082, -0.05878159776329994, 0.9345993995666504, -0.22456954419612885, 1.3126503229141235, 0.4883744418621063, 0.93895024061203, -0.460355281829834, -1.3060771226882935, -1.3003281354904175, 0.08953472226858139, -0.13263645768165588, 0.6911969780921936, ...
def cut ( self, x, y ) : successful = false will _ fit, orientation = self. fits ( x, y, with _ orientation = true ) if will _ fit and orientation is " xy " : self. dimensions = self. pointify ( self. polygon - rectangle ( x, y ) ) self. status = " cut " successful = true elif will _ fit and orientation is " yx " : sel...
[ -0.4671555161476135, -0.044134195894002914, 0.600579023361206, 0.45318788290023804, -0.4834045171737671, 1.1391035318374634, -0.45319226384162903, -1.0728952884674072, 0.06519098579883575, 0.489112913608551, 0.0368364192545414, 0.4178583025932312, -0.035204604268074036, -0.7190945148468018...
def list _ files ( self, parent _ folder : str = " root ", print _ to _ stdout : bool = false ) - > ( list, list ) : file _ list = self. drive. listfile ( { " q " : f "'{ parent _ folder }'in parents and trashed = false " } ). getlist ( ) for file in file _ list : if file [ " mimetype " ] = = folder _ mime _ type : con...
[ -0.1430286020040512, -0.9556947946548462, 0.9392982125282288, -0.06755479425191879, 0.3285583555698395, 0.2296326905488968, -0.4330615699291229, 0.6712208390235901, -0.6624297499656677, 0.6788705587387085, 0.7139697074890137, 0.31647875905036926, -0.8018747568130493, 1.2155649662017822, ...
def _ _ eq _ _ ( self, * args ) : return _ snap. tstruint64hi _ _ _ eq _ _ ( self, * args )
[ -0.45260635018348694, -0.018808649852871895, 0.20290431380271912, 0.02410135231912136, 0.5809074640274048, 0.4581218659877777, 0.4750015139579773, 1.2468246221542358, -1.0775580406188965, 0.2516935169696808, -0.23670414090156555, -1.0443689823150635, 0.5695131421089172, 0.38417768478393555...
def running _ speed ( self ) : if self. _ running _ speed is none : def get _ velocity ( presentation _ id ) : " " " helper function for getting avg. velocities for a given presenation _ id " " " pres _ row = self. stim _ table. loc [ presentation _ id ] mask = ( self. ecephys _ session. running _ speed ['start _ time'...
[ -0.8537222743034363, -0.022966982796788216, 0.5952609181404114, 0.10794060677289963, 0.08008169382810593, 0.13266372680664062, 0.5865558981895447, 0.2941160500049591, -0.7214522957801819, 0.6983821988105774, 0.14954045414924622, 0.6370566487312317, -0.8922877907752991, 0.061576180160045624...
def render _ resources ( database, resource _ type, localsite, template _ names ) : # database. resources ( ) is a generator, but we need to iterate it twice, so make a copy r = database. resources ( resource _ type ) resources = [ ] try : template = environment. select _ template ( template _ names ) except jinja2. te...
[ -0.6515855193138123, -0.03128138929605484, 0.5312044024467468, -1.445793867111206, -0.6950439214706421, -0.6259937286376953, -0.224397674202919, -0.19593535363674164, -0.8557080030441284, 1.6007180213928223, -0.30917200446128845, -0.3578210473060608, 0.2854876220226288, 0.8879134654998779,...
def geteastri ( self, * args ) : return _ snap. pneanet _ geteastri ( self, * args )
[ -0.4515554904937744, 0.4271426796913147, 0.40427494049072266, -0.13567699491977692, 0.9632930755615234, 0.5835304260253906, -0.31059640645980835, -0.3572953939437866, -0.5431633591651917, -0.27285414934158325, -0.6541917324066162, -1.235427975654602, -0.7686787247657776, 0.5272954702377319...
def print _ matrix ( self ) : print ( " ", end = " " ) for i in range ( self. num _ populations ) : print ( str ( ( i + 1 ) ) + " ", end = " " ) print ( " \ n " ) i = 1 for y in self. matrix : print ( str ( i ) + " : " + str ( y ) + " \ n " ) i + = 1
[ -0.09505543112754822, -0.41950491070747375, 0.8229371905326843, -0.2564956545829773, 0.23203562200069427, 0.9840814471244812, 0.4593185484409332, 0.058311909437179565, -0.4206582307815552, -0.33103448152542114, 0.7499842643737793, 1.01536226272583, -0.06326595693826675, 0.21943265199661255...
def find _ and _ display _ by _ name ( self, tmp _ product _ name ) : mycursor = self. database. cursor ( ) product _ name = " % " + tmp _ product _ name + " % " mycursor. execute ( queries. sql _ select _ products _ by _ name, ( product _ name, ) ) sql = mycursor. statement products _ by _ name = mycursor. fetchall ( ...
[ -0.18554365634918213, -0.19814445078372955, 0.7204809188842773, -0.9953308701515198, -0.464346319437027, -0.14099189639091492, 0.3163699507713318, -0.7607353925704956, -0.3913063704967499, 1.6443085670471191, -0.5754572749137878, -0.041648849844932556, -0.21207597851753235, 0.7611979246139...
async def set _ scheduled _ departure ( self, enable : bool, departure _ time : int, preconditioning _ enabled : bool, preconditioning _ weekdays _ only : bool, off _ peak _ charging _ enabled : bool, off _ peak _ charging _ weekdays _ only : bool, end _ off _ peak _ time : int, ) - > none : data = await self. _ send _...
[ -0.8841411471366882, -0.01873799040913582, 0.909454882144928, 0.060386717319488525, 0.059481021016836166, -0.013029569759964943, -0.3967425525188446, 0.6164700984954834, -0.09592626988887787, 0.011520649306476116, -0.874160885810852, 0.17458628118038177, -0.28755176067352295, 0.46435767412...
def enable _ timings ( max _ history : int = 100 ) - > none : global _ pyglets _ dispatch _ event, _ max _ history if pyglet. window. basewindow. dispatch _ event = = _ dispatch _ event : raise valueerror ( " timings already enabled. " ) # save the original pyglet dispatch event function _ pyglets _ dispatch _ event = ...
[ 0.228218674659729, 1.4732494354248047, 0.8004600405693054, 0.18754082918167114, 0.08658149093389511, 0.5876829624176025, 0.5038548707962036, 1.1835633516311646, 0.8177717328071594, 0.18090321123600006, -1.391440510749817, 0.31072425842285156, 0.7453691363334656, 1.0313856601715088, 0.346...
def _ _ getitem _ _ ( self, index ) : # todo for data objects with only one property, allow getting like : # a [ 5 ] = " steve " # a [ 5 ] = = " steve " # true array _ index = self. _ get _ array _ index ( index ) relative _ index = self. _ get _ relative _ index ( index, array _ index ) if array _ index < len ( self. ...
[ -0.0636911690235138, 0.02917269803583622, 0.7671362161636353, -0.2459278404712677, 0.04850488528609276, 0.2904696464538574, 0.4414861500263214, -1.9147003889083862, 0.49331143498420715, -0.7618392109870911, 0.31609904766082764, 0.5067719221115112, -0.32650646567344666, -0.8114212155342102,...
def main ( ) : import sys from contextlib import closing from optparse import optionparser tfile = none params _ str = ['external _ field ','branching _ sigma ','tip _ mobility'] parser = optionparser ( ) parser. add _ option ( " - - ofile ", " - o ", dest = " ofile ", type = " str ", help = " output file ", default = ...
[ 0.2878977358341217, 0.09625288844108582, 1.1360125541687012, 0.4397253394126892, -0.6271389722824097, 0.33011746406555176, 0.84895920753479, 0.22267258167266846, -1.590537667274475, 0.7500219941139221, -0.30314409732818604, -0.7199161648750305, -0.4102182984352112, 0.07237308472394943, 0...
def load _ cubes _ from _ input _ dirs ( input _ dirs : list ) - >'iris. cube': for i, input _ dir in enumerate ( sorted ( input _ dirs ) ) : if verbose : print ( f'loading # { i : 02d } : ', input _ dir ) files = input _ dir. glob ('*. nc') cubes = iris. load ( str ( file ) for file in files ) for cube in cubes : stri...
[ -0.5739105343818665, 0.4198094308376312, 0.6375488042831421, -0.12924781441688538, -0.243028461933136, 0.557034432888031, 0.3703516721725464, -0.546711802482605, -0.4452057182788849, 0.746463418006897, 0.09595859050750732, 0.012805255129933357, 0.22108066082000732, 0.21990706026554108, -...
def _ _ init _ _ ( self, * args ) : _ snap. tstrintprv _ swiginit ( self, _ snap. new _ tstrintprv ( * args ) )
[ -0.06112680956721306, -0.40601569414138794, 0.1082620695233345, -1.53778874874115, 0.042908020317554474, -0.1542397290468216, 0.4124261438846588, 1.148371934890747, -1.437209129333496, 0.2786389887332916, -0.03880568966269493, -0.3257484436035156, -0.5916397571563721, -0.13311047852039337,...
def is _ request _ successful ( soup ) : if soup. get _ text ( ). startswith ( " request unsuccessful " ) : raise requestexception ( tored ( " [ 403 forbidden ] \ n " ) + soup. get _ text ( ) + togreen ( " \ nplease run chrome with gui browser. " ) )
[ -1.14197838306427, 0.6249821782112122, 0.6330808401107788, 1.2058162689208984, -0.05915997922420502, 0.16637319326400757, -0.5872883200645447, -0.7952678203582764, -0.2595643401145935, -0.07103943824768066, 0.6795014142990112, 0.606946587562561, -0.21145275235176086, 0.2578379809856415, ...
def distance _ ll ( lat1, lon1, lat2, lon2 ) : lat _ len, lon _ len = len _ lat _ lon ( ( lat1 + lat2 ) / 2 ) x = ( lon2 - lon1 ) * lon _ len y = ( lat2 - lat1 ) * lat _ len return ( ( x * x ) + ( y * y ) ) * *. 5 # distance between points in meters
[ 0.6261935234069824, -1.202844262123108, 0.5211306810379028, -0.6202702522277832, -0.6444932222366333, 1.1735763549804688, -0.9093698859214783, 0.1641433835029602, 0.45261135697364807, 0.07381448149681091, -0.44149911403656006, 0.2010689526796341, -0.1298043429851532, -0.47307726740837097, ...
def list _ all _ dev _ boxes ( self, *, filter : optional [ str ] = none, top : optional [ int ] = none, * * kwargs : any ) - > iterable [ json ] : _ headers = kwargs. pop ( " headers ", { } ) or { } _ params = kwargs. pop ( " params ", { } ) or { } cls : clstype [ json ] = kwargs. pop ( " cls ", none ) error _ map = {...
[ -1.7090932130813599, 0.2634914815425873, 0.884566068649292, 0.24313312768936157, -0.40273410081863403, -0.4927234649658203, -0.36716631054878235, -0.7631006836891174, 0.5305153727531433, -0.23987668752670288, -0.21962286531925201, 1.3026325702667236, -0.22557689249515533, 0.390252500772476...
def itksubtractconstantfromimagefiltericf2cficf2 _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefiltericf2cficf2 _ cast ( * args )
[ 0.5495262145996094, -1.1845864057540894, 0.017479004338383675, -0.37788018584251404, -0.10635742545127869, -0.5949931740760803, 0.9968737363815308, 0.7642514109611511, -1.2624666690826416, 0.13545620441436768, -1.3063585758209229, -0.035098250955343246, 0.278763085603714, -0.18379642069339...
def make _ cl _ command ( args ) : new = [ ] for arg in args : if'' in arg : arg ='" % s "'% arg new. append ( arg ) return''. join ( new )
[ 0.541786789894104, -0.0007521813386119902, 0.7313287258148193, -0.7699776291847229, 0.9241610169410706, 0.030454887077212334, -1.2885981798171997, -0.30965402722358704, -0.4398961663246155, 0.7373793721199036, 0.5082918405532837, 1.0460231304168701, -0.2133219838142395, 0.7425379753112793,...
def printloads ( loads ) : if ( len ( loads ) = = 0 ) : print ( " no current loads " ) return false else : print ( " loads " ) for i, load in enumerate ( loads ) : print ( str ( i + 1 ) + ". " + str ( load [ 1 ] ) + " n at " + str ( load [ 0 ] ) + " m " ) return true
[ -0.6626394391059875, -0.11636466532945633, 0.6521111130714417, -0.8752875924110413, -0.021251214668154716, 0.6767495274543762, -0.21451137959957123, -1.4971359968185425, -0.47415459156036377, 0.02478192374110222, 0.08869398385286331, -0.03242836520075798, -0.8621682524681091, 0.69273823499...
def link _ summary ( self ) - > dataframe : summary _ table = {'name': [ ],'target _ shape': [ ],'on _ self': [ ],'on _ other': [ ],'chained': [ ],'aggregation': [ ],'preindexed': [ ] } for name, entry in self. _ links. items ( ) : summary _ table ['name']. append ( name ) summary _ table ['target _ shape']. append ( s...
[ -0.7964761257171631, 0.18000009655952454, 0.6938031315803528, -1.135805368423462, 0.30362603068351746, -0.4579510986804962, -0.15037748217582703, -0.11893114447593689, -0.21481788158416748, -0.06578459590673447, 0.4506417214870453, 1.1358582973480225, 0.4243248999118805, 0.0237573049962520...
def teleopperiodic ( self ) : self. robot _ drive. arcadedrive ( self. right _ joystick ) self. belt = self. beltmotor. getencvelocity ( ) # activate the pitcher motor if self. right _ joystick. gettrigger ( ) : self. pitcher _ motor. set ( self. right _ joystick. getz ( ) ) else : self. pitcher _ motor. set ( 0 ) if s...
[ -0.18083849549293518, -0.9597569704055786, 0.6147060990333557, -0.5036354064941406, 0.8437585234642029, 0.41273441910743713, -1.022498369216919, 0.07246533781290054, -0.35368722677230835, -0.05099179968237877, -0.35361334681510925, -0.18963241577148438, -0.13551878929138184, -0.31194463372...
def render _ graph ( df1, df2 ) : x1, y1, x2, y2 = compute _ plot _ data ( df1, df2 ) x2 = x2 [ : 3 ] y2 = y2 [ : 3 ] fig = go. figure ( ) fig. add _ trace ( go. scatter ( x = x1, y = y1, mode ='lines ', name ='lines') ) fig2 = go. figure ( ) fig2. add _ trace ( go. scatter ( x = x2, y = y2, mode ='lines + markers ', n...
[ 0.5316632986068726, 0.6108392477035522, 0.8319850564002991, -0.16344857215881348, 0.47650402784347534, -0.18359282612800598, -0.14217764139175415, 0.4027111232280731, -0.5050702691078186, -0.11960367858409882, 0.8941066861152649, 0.3128499686717987, 0.011882208287715912, -0.796187162399292...
def mxdegree _ pneanet ( * args ) : return _ snap. mxdegree _ pneanet ( * args )
[ -1.046271562576294, 1.098776936531067, 0.3039895296096802, -0.1696072518825531, -0.860711395740509, 0.8082525730133057, -2.004971742630005, -0.5705111026763916, -0.8418644070625305, -0.4355490505695343, -0.4314197897911072, -0.6728447079658508, -0.4396786391735077, 0.5458917617797852, -0...
def _ check _ mutual _ likes ( self, group _ id, user _ id, post _ url ) : _ usr _ df = pd. read _ sql ( f'''select user _ id from instadb where group _ id = { group _ id } ;'' ', self. db _ conn ) current _ users = list ( _ usr _ df ['user _ id']. unique ( ) ) try : self. driver. get ( post _ url ) time. sleep ( randi...
[ -0.6487590074539185, -0.2788408398628235, 0.6864007115364075, 0.8794534802436829, -0.43045535683631897, 0.547700047492981, 0.6482627987861633, -0.30704087018966675, -0.934447169303894, 0.6428624987602234, 0.22104401886463165, 0.7436242699623108, -1.4863042831420898, 1.0550711154937744, 0...
def update _ end _ of _ season ( elos ) : diff _ from _ mean = elos - mean _ elo elos - = diff _ from _ mean / 1. 5 return elos
[ -0.6872972846031189, -0.3996024429798126, 0.44753897190093994, 0.300724595785141, -0.6464136242866516, 1.04716157913208, 1.0526264905929565, -0.46790945529937744, 0.6541594862937927, 1.633573055267334, -0.2565987706184387, 0.9487073421478271, 0.43928423523902893, -0.6682335734367371, 0.4...
async def leave _ group ( self, group _ id ) : # the logged - in user is in our scope thanks to the authentication asgi middleware group = await get _ group _ or _ error ( group _ id, self. scope [ " user " ] ) # save message to database # await save _ message _ to _ db ( group, settings. msg _ type _ leave, " ", self....
[ -0.07261378318071365, 0.3263593912124634, 0.2414197325706482, -0.4128281772136688, 0.45665448904037476, -0.5235369205474854, 0.03587258234620094, -0.8865734338760376, -0.10206111520528793, 0.5618613362312317, 0.04734824597835541, 0.3643873333930969, -1.2140283584594727, 1.461253046989441, ...
async def _ block _ till _ run ( self, version : awesomeversion ) - > none : # skip landingpage if version = = landingpage : return _ logger. info ( " wait until open peer power is ready " ) # manage timeouts timeout : bool = true start _ time = time. monotonic ( ) with suppress ( awesomeversionexception ) : # version ...
[ -0.7166944146156311, -0.32005220651626587, 1.0423426628112793, -0.2183261513710022, 0.11620015650987625, 0.3887197971343994, 0.02979220636188984, -0.3607442378997803, -0.6017065644264221, 0.31959813833236694, -0.04280401021242142, -0.8659732341766357, -0.17494772374629974, 0.39431339502334...
def plot _ results ( model, x, y, labels ) : confusion _ matrix = plot _ confusion _ matrix ( model, x, y, display _ labels = labels, values _ format = " d ", cmap = plt. cm. blues, ) return confusion _ matrix, classification _ report ( y, model. predict ( x ), target _ names = labels, output _ dict = true )
[ 0.2110511213541031, 0.6009816527366638, 0.27286526560783386, -0.2822323739528656, -0.3207843601703644, -0.11403661221265793, -0.25391244888305664, 0.0450776182115078, -1.0443450212478638, -0.6420605778694153, 0.1272180676460266, 0.5060486793518066, 0.9439539313316345, 0.45153099298477173, ...
def setprofileimageurl ( self, profile _ image _ url ) : self. _ profile _ image _ url = profile _ image _ url
[ -0.8614619374275208, -0.2105455994606018, 0.14836780726909637, 0.8826390504837036, 0.12105046957731247, 0.34333139657974243, -0.02883768081665039, 0.699437141418457, -0.4371277093887329, 0.48423635959625244, -0.9914125800132751, -0.19505687057971954, 0.09891357272863388, -0.053303070366382...
def searchvforw ( self, * args ) : return _ snap. tstrintprv _ searchvforw ( self, * args )
[ -0.21063245832920074, 0.3414499759674072, 0.20485042035579681, -1.135948657989502, -0.06492224335670471, -0.049720268696546555, -0.5156198143959045, -0.10608170181512833, -1.0105564594268799, 0.1251056045293808, 0.5497984886169434, -0.23198752105236053, 0.1722087264060974, 0.05293324589729...
def getbookvalue ( self, firm, date, bookunit = 1000000 ) : if firm not in self. data : return - 1 rows = self. data [ firm ] low _ ind = 0 low _ date = rows [ low _ ind ] [ 5 ] # uses rqd high _ ind = len ( rows ) - 1 high _ date = rows [ high _ ind ] [ 5 ] unadjusted = - 1 if date > high _ date : unadjusted = float (...
[ -0.6555193662643433, -0.5047957897186279, 0.8211232423782349, -0.012714690528810024, -0.2248235046863556, 0.27094218134880066, -0.00670440960675478, -0.006512051448225975, -1.0414270162582397, -0.7278479933738708, 0.8659087419509888, 0.8882585763931274, -0.10559531301259995, 0.709211528301...
def xdata ( self, v = ( ) ) : return [ float ( f ) for f in v ]
[ -0.7975228428840637, 0.09101855009794235, 0.26262491941452026, -0.07571624219417572, 0.6481850743293762, 0.21017402410507202, -1.5282440185546875, 0.2981303632259369, 0.14173921942710876, -0.1851719617843628, -1.4210290908813477, 0.3544749319553375, -0.2596534192562103, 0.03028313256800174...
def test _ post _ question ( self ) : response = self. client. post ('/ api / v2 / questions ', data = json. dumps ( self. questions ), headers = self. authheaders ) self. assertequal ( response. status _ code, 201 )
[ -0.38992467522621155, -0.12473266571760178, 0.34201309084892273, 0.6127058863639832, 0.6452888250350952, 1.4636962413787842, -1.3140777349472046, 0.2097470462322235, -0.1710752248764038, -0.2581040561199188, -0.6129404902458191, -0.2631940543651581, -0.11167846620082855, -0.276803433895111...
def test _ atomic _ qname _ length _ 3 _ nistxml _ sv _ iv _ atomic _ qname _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 4. xsd ", instance = " nistdata / atomic / qname / schem...
[ 0.36239638924598694, -0.2179725617170334, 0.3402567505836487, -0.16805396974086761, -0.5578050017356873, 0.34164154529571533, -0.14177629351615906, -0.4290391206741333, -0.1979154497385025, 0.4690924882888794, -1.0345250368118286, -0.5320760607719421, -0.13156014680862427, -0.3371780216693...
def sort ( table : list, n : int, sort _ arg : str ) - > list : if n < = 1 : return table pivot = getattr ( table [ n / / 2 ], sort _ arg ) left = [ ] middle = [ ] right = [ ] for k in range ( n ) : x = getattr ( table [ k ], sort _ arg ) if x < pivot : left. append ( table [ k ] ) elif x = = pivot : middle. append ( t...
[ -0.6646710634231567, 0.24137048423290253, 0.6025348901748657, 0.5434762239456177, -0.7508188486099243, -0.04740593582391739, -0.5457468032836914, -0.029420139268040657, -0.15002165734767914, 0.7308933734893799, -1.0774768590927124, -0.5377725958824158, -0.007490664720535278, 1.223297953605...
def getdat ( self, * args ) : return _ snap. tstrstrprvhi _ getdat ( self, * args )
[ 0.014172484166920185, -0.4000322222709656, 0.5381311178207397, -0.9055834412574768, 0.9704652428627014, 0.6202197074890137, -0.12897123396396637, -0.6656485795974731, -1.3690447807312012, -0.7740724086761475, -0.05484011024236679, -0.7696070671081543, -1.1345994472503662, -0.37710571289062...
def issorted ( self, asc = true ) : return _ snap. tfltv _ issorted ( self, asc )
[ -0.49496230483055115, 0.02578297071158886, 0.04286326840519905, 0.17090532183647156, 0.006304629147052765, -0.8350827097892761, 0.743462085723877, 0.14706124365329742, -0.4236287772655487, -0.6642642617225647, -0.7702241539955139, -0.31066983938217163, -0.27412277460098267, 1.7473174333572...
def slang _ look _ up ( text ) : words = text. split ( ) new _ text = [ ] for word in words : word _ s = word. lower ( ) if word _ s in slangs _ dict : new _ text. append ( slangs _ dict [ word _ s ] ) else : new _ text. append ( word ) slanged = " ". join ( new _ text ) return slanged
[ 0.4519386291503906, -0.2867754101753235, 0.4400947391986847, -1.0594642162322998, -0.7159674167633057, -0.2304864078760147, -0.44838887453079224, 0.5070322155952454, 0.28864890336990356, 0.8920871615409851, 0.33407190442085266, -0.21745213866233826, -1.040401577949524, 0.10833726823329926,...
def started _ on ( self, started _ on ) : self. _ started _ on = started _ on
[ 0.8073417544364929, -1.837833046913147, 0.071014404296875, 0.6466432213783264, 0.027049779891967773, 0.2743138074874878, -0.35777199268341064, 1.5952190160751343, -1.0452675819396973, -0.5710453391075134, -2.151010513305664, 0.2701466977596283, -0.13545165956020355, 0.42994946241378784, ...
def _ get _ issues ( self, user, owner, repo, title ) : url = " % s / repos / % s / % s / issues " % ( self. _ api _ url, owner, repo ) params = { " state " : " open ", " creator " : user } data = self. get _ all _ pages ( url, params = params ) matched _ issues = [ ] if not self. _ bad _ response and data : for i in d...
[ -0.6533146500587463, -0.13241730630397797, 0.47516724467277527, 0.09162741154432297, 0.3153659701347351, -0.09449591487646103, -1.6192220449447632, 0.07253357768058777, 0.2220931202173233, -0.07698851823806763, 0.1373717486858368, 0.0447268933057785, -0.07119486480951309, -0.56226658821105...
def create _ trust _ anchor _ files ( ta _ files, work _ dir ) : full _ paths = [ ] for domain, ta _ lines in ta _ files. items ( ) : file _ name = u'{ }. key '. format ( domain ) full _ path = os. path. realpath ( os. path. join ( work _ dir, trust _ anchor _ subdir, file _ name ) ) full _ paths. append ( full _ path ...
[ -0.02589934505522251, -0.6476618647575378, 0.663539707660675, -0.42643189430236816, 0.6773161888122559, 1.0532976388931274, 1.5853465795516968, -0.13549791276454926, -0.24301029741764069, 0.996292769908905, 0.2315995991230011, -0.5786406397819519, 0.6195328831672668, -0.0929093211889267, ...
def flat _ ttree _ compare _ plots ( file1 _ path, file2 _ path, tree _ name, branch _ names, out _ dir = ". / ", save _ as _ root = false, ofile _ name = " ", suffix = " " ) : if save _ as _ root : print " error : : not yet setup to produce root files " return # set samples to be processed from sample import sample sa...
[ 0.4149685800075531, -1.3713041543960571, 0.9072492122650146, 0.12919233739376068, -0.38573944568634033, 0.25377950072288513, 0.3895769715309143, -0.3812233805656433, -0.7977896928787231, 0.46240395307540894, 0.4926735758781433, 0.5335662364959717, 0.05141556262969971, 0.25928401947021484, ...
def full ( self ) : raise typeerror ( " block. full not implemented " )
[ 0.766228199005127, -0.19017064571380615, 0.5694324970245361, 0.9174256324768066, -0.07240594923496246, 0.5575492978096008, 0.5752079486846924, -0.14118865132331848, 0.18885110318660736, -0.22723425924777985, -0.7077297568321228, 0.8719664216041565, -0.40353357791900635, 1.0584828853607178,...
def _ _ lt _ _ ( self, * args ) : return _ snap. schema _ _ _ lt _ _ ( self, * args )
[ 0.0032888876739889383, -0.26039719581604004, 0.31020936369895935, -0.5878027081489563, 0.22553585469722748, -0.32405224442481995, -0.5636064410209656, -0.47753795981407166, -0.2375115305185318, -0.9458954930305481, -0.957857072353363, -0.7417389750480652, -0.17395074665546417, 0.4768996834...
def get _ state ( self ) - > dict [ str, float ] : # return agent. replaybuffer. experience. state print ( " get state : : : " + str ( self. env _ info. vector _ observations [ 0 ] ) ) interface = self. load _ json _ config ( ) state _ names = [ ] for listietme in interface ['description'] ['state'] ['fields'] : # prin...
[ -0.16657565534114838, -0.27046507596969604, 0.8075261116027832, -1.0750205516815186, -0.7439895272254944, -0.028295813128352165, 0.3050804138183594, -0.6433154344558716, -0.5736894011497498, 0.8171952962875366, -0.3511207401752472, -0.0023827049881219864, -0.11103708297014236, 0.7010348439...
def stark _ assert _ ne ( exp _ val, actual _ val, code : starkmsg, message : optional [ str ] = none ) : if exp _ val = = actual _ val : eq _ log = f'{ exp _ val } = = { actual _ val }'message = f'{ message } \ n { eq _ log }'if message else eq _ log raise starkexception ( code, message )
[ -0.04222794994711876, -0.3291463255882263, 0.5522568821907043, 1.0000561475753784, 0.29146674275398254, 0.6760443449020386, -0.21309885382652283, 0.19693098962306976, -0.32425281405448914, 0.043007075786590576, 0.6471837162971497, 0.6852079033851624, -0.1802302449941635, 1.1125348806381226...
def batchify ( self, examples : list [ any ] ) - > list [ any ] : pool _ size = self. batch _ size * self. pool _ num _ batches for pool in self. _ group ( examples, pool _ size, self. sort _ key ) : batch _ indices = list ( range ( math. ceil ( len ( pool ) / self. batch _ size ) ) ) if self. sort _ key : random. shuf...
[ -0.5257772207260132, 0.6101601719856262, 0.5142839550971985, 0.5699582099914551, -0.1610763818025589, 0.8270707130432129, 0.6317797899246216, -0.49010053277015686, 0.30667588114738464, 0.05449436232447624, -0.2993486225605011, 0.4527265131473541, 0.27120161056518555, 0.5995119214057922, ...
def go ( rawd ='/ scr2 / sedm / raw ', redd ='/ scr2 / sedmdrp / redux ', wait = false, check _ precal = true, indate = none, piggyback = false ) : # infinite loop dobs = true stat = true # keep track of iterations its = 0 # get all raw directories fspec = os. path. join ( rawd,'20??????') rawlist = sorted ( [ d for d ...
[ -0.18656662106513977, 0.4676572382450104, 1.0158507823944092, -0.22413216531276703, -0.39517462253570557, -0.03657766804099083, 0.05462075024843216, -0.06616130471229553, 0.3170427978038788, -0.09933287650346756, 0.19798435270786285, 0.5968775153160095, 0.6899997591972351, 1.13110637664794...
async def parse _ message _ using _ nlu _ interpreter ( self, message _ data : text, tracker : dialoguestatetracker = none ) - > dict [ text, any ] : processor = self. create _ processor ( ) message = usermessage ( message _ data ) return await processor. _ parse _ message ( message, tracker )
[ -0.718449056148529, 0.608516275882721, 0.45661461353302, -0.08851654827594757, -1.1620910167694092, -0.6908078789710999, -0.555378794670105, -0.07253612577915192, -0.4774429500102997, -0.7014167308807373, -0.14967183768749237, -0.12884902954101562, -0.3990767300128937, 0.2839359641075134, ...
def show _ figure ( f : union [ go. figure, go. figurewidget ] ) : try : from ipython. display import display display ( f ) except exception : f. show ( )
[ 0.8630810379981995, 1.235625147819519, 0.4477013051509857, -0.1224251240491867, -0.5816805362701416, 0.507720410823822, 0.1848101019859314, 0.33146485686302185, -0.15224117040634155, -0.24872079491615295, 0.638670027256012, 0.3917403221130371, 0.48225313425064087, -0.13798323273658752, 0...
def create _ app ( test _ config = none ) : # create the flask app object. app = flask ( _ _ name _ _ ) # configure the app from configuration - file settings. app. config. from _ object ('config. config') if test _ config is not none : pass # load test configuration, and override any configuration settings. # app. con...
[ 0.40020906925201416, -0.04851866140961647, 0.5992183685302734, 0.6764596104621887, 0.4398045837879181, -0.013817762024700642, 0.6902976632118225, 0.3777768313884735, 0.6861229538917542, -0.07217857241630554, -0.7487344741821289, 0.329878032207489, -0.36744269728660583, 0.46363353729248047,...
def output _ vmg ( self ) : bot = self. bot # grades bot. find _ element _ by _ xpath ('/ / input [ @ class = " pspushbutton " ] [ @ name = " derived _ sss _ sct _ ssr _ pb _ go " ] [ @ type = " button " ]'). click ( ) # save current url to html time. sleep ( 1. 5 ) with open ('grades. html ','w') as f : f. write ( bot...
[ -0.2916100323200226, 0.3525722026824951, 0.7358511686325073, 0.03748904541134834, 0.043003395199775696, 0.7911142110824585, 0.2553066611289978, 0.8764421343803406, -0.5363690257072449, 1.1190459728240967, 0.13015173375606537, 0.40479275584220886, 0.18027366697788239, 0.8558071851730347, ...
def test _ return _ error _ between _ unsupported _ translate _ pairs ( self ) : user = make _ user ( ) language = get _ language _ model ( ) user. translation _ language = language. objects. get ( code ='ar') user. save ( ) headers = make _ authentication _ headers _ for _ user ( user ) post = user. create _ public _ ...
[ -0.3530316948890686, 1.1795217990875244, 0.8071049451828003, 0.055649369955062866, -0.669000506401062, 1.2268787622451782, -0.8994108438491821, -0.23108983039855957, -0.8692833781242371, -0.3274233341217041, -0.991905927658081, -0.6608985662460327, -0.3298706114292145, -0.3537796437740326,...
async def cancel _ and _ wait ( task : optional [ task ] ) - > any : if not task : # pragma : nocover return try : if task. done ( ) : return await task task. cancel ( ) return await task except cancellederror as e : return e
[ 0.41986918449401855, 0.3412402868270874, 0.2755836546421051, 1.0978106260299683, -0.7404617071151733, 0.3526708781719208, -0.06333548575639725, 0.4313552975654602, 0.44154298305511475, 0.17137813568115234, 0.38877245783805847, -0.6517813801765442, 0.7084247469902039, 0.22007179260253906, ...
def save _ to ( self, data ) : try : self. save _ to _ database ( data ) if self. verbose _ status : # it will visualize all the information on the console self. fetch _ results ( ) except valueerror as value _ error : raise valueerror from value _ error
[ -0.074614018201828, 0.5136787295341492, 0.33270469307899475, 0.42016395926475525, 1.2128486633300781, 0.3211038112640381, -0.1296425312757492, -0.6346991658210754, -0.2919088900089264, 0.13479359447956085, -0.092880979180336, -0.1906767636537552, -0.37394779920578003, 1.0193290710449219, ...
def getuintfromipstr ( * args ) : return _ snap. tuint _ getuintfromipstr ( * args )
[ -0.705398440361023, 0.21556104719638824, 0.3066515326499939, 0.29175981879234314, -0.34718143939971924, 0.323431134223938, 0.12083639204502106, 0.4347122013568878, -0.7576139569282532, -1.1817668676376343, 0.6386830806732178, -1.9937387704849243, 0.06493256986141205, -0.8259751796722412, ...
def capabilities ( self ) - > dict : return self. _ capabilities
[ -0.9597639441490173, -0.9373155236244202, 0.1827387809753418, 0.21779514849185944, -0.48153552412986755, -0.47584906220436096, -0.22211262583732605, -0.3462544083595276, 0.20162656903266907, -0.17823772132396698, -1.1964362859725952, 0.014146908186376095, 0.1271553337574005, 0.390335857868...
def get _ soup _ url ( url ) : return url
[ -1.1065630912780762, 0.43255504965782166, 0.37900370359420776, 0.1343948096036911, 0.07122576236724854, -0.010900501161813736, 0.4100792706012726, 0.05641702935099602, 0.9381310343742371, -0.23592332005500793, -0.0561484657227993, 0.37291768193244934, 0.9968646764755249, -0.328062385320663...
def optimize _ settings ( settings, idata, data _ provider, execution _ provider ) : # optimise for the instrument weights given the constraints result = calc _ opt _ inputs ( settings = settings, idata = idata, data _ provider = data _ provider, execution _ provider = execution _ provider ) xs, lam, constraints, setti...
[ -0.39111432433128357, 1.101413607597351, 0.40672487020492554, -0.4233412444591522, 0.35694262385368347, -0.7157595157623291, -0.2475389838218689, -0.9596686959266663, -0.2904421389102936, 1.045403242111206, 0.35901445150375366, -0.1422974020242691, -0.6327912211418152, -0.412132203578949, ...
def merge _ cms ( cm1, cm2 ) : assert 0 in cm1 assert len ( cm1 [ 0 ] ) = = len ( cm2 [ 0 ] ) cm = { } k = len ( cm1 [ 0 ] ) for i in range ( k ) : cm [ i ] = { } for j in range ( k ) : cm [ i ] [ j ] = cm1 [ i ] [ j ] + cm2 [ i ] [ j ] return cm
[ -0.08226868510246277, -0.39792051911354065, 0.7197563052177429, -0.8842824697494507, -0.6038979887962341, -0.2073606550693512, -0.14360226690769196, -0.49066871404647827, -0.28408321738243103, -0.03957474231719971, -0.8398075103759766, -0.31027403473854065, -0.8403425812721252, 0.119097918...
def get _ mcwd ( precipitation, evaporation, save = none ) : # noqa # make sure evaporation is 2d if'time'in evaporation. dims : msg ='evaporation must be a 2d array ( time mean )'raise valueerror ( msg ) if'units'in precipitation. attrs : if precipitation. attrs ['units']! ='mm month - 1': msg ='units were not identif...
[ -0.6678254008293152, -0.08926816284656525, 1.0440094470977783, -0.19432105123996735, -0.8777776956558228, 0.6278663277626038, 0.23221725225448608, -0.01244092546403408, 0.33249232172966003, 0.09364655613899231, 1.0649572610855103, 0.5692241787910461, 0.19348613917827606, 1.0163679122924805...
def select _ mw ( x, cost _ df ) : underground _ regions = ( " neiso ", " nyiso j - k " ) filtered _ cost _ df = cost _ df. copy ( ) # unless we are entirely within an underground region, drop this cost class if not ( x. from _ region = = x. to _ region and x. from _ region in underground _ regions ) : filtered _ cost ...
[ -0.1078040823340416, -0.4845699965953827, 0.7115817070007324, 0.12669271230697632, -1.6691031455993652, 0.12299707531929016, -0.3003154993057251, -0.4227679371833801, 0.03890828788280487, 0.6976891756057739, 0.9108607172966003, 0.8373540639877319, -0.18255561590194702, 0.5782967209815979, ...
def pip _ kwargs ( config _ dir : optional [ str ] ) - > dict [ str, any ] : is _ docker = pkg _ util. is _ docker _ env ( ) kwargs = {'constraints': os. path. join ( os. path. dirname ( _ _ file _ _ ), constraint _ file ),'no _ cache _ dir': is _ docker, } if'wheels _ links'in os. environ : kwargs ['find _ links'] = o...
[ -1.142189383506775, 0.25008633732795715, 0.5971761345863342, -0.23055237531661987, -0.16905449330806732, -0.007522738538682461, 0.2646099925041199, 0.6080594062805176, -0.17581798136234283, 0.7030247449874878, 0.20166635513305664, 0.2336103469133377, 0.5405715703964233, 0.7521977424621582,...
def write ( self, data ) : if not self. hcomport : raise portnotopenerror data = bytes ( data ) if data : self. _ purge ( ) win32file. deviceiocontrol ( self. hcomport, ioctl _ serial _ set _ rts, none, 0, none ) time. sleep ( 1 ) # 8000 ms timeout start = 0 end = spool _ buffer chunk = data [ start : end ] # header wr...
[ -0.48698410391807556, 0.25952816009521484, 0.9069487452507019, -0.629813551902771, 0.6299769878387451, 0.2733747065067291, 0.6713480353355408, -0.2154030203819275, 0.06975997239351273, -0.35641729831695557, -0.3622979521751404, -0.035957999527454376, -1.2951557636260986, -0.428960800170898...
def slot _ mappings ( self ) - > dict [ text, union [ dict, list [ dict ] ] ] : return { " cname " : [ self. from _ entity ( entity = " cname ", not _ intent = [ " out _ of _ scope ", " deny ", " confirm " ] ) ], " carname " : [ self. from _ entity ( entity = " carname ", intent = " vehiclename " ) ], " phone " : [ sel...
[ -0.8354827761650085, -0.617164671421051, 0.5264443159103394, -0.5989345908164978, -1.1706162691116333, 0.3621307909488678, -0.16237646341323853, 0.2671588957309723, 0.07888056337833405, 0.08727744966745377, -0.0736965537071228, -0.5361824631690979, 0.8404555320739746, 0.40140199661254883, ...
def get _ cmap ( n, name = " hsv " ) : return plt. cm. get _ cmap ( name, n )
[ -0.5207358598709106, -0.5210888981819153, 0.20275479555130005, 0.3642853796482086, -0.7284578084945679, -0.8476366996765137, 0.1985352337360382, -1.0280531644821167, 0.6202590465545654, -0.3685305118560791, -0.49631789326667786, 0.5788441896438599, 0.07740341871976852, 0.13288837671279907,...
def findrecommended ( self ) : def get _ recommendations ( title, cosine _ sim, indices _ list ) : " " " uses information in the dataset to find similar movies " " " movie _ index = indices _ list [ title ] similar _ scores = list ( enumerate ( cosine _ sim [ movie _ index ] ) ) similar _ scores = sorted ( similar _ sc...
[ -0.5686808228492737, 0.26770341396331787, 0.7210531830787659, -0.8894544243812561, 0.08578917384147644, 0.06546014547348022, -0.17703258991241455, 0.4376238286495209, -0.4651995003223419, 1.2186189889907837, 0.3646787106990814, 1.0658025741577148, -0.3331613540649414, 0.1711481660604477, ...
def auth _ cram _ md5 ( self, challenge = none ) : # cram - md5 does not support initial - response. if challenge is none : return none return self. user + " " + hmac. hmac ( self. password. encode ('ascii'), challenge,'md5'). hexdigest ( )
[ 0.44316816329956055, -0.14410486817359924, 0.4696970582008362, 0.7254248857498169, -0.39417752623558044, -0.230725958943367, 0.6134923100471497, -0.2896616458892822, 0.6562787294387817, -0.18442213535308838, -0.1480211466550827, 0.2542918622493744, 0.07444162666797638, -0.2540634572505951,...
def read _ stacks ( image ) : cards = [ ] card _ names = [ ] for file _ iterator in glob. glob ( config [ " card _ filename " ] ) : card _ name = file _ iterator. rsplit ( " / ", 1 ) [ 1 ]. split ( ". " ) [ 0 ] card _ names. append ( card _ name ) cards. append ( cv2. imread ( file _ iterator ) ) stacks = [ ] for x _ s...
[ -0.41129428148269653, -0.007679939270019531, 1.003024935722351, 0.527319073677063, 0.2892632484436035, -0.29539433121681213, 0.048193708062171936, -0.5341082215309143, -0.1749548316001892, 0.7330435514450073, -0.3796111047267914, -0.8682601451873779, 0.21937762200832367, 0.3465232849121094...
def i2osp ( i : int, n : int, byteorder ='big') - > bytearray : return bytearray ( i. to _ bytes ( n, byteorder = byteorder ) )
[ -0.47475355863571167, 0.27914512157440186, 0.34884780645370483, -0.3668609857559204, 0.03453972190618515, -1.0870614051818848, -0.9456307888031006, -1.2334736585617065, 0.36051079630851746, 0.6945955157279968, -0.7999790906906128, -0.42460381984710693, -0.5350291728973389, -0.4752205312252...
def isinbin ( self, * args ) : return _ snap. tfltprv _ isinbin ( self, * args )
[ -1.0546340942382812, -0.18641528487205505, 0.6228775978088379, 0.03798380866646767, 0.37637853622436523, 0.31269919872283936, 0.0384027361869812, -0.1530848741531372, -1.3304338455200195, -0.0209646038711071, -0.1613014042377472, -0.20336544513702393, -1.624636173248291, 1.049668788909912,...
def p _ t _ c _ func ( graph, community, p _ t, nodes2id ) : n = p _ t. shape [ 0 ] p _ t _ c = np. zeros ( n ) for j in range ( n ) : summing = 0 for node in community : ind = nodes2id [ node ] summing + = p _ t [ ind, j ] p _ t _ c [ j ] = summing / len ( community ) return p _ t _ c
[ 0.4561581611633301, 0.0655047819018364, 0.26336440443992615, -0.3715626895427704, 0.9608155488967896, 0.07713339477777481, 0.8204691410064697, 0.39626428484916687, -1.2859262228012085, 1.6745178699493408, 0.32978886365890503, -0.6145403981208801, 0.4064876139163971, -0.5416318774223328, ...
def test _ prep _ init ( ) : pytest. debug _ func ( ) prp = nldt. prepositions ( ) assert prp. preps ['of'] = = 1 assert prp. preps ['in'] = = 1 assert prp. preps ['from'] = = 1 assert prp. preps ['after'] = = 1 assert prp. preps ['before'] = = - 1
[ -1.6044188737869263, -0.08899219334125519, 0.5367714762687683, -0.8347653746604919, -0.27077820897102356, 0.5951535105705261, -0.46021026372909546, -0.13354697823524475, 0.15022395551204681, -0.20615050196647644, -0.9693050384521484, -0.6972290277481079, 0.17055127024650574, 0.405375689268...
def file _ download ( self, file _ name, destination, download _ async ='true') : file _ name = urllib. parse. quote ( file _ name, safe ='' ) destination = urllib. parse. quote ( destination, safe ='' ) file _ download _ api ='{ } / { } / { }? destination = { } & async = { } '. format ( self. _ start _ url,'download '...
[ -0.3620985448360443, 0.24929821491241455, 0.6082203984260559, 0.2725484371185303, 0.05058051645755768, -0.2212667465209961, -1.2577406167984009, 0.9878512024879456, -1.7506803274154663, 0.35768839716911316, 0.5865259170532227, -0.3318030834197998, 0.5492448210716248, -0.16033869981765747, ...
def _ _ lt _ _ ( self, * args ) : return _ snap. tinttrflthi _ _ _ lt _ _ ( self, * args )
[ 0.5307009816169739, -0.5248252153396606, 0.2299702763557434, -1.0560259819030762, 0.5368435978889465, -0.10815606266260147, -0.15546543896198273, -2.161457061767578, -1.2073283195495605, -0.775402307510376, 0.010196576826274395, -0.5307228565216064, -0.8707608580589294, 1.1907721757888794,...
def get _ mq _ managers ( mq _ managers _ data ) : mq _ managers = [ ] mqmanager _ name _ regexp = r'qmname \ ( ( [ ^ ) ] + ) \ )'output _ list = list ( filter ( none, mq _ managers _ data. split ('\ n') ) ) for mq _ manager in output _ list : mq _ manager _ name = re. search ( mqmanager _ name _ regexp, mq _ manager )...
[ -0.432818740606308, -0.8828032612800598, 0.32108208537101746, 0.19298703968524933, -0.49002569913864136, -0.13890746235847473, -0.9749042391777039, 0.05781228467822075, 0.38983485102653503, 0.17288264632225037, -0.779902458190918, 0.016604255884885788, -0.7683613300323486, 0.60479921102523...
def addatm ( self, * args ) : return _ snap. pneanetv _ addatm ( self, * args )
[ -1.5011754035949707, 0.17996734380722046, 0.3725404143333435, 0.024696746841073036, 0.9812840819358826, 0.7916118502616882, -0.48244932293891907, -1.1407328844070435, -0.2696446180343628, -0.9857739210128784, 0.2435830980539322, -0.9439039826393127, 0.40763336420059204, 0.7558321952819824,...
def _ set _ watching ( self, watch _ list = none ) : if isinstance ( watch _ list, str ) : if watch _ list in log _ levels : self. _ log _ level = watch _ list watch _ list = none else : # accept also space separated list instead of list of strings watch _ list = watch _ list. split ( ) elif isinstance ( watch _ list, ...
[ -0.07971920073032379, -0.20024244487285614, 0.5023489594459534, 0.48291870951652527, 0.26313892006874084, 0.35062187910079956, -0.4924356937408447, 0.11638110876083374, -0.8185919523239136, 0.2641642093658447, -0.5728873014450073, 1.2903169393539429, -0.3067150115966797, 1.4482035636901855...
def tagger ( content ) : tagged _ sentences = [ ] for line in content : scene = re. search ( r'int \. | ext \. ', line ) meta1 = re. search ( r'''^ { 5 } on the | ^ { 5 } in the | cut to : | the end | final shooting script'' ', line ) meta2 = re. search ( r'[ a - z ] \ : | \ ( [ a - za - z0 - 9 ] + \ ) ', line ) charac...
[ 0.010488917119801044, -1.0033035278320312, 0.722063422203064, -0.6827927827835083, -0.09045368432998657, -0.6801514625549316, -0.1336299479007721, 0.005172453820705414, -0.6410712599754333, 1.0103206634521484, -0.4911115765571594, -0.041830338537693024, -0.21772846579551697, 1.040330171585...
def load _ itk ( filename ) : # reads the image using simpleitk itk _ image = readimage ( filename ) # convert the image to a numpy array first and then # shuffle the dimensions to get axis in the order z, y, x ct _ scan = getarrayfromimage ( itk _ image ) # read the origin of the ct _ scan, will be used to convert # t...
[ -0.46027323603630066, -0.39469295740127563, 0.7748032808303833, -0.03026239015161991, -0.19805559515953064, 0.25063782930374146, 0.5028542280197144, 1.0023179054260254, -0.8024097084999084, 0.5683862566947937, -0.13013775646686554, -0.4578271210193634, 0.040584027767181396, -0.127636790275...
def onnx _ function _ to _ model ( onx, functions = none, type _ info = none, as _ function = false, shape _ fct = none ) : if not isinstance ( onx, functionproto ) : raise typeerror ( # pragma : no cover f " onx must be a functionproto not { type ( onx )! r }. " ) if len ( onx. attribute ) > 0 : raise notimplementeder...
[ -0.45645424723625183, 0.03595218062400818, 0.5852469801902771, 0.0008076190715655684, -0.3725431561470032, -0.1184622272849083, -0.22179846465587616, -0.736152172088623, 0.3474016785621643, 0.09801322966814041, -0.17206479609012604, 0.1533854901790619, 0.5354659557342529, -0.80281722545623...
def synset _ to _ label ( synset, language ='en') : # parse to final query query = _ synset _ sparql _ query. format ( synset [ 1 : ], language ) # query wikidata and get data as json params = {'query': query,'format':'json'} response = requests. get ( _ wikidata _ url, params = params ) data = response. json ( ) # fet...
[ -1.439727544784546, -0.7063651084899902, 0.563248872756958, -0.7823940515518188, -0.27070266008377075, -0.4256390929222107, -1.2385581731796265, -0.18457625806331635, 0.6639553904533386, 0.4761439859867096, -0.19375407695770264, 0.17146961390972137, 0.2116047888994217, -0.01912267133593559...
def read _ write _ file ( filename ) : # use csv file to load dataframe df = pd. read _ csv ( filename ) # only data of the year 2016 will be used df = df. loc [ df [ " year " ] = = 2016 ] # only select european countries df = df. loc [ df [ " iso " ]. isin ( country _ list ) ] # only the data of mean bmi, sex, country...
[ -1.0110366344451904, -0.72141432762146, 0.7956220507621765, -0.2044082134962082, 0.4248202443122864, 0.2213083952665329, 0.712070107460022, 0.635413408279419, -0.7989189028739929, 0.9360333681106567, 0.17784148454666138, 0.5313111543655396, 0.3847077190876007, -0.4453643560409546, 0.2401...
def get _ joint _ lower _ limit ( self, joint : joint ) - > float : if joint. limit is none : return - 1e9 return joint. limit. lower
[ 1.1821224689483643, -0.5807613134384155, 0.5741280913352966, 0.27654772996902466, -0.03782854229211807, 0.021231142804026604, -0.18217483162879944, -0.40239885449409485, 0.11744773387908936, -0.29195505380630493, 0.6170183420181274, 0.48267582058906555, -1.9428032636642456, 0.0389711596071...
def set _ default _ tiles ( self ) : self. board = [ tile ( 8, 4, " i5 ", white _ piece _ id ), tile ( 8, 5, " i6 ", white _ piece _ id ), tile ( 8, 6, " i7 ", white _ piece _ id ), tile ( 8, 7, " i8 ", white _ piece _ id ), tile ( 8, 8, " i9 ", white _ piece _ id ), tile ( 7, 3, " h4 ", white _ piece _ id ), tile ( 7,...
[ -0.046173952519893646, 0.030515199527144432, 0.8892709612846375, -0.20285247266292572, 0.4424746632575989, -0.370565265417099, 0.974455714225769, -0.25450342893600464, -0.18630002439022064, 0.05461682379245758, -1.477254033088684, -0.390394389629364, -0.5379757285118103, 0.8522592186927795...
def reset ( self ) : self. _ base = 1
[ -0.38289904594421387, -0.07940056920051575, 0.1560784876346588, 0.6646832823753357, 1.008163332939148, 0.17924277484416962, 0.9861183166503906, -0.2825976312160492, -0.8849511742591858, 0.03124326467514038, -0.6540427207946777, 1.1656415462493896, -1.31621253490448, -0.07075785100460052, ...
def get _ relais _ categories ( ) : cat = { } for key, name in category _ choices : cat [ key ] = name return cat
[ -0.6542641520500183, -0.12342649698257446, 0.31890222430229187, -0.12093225121498108, -0.38012242317199707, -0.49846670031547546, -0.39572951197624207, -0.27404317259788513, -1.1010979413986206, -0.17097321152687073, -0.7887146472930908, -0.6318625211715698, 0.8841146230697632, 0.028419578...
def get _ sid ( symbol ) : sid = int ( hashlib. sha256 ( symbol. encode ('utf - 8') ). hexdigest ( ), 16 ) % 10 * * 6 return sid
[ 0.7227048277854919, 0.26589256525039673, 0.4903101325035095, -0.4688926935195923, 0.0156939048320055, -1.0678794384002686, -0.15236715972423553, -0.711398720741272, 0.9997702240943909, 0.19823628664016724, -1.459315299987793, -0.2000727504491806, -0.08101613074541092, -0.7094568014144897, ...
def hey ( text ) : if text. isupper ( ) : return " woah, chill out! " elif text [ - 1 : ] = = "? " : return " sure. " elif text. isspace ( ) or len ( text ) = = 0 : return " fine. be that way! " else : return " whatever. "
[ 0.16838891804218292, -0.24815650284290314, 0.712460458278656, 0.39517998695373535, -0.15667764842510223, 0.3816470205783844, -0.8051223754882812, 0.17980363965034485, 0.6712760925292969, 0.09803716093301773, -0.3915065824985504, 0.38125523924827576, -0.5678411722183228, -0.2515749335289001...
def getassignednameservers ( ) : if sys. platform = ='darwin': return _ getnameserversfrommacipconfig ( ) else : return _ getnameserversfromdhclient ( )
[ -1.593406081199646, -0.3740117847919464, 0.37374383211135864, 0.5478593111038208, -0.8201237916946411, -0.311142235994339, -0.44777268171310425, -1.3945999145507812, -0.04718600958585739, 0.3429126739501953, -0.9923920035362244, 0.11870905011892319, -0.027915537357330322, 1.103064179420471...
def _ get _ desc ( self, soup : soupinfo ) - > optional [ str ] : return none
[ 0.09574836492538452, -0.15880276262760162, 0.408427894115448, -0.6602704524993896, -0.496237576007843, -0.24895580112934113, -0.9575254917144775, -0.9093292355537415, 0.11459077894687653, -0.7560839653015137, 0.7426896691322327, -0.3844435214996338, 0.3335857689380646, -0.24378342926502228...
def before _ request ( ) : try : g. conn = engine. connect ( ) except : print " uh oh, problem connecting to database " import traceback ; traceback. print _ exc ( ) g. conn = none
[ -0.18619297444820404, 0.4010458290576935, 0.6058491468429565, 0.13526372611522675, 0.8236572742462158, -0.4206508696079254, -0.17216339707374573, 0.04795139655470848, -0.552054762840271, -0.4151568114757538, 0.863490879535675, -0.13356058299541473, -0.5843822956085205, 0.08692345023155212,...
def placeorder ( self ) : message = " " if self. chickcb. ischecked ( ) : message + = " chicken \ n \ n " if self. tatercb. ischecked ( ) : message + = " french fries \ n \ n " if self. beancb. ischecked ( ) : message + = " green beans \ n \ n " if self. saucecb. ischecked ( ) : message + = " applesauce \ n \ n " # do ...
[ -0.14104622602462769, -0.05025199055671692, 0.7444374561309814, -0.004270021803677082, 0.5579667091369629, 0.00555018475279212, 0.4258832037448883, 0.04750368371605873, -0.33263644576072693, 0.04049130156636238, -0.18453188240528107, 0.3077758252620697, -0.974960446357727, 1.41576576232910...