text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def create _ packet _ out ( self, dpid, port _ num, port _ addr ) : eth = self. _ create _ discovery _ packet ( dpid, port _ num, port _ addr, self. _ ttl ) po = of. ofp _ packet _ out ( action = of. ofp _ action _ output ( port = port _ num ) ) po. data = eth. pack ( ) return po. pack ( ) | [
0.08636263012886047,
0.512884795665741,
0.5593364834785461,
-0.7526960968971252,
-0.2340877652168274,
-0.8614850044250488,
-0.5735989212989807,
-0.46873679757118225,
0.36142224073410034,
-0.5802483558654785,
0.5249176025390625,
-0.009534739889204502,
0.10262571275234222,
-0.665645658969879... |
def _ _ del _ _ ( self ) : self. driver. quit ( ) if not self. incognito : self. _ store _ session _ info ( ) self. db _ conn. commit ( ) self. db _ conn. close ( ) self. text _ to _ speech ( " shutting down instagram bot " ) if not self. incognito : self. text _ to _ speech ( " bot has been powered off, goodbye { } ".... | [
-0.14079667627811432,
-0.6145311594009399,
0.6955201029777527,
0.5297398567199707,
0.035093627870082855,
0.5191603899002075,
-0.14548160135746002,
0.2932358682155609,
0.43871375918388367,
0.15388354659080505,
0.48177075386047363,
-0.11253667622804642,
-0.9744254946708679,
0.098577864468097... |
def tokenize _ message ( msg ) : while msg : assert msg [ 0 ] & 0xfe = = sync length = msg [ 1 ] yield msg [ : 4 + length ] msg = msg [ 4 + length : ] | [
0.37093332409858704,
0.5965742468833923,
0.5050087571144104,
-0.605906069278717,
0.023875819519162178,
-1.4029107093811035,
-0.35120320320129395,
-0.9667345881462097,
-0.4328039586544037,
-0.7341339588165283,
-0.1147434413433075,
0.3957253694534302,
-1.0865806341171265,
0.27762725949287415... |
def checkpoint ( self ) : return self. _ checkpoint | [
0.49448326230049133,
-0.29630082845687866,
0.39106664061546326,
0.8468523025512695,
0.20858784019947052,
1.114200472831726,
1.225136160850525,
-0.014307629317045212,
0.34440410137176514,
-0.7309514880180359,
0.8738327026367188,
-0.3381698727607727,
-0.6843599081039429,
-1.0264455080032349,... |
def _ create _ gan _ loss ( self, loss _ func ) : def gan _ loss _ func ( output, target ) : return loss _ func ( output, torch. tensor ( [ target ] ). expand _ as ( output ). to ( output. device ) ) return gan _ loss _ func | [
-0.8805673122406006,
-0.3463704288005829,
0.19686377048492432,
0.36564376950263977,
-0.6081754565238953,
-0.38754773139953613,
0.37664589285850525,
-0.5163453221321106,
-0.00849820300936699,
-0.2534389793872833,
0.540189802646637,
0.4299992322921753,
1.4516496658325195,
-0.7556853890419006... |
def _ pack _ data ( payment : list [ str ] ) - > tuple [ dict [ str, any ], str ] : p _ type ='' payment = _ sanatize _ data ( payment ) res = {'name': payment [ 0 ],'iban': payment [ 1 ],'bic': payment [ 2 ],'description': payment [ 4 ] } # decide if credit or debit if int ( payment [ 3 ] ) < 0 : p _ type ='credit'res... | [
-0.5235350131988525,
0.2697543203830719,
0.7060301899909973,
-0.8737208843231201,
-0.3462476134300232,
0.20537470281124115,
-1.373721718788147,
-0.4305129945278168,
-0.28498440980911255,
0.8801369667053223,
-0.2781725823879242,
-0.2606809735298157,
-0.5054751634597778,
0.3674638271331787,
... |
def test _ replicate _ s3 _ to _ sf ( self ) : # 1. run tap first time - singer should be triggered assertions. assert _ run _ tap _ success ( self. tap _ id, self. target _ id, ['singer'] ) self. assert _ columns _ exist ( ) # 2. run tap second time - singer should be triggered assertions. assert _ run _ tap _ success... | [
-0.49504852294921875,
0.15308669209480286,
0.5263339281082153,
0.23865720629692078,
1.0663254261016846,
0.5101606249809265,
0.26649007201194763,
0.34208300709724426,
0.7559159398078918,
-0.8057612776756287,
-0.9452264904975891,
-0.0035413182340562344,
0.7746497392654419,
-0.446853756904602... |
def main ( path _ segs, path _ out, nb _ workers ) : if os. path. dirname ( path _ segs ) = = path _ out : raise runtimeerror ('the output dir has to be different then the input object segmentation') list _ imgs = glob. glob ( path _ segs ) logging. info ('found % i images ', len ( list _ imgs ) ) if not os. path. exis... | [
0.1023874506354332,
-0.07198097556829453,
0.6383693218231201,
0.45238161087036133,
0.5199146866798401,
-0.19007320702075958,
0.8772696256637573,
0.14001162350177765,
-0.04375693202018738,
1.0032895803451538,
0.3290349245071411,
0.052889544516801834,
0.70215904712677,
-0.010153327137231827,... |
def transparamstohommatrix ( q, t ) : n = q. size ( 0 ) r = quaterniontorotmatrix ( q ) # [ v, 3, 3 ] rt = torch. cat ( [ r, t. unsqueeze ( - 1 ) ], dim = 2 ) # [ v, 3, 4 ] hom _ aug = torch. cat ( [ torch. zeros ( [ n, 1, 3 ] ). double ( ), torch. ones ( [ n, 1, 1 ] ). double ( ) ], dim = 2 ). to ( rt. device ) rthom ... | [
0.4196029305458069,
-0.2605922818183899,
0.5399604439735413,
-0.41243061423301697,
0.2508096396923065,
0.32122665643692017,
0.04410712420940399,
-0.6940257549285889,
0.2350989282131195,
0.9090718626976013,
-0.6421498656272888,
0.40325409173965454,
0.17178434133529663,
-0.9167972207069397,
... |
def flush _ node _ stack ( cls ) : cls. created _ nodes _ stack = [ ] | [
-0.5773433446884155,
1.1193982362747192,
0.03648974001407623,
-0.0013803406618535519,
0.9131661057472229,
0.5176602005958557,
1.163114070892334,
-1.1522159576416016,
-0.8276809453964233,
0.593127965927124,
-0.6707080602645874,
1.526347279548645,
0.2968086004257202,
0.7066209316253662,
-0... |
def push _ row ( row, left = true ) : row = row [ : ] if left else row [ : : - 1 ] new _ row = [ item for item in row if item ] for i in range ( len ( new _ row ) - 1 ) : if new _ row [ i ] and new _ row [ i ] = = new _ row [ i + 1 ] : new _ row [ i ], new _ row [ i + 1 : ] = new _ row [ i ] * 2, new _ row [ i + 2 : ] ... | [
-0.0409284308552742,
1.2513256072998047,
0.9265252947807312,
0.6478862762451172,
-0.3474748730659485,
-0.1012001782655716,
-0.6104284524917603,
-0.28284379839897156,
0.7261871695518494,
1.2941011190414429,
-0.012332653626799583,
-0.23774847388267517,
-0.5259039998054504,
0.8069218397140503... |
def extract _ branch _ addr ( self, baddr : int ) - > tuple [ int, bool ] : self. seek ( baddr ) ppc = read _ uint32 ( self ) conditional = ( ppc > > 24 ) & 0xff < 0x48 if conditional is true : if ( ppc & 0x8000 ) : offset = ( ppc & 0xfffd ) - 0x10000 else : offset = ppc & 0xfffd else : if ( ppc & 0x2000000 ) : offset ... | [
0.030965980142354965,
-0.1479833871126175,
0.9952613711357117,
-0.5255820751190186,
-0.8606942892074585,
0.2957104742527008,
-0.24472230672836304,
0.2830444574356079,
0.7724342346191406,
0.05378715693950653,
-0.21409976482391357,
1.0041983127593994,
-1.1599371433258057,
0.12212657183408737... |
def shade ( self, percent, id = none ) : fg, bg, style = decode _ ansi ( self. _ ansi ) if fg is not none : fg = rgb _ shade ( fg, percent ) if bg is not none : bg = rgb _ shade ( bg, percent ) if not id : * previous _ shade, id = self. id. split ('shaded') if len ( previous _ shade ) : try : p, * _ = previous _ shade ... | [
0.5767912268638611,
-0.19641372561454773,
0.6965068578720093,
0.1628093719482422,
-0.840492844581604,
0.2327256202697754,
-0.5936088562011719,
-0.5109168887138367,
0.2943219542503357,
-0.5276932120323181,
-0.011606003157794476,
-0.008944351226091385,
-0.4972344934940338,
-0.453631937503814... |
def get _ csv _ header ( userpoolid = none ) : pass | [
-0.5321251749992371,
-0.34776771068573,
0.13213728368282318,
1.3251183032989502,
-0.4621058702468872,
-0.19040551781654358,
0.01876150071620941,
-0.3139667510986328,
0.016914740204811096,
-0.14004376530647278,
-0.3573727011680603,
1.7132418155670166,
-0.6006451845169067,
-1.042646646499633... |
def run ( self ) : bpl _ transactions = client ( networkconfig. get _ peer ( ) ). api ( " transactions " ) networkinterface. use ( networkconfig. get _ config _ identifier ( ) ) secret _ passphrase = getpass ( prompt = " enter secret passphrase : " ) if input ( " confirm ( y / n ) : " ). lower ( ) not in [ " y ", " yes... | [
0.37550097703933716,
0.9679169058799744,
0.7024495601654053,
0.2676002085208893,
0.6695360541343689,
0.05469607934355736,
0.43108806014060974,
-0.23666150867938995,
-0.109943687915802,
0.15994764864444733,
-1.2010966539382935,
0.3829113245010376,
-0.5966455340385437,
-0.4200700521469116,
... |
def test _ notemodel ( self ) : # create note about person note _ person = notemodel. objects. create ( * * self. data ) # take all objects of notemodel all _ note = notemodel. objects. all ( ) self. assertequal ( len ( all _ note ), 13 ) # take note about person only _ note = all _ note [ 12 ] self. assertequal ( only... | [
-0.6167048215866089,
-0.32668179273605347,
0.6822685599327087,
0.8219531774520874,
1.3303369283676147,
0.8679807186126709,
0.42480891942977905,
0.1388128697872162,
0.4784832000732422,
-0.32294589281082153,
-0.5370475649833679,
-0.01921091228723526,
0.19560953974723816,
-0.11230570077896118... |
async def async _ close _ cover ( self, * * kwargs : any ) - > none : await self. aircon ( { self. ac _ key : { " zones " : { self. zone _ key : { " state " : advantage _ air _ state _ close } } } } ) | [
-0.44178318977355957,
-0.16682223975658417,
0.6391976475715637,
0.49869465827941895,
-0.5503124594688416,
1.048025369644165,
0.39643028378486633,
0.19303715229034424,
0.5011877417564392,
0.4157838225364685,
0.1382722556591034,
0.1956484168767929,
-0.1685691773891449,
0.058301132172346115,
... |
def drawcard ( self, card : card, position : tuple, visible : bool, top : bool ) : if visible : if card is none : return # par securite pour eviter le nullpointerexception if top : if card. definition. cost < = self. hero _ top. mana : self. window. blit ( self. card _ ready _ attack _ minion, position ) else : if card... | [
0.00319680105894804,
-0.24449212849140167,
1.1176749467849731,
-0.7408537268638611,
0.12394203990697861,
0.287834107875824,
-0.5359882712364197,
0.5969892740249634,
0.44059938192367554,
0.5276358127593994,
0.18970274925231934,
0.7976714372634888,
0.10373575240373611,
-0.04935385286808014,
... |
def store ( ) : query = db. product links = [ ] if auth. user is not none : links. append ( dict ( header ='buy ', body = lambda row : a ('', _ class ='fa fa - shopping - cart ', _ href = url ('default ','create _ order ', args = [ row. id ], user _ signature = true ) ) ) ) db. product. id. readable = false grid = sqlf... | [
-0.38714295625686646,
0.7540449500083923,
0.6071417331695557,
0.032171253114938736,
0.15279464423656464,
-0.5479212403297424,
-0.14807343482971191,
-0.5656108260154724,
0.14137178659439087,
-0.3763919770717621,
-0.6190180778503418,
-0.10492251813411713,
0.34398508071899414,
0.2807120680809... |
def _ check _ param _ device ( param, old _ param _ device ) : # meet the first parameter if old _ param _ device is none : old _ param _ device = param. get _ device ( ) if param. is _ cuda else - 1 else : warn = false if param. is _ cuda : # check if in same gpu warn = ( param. get _ device ( )! = old _ param _ devic... | [
-0.33715447783470154,
-0.01648949645459652,
0.9014198184013367,
0.8641372919082642,
0.20427724719047546,
0.2571926414966583,
0.17920906841754913,
-0.4206492006778717,
-0.3496566712856293,
0.795590341091156,
1.125171422958374,
1.4756128787994385,
-0.5904099941253662,
0.7000503540039062,
0... |
def is _ insert ( line ) : return line. startswith ('insert into') or false | [
-0.18628163635730743,
0.11532941460609436,
0.4490768313407898,
0.6242066621780396,
0.738309383392334,
-0.1500067114830017,
-0.14354951679706573,
0.32666996121406555,
-0.6257325410842896,
0.38883185386657715,
-0.06957963854074478,
-0.33984971046447754,
-1.0336251258850098,
-0.40894484519958... |
def test _ escape _ path _ section _ legacy _ spelling ( self ) : from yamlpath. enums. pathseperators import pathseperators assert r " a \ \ b \. c \ ( \ ) \ [ \ ] \ ^ \ $ \ % \ \'\ " " = = escape _ path _ section ( " a \ \ b. c ( ) [ ] ^ $ %'\ " ", pathseperators. dot ) | [
0.0008354408200830221,
-0.6641298532485962,
0.45452558994293213,
-0.4710094928741455,
-0.2876131534576416,
0.27161335945129395,
0.3305623233318329,
-0.08595134317874908,
-0.1268526315689087,
0.7320067286491394,
-0.2741621434688568,
-0.4199475944042206,
0.2507878839969635,
0.869209349155426... |
def from _ proto ( msg ) : return experimentconfigbuilder ( ). from _ proto ( msg ). build ( ) | [
-0.05330279842019081,
0.3221275508403778,
0.09424476325511932,
0.2044425904750824,
-0.6086959838867188,
0.12789908051490784,
0.3233416974544525,
1.164474368095398,
-0.2571447491645813,
-0.3821413218975067,
0.2738457918167114,
-0.4783165752887726,
-0.9462175965309143,
0.09286410361528397,
... |
def test _ atomic _ hex _ binary _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 2. xsd ", instance ... | [
-0.04388341307640076,
-0.42312008142471313,
0.4063760042190552,
1.1813455820083618,
-0.33529701828956604,
0.30255430936813354,
-0.782762348651886,
0.20690572261810303,
-0.45641377568244934,
0.15416906774044037,
-0.7322043776512146,
-0.1492069959640503,
0.45758897066116333,
0.79304528236389... |
def test _ scale _ node _ and _ capacity ( self ) : expected _ worker _ count = 12 osds _ per _ node = 3 try : # gather existing deviceset, osd and node count in setup existing _ ocs _ worker _ list = get _ worker _ nodes ( ) existing _ deviceset _ count = storage _ cluster. get _ deviceset _ count ( ) osd _ replicatio... | [
-0.2680608928203583,
0.2609860897064209,
0.6652822494506836,
-0.27484744787216187,
0.9197889566421509,
0.6794834136962891,
0.2324041873216629,
-0.37356117367744446,
-0.2415759563446045,
0.27421584725379944,
0.401544451713562,
0.0623597651720047,
0.34199321269989014,
-0.008206939324736595,
... |
def dut _ worker _ finished ( self, dut _ worker ) : self. _ logger. logoutput ('{ } finished. '. format ( dut _ worker ) ) with self. _ workers _ lock : self. _ active _ workers. remove ( dut _ worker ) self. _ finished _ workers. append ( dut _ worker ) | [
-0.41516318917274475,
-0.4723775386810303,
0.49255773425102234,
-0.1970808506011963,
-0.2806466817855835,
0.5124537348747253,
-0.08348769694566727,
-0.48375916481018066,
-0.4707367718219757,
0.9748165607452393,
-2.59269118309021,
0.6792466640472412,
0.23043984174728394,
-0.1367730647325515... |
def begin _ deploy _ environment _ action ( self, project _ name : str, environment _ name : str, body : json, user _ id : str = " me ", *, content _ type : str = " application / json ", * * kwargs : any ) - > lropoller [ none ] : | [
-0.4693838059902191,
-0.5776289701461792,
0.6339806914329529,
0.10203336179256439,
0.0715857669711113,
0.662898063659668,
0.1822143793106079,
-0.7198553681373596,
-0.15802286565303802,
1.301724910736084,
-0.24916775524616241,
1.5989646911621094,
-0.17640531063079834,
0.6909140944480896,
... |
def test _ error _ if _ na _ in _ split _ col ( df ) : data = df. copy ( ) data. loc [ 15, " var _ 3 " ] = np. nan transformer = drophighpsifeatures ( split _ col = " var _ 3 " ) with pytest. raises ( valueerror ) : transformer. fit ( data ) | [
0.19831523299217224,
1.0402863025665283,
0.39751729369163513,
0.6912897825241089,
1.0286028385162354,
-0.37811943888664246,
0.6975330710411072,
0.6083840727806091,
-0.18825691938400269,
0.20787017047405243,
-0.8986291289329529,
0.5166779160499573,
0.10227564722299576,
-0.08509815484285355,... |
def interactive _ help ( mode ='interactive mode') : logger. info ('' ) logger. info ('{ markup } { mode } { markup } '. format ( markup ='= = = = ', mode = mode ) ) logger. info ('' ) logger. info ('follow the prompts to complete the % s ', mode ) logger. info ('if specific actions are required ( e. g. just install ca... | [
0.7207663655281067,
-1.0299396514892578,
0.9033917784690857,
0.5563846230506897,
0.21894440054893494,
0.4549306333065033,
0.5074455738067627,
0.2350749671459198,
-0.6247076988220215,
0.5354269742965698,
0.032966498285532,
-0.10028266906738281,
-0.3323579728603363,
-0.5140157341957092,
1.... |
def _ _ init _ _ ( self, api _ key = none, base _ url ='http : / / localhost : 8080 ', # base _ url ='https : / / broad - bitstore - api - dev. appspot. com ', api ='bitstore ', version ='v1 ', verbose = false, ) : endpoints. client. _ _ init _ _ ( self, api _ key = api _ key, base _ url = base _ url, api = api, versio... | [
-0.08433171361684799,
-0.3346165120601654,
0.29065659642219543,
0.3361336290836334,
0.20629124343395233,
-0.0550541877746582,
-0.1749192476272583,
-0.07625094801187515,
0.561526894569397,
-0.06831389665603638,
-0.23313692212104797,
0.7095389366149902,
-0.546886682510376,
0.1348973661661148... |
def validate _ access _ token _ request ( self, request ) : self. _ check _ transport _ security ( request ) self. _ check _ mandatory _ parameters ( request ) if not request. resource _ owner _ key : raise errors. invalidrequesterror ( description ='missing resource owner.') if not self. request _ validator. check _ r... | [
-0.49873077869415283,
-0.47384870052337646,
0.8983181118965149,
0.2940525412559509,
-0.2927265763282776,
0.32289397716522217,
-0.19361037015914917,
-0.3750174045562744,
-0.4194868206977844,
-0.38582825660705566,
0.17666587233543396,
0.8467180132865906,
0.3160422444343567,
0.371711134910583... |
def load _ science _ metadata ( self, sci _ metadata _ bytes, native _ identifier _ sid, record _ date ) : try : system _ metadata = _ generate _ system _ metadata ( sci _ metadata _ bytes, native _ identifier _ sid, record _ date, self. sysmeta _ settings _ dict ) except exception, e : logging. error ('failed to gener... | [
-0.42283663153648376,
0.6535031199455261,
0.7059355974197388,
-0.46655958890914917,
0.8403234481811523,
1.0634522438049316,
-1.1112293004989624,
-0.6227378845214844,
0.23803894221782684,
0.18471619486808777,
-1.0847970247268677,
0.2521292269229889,
-1.311510443687439,
-0.6815645694732666,
... |
def free _ values ( self, values = none ) : free _ pars = self. free _ pars ( ) if values is not none : if len ( values )! = len ( free _ pars ) : self. error ( " number of values! = number of free parameters " ) return none tied _ pars = self. list _ of _ pars ( " tied " ) untied _ pars = self. list _ of _ pars ( " un... | [
-0.18034151196479797,
-0.2573797404766083,
0.7006436586380005,
-0.7396887540817261,
0.011470072902739048,
0.7540717124938965,
-0.21036624908447266,
-0.6600744724273682,
-0.4646899700164795,
-0.28980961441993713,
-0.001696515828371048,
0.40403425693511963,
-1.0041401386260986,
1.25982308387... |
def handle _ command _ line ( argument _ parser ) : # retrieve args args = argument _ parser. parse _ args ( ) # h5 file and file exists # if not os. path. exists ( args. file ) or not ". h5 " in args. file : # # print error message and exits # sys. exit ( " must input file that exists and is in. h5 file format. " ) # ... | [
-0.2757408916950226,
-1.2542999982833862,
0.868857741355896,
0.5814724564552307,
0.12467141449451447,
0.9921953678131104,
0.9164646863937378,
-0.12927702069282532,
-0.47065281867980957,
0.04361838847398758,
0.3605932593345642,
-0.6960363984107971,
-0.5008419156074524,
0.5829609632492065,
... |
def zoom ( event ) : x, y = event. x, event. y tranp2a = ax. transaxes. inverted ( ). transform # display to axes trana2d = ax. translimits. inverted ( ). transform # ax to data transcla2d = ax. transscale. inverted ( ). transform # data to scale scale = [ base _ scale, 1 / base _ scale ] [ event. button = = " up " ] x... | [
0.052224621176719666,
-0.28393933176994324,
0.9451088309288025,
-0.41634607315063477,
-1.0626561641693115,
0.37248513102531433,
0.03675071895122528,
-0.22766011953353882,
0.09385239332914352,
0.04965506121516228,
-0.4535754919052124,
0.9903596043586731,
1.0479652881622314,
-0.8735393881797... |
def get _ legal _ actions ( self, brick ) : legal _ actions = [ ] # for each rotation for rot in range ( 0, 4 ) : max _ offset = len ( self. board [ 0 ] ) - self. lengths [ brick ] [ rot % 2 ] for offset in range ( 0, max _ offset + 1 ) : legal _ actions. append ( ( rot, offset ) ) return legal _ actions | [
-0.1605469137430191,
-0.31093311309814453,
0.5060072541236877,
0.048098839819431305,
-0.5039623379707336,
0.3668353259563446,
0.8930277228355408,
0.4053189158439636,
0.2503993809223175,
0.45591118931770325,
-0.9322059154510498,
0.012642568908631802,
-1.0960158109664917,
0.2435094267129898,... |
def checksum ( upc ) : if type ( upc ) is not str : # check type of input raise typeerror ( " invalid input " ) # raise typeerror if not string if len ( upc )! = 12 : # check length of string raise valueerror ( " incorrect length " ) # raise valueerror if not 12 digits = list ( upc ) # convert string to array odd _ res... | [
-0.03666573762893677,
0.030044501647353172,
1.040665626525879,
-0.5522205829620361,
0.5299618244171143,
0.5998473167419434,
0.5270627737045288,
0.10721897333860397,
1.141644835472107,
0.2022821605205536,
-0.7025858759880066,
-0.1578672230243683,
-1.265171766281128,
0.06619083881378174,
0... |
def buildindex1 ( self, docs, docids ) : # with open ( r " d : \ pycharmprojects \ nlp \ code \ assign1 \ lisp. pkl ", " rb " ) as fp : # unpickling # lisp1 = pickle. load ( fp ) try : if self. baseline : raise ioerror with open ( os. path. join ( self. root _ folder, " index _ df1. pkl " ), " rb " ) as fp : # unpickli... | [
0.03466203063726425,
-0.4754714071750641,
0.5320711135864258,
0.05965130403637886,
0.28701141476631165,
0.1285630762577057,
0.7166116237640381,
1.0089606046676636,
-0.5659075379371643,
0.43482357263565063,
-0.04866345599293709,
-0.1687159240245819,
-0.43149954080581665,
-0.354208767414093,... |
def teardown ( self ) : # self. clean ( ) super ( ). teardown ( ) | [
0.4900279641151428,
-0.7983545660972595,
0.39020857214927673,
-0.001042368821799755,
0.16717949509620667,
1.006925344467163,
1.4623533487319946,
-0.063245989382267,
0.6140958666801453,
-0.3012606203556061,
-0.021821385249495506,
0.20190434157848358,
-0.5454933643341064,
0.6350531578063965,... |
def dist ( a, b ) : # individual distances # continuous variables age = abs ( a. age - b. age ) / age _ range education = abs ( a. educationnum - b. educationnum ) / education _ range hoursperweek = abs ( a. hoursperweek - b. hoursperweek ) / hpw _ range netcapital = abs ( a. netcapital - b. netcapital ) / capital _ ra... | [
-0.25505250692367554,
-0.7395519614219666,
0.8577514886856079,
-0.32908520102500916,
-0.479912668466568,
1.0426325798034668,
0.5091361403465271,
0.2523314356803894,
-0.1996295005083084,
-0.0534011647105217,
0.08119800686836243,
0.7730512022972107,
0.05380406603217125,
0.2157137244939804,
... |
def project ( net0, im0, fm0, allowed _ transitions ) : [ net, im1, fm1 ] = deepcopy ( [ net0, im0, fm0 ] ) # keep only visible transitions that have a label in allowed _ transitions trans _ list = list ( net. transitions ) for trans in trans _ list : if trans. label is not none and trans. name not in allowed _ transit... | [
0.024088002741336823,
0.17613457143306732,
0.8306192755699158,
0.05147061496973038,
-0.5151442289352417,
0.3463175594806671,
0.28292420506477356,
-0.058967869728803635,
0.2514352798461914,
-0.13587135076522827,
0.2811780273914337,
-0.10008168965578079,
-0.2163647711277008,
0.05052489042282... |
def registerplayer ( name ) : # sanitize the name provided by the user bleach. clean ( name, strip = true ) # connect to the database conn = connect ( ) curs = conn. cursor ( ) # enter the player name into the players table curs. execute ( " insert into players ( name ) values ( % s ) ", ( name, ) ) # enter the player ... | [
-0.5279036164283752,
0.6529383063316345,
1.0312246084213257,
-0.07407935708761215,
0.18930065631866455,
-0.09392738342285156,
0.04492849111557007,
0.0984853133559227,
-0.29904741048812866,
0.6280153393745422,
-0.9290438890457153,
-0.8397179245948792,
-1.0283292531967163,
-0.282088041305542... |
def _ _ init _ _ ( self, date = 0, duration = 0. 0, intervals = [ ], repeats = 1, repeatdelay = 0. 0, log = false, logfile = '. / distribution. log ', verbose = - 1 ) : self. log = log self. logfile = logfile self. verbose = verbose # delays if intervals = = [ ] : self. delay = [ self. short, self. medium, self. short,... | [
0.6449919939041138,
0.20154671370983124,
0.8489168882369995,
0.6134809851646423,
-0.42287155985832214,
0.4771173298358917,
0.25121960043907166,
0.5668919682502747,
0.5179689526557922,
-0.2125178575515747,
0.35747137665748596,
-0.0323503278195858,
0.20431390404701233,
-0.2898612320423126,
... |
def setvalidmove ( self, value ) : self. isvalidmove = value | [
0.29350191354751587,
-0.2398432046175003,
0.6625897288322449,
0.7811818718910217,
-0.18680672347545624,
0.8852117657661438,
-0.02922123298048973,
0.13512776792049408,
-0.12440883368253708,
-0.05669409781694412,
-0.528202474117279,
-0.11926356703042984,
-0.6275256276130676,
-0.0019560598302... |
def _ _ init _ _ ( self, id = 1 ) : self. id = id self. individuals = [ ] # init individuals num _ individuals = random. randrange ( 50, 100 ) for i in range ( num _ individuals ) : self. individuals. append ( individual ( self. id ) ) # individual phenotype is the same as the id of the population # this way the phenot... | [
-0.8798352479934692,
-0.2906114161014557,
0.3695041835308075,
0.7469714879989624,
-0.034628644585609436,
0.8431089520454407,
-0.2630637586116791,
1.4626669883728027,
0.7830588221549988,
0.01152969803661108,
-1.463088870048523,
0.5591510534286499,
-1.0394619703292847,
0.3772105872631073,
... |
def score _ test _ latency ( self, test ) : # collect statistics from publisher tasklets for tasklet in test. tasklet _ info. subscriber : tasklet _ id = tasklet. instance _ name. rsplit ('- ', 1 ) [ 1 ] query _ iter = yield from self. _ dts. query _ read ( xpath = " / perf - statistics [ instance - id ='{ }'] ". forma... | [
0.24251967668533325,
-0.36852410435676575,
0.4429408311843872,
-0.7926913499832153,
0.185668483376503,
-0.019339174032211304,
0.30265453457832336,
-0.48359042406082153,
-0.05574756860733032,
0.7777673602104187,
0.49579918384552,
-0.44910702109336853,
-0.22157305479049683,
0.628823339939117... |
def _ _ init _ _ ( self, filename ) : self. filename = filename | [
0.11826265603303909,
-1.5957456827163696,
0.23377005755901337,
-0.06134575977921486,
-0.1321440488100052,
0.5526052117347717,
0.4745011627674103,
1.5898686647415161,
-0.9936408996582031,
-0.43030446767807007,
-0.17527061700820923,
0.14393794536590576,
0.6573803424835205,
0.7379544377326965... |
def listdomainmappings ( self ) : request = self. messages. appengineappsdomainmappingslistrequest ( parent = self. _ formatapp ( ) ) response = self. client. apps _ domainmappings. list ( request ) return response. domainmappings | [
-1.3074854612350464,
0.4884277284145355,
0.27885201573371887,
0.6594750285148621,
-0.06563522666692734,
0.28338131308555603,
-0.5861703753471375,
0.13826660811901093,
1.1191550493240356,
-0.6307490468025208,
-0.23184402287006378,
0.6558792591094971,
0.49097543954849243,
1.0004061460494995,... |
def remove _ layer ( self, layer : int ) - > block : if layer = = 0 and len ( self. extra _ blocks ) > 0 : new _ base = self. _ extra _ blocks [ 0 ] return block ( namespace = new _ base. namespace, base _ name = new _ base. base _ name, properties = new _ base. properties, extra _ blocks = [ * self. _ extra _ blocks [... | [
-0.17520475387573242,
0.12384047359228134,
0.6148272752761841,
0.19168391823768616,
-1.1286814212799072,
-0.01328837126493454,
0.003935753367841244,
0.2407643347978592,
0.13681910932064056,
-0.32132378220558167,
-0.7749539017677307,
0.38541677594184875,
-1.021242618560791,
0.14710606634616... |
def get _ go _ terms ( gi _ go _ dict ) : all _ go = list ( ) for go _ terms in gi _ go _ dict. values ( ) : all _ go + = go _ terms return all _ go | [
0.1835547238588333,
0.375143438577652,
0.360139399766922,
-0.7326408624649048,
0.9710619449615479,
0.5816447734832764,
-1.3125308752059937,
0.8395740985870361,
-0.5801719427108765,
1.385038137435913,
-0.03924822062253952,
0.35688355565071106,
-0.2343747764825821,
0.5306108593940735,
0.17... |
def unsorted _ segment _ sqrt _ n ( data, segment _ ids, num _ segments, name = none ) : with ops. name _ scope ( name, " unsortedsegmentsqrtn " ) : data = ops. convert _ to _ tensor ( data ) segment _ ids = ops. convert _ to _ tensor ( segment _ ids ) n = _ unsorted _ segment _ n ( data, segment _ ids, num _ segments ... | [
-0.4146413207054138,
-0.5962482690811157,
0.36898958683013916,
-0.7735753655433655,
0.24477322399616241,
-0.8167600035667419,
-0.2966066896915436,
-0.8541578054428101,
1.0955219268798828,
-0.17090165615081787,
-0.822125256061554,
-0.5112943649291992,
0.12832559645175934,
-0.627974927425384... |
def _ debias _ adam _ estimate ( self, estimate, beta, t _ step ) : return estimate / ( 1 - tf. pow ( beta, t _ step ) ) | [
0.12270776182413101,
-0.5760517716407776,
0.2749955654144287,
0.485217809677124,
0.3522919714450836,
-0.39692094922065735,
-0.6659435033798218,
0.042548567056655884,
-2.0392675399780273,
0.6880115866661072,
0.14619490504264832,
0.11462297290563583,
-0.24367175996303558,
0.820440411567688,
... |
def get ( self ) : self. remote. host = self. le _ host. text ( ) self. remote. user = self. le _ uname. text ( ) self. remote. port = self. le _ port. value ( ) self. remote. password = self. le _ pass. text ( ) self. remote. key _ file = self. le _ pass. text ( ) return self. remote | [
-0.5329355001449585,
-1.122029185295105,
0.7372923493385315,
-1.346168875694275,
-0.28057554364204407,
0.6497043967247009,
-1.7832553386688232,
0.06747467070817947,
-1.0644763708114624,
-0.6921824812889099,
-1.1926910877227783,
0.5161882042884827,
-0.8168542981147766,
-0.9021733999252319,
... |
def quadratic _ check3 ( test _ coeff, intervals, tol = 1e - 12 ) : if test _ coeff. ndim > 2 : return [ true ] * len ( intervals ) padding = [ ( 0, max ( 0, 3 - i ) ) for i in test _ coeff. shape ] test _ coeff = np. pad ( test _ coeff. copy ( ), padding, mode ='constant') # check using | constant + c1x + c2y + c3xy |... | [
0.5283706784248352,
-0.4476667642593384,
1.0457416772842407,
0.19268330931663513,
-0.11881719529628754,
0.6558635234832764,
0.016916533932089806,
-0.8266621828079224,
0.1870025247335434,
0.5517224669456482,
-0.6802570223808289,
-0.41840851306915283,
-0.41229698061943054,
-0.830816566944122... |
def load _ dog _ data ( apps, schema _ editor ) : dog = apps. get _ model ('core ','dog') dogbreed = apps. get _ model ('core ','dogbreed') datapath = os. path. join ( settings. base _ dir,'initial _ data') datafile = os. path. join ( datapath,'dogs. csv') dog. objects. all ( ). delete ( ) with open ( datafile ) as fil... | [
-0.32660478353500366,
0.029595913365483284,
0.6490828990936279,
-0.5403352379798889,
0.3164612054824829,
0.8792603015899658,
-0.7461597919464111,
0.2196039855480194,
-0.9726940393447876,
0.22375380992889404,
-1.2938318252563477,
0.574995756149292,
0.019873121753335,
0.2846069931983948,
-... |
def serialize ( self, input _ ) : return self. parse ( input _, serialize = true ) | [
-0.5086970329284668,
-0.05455431342124939,
0.35133543610572815,
-0.23858092725276947,
-0.6081357598304749,
-0.09155704826116562,
-0.11828149110078812,
-0.31085115671157837,
0.17655257880687714,
-1.1975598335266113,
-1.2805427312850952,
-0.13034945726394653,
-0.5630819201469421,
-0.23523141... |
def auth ( ) : oauth _ url = " https : / / oauth. vk. com / authorize " oauth _ params = { " client _ id " : 7238600, " display " : " page ", " response _ type " : " token ", " scope " : " status, friends " } print ( "? ". join ( ( oauth _ url, urlencode ( oauth _ params ) ) ) ) | [
0.414337158203125,
-0.09119922667741776,
0.484353244304657,
0.6627944707870483,
0.42650124430656433,
-0.21038536727428436,
-0.3938830494880676,
0.4469537138938904,
0.14018838107585907,
0.7818431258201599,
0.45499104261398315,
0.9354273676872253,
0.12199191749095917,
0.0751531720161438,
-... |
def _ add _ all _ processes ( self ) : self. _ processtree = self. jsonreportdata ['behavior'] ['processtree'] self. _ processes = self. jsonreportdata ['behavior'] ['processes'] self. rootpid = " pid { 0 } ". format ( self. _ processtree [ 0 ] ['pid'] ) for process in self. _ processtree : self. _ add _ processes _ re... | [
0.5099443197250366,
-0.39462944865226746,
0.6386128067970276,
-0.30377984046936035,
1.4327400922775269,
-0.12543264031410217,
-0.7589647173881531,
-0.13259899616241455,
0.011374573223292828,
-0.5378637909889221,
0.4266647398471832,
0.6675708293914795,
-0.46933695673942566,
0.56184393167495... |
def is _ sending _ to ( self, peer ) : return bool ( self. transmission _ events _ by _ peer [ peer ] ) | [
-1.1020078659057617,
0.5578429698944092,
0.6557756662368774,
-0.0061334287747740746,
0.02256651036441326,
-0.9363414645195007,
-0.28383058309555054,
-0.35340678691864014,
-0.14272144436836243,
0.6510454416275024,
-0.5315365791320801,
-0.06686978042125702,
-0.5916404724121094,
0.33745437860... |
def test _ atomic _ base64 _ binary _ enumeration _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 1. xsd ", i... | [
-0.5720233917236328,
-0.5290943384170532,
0.6036221981048584,
1.1056255102157593,
0.19824634492397308,
0.2683126926422119,
0.4037431478500366,
-0.07168333977460861,
0.40338388085365295,
0.6937547922134399,
-0.2146492302417755,
-0.00016268047329504043,
-0.5105894804000854,
-0.02132927253842... |
def test _ delete _ entry ( self ) : delete _ url ='/ admin / delete /'data = {'entry _ id': self. text _ entry. id,'csrfmiddlewaretoken': self. get _ csrf _ token ( ), } response = self. client. post ( delete _ url, data ) self. assertredirects ( response,'/ admin / login /? next ='+ delete _ url, target _ status _ co... | [
0.4883422255516052,
0.48548921942710876,
0.38841357827186584,
0.3343846797943115,
0.9735462069511414,
0.44121405482292175,
-0.2967182695865631,
0.25197726488113403,
1.041445016860962,
-0.5692235231399536,
0.056126147508621216,
0.34293749928474426,
-0.20387102663516998,
0.7170501947402954,
... |
def test _ valid _ show _ profile _ page _ title _ with _ client ( self, client, proto _ user ) : url = reverse ( " show _ profile _ page ", args = [ f " { proto _ user. pk } ", ], ) response = client. get ( url ) assert " mon profil " in str ( response. content ) | [
1.0547020435333252,
0.31870320439338684,
0.4525255858898163,
0.2988693416118622,
-0.3758038878440857,
1.0409824848175049,
-0.6056937575340271,
-0.9637553095817566,
0.08536799252033234,
0.2979820966720581,
0.07030016928911209,
0.07052960246801376,
-0.09528366476297379,
-0.23728115856647491,... |
def handle _ search ( self, title, year, category, watch ) : # only search when at least on field is provided if title or category or watch or year : # check for valid year, category and title title _ check = self. handle _ input ( title, is _ title = true, blank = true ) year _ check = self. handle _ input ( year, is ... | [
-0.33226704597473145,
0.5320063829421997,
0.8255118131637573,
0.5568417906761169,
0.134687140583992,
0.7254058718681335,
0.2230786681175232,
-0.08961544930934906,
-0.7253863215446472,
0.16961659491062164,
0.05657178536057472,
-0.2595374584197998,
-0.38999950885772705,
1.131704330444336,
... |
def fit ( self, stable _ antecedents : list [ str ], flexible _ antecedents : list [ str ], consequent : str, conf : float, supp : float, desired _ classes : list [ str ] = none, desired _ changes : list [ list ] = none, is _ nan : bool = false, is _ reduction : bool = true, min _ stable _ antecedents : int = 1, min _ ... | [
0.05244853347539902,
0.10629414767026901,
0.7272821664810181,
0.7117949724197388,
0.21626819670200348,
0.40160393714904785,
-0.15695935487747192,
1.262316107749939,
-0.6888104677200317,
-0.2931671738624573,
0.028155766427516937,
0.953524112701416,
0.146100252866745,
0.4330216944217682,
0... |
def buffered _ bounded _ lemire _ uint16 ( bitgen, rng, bcnt, buf ) : # note : ` rng ` should not be 0xffff. when this happens ` rng _ excl ` becomes # zero. rng _ excl = uint16 ( rng ) + uint16 ( 1 ) assert ( rng! = 0xffff ) # generate a scaled random number. n, bcnt, buf = buffered _ uint16 ( bitgen, bcnt, buf ) m = ... | [
1.083538293838501,
0.15218782424926758,
0.6525522470474243,
-1.1809587478637695,
-0.042761556804180145,
0.4814091920852661,
-0.7206626534461975,
-0.07979824393987656,
0.32008448243141174,
-0.7268152832984924,
-0.9329690337181091,
0.05917995423078537,
-0.23846517503261566,
0.053589910268783... |
def test _ tasks _ count ( self ) : # add two persons and two notes in the'haiti'repository. db. put ( [ person ( key _ name ='haiti : test. google. com / person. 123 ', repo ='haiti ', author _ name ='_ test1 _ author _ name ', entry _ date = servertestsbase. test _ datetime, full _ name ='_ test1 _ full _ name ', sex... | [
0.12568916380405426,
0.6027531623840332,
0.7604759335517883,
0.05477631092071533,
0.6185643672943115,
0.7978833913803101,
0.880240261554718,
0.1727146953344345,
-1.0491334199905396,
-0.18264880776405334,
-0.77967768907547,
0.12744773924350739,
0.13315069675445557,
0.5578374862670898,
0.4... |
def save ( self, filename ) : with open ( filename, " w ", encoding = " utf - 8 " ) as file : for serie in self. words : for mot in self. words [ serie ] : file. write ( mot + " \ n " ) | [
-0.17515352368354797,
-0.8632737994194031,
0.44702842831611633,
-0.3821621835231781,
0.299640029668808,
0.3492108881473541,
-0.533595860004425,
0.6261075735092163,
-0.8660484552383423,
0.7061615586280823,
-0.3001784682273865,
0.39011886715888977,
-0.31289058923721313,
0.7343605160713196,
... |
def _ _ call _ _ ( self, x, y = none, eval _ gradient = false ) : if self. length _ scale = = 1. 0 : self. length _ scale = np. sqrt ( x. shape [ 1 ] ) return super ( ). _ _ call _ _ ( x, y, eval _ gradient ) | [
0.19845573604106903,
0.5904966592788696,
0.4816679358482361,
-0.34768837690353394,
-0.06455466151237488,
0.47156912088394165,
-1.0723940134048462,
-0.3527125120162964,
0.20034043490886688,
0.9214242100715637,
-0.16167834401130676,
0.24699503183364868,
-0.18547062575817108,
1.26093757152557... |
async def resetjson ( self, ctx ) : await ctx. message. delete ( ) con = random. randint ( 1000, 9999 ) text = f'* * bot owner * * \ n ` ` ` reset json files ` ` ` \ nconfirm number : \ n ` { str ( con ) } `'embed = discord. embed ( description = text, colour = 0x32a8a6 ) msg = await ctx. send ( embed = embed ) user = ... | [
-0.21496360003948212,
0.11590991169214249,
0.8069277405738831,
0.3467540442943573,
0.05897502601146698,
0.09445272386074066,
0.7471463084220886,
-0.4925162196159363,
-0.7897313833236694,
0.6596096158027649,
-1.022156834602356,
1.3128936290740967,
-0.9268590807914734,
0.03269720450043678,
... |
def reverse ( x : int ) - > int : if x is none : return if x = = 0 : return 0 if abs ( x ) > = 0x7fffffff : return 0 is _ neg = false reverse = 0 if x < 0 : is _ neg = true x = x * ( - 1 ) string = str ( x ) power = 10 * * ( len ( string ) - 1 ) while ( x! = 0 ) : rest = x % 10 x = x / / 10 tmp = rest * power reverse +... | [
-0.33137109875679016,
0.7641140818595886,
0.9513601064682007,
-0.5108716487884521,
-0.3680340349674225,
-0.19014348089694977,
-0.7757402062416077,
0.7389614582061768,
-0.08139341324567795,
0.15931501984596252,
-0.20137929916381836,
0.1253286600112915,
-0.43347877264022827,
-0.5866172313690... |
def prepare _ mini _ batch ( mini _ batch, vocab2index, cuda = false ) : indexed = [ ] for sentence _ words in mini _ batch. sentence _ words : # sentence _ words is list of sentences in the document # we convert each document to sequence at a time indices, lengths = convert _ to _ indices ( sentence _ words, vocab2ind... | [
0.00018420688866171986,
-0.6722776889801025,
0.4926712214946747,
-0.5610305070877075,
-0.32679203152656555,
-0.7618526220321655,
-0.1041656881570816,
0.7766870260238647,
0.714986264705658,
0.8009787797927856,
-0.7092937231063843,
0.23895631730556488,
0.17761078476905823,
-0.245671182870864... |
def _ _ init _ _ ( self, gen _ psw : bool = false ) : ( self. _ psw, psw _ file ) = create _ psw _ file ( ) if gen _ psw else ( none, none ) if psw _ file is not none : assert ( self. _ psw is not none ) print ( " autogenerated password saved to'{ }'". format ( psw _ file ) ) while self. _ psw is none : candidate = get... | [
-0.07996422797441483,
-0.6041497588157654,
0.5642610192298889,
1.1331050395965576,
0.29608601331710815,
0.37966376543045044,
0.20896388590335846,
0.2727377414703369,
-1.0444293022155762,
-0.7491273880004883,
-0.38093090057373047,
-0.06113879382610321,
0.047631632536649704,
1.05649292469024... |
def enable ( self ) : self. enabled = true | [
0.9995793700218201,
-0.31141355633735657,
0.27318862080574036,
0.28438302874565125,
1.0068691968917847,
1.2036266326904297,
0.25265705585479736,
2.246955633163452,
0.08237224072217941,
-1.0289556980133057,
-1.2407264709472656,
0.5922999978065491,
-1.080498456954956,
0.05725153908133507,
... |
def os ( self, os ) : self. _ os = os | [
-0.9053220152854919,
0.07926641404628754,
-0.07965834438800812,
0.03335414081811905,
-0.6083906888961792,
0.5465015769004822,
0.22455832362174988,
0.5231003761291504,
-0.3753243088722229,
-0.8926524519920349,
-1.152467966079712,
-0.19846653938293457,
0.5574172139167786,
0.12921996414661407... |
def run ( ) : # check if map is loaded maploaded = checkformap ( ) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # placing n... | [
-0.16118000447750092,
-0.5728061199188232,
1.1730842590332031,
0.548038899898529,
-0.16618727147579193,
0.3633209764957428,
0.6015633344650269,
-0.08883625268936157,
-0.7204592227935791,
0.0022268444299697876,
-0.7627347111701965,
-0.29518741369247437,
-0.23717080056667328,
0.7587397694587... |
def get ( self ) : # step [ 1 ] : get the resource description var, self. res. status _ int = self. jungler. channel _ get _ single _ resource ( self. path _ url ) # step [ 2 ] : adapt the response to the required accept - type if self. res. status _ int = = return _ code ['ok'] : self. res = self. res _ adapter. conve... | [
-0.27566057443618774,
-0.1254938691854477,
0.4686322808265686,
-0.2597542405128479,
0.549071192741394,
-0.4680670201778412,
-0.30931219458580017,
0.15386074781417847,
-0.5302231907844543,
-0.24237050116062164,
0.9308527708053589,
0.9496324062347412,
-1.0821301937103271,
0.03273852169513702... |
def get _ possible _ price ( mk _ data, side ) : mk _ depth = mk _ data. order _ book ( limit = 5 ) bids = list ( float ( x [ 0 ] ) for x in mk _ depth ['bids'] ) asks = list ( float ( x [ 0 ] ) for x in mk _ depth ['asks'] ) try : lim = ( side = ='buy') * ( bids [ 0 ] + bids [ 1 ] ) / 2 + ( side = ='sell') * ( asks [ ... | [
-0.3608052432537079,
0.25451162457466125,
0.7010632157325745,
0.10624795407056808,
-0.7137253880500793,
-0.14733926951885223,
-0.2626292109489441,
0.08546765893697739,
-0.7736132144927979,
0.7119702100753784,
0.10202991962432861,
0.027709202840924263,
-0.4574759900569916,
0.386766701936721... |
def ask _ number ( question, low, high ) : response = " 9999 " while true : if response. isdigit ( ) : if int ( response ) in range ( low, high ) : break else : print ( " you must enter a number " ) response = input ( question ) return int ( response ) | [
0.6225875020027161,
-0.47703126072883606,
0.45197147130966187,
0.14718571305274963,
0.10691307485103607,
0.5393784046173096,
0.28323978185653687,
-0.9553227424621582,
0.5031128525733948,
-1.392945647239685,
0.2977690100669861,
0.4807661771774292,
-0.8551511764526367,
-0.470141738653183,
... |
def kp ( ks, t, tm, scale = 0. 01 ) : from numpy import where, asarray, copy # make a copy of solid thermal conductivity matrix kp = np. copy ( ks ) # for all values where the temperature is less than the melting point # scale the thermal conductivity values kp [ where ( t < tm ) ] * = scale # return modified matrix re... | [
0.7224340438842773,
-0.6688661575317383,
0.4975931942462921,
0.016460392624139786,
-0.8499549627304077,
0.15503989160060883,
-1.1338576078414917,
-0.21356627345085144,
-0.42884257435798645,
1.9726650714874268,
0.2140687108039856,
-0.8849665522575378,
-0.23406490683555603,
-0.25283250212669... |
def get _ superseded _ drawings ( self ) : return self. superseded _ drawings | [
0.5356513857841492,
0.2745770812034607,
0.4847324788570404,
-0.45407986640930176,
-0.7649825811386108,
0.6218104958534241,
-0.1418595016002655,
0.29886090755462646,
0.34438905119895935,
-1.5727035999298096,
-1.716275691986084,
0.5817471146583557,
0.3056586980819702,
0.7765012979507446,
-... |
def is _ empty ( self ) : return true | [
-0.6780605316162109,
-0.4727257192134857,
0.49454355239868164,
0.5921878218650818,
1.0106512308120728,
1.255993366241455,
-0.36918845772743225,
0.16050966084003448,
-0.3077341318130493,
0.21098379790782928,
-0.9937378168106079,
0.3363474905490875,
-0.6771132349967957,
-0.2740439474582672,
... |
def _ load _ token _ database ( db, domain : str ) - > tokens. database : if db is none : return tokens. database ( ) if isinstance ( db, tokens. database ) : return db if isinstance ( db, elf _ reader. elf ) : return tokens. database. from _ strings ( _ read _ strings _ from _ elf ( db, domain ) ) # if it's a str, it ... | [
-0.016364675015211105,
-0.0028294690418988466,
0.4714299142360687,
-0.27455905079841614,
-0.5749653577804565,
-0.26943331956863403,
-0.2680762708187103,
0.1386340707540512,
0.6172745823860168,
-0.9654182195663452,
0.5729026198387146,
0.7701627612113953,
-0.5585977435112,
0.0057136490941047... |
def test _ atomic _ base64 _ binary _ length _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 2. xsd ", instance = "... | [
0.2740975022315979,
-0.7041606307029724,
0.36681774258613586,
1.0719325542449951,
0.2585172653198242,
-0.14622855186462402,
0.2916230261325836,
-0.24114444851875305,
-0.49015551805496216,
0.17519865930080414,
-0.5729845762252808,
0.0467500165104866,
-0.33097755908966064,
0.6421703696250916... |
def genmainform ( src _ filename = none, dst _ filename = none, src _ class _ name = none, parent = none, rewrite = false ) : log _ func. info ( u'generate python gui module... start') if not os. path. exists ( src _ filename ) : log _ func. warning ( u'glade project file. file < % s > not found'% src _ filename ) retu... | [
-0.9373605847358704,
-0.22474858164787292,
0.9601739645004272,
-0.278674840927124,
-0.37926802039146423,
0.7053138017654419,
0.4958483576774597,
0.07524771988391876,
-0.332210510969162,
0.09021899849176407,
-0.5451342463493347,
0.06244911625981331,
0.0656527504324913,
0.1301632970571518,
... |
def with _ predict _ key ( self, key ) : b = self. _ copy ( ) b. predict _ key = key return b | [
-1.0908222198486328,
-0.0008632479002699256,
0.4149892330169678,
0.8493481874465942,
-1.4935302734375,
0.397451788187027,
-0.4734301269054413,
-0.1175532341003418,
-0.26749861240386963,
0.47372257709503174,
-0.4302850663661957,
0.9504779577255249,
-0.007927647791802883,
0.5366413593292236,... |
def get _ global _ link _ axis ( self, link : str, q : arraytype, axis : union [ str, arraytype ] ) - > casadiarraytype : return self. get _ link _ axis ( link, q, axis, self. get _ root _ link ( ) ) | [
0.18558499217033386,
-0.35398581624031067,
0.3049924373626709,
0.743364155292511,
0.03085535578429699,
0.4295154809951782,
0.1590312421321869,
-0.5161283612251282,
0.32276323437690735,
-0.597358226776123,
0.19594049453735352,
2.8107361793518066,
-1.1821448802947998,
-0.19473524391651154,
... |
def test _ list _ integer _ min _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 3. xsd ", instance = " nistdata / list / ... | [
-0.34920528531074524,
-0.3948654532432556,
0.4769165515899658,
0.6851463913917542,
-0.500514030456543,
0.5171670913696289,
-0.8905924558639526,
0.19067420065402985,
1.5474326610565186,
0.8553865551948547,
-0.843381404876709,
0.23090271651744843,
-0.5270705223083496,
0.286811888217926,
-0... |
def link _ simple _ iter ( coords _ iter, search _ range, * * kwargs ) : # ensure that coords _ iter is iterable coords _ iter = iter ( coords _ iter ) # interpret the first element of the iterable val = next ( coords _ iter ) if isinstance ( val, np. ndarray ) : # the iterable was not enumerated, so enumerate the rema... | [
-0.4804494082927704,
-0.5280808806419373,
0.5411380529403687,
-0.38574060797691345,
0.2551301419734955,
0.39328786730766296,
-0.25418585538864136,
-0.5309497714042664,
-0.14515087008476257,
-0.5773884654045105,
0.34677812457084656,
-0.0017561388667672873,
-0.4534650444984436,
-0.0405145548... |
def deploy _ veristand ( workspace, system _ definition _ file _ path ) : path = system _ definition _ file _ path workspace. connecttosystem ( path, true, 60000 ) | [
0.16831542551517487,
-0.7725494503974915,
0.22822925448417664,
0.2356703132390976,
0.6074234843254089,
0.279942125082016,
0.14947105944156647,
0.20170371234416962,
-0.04609799385070801,
1.1868987083435059,
-0.5327621102333069,
0.6654738783836365,
-0.4298391044139862,
0.6649318337440491,
... |
def entity _ id ( self ) : return'sensor. { } _ { } '. format ( self. _ name, self. var _ id ) | [
1.051879644393921,
-2.016427993774414,
0.44117316603660583,
-0.857967734336853,
0.8412213325500488,
0.8633211851119995,
-0.10082265734672546,
-0.531476616859436,
0.6973962783813477,
-0.07353459298610687,
0.5104338526725769,
0.9310474395751953,
0.34101369976997375,
1.1040961742401123,
0.2... |
def lalo2xy ( lat : np. float32, lon : np. float32, data _ snwe : list, latlon _ step : list, rounding _ method : optional [ str ] ='floor') \ - > tuple [ np. int16, np. int16 ] : # np. floor works better with points and raster - need to check why # but with two rasters sometimes one pixel is missing or is redundant if... | [
-0.12764833867549896,
-0.7011990547180176,
0.531261682510376,
-0.8460996747016907,
-0.08035632967948914,
0.16668300330638885,
-0.08700209856033325,
0.1256510615348816,
-0.46883833408355713,
-0.29102909564971924,
0.10056954622268677,
-0.4137739837169647,
0.3000163435935974,
1.08275508880615... |
async def load ( self, ctx : context, *, json _ code : str ) - > none : embed _ parser = await jsonembedparser. from _ str ( ctx, json _ code ) if embed _ parser is not false : self. embeds [ ctx. author ] = embed _ parser. make _ embed ( ) await ctx. send ( " embed updated accordingly to provided json " ) else : await... | [
-0.62678462266922,
-0.1164136677980423,
0.7096961140632629,
0.0578407421708107,
-0.31806671619415283,
0.7175257802009583,
-0.4469738304615021,
-0.1674363613128662,
0.8213527202606201,
-0.01252193283289671,
-1.1973659992218018,
0.5356126427650452,
-0.7661322355270386,
-0.1336921751499176,
... |
def update _ posts _ on _ tick ( self ) : for market in self. map. markets : if market. product < market. product _ capacity : market. product = min ( market. product + market. replenishment, market. product _ capacity ) for storage in self. map. storages : if storage. armor < storage. armor _ capacity : storage. armor... | [
0.675877034664154,
-0.8052530288696289,
0.4857880175113678,
0.3531099259853363,
0.4693560302257538,
0.7558584809303284,
0.3300636410713196,
-1.1501978635787964,
-0.45365673303604126,
0.2333565354347229,
-0.3046969771385193,
-0.5090891122817993,
-0.13576318323612213,
0.057080190628767014,
... |
def test _ do _ calculate _ user _ defined ( test _ dao ) : dut = dtmsimilaritem ( test _ dao ) dut. do _ select _ all ( revision _ id = 1 ) _ node = dut. do _ select ( 1 ) _ node. method _ id = 2 _ node. change _ factor _ 1 = 0. 75 _ node. change _ factor _ 2 = 1. 2 _ node. change _ factor _ 3 = 0. 95 _ node. change _... | [
0.03400362282991409,
0.6688063144683838,
0.5807073712348938,
1.1779663562774658,
0.6911011338233948,
-0.09800129383802414,
0.5278801918029785,
-0.38112595677375793,
-0.5009333491325378,
-0.15031619369983673,
-0.8663701415061951,
-0.33320221304893494,
0.13978397846221924,
0.1829209625720977... |
def compare ( labels, thresh ) : spatial = [ ] clustering = [ ] test, train = 4000, 16000 for site in coordinates : x, y = parsecoordinates ( site ) # clustering actual, predicted = linearregressiononcluster ( labels, x, y, train, test ) clustering. append ( r2 _ score ( actual, predicted ) ) # spatial actual, predicte... | [
0.6896333694458008,
-0.15371237695217133,
0.6233956217765808,
-0.30631139874458313,
0.8802869915962219,
0.7775754928588867,
0.6709267497062683,
-0.5488823652267456,
-0.06940549612045288,
0.05739126726984978,
0.05738014727830887,
1.269891381263733,
-0.026375502347946167,
-0.6148291826248169... |
def maskcrossterms ( self ) : for i, ( bpm, bfld ) in enumerate ( self. bpm ) : for j, ( cor, cfld ) in enumerate ( self. trim ) : # b [ 1 ] = ['x'|'y'], similar for t [ 1 ] if bfld! = cfld : self. _ mask [ i, j ] = 1 | [
-0.18058684468269348,
-0.5106582045555115,
0.3409595787525177,
-0.1703079640865326,
0.5564379692077637,
0.1489565074443817,
1.0993913412094116,
-0.18505540490150452,
-0.422364205121994,
0.6988011598587036,
-0.3748309016227722,
-0.04163479059934616,
-1.0158005952835083,
0.13072790205478668,... |
def apply ( self, iq _ in, first _ bin = 0, last _ bin = none ) : if last _ bin is none : last _ bin = len ( iq _ in ) start, end = first _ bin + self. offset, last _ bin + self. offset q _ calc = self. resolution. q _ calc iq _ calc = np. empty _ like ( q _ calc ) if start > 0 : iq _ calc [ : start ] = self. model. ev... | [
-0.0047952644526958466,
-0.2853930592536926,
0.6888484954833984,
-0.24437806010246277,
0.09116904437541962,
0.2525511682033539,
-0.08154456317424774,
0.6656052470207214,
0.558987021446228,
-0.6974130868911743,
-0.09139855206012726,
0.37066638469696045,
-0.9500206708908081,
-0.1591732650995... |
def position _ in _ large _ switch _ to _ interval ( self, large _ switch, paths _ on _ side, side ) : # todo : collapsed cusp for ( typ, num, interval _ total ) in \ self. accumulate _ intersections _ at _ large _ switch ( large _ switch, side ) : if all ( interval _ total > = paths ) : return typ, num, interval _ tot... | [
-0.6745390892028809,
-0.04070424661040306,
0.46714162826538086,
-0.23623543977737427,
-0.12186713516712189,
0.16423684358596802,
0.5456501245498657,
-0.04452833905816078,
-0.43617239594459534,
0.5119810700416565,
-0.7528570890426636,
-1.2842988967895508,
-0.10358098149299622,
-0.0356254056... |
def address ( self ) : if self. _ server is not none : return self. _ server. sockets [ 0 ]. getsockname ( ) | [
-0.16031135618686676,
-0.29160794615745544,
0.9871389865875244,
0.028673609718680382,
0.06667441129684448,
0.5938453674316406,
0.680968165397644,
0.017610223963856697,
0.8499137759208679,
-0.4348963797092438,
0.7146682739257812,
1.3481651544570923,
-1.1043674945831299,
-0.03977914899587631... |
def test _ view _ show _ profile _ page _ uses _ correct _ template ( self, client, proto _ user ) : response = client. get ( reverse ( " show _ profile _ page ", args = [ f " { proto _ user. pk } ", ], ) ) assert response. status _ code = = 200 asserttemplateused ( response, " registration / user _ profile. html " ) | [
0.6035166382789612,
0.7734506726264954,
0.4105216860771179,
0.6041030287742615,
0.0807875394821167,
0.08849707245826721,
0.8006028532981873,
0.39843276143074036,
0.1896241307258606,
0.2713169753551483,
-0.017489785328507423,
-0.3741936981678009,
0.6368439197540283,
0.6087459325790405,
0.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.