text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ create _ url ( cls, tag ) : if re. search ( '. com ', tag ) : url ='http : / / www.'+ tag else : url ='http : / / www.'+ tag + '. com'return url
[ 0.22639957070350647, -0.3524843454360962, 0.3769259750843048, 0.37173953652381897, 0.3474826514720917, 0.3557875156402588, 0.028514722362160683, -0.0382731668651104, -0.12956847250461578, -0.022549282759428024, 0.10153144598007202, -0.05278944969177246, -0.28642919659614563, 0.640684425830...
def extract _ pano _ raw _ features ( pano _ np, height ) : # resize the pano to the desired height. big _ height = int ( 180 * height / 60 ) big _ width = int ( pano _ np. shape [ 1 ] * big _ height / pano _ np. shape [ 0 ] ) pano _ s _ np = np. array ( pil. image. fromarray ( pano _ np ). resize ( ( big _ width, big ...
[ 0.0343705378472805, -0.6264005899429321, 0.8457344770431519, 0.3807625472545624, -0.6791754961013794, 0.07787219434976578, 0.10070094466209412, 0.1908257007598877, 0.8647491931915283, 0.2584475874900818, -0.9230478405952454, 0.23057323694229126, -0.019839702174067497, -1.1086896657943726, ...
def test _ atomic _ qname _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 5. xsd ", instance = " nistdata / atomic ...
[ 0.4389464855194092, -0.7971760630607605, 0.3119266629219055, -0.3827352225780487, -0.657176673412323, -0.08877219259738922, -0.04518972709774971, -1.2780784368515015, 0.31761834025382996, 0.28764408826828003, -0.6804741024971008, -0.06530562043190002, -0.6778612732887268, -0.09287188202142...
def mathjax ( self, display = true ) : if display : template = r'< html > < script type = " math / tex ; mode = display " > { 0 } < / script > < / html >'else : template = r'< html > < script type = " math / tex " > { 0 } < / script > < / html >'return template. format ( self. latex. get ( ) )
[ 0.861937403678894, -0.576662003993988, 0.7191720008850098, -0.47129300236701965, -1.5336631536483765, 0.27692553400993347, 0.2395450472831726, 0.03989655151963234, -0.40909305214881897, 0.49321693181991577, 1.385740876197815, -0.5702273845672607, 0.3715798854827881, 0.43590331077575684, ...
def read _ conll _ pos _ file ( path ) : sents = [ ] with open ( path, " r " ) as f : curr = [ ] for line in f : line = line. strip ( ) if line = = " " : sents. append ( curr ) curr = [ ] else : tokens = line. strip ( ). split ( " \ t " ) curr. append ( ( tokens [ 1 ], tokens [ 3 ] ) ) return sents
[ -0.2993878424167633, -1.0823063850402832, 0.541059136390686, -0.7271150350570679, -0.33469003438949585, 0.23007787764072418, -0.2775419354438782, 1.0524579286575317, -1.1217467784881592, 1.2892454862594604, -0.011875356547534466, -1.226341962814331, -0.10519260168075562, 0.0244860779494047...
def reduce _ mean ( input _ tensor, axis = none, keepdims = false, name = none ) : keepdims = false if keepdims is none else bool ( keepdims ) return _ may _ reduce _ to _ scalar ( keepdims, axis, gen _ math _ ops. mean ( input _ tensor, _ reductiondims ( input _ tensor, axis ), keepdims, name = name ) )
[ -0.5592768788337708, 0.8041292428970337, 0.8708602786064148, 0.32057294249534607, -0.7866753339767456, 0.5685598850250244, 0.30984756350517273, -0.27898430824279785, 0.17997631430625916, 0.9806554913520813, -0.3876226246356964, 0.5434584617614746, 0.02205682545900345, -0.567444920539856, ...
def write ( self, string ) : if self. _ ser is none or self. _ ser. closed : raise serial. serialexception ('not connected') self. _ ser. write ( str. encode ( string ) )
[ -0.5950979590415955, -0.60882967710495, 0.14387214183807373, 0.12508422136306763, 0.14183984696865082, 0.8829256892204285, 0.4848795235157013, -0.8661680817604065, 0.6552192568778992, -0.3920729458332062, -0.3582961857318878, 0.7477726936340332, -1.1440898180007935, -0.7081107497215271, ...
def run _ command ( command ) : pipe = subprocess. pipe r = subprocess. popen ( command, shell = true, universal _ newlines = true, stdout = pipe, stderr = pipe, bufsize = - 1 ) stdout, stderr = r. communicate ( ) returncode = r. returncode return returncode, stdout, stderr
[ 0.12389834225177765, -0.9961408376693726, 0.7947595119476318, -0.33850306272506714, -0.06004132702946663, -0.06697884947061539, -0.2993260622024536, 1.0296211242675781, -0.5009163618087769, 0.023029571399092674, -0.2124549150466919, 0.08799870312213898, -0.1528872549533844, 0.3115701675415...
def inner _ join ( test, * table _ arg, * * table _ kwarg ) : pa, pb, ta, tb = _ join _ args ( table _ arg, table _ kwarg ) table = _ composite _ table ( pa, pb, ta, tb ) _ join _ loop ( table, test, pa, pb, ta, tb, true, false ) return table
[ 0.4659004509449005, 0.04135632887482643, 0.649254560470581, 0.35514596104621887, -0.3121470808982849, 0.6538272500038147, 0.4745277166366577, 0.2734040915966034, -0.6631982922554016, -0.27633965015411377, 0.5814575552940369, -0.10291635245084763, -1.6331223249435425, -0.701873779296875, ...
def active _ route _ minutes _ to _ arrival ( self ) - > optional [ float ] : if " active _ route _ minutes _ to _ arrival " in self. _ vehicle _ data. get ( " drive _ state ", { } ) : return self. _ vehicle _ data. get ( " drive _ state ", { } ). get ( " active _ route _ minutes _ to _ arrival " ) return none
[ -0.2466999888420105, -1.8150298595428467, 0.5200195908546448, -0.6924158930778503, 0.2944454848766327, -0.16274771094322205, -0.775478184223175, -0.42605018615722656, 0.3015684187412262, 0.6461912393569946, 0.283584326505661, 0.7795807123184204, 0.23927246034145355, -0.7007885575294495, ...
def _ setup _ cache ( app : flask, cache _ config : cacheconfig ) - > cache : if isinstance ( cache _ config, dict ) : return cache ( app, config = cache _ config ) # accepts a custom cache initialization function, returning an object compatible # with flask - caching api. return cache _ config ( app )
[ 0.2848701477050781, -0.19719599187374115, 0.2712654173374176, 0.7926763892173767, -0.5261791348457336, -0.4454575479030609, -0.914900004863739, 0.44650983810424805, 0.468068927526474, 0.637342095375061, 0.5323129296302795, -0.15547426044940948, 0.8949756622314453, 0.24491067230701447, 1....
def _ list _ blobs _ with _ match _ glob ( bucket, client, path : str, max _ results : int | none = none, page _ token : str | none = none, match _ glob : str | none = none, prefix : str | none = none, versions : bool | none = none, ) - > any : from google. api _ core import page _ iterator from google. cloud. storage....
[ 0.12880538403987885, -0.8064301013946533, 0.7175565361976624, -0.10400157421827316, 0.13290490210056305, -0.2599106729030609, -0.7532050609588623, -0.3205428719520569, -0.329772412776947, 0.885565459728241, -0.44876956939697266, 0.3992151916027069, -0.09507153928279877, -0.286855548620224,...
def to _ dict ( self ) : self. validate ( ) # validate object before trying to get json format data _ dict = collections. ordereddict ( ) data _ dict [ " $ id " ] = str ( self. id ) data _ dict [ " moisturediffusionresistance " ] = self. moisturediffusionresistance data _ dict [ " roughness " ] = self. roughness data _...
[ -0.6211680173873901, -1.194931149482727, 0.8617871403694153, -1.7461295127868652, -0.5756363868713379, 0.27538520097732544, -0.3035951256752014, -0.40451720356941223, -0.22384092211723328, -0.41420233249664307, -0.9195843935012817, 0.48281317949295044, 0.352510541677475, 0.8305956721305847...
def get _ model ( path, classes ) : model = torchvision. models. resnet50 ( pretrained = false ) model. fc = torch. nn. linear ( model. fc. in _ features, len ( classes ) ) model. load _ state _ dict ( torch. load ( path, map _ location ='cpu') ) return model
[ -0.3514825403690338, -0.12381516396999359, 0.23332300782203674, -0.027971725910902023, -0.08546283096075058, 0.13037201762199402, -0.18875646591186523, 0.6480815410614014, 0.0034101728815585375, -0.0762038379907608, -0.24822022020816803, -0.6096526384353638, 0.44505661725997925, -1.1036990...
def nerv _ implem ( x _ hds, perp, init, w _ cf ) : global module _ name, sim _ dr _ nitmax, sim _ dr _ gtol, sim _ dr _ ftol, sim _ dr _ maxls, sim _ dr _ maxcor if ( w _ cf < 0 ) or ( w _ cf > 1 ) : raise valueerror ( " error in function nerv _ implem of module { module _ name } : w _ cf = { w _ cf } while it should ...
[ 0.03304664045572281, 0.6759799718856812, 0.9538259506225586, -0.4777936637401581, 0.1290515661239624, -0.2791869640350342, -0.3035658001899719, -0.4202682077884674, -0.16219386458396912, 0.5469499230384827, 0.07612751424312592, -0.3277774453163147, -0.41767632961273193, 0.29128071665763855...
def retrain _ classifiers ( self ) : print " retraining classifier, this can take a while... " # init trees self. trees = { } for cls in positive _ classifications : self. trees [ cls ] = urlfilter ( prune _ delay = 0, min _ rate = 0. 99, threshold = 0. 95, min _ urls _ prediction = 20, min _ urls _ prune = 40 ) # add ...
[ -1.4109376668930054, 0.5801249146461487, 0.6342852711677551, 0.03829590976238251, 0.7242100238800049, -0.49656662344932556, 0.38384056091308594, 0.6984617114067078, -1.228269100189209, 0.2290751188993454, -0.8815900087356567, 0.24260997772216797, 0.3339020609855652, 0.6131086349487305, -...
def linearcod ( a, b, x, y ) : n = len ( x ) sumy = sum ( y ) cod = ( b * sumy + a * sum ( x * y ) - 1 / n * sumy * * 2 ) / ( sum ( y * * 2 ) - 1 / n * sumy * * 2 ) return cod
[ 1.30976140499115, -0.4396723210811615, 0.6011331677436829, -0.33471575379371643, -0.6078402996063232, 0.18208299577236176, 0.36266079545021057, -0.4657900035381317, 0.36351895332336426, 0.24180778861045837, 0.26871252059936523, 0.27856388688087463, 0.2176968902349472, -0.6899940371513367, ...
def fprop ( self, inputs : jtensor ) - > jtensor : p = self. params if p. pooling _ type = ='max': outputs = jnp. max ( inputs, p. pooling _ dims, keepdims = p. keepdims ) elif p. pooling _ type = ='avg': outputs = jnp. mean ( inputs, p. pooling _ dims, keepdims = p. keepdims ) return outputs
[ -0.8085354566574097, 0.4638141691684723, 0.5908092260360718, 0.731979489326477, 0.30452391505241394, 0.04760672152042389, 0.6487866044044495, -0.9419043064117432, -0.3726644217967987, 0.5658960342407227, 1.1978981494903564, 0.4563613533973694, 0.4337800443172455, 0.1844780445098877, -0.3...
def test _ list _ integer _ max _ length _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 1. xsd ", instance = " nistdata / list / inte...
[ -0.40494099259376526, 0.149431511759758, 0.2526343762874603, 0.7830491065979004, -0.47212734818458557, 0.4761650264263153, -0.6209009289741516, 0.4894197881221771, 1.6452604532241821, 0.8430535197257996, -0.7906883358955383, -0.45001673698425293, -0.6182969212532043, 0.6075270175933838, ...
def clear _ frame _ stats _ directory ( algo _ name ) : error = none algo _ folder = get _ algo _ folder ( algo _ name ) folder = os. path. join ( algo _ folder,'frame _ stats') if os. path. exists ( folder ) : try : shutil. rmtree ( folder ) except oserror : error ='unable to remove { }, the analyze'\'data will be inc...
[ 0.7071799039840698, 0.8885391354560852, 0.690794825553894, -0.0606708861887455, -0.16285793483257294, 0.12868618965148926, 0.8143628835678101, -0.8200942873954773, 0.38444358110427856, 0.3707128167152405, 0.43658846616744995, 0.49460795521736145, 0.3105126619338989, 0.9904286861419678, -...
def prune _ rate ( self, verbose = true ) : total _ nb _ param = 0 nb _ zero _ param = 0 layer _ id = 0 for parameter in self. prunable _ model. parameters ( ) : param _ this _ layer = 1 for dim in parameter. data. size ( ) : param _ this _ layer * = dim total _ nb _ param + = param _ this _ layer # only pruning linear...
[ 0.303340345621109, 0.44991108775138855, 0.7100992798805237, 0.39869585633277893, 0.4396883547306061, -0.13345493376255035, 0.1919056475162506, 0.3725394904613495, -0.28414812684059143, 0.5910029411315918, 0.5799654722213745, -0.20947173237800598, -1.1387572288513184, 0.7738719582557678, ...
def test _ grant _ response ( self ) : params = parse _ authorization _ code _ response ( self. grant _ response ) self. assertequal ( params, self. grant _ dict ) params = parse _ authorization _ code _ response ( self. grant _ response, state = self. state ) self. assertequal ( params, self. grant _ dict ) self. asse...
[ 0.5739225149154663, -0.010165334679186344, 0.4592796266078949, -0.3658602833747864, 0.5114246010780334, -0.25264862179756165, 0.7317648530006409, 0.1070428267121315, 0.6622748970985413, -0.30674925446510315, 0.14187714457511902, 0.26440832018852234, -0.07839247584342957, 0.1441839784383773...
def printrandom ( self, number _ of _ prints ) : # check if the data have been preprocessed, or not yet if self. proprocessed = = false : self. preprocess ( ) # ramdomly pick " number _ of _ prints " frames # and shows them to the user using matplotlib's imshow ( ) for i in range ( number _ of _ prints ) : index = np. ...
[ -0.24322880804538727, 0.2911512553691864, 0.5963156223297119, -0.48858141899108887, -0.17181745171546936, -0.12702611088752747, 0.699603259563446, -1.1091768741607666, 0.8832222819328308, -1.0084930658340454, 0.47985005378723145, 1.056668758392334, -0.7743589282035828, 0.4347282350063324, ...
def test _ atomic _ boolean _ white _ space _ 1 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 2. xsd ", instance = " nistdat...
[ -0.6587330102920532, -0.3890831172466278, 0.5490880012512207, 0.9240430593490601, -0.13317346572875977, 0.24328605830669403, 0.3319907784461975, -0.31057295203208923, -0.20649920403957367, 0.850003182888031, 0.03439328819513321, 0.8052694797515869, 0.31096673011779785, 0.7071821093559265, ...
def is _ element _ valid ( self ) - > bool : version = self. get _ version _ for _ elem _ validation _ or _ none ( ) if version is none : return false code, value = self. _ get _ element _ attributes ( ) if ( code is none ) or ( value is none ) : return false try : element = version. elements. get ( code = code, value ...
[ -0.5590199828147888, 0.036713358014822006, 0.5972305536270142, 0.9787155389785767, 0.10659542679786682, 0.9765368103981018, -0.6340457797050476, 0.48041480779647827, -0.04686718061566353, 0.1747479885816574, -0.0032715678680688143, 0.23696452379226685, -0.03540721535682678, 0.1594012975692...
def test _ list _ integer _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 3. xsd ", instance = " nistdata / list / integer / schem...
[ -0.295289546251297, 0.14056120812892914, 0.43693825602531433, 0.24622559547424316, -0.014258450828492641, 0.4210249185562134, -0.7552602887153625, 0.5927459001541138, 1.362889051437378, 1.003177285194397, -0.8919316530227661, -0.21390441060066223, -0.25452467799186707, 0.3687947690486908, ...
def _ _ call ( self, uri, params = none, method = " get " ) : self. _ client _ _ session _ stablisher ( ) # remove empty params if params : params = { k : v for k, v in params. items ( ) if v is not none } kwargs = { " url " : uri, " verify " : true, " stream " : false } if method = = " get " : kwargs [ " params " ] = ...
[ -1.1870366334915161, -0.43706703186035156, 1.0744744539260864, -0.3206338584423065, -0.25072914361953735, -0.5928338766098022, -0.6963287591934204, -1.2601964473724365, 0.5703729391098022, 0.2295965850353241, 0.5097353458404541, 0.866739809513092, -1.1439409255981445, -0.023348387330770493...
def combine _ seq ( time _ series, scaler ) : seq = time _ series. shape [ 0 ] time _ step = time _ series. shape [ 1 ] total _ output = [ ] inter = 0 for i in range ( 0, seq + time _ step ) : seq _ output = [ ] if i < seq : for j in range ( 0, min ( i + 1, time _ step ) ) : if i > time _ step : var = i - time _ step +...
[ -0.7732937335968018, -0.33512160181999207, 0.7134878039360046, 0.4199557304382324, -0.357286661863327, -0.5630269050598145, 0.44587066769599915, -0.7340381145477295, -0.20549912750720978, 1.8278943300247192, -0.04708211123943329, -0.4560089111328125, 0.10271529853343964, 0.4146639108657837...
def start _ round ( self, start _ player _ num, one _ shot = true, clockwise = true ) : if 0 < = start _ player _ num < = len ( self. players ) : self. round _ start _ player = start _ player _ num self. round _ next _ player = start _ player _ num else : self. round _ start _ player = - 1 self. round _ next _ player =...
[ -0.3119288682937622, -1.0614525079727173, 0.6314894556999207, -0.6076563596725464, 0.4119076132774353, -0.11558076739311218, 1.0093313455581665, -0.02155935764312744, -0.022404350340366364, 0.48111262917518616, 0.023516936227679253, 1.0791348218917847, -1.3195405006408691, 0.32528012990951...
async def test _ unload _ entry ( opp : openpeerpower ) : id = str ( uuid4 ( ) ) config _ entry = mockconfigentry ( domain = twinkly _ domain, data = { conf _ entry _ host : test _ host, conf _ entry _ id : id, conf _ entry _ name : test _ name _ original, conf _ entry _ model : test _ model, }, entry _ id = id, ) # pu...
[ -0.23768950998783112, 0.03033452294766903, 0.36963415145874023, -1.037975549697876, 0.5754667520523071, -0.44359827041625977, 0.47710633277893066, -0.13168951869010925, -0.012459245510399342, 0.0504058338701725, -0.5287591218948364, 0.32446610927581787, -0.28319811820983887, -0.14844459295...
def insertion _ sort ( a ) : for k in range ( 1, len ( a ) ) : # insert a [ k ] at its proper location within a [ 0 ], a [ 1 ],..., a [ k ]. noted : a [ 0, k - 1 ] is sorted curr = a [ k ] j = k # find correct index j for current while j > 0 and a [ j ] > curr : # element a [ j - 1 ] must be after current a [ j ] = a [...
[ -0.8512362241744995, 0.41065648198127747, 0.4518875181674957, -0.21491116285324097, -0.8527215719223022, 0.15853893756866455, 1.84930419921875, 0.07559727132320404, -0.07627490907907486, 0.9112016558647156, 0.3244393765926361, 0.14843696355819702, -0.5095071792602539, 0.7265775203704834, ...
def get _ counts ( cls : type [ spaczzattrs ], span : span ) - > optional [ tuple [ int, int, int ] ] : if cls. _ all _ equal ( [ token. _. spaczz _ counts for token in span ] ) : return span [ 0 ]. _. spaczz _ counts else : return none
[ 0.8470801711082458, 0.027583565562963486, 0.29162490367889404, 0.44774532318115234, 0.33281204104423523, 0.023996291682124138, 0.3681660294532776, -0.704565703868866, 0.3144400417804718, -0.12861332297325134, -0.7373729944229126, 0.06723831593990326, -0.0738859623670578, 0.2769659161567688...
def concrete _ sample ( a, temp, eps = 1e - 8 ) : u = tf. random. uniform ( tf. shape ( a ), minval = 0., maxval = 1. ) g = - tf. math. log ( - tf. math. log ( u + eps ) + eps ) t = ( tf. math. log ( a ) + g ) / temp out = tf. nn. softmax ( t, - 1 ) out + = eps out / = tf. reduce _ sum ( out, - 1, keepdims = true ) ret...
[ 0.4451751708984375, 0.07012902945280075, 0.5290843844413757, -0.6192314028739929, -1.602020025253296, -0.058758463710546494, 0.4181835353374481, 0.4053042531013489, 0.23695392906665802, 0.58155357837677, 0.5090603828430176, -0.0502190962433815, 1.0244253873825073, -0.14526033401489258, -...
def create _ collection ( self, coll _ name ) : coll _ names = self. db. collection _ names ( ) self. log. debug ( " collection names received " ) # todo : error checking!!!!!!!!!!!!!!!!!!! if coll _ name not in coll _ names : self. db. create _ collection ( coll _ name ) self. log. warning ( " collection created : " +...
[ -0.5899261832237244, -0.1622762680053711, 0.9900481104850769, -0.5627692341804504, 1.00363290309906, 0.712316632270813, 0.038707517087459564, -0.7063086628913879, -0.20703530311584473, 0.24290531873703003, -0.9670513868331909, -1.4801535606384277, -0.47584301233291626, 0.9260039925575256, ...
def complex ( real, imag, name = none ) : real = ops. convert _ to _ tensor ( real, name = " real " ) imag = ops. convert _ to _ tensor ( imag, name = " imag " ) with ops. name _ scope ( name, " complex ", [ real, imag ] ) as name : input _ types = ( real. dtype, imag. dtype ) if input _ types = = ( dtypes. float64, dt...
[ -0.17712107300758362, -0.45953691005706787, 0.6574594378471375, 0.8858184814453125, -0.4798108637332916, -0.6203703880310059, 1.1239261627197266, -0.4792618751525879, -0.14985288679599762, 0.007706368807703257, -0.06088075786828995, 0.38634419441223145, 0.5808119773864746, -1.0073560476303...
def expected _ xpcost ( node, trainer, num _ trials = 1000 ) : return numpy. mean ( run _ trials ( node, trainer, num _ trials, include _ xpcosts = true ) [ 1 ] )
[ -0.2758050560951233, 1.2260361909866333, 0.5466849207878113, -0.029686976224184036, -0.530103325843811, -0.5750541687011719, 0.17143115401268005, 0.6658164858818054, 0.6630988121032715, 0.5751959085464478, 0.08212877810001373, 0.8344021439552307, 0.38655030727386475, -0.13831369578838348, ...
def commitment _ id ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " commitment _ id " )
[ 1.1877199411392212, 0.022341212257742882, 0.42971155047416687, 0.6067162156105042, 0.9859454035758972, 1.1019701957702637, 0.641777515411377, 1.039552092552185, 0.48272955417633057, 0.8930376768112183, 0.3037576675415039, 0.4489957094192505, -0.5182676315307617, -0.6635536551475525, -0.0...
def virtualmediavalidation ( self, options ) : self. cmdbase. login _ select _ validation ( self, options )
[ -0.6918824911117554, -1.4712773561477661, 0.11510030925273895, 1.166722297668457, 0.2596766948699951, 0.29538214206695557, 0.45471835136413574, -0.516146183013916, 0.9846155047416687, 0.6564028263092041, 0.5602635145187378, 0.9303386211395264, -1.4853644371032715, -0.24587009847164154, -...
def weight _ vt ( self ) : return self. structural _ weight _ per _ area * self. s _ v
[ 0.65668123960495, -0.4315914213657379, 0.2687254548072815, 0.33667996525764465, 0.0447419136762619, 0.35734066367149353, 0.8150588870048523, -0.43853726983070374, 0.485353946685791, 0.4203976094722748, 0.43208250403404236, 0.26237931847572327, 0.0795970931649208, 0.3177298307418823, -1.1...
def deserialize ( self, str ) : if python3 : codecs. lookup _ error ( " rosmsg " ). msg _ type = self. _ type try : if self. pose is none : self. pose = geometry _ msgs. msg. pose ( ) end = 0 _ x = self start = end end + = 69 ( _ x. road _ id, _ x. section _ id, _ x. lane _ id, _ x. is _ junction, _ x. pose. position. ...
[ 0.11339706927537918, -0.13386961817741394, 0.6276637315750122, -0.25200751423835754, -0.2893640995025635, 0.1959850788116455, 0.4373489320278168, -0.3429051339626312, 0.018046127632260323, -0.9576528072357178, -0.11034133285284042, -0.33922910690307617, -0.8803098201751709, -0.514340102672...
def assertfilestructure ( basedir, manifest ) : _ _ tracebackhide _ _ = true basedir = path ( basedir ) for relpath in manifest : path = basedir / relpath if relpath. endswith ('/') : assert path. is _ dir ( ) else : assert path. is _ file ( )
[ 0.649318277835846, -0.7060863375663757, 0.5026390552520752, 0.45601946115493774, 0.14978349208831787, 0.7182407379150391, 0.5400888323783875, 0.2841796278953552, 0.5670695304870605, -1.0444660186767578, 1.108920931816101, 0.0715203806757927, -1.1149197816848755, 0.41458630561828613, -1.1...
def get _ path ( self, comp ='ocn ', climo _ yr0 = none, climo _ yr1 = none, ts _ yr0 = none, ts _ yr1 = none, rest _ yr = none ) : # check machine hostname = os. uname ( ) [ 1 ] assert self. machine in hostname, " data hosted on { }, running on { }. stop. ". format ( self. machine, hostname ) # check arguments assert ...
[ 0.29460179805755615, -0.005771943833678961, 0.7226313352584839, -0.17369632422924042, 0.398128479719162, 0.8915536999702454, 0.4792674481868744, -0.19192583858966827, -0.6595194339752197, 0.0996946170926094, 0.15885448455810547, 0.24969357252120972, -0.04766826704144478, -0.041496668010950...
def check _ dermoscopic ( meta ) : if " image _ type " not in meta [ " meta " ] [ " acquisition " ] : return false elif not str ( meta [ " meta " ] [ " acquisition " ] [ " image _ type " ] ) = = " dermoscopic " : return false return true
[ -0.1943899542093277, 0.015620487742125988, 0.5998894572257996, 0.16080717742443085, 0.05060911178588867, 0.48911330103874207, -0.7327196598052979, -0.5575200915336609, -0.13966257870197296, 0.5986403226852417, 1.0667363405227661, 0.9397320747375488, -0.21614617109298706, 0.9013412594795227...
def transform _ pandas _ row ( pandas _ row ) : return numpy. float32 ( action ( ctypes. c _ char _ p. from _ param ( pandas _ row. values. tobytes ( ) ) ) )
[ 0.38163498044013977, 0.26563066244125366, 0.3012782037258148, 0.08749168366193771, 0.9995276927947998, -0.26482707262039185, -0.0148774990811944, -0.4333113431930542, 0.5185403227806091, -0.2963232696056366, -0.3714275658130646, 0.31417858600616455, 0.6783352494239807, -0.8584668040275574,...
def test _ init ( self ) : p = taxonassigner ( { } ) self. assertequal ( p. name,'taxonassigner') self. assertequal ( p. params, { } )
[ -0.2535800039768219, -1.0626552104949951, 0.16350005567073822, -0.02348332852125168, 0.19599029421806335, 0.6997182965278625, 0.14283661544322968, 0.592380166053772, -0.45775145292282104, -0.5065166354179382, -0.3189651370048523, -0.2523505985736847, 0.1211841031908989, 1.0521609783172607,...
def first _ page _ lift ( self, n _ dim, deg, start _ chains, r ) : # store space for preimages lift _ chains = local _ chains ( self. nerve _ spx _ number [ n _ dim ] ) # coordinates in first page betas _ 1 _ page = np. zeros ( ( len ( r ), self. page _ dim _ matrix [ 1, deg, n _ dim ] ) ) # return if trivial if len (...
[ 0.09195804595947266, -0.06877654045820236, 0.5797386765480042, -0.3172759413719177, 0.3657900393009186, -0.5412886142730713, 0.5844185948371887, -0.48738518357276917, -0.6435436010360718, 0.4724076986312866, -0.04252185299992561, -0.22556579113006592, -0.2771989703178406, 0.201665058732032...
def show ( self, command, raw _ text = false ) : commands = [ command ] list _ result = self. show _ list ( commands, raw _ text ) if list _ result : return list _ result [ 0 ] else : return { }
[ -0.5841695070266724, 1.0220023393630981, 0.44286853075027466, 0.1480891853570938, -1.2105095386505127, -1.521772861480713, -0.6134093999862671, 0.34511396288871765, 0.5951117277145386, 0.30315643548965454, -0.3404167592525482, -0.05285286903381348, -0.05369678884744644, 1.0199445486068726,...
def regions ( self ) : return self. dimensions [ " region " ]. allowed _ values
[ 0.09174992889165878, 0.6470375657081604, 0.2416049838066101, 0.07319308817386627, -0.3547562062740326, 0.8882548809051514, 0.07814770191907883, -0.45188623666763306, -0.4342704117298126, -0.16095033288002014, 0.12285801023244858, 1.1500109434127808, -0.1437595784664154, 0.07765322923660278...
def create _ html ( self, filename _ from, filename _ to, css _ url = " ", inline = false ) : os. makedirs ( os. path. dirname ( os. path. abspath ( os. path. expanduser ( filename _ to ) ) ), exist _ ok = true, ) fname _ from = os. path. abspath ( os. path. expanduser ( filename _ from ) ) fname _ to = os. path. abspa...
[ -0.4067786931991577, 0.11282069981098175, 0.9607795476913452, 0.5898621082305908, -0.4391288757324219, 1.0482512712478638, 0.3101324439048767, 0.28836536407470703, -1.3010306358337402, -0.0038731456734240055, 0.8205391764640808, 0.4773147404193878, 0.5699500441551208, 0.24217671155929565, ...
def test _ create _ team _ non _ unique ( api _ client, team _ factory, user _ factory ) : # jenny is a staff user on the site password = " password " user = user _ factory ( is _ staff = true, password = password ) # she logs in api _ client. log _ in ( user. email, password ) # there is a team already on the site. ye...
[ -0.08564198017120361, 0.30503469705581665, 0.13420544564723969, 0.6833727955818176, 1.154056429862976, 0.4604625403881073, 0.5193453431129456, -0.8786954879760742, 0.26921582221984863, -0.07634987682104111, -0.9871582984924316, -0.0014990114141255617, 0.5366504788398743, 0.0617614984512329...
def write _ groups _ to _ file ( filename, groups ) : try : with open ( filename,'w ', encoding = " utf - 8 " ) as outfile : import json group _ dict = dict ( ) group _ list = list ( ) for group in groups : group _ dict ['name'] = group. get _ name ( ) group _ dict ['gid'] = group. group _ id group _ dict ['members _ c...
[ -1.3617628812789917, -0.384655237197876, 0.5084285140037537, -0.2079472839832306, 0.5536741018295288, 0.30581599473953247, 0.5335417985916138, -0.323459655046463, -1.4201266765594482, 0.42062216997146606, -0.6064462065696716, 0.04951496049761772, -0.3977455198764801, 0.7370339035987854, ...
def getattribute ( self, nodes, node, attributename ) : try : return nodes. getelementsbytagname ( node ) [ 0 ]. attributes [ attributename ]. value except keyerror : return " undef "
[ -0.19607225060462952, 0.09190884232521057, 0.44261080026626587, -0.05960887297987938, 0.4340061843395233, -0.9150466322898865, -0.4111333191394806, 0.20954179763793945, -0.21186815202236176, 0.25028765201568604, 1.460244059562683, 0.6505753397941589, 1.0058099031448364, 0.29048779606819153...
def cube _ ready ( caldir = '. / ', cur _ date _ str = none ) : ret = false # files to look for if cur _ date _ str is none : tmf ='tracematch. pkl'tmmf ='tracematch _ withmasks. pkl'hgf ='hexagrid. pkl'wsf ='wavesolution. pkl'fff ='flat. fits'else : tmf = cur _ date _ str +'_ tracematch. pkl'tmmf = cur _ date _ str +'...
[ -0.061785776168107986, -0.34700414538383484, 0.9055467844009399, -0.26013121008872986, -0.24963568150997162, 0.7275773286819458, 0.22594478726387024, -0.5359770655632019, -0.1120859682559967, -0.16206154227256775, -0.03400658816099167, -0.19768740236759186, 0.09932195395231247, 0.986103355...
def parse _ values ( tablename, schema, values, outfile ) : latest _ row = [ ] new _ csv _ filename = tablename + '. csv'reader = csv. reader ( [ values ], delimiter = ', ', doublequote = false, escapechar ='\ \ ', quotechar = "'", strict = true ) with open ( new _ csv _ filename,'w +') as csvfile : writer = csv. write...
[ 0.06048523262143135, -0.5050098896026611, 0.8080160617828369, 0.7146469354629517, -0.2892685830593109, -0.9069941639900208, -0.001898270915262401, 0.7456365823745728, -0.0725371465086937, 0.2935483157634735, 0.4615415334701538, 0.09234128147363663, -0.37254413962364197, 0.16145101189613342...
def _ _ init _ _ ( self ) : # connect to the local pi self. pi = pigpio. pi ( ) # use bus 1 for the b + model # set the device address we are working with ( 0x5c ) self. handle = self. pi. i2c _ open ( 1, 0x5c, 0 ) return
[ 0.06282048672437668, -0.7412395477294922, 0.24082082509994507, 0.29337078332901, 0.25410160422325134, 0.5227871537208557, 0.5216361880302429, 1.0284358263015747, -0.4984084963798523, -0.7706969380378723, -0.5260751247406006, 0.13040612637996674, -1.0947787761688232, -0.22430796921253204, ...
def _ _ init _ _ ( self, center = pt. point ( 0, 0 ), radius = 1 ) : self. center = center self. radius = radius
[ 0.615208089351654, -1.0003446340560913, 0.4508376717567444, 0.25339365005493164, -0.215293750166893, -0.09404066205024719, -0.6027072072029114, 0.7250344753265381, 0.664712131023407, 0.2001504749059677, -0.3570214807987213, 0.594059407711029, -0.4336642324924469, 0.49781692028045654, 0.6...
def run _ sched ( self ) : for w in self. _ active _ workers : w. start ( )
[ -0.1289224773645401, -1.0772393941879272, 0.31198814511299133, 0.2037205845117569, 1.155103087425232, 0.47885558009147644, 0.6911427974700928, 0.7953433990478516, -0.648702085018158, -0.24469061195850372, -0.477402001619339, 0.9872185587882996, -0.0995836928486824, -0.16760581731796265, ...
def forest _ parameter _ selection ( ) : print'assess the imapct of forest parameters with leave - one - out'+ \'cross - validation...'# - - directory config db _ dir = r'/ nfs / t2 / atlas / database'base _ dir = r'/ nfs / h1 / workingshop / huanglijie / autoroi'doc _ dir = os. path. join ( base _ dir,'doc') data _ di...
[ -0.7728770971298218, -0.3830103278160095, 0.6764323711395264, 0.025440696626901627, 0.4150548577308655, 0.005818401928991079, 1.139967918395996, 0.6510447859764099, -0.0685485377907753, 0.30510571599006653, -0.2642016112804413, 0.3659007251262665, -0.12722373008728027, 1.1701345443725586, ...
def save _ goofs ( cursor, goofs _ content, movie _ title ) : goofs _ count = 0 group _ type = none regex ='( [, 0 - 9 ] + ) of ( [, 0 - 9 ] + )'for g in goofs _ content. children ( ). items ( ) : if g. attr ('class') = ='li _ group': # type of the group. a group contains multiple goofs. group _ type = g. text ( ) elif...
[ -0.6941954493522644, 0.8171151876449585, 0.6045783758163452, 0.006026039831340313, 0.38486742973327637, -0.5725680589675903, 0.3293968737125397, 0.21331574022769928, -0.9532644152641296, 0.6729934811592102, -1.4301331043243408, -0.3724669814109802, -0.8689004182815552, 0.31267058849334717,...
def commitconnection ( self ) : self. connection. commit ( )
[ -0.34782224893569946, -1.3155150413513184, 0.557199239730835, 0.03792695701122284, 1.0196466445922852, 0.6413565874099731, 0.14555296301841736, 0.8819671869277954, -1.3233534097671509, 1.5315539836883545, 0.29794740676879883, -0.5567944645881653, -1.2322235107421875, 0.005708044394850731, ...
def split _ fqn ( fqn ) : parts = fqn. rsplit ( ". ", 2 ) while len ( parts ) < 3 : parts. insert ( 0, none ) return tuple ( parts )
[ -0.38927581906318665, 0.3439783453941345, 0.49206703901290894, -0.5773987174034119, 0.7137206792831421, -0.5208925604820251, -0.5859606266021729, -0.3282702565193176, 0.25349053740501404, -0.21191923320293427, -0.899272084236145, -1.0594178438186646, -0.7588775753974915, -1.647035360336303...
def get _ timeout ( ) : if profile is none : raise eikonerror ('401 ','appid is missing. did you forget to call set _ app _ id ( )?') return profile. get _ timeout ( )
[ 1.1958869695663452, 0.7240204811096191, 0.22277355194091797, 1.208774209022522, 0.19982464611530304, 0.1160680279135704, 0.41212815046310425, 0.4410655200481415, 0.09001089632511139, 1.3684123754501343, -0.019353792071342468, -0.08424441516399384, -0.11930223554372787, 0.024339109659194946...
def find _ best _ v _ lines ( top _ ln, bot _ ln, lines, bounds ) : best _ err = [ none ] * 2 best _ line = [ none ] * 2 if len ( lines ) > = min _ rects : w = bounds [ 2 ] - bounds [ 0 ] location = 0 # left or right side for top _ ch in top _ ln. chars : if top _ ch. refined _ box [ 0 ] > bounds [ 0 ] + w / 3 : if top...
[ 0.13143856823444366, -0.7857778668403625, 0.8188180923461914, -0.31205105781555176, 0.19168449938297272, -0.20049318671226501, -0.47181767225265503, -0.6706556081771851, -0.5070510506629944, -0.4878747761249542, -0.1346999555826187, 0.5092035531997681, 0.5169766545295715, 0.282476872205734...
def join _ tokens ( lst, token ) : _ token = token. strip ('' ) if _ token = ='' : # token only has empty space ( s ) in it, # we make standardize it to be one empty space. _ token ='' else : # paddle a space on the left and right side of the token, # so that " and " becomes " and ". _ token =''. join ( ['', standardiz...
[ 0.7703949809074402, -0.14994172751903534, 0.5564073920249939, 0.08007272332906723, -0.5004222393035889, -0.05006885528564453, -2.047818660736084, 1.292734146118164, -0.07483071088790894, 0.2670098841190338, -0.7748778462409973, 0.49167752265930176, -0.3499693274497986, 0.48273006081581116,...
def compute _ one _ move ( self, marble, move : movement ) : letter, num = self. convert _ to _ nums ( marble ) l _ change, n _ change = move. value letter + = l _ change num + = n _ change result = self. convert _ to _ string ( letter, num ) return result
[ -1.290899395942688, -0.03196835145354271, 0.47108030319213867, -0.2706492245197296, -0.13444381952285767, -0.9000753164291382, 0.21680743992328644, 0.1832924485206604, 0.8266394734382629, 0.9515988826751709, -0.2668647766113281, 0.7483131885528564, -0.6251493692398071, 0.48347917199134827,...
def calc _ roi _ iccs ( data ) : if drop _ rois : print ( " ignoring dropped _ rois : { } ". format ( self. dropped _ rois ) ) data = data. drop ( columns = self. dropped _ rois ) # make dataframe to hold results m = len ( data. columns ) icc _ df = pd. dataframe ( data = np. zeros ( ( m, 4 ) ), index = data. columns, ...
[ 0.22633734345436096, 0.47142067551612854, 0.4433390200138092, -0.33084434270858765, 0.06845691800117493, -0.0700983926653862, 0.9907132983207703, 0.08185051381587982, -0.36165285110473633, 1.0317445993423462, 0.4720326066017151, 0.20092160999774933, -0.3736909031867981, -1.208524227142334,...
def generate _ events ( self, rng, duration _ s, t0 _ s ) : actual _ number = self. actual _ event _ count ( rng, duration _ s, self. rate _ hz ) number _ admuons = int ( actual _ number * self. prob _ wp _ and _ ad ) number _ showermuons = int ( actual _ number * self. prob _ wp _ and _ shower ) duration _ ns = int ( ...
[ -0.38321903347969055, 0.1638527810573578, 0.6047348380088806, -0.712426483631134, -0.5582010746002197, 0.5862712264060974, 0.5345690250396729, 0.42936068773269653, 0.709705114364624, 0.10907990485429764, -0.019067436456680298, 1.0257024765014648, 0.3311842083930969, 1.3760665655136108, 0...
def equalize ( self ) : if self. _ number > 0 : n = max ( len ( self. status ), len ( self. line ), len ( self. id ), len ( self. symbol ), len ( self. color ), len ( self. size ), len ( self. id _ size ), len ( self. id _ color ), len ( self. xoffset ), len ( self. yoffset ), len ( self. id _ font ), len ( self. line ...
[ -0.2858809530735016, -0.18819141387939453, 0.2680716812610626, -0.8787761330604553, 1.0260002613067627, -0.1944420337677002, 0.15089933574199677, 0.20739275217056274, -0.07046852260828018, -0.6495463252067566, -0.9342175722122192, 0.06869001686573029, 0.5733948945999146, 1.0585830211639404...
def custom _ filter ( filt ) : jinja2. filters. filters [ filt. _ _ name _ _ ] = filt return filt
[ -0.39473772048950195, -0.7386881113052368, 0.34316954016685486, -0.6474493741989136, -1.2067657709121704, -0.8227737545967102, -0.004883505403995514, -0.26964086294174194, 0.2180955410003662, -0.8027620911598206, -0.15294942259788513, 1.6569002866744995, 0.785904049873352, 0.60020893812179...
def checkersamount ( self ) : return len ( self. checkers )
[ 0.3745678663253784, -0.2606319785118103, 0.2498612105846405, 0.21807624399662018, 0.12183643877506256, 0.36753049492836, 0.022137679159641266, 0.4830152988433838, -0.09701387584209442, 0.03362114354968071, -0.751523494720459, 0.3246179521083832, -0.5100927948951721, 1.0001001358032227, -...
def parameter _ combinations ( cls, raw = false ) : parameter _ combinations = {'proportion': [ 0. 1, 0. 25, 0. 5, 0. 75, 1. 0, 1. 5, 2. 0 ],'n _ neighbors': [ 3, 5, 7 ] } return cls. generate _ parameter _ combinations ( parameter _ combinations, raw )
[ -0.573418378829956, 0.42561981081962585, 0.6062405109405518, 0.3022463619709015, 0.031521156430244446, 0.27248281240463257, 0.22273249924182892, -0.46147188544273376, -0.46760278940200806, 0.3823310434818268, -0.17893590033054352, -0.588127851486206, 0.6133012771606445, 0.38758909702301025...
def export _ product _ images ( self, instance, shopify _ template ) : instance. connect _ in _ shopify ( ) if not shopify _ template. shopify _ image _ ids : return false for image in shopify _ template. shopify _ image _ ids : shopify _ image = shopify. image ( ) shopify _ image. product _ id = shopify _ template. sh...
[ -1.283236026763916, -0.15069922804832458, 0.5725547671318054, -0.055080559104681015, 0.5872175097465515, -0.15347515046596527, 0.027750670909881592, -0.42977461218833923, 0.5400981903076172, 1.2573412656784058, -1.398980736732483, 0.0567350871860981, 0.0759396031498909, 0.3456425070762634,...
def predownload _ hook ( conduit ) : global servers _ per _ repo # fetch a listing of repositories repolist = conduit. getrepos ( ) # fetch a listing of packages to download pkglist = conduit. getdownloadpackages ( ) mt = multithread ( ) url _ pos = dict ( ) # setup a queue of packages to download for pkg in pkglist : ...
[ -0.009414236061275005, 0.4145655632019043, 0.6350281238555908, -0.49436628818511963, 0.7999522686004639, -0.1702241450548172, 0.006223720032721758, 0.13484682142734528, 0.5849331617355347, 0.055866681039333344, -0.2090093046426773, 0.4253021478652954, 0.0038897558115422726, 0.6870267391204...
def to _ str ( self ) : return pformat ( self. to _ dict ( ) )
[ -0.3156525194644928, -1.1576071977615356, 0.37752002477645874, -1.1022119522094727, -0.20021124184131622, 0.4693031311035156, -1.2643425464630127, -0.3139212131500244, 0.25353115797042847, -0.17005473375320435, 1.0700582265853882, -0.2424885332584381, -0.049409545958042145, -0.226218611001...
def _ _ init _ _ ( self ) : # call the parent class and set up the window # super ( ). _ _ init _ _ ( screen _ width, screen _ height, screen _ title ) super ( ). _ _ init _ _ ( 1800, 1000, " ramoscope " ) # set the path to start with this program file _ path = os. path. dirname ( os. path. abspath ( _ _ file _ _ ) ) o...
[ 0.4871967136859894, -0.08676455914974213, 0.9456819295883179, 0.26735395193099976, -0.03977159410715103, 0.18128767609596252, 0.21428272128105164, -0.453667014837265, 0.20011591911315918, 0.16321824491024017, -0.24567911028862, 0.16898763179779053, 0.17625750601291656, 1.1190745830535889, ...
def test _ request _ do _ delete ( test _ dao, test _ configuration ) : dut = dtcsimilaritem ( test _ dao, test _ configuration, test ='true') dut. request _ do _ select _ all ( revision _ id = 1 ) assert not dut. request _ do _ delete ( 10 )
[ 0.1379486322402954, 1.440529704093933, 0.5618925094604492, 0.7544721364974976, 1.127935767173767, 0.2114456593990326, 0.22730736434459686, 0.2315548062324524, 0.5560081601142883, -0.43277207016944885, -0.36672449111938477, 0.26613980531692505, 0.21264731884002686, -0.560171902179718, 0.3...
def get _ constants ( prefix ) : return dict ( ( getattr ( socket, n ), n ) for n in dir ( socket ) if n. startswith ( prefix ) )
[ -0.6956221461296082, 0.09140891581773758, 0.4512557089328766, -0.8700727820396423, -1.7013845443725586, -1.1061633825302124, -0.586501955986023, -0.4812164902687073, -0.2937178611755371, 0.7324657440185547, -1.1929861307144165, 0.6679036021232605, 0.36920830607414246, 0.5778096914291382, ...
def md5 ( message ) : return hashlib. md5 ( to _ bytes ( message ) ). hexdigest ( )
[ 0.9163245558738708, 0.2889617085456848, 0.17569252848625183, -0.5960135459899902, -0.4823795557022095, 0.1271047294139862, 0.40383192896842957, -0.33643439412117004, -0.6584304571151733, 0.02062239870429039, 0.11054477840662003, -0.08681244403123856, -1.0050171613693237, 0.0943151861429214...
def getarc ( self, value, val1 = 0., val2 = 90., convert = true ) : xs = [ ] ys = [ ] val1 = val1 * numpy. pi / 180. val2 = val2 * numpy. pi / 180. deltaangle = ( val2 - val1 ) / self. detail for i in range ( self. detail + 1 ) : a = val1 + i * deltaangle xs. append ( value * numpy. cos ( a ) ) ys. append ( value * num...
[ -0.9229083061218262, -0.019457288086414337, 0.7572917342185974, -0.5300967693328857, -0.20350855588912964, 0.07827433198690414, -0.055954404175281525, -0.4342769384384155, -0.05851977691054344, 0.07631862163543701, 0.5195596218109131, 0.4763697385787964, 0.9512834548950195, -0.181068018078...
def _ get _ element ( ids ) - > union [ element, list [ element ] ] : session = get _ session ( ) if isinstance ( ids, str ) : if len ( ids ) < = 3 and ids. lower ( )! = " tin " : return session. query ( element ). filter ( element. symbol = = str ( ids ) ). one ( ) else : return session. query ( element ). filter ( el...
[ -1.31123685836792, 0.2874923348426819, 0.4079659581184387, -0.20235660672187805, 0.25927427411079407, -0.8385046720504761, -0.9185888171195984, -0.43534114956855774, 1.0352007150650024, -0.08589698374271393, 0.5546773076057434, 0.3346371054649353, -0.3680117130279541, -0.34441953897476196,...
def grab ( self ) : driver = webdriver. chrome ( chrome _ options = addheaders. co ) while 1 : pid = self. pidqueue. get ( ) url ='http : / / www. pixiv. net / member _ illust. php? mode = medium & illust _ id ='+ pid pos = self. ifvisit ( pid ) if pos = = - 2 : driver. get ( url ) for recommendid in self. rec. findall...
[ -0.9745244979858398, -0.5236929059028625, 1.036900281906128, -0.00013430819672066718, 0.3030179440975189, 0.16852964460849762, 0.438853919506073, 0.9519782662391663, -0.20972993969917297, -0.03054770641028881, -0.7195659279823303, -0.08791331946849823, -0.14515018463134766, 0.8346087336540...
def pix ( self, ispec, iflux, xyrange = false ) : raise notimplementederror
[ -0.7263132929801941, 0.045808158814907074, 0.4176851212978363, 0.03779720887541771, 0.5857494473457336, -0.4614780843257904, -0.8037956357002258, 0.12678904831409454, 0.06921742856502533, -0.09275902807712555, 0.39063337445259094, 0.9122353792190552, -0.20861874520778656, 0.069092012941837...
def healpixmap ( nside, lon, lat, fill _ value = 0., nest = false ) : lon _ median, lat _ median = np. median ( lon ), np. median ( lat ) max _ angsep = np. max ( ugali. utils. projector. angsep ( lon, lat, lon _ median, lat _ median ) ) pix = angtopix ( nside, lon, lat, nest = nest ) if max _ angsep < 10 : # more effi...
[ 0.08443921059370041, 0.2544437348842621, 0.6646791696548462, -1.045483112335205, -0.1018684133887291, 0.1991703361272812, -0.6182014346122742, -0.16059869527816772, 0.7699589133262634, -0.6162074208259583, 0.987363874912262, 0.024918997660279274, 0.6403951644897461, 0.5538962483406067, -...
def test _ propagation _ angle ( arr _ n _ 0, arr _ theta, arr _ lam _ z ) : n _ 0 = arr _ n _ 0 theta = arr _ theta omega, m, k, k _ total, lam _ x = sbp. calc _ wave _ params ( arr _ n _ 0, arr _ theta, arr _ lam _ z ) # set up both sides of the equation lhs = omega rhs = n _ 0 * np. cos ( theta ) tolerance = 1e - 14...
[ 0.941326379776001, -0.1567358672618866, 0.5736282467842102, 0.5573468804359436, 0.36518824100494385, 0.4207720160484314, 0.4933188855648041, 0.7848433256149292, 0.2898574471473694, 0.9602513313293457, -0.01335133332759142, -0.16903530061244965, -1.1206315755844116, 0.5533484220504761, 0....
def transfer _ money ( request _ msg, person ) : action = str ( request _ msg. form ['action'] ) bank _ name = str ( request _ msg. form ['bank name'] ) account _ number = int ( request _ msg. form ['account number'] ) routing _ number = int ( request _ msg. form ['routing number'] ) amount = decimal ( request _ msg. f...
[ 0.10612013190984726, -0.0035961968824267387, 1.1245626211166382, 0.6679980158805847, 0.40814340114593506, -0.18921133875846863, 0.36177462339401245, -0.4057042598724365, 0.003771725110709667, -0.48399078845977783, 0.8424869775772095, -0.32588404417037964, -0.3812859058380127, 1.11817538738...
def process _ citation _ ref _ list ( self, original _ obj ) : for handle in original _ obj. get _ citation _ list ( ) : if handle : citation = self. db. get _ citation _ from _ handle ( handle ) if citation : self. process _ citation ( citation )
[ 0.18233592808246613, -1.1390584707260132, 0.5179463028907776, 0.6058660745620728, 0.3247610628604889, 0.01768679916858673, 0.5714399814605713, 0.5307589173316956, 0.05030985176563263, 0.40412792563438416, 0.07686197012662888, -0.20903190970420837, -0.15746964514255524, 1.524448275566101, ...
def validate ( ) : form = request. form try : data _ graph _ source = form ['datagraphsource'] assert data _ graph _ source, " datagraphsource not found in form data. " except ( attributeerror, keyerror, assertionerror ) as e : raise e try : shacl _ graph _ source = form ['shaclgraphsource'] except ( attributeerror, ke...
[ -0.06127281114459038, 0.6014016270637512, 0.8095099925994873, -0.1793285459280014, 0.5603567957878113, 0.6510699391365051, 0.8177524209022522, -0.26178649067878723, -0.11957750469446182, -0.4372176229953766, -0.11774192005395889, 0.17277632653713226, 0.27490636706352234, 0.4225820004940033...
def _ _ str _ _ ( self ) : return repr ( self. unwrapped )
[ -0.6534173488616943, -1.4755043983459473, 0.36823418736457825, -1.7209861278533936, -0.5695130228996277, 1.0020273923873901, 0.04384985938668251, 0.044495705515146255, 0.5934749245643616, -0.26040026545524597, 0.44226935505867004, 1.326010823249817, 0.6004047393798828, -0.5766227841377258,...
def events _ to _ image ( xs, ys, ps, sensor _ size = ( 180, 240 ), interpolation = none, padding = false, meanval = false, default = 0 ) : img _ size = ( sensor _ size [ 0 ] + 1, sensor _ size [ 1 ] + 1 ) if interpolation = ='bilinear'and xs. dtype is not torch. long and xs. dtype is not torch. long : xt, yt, pt = tor...
[ -0.16469831764698029, 0.36619746685028076, 0.9824704527854919, 0.08815746754407883, 0.07093799859285355, -0.3593359887599945, -0.018187448382377625, 0.018618935719132423, 0.18103061616420746, 0.3547615706920624, 0.6369534730911255, 0.31402724981307983, 1.007504940032959, -0.180865153670310...
def vgg16 _ bn _ imagenet ( pretrained = false, * * kwargs ) : model = vgg _ imagenet ( make _ layers ( cfg _ imagenet ['d'], batch _ norm = true ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg16 _ bn'] ) ) return model
[ -0.16863414645195007, 0.7121792435646057, 0.33802613615989685, 1.3128509521484375, 0.261942595243454, 0.18955554068088531, -0.00503444904461503, 0.04344994202256203, -0.7470038533210754, -0.08408226817846298, -0.42103368043899536, 0.23738530278205872, -0.050701338797807693, 0.1192795708775...
def to _ epbunch ( self, idf, thickness ) - > epbunch : if self. _ key = = " material : nomass " : # special case for material : nomass return idf. newidfobject ( " material : nomass ", name = self. name, roughness = self. roughness, thermal _ resistance = thickness / self. conductivity, thermal _ absorptance = self. t...
[ -0.1564527302980423, -0.12610279023647308, 0.5957251787185669, -0.7818990349769592, 0.05906551331281662, 0.8774279356002808, -0.34933626651763916, -0.31644681096076965, 0.03427073359489441, -0.45527610182762146, -0.2580680847167969, 0.2902500331401825, -0.7641651034355164, 0.53352552652359...
def on _ launch ( launch _ request, session ) : print ( " on _ launch requestid = " + launch _ request ['requestid'] + ", sessionid = " + session ['sessionid'] ) # dispatch to your skill's launch return get _ welcome _ response ( )
[ 0.8953883647918701, -1.4403096437454224, 0.4421597719192505, 0.3250334560871124, -0.33013689517974854, -0.556218147277832, -0.9190388321876526, -0.19104306399822235, 1.65072762966156, -0.012145759537816048, -0.5162994861602783, 0.6643654108047485, 1.026073694229126, 0.2634713649749756, -...
def palindrome _ sentence ( sentence : str ) - > bool : string = " " for char in sentence : if char. isalnum ( ) : string + = char return is _ palindrome ( string )
[ -0.15249161422252655, -0.3502430021762848, 0.4454208314418793, 0.13853685557842255, -0.5998459458351135, -0.15289542078971863, -0.8204413056373596, 0.30761274695396423, 0.1130199208855629, 0.6326042413711548, -0.34389007091522217, -1.1917649507522583, -1.38105046749115, -0.4930082261562347...
def cost ( self ) : total _ cost = { } if self. d _ production _ cost : for prod in self. d _ production _ cost : cost = prod. cost ( ) for item in cost : if item in total _ cost : total _ cost [ item ] + = cost [ item ] / self. d _ quantity else : total _ cost [ item ] = cost [ item ] / self. d _ quantity else : total...
[ -1.346093773841858, 0.202218696475029, 0.7151996493339539, -0.08274716138839722, -0.6900193691253662, -0.7503551840782166, 0.5332756042480469, 0.096210777759552, 0.11874277144670486, 0.9157890677452087, -0.5680979490280151, -0.92862868309021, 0.8676785826683044, -0.27956947684288025, -0....
def get _ queryset ( self ) : return anime. objects. order _ by ('- released _ date') [ : 5 ]
[ -0.4057796001434326, 0.08789052814245224, 0.5574770569801331, 0.11372410506010056, 0.24371904134750366, 0.04816785454750061, -0.22641748189926147, -0.4379541277885437, -0.45907658338546753, 0.08605998754501343, -0.15860791504383087, 0.3703917860984802, -0.14295291900634766, -0.456550955772...
def sliding _ window ( unsorted _ x, y = none, bin _ size = 60., window _ size = 3, start = - 60., end = 7560. ) : indexes = range ( len ( unsorted _ x ) ) indexes. sort ( key = unsorted _ x. _ _ getitem _ _ ) sorted _ x = map ( unsorted _ x. _ _ getitem _ _, indexes ) if y is not none : sorted _ y = map ( y. _ _ getit...
[ -0.3299945890903473, 0.14452208578586578, 0.7725163698196411, 0.20990878343582153, -0.6902976632118225, -0.19372735917568207, 0.4331965744495392, 0.2526516914367676, -0.367560476064682, 0.22375188767910004, -0.1141887828707695, 1.730513334274292, 0.24947257339954376, 0.38276252150535583, ...
def is _ server _ error ( status ) : return 500 < = status and status < = 599
[ -0.8362318873405457, -0.3642544150352478, 0.33125948905944824, 0.832207202911377, -0.9991862177848816, 0.3596557378768921, -0.5342891216278076, -0.20175881683826447, 1.139928936958313, -0.0006119779427535832, -0.41568493843078613, 1.163625955581665, -0.7069857120513916, 0.38979408144950867...
def go _ backward ( self, speed _ value ) : # setup motor speed self. _ speed = speed _ value self. speed = self. _ speed self. left _ wheel. backward ( ) self. right _ wheel. backward ( ) if self. _ debug : print ( self. _ debug _ info,'running backward with speed')
[ -0.25539514422416687, -0.05991712212562561, 0.5582637786865234, -0.10544376820325851, 0.8986461758613586, -0.1292550265789032, 0.43852946162223816, 0.5763598084449768, -1.1709846258163452, 0.06029560789465904, -0.13248345255851746, 0.602729320526123, -0.2039048820734024, 1.40009343624115, ...
def authenticate ( self, username : str, password : str ) - > bool : for identity in self. data [ " identities " ] : if identity [ " username " ]. casefold ( ) = = username. casefold ( ) and \ identity [ " password " ] = = password : return true return false
[ -1.0437899827957153, -0.7243412733078003, 0.6294990181922913, 0.660349428653717, -0.010189815424382687, 0.17039422690868378, -1.114453673362732, 0.12924259901046753, -0.12939856946468353, 0.6670435070991516, -0.16474780440330505, 0.2564842402935028, -0.9014252424240112, -0.4581301510334015...
def test _ list _ integer _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 5. xsd ", instance = " nistdata / list / integer / schem...
[ -0.4003416895866394, -0.1759253740310669, 0.273166298866272, 0.10601349920034409, -0.4004043936729431, -0.3908527195453644, 0.09590625017881393, -0.07547716051340103, 0.6350977420806885, 0.9113292694091797, -1.3394502401351929, -0.47688159346580505, -0.8083846569061279, 0.8555143475532532,...