text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ load _ from _ file ( ) : c = load _ from _ file ( fixture _ location ('basic. conll') ) sent = c [ 1 ] assert len ( c ) = = 4 assert len ( sent ) = = 14 assert sent ['10']. form = ='donc '
[ 0.46220001578330994, -0.17549672722816467, 0.32266488671302795, -1.0533020496368408, 0.8294612765312195, -0.2781252861022949, 0.4105098843574524, -0.15706001222133636, -0.7596098780632019, -0.3429543375968933, -1.1366556882858276, -0.6595158576965332, 0.4080011248588562, -0.191270321607589...
def archive ( path : str ) - > str : logging. info ( " compressing... " ) archive = make _ archive ( path, " zip ", path ) return archive
[ 0.24370737373828888, -0.7550671100616455, 0.45615437626838684, -0.4181411564350128, -1.0588088035583496, -0.21186168491840363, 0.18354672193527222, -0.480953574180603, -0.5366554260253906, -0.2358606457710266, 0.4909028708934784, 0.19467689096927643, 0.09279625862836838, -0.275364160537719...
def on _ train _ epoch _ end ( self, trainer, pl _ module, outputs ) : pass
[ -0.4125242829322815, -1.0180994272232056, 0.41442394256591797, 0.27253031730651855, 0.3933134973049164, 0.5106641054153442, 0.7498577833175659, 0.09360269457101822, -1.1062049865722656, 0.23671185970306396, -1.1009888648986816, 0.005524839740246534, 0.1243281215429306, -0.1531732678413391,...
def _ _ contains _ _ ( self, entry _ id ) : return entry _ id in self. entries
[ 1.383774995803833, -1.011719822883606, 0.09495889395475388, -0.4373425245285034, 0.5921190977096558, 0.2876948118209839, -0.7304389476776123, 0.505683958530426, 0.6119908094406128, -0.4387909770011902, 0.34798339009284973, 0.8532718420028687, -0.10685870796442032, 1.282620906829834, -2.9...
def createdb ( dbname ='dds _ assignment1') : # connect to the default database con = getopenconnection ( dbname ='postgres') con. set _ isolation _ level ( psycopg2. extensions. isolation _ level _ autocommit ) cur = con. cursor ( ) # check if an existing database with the same name exists cur. execute ('select count ...
[ -0.5534300208091736, 0.9683688282966614, 0.7024559378623962, 0.4261775016784668, 0.6927126049995422, 0.40636277198791504, 0.24351699650287628, 0.148276686668396, -0.6778396368026733, -0.0964127779006958, 0.2070320099592209, -0.34545475244522095, -1.10081148147583, 0.039120256900787354, -...
def getpredecessors ( self, tgt : int, player1 _ action : int, player2 _ action : int ) - > set [ int ] : if ( tgt, player1 _ action, player2 _ action ) in self. reversetransitions : return self. reversetransitions [ ( tgt, player1 _ action, player2 _ action ) ] else : return set ( )
[ -0.9552683234214783, 0.08619436621665955, 0.8048633337020874, -0.3179696798324585, -0.06968975067138672, -1.0737249851226807, -0.04738662391901016, -0.30767297744750977, -0.6249014139175415, 0.5157508850097656, -0.11658341437578201, 0.7581994533538818, -0.223224475979805, -0.54803127050399...
def getaction ( self, gamestate ) : " * * * your code here * * * " def pacman _ move ( state, depth ) : if state. iswin ( ) or state. islose ( ) : # if the game is over we won't need to check the state return state. getscore ( ) # we can just return the score for that state it is our terminal node pac _ actions = state...
[ -0.028052667155861855, -0.4438755512237549, 0.8077150583267212, 0.37342146039009094, 0.4556790888309479, -0.5784171223640442, 0.08048483729362488, -0.2858178913593292, 0.11900583654642105, 0.31523454189300537, 0.4725329279899597, 0.6358671188354492, 0.11000467836856842, 0.3186643719673157,...
def total _ expenses ( self ) : value = 0 # for category in self. categories : # if category. expenses > 0 : # value + = category. expenses return value
[ -0.29340487718582153, -0.05134294182062149, 0.5729653239250183, -0.5577495098114014, 0.27253320813179016, -0.12499383091926575, 0.24904826283454895, 0.6772423982620239, 0.5372872948646545, -0.06813991814851761, 0.09099885076284409, -0.7396137714385986, 0.24099649488925934, 0.04456572234630...
def testjoinkill ( self ) : def child ( i ) : tasklet. sleep ( 1000 ) def killer ( t ) : t. kill ( ) ch1 = tasklet. new ( child ) ( 1 ) ch2 = tasklet. later ( 1, killer ) ( ch1 ) try : tasklet. join ( ch1 ) self. fail ('expected join error') except joinerror, e : self. assertequals ( ch1, e. tasklet ) self. asserttrue ...
[ 0.7326470613479614, 0.10677093267440796, 0.6237761378288269, 0.7784669995307922, 0.3099788427352905, 0.8553901314735413, 0.14776626229286194, -0.0715150460600853, -0.17606744170188904, 0.06109992042183876, -0.339318186044693, -0.8319777250289917, -0.49308037757873535, -0.19257624447345734,...
def increment _ commissions _ started ( self ) : self. commissions _ started + = 1
[ 0.3077669143676758, -0.9639655947685242, 0.5646365284919739, -0.1682569533586502, 0.27872005105018616, 0.04279135540127754, 0.9100526571273804, 0.5799986124038696, -0.10105262696743011, -0.30865246057510376, -0.47435861825942993, 0.9365723729133606, -0.4106612205505371, -0.1145738139748573...
async def call ( self, http _ auth : httpauthorizationcredentials ) - > optional [ union [ basemodel, dict [ str, any ] ] ] : claims : dict [ str, any ] = jwt. get _ unverified _ claims ( http _ auth. credentials ) if not self. user _ info : return claims try : current _ user = self. user _ info. parse _ obj ( claims )...
[ -0.09571096301078796, -0.2298215925693512, 0.5684235095977783, 0.5406786799430847, -0.06884167343378067, 0.16254983842372894, -0.7375683188438416, -1.369685411453247, 0.03784545511007309, -0.3550965487957001, 0.36154669523239136, 0.8043630719184875, -0.14526264369487762, 0.1707557141780853...
def check _ rbl _ from _ domain ( self, msg, zone _ set, rbl _ server, subtest = none, target = none ) : from _ addrs = msg. get _ addr _ header ( " from " ) if not from _ addrs : self. ctxt. log. debug ( " message has no from header " ) return false return self. _ check _ rbl _ addr ( from _ addrs, rbl _ server, subte...
[ 0.28886350989341736, -0.0816102996468544, 0.599645733833313, 0.14109133183956146, 0.5722880959510803, 0.5594522953033447, 0.3557701110839844, -0.542384922504425, 0.3669481873512268, 0.27246367931365967, 0.5898190140724182, 1.0549362897872925, -1.0623070001602173, 0.7777948379516602, -0.9...
def is _ staggered ( self ) : return false
[ -0.673061192035675, 0.12905173003673553, 0.5112934708595276, 0.06931161880493164, 0.41175881028175354, 0.9658803939819336, 0.14450576901435852, 0.5789642333984375, 0.5322450399398804, -1.5092674493789673, -0.43325215578079224, -0.03679151087999344, -1.2343579530715942, 0.463644415140152, ...
def http _ put _ response _ hop _ limit ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " http _ put _ response _ hop _ limit " )
[ 0.001967022893950343, -0.3119563162326813, 0.7115091681480408, 0.3889642655849457, 0.43616271018981934, 1.5924652814865112, 0.9752495884895325, -0.2873217463493347, 0.898796021938324, -0.02763240970671177, -0.24232278764247894, -0.34964117407798767, -0.6361246705055237, -2.161938428878784,...
def find _ files _ with _ suffix ( self : object, suffix : str, base _ path : str ) - > list : all _ paths : list = [ ] def get _ paths ( path : str ) - > none : if os. path. exists ( path ) : paths : list = [ f " { path } \ { p } " for p in os. listdir ( path ) ] for p in paths : if os. path. isfile ( p ) and p. endsw...
[ 0.8382699489593506, -0.8040040731430054, 0.5852567553520203, 1.434928059577942, 0.6671408414840698, -0.02693789079785347, -0.13584859669208527, 0.5453651547431946, -0.26516589522361755, 0.2217618227005005, -0.4986657500267029, 0.48498818278312683, -0.2967217266559601, 0.8968851566314697, ...
def nkron ( * args ) : result = np. array ( [ [ 1. 0 ] ] ) for op in args : result = np. kron ( result, op ) return result
[ -0.05742409825325012, 0.3322409987449646, 0.612973690032959, 1.929909348487854, 0.45475783944129944, -0.2818670868873596, 0.39185768365859985, -0.06315068155527115, -0.18160298466682434, 0.6197933554649353, 0.09790433198213577, -0.17683041095733643, -1.0919238328933716, 0.9866511225700378,...
def scan _ resource _ conf ( self, conf ) : if'min _ master _ version'in conf : min _ master _ version = force _ float ( conf. get ('min _ master _ version') [ 0 ] ) if min _ master _ version and min _ master _ version > = 1. 12 : return checkresult. passed return checkresult. failed
[ -0.3082074224948883, 0.11205211281776428, 0.5200044512748718, 0.44543302059173584, -0.7707757353782654, 0.31707078218460083, 0.22805437445640564, 0.028074687346816063, -0.38341087102890015, 0.23744939267635345, -0.40828195214271545, -0.009220065549015999, -0.47473034262657166, 0.6504800319...
def comment _ handler ( sender, instance, created, * * kwargs ) : protest = instance. protest media = getattr ( protest,'media ', none ) parent = getattr ( instance,'parent ', none ) # only new protest created if created : # this indicate action from comment action setattr ( protest,'comment _ handler ', true ) protest...
[ 0.6981241703033447, -0.5912036299705505, 0.4911172688007355, -0.3287982940673828, 0.8233368396759033, 0.2576674818992615, 1.8225910663604736, -0.02616053633391857, -0.3586720824241638, 0.3247985243797302, -0.9985355138778687, -0.8792853951454163, 0.7766090035438538, 0.929391622543335, -0...
def puzzle _ hash ( self ) : return self. source. get _ tree _ hash ( )
[ 0.6606181859970093, 0.49848657846450806, 0.2537459433078766, -0.10236797481775284, -0.7808927893638611, 0.9196089506149292, 0.200100377202034, 0.33772310614585876, 0.15901139378547668, 0.2414964735507965, -1.0901087522506714, -0.024755900725722313, -0.47246989607810974, -0.6286394596099854...
async def supplier _ command ( ctx, ticker = " " ) : try : # debug user input if cfg. debug : print ( f "! stocks. dd. supplier { ticker } " ) if ticker = = " " : raise exception ( " a ticker is required " ) tickers = csimarket _ model. get _ suppliers ( ticker ) if tickers = = " " : raise exception ( " enter a valid t...
[ -0.5134524703025818, 0.5718569159507751, 0.5570446252822876, 0.5297614336013794, -0.010418515652418137, -0.08521945774555206, 0.27326661348342896, 0.3466639518737793, 0.14684496819972992, -0.23401287198066711, -0.885468602180481, 0.817081868648529, -0.829946756362915, 0.3946574628353119, ...
def send _ to _ influx ( lines ) : if len ( lines ) = = 1 : logging. debug ( " sending : " + lines [ 0 ] ) else : logging. debug ( " sending { } lines ". format ( len ( lines ) ) ) flux _ client = influxdbclient ( url = flux _ url, token = flux _ token, org = flux _ org ) write _ api = flux _ client. write _ api ( writ...
[ -0.3883602023124695, -0.2752076983451843, 0.20064117014408112, 0.8020198345184326, 1.4869884252548218, 0.17563889920711517, -0.35513895750045776, -0.0503375381231308, -0.6305255889892578, 0.1146664023399353, -1.026928424835205, 0.7456167936325073, -0.2381780445575714, 0.48400357365608215, ...
def wasmerged ( self ) : self. _ wasmerged = true
[ 0.6377061605453491, 0.4588640034198761, 0.42755141854286194, -0.36058270931243896, 1.3701012134552002, 0.484383225440979, 0.43488508462905884, 1.385361909866333, 0.1742822229862213, -1.2030349969863892, -1.29836106300354, 0.11958128213882446, -0.32504168152809143, 1.0827763080596924, -1....
def scale _ boxes ( boxes, image _ shape ) : height = image _ shape [ 0 ] width = image _ shape [ 1 ] image _ dims = k. stack ( [ height, width, height, width ] ) image _ dims = k. reshape ( image _ dims, [ 1, 4 ] ) boxes = boxes * image _ dims return boxes
[ -0.6608978509902954, 0.03390564024448395, 0.6622124910354614, -0.17261400818824768, -0.0025527719408273697, -0.9303780794143677, -1.0830532312393188, -0.1917935609817505, -0.4582057297229767, 1.3176085948944092, -0.6184848546981812, -0.9792739152908325, 0.7449764609336853, 0.12624198198318...
def set _ blocker ( self ) : self. _ call ('set _ blocker')
[ 0.020326251164078712, 0.5263105630874634, 0.3245637118816376, 1.2213672399520874, 0.7184290885925293, 0.2589472234249115, 0.2714426815509796, -0.6541739106178284, -1.0865163803100586, -0.23248207569122314, -0.4729638397693634, 0.9923927783966064, -0.5194830894470215, 1.302734613418579, 1...
def check _ split ( player _ posn, hand _ num = 0 ) : if len ( players [ player _ posn ] ['hand'] [ hand _ num ] ) > 2 : return false else : return players [ player _ posn ] ['hand'] [ hand _ num ] [ 0 ] [ 0 ] = = players [ player _ posn ] ['hand'] [ hand _ num ] [ 1 ] [ 0 ]
[ -0.6081584095954895, -0.5371739864349365, 0.6620016694068909, 0.3016955554485321, -0.08708043396472931, -0.05100151151418686, -0.3899213671684265, 0.8011741042137146, 0.29485443234443665, -0.05321585759520531, -0.6937748193740845, -0.008022251538932323, -0.2340642362833023, -0.711155116558...
def spider _ closed ( self, spider ) : print ('-'* 50 ) print ('fights not found :'+ str ( self. not _ found ) ) print ( self. not _ found _ list ) print ('-'* 50 ) print ('more than one matching fight _ id :'+ str ( self. more _ than _ one ) ) print ( self. more _ than _ one _ list ) print ('-'* 50 )
[ -0.2250119149684906, -1.250728964805603, 0.6789817214012146, -0.5210020542144775, 1.0216584205627441, 0.8602226376533508, -0.2617157995700836, 0.1490722894668579, -0.5678014159202576, -0.8145648241043091, -0.0826517641544342, 0.4787750244140625, 0.167878195643425, 0.9064187407493591, 0.3...
def key _ pair _ create ( context, values ) : return impl. key _ pair _ create ( context, values )
[ -0.42407622933387756, 0.6907685995101929, 0.057010237127542496, 0.18979094922542572, -0.23824797570705414, 0.4861333668231964, -0.46477264165878296, -0.7766421437263489, -0.46262073516845703, -0.5772133469581604, -0.05563650280237198, -0.7403339743614197, -0.2816019654273987, -0.2439656257...
def standardize ( imgs ) : imgs = imgs. astype ( np. float32 ) imgs - = np. mean ( imgs ) # imgs / = np. std ( imgs ) return imgs
[ -0.30268752574920654, 0.14760935306549072, 0.37939226627349854, -0.2535075843334198, 0.2265523225069046, 0.5752741098403931, 0.22897031903266907, 0.21250608563423157, 0.6640241742134094, 0.8095195293426514, 0.30344799160957336, 0.1711549609899521, -0.493952214717865, 1.2905303239822388, ...
def sts _ not _ found ( self ) : content = b'nothing found.'# the sts server returns a json content type # even though the content is not json. headers = {'content _ type':'application / json ; charset = utf - 8 ','status': 404, } return httpresponse ( content = content, * * headers )
[ -0.5772250294685364, -0.8826665282249451, 0.2559320330619812, -1.1958352327346802, 0.36750054359436035, -0.16535988450050354, -0.8926154375076294, -1.204293966293335, -0.2761412560939789, 0.049391455948352814, 0.15006141364574432, 0.5080344080924988, -0.09627426415681839, -0.24886147677898...
def test _ inheritance _ matches _ parental _ affected _ status _ de _ novo ( self ) : cnv = self. create _ variant ( " female " ) cnv. child. format ['inheritance'] = " de _ novo " cnv. child. format ['cifer _ inheritance'] = " not _ inherited " self. inh. trio. mother. affected _ status = " 1 " self. inh. trio. fathe...
[ 0.3368344008922577, -0.5457315444946289, 0.37790822982788086, 0.3497954308986664, 0.32455381751060486, 1.136113166809082, -0.4760124683380127, 0.5723427534103394, -0.7484782934188843, -0.7156840562820435, -1.1063220500946045, 0.31791818141937256, 0.03471267223358154, 0.5968605875968933, ...
def none _ continue ( ) : last = - 1 for i in range ( 0, len ( cpy ) ) : if nrange [ 0 ] > last and nrange [ 1 ] < cpy [ i ] [ 0 ] : nrep. checked. append ( nrange ) nrep. checked. append ( cpy [ i ] ) last = cpy [ i ] [ 1 ] if nrange [ 0 ] > last : nrep. checked. append ( nrange )
[ -0.18953998386859894, 0.15200559794902802, 0.5052220821380615, -0.3724963068962097, 0.5085349678993225, 0.601550817489624, 1.2210999727249146, -0.40677735209465027, -0.21310406923294067, 0.025205738842487335, 0.10368462651968002, -0.22593191266059875, -1.8022500276565552, 0.191874876618385...
def bin _ to _ int ( rgb ) : r, g, b = rgb return ( int ( r, 2 ), int ( g, 2 ), int ( b, 2 ) )
[ -0.8842702507972717, -0.8310914039611816, 0.6019530892372131, 0.3313848078250885, -0.012477966025471687, -0.009562946856021881, 0.21120339632034302, -0.9431979656219482, -1.1805862188339233, 0.08487291634082794, -1.7640738487243652, -0.18021748960018158, -1.1176599264144897, -0.01786518655...
def test _ content _ type _ with _ charset ( self ) : old _ headers = self. headers. copy ( ) self. headers ['content - type'] = ( remoting. content _ type +'; charset = utf - 8') try : self. gw. _ getresponse ( none ) finally : self. headers = old _ headers
[ 0.856597900390625, -0.47127223014831543, 0.4086408317089081, -0.5373148322105408, 0.3942287266254425, -0.5357615351676941, -0.09142064303159714, -0.9365561604499817, 0.027890028432011604, -0.10042787343263626, -0.2492348849773407, 0.6381195783615112, -0.2019934058189392, -0.431750953197479...
def video2frames ( video _ id, video _ path, processed _ videos _ dir, frame _ path, sample _ rate ) : # concat path and video id path _ video = video _ path + video _ id + '. mp4'video _ duration = get _ duration ( path _ video ) # split only the main part of the video starting _ time = 0. 2 * video _ duration split _...
[ 0.35988032817840576, -0.16089682281017303, 0.77667236328125, 0.9693573713302612, 0.3015248775482178, -0.5595908761024475, 0.519922137260437, -0.18930569291114807, 0.5136726498603821, 0.8090463876724243, 0.14295032620429993, 0.12331028282642365, -0.07904735207557678, 0.472410649061203, -0...
def write _ owl ( msdf : mappingsetdataframe, file : textio, serialisation = sssom _ default _ rdf _ serialisation, ) - > none : if serialisation not in rdf _ formats : logging. warning ( f " serialisation { serialisation } is not supported, " f " using { sssom _ default _ rdf _ serialisation } instead. " ) serialisati...
[ 0.330674409866333, 0.1863260120153427, 0.41134628653526306, -0.6114360690116882, -0.037678882479667664, 0.23442359268665314, 0.14193026721477509, 0.3312552869319916, 0.19545280933380127, -0.2964767813682556, 0.10612157732248306, 0.764761209487915, 0.37342333793640137, -0.5335474014282227, ...
def triplets ( p ) : for a in xrange ( 1, p / 2 + 1 ) : for b in xrange ( a, p / 2 + 1 ) : if integral _ triangle ( a, b, p ) : yield ( a, b, p - ( a + b ) )
[ 0.6960750818252563, 0.5224889516830444, 0.4737066924571991, -0.16096605360507965, -0.5132337808609009, 1.0552351474761963, -0.15627828240394592, 0.1277555376291275, 0.3283422589302063, 0.7343942523002625, -0.2953934371471405, -0.8711503744125366, -0.5577396154403687, -1.1897556781768799, ...
def delete _ old _ versions ( template _ id : str, keep : int, *, sg : sendgrid. sendgridapiclient ) - > none : template = process _ response ( sg. client. templates. _ ( template _ id ). get ( ) ) versions _ to _ delete = sorted ( filter ( lambda v : not v ['active'], template ['versions'] ), key = lambda v : parse _ ...
[ 0.03244296461343765, -1.0467387437820435, 0.7513863444328308, -0.020901726558804512, 0.16678845882415771, 0.312202125787735, 0.14486870169639587, -0.718950629234314, 0.031526755541563034, 1.3516473770141602, -0.6009160280227661, 0.08400695770978928, -0.04136500880122185, 0.1953628659248352...
def fit ( self, x, y, fullx = none, fully = none ) : if self. greedyfit : assert ( not fullx is none ) and ( not fully is none ),'fullx and fully need to be supplied by the crossvalidation if you want the base to fit to all data in cv mode'logisticregression. fit ( self = self, x = self. transform _ input ( fullx, forc...
[ 0.3438747525215149, -0.1348806470632553, 0.847667932510376, 0.6401523351669312, 1.004807710647583, 0.33542686700820923, -0.5973652601242065, 0.4724481701850891, -0.5882346034049988, -0.11108039319515228, -0.7990308403968811, 0.6186544895172119, -0.5814388990402222, 0.19732347130775452, 0...
def hgncrestcall ( path ) : headers = {'accept':'application / json ', } uri ='http : / / rest. genenames. org'target = urlparse ( uri + path ) method ='get'body ='' h = http. http ( ) response, content = h. request ( target. geturl ( ), method, body, headers ) if response ['status'] = ='200': data = json. loads ( cont...
[ -0.7334777116775513, 0.06955456733703613, 0.9658546447753906, -0.5371680855751038, 0.2026093453168869, 0.09514696896076202, -0.9709089398384094, -0.3811245560646057, -0.8969141244888306, 0.47807320952415466, -1.0440973043441772, 0.18085148930549622, -0.27532610297203064, 0.5671212077140808...
def election _ type ( self ) : if self. electiontype is none : return self. _ election _ type _ from _ description ( ) if self. electiontype. electiontype = = " special " : # assume elections with type " special " are general elections. return " general " return self. electiontype. electiontype. lower ( )
[ -0.29286131262779236, -0.23941725492477417, 0.3315841853618622, 0.43971017003059387, 0.6871645450592041, 0.4972149431705475, -0.1345885843038559, -0.42662662267684937, 1.2526825666427612, 0.9642245769500732, 0.972502589225769, 1.1113874912261963, -0.43023112416267395, 0.35913509130477905, ...
def onpartselected ( self, e ) : self. enable _ toolbar _ buttons ( self. part _ list. getselecteditemscount ( ) > 0 )
[ 0.4707098603248596, -0.5830534100532532, 0.3779640793800354, 0.3670513331890106, 0.738725483417511, 0.43800970911979675, -0.011421573348343372, 0.11576683819293976, 0.26163119077682495, 0.21841970086097717, -1.2931104898452759, -0.16910606622695923, -0.582345187664032, -0.20223510265350342...
def makefigure ( values : np. ndarray ) : hist, edges = np. histogram ( values, bins = 25, range = ( - 25, 100 ) ) print ( f " hist = { hist } " ) print ( f " edges = { edges } " ) plt. stem ( edges [ : - 1 ], hist, basefmt = " " ) plt. title ( csv _ path. name ) plt. ylabel ( " count " ) plt. xlabel ( " bin ( left edg...
[ 0.46757325530052185, 0.7979878783226013, 0.6042701601982117, -0.38137707114219666, 0.12511949241161346, 0.7539863586425781, 0.8340726494789124, 0.43657588958740234, -0.428852379322052, -0.18535177409648895, -0.5340263843536377, 0.9226493835449219, 1.2743256092071533, 0.5166034698486328, ...
def circuit _ count ( self, circuit _ count ) : self. _ circuit _ count = circuit _ count
[ 0.20772723853588104, -0.23843719065189362, 0.30279454588890076, -0.5011666417121887, -0.18724530935287476, 0.23700429499149323, 0.6781953573226929, 0.4691140949726105, -0.8106805682182312, -0.1496264934539795, -0.16656659543514252, 0.5309410095214844, -0.2176799774169922, 0.454529851675033...
def usebaseline ( trace ) : trace _ baseline = trace. copy ( ) # g unit acc = trace _ baseline. data velocity = [ 0 ] disp = [ 0 ] dt = trace. stats. delta xdata = np. arange ( 0, len ( acc ) * dt, dt ) # double integrate : for a in acc : velocity. append ( velocity [ - 1 ] + a * dt ) del velocity [ 0 ] for v in veloci...
[ 1.549002766609192, -0.49855783581733704, 0.8361942172050476, -0.6063892841339111, 0.27910035848617554, 0.40569183230400085, 0.5293346047401428, -0.6575080752372742, 0.029628770425915718, -0.006020259577780962, -0.458024799823761, 0.38189584016799927, -0.6578555107116699, -0.825319111347198...
def index ( ) : # print ( datetime. now ( ) ) # find the user id of the current user userid = session [ " user _ id " ] # query all the transactions of the user transactions = db. execute ( " select sum ( shares _ count ) total _ shares, stock _ symbol \ from ( select * from transactions where user _ id =? and stock _ ...
[ 0.4111785292625427, 0.540706992149353, 0.7716825604438782, -0.2888937294483185, 0.1457311362028122, -0.4655509293079376, 1.2314931154251099, -0.17395825684070587, -0.5312867760658264, 0.5889391899108887, 0.38836461305618286, -0.36356019973754883, 0.5561777353286743, 0.22268661856651306, ...
def observe ( cb ) : _ obs. append ( cb )
[ -0.022806931287050247, -0.009337020106613636, 0.6652812361717224, -0.37651365995407104, 0.14994408190250397, 0.7618622183799744, -0.27385225892066956, -0.2754994332790375, 0.06317484378814697, -0.12024462968111038, -1.2373658418655396, 0.28280577063560486, -0.005712954327464104, 0.78434360...
def read _ cpu _ temperature ( ) : temps = psutil. sensors _ temperatures ( ) for name, entries in temps. items ( ) : i = 1 for entry in entries : # in case the label is empty ( e. g. on raspberry pi 4 ), # construct it ourself here based on the sensor key name. if not entry. label : _ label = f " { name } { i } " else...
[ -0.5741978883743286, -0.3619570732116699, 0.3777313828468323, -0.494981974363327, -0.8093565106391907, -0.041698627173900604, 0.09947505593299866, 0.38859066367149353, -1.010505199432373, 0.09673699736595154, 0.39401400089263916, -0.09820160269737244, -0.7421209216117859, -0.04632828757166...
def _ find _ fend _ pairs ( self, data, fend _ pairs ) : # split data amongst nodes mapped _ fends = numpy. empty ( ( data. shape [ 0 ], 2 ), dtype = numpy. int32 ) mapped _ fends. fill ( - 1 ) distances = numpy. zeros ( ( data. shape [ 0 ], 2 ), dtype = numpy. int32 ) # assign fends on a per - chromosome basis for i, ...
[ -0.2578192353248596, -0.7610180377960205, 0.8540300130844116, -0.658149242401123, -0.2806432843208313, -0.19220271706581116, 0.8358966112136841, -0.678581178188324, -0.2775424122810364, -0.05052389204502106, -0.1416105329990387, 0.4599679410457611, 0.3904035687446594, 0.49392807483673096, ...
def test _ rot _ job _ succeeded _ 1 ( self ) : amore _ z _ score = 15 data = self. as. _ rot _ job _ succeeded ( amore _ z _ score ) self. asserttrue ( data )
[ -0.1525430530309677, 0.5871020555496216, 0.2818879783153534, 0.7848232388496399, 0.0029434363823384047, 1.0952850580215454, 0.5114738345146179, 0.04261717572808266, 0.27790895104408264, -0.7848384976387024, -0.8257514834403992, 0.03689909353852272, 0.18829083442687988, -0.7432724833488464,...
def device _ compare ( fpold, fpnew, check ) : out = dict ( ) olddiff = np. setdiff1d ( fpold [ " location " ], fpnew [ " location " ] ) rows = np. arange ( len ( fpold ), dtype = np. int ) [ fpold [ " location " ] in olddiff ] for r in rows : loc = fpold [ r ] [ " location " ] out [ loc ] = dict ( ) out [ loc ] [ " ol...
[ -0.6876148581504822, -0.8624156713485718, 0.8321502208709717, -0.33830195665359497, -1.0006827116012573, -0.11852416396141052, 0.17891934514045715, 0.07565440982580185, -0.6273469924926758, 0.4056805670261383, -0.07530254870653152, -0.4604758322238922, 0.33150023221969604, 0.09990014135837...
def get _ volumes ( self, lv _ name = none ) : return self. get _ lv _ info ( self. _ root _ helper, self. vg _ name, lv _ name )
[ 0.3278903067111969, -0.4310491681098938, 0.4072759747505188, 0.6977523565292358, 0.03002035617828369, -0.7265745997428894, -1.2988646030426025, -0.22198894619941711, -0.06354048103094101, -0.036863625049591064, -0.47527948021888733, 0.3926524817943573, 0.16543595492839813, 0.80265331268310...
async def ping ( self, ctx ) : await ctx. send ( f'{ round ( self. bot. latency * 1000 ) } ms')
[ 0.1251046061515808, 0.27081558108329773, 0.5396979451179504, 0.2860336899757385, 0.6754500865936279, 0.8207471966743469, -1.34634530544281, 0.5616331100463867, 0.0511631965637207, 0.30166324973106384, 0.37536272406578064, 1.1848299503326416, -0.5732190012931824, 0.3652932047843933, -1.29...
def _ create _ prediction _ pairs ( self, instances : instances, iou _ all : np. ndarray ) - > list : bbox _ pairs = [ ] for i in range ( len ( instances ) ) : for j in range ( len ( self. _ prev _ instances ) ) : bbox _ pairs. append ( { " idx " : i, " prev _ idx " : j, " prev _ id " : self. _ prev _ instances. id [ j...
[ -1.6805719137191772, -0.10327756404876709, 0.6870006918907166, -0.3175424337387085, -0.34612542390823364, 0.1645725518465042, 0.3554689288139343, 0.49480026960372925, -1.0522849559783936, 0.469685435295105, 0.3032459318637848, -0.05016050860285759, -0.4494228661060333, 0.47350984811782837,...
def test _ vperf _ unidir _ rebalance ( self ) : super ( xrebalancetests, self ). test _ vperf _ unidir ( )
[ 0.6486237645149231, 0.1568206399679184, 0.2730726897716522, 0.5766112208366394, 1.3709027767181396, 0.8123229742050171, 0.6928713917732239, -0.2349783033132553, 0.9448773264884949, -0.6757437586784363, -0.25167331099510193, -0.07289548963308334, -1.4425441026687622, -0.6734898090362549, ...
def move _ with _ placements ( self ) - > list [ move ] : return self. placements + self. moves
[ -0.5561133623123169, -0.2199525535106659, 0.33856692910194397, 0.3035428822040558, 0.3964427709579468, 0.7869683504104614, -0.07954006642103195, -0.12501274049282074, 1.1631715297698975, 0.2455395609140396, 0.25893718004226685, -0.6262810230255127, 0.3778373897075653, 0.6515986323356628, ...
def get _ wceff ( q2, wc, par, b, m, lep, scale ) : xi _ u = ckm. xi ('u ', meson _ quark [ ( b, m ) ] ) ( par ) xi _ t = ckm. xi ('t ', meson _ quark [ ( b, m ) ] ) ( par ) qiqj = meson _ quark [ ( b, m ) ] yq2 = matrixelements. y ( q2, wc, par, scale, qiqj ) + ( xi _ u / xi _ t ) * matrixelements. yu ( q2, wc, par, s...
[ 0.490492582321167, -0.2998277246952057, 0.68598872423172, -0.9391252398490906, -0.28640878200531006, -0.014523697085678577, 0.10050654411315918, 0.06627103686332703, -0.9269304871559143, 0.60670405626297, -0.5925042033195496, 0.029493840411305428, -0.20666371285915375, 0.4116431772708893, ...
def odot ( a, g ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import import numpy as np # check dimension if g. shape [ 0 ] % a. shape [ 0 ]! = 0 : raise typeerror ( "!!! error : input parameters are no...
[ 0.22625501453876495, 0.02690059319138527, 1.061153531074524, -1.2279582023620605, -0.24712161719799042, -0.27217918634414673, 0.8079233169555664, -0.1234203353524208, 0.4066047668457031, 1.2029705047607422, 0.925270140171051, 0.4638839662075043, -0.0383022166788578, 0.14483633637428284, ...
def find _ parsing _ warnings ( self ) : if self. _ parsing _ warnings is not none : return self. _ parsing _ warnings self. _ parsing _ warnings = [ * self. find _ all _ table _ parsing _ warnings ( ), * self. find _ all _ row _ parsing _ warnings ( ), ] return self. _ parsing _ warnings
[ -0.07668794691562653, -0.08162908256053925, 0.6197109222412109, 0.6744042634963989, 1.0081367492675781, -0.22864925861358643, -0.19300927221775055, -0.864508330821991, -0.45016002655029297, -0.1982601284980774, -0.3407629430294037, 0.05127660557627678, 0.48331037163734436, 1.24524939060211...
def find _ file ( filename, possible _ paths ) : for path in possible _ paths : full _ path = path +'/'+ filename if os. path. isfile ( full _ path ) : return full _ path return false
[ 0.3916552662849426, -0.3193631172180176, 0.46228891611099243, 1.0981879234313965, 0.013846135698258877, 0.8086357116699219, 0.39813095331192017, 0.7542915344238281, -1.2661211490631104, -0.2395353615283966, 0.9451953172683716, -1.4323275089263916, -0.9576209187507629, 0.6036258339881897, ...
def items _ outside ( g, nbunch ) : if eligible is none : return [ n for n in g. nodes ( ) if n not in nbunch ] return [ n for n in g. nodes ( ) if g. nodes [ n ] [ eligible ] and n not in nbunch ]
[ -0.4000391960144043, 0.17235521972179413, 0.46456781029701233, 0.9031397700309753, -1.0783841609954834, 0.5160750150680542, -0.9204328060150146, -0.07838481664657593, -0.10280152410268784, 0.3053548038005829, -0.9955015778541565, 0.21013550460338593, -0.676482617855072, 0.6618395447731018,...
def recapsys ( self, * captures ) : capture _ now = self. capsys. readouterr ( ) for capture in captures + ( capture _ now, ) : sys. stdout. write ( capture. out ) sys. stderr. write ( capture. err ) return capture _ now
[ -0.892072319984436, -0.9686921238899231, 0.7444103360176086, 1.0089536905288696, 0.07912290096282959, -0.7403721809387207, -0.012807069346308708, -0.37828460335731506, 0.6481854319572449, -0.6637087464332581, 0.23881833255290985, -0.10694360733032227, 0.654304563999176, 0.46040573716163635...
def run ( self, context ) : self. log. debug ( " context = % s ", context ) reader = giit. config _ reader. configreader ( config = self. config, context = context ) # we allow / to be the root of the remote branch, but # we need to handle that a bit carefully. since the temp _ path = os. path. join ( tempfile. gettemp...
[ 0.0047485982067883015, 0.0028502389322966337, 0.9512718319892883, -0.40648964047431946, 0.2707604467868805, 0.5655446648597717, -0.17060433328151703, -0.7575972676277161, -0.48441287875175476, 0.5127384066581726, -0.15438783168792725, 0.5785879492759705, -0.20952145755290985, -0.1861915886...
def from _ bytes ( cls, b ) : return cls ( * struct. unpack ( "! iiiihhbb ", b ) )
[ 1.0586936473846436, -0.09496861696243286, 0.3686818480491638, 0.943438708782196, 0.10927607864141464, 0.5376120805740356, -0.4716017246246338, 0.4788256883621216, 1.295091986656189, -0.16071465611457825, -1.2218961715698242, -0.5008969306945801, -1.0067702531814575, -1.2692502737045288, ...
def introspect _ caller ( ) : caller ='console'stack = inspect. stack ( ) try : for frame in stack : module = inspect. getmodule ( frame [ 0 ] ) if hasattr ( module,'_ _ name _ _') : module _ name = module. _ _ name _ _ if len ( module _ name ) > 1 : caller = module _ name except : pass if caller = ='_ _ main _ _': cal...
[ -0.2942901849746704, 0.05059162154793739, 1.045203447341919, -0.3409116268157959, 0.33951789140701294, -0.2077927440404892, 0.5344304442405701, -0.9087644219398499, -0.3598552346229553, 0.25436678528785706, 0.8764316439628601, 0.21588298678398132, -0.2665853202342987, 1.1897257566452026, ...
def assign _ drawing _ object ( self, y _ pos = 0, x _ pos = 0, schema = none ) : assigned _ obj ='' for obj in self. object _ dict : if obj. startswith ('%') : if self. object _ dict [ obj ] ['c']. contains ( y _ pos, x _ pos ) : assigned _ obj = obj break if not assigned _ obj : try : assigned _ obj ='%'+ str ( max (...
[ -0.6249958872795105, -1.0476857423782349, 0.7358044385910034, -0.7833981513977051, -0.5063507556915283, 0.2570371925830841, 0.4863407015800476, -0.14221125841140747, -0.4209528863430023, -0.2675991952419281, -0.4303673803806305, -0.3964417278766632, -0.1275312304496765, 0.38428014516830444...
def getmvp ( self ) : return self. mvp. cvalues ( )
[ -0.16145619750022888, -0.9680821299552917, 0.3998226225376129, 0.5948789715766907, -0.6965396404266357, -0.047795891761779785, -1.3437978029251099, 0.028637822717428207, 0.7498442530632019, 0.6578974723815918, 0.054371822625398636, 0.027234723791480064, -0.4887647032737732, 0.2280993759632...
def request _ user _ id ( username ) : # todo rework redis so that i can efficiently query users by username pass
[ -1.0508503913879395, 0.5711713433265686, 0.1770830750465393, 1.2404401302337646, 0.3019034266471863, -0.2188074141740799, 0.5134556293487549, 0.013148095458745956, 0.5170325040817261, -0.5231197476387024, -0.5431696176528931, -0.18002524971961975, -1.069787621498108, 0.3983457386493683, ...
def print _ cluster _ info _ ec2 ( cluster _ name : str, cluster _ instances : list ) : print ( cluster _ name +':') print ('state : { s } '. format ( s = get _ cluster _ state _ ec2 ( cluster _ instances = cluster _ instances ) ) ) print ('node - count : { nc } '. format ( nc = len ( cluster _ instances ) ) ) if get _...
[ -0.46243229508399963, -0.2609116733074188, 0.4379325807094574, -0.5054224729537964, 0.023408429697155952, 0.176734060049057, -0.24291880428791046, 0.1893659234046936, -0.8522351384162903, 0.5636123418807983, -0.09423969686031342, 1.4634493589401245, 0.5305407047271729, -0.10314268618822098...
def flatten _ child ( self ) - > list [ list [ list [ tuple [ int, int, int ] ] ] ] : childs = self. children top _ right = childs [ 0 ]. flatten ( ) top _ left = childs [ 1 ]. flatten ( ) bot _ left = childs [ 2 ]. flatten ( ) bot _ right = childs [ 3 ]. flatten ( ) return [ top _ right, top _ left, bot _ left, bot _ ...
[ -1.08352530002594, -0.02501775324344635, 0.7975030541419983, -0.09667742252349854, -0.2992907166481018, 0.4132080376148224, 0.5139384269714355, 0.1444472223520279, -0.10627114772796631, 0.1374339759349823, -1.3773224353790283, -1.3623403310775757, -0.2882121801376343, 0.05869706720113754, ...
def regrid _ era5 ( da ) : import numpy as np import aux _ functions _ strat as aux import xarray as xr area = aux. grid _ seperation _ xr ( 1. 25, 1. 25, lon _ start = 0. 0 ) # i d / l from ecmwf with this resolution # the center coords from grid calculation : req _ lat = area. lat _ center. values req _ lon = area. l...
[ -0.7670202851295471, 0.7411418557167053, 0.8712433576583862, -0.9066686034202576, -0.029389331117272377, -0.4167780876159668, 0.10866096615791321, 0.29193249344825745, -0.21390767395496368, 0.23544876277446747, 0.4836493134498596, 0.2883733808994293, 0.4721898138523102, 0.8769124150276184,...
def cities ( self ) : raise notimplementederror ( )
[ -0.43242692947387695, -0.343705415725708, 0.4834352135658264, 0.21799027919769287, -0.09199079126119614, 1.1147809028625488, 0.3942541480064392, -0.22435159981250763, 0.3932459056377411, -0.8102428317070007, -0.6854220032691956, -0.2108544260263443, 0.34210824966430664, 0.4752042889595032,...
def set _ battery _ monitoring _ limits ( self, minimum, maximum ) : level _ min = float ( minimum ) / self. _ voltage _ pin _ max level _ max = float ( maximum ) / self. _ voltage _ pin _ max level _ min = max ( 0, min ( 0xff, int ( level _ min * 0xff ) ) ) level _ max = max ( 0, min ( 0xff, int ( level _ max * 0xff )...
[ -0.2568620443344116, -0.5050806403160095, 0.7549661993980408, -0.08365527540445328, 0.40711748600006104, 0.8172927498817444, -0.4649033844470978, -0.6916003227233887, -0.9945759177207947, 0.14164279401302338, -0.8727142810821533, 1.0522392988204956, -0.5297016501426697, 0.01945682615041732...
def rda ( ) : run ( " rscript data - raw / use - data. r " )
[ -0.44210493564605713, -0.18960660696029663, 0.39160311222076416, -0.8033941388130188, 0.2730349600315094, -0.23220811784267426, 0.8679453134536743, -0.1245582103729248, 0.0043133278377354145, 0.12029192596673965, 0.39112594723701477, 1.5246363878250122, -0.26003697514533997, -0.07943738251...
def export _ motion _ blur ( rpr _ context, obj _ key, transform ) : next _ transform = rpr _ context. transform _ cache. get ( obj _ key ) if next _ transform is none or np. all ( transform = = next _ transform ) : return rpr _ object = rpr _ context. objects [ obj _ key ] rpr _ object. set _ motion _ transform ( next...
[ -0.2994582951068878, -0.708641529083252, 0.523446798324585, 0.3711099922657013, 0.06696377694606781, 0.1386297643184662, -0.10113722085952759, -1.031164526939392, 1.206794261932373, 0.7056954503059387, -1.1440908908843994, 0.9410987496376038, -0.8194620013237, 0.04250135272741318, 0.7639...
def lowrankcausalattention ( d _ feature, n _ heads = 1, dropout = 0. 0, max _ inference _ length = 2048, lowrank = 64, mode ='train') : return tl. configurableattention ( lowrankdense ( d _ feature, lowrank ), lowrankdense ( d _ feature, lowrank ), lowrankdense ( d _ feature, lowrank ), lowrankdense ( d _ feature, low...
[ 0.979683518409729, -0.03426525369286537, 0.4773932099342346, -1.1670657396316528, -0.5305492877960205, -0.5815001130104065, 0.6298621892929077, 0.36171674728393555, 1.0290926694869995, 0.09156034886837006, 0.37589749693870544, 0.4632722735404968, 0.2391430139541626, -0.05966949462890625, ...
def xywh _ 2 _ xyxy ( boxes ) : return torch. cat ( ( boxes [ :, : 2 ] - boxes [ :, 2 : ] / 2, boxes [ :, : 2 ] + boxes [ :, 2 : ] / 2 ), dim = 1 )
[ -0.8177714347839355, -0.6965222358703613, 0.7556436061859131, 0.009029623121023178, -0.4539099633693695, -0.39233288168907166, 0.23244722187519073, -0.7994815707206726, -0.9421586394309998, 0.6335881352424622, -0.8373489379882812, -0.6772072315216064, 0.5725259184837341, -0.892450153827667...
def predict ( self, new _ x ) : if self. m = = none : # untrained surrogate raise runtimeerror ( " krigingsurrogate has not been trained, so no " " prediction can be made " ) r = zeros ( self. n ) x, y = self. x, self. y thetas = 10. * * self. thetas xx = array ( x ) for i in range ( self. n ) : r [ i ] = sum ( thetas ...
[ 0.15935677289962769, -0.2787833511829376, 0.8876111507415771, -0.0033382566180080175, -1.0921069383621216, -0.00017487863078713417, -0.3086279034614563, -0.25545844435691833, -0.00041079241782426834, 0.19791798293590546, -0.3019356429576874, 0.5383746027946472, 0.15428128838539124, 0.39973...
def compute _ id ( self ) - > optional [ str ] : return pulumi. get ( self, " compute _ id " )
[ 1.5381618738174438, 0.3378939926624298, 0.566270112991333, 0.6772841811180115, 0.8993117213249207, 1.0125011205673218, -0.4196326434612274, 0.32647833228111267, 0.5672527551651001, 0.36315402388572693, 0.9188232421875, 1.119856357574463, -0.03220843896269798, -0.9640418291091919, -0.3337...
def make _ remote _ library _ query ( domain, lql ) : useragent ='alexandria - beta ( % s )'% settings. my _ library _ domain return requests. get ( " https : / / " + domain + " / api / query ", params = {'query': lql }, headers = {'user - agent': useragent } )
[ -0.8368938565254211, -0.721775472164154, 0.3775089979171753, -1.2242319583892822, -0.2832667827606201, 0.7216501235961914, -1.2122641801834106, -0.4650333821773529, -0.3757406771183014, 0.3171812891960144, 0.026988761499524117, 0.714917778968811, -0.8325571417808533, -0.7112205624580383, ...
def _ _ init _ _ ( self, path = none, cache _ content = false, env _ replace = true, parent _ env = none, fileobj = none ) : self. fileobj = fileobj if self. fileobj is not none : if path is not none : raise valueerror ( " parameters path and fileobj cannot be used together. " ) else : self. fileobj. seek ( 0 ) else : ...
[ 0.3679499626159668, -0.08771595358848572, 0.8330053091049194, 0.12485136091709137, -0.5053215026855469, 0.3685920834541321, 0.6334183216094971, 0.2214164286851883, -1.10923433303833, -0.2766530215740204, 0.15715086460113525, 0.11260144412517548, 0.34770822525024414, 1.0124400854110718, -...
def project ( self, win _ width, win _ height, fov, viewer _ distance ) : factor = fov / ( viewer _ distance + self. z ) x = self. x * factor + win _ width / 2 y = - self. y * factor + win _ height / 2 return point3d ( x, y, 1 )
[ 0.1455204337835312, -0.037769865244627, 0.3182968497276306, 0.7841498255729675, -0.7896977663040161, -0.05041085556149483, -0.083481065928936, 0.6540510058403015, 0.6376985907554626, 0.3766704201698303, 0.6609904766082764, 0.21351704001426697, -0.9329574108123779, -0.44757822155952454, -...
def createderivation ( inputfilename, outputfilename, toolentity, activity, namespace, namespaceuri ) : ifile = rearrangementsfile ( false, filename = inputfilename ) ofile = rearrangementsfile ( true, filename = outputfilename ) ofile. derivefrom ( ifile ) ofile. addannotationactivity ( inputfilename, outputfilename, ...
[ -0.054646171629428864, -0.8316699266433716, 0.5300053954124451, 0.5893208980560303, 0.19942663609981537, 0.042960263788700104, 0.8322177529335022, 0.31867238879203796, -0.4607808291912079, -0.1244107186794281, 0.5312113165855408, -0.5884149074554443, 0.3935268521308899, -0.3339237868785858...
def compute _ tsforecast ( s3 _ args : s3args, data _ args : tsforecastdataargs, model _ args : lgbargs ) : args = parse _ args ( data _ args ) + parse _ args ( model _ args ) args + = ['- - dir - train ','/ opt / ml / processing / input'] args + = ['- - dir - output ','/ opt / ml / processing / output'] sagemaker _ re...
[ -0.03466000407934189, -0.1423732489347458, 0.598507285118103, -0.49228647351264954, 0.09817888587713242, -0.11056410521268845, -0.3381745517253876, 0.7537688612937927, -0.42144930362701416, 0.622853696346283, 0.268853098154068, 0.7113463282585144, 0.5063644051551819, -0.1318628191947937, ...
def find _ reg ( self, name : str ) - > regsregister : for reg in self. registers : if name = = reg. name : return reg raise registernotfound ( f " the { name } is not found in loaded registers for { self. dev _ name } device. " )
[ -0.14955218136310577, 0.06402907520532608, 0.3423047959804535, -0.4370553493499756, 0.26551589369773865, 0.1688641905784607, 0.01693282462656498, -1.4723705053329468, -0.2201654016971588, -0.38004636764526367, -0.0433453693985939, 0.7292604446411133, -1.0648257732391357, 0.6874249577522278...
def test _ takers ( ) : try : msg = " choose a text file with test taker's usernames on separate lines. " title = " choose a. txt file " file _ name = easygui. fileopenbox ( msg = msg, title = title, filetypes = [ " *. txt " ] ) open _ file = open ( file _ name, " r " ) test _ takers _ list = open _ file. readlines ( )...
[ 0.4449438750743866, -0.9791691303253174, 0.6830204129219055, -0.11109182983636856, -0.08481965214014053, 0.10597898811101913, 0.4034614861011505, 0.17660954594612122, -0.37269851565361023, 0.5561804175376892, -0.258734792470932, 0.6432956457138062, -1.075408697128296, 0.7930368185043335, ...
def normalise ( x ) : arr = np. array ( x ). astype ( float ) arr - = np. nanmin ( arr ) arr / = np. nanmax ( arr ) return np. nan _ to _ num ( arr, nan = 0. 0, posinf = 1. 0 )
[ 0.20452870428562164, -0.21220606565475464, 0.5258894562721252, 0.7691907286643982, -0.6104373931884766, 0.33386191725730896, 0.28772687911987305, 0.06176862493157387, 0.8823480606079102, 0.13469910621643066, -0.6137425899505615, 0.3175978362560272, 0.017404422163963318, 0.3289569616317749,...
async def set _ value ( self, device _ id : str, value : int, fade _ time : optional [ timedelta ] = none ) : device = self. devices [ device _ id ] # handle keypad leds which don't have a zone id associated if device. get ( " type " ) = = " keypadled " : target _ state = " on " if value > 0 else " off " await self. _ ...
[ -0.6112229824066162, 0.5628044605255127, 0.7205705046653748, 0.09867532551288605, -0.16275529563426971, -0.1675390899181366, 0.08046045899391174, -0.4662812352180481, 0.6430755853652954, 0.42608171701431274, -0.4571802318096161, 1.0891871452331543, 0.04407896474003792, 1.4590966701507568, ...
def open ( self ) : gc = self. auth ( ) return gc. open ( self. sheet _ name ). sheet1
[ -0.23062092065811157, -0.3289455771446228, 0.45110034942626953, 0.5417484641075134, -0.45495760440826416, 0.8074705004692078, -0.023395156487822533, 0.10770855098962784, -0.05364571884274483, -0.6865631341934204, 0.7364785671234131, 1.008042573928833, -0.3483566641807556, -0.46396049857139...
def get _ current _ speed ( cls ) - > int : # if is _ boosted is false, boosted _ text _ speed will be multiplied by zero return max ( cls. default _ text _ speed, cls. boosted _ text _ speed * cls. is _ boosted )
[ 0.7178502678871155, 0.21766017377376556, 0.4571498930454254, 1.4444884061813354, 0.31161215901374817, -0.10522636771202087, 0.14715276658535004, 0.26798951625823975, -0.8546227812767029, 0.23596353828907013, -0.20718179643154144, 0.3369138538837433, -1.372273564338684, 0.8736087679862976, ...
def parse ( self ) - > bool :...
[ -0.06992906332015991, 0.2416776865720749, 0.46777814626693726, 0.7280880808830261, 0.10925092548131943, 0.5563961267471313, -0.42714017629623413, 0.7476741671562195, -0.05602356046438217, -1.1571449041366577, -0.6322464346885681, -0.8395619988441467, -1.2292463779449463, -0.606745421886444...
def create _ layers _ from _ path ( path, separator = " : : " ) : names = path. split ( separator ) parent = none for name in names : if parent : name = parent + separator + name if not rs. islayer ( name ) : rs. addlayer ( name ) parent = name
[ 0.22815653681755066, -0.24422363936901093, 0.6119918823242188, 0.4608828127384186, -0.24714964628219604, 0.811221182346344, -0.294832706451416, -0.8402968049049377, -0.16375842690467834, 0.2709970474243164, -0.660312294960022, -1.272426724433899, -0.27745071053504944, 0.21006563305854797, ...
def count _ lines _ to _ next _ cell ( cell _ end _ marker, next _ cell _ start, total, explicit _ eoc ) : if cell _ end _ marker < total : lines _ to _ next _ cell = next _ cell _ start - cell _ end _ marker if explicit _ eoc : lines _ to _ next _ cell - = 1 if next _ cell _ start > = total : lines _ to _ next _ cell ...
[ -0.0731259286403656, -0.6240561604499817, 0.6035545468330383, 0.11906639486551285, -0.013509523123502731, -0.053774647414684296, 0.6546089053153992, 0.38913923501968384, -0.4334215521812439, 0.7512667775154114, 0.14521166682243347, -0.37151899933815, 1.1176587343215942, -0.3459031581878662...
def reshape _ sensor _ data ( input _ df ) : def sensor _ value _ to _ table ( sensor _ row, table ) : " " " write a sensor value to the reshaped table. " " " table. at [ sensor _ row ['timestamp'], sensor _ row ['sensors _ id'] ] = sensor _ row ['value'] # prepare the reshaped table output _ df = pd. dataframe ( index...
[ 0.012849610298871994, 0.4078713655471802, 0.47434160113334656, 0.12410619109869003, -0.09063433855772018, -0.3751585781574249, 0.08500698953866959, -0.10866925865411758, 0.5359601378440857, 0.024925559759140015, 0.2696322798728943, 0.3646830916404724, 0.5032206773757935, -0.585837602615356...
def export ( self, format, * * kwargs ) : return self. dataset. export ( format, * * kwargs )
[ -0.48444992303848267, -0.46720123291015625, 0.11075636744499207, 0.3695071339607239, -0.5702402591705322, -0.45794999599456787, -1.17111074924469, -0.3967951536178589, 0.530987024307251, -0.7582750916481018, 0.21177677810192108, 0.7825642228126526, -0.4312417209148407, 0.519889771938324, ...
def publish _ article _ button ( self ) : btn = qpushbutton ( ) btn. seticon ( qicon ( os. path. normpath ( _ _ file _ _ +'/.. /.. / img / figshare _ upload. png') ) ) press _ button ( self. app, btn ) btn. settooltip ('publish selected articles') btn. settooltipduration ( 1000 ) btn. pressed. connect ( self. on _ publ...
[ 0.34498485922813416, 0.30620986223220825, 0.4492424428462982, -0.12398622184991837, -0.10155143588781357, 0.12666717171669006, 0.9521481394767761, 0.667934000492096, -0.21356281638145447, 0.8303713798522949, -0.44320887327194214, 0.19737865030765533, -0.04827946424484253, -0.31087350845336...
def location ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " location " )
[ 0.2630404829978943, -0.17830292880535126, 0.37246960401535034, 0.20486153662204742, 0.8732432723045349, 1.3687993288040161, 0.8558409810066223, 0.3022008240222931, 0.9287503361701965, -0.11664490401744843, 0.4480445086956024, 0.4761384427547455, 0.3354620933532715, -1.3883886337280273, -...
def do _ adult _ search ( self, doadult ) : self. doadult = doadult
[ -0.8297663927078247, -0.13113261759281158, 0.6274776458740234, -0.41544458270072937, 0.0936267152428627, 0.7953549027442932, 0.17241302132606506, -1.2424567937850952, -0.11043326556682587, -0.3547825217247009, -0.4949638545513153, 0.7897432446479797, 1.0907855033874512, 0.6736631989479065,...
def add _ structured _ log _ method ( logger, name ) : method = getattr ( logger, name ) def with _ method ( message, * args, * * kw ) : method ( message, * args, extra = {'with': kw } ) setattr ( logger,'{ } _ with '. format ( name ), with _ method )
[ -0.08510211110115051, -0.4306381940841675, 0.9124515056610107, -1.179602026939392, -1.2465592622756958, -1.1075778007507324, -0.74503093957901, -0.513674795627594, -0.25076231360435486, -0.11876513063907623, -0.3623659014701843, 0.20388972759246826, 0.7089406847953796, 0.9665306806564331, ...
def make _ topos _ df ( site _ name : str ) : # date range to process mjd0 : int = 48000 mjd1 : int = 63000 timeid _ 0 : int = mjd0 * 1440 timeid _ 1 : int = mjd1 * 1440 # array of timeid and ts ( in form of mjds ) time _ id = np. arange ( timeid _ 0, timeid _ 1 + 1, dtype = np. int64 ) # convert array of time _ ids in...
[ -0.03651724010705948, 0.6961137056350708, 0.7057688236236572, -0.5592933893203735, -0.8591145873069763, -0.027200888842344284, 0.2687230706214905, -0.44060030579566956, 0.6867707371711731, 0.1593402624130249, 0.051965683698654175, -0.2727788984775543, 0.8947890996932983, -0.204308107495307...
def sample _ user ( email ='test @ recipeapi. com ', password ='somethingrandom') : return get _ user _ model ( ). objects. create _ user ( email = email, password = password )
[ 0.4390909969806671, 0.22852115333080292, 0.36075732111930847, 0.2784941792488098, -0.23440022766590118, 0.312755286693573, -0.5367289781570435, 0.2832636535167694, 0.32315507531166077, -0.19040369987487793, -1.1669865846633911, 0.06986062228679657, 0.06102922931313515, -1.0693700313568115,...