text
stringlengths
25
2.19k
embedding
listlengths
768
768
def inputs ( self ) : if self. has _ prev : return self. prev. outputs else : return none
[ 0.19978317618370056, -0.10890346765518188, 0.7750464081764221, 0.581716775894165, -0.24363864958286285, -0.8104102611541748, 1.0820066928863525, -0.850966215133667, 0.2832348346710205, -0.4174618124961853, 0.3983694314956665, -0.008584506809711456, -1.1140834093093872, 0.5579750537872314, ...
def _ stop _ button _ fired ( self ) : self. stop ( )
[ 0.33927783370018005, -1.0099434852600098, 0.01524256356060505, -0.49361422657966614, 0.788993239402771, 0.39227819442749023, 0.5704969763755798, 0.858831524848938, -0.7536904811859131, 0.22604918479919434, -0.8847010135650635, -0.3036593794822693, 0.5368419885635376, -0.17904707789421082, ...
def virtual _ interface _ get _ by _ instance _ and _ network ( context, instance _ id, network _ id ) : return impl. virtual _ interface _ get _ by _ instance _ and _ network ( context, instance _ id, network _ id )
[ 0.5971217751502991, -0.6433977484703064, 0.35788989067077637, 0.42469650506973267, 0.6332961916923523, -0.13758377730846405, -0.3468279242515564, -0.7913459539413452, 0.14569225907325745, 0.5279785990715027, 0.8927045464515686, 0.6422945857048035, -0.818784236907959, -0.6303412914276123, ...
def get _ archive ( self ) : result = requests. get ( " { } / archive / ". format ( self. root _ url ), headers = {'content - type':'application / json'} ) self. assertequal ( result. status _ code, 200 ) return result. json ( )
[ -0.0007630032487213612, -0.6502962708473206, 0.5914032459259033, 0.6834656596183777, 0.4549679756164551, -0.5133969187736511, -0.9897304177284241, -0.09436523914337158, -0.6308398842811584, -0.6359550356864929, -0.0032860813662409782, 1.2590734958648682, 0.05225895345211029, 0.052808109670...
def convert _ single _ example ( ex _ index, example, max _ seq _ length, tokenizer ) : if isinstance ( example, paddinginputexample ) : return inputfeatures ( input _ ids = [ 0 ] * max _ seq _ length, input _ mask = [ 0 ] * max _ seq _ length, segment _ ids = [ 0 ] * max _ seq _ length, label _ id = 0, is _ real _ exa...
[ -0.4376172125339508, -0.04980171471834183, 0.6327875256538391, 0.5218401551246643, -0.2175932377576828, -0.20266149938106537, 0.33404025435447693, 0.7694506049156189, 0.5170989632606506, 0.44964441657066345, -0.8137854337692261, 0.3827553689479828, 0.024535009637475014, 0.3575810492038727,...
def metricindexbytype ( self, * args ) : return [ idx for idx, x in enumerate ( self. metrics ) \ if x [ 2 ] in args ]
[ -0.5562769174575806, -0.05330788716673851, 0.3385762870311737, 0.5854025483131409, 0.5812540054321289, 0.7271802425384521, 0.7176221609115601, -0.7670236825942993, -1.1029216051101685, 0.4571085274219513, 0.6654278039932251, 0.621146023273468, -0.869314432144165, -0.32180893421173096, -1...
def compression _ stage _ 1 ( wave : np. ndarray, block : int, export _ name : str, show _ polts : bool = false ) - > np. ndarray : n _ points = 100000 n _ bins = 1000 norm _ wave = normalize ( wave ) if show _ polts : fig, axs = plt. subplots ( 1, 2, sharey = true, tight _ layout = true ) fig. suptitle ( " normalizati...
[ 0.5995941162109375, 0.5768526792526245, 0.8763911724090576, 0.19477811455726624, -1.544366717338562, -0.1094721332192421, 1.3654885292053223, -0.17195099592208862, 0.6985037922859192, 0.8803562521934509, 0.03172643110156059, 0.4286231994628906, -0.3434274196624756, 0.7579241991043091, 1....
def read ( self, addr, size ) : assert addr > = self. _ offset addr - = self. _ offset assert ( addr + size ) < = self. size ( ) return int ( " ". join ( self. _ data [ addr : addr + size ] ). encode ('hex'), 16 )
[ 0.7537824511528015, 0.0905030146241188, 0.6366009712219238, -1.25686514377594, -1.3882355690002441, -0.033358342945575714, -0.5265133380889893, -0.12007302045822144, 0.34633368253707886, -0.4901052713394165, 0.2979000210762024, 0.8036171793937683, -0.1491214781999588, -1.0246764421463013, ...
def get _ achievements ( self, * ids ) : return self. _ request ( " achievements ", ids = ', '. join ( str ( id ) for id in ids ) )
[ -1.099388837814331, 0.6161442399024963, 0.1884506791830063, 1.195776104927063, 0.8481190800666809, -0.5453552603721619, -0.8094244599342346, -0.33166635036468506, -0.05933835729956627, 0.02088996209204197, -0.5860238075256348, 0.30437397956848145, -0.07243847846984863, 0.5958032011985779, ...
def get _ audio _ analysis ( sp, track ) : return sp. audio _ analysis ( track )
[ -0.35731905698776245, -0.13267061114311218, 0.16689635813236237, 0.6699250340461731, -0.3075636029243469, -0.8035359978675842, -0.1344413459300995, -1.1818820238113403, -0.04442460089921951, 0.33702877163887024, 0.3549732565879822, 0.4610576033592224, 0.36055439710617065, -0.52885067462921...
def _ _ init _ _ ( self, language : str, custom _ pipeline : pipeline = none, suppress _ banner : bool = false, ) - > none : self. language = get _ lang ( language ) # type : language self. pipeline = custom _ pipeline if custom _ pipeline else self. _ get _ pipeline ( ) if not suppress _ banner : self. _ print _ pipel...
[ 0.4139651358127594, -0.07428736984729767, 0.34363412857055664, -0.0493609793484211, -0.6595760583877563, -0.4572303295135498, -0.11761276423931122, -0.05385639891028404, -0.30148831009864807, -0.28912582993507385, -0.7189231514930725, 0.3542395830154419, 0.740117609500885, 0.28448677062988...
def _ findtops ( self ) : return [ node for node in self. g. nodes ( ) if len ( self. g. predecessors ( node ) ) = = 0 ]
[ -0.8455125689506531, 0.6079424023628235, 0.5975651144981384, -0.22049374878406525, -0.17311953008174896, 0.2768847644329071, 0.0938582792878151, -0.21505942940711975, -0.6246140003204346, 0.790644645690918, 0.08143384009599686, -0.1670331507921219, 0.006733785383403301, 0.7651302218437195,...
async def forward _ messages ( self :'telegramclient ', entity :'hints. entitylike ', messages :'typing. union [ hints. messageidlike, typing. sequence [ hints. messageidlike ] ] ', from _ peer :'hints. entitylike'= none, *, background : bool = none, with _ my _ score : bool = none, silent : bool = none, as _ album : b...
[ -1.0694156885147095, 0.1587877720594406, 0.9536241888999939, 0.4554881453514099, 0.340322881937027, -0.12060882151126862, 0.4001358449459076, -0.7704560160636902, -0.8153788447380066, 0.31974920630455017, 0.3838232755661011, -0.03833923488855362, -0.1164684072136879, 0.5248358249664307, ...
def test _ both ( self ) : with settings ( use _ ssh _ config = true, ssh _ config _ path = support ( " ssh _ config " ) ) : with settings ( key _ filename = " bizbaz. pub " ) : eq _ ( key _ filenames ( ), [ " bizbaz. pub ", " foobar. pub " ] ) with settings ( key _ filename = [ " bizbaz. pub ", " whatever. pub " ] ) :...
[ 0.10890316963195801, -0.35808634757995605, 0.5369266867637634, 0.7129291296005249, 0.9683062434196472, 0.8826574683189392, -0.5148404836654663, 0.6589928865432739, -0.7851835489273071, 0.4330321252346039, -0.7113515138626099, 0.22895793616771698, -0.0626988485455513, 0.7031682133674622, ...
def _ positions ( self, x, y ) : def sort _ key ( enumerated _ pair ) : " " " generates the keys for the sort function. " " " # todo : parse the direction specification with a regex and provide # a proper grammar. also include the other sorting algoriths ( like # random and diagonal ) _, pair = enumerated _ pair indice...
[ -0.9145554304122925, -0.10498369485139847, 0.6732563376426697, -0.5211622714996338, 0.37954622507095337, -0.966511070728302, 0.16689713299274445, -0.5082153677940369, -0.4584707021713257, 0.8647645711898804, 0.25328749418258667, 0.337181031703949, 0.5287913084030151, -0.2002965807914734, ...
def eat _ pickles ( filename ) : with open ( filename,'r') as f : return pickle. load ( f )
[ 0.4774242043495178, -0.4770258069038391, 0.4604034423828125, -0.9400218725204468, 0.05694194510579109, 0.2657146453857422, -0.30906301736831665, 0.38508743047714233, -0.7217400670051575, 0.5990766882896423, 0.5701577067375183, -0.5052344799041748, 0.284542053937912, -1.3516212701797485, ...
def _ _ call _ _ ( self, t, x, parameter _ dict ) : parameters _ values = [ parameter _ dict [ str ( p ) ] for p in self. parameters ] x _ list = list ( x ) input = x _ list + parameters _ values dxdt = np. array ( [ f ( * [ np. array ( [ i ], dtype = np. float ) for i in input ] ) [ 0 ] for f in self. function ] ). t ...
[ -0.27728524804115295, 0.6467302441596985, 0.6339856386184692, -0.43853670358657837, 0.5862951874732971, 0.21101191639900208, -1.4619954824447632, 0.270859956741333, -0.8066779375076294, 0.28418198227882385, 0.2099367380142212, 0.12358599901199341, 0.1614914983510971, 0.1284889280796051, ...
def _ update _ git ( self, force ) : self. ensure _ one ( ) repo = self _ logger. debug ('repo % s updating branches ', repo. name ) if not os. path. isdir ( os. path. join ( repo. path ) ) : os. makedirs ( repo. path ) self. _ clone ( ) # check for mode = = hook fname _ fetch _ head = os. path. join ( repo. path,'fetc...
[ -0.36452245712280273, -0.056549444794654846, 0.7371445298194885, -0.43156883120536804, -0.3368031978607178, 0.869990348815918, -0.06073480471968651, -1.1464240550994873, -0.15899792313575745, 0.552993655204773, 0.5686629414558411, -0.1779565066099167, 0.17503750324249268, -0.09371690452098...
def testatomtypeswapconf ( self ) : ( q, n ) = conftest. atomtypeswapconf ( ) self. assertequal ( q, false )
[ -1.0719459056854248, 0.20766249299049377, 0.11225201189517975, -1.0223206281661987, 0.28520679473876953, 1.1179839372634888, -0.027789562940597534, 0.5043152570724487, -0.404348224401474, -0.43855342268943787, -0.8672292828559875, 0.17334140837192535, -0.24417328834533691, -0.2939694225788...
def set _ parameters ( self, * * kwargs ) : pass
[ -0.6769346594810486, -0.24088208377361298, 0.20624889433383942, 0.6368440985679626, 0.6187440156936646, 0.3906312882900238, -0.48919206857681274, 0.0032108663581311703, -0.4582462012767792, 0.6843046545982361, -0.7078940868377686, 0.7847496271133423, -0.7210789322853088, 0.9401999115943909...
def _ _ init _ _ ( self, game, list, color, id ) : super ( ). _ _ init _ _ ( ) self. settings = game. settings # connection to the instance of settings through the game class. self. screen = game. screen # connection to the screen through the game class. self. vect _ list = list # receives a list. # calculate how many ...
[ -0.7923250198364258, 0.02000684104859829, 0.8644759654998779, 0.2196526825428009, 0.5180912017822266, 0.32736581563949585, -0.01910690777003765, -0.452075332403183, 0.8386451601982117, 0.4234428107738495, -1.0465506315231323, -0.5147678256034851, 0.6441848278045654, 0.5453901886940002, 0...
def stop ( self ) - > none : if self. _ start _ time is none : raise timererror ( f " timer is not running. use. start ( ) to start it " ) self. _ elapsed _ time = time. perf _ counter ( ) - self. _ start _ time self. _ start _ time = none
[ 0.12972593307495117, -0.20185071229934692, 0.1977657675743103, -0.4520372450351715, 0.9462102651596069, 0.7915224432945251, 0.3979637622833252, 1.1134015321731567, -1.017683982849121, -0.037961430847644806, -0.393878698348999, 0.7447696924209595, -0.3463355004787445, 1.26638925075531, 0....
async def fetch _ open _ orders ( self, symbol : optional [ str ] = none, since : optional [ int ] = none, limit : optional [ int ] = none, params = { } ) : if symbol is none : raise argumentsrequired ( self. id +'fetchmytrades ( ) requires a symbol argument') await self. load _ markets ( ) market = self. market ( symb...
[ -1.2369319200515747, 0.8744005560874939, 0.7035168409347534, 0.03464868292212486, -0.473095178604126, -0.6847545504570007, -0.2729170024394989, -0.4169172942638397, 0.26599159836769104, -0.19762738049030304, -0.22825148701667786, 0.828437328338623, -0.8262436389923096, -0.1480238139629364,...
def get _ nested _ expression _ with _ strings ( self ) : node _ name = self. predicate if self. string _ arg is not none : # get _ question _ number ( 25 ) node _ name = node _ name + " ( " + self. string _ arg + " ) " if self. is _ leaf ( ) : return node _ name else : nested _ expression = [ node _ name ] for child i...
[ 0.13608314096927643, -0.6172952651977539, 0.7141770124435425, 0.3073638081550598, -0.1789301186800003, 0.04830796644091606, 0.15821316838264465, 0.5504473447799683, -0.22856909036636353, -0.11115209758281708, 0.301359623670578, 1.1231882572174072, -0.39566582441329956, 0.8778945803642273, ...
def make _ patch ( vertexlist, wcs = none ) : if wcs is not none : skypatchlist = [ wcs. pixeltosky ( pos ). getposition ( afw _ geom. degrees ) for pos in vertexlist ] else : skypatchlist = vertexlist verts = [ ( coord [ 0 ], coord [ 1 ] ) for coord in skypatchlist ] verts. append ( ( 0, 0 ) ) codes = [ path. moveto, ...
[ -0.11140871047973633, -0.15670078992843628, 0.40362948179244995, 0.22608327865600586, -0.7700513601303101, 0.701873242855072, 0.28018465638160706, -0.05655544251203537, 1.458429217338562, 0.40461549162864685, -0.3331066071987152, -0.09287533164024353, 0.22994357347488403, 0.159646034240722...
def assertresponse ( self, respdata, count = 1, errcode = testlib. resttestcase. success ) : expected = {'errcode': errcode } if count is not none : expected ['count'] = count self. assertdictequal ( expected, respdata )
[ 0.12499840557575226, -0.8501255512237549, 0.46432915329933167, -0.09019095450639725, 0.3824281394481659, 0.19905610382556915, -0.025899797677993774, 0.42435145378112793, 0.8821313977241516, -0.5654992461204529, -0.3342621326446533, -0.6730895638465881, -0.9214407801628113, -0.1239794343709...
def instance _ fault _ get _ by _ instance _ uuids ( context, instance _ uuids ) : return impl. instance _ fault _ get _ by _ instance _ uuids ( context, instance _ uuids )
[ -0.9916493892669678, -0.14695380628108978, 0.05238990858197212, 0.4257327616214752, -0.10324680060148239, -0.41556137800216675, -0.14204099774360657, -0.4736664593219757, -0.4694513976573944, 0.30457600951194763, 0.4421596825122833, 0.23594912886619568, -0.47753411531448364, -1.13827347755...
def remove ( self, path ) : assert isinstance ( path, unicode ), path if os. path. abspath ( os. path. join ( self. parent. home _ dir,'reboot') ) \! = path : os. remove ( path ) else : raise filesystemerror ('cannot remove the reboot file')
[ 0.1890389323234558, -0.14527499675750732, 0.6164235472679138, 1.1436370611190796, -0.5956687927246094, 0.24150900542736053, 0.48016518354415894, -0.21545708179473877, 0.5874667167663574, 0.007831658236682415, 0.22316962480545044, -0.6411593556404114, -1.0065149068832397, 0.5856667160987854...
def encode ( self, value ) : return super ( booleanfield, self ). encode ( ('0 ','1') [ value ] )
[ -1.1394566297531128, -0.29816970229148865, 0.20313604176044464, 0.04005652666091919, -0.3551102876663208, 0.9446374177932739, 0.27697697281837463, -0.362249493598938, 0.1531292200088501, 0.4232735335826874, -0.8977959752082825, -0.10501246899366379, -0.7795562744140625, 0.4135122299194336,...
def lookup ( k, ls ) : for i in ls : if i [ 0 ] = = k : return i [ 1 ] return none
[ -0.017770783975720406, -0.7322722673416138, 0.6537423729896545, 0.15843746066093445, -0.7421319484710693, -0.3472626209259033, -0.8537790775299072, 0.4230870008468628, -0.3303542733192444, 1.0106871128082275, -0.03106142207980156, -0.2986997961997986, -0.02763083390891552, -0.7546892166137...
def _ _ del _ _ ( self ) : if self. fp : try : self. fp. close ( ) except valueerror : # ok pass if self. name and self. _ unlink : try : self. _ unlink ( self. name ) except oserror : # don't even ignore pass
[ 1.0512499809265137, -0.9738417863845825, 0.7854259610176086, -0.802113950252533, -0.104951873421669, 0.25235801935195923, 0.6290755271911621, 0.0005631999811157584, 0.51231849193573, -0.9727329611778259, 1.1510957479476929, -0.3413926362991333, -0.3781168460845947, 0.1110510304570198, 0....
def _ _ init _ _ ( self, designation, name = none, diameter = float ('nan'), hazardous ='n') : self. designation = str ( designation ) self. name = str ( name ). title ( ) self. diameter = diameter self. hazardous = hazardous self. approaches = [ ]
[ 0.0581345371901989, 0.015438209287822247, 0.5981414914131165, -0.10528472065925598, 0.08683207631111145, 0.41281747817993164, -1.0597692728042603, 0.3482314944267273, 0.1070694550871849, -0.15453174710273743, -0.3829357326030731, 0.1543561965227127, 0.23081499338150024, 0.8495596051216125,...
def simulate _ kaons ( n, use _ scattering ) : z _ positions = stats. expon ( scale = avg _ decay _ length _ kaons ). rvs ( n ) # randomly generated decay lenghts decay _ positions = np. array ( [ np. zeros ( n ), np. zeros ( n ), z _ positions ] ). t # the position vectors of the decay location without random rotation...
[ -0.1318001002073288, 0.7826325297355652, 0.9102550745010376, 0.19182248413562775, -0.03189152106642723, 0.04704504460096359, 0.5302854180335999, -0.08343058824539185, 1.2912400960922241, 0.33394330739974976, -0.6949719190597534, -0.8062005639076233, -0.029397565871477127, 0.034862261265516...
def google _ matrix ( graph, alpha = 0. 85, personalization = none, nodelist = none, weight ='weight ', dangling = none ) : import numpy as np if nodelist is none : nodelist = list ( graph ) m = nx. to _ numpy _ matrix ( graph, nodelist = nodelist, weight = weight ) n = len ( graph ) if n = = 0 : return m # personaliza...
[ -1.044697880744934, 0.5917027592658997, 0.6768888235092163, -0.14145080745220184, -0.4371989071369171, -0.13914866745471954, 0.5328807234764099, 0.6082484126091003, 0.7279801964759827, 0.32500898838043213, 0.721518337726593, 0.335965633392334, -0.580992579460144, 0.6516105532646179, 0.37...
def compute _ similarity _ for _ cluster ( cluster _ a, cluster _ b, similarity _ dic, similarity = 1 ) : # if has record in dictory, then use dictory if similarity _ dic. get ( ( cluster _ a. id, cluster _ b. id ) ) is not none : return min ( similarity _ dic. get ( ( cluster _ a. id, cluster _ b. id ) ), similarity )...
[ 0.08967981487512589, -0.01894650049507618, 0.7748572826385498, 0.02352626994252205, 0.033143188804388046, -0.4939103126525879, 0.6192923784255981, 0.48427391052246094, -0.3528743088245392, 0.47279635071754456, -0.06315067410469055, -0.020245026797056198, -0.3252069354057312, 0.397122055292...
def writeconfiguration ( self ) : config _ text = " " for key in self. config _ options : value = self. config _ options [ key ] if key = = " inputfile " : config _ text + = " inputfile { 0 } \ n ". format ( self. filename ) elif key = = " sumweightsfiles " : config _ text + = " sumweightsfiles { 0 } \ n ". format ( se...
[ -0.7876769304275513, -0.857715368270874, 0.6428036689758301, 0.18427978456020355, 0.876933753490448, 0.5174449682235718, 0.5618512630462646, 1.094400405883789, -1.015631914138794, 0.431131511926651, -0.3582311272621155, -0.9862675666809082, -0.5599099397659302, 0.9184010028839111, 0.1982...
def remove _ missing _ data ( data, threshold = 0. 25 ) : # cols with too much missing data cols = missing _ data _ columns ( data, threshold = threshold ) # drop the columns result = data. drop ( cols, axis = 1 ) return result
[ 0.24140019714832306, 0.09946674853563309, 0.31242501735687256, 0.02536080591380596, -0.9929250478744507, 0.44846388697624207, -0.26021167635917664, 0.14327672123908997, -0.18712842464447021, 0.043945565819740295, -0.699327826499939, 0.12525610625743866, 0.40272101759910583, -0.866497576236...
def _ attributes _ i _ exists ( self, key, flow ) : # make sure interface is ready to use d = self. _ attributes _ t _ init ( ) # check if we know about that attribute if key in d ['attributes'] : if'exists'in d ['attributes'] [ key ] : if d ['attributes'] [ key ] ['exists'] : return true return false
[ -1.3627707958221436, -0.23564490675926208, 0.4761636257171631, -0.6905503869056702, 0.15662382543087006, 0.3350032866001129, -0.09035564959049225, 0.3629247546195984, -0.3803902566432953, 0.7899963855743408, 0.06293660402297974, -0.3712215721607208, -0.11499392241239548, 0.2797247171401977...
def max _ word _ count ( sentence, max _ count ) : indexes = [ i for i, char in enumerate ( sentence ) if char = = " " ] if len ( indexes ) > = max _ count : return sentence [ : indexes [ max _ count - 1 ] ] return sentence
[ 1.3027215003967285, 0.2122950553894043, 0.4353673458099365, 0.4040047228336334, -0.44138577580451965, -0.7258877158164978, -1.0354347229003906, 0.7471605539321899, -0.33943042159080505, 1.506292462348938, 0.7248398065567017, 0.36152219772338867, -0.5909926295280457, -0.30096080899238586, ...
def test _ mancala ( ) : my _ game = solitairemancala ( ) print " testing init - computed : ", my _ game, " expected : [ 0 ] " config1 = [ 6, 4, 2, 3, 1, 0, 0 ] my _ game. set _ board ( config1 ) print " testing set _ board - computed : ", str ( my _ game ), " expected : ", str ( [ 0, 5, 3, 1, 1, 0, 0 ] ) print " testi...
[ 0.12811218202114105, 0.2989037334918976, 1.198531150817871, 0.4584307372570038, 0.19052575528621674, 0.10720204561948776, 0.6204447150230408, 1.0871862173080444, 0.22630034387111664, -0.21912240982055664, -0.5006635785102844, -0.2282695323228836, -0.09208109229803085, 0.040668513625860214,...
def _ gerss ( self ) : if self. verbose : print ('uqpy : performing ge - rss with rectangular stratification...') # initialize the vector of gradients at each training point dy _ dx = np. zeros ( ( self. nsamples, np. size ( self. training _ points [ 1 ] ) ) ) # primary loop for adding samples and performing refinement...
[ -0.43829545378685, 0.8766564130783081, 1.028584599494934, -0.5998663306236267, 0.3216918110847473, 0.01618274673819542, -0.3386949300765991, -0.38614389300346375, -0.8768953084945679, 0.18392059206962585, 0.5754656791687012, 0.4377225637435913, -0.4358602464199066, -0.02883175201714039, ...
def classify ( self, cloud, ground _ int = 2 ) : if cloud. extension = = ". las " : grid = cloud. grid ( self. cell _ size ) filtered _ point _ ids = self. _ filter ( grid ). index grid. cloud. data. points [ " classification " ] [ filtered _ point _ ids ] = ground _ int else : print ( " this is only implemented for. l...
[ -0.38646548986434937, 0.8400595188140869, 0.512635350227356, -0.10925412178039551, 0.5977891683578491, 0.9340900182723999, -0.19257217645645142, 0.7667949795722961, -0.7980606555938721, 0.516314685344696, 0.02682754583656788, 1.4386693239212036, 0.6803764700889587, 0.7887067198753357, 0....
def extract _ tar ( file _ name, file _ type, node _ details, conf _ data, instance = none ) : try : cmds _ to _ return = [ ] file _ name = file _ name. split ('/') [ - 1 ] if file _ type = ='installer': for node in node _ details : dest = node. split (':') [ 1 ] host, path = node. split (':') if host. split ('@') [ 1 ...
[ 0.3676362931728363, -0.4617989957332611, 0.8622733354568481, 0.0011050888570025563, 0.39095255732536316, -0.2828647196292877, -0.07431440055370331, 0.5409464240074158, -1.304917335510254, 1.1571576595306396, 0.8315924406051636, 0.02141646482050419, -0.11537017673254013, 0.5934920907020569,...
def get _ buffer ( config, game ) - > ( chessenv, list ) : env = chessenv ( ). reset ( ) white = chessplayer ( config, dummy = true ) black = chessplayer ( config, dummy = true ) result = game. headers [ " result " ] # rare cases where elo ratings are not in the headers if " whiteelo " not in game. headers or " blackel...
[ -0.6429983377456665, 0.3257354497909546, 0.9031795859336853, -0.058724015951156616, 1.0889825820922852, 0.15912792086601257, 0.13304395973682404, -0.5520279407501221, -0.1191551610827446, 0.887906551361084, -0.7768033146858215, 0.8553709983825684, 0.43271082639694214, 0.8067734241485596, ...
def test _ validate _ year _ good ( self ) : year = 2019 validated = helpers. validate _ year ( year ) self. assertequal ( validated, 2019 ) year = 1995 validated = helpers. validate _ year ( year ) self. assertequal ( validated, 1995 )
[ 0.5989242196083069, -0.7850425243377686, 0.3985097408294678, 0.3826368451118469, 0.08952303975820541, 1.604466438293457, -0.08251926302909851, 0.07523126155138016, 0.19264055788516998, -0.6130725145339966, -0.5659275054931641, -0.07427433133125305, 0.38723450899124146, 0.4575444161891937, ...
def test _ utc _ to _ tai ( self ) : # as of 31 dec 2016 tai is 37 seconds ahead of utc self. compare _ times ( datetime ( 2017, 1, 1, 12, tzinfo = utc ), 37 ) # before this the difference is only 36 seconds self. compare _ times ( datetime ( 2016, 12, 31, 12, tzinfo = utc ), 36 ) # at millenium difference should be 32...
[ -0.0014857767382636666, 0.10285579413175583, 0.49367690086364746, -0.2621847987174988, -0.4129534661769867, 0.8857240676879883, 0.5965635180473328, -0.7122253775596619, 0.3118548095226288, 0.06197410076856613, 0.10592368245124817, -0.3390980362892151, 0.5056541562080383, -0.086725160479545...
def as _ wkt ( self, ewkt = true ) : if self. srid and ewkt : return'srid = % d ; % s'% ( self. srid, self. _ shape. wkt ) else : return self. _ shape. wkt
[ 0.29537075757980347, -0.39175063371658325, 0.5032704472541809, -1.79083251953125, -0.5813302993774414, 0.22464507818222046, -0.12423387914896011, 0.18557775020599365, 0.6189552545547485, 0.38371509313583374, 0.7998456954956055, 0.747140109539032, 0.9020761251449585, 0.8158437609672546, -...
def attention _ net ( self, outputs, final _ state ) : # print ('fianl _ state : ', final _ state. shape ) # [ batch _ size, hidden _ size, 1 ] hidden = final _ state. unsqueeze ( 2 ) # print ('hidden : ', hidden. shape ) # [ batch _ size, max _ len, 1 ] attn _ weights = torch. bmm ( outputs, hidden ) # [ batch _ size,...
[ 0.3572778105735779, -1.3378028869628906, 0.6442790627479553, -0.11058896780014038, -0.4946012496948242, -0.6377391219139099, 1.0024348497390747, 0.2605937719345093, -0.4470706284046173, -0.2296389937400818, 0.19270068407058716, 0.19178853929042816, 1.0553921461105347, 0.4055594503879547, ...
def search _ for _ text _ in _ material _ files ( material _ type, file _ paths, text, case _ sensitive = false ) : files _ with _ text = [ ] for file _ path in file _ paths : raw _ material = material _ type. load ( file _ path ) if has _ text ( raw _ material, text, case _ sensitive ) : files _ with _ text. append ( ...
[ 0.4899307191371918, -1.1784483194351196, 0.38748469948768616, 0.9132993817329407, -0.36176884174346924, -0.28548890352249146, -0.8418577313423157, 0.3750852644443512, -0.9691421389579773, 0.6781560778617859, 0.7319144606590271, -0.39608943462371826, -0.4755725860595703, 0.5419801473617554,...
def mean _ accuracy _ per _ setting ( results ) : accuracy _ result = { } for every _ result in results : for k in every _ result : if k = ='features': function _ names = [ ] for j in every _ result [ k ] : function = str ( j ). split ( ) [ 1 ] function _ names. append ( function ) functions = k + " = " + " ". join ( f...
[ -0.4758634865283966, -0.08912347257137299, 0.7673191428184509, -0.4035659432411194, -0.31311947107315063, -0.6053761839866638, 0.321503609418869, -0.4177641272544861, -0.19370485842227936, 0.7456356287002563, 0.09896331280469894, 0.7711725234985352, 0.17855125665664673, 0.870772123336792, ...
def _ _ init _ _ ( self ) : self. _ places = { }
[ -0.13405844569206238, -0.16850507259368896, 0.3881397247314453, -0.7988946437835693, -0.2226453423500061, 0.23530694842338562, 0.5513428449630737, 0.7947560548782349, 0.10641319304704666, -0.6263723373413086, -0.7682270407676697, -0.2678065299987793, 0.03643821179866791, 1.0585793256759644...
def get _ character _ inventory ( self, name, token = none ) : name = requests. utils. quote ( name ) location = " characters / { } / inventory ". format ( name ) return self. _ request ( location, access _ token = token ) if token else self. _ request ( location )
[ -1.3436414003372192, -0.3973446488380432, 0.5082502365112305, -0.1849752962589264, 0.17796744406223297, -0.8912383913993835, -0.7216755151748657, -0.8311809301376343, -0.17219047248363495, 0.2024177610874176, -0.8941501379013062, 1.1972986459732056, -0.5977573990821838, -1.3395018577575684...
def _ attributes _ set _ setter ( self, key, setter, flow = _ down ) : # make sure interface is ready to use us _ key = self. _ attributes _ t _ underscore ( key ) d = self. _ attributes _ t _ init ( us _ key ) # register the attribute and properties d ['attributes'] [ us _ key ] ['setter'] = setter
[ -1.1814030408859253, -0.02206212840974331, 0.2751024663448334, -0.9084749817848206, -0.9537354111671448, -0.1199105903506279, -0.29936376214027405, 0.530252993106842, -0.17905685305595398, 0.8640807271003723, -0.3966555595397949, 0.055916476994752884, 0.5657959580421448, 0.770119845867157,...
def write _ logs ( self ) : # preserve existing content in these logs self. save _ list ( self. log _ path +'simple. txt ', self. results _ simple,'a') self. save _ list ( self. log _ path +'detailed. txt ', self. results _ detailed,'a') # overwrite this log self. save _ list ( self. info _ hashes _ filename, self. inf...
[ -0.19992507994174957, -0.8532649278640747, 0.4000532627105713, 0.33605921268463135, 1.4611456394195557, 0.6500287652015686, 0.25593101978302, 0.43812084197998047, -0.6402008533477783, -0.3982146382331848, -0.6042277216911316, -0.8838558197021484, -0.05671684071421623, 0.3207613229751587, ...
def prepare _ lko _ data ( dataset : union [ graphobject, list [ graphobject ], list [ list [ graphobject ] ] ], problem _ based : str, number _ of _ batches : int = 10, useva : bool = false, seed : optional [ float ] = none, normalize _ method : str ='gtr ', aggregation _ mode : str ='average') \ - > tuple [ union [ l...
[ 0.47651106119155884, 0.3031634986400604, 0.7063837051391602, 0.6307716965675354, 0.08086439222097397, -0.025467274710536003, 0.9893344044685364, -0.3314850330352783, 0.08344997465610504, 0.33579179644584656, 0.14338916540145874, 0.16708998382091522, 0.6847280263900757, -0.48433637619018555...
def getsampleimage ( image, samplesize, topleftcorner ) : # # # write your function here sample = image [ topleftcorner [ 0 ] : topleftcorner [ 0 ] + samplesize [ 0 ], topleftcorner [ 1 ] : topleftcorner [ 1 ] + samplesize [ 1 ] ] return sample
[ 0.0631561428308487, -0.7042713165283203, 0.4623534679412842, -0.3104659914970398, -0.9707508087158203, -0.4158782362937927, 0.25877413153648376, -1.013203740119934, 0.6388370990753174, 0.4404810667037964, 0.47130629420280457, 0.37095892429351807, -0.24842239916324615, -0.08303084224462509,...
def test _ make _ output ( protprot _ caprimodule ) : protprot _ caprimodule. model. clt _ id = 1 protprot _ caprimodule. model. clt _ rank = 1 protprot _ caprimodule. model. clt _ model _ rank = 10 protprot _ caprimodule. make _ output ( ) ss _ fname = path ( protprot _ caprimodule. path, f " capri _ ss _ { protprot _...
[ -0.08952269703149796, -0.6194764375686646, 0.47080904245376587, -0.1061975434422493, 0.1719321459531784, 0.6529359817504883, 0.7890686392784119, 0.22175584733486176, -0.7296626567840576, -0.5529579520225525, -0.3896512985229492, 0.18010275065898895, 0.7694498300552368, -0.6362166404724121,...
def plot _ vs _ wavelength ( self ) : self. vs _ frequency = false return
[ 1.1829469203948975, -0.006164958234876394, 0.2004823386669159, -0.27986910939216614, -0.21795709431171417, 0.5480377078056335, 0.6940194368362427, -0.1032310426235199, 0.42635205388069153, -0.23612213134765625, 0.42456918954849243, 1.921521544456482, -0.3661670386791229, 1.05192232131958, ...
def getlasttouch ( ) : updatescreen ( last _ touch _ point _ frame ) print " checking " print list ( last _ touch _ point _ frame ) response = ser. readline ( ) while ( response = = none or len ( response ) = = 0 ) : response = ( ser. readline ( ) ) print list ( response ) if ( ord ( list ( response ) [ - 1 ] ) = = 10 ...
[ 0.042335476726293564, -0.5871178507804871, 1.0493580102920532, -0.5154204368591309, -0.02439919486641884, -0.13889633119106293, 0.40853139758110046, -1.087144136428833, 1.130173921585083, -0.6837766766548157, 0.4113820493221283, -0.36985841393470764, -1.2519148588180542, -0.355764359235763...
def chunks ( l : sequence, n : int ) - > list [ list ] : chunk = [ ] for item in l : while len ( chunk ) < n : chunk. append ( item ) yield chunk chunk = [ ] if len ( chunk ) > 0 : yield chunk
[ -0.2565222382545471, 0.04859483242034912, 0.5968079566955566, 0.0014578155241906643, 0.07788027822971344, 0.1182151511311531, -1.2722773551940918, -0.25165048241615295, 0.0069037796929478645, -0.25218769907951355, -0.7941997051239014, -0.6321486234664917, 0.3189697861671448, 1.123564362525...
def generate _ mapper ( d650, stw105 _ iso ) : # depths d650 _ max = np. int ( np. trunc ( np. max ( d650 ) ) + 20 ) d650 _ min = np. int ( np. trunc ( np. min ( d650 ) ) - 20 ) # * generate mapper for all. vs _ all = interpolate. interp1d ( stw105 _ iso [ :, 0 ], stw105 _ iso [ :, 1 ] ) vp _ all = interpolate. interp1...
[ -1.2515552043914795, 0.29010745882987976, 0.8564315438270569, -0.6902982592582703, -1.23505699634552, 0.3881049156188965, 0.4784659445285797, -0.09961700439453125, -0.14623376727104187, 0.19563539326190948, -0.7325694561004639, -0.06964346021413803, 0.10079721361398697, 0.5151758193969727,...
def tratar _ xml ( ) : try : doc = minidom. parse ( " tellico. xml " ) list = [ ] libros = doc. getelementsbytagname ( " entry " ) for libro in libros : # creamos el objeto libro donde almacenamos los datos l = libro ( ) # cogemos los elementos que nos interesan title = libro. getelementsbytagname ( " title " ) autores...
[ 0.4661644399166107, -0.6894271373748779, 0.7873934507369995, 0.1569489687681198, 0.12880061566829681, 0.5047327280044556, -1.3185665607452393, -0.1335935741662979, -0.33732232451438904, 0.16235610842704773, 0.08281859755516052, -0.4357440769672394, -0.5068871378898621, 0.31410321593284607,...
def test _ spectral _ coord _ m31 ( ) : obstime = time. time ('2018 - 12 - 13 9 : 00') obs = get _ greenwich _ earthlocation ( ). get _ gcrs ( obstime ) # always built - in, no download required # acen = skycoord. from _ name ('alpha cen') # coordinates are from here, but # hard - coded below so no download required m3...
[ 0.598350465297699, -0.10810308903455734, 0.7580969929695129, 0.0504671148955822, -0.205757275223732, 1.2939519882202148, -0.3933609127998352, 0.2952382564544678, 0.725581705570221, -0.46509480476379395, -0.31119632720947266, 0.7623623609542847, 0.003124141599982977, 0.2536831498146057, 0...
def _ dhmax ( self, elev _ array ) : return np. max ( elev _ array ) - np. min ( elev _ array )
[ 0.09650158137083054, 0.541262149810791, 0.5003721117973328, 0.7481235265731812, -0.03425274416804314, 0.8379520773887634, -0.7027927041053772, 0.41302168369293213, 0.20594941079616547, -0.22713692486286163, 0.6770394444465637, -0.09880627691745758, 0.3822655975818634, 0.23644733428955078, ...
def _ _ init _ _ ( self, base _ path : optional [ union [ str, path ] ] = none, in _ memory : bool = true, columns = { 0 : " text ", 3 : " sense " }, label _ name _ map : optional [ dict [ str, str ] ] = none, banned _ sentences : optional [ list [ str ] ] = none, sample _ missing _ splits : union [ bool, str ] = true,...
[ 0.0926276445388794, 0.23209726810455322, 0.873904824256897, 0.11247240751981735, -0.48338228464126587, -0.6007750034332275, 0.4488329589366913, 0.6293468475341797, 0.17759007215499878, -0.6185439229011536, 0.8186206221580505, -0.022568706423044205, 0.6082323789596558, -0.09963928163051605,...
def reflist _ tostring ( x ) : if isinstance ( x, str ) : return x if isinstance ( x, tuple ) : return x [ 0 ] +':'+ x [ 1 ] if isinstance ( x, list ) : return'\ n '. join ( [ _ [ 0 ] +':'+ _ [ 1 ] for _ in x ] ) else : return str ( x )
[ -0.910480797290802, -0.17188233137130737, 0.7612448334693909, -0.2894279658794403, -0.38815122842788696, 0.7530940175056458, -0.8522119522094727, -0.7884313464164734, 0.6713445782661438, 0.7741844654083252, -0.1479751318693161, 0.03124241530895233, -0.09287423640489578, 0.1583617925643921,...
def modhausdist ( self, t1idx, t2idx ) : t1 = self. trajectories [ t1idx ] t2 = self. trajectories [ t2idx ] distances = np. zeros ( len ( t1 ) ) t1pointsrelpos = [ t1. getprefixsum ( ) [ i ] / t1. length ( ) for i in range ( len ( t1 ) ) ] t2pointsrelpos = [ t2. getprefixsum ( ) [ i ] / t2. length ( ) for i in range (...
[ 0.5287063717842102, -0.42318040132522583, 0.88651043176651, -0.1490156501531601, -0.4313983619213104, 0.44768500328063965, -0.30740827322006226, -0.3356395363807678, -0.12926876544952393, 0.5493842363357544, 0.41160523891448975, 0.26574602723121643, -0.036524590104818344, 0.808823227882385...
def createaccount ( username, password ) : req = websupport. _ _ basicpacket _ _ ( method = " createaccount ", data = json. dumps ( { " username " : username, " password " : password } ) ) return websupport. s. post ( websupport. url, data = req )
[ -0.6348743438720703, -0.1427241861820221, 0.5860256552696228, 0.39336609840393066, -0.008905099704861641, 0.33767861127853394, 0.163271963596344, 0.10676339268684387, 0.36693015694618225, 0.1649874448776245, -1.246457815170288, 0.9203459024429321, -1.070982813835144, -0.09873992949724197, ...
def test _ _ _ anonymous ( self ) - > none : expected _ url = f'/ auth / login /? next = / questions / { self. question. pk } / answer /'self. assertredirects ( self. client. get ( self. path ), expected _ url ) self. assertredirects ( self. client. post ( self. path ), expected _ url )
[ -1.2286133766174316, -0.055049262940883636, 0.5179281830787659, 0.49622437357902527, -0.15665413439273834, 1.534381628036499, 0.4356585144996643, -0.5651840567588806, 0.6909146904945374, -1.0537430047988892, -0.41824692487716675, 0.19441063702106476, 0.5357569456100464, -0.1206081956624984...
def random ( self, length = 22 ) : random _ num = int ( binascii. b2a _ hex ( os. urandom ( length ) ), 16 ) return self. _ num _ to _ string ( random _ num, pad _ to _ length = length ) [ : length ]
[ -0.3353464901447296, 0.03236633911728859, 0.6039180755615234, -1.4254227876663208, -0.10415345430374146, 0.829562783241272, -0.3096487522125244, 0.0416002981364727, 0.9803177118301392, -0.6293010711669922, -0.6625354886054993, 0.29081493616104126, -0.44471728801727295, -0.9056257009506226,...
def check _ if _ represents _ int ( s ) : try : int ( s ) return true except valueerror : return false
[ -0.5650767087936401, 0.06338249891996384, 0.1568669229745865, 0.05146811157464981, 0.17565561830997467, -0.11201446503400803, -0.2891654372215271, -0.009287494234740734, 0.633914589881897, -0.26262593269348145, -0.3377740681171417, -0.05813287943601608, -0.7969088554382324, -0.501140952110...
def getkeywords ( self ) : return [ tex _ kw ]
[ 0.3212920129299164, -0.37223950028419495, 0.41857391595840454, 1.5330675840377808, 0.19140593707561493, 0.1393459588289261, -1.0479387044906616, 0.35375484824180603, 0.16752304136753082, 0.19357429444789886, -0.6434405446052551, 0.14308519661426544, -0.7585629224777222, 1.1164649724960327,...
def log _ all _ letters ( ) : for name in db : file _ name = name + '. txt'with open ( file _ name,'w') as outfile : outfile. write ( generate _ letter ( name ) )
[ -0.38936176896095276, -0.30452483892440796, 0.8363427519798279, 0.28838875889778137, 0.4344579875469208, 0.8969438076019287, -0.2648778557777405, 0.5178197026252747, -0.396330863237381, 0.481032133102417, -1.6782277822494507, -0.09717544168233871, 0.06239834055304527, 0.8777480721473694, ...
def has _ oam _ cli ( self ) : cmd = self. cli ( " show link - oam ", cached = true ) return " enabled " in cmd
[ 0.49224787950515747, -0.29285943508148193, 0.6001726984977722, 0.3915737271308899, 0.028836894780397415, 0.246560737490654, 0.0704331248998642, 0.24286195635795593, 0.9849501848220825, -0.575035035610199, 0.24697700142860413, 1.0321234464645386, -0.003089240286499262, 0.9830137491226196, ...
def test _ bug _ 1338 _ 2 ( self ) : self. pkgsend _ bulk ( self. rurl, ( self. bar11, self. baz10 ) ) api _ obj = self. image _ create ( self. rurl ) self. assertraises ( api _ errors. plancreationexception, self. _ _ do _ install, api _ obj, [ " baz @ 1. 0 ", " bar @ 1. 1 " ] )
[ -0.2265227884054184, 0.18941918015480042, 0.4210290312767029, 0.27146175503730774, 1.0091547966003418, 0.7175793051719666, 0.3456166386604309, -0.7563635110855103, 0.2745582163333893, 0.6205459237098694, -0.8286936283111572, -0.11751855164766312, -0.06585200875997543, 0.37093785405158997, ...
def default ( cur _ cmd = none ) : global _ session if cur _ cmd! = none : if not isinstance ( cur _ cmd, task ) : mylog. error ('not a valid task') return _ set _ current _ cmd ( cur _ cmd ) opts _ list = cur _ cmd. arg _ list else : if _ session. get _ current _ cmd ( ) = = none : mylog. error ('no task is set') retu...
[ -0.30941662192344666, -0.1825975775718689, 0.6306399703025818, 0.8621765971183777, 0.7410327792167664, -0.4786958396434784, 0.2512485682964325, 0.531562864780426, 0.35553476214408875, 0.24155041575431824, 0.03347172960639, 0.6633398532867432, -0.5931285619735718, 1.3310679197311401, -0.5...
def subfoldering ( data _ path ) : for gender in [ " female ", " male " ] : folder _ path = os. path. join ( data _ path, gender ) with os. scandir ( os. path. join ( data _ path, gender ) ) as files : for i, file in enumerate ( files ) : if i % 100 = = 0 : new _ dir = os. path. join ( folder _ path, " images _ { } ". ...
[ -1.1539568901062012, 0.6561055183410645, 1.0886000394821167, -0.1067071333527565, -0.41907232999801636, 0.35562705993652344, 1.3590868711471558, -0.4371334910392761, -0.23121875524520874, -0.10138936340808868, -0.8597729206085205, 0.31228622794151306, 0.5374696254730225, 0.5653858780860901...
def setup _ restore ( self, transformer, computation, filename ) : def match _ ops ( tensors, values ) : " " " match weights with tensor values loaded from file " " " nodes = dict ( ) frontier = set ( values ) visited = set ( ) def match _ op ( op _ to _ add ) : " " " match a weight with loaded tensor value " " " tenso...
[ 0.11505638062953949, -0.08517428487539291, 0.679043173789978, -0.13485762476921082, -0.1833183467388153, -0.39816033840179443, 0.514435887336731, 0.16571906208992004, -0.5206755995750427, 0.7075325846672058, -0.07806752622127533, -0.9851067066192627, -0.09592747688293457, 0.357560962438583...
def from _ string ( cls, string, with _ file = none, original _ string = none ) : lines = strings. get _ stripped _ lines ( string ) sentence = lines. pop ( 0 ) line = none if with _ file and original _ string : for pline, line in enumerate ( original _ string. splitlines ( ) ) : if sentence in line : line = pline + 1 ...
[ 1.7043827772140503, -1.4058823585510254, 0.49032509326934814, 0.3079562783241272, -1.4451388120651245, -0.5689111948013306, 0.07387096434831619, 1.0291258096694946, -0.05507918447256088, 0.021039867773652077, 0.23454175889492035, -0.11990859359502792, -0.20203503966331482, -0.9134798645973...
def download _ file ( year _ months ) : end _ name = " ireland _ segments. csv " if end _ name not in os. listdir ( tmp _ dir ) : # transform'yyyy - mm'to'yyyy " m " mm'year _ months _ ire = [ ym. replace ('- ','m') for ym in year _ months ] # set chrome options and reach the website options = webdriver. chromeoptions ...
[ 0.19308897852897644, 0.4450337290763855, 0.927189826965332, -0.026364849880337715, 0.5778698921203613, 0.4166299104690552, 0.1942109763622284, 0.3092173635959625, -0.26408809423446655, 0.4236551523208618, 0.5289044380187988, -0.5980986952781677, -0.4691798985004425, 0.571133017539978, 0....
def tokenizer ( self, currentfile, filename ) : lines = [ line. rstrip ('\ n') for line in currentfile ] self. ngrams [ filename ] = { } lasttokens = [ ] for line in lines : tokens = whitespacetokenizer ( ). tokenize ( line ) lasttokens = [ ] for token in tokens : token = token. split ( " _ " ) token = token [ 0 ]. low...
[ -0.4118518531322479, -0.6407973170280457, 0.5226781964302063, -0.7448063492774963, -0.6990577578544617, -0.63361656665802, 0.02139374613761902, 0.7312523126602173, -1.386904001235962, 0.2916061580181122, -0.229904443025589, -0.14134468138217926, -0.49329549074172974, 1.567236304283142, 0...
def v _ rsj _ asym ( i, ic _ pos, ic _ neg, rn, io, vo ) : if ic _ pos < 0 or ic _ neg > 0 or rn < 0 : # or abs ( ic _ neg / ic _ pos ) > 1. 2 or abs ( ic _ pos / ic _ neg ) > 1. 2 : # set boundaries for fitting # pass v = 1e10 else : v = np. zeros ( len ( i ) ) n = i > io + ic _ pos ; v [ n ] = rn * np. sqrt ( ( i [ n...
[ -0.0919376090168953, -0.26086097955703735, 0.5143803954124451, -0.37124037742614746, -0.16321632266044617, -0.4983975887298584, 0.28195884823799133, -0.17051948606967926, 0.16393133997917175, 0.7633762359619141, 0.23834839463233948, 0.054226141422986984, -0.12134657800197601, -0.3689237833...
def two _ sample _ core ( potential _ outcomes _ all, nx, tst _ stat, alternative ='greater ', reps = 10 * * 5, keep _ dist = false, seed = none, plus1 = true ) : prng = get _ prng ( seed ) rr = list ( range ( potential _ outcomes _ all. shape [ 0 ] ) ) tst = tst _ stat ( potential _ outcomes _ all [ : nx, 0 ], potenti...
[ -0.48567259311676025, -0.033780865371227264, 0.7578746676445007, -0.7554970979690552, -1.0337817668914795, 0.27606064081192017, -0.31321385502815247, 0.3963834047317505, -0.019483592361211777, 0.6054642796516418, 0.10497594624757767, 0.2946523129940033, 0.9062178134918213, -0.2750032842159...
def basemnemonic ( mnemonic ) : if mnemonic [ 0 ] = = " + " : return mnemonic [ 1 : ] return mnemonic
[ 0.20156577229499817, 0.05858872830867767, 0.4652043581008911, 0.4611140787601471, -0.5400131940841675, 0.28049081563949585, 0.0800372064113617, -0.4580913186073303, 0.43368566036224365, 0.35148006677627563, 0.23187954723834991, 0.4376176595687866, -0.9243299961090088, -0.9992579221725464, ...
def record _ to _ dict ( self, item ) : data = { } try : data = {'code': get _ str ( item, 0 ),'iso _ 3': get _ str ( item, 1 ),'iso _ n': get _ str ( item, 2 ),'fips': get _ str ( item, 3 ),'name': get _ str ( item, 4 ),'capital': get _ str ( item, 5 ),'area': get _ float ( item, 6 ),'population': get _ int ( item, 7 ...
[ -0.2661196291446686, -0.42801913619041443, 0.6719186305999756, -1.0724682807922363, -0.6738408207893372, -0.3015744090080261, -0.07120862603187561, -0.14896705746650696, 0.3829464614391327, 0.39602455496788025, -0.9696057438850403, 0.44080570340156555, -0.2860502600669861, -0.1332195699214...
def set _ params ( self, h = none, l = none, boundary = none ) : if h is not none : self. h = h if l is not none : self. l = l if boundary is not none : self. boundary = boundary bc = self. _ process _ boundary ( self. boundary ) self. cpp _ method. geometry = _ mpcd. slitporegeometry ( self. h, self. l, bc )
[ 0.4768378436565399, 0.28278061747550964, 0.3227411210536957, -0.12814700603485107, -0.1690702885389328, 0.030810415744781494, -0.5121008157730103, 0.801020622253418, -0.4857823848724365, -0.13458897173404694, -0.3073560297489166, 0.7291128039360046, -0.9024556279182434, 1.3950304985046387,...
def nullheuristic ( state, problem = none ) : return 0
[ 0.08796285837888718, -0.1683972328901291, 0.4168635308742523, 0.6631196737289429, 0.16759933531284332, 0.3178325891494751, -0.3191564381122589, 1.4549447298049927, 1.050688624382019, -0.738851010799408, 0.25755393505096436, -0.7165626287460327, 0.03145964816212654, -0.21118122339248657, ...
def show _ rentals ( product _ id ) : # gosh, i'm repeating myself a lot here with these mongo commands. could # be simplified into its own function, yes?? mongo = mongodbconnection ( ) with mongo : # connect to mongo db = mongo. connection. hp _ norton # the collections we will be using customers = db [ " customers " ...
[ 0.7736926674842834, -0.5651170611381531, 0.6384381651878357, 0.1938575655221939, -1.003102421760559, -0.29003220796585083, 0.11338576674461365, 0.2070283144712448, -0.7687517404556274, 1.0158077478408813, -0.6332044005393982, 0.05022934451699257, -0.32767897844314575, 0.7444285154342651, ...
def time _ until _ break ( self ) : return self. _ time _ until _ break
[ -0.17511363327503204, 0.5533220171928406, 0.2575434148311615, -0.14613330364227295, 0.3487898111343384, 1.4248296022415161, 0.2746286988258362, -1.0248844623565674, -0.2666749060153961, 0.42612478137016296, -0.5525059700012207, -0.49312731623649597, -1.0262553691864014, -0.3584934175014496...
def add _ results _ to _ json ( js, nbest _ hyps, char _ list ) : # copy old json info new _ js = dict ( ) new _ js ['utt2spk'] = js ['utt2spk'] new _ js ['output'] = [ ] for n, hyp in enumerate ( nbest _ hyps, 1 ) : # parse hypothesis rec _ text, rec _ token, rec _ tokenid, score = parse _ hypothesis ( hyp, char _ lis...
[ -1.0647655725479126, -0.3903774321079254, 0.6369031667709351, -0.22421999275684357, -0.03872154280543327, -0.6491888165473938, -0.24290771782398224, -0.3897632360458374, -0.4704797565937042, 0.6471888422966003, -1.343521237373352, 0.5643700361251831, 0.6020106673240662, 1.0333585739135742,...
def setup ( self ) : self. app = create _ app ( test _ config = true ) self. client = self. app. test _ client self. database _ name = " capstone _ test " self. database _ path = " postgresql : / / { } : { } @ { } / { } ". format ('postgres ','admin ','localhost : 5432 ', self. database _ name ) setup _ db ( self. app,...
[ 0.5663096904754639, -0.2593071460723877, 0.6362691521644592, 0.5122567415237427, 0.878908634185791, 0.7944058775901794, 0.741107165813446, -0.08080170303583145, -0.16194726526737213, 0.02487589605152607, -0.31331732869148254, -0.0670948252081871, -0.3610638678073883, 0.47865092754364014, ...
def tweets _ over _ time ( n ) : try : tweet _ timestamps = list ( mongo _ coll _ tweets. find ( {'timestamp _ ms': {'$ exists': true } }, {'timestamp _ ms': 1,'_ id': 0 } ). sort ( [ ['_ id ', - 1 ] ] ). limit ( n ) ) tweet _ datetimes = pd. to _ datetime ( np. array ( list ( map ( int, [ d ['timestamp _ ms'] for d in...
[ -0.23313073813915253, 1.2066847085952759, 0.9378787279129028, -1.2357107400894165, -0.14247816801071167, -0.16523222625255585, 1.467826008796692, -0.3953721523284912, -0.6829665899276733, 0.9219759702682495, -0.2709740698337555, 0.18196800351142883, 0.8826825022697449, 1.2513257265090942, ...
async def map ( self, ctx ) : await ctx. send ( " https : / / media. discordapp. net / attachments / 606478244346069002 / 720807522411479070 / eu4 _ map _ trade _ goods. png? width = 1080 & height = 393 " )
[ -0.9032012820243835, 0.5412082076072693, 0.7989506721496582, -0.5889825820922852, 0.012055180966854095, 0.6184077262878418, -0.7797318696975708, -0.11384489387273788, 0.6584819555282593, -0.2978275716304779, -0.22304010391235352, 1.110249638557434, -0.22538380324840546, -0.3239235281944275...
def _ format _ nodes ( fp, table ) : header = ['feature1 ','fsum'] table = biom. load _ table ( table ) _, _, tmp _ md = next ( table. iter ( axis ='observation') ) header. extend ( sorted ( tmp _ md. keys ( ) ) ) fp. write ( " \ t ". join ( header ) ) fp. write ('\ n') for values, id _, md in table. iter ( axis ='obse...
[ -0.04750746861100197, 0.08054126799106598, 0.574369490146637, -0.20041024684906006, 0.007626222912222147, 0.20885713398456573, 0.4782749116420746, 0.03843054920434952, -1.000575065612793, 0.42741021513938904, 1.2802704572677612, -0.12933804094791412, 1.2663244009017944, 0.04922360181808472...
def terminal ( board ) : terminal = ( winner ( board ) is not none ) or ( player ( board ) is none ) return terminal
[ -0.23208072781562805, -0.3713821768760681, 0.5787104964256287, 0.04410737752914429, -0.41431760787963867, -0.044871021062135696, -0.7410697937011719, 0.6398493647575378, 0.5821851491928101, 0.6224240064620972, 0.05834055319428444, -0.3478933274745941, -0.48583701252937317, -0.5366111397743...
def _ marshal ( self, pieces ) : payload = str (''. join ( pieces ) ) return struct. pack ('> bhi ', self. frame _ type, self. channel _ number, len ( payload ) ) + payload + chr ( spec. frame _ end )
[ 0.563143253326416, 0.3387264013290405, 0.498514860868454, -0.8129729628562927, 0.34501245617866516, 0.051164448261260986, -1.1584842205047607, -0.5598098039627075, -0.06799343228340149, -0.16372792422771454, -0.5036087036132812, 0.8509262800216675, -1.1012556552886963, 0.09430564939975739,...
def adv _ add ( df ) : df _ operate = df. reset _ index ( ) for index, row in df _ operate. iterrows ( ) : adv = ( row ['traded vol ( m )'] ) / ( row ['duration'] ) df. loc [ ( df ['time'] = = row ['time'] ) & ( df ['lc _ account'] = = row ['lc _ account'] ),'adv'] = adv return
[ -0.02544710785150528, 0.18620114028453827, 0.6602411270141602, -0.4958252012729645, 0.10831387341022491, 0.18437355756759644, 0.10692740231752396, -0.1600276082754135, 0.10273166000843048, 0.8907424807548523, 0.8541135787963867, 1.3258686065673828, 0.9942069053649902, -0.05016694217920303,...
def f ( y, t ) : # j'avais pas mis t et y comme dans l'enonce... return alpha * y
[ -0.08804330229759216, -0.9837262630462646, 0.4820564389228821, -0.7578465938568115, 0.5317175984382629, 0.096986785531044, 0.08368107676506042, 0.16939102113246918, -1.2075194120407104, 0.6547396183013916, -0.35896313190460205, -0.17805525660514832, 0.3788192868232727, 0.2631297707557678, ...
def _ serialize ( self ) : partial = derivedbase. _ serialize ( self ) interfaces = [ ] for c in self. interfaces : if isinstance ( c, configinterface ) : interfaces. append ( c. _ serialize ( ) ) else : interfaces. append ( c ) partial [ " interfaces " ] = interfaces return partial
[ -1.2424031496047974, -0.41385507583618164, 0.4168054759502411, -0.5130234956741333, -0.9920927286148071, 0.05669272691011429, 0.6688231229782104, -0.6440798044204712, 0.10750778019428253, 0.12728814780712128, -1.0205785036087036, -0.6358362436294556, -1.163893699645996, 0.5142294764518738,...
def clean _ data ( df ) : # create a dataframe of the 36 individual category columns categories = df ['categories']. str. split ( " ; ", expand = true ) # select the first row of the categories dataframe row = categories. loc [ 0 ] # use this row to extract a list of new column names for categories. # one way is to app...
[ 0.29400834441185, 0.2058594524860382, 0.7765092849731445, -0.4681163430213928, -0.10422662645578384, 0.10424403846263885, 0.3504503667354584, -0.00860553327947855, 0.17173965275287628, -0.6409069895744324, 0.30524566769599915, 0.08770103752613068, 0.7184538245201111, -1.0368324518203735, ...