text
stringlengths
25
2.19k
embedding
listlengths
768
768
async def request _ status ( self, status _ link ) : request = self. _ client. get ( status _ link ) # arm requires to re - inject'x - ms - client - request - id'while polling if " request _ id " not in self. _ operation _ config : self. _ operation _ config [ " request _ id " ] = self. _ operation. initial _ response....
[ -0.5576616525650024, -0.10632821172475815, 0.38827213644981384, 0.664324939250946, 0.3988296687602997, -0.6674901247024536, -0.2827015519142151, -0.041773051023483276, 0.04403508082032204, -0.38312235474586487, 0.0819179117679596, 0.9530155062675476, -0.010532833635807037, -0.2557372450828...
def redraw ( self ) : self. arrow. undraw ( ) pt2 = point ( 10 * cos ( self. angle ), 10 * sin ( self. angle ) ) self. arrow = line ( point ( 0, 0 ), pt2 ). draw ( self. win ) self. arrow. setwidth ( 20 )
[ -0.31816181540489197, -0.560300886631012, 0.377365380525589, -0.47504669427871704, 0.5302608013153076, 0.5689943432807922, 0.14194625616073608, 0.5422736406326294, 0.6196304559707642, -0.5346261858940125, -0.052655648440122604, 1.4550856351852417, 0.41724109649658203, -0.1656269133090973, ...
def inside _ dir ( dirpath ) : old _ path = os. getcwd ( ) try : os. chdir ( str ( dirpath ) ) yield finally : os. chdir ( old _ path )
[ -0.3739067018032074, 0.23028366267681122, 0.6887280941009521, -0.37903347611427307, -1.0221052169799805, 0.1865561455488205, 0.6901514530181885, -0.8582937717437744, 0.16625052690505981, 0.051473844796419144, 0.44408324360847473, 0.6866087913513184, -0.5394405722618103, -0.2071764022111892...
def test _ atomic _ language _ enumeration _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 1. xsd ", instance = " nistdata /...
[ -0.4301846921443939, -0.8778101801872253, 0.4740191400051117, 0.5533013939857483, -0.15100796520709991, -0.090296171605587, 0.44090673327445984, 0.3170386254787445, 0.6464827656745911, 1.0503993034362793, 0.040491387248039246, -0.20985780656337738, 0.21865512430667877, 0.036073487251996994...
def save _ or _ update ( update _ type, app _ dic, xml _ dic, bin _ an _ dic ) - > none : try : values = {'file _ name': app _ dic ['app _ name'],'app _ name': bin _ an _ dic ['bin _ name'],'publisher _ name': xml _ dic ['pub _ name'],'size': app _ dic ['size'],'md5': app _ dic ['md5'],'sha1': app _ dic ['sha1'],'sha25...
[ -0.04278600215911865, -0.5366359353065491, 0.8341437578201294, 0.8153424263000488, -0.3532601296901703, 0.55848628282547, 0.45589521527290344, 0.39171871542930603, -0.2928020656108856, 0.5593809485435486, -0.32989609241485596, -0.9920138716697693, -0.4756647050380707, 1.0222041606903076, ...
def only _ evens ( x : list [ int ] ) - > list [ int ] : y : list [ int ] = list ( ) i : int = 0 while i < len ( x ) : if x [ i ] % 2 = = 0 : y. append ( x [ i ] ) i + = 1 return y
[ -0.9939777851104736, 0.3259809911251068, 0.7318416237831116, -0.04564008116722107, -0.4775331914424896, 0.7671855092048645, -0.16803796589374542, 0.21842332184314728, 1.0262045860290527, 0.21903356909751892, -0.8641228675842285, 0.39000803232192993, -0.5262467265129089, 0.7732709646224976,...
def to _ json ( self ) : object _ = { " current " : self. current, " max " : self. max, " bots " : self. bots, " scores " : [ ], } for name, score, duration in self : object _ [ " scores " ]. append ( [ name, score, duration. total _ seconds ( ) ] ) return json. dumps ( object _ )
[ -1.314624309539795, -0.8314829468727112, 0.6819074153900146, -0.09580014646053314, 0.005253912881016731, 0.8431985974311829, -0.02737083099782467, -1.1092809438705444, -0.3684338629245758, 0.7684653401374817, -1.2396620512008667, 0.5378391146659851, 0.3428538739681244, 0.34608808159828186,...
def generateforecastmetrics ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!')
[ -1.2686353921890259, 0.37501198053359985, 0.6763465404510498, 0.666676938533783, 0.03270572051405907, 0.8294256925582886, 1.2818139791488647, -0.37379807233810425, -0.29121261835098267, 0.15946853160858154, -0.05708206817507744, 0.9676911234855652, -0.7269418835639954, 0.6216968297958374, ...
def write _ seq _ to _ file ( seq, filename ) : files = open ( filename, " w " ) files. write ( seq ) files. close ( ) return none
[ -0.7402711510658264, -1.3945343494415283, 0.13216325640678406, 0.12057565152645111, 1.1335718631744385, -0.24246437847614288, 0.3387947380542755, 1.016422986984253, -0.8243026733398438, 0.8343656659126282, -0.8538264036178589, -0.3806992173194885, -0.007338136434555054, -0.5053750276565552...
def get _ tile ( self, row, col ) : return self. _ grid [ row ] [ col ]
[ 0.7298374772071838, 0.7570281624794006, 0.2830319106578827, 0.06771659106016159, -0.022632598876953125, -0.2750123143196106, -0.3440171182155609, -0.9029966592788696, -0.8271726369857788, -0.08840063214302063, 0.662479817867279, 1.1747353076934814, -0.024417296051979065, -1.339221000671386...
def test _ withdraw _ funds _ behaviour ( ) : start _ dt = pd. timestamp ('2017 - 10 - 05 08 : 00 : 00 ', tz = pytz. utc ) earlier _ dt = pd. timestamp ('2017 - 10 - 04 08 : 00 : 00 ', tz = pytz. utc ) later _ dt = pd. timestamp ('2017 - 10 - 06 08 : 00 : 00 ', tz = pytz. utc ) even _ later _ dt = pd. timestamp ('2017 ...
[ 0.260763019323349, 0.7576872110366821, 0.8605289459228516, -0.2932450771331787, 0.7429302334785461, 0.15012814104557037, 0.46642473340034485, -0.3924880027770996, 0.06957749277353287, -0.54599928855896, -0.00029198889387771487, -0.20808018743991852, -0.19726824760437012, 0.0998111516237258...
def condiniciales ( size = 149, no _ cis = 10000 ) : setcis = [ ] # lista vacia que contendra el conjunto # de las 100 configuraciones iniciales. for i in xrange ( no _ cis ) : vectini = [ ] # lista que contendra la configuracion inicial i - esima. for j in xrange ( size ) : if rd. random ( ) > 0. 5 : vectini. append (...
[ -0.43082088232040405, 0.24664169549942017, 0.4202098250389099, 0.33604225516319275, -0.03902826085686684, -0.04365219175815582, 0.19349108636379242, 0.12777507305145264, -0.010840808041393757, 0.5935201048851013, -0.3866356909275055, -0.13332006335258484, -0.509619414806366, -0.23495614528...
def _ cleanup _ on _ exit ( self ) : # fixme, we rebind show _ all below, this prevents garbage collection of # the dialog, fix the rebind self. window. show _ all = none editprimary. _ cleanup _ on _ exit ( self )
[ 0.383725106716156, -0.7726892828941345, 0.2367371916770935, -0.18015336990356445, -0.611041784286499, 0.2101244032382965, 0.6951498985290527, 0.36878475546836853, 0.5076075196266174, -0.2909567654132843, 0.04545760154724121, 0.4711005389690399, -0.15608689188957214, 1.9385546445846558, 0...
def compute _ stellar _ spectrum ( self, t, los, omega = 0. 0, vel _ axis = none, clv = false, resolution = none, reinterpolate _ lambda = none ) : self. t = t self. clv = clv self. omega = omega # define the los self. los = np. zeros _ like ( los ) self. los [ :, 0 ] = np. rad2deg ( los [ :, 1 ] ) self. los [ :, 1 ] =...
[ 0.23215802013874054, 0.02273733541369438, 1.0674998760223389, -0.03872688114643097, -0.23839038610458374, -0.2670886516571045, -0.23972934484481812, 0.4135168194770813, 0.5544114708900452, 0.6154414415359497, 0.3965868353843689, 0.2740590274333954, 0.23478178679943085, 0.8968605995178223, ...
def serialize ( self, input _ ) : # validate input : if input _ is none and not self. _ is _ optional : raise valueerror ('message is not optional') elif input _ is none and self. _ is _ optional : return none elif not isinstance ( input _, types. simplenamespace ) : raise valueerror ('message expected types. simplenam...
[ -0.9524173736572266, 0.38608935475349426, 0.6037505865097046, 0.12069064378738403, 0.13045601546764374, -0.5137520432472229, 0.07609538733959198, -1.0601165294647217, 0.7593291997909546, -0.051693715155124664, -1.256892204284668, -0.12846025824546814, -0.8274866938591003, 1.094022393226623...
def test _ record _ rejection _ in _ published _ state ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / rejectexisting. json') as json _ file : data = json. load ( json _ file ) res = requests. put ( f'{ env. awg _ base _ url } { cve _ url } / cve - 1999 - 0003 / reject ', headers = utils. ba...
[ 0.42242780327796936, -0.3177366554737091, 0.49988478422164917, -0.3588961362838745, 0.27436554431915283, 0.7418287992477417, -0.3734293580055237, 0.8812735080718994, -0.20102570950984955, 0.8468073010444641, -0.5346660017967224, 0.6587323546409607, 0.1257079392671585, -1.0456221103668213, ...
def add _ generator ( self ) : pass
[ -1.0169787406921387, 0.04203139990568161, 0.6066551208496094, 0.3968689739704132, 0.24593350291252136, 0.802194356918335, -0.030720703303813934, 0.6801822185516357, -0.9192978739738464, -1.8571295738220215, -0.27122798562049866, -0.3729614317417145, -0.5669964551925659, 1.354461431503296, ...
def sort ( self ) : return self. _ sort
[ -0.3515847325325012, -0.09826643764972687, 0.13995175063610077, 0.16389988362789154, -0.6154918074607849, 0.7729654908180237, 0.7071523070335388, -1.3383936882019043, -0.2660219073295593, -1.3093758821487427, 0.12868152558803558, 0.5400440096855164, -0.8647372722625732, -0.4090150594711303...
def gyrtenspy ( self, poslist ) : if len ( poslist ) % 3! = 0 : raise valueerror ( " position list should divide evenly by 3 " ) gt = np. zeros ( [ 3, 3 ] ) for i in range ( 3 ) : for j in range ( 3 ) : gt [ i ] [ j ] = gyrtensxycy ( poslist, i, j, self. box [ i ], self. box [ j ] ) return gt
[ -1.426655888557434, 0.23323610424995422, 0.35929450392723083, -0.144829660654068, 0.25480005145072937, 0.06734225898981094, -0.1551593542098999, -0.11668352037668228, -0.6310206651687622, 0.7498924732208252, -0.7112587690353394, -0.6891791224479675, -0.7539061903953552, -0.5898107886314392...
def mssne _ eval _ dsm _ lds _ min _ row _ dsm _ lds _ t ( x ) : # computing the pairwise squared euclidean distances in the lds dsm _ lds = pairwise _ dist ( x = x, metric ='sqeuclidean ', tomatrix = true ) # returning return mssne _ eval _ dsm _ lds _ min _ row _ dsm _ lds _ t _ dsm ( dsm _ lds = dsm _ lds )
[ -0.556150496006012, 0.18790195882320404, 0.4830170273780823, -1.6119630336761475, -0.754031240940094, -0.621182382106781, -1.0212900638580322, 0.20077750086784363, 0.6499919295310974, -0.059898827224969864, -0.24689863622188568, 0.03423815965652466, 1.1237046718597412, 0.4716382920742035, ...
def _ list ( self, dir _ or _ prefix ) : raise notimplementederror
[ -1.4206640720367432, -0.5129498243331909, 0.41968390345573425, -0.5187960863113403, 0.27737462520599365, -0.6601284742355347, -0.6123383045196533, 0.537848949432373, 1.437595009803772, -0.14205791056156158, 0.41995275020599365, 0.36905813217163086, 1.571095585823059, 0.7007189989089966, ...
def has _ new _ update ( user ) : visit _ timestamp = pagevisittracker. get _ latest _ visit ('updates ', user ) if visit _ timestamp is none : return false return siteupdate. objects. latest ('date'). date > visit _ timestamp
[ -0.5285910367965698, 0.6439791321754456, 0.6929346323013306, 1.1621960401535034, -0.7508482336997986, 0.2756515145301819, 0.1407330185174942, -0.7359614372253418, 0.025842297822237015, 0.3400501608848572, -0.18388649821281433, -0.2281906008720398, 0.4253094494342804, 0.4453057646751404, ...
def add ( self, key, item, duration = none ) : if duration is none : # use instance - wide duration when specific duration is not provided duration = self. _ duration # is key already in cache with self. _ cache _ lock : if key in self. _ cache : # cancel job when overriding _, job = self. _ cache. get ( key ) job. can...
[ -0.3243233859539032, 0.0898778960108757, 0.6266124248504639, 0.7041779160499573, -0.5172000527381897, 0.38639968633651733, -1.218383550643921, 0.9167572259902954, -0.3150041401386261, 0.8634827136993408, -0.7549925446510315, 0.036987967789173126, -0.3548174202442169, -0.13009586930274963, ...
def contour _ detector ( self, img ) : # threshold and blur / erode hsv = cv2. cvtcolor ( img, cv2. color _ bgr2hsv ) hsv = cv2. inrange ( hsv, ( 90, 100, 0 ), ( 135, 255, 255 ) ) hsv = cv2. medianblur ( hsv, 3 ) hsv = cv2. erode ( hsv, np. ones ( ( 3, 3 ), np. uint8 ), iterations = 1 ) hsv = cv2. medianblur ( hsv, 7 )...
[ 0.5610257983207703, -0.5137031078338623, 0.8328750729560852, 0.9316198825836182, -0.07993794232606888, -0.035744890570640564, 0.12108056247234344, 0.9596977829933167, 0.9824590086936951, -0.25647464394569397, -0.1202533096075058, -0.1312127411365509, 0.3465789556503296, 0.8627575635910034,...
def write _ branch _ data ( self, file ) : # i, j, ckt, r, x, b, ratea, rateb, ratec, gi, bi, gj, bj, st, len, o1, f1,..., o4, f4 branch _ attr = [ " r ", " x ", " b ", " rate _ a ", " rate _ b ", " rate _ c " ] for branch in self. case. branches : if feq ( branch. ratio, 0. 0 ) : vals = [ getattr ( branch, a ) for a i...
[ -0.030627721920609474, -0.4136062264442444, 0.8280525803565979, -0.5008063316345215, 0.3525451123714447, 0.6373417973518372, 0.7350144386291504, -0.09431194514036179, -1.2007604837417603, -0.08365552127361298, -0.22135837376117706, 0.008290951140224934, -0.7082775235176086, 0.6368258595466...
def set _ lcd _ size ( self, columns, rows ) : self. _ write _ command ( [ lcdbackpack. lcd _ size, columns, rows ] )
[ -0.23369243741035461, 1.1330379247665405, 0.41989704966545105, -0.7676529288291931, 0.021664606407284737, 0.36737364530563354, 0.015151136554777622, 0.03534196317195892, 0.4225495755672455, -0.3899917006492615, -0.20393876731395721, 0.10359630733728409, -0.5753695964813232, -0.090925030410...
def continueregister ( self, entry, widget _ names, frame ) : accurate _ entry = true new _ entry = [ ] for widget in range ( len ( entry ) ) : current _ entry = entry [ widget _ names [ widget ] ]. get ( ) if current _ entry = = " " : accurate _ entry = false new _ entry. append ( entry [ widget _ names [ widget ] ]. ...
[ -0.08046262711286545, 0.39503198862075806, 0.7180840969085693, 0.3678528368473053, 0.024825837463140488, 0.03306271508336067, 0.7528639435768127, 0.05380053073167801, 0.2651655375957489, 0.7660790085792542, -0.5733077526092529, 0.28354066610336304, -0.838649332523346, 0.5389654636383057, ...
def test _ par _ parent _ os _ fork _ par _ child ( self ) : body = " " " if 1 : x = np. arange ( 1000000. ) y = np. arange ( 1000000. ) z = busy _ func ( x, y ) pid = os. fork ( ) if pid = = 0 : z = busy _ func ( x, y ) else : os. wait ( ) " " " runme = self. template % body cmdline = [ sys. executable,'- c ', runme ]...
[ 0.798561155796051, -0.04787997528910637, 0.7911792397499084, 0.8091048002243042, 0.3519759178161621, 0.2851176857948303, 0.7663691639900208, -0.3088681697845459, -0.4310172200202942, -0.808424711227417, -0.4988788962364197, 0.582944929599762, -0.12155716866254807, 0.8205708265304565, -0....
def switch _ frame ( self, frame _ class ) : new _ frame = frame _ class ( self ) if self. _ frame is not none : self. _ frame. destroy ( ) self. _ frame = new _ frame self. _ frame. pack ( )
[ -0.7029710412025452, 0.4362872838973999, 0.6132220029830933, 0.30202212929725647, 0.4994559586048126, -0.41300928592681885, -0.448895126581192, 0.2748278081417084, 0.848406195640564, 0.16785025596618652, -0.981130838394165, 0.724597156047821, -0.3620302081108093, 0.48082587122917175, 1.1...
def test _ add _ exe _ args ( ) : settings = runsettings ( " python " ) settings. add _ exe _ args ( " - - time 5 " ) settings. add _ exe _ args ( [ " - - add ", " - - list " ] ) result = [ " - - time ", " 5 ", " - - add ", " - - list " ] assert settings. exe _ args = = result
[ -0.6247812509536743, 0.27212968468666077, 0.6149761080741882, 0.5719503164291382, 1.2980252504348755, 0.40529656410217285, -0.45727893710136414, -0.5418860912322998, 0.007660917937755585, 0.7445957660675049, -1.1438370943069458, -0.24332210421562195, -0.7798609137535095, 0.5026015639305115...
def parse _ show ( self, response ) : self. logger. info ('starting to parse the url % s ', response. url ) # get the html into a beautifulsoup object soup = beautifulsoup ( response. text,'lxml') # find the properties in the document name = soup. find ('td ', class _ ='section _ post _ header'). span. text description...
[ -0.1439288705587387, 0.24532055854797363, 0.6687260270118713, -0.09457075595855713, -0.2280319184064865, 0.3015092611312866, -0.6679161190986633, 0.15502771735191345, -0.0766282007098198, 0.1936691850423813, 0.2351016253232956, -0.31392180919647217, 0.02559077739715576, 0.48494935035705566...
def translate _ pattern ( pattern ) : # type : ( str ) - > str i, n = 0, len ( pattern ) res ='' while i < n : c = pattern [ i ] i = i + 1 if c = ='*': # one char lookahead for " * * " if i < n and pattern [ i ] = = " * " : res = res + '. *'i = i + 1 else : res = res + r'[ ^ / \ \ ] *'elif c = = '?': res = res + '.'eli...
[ 0.029355548322200775, 0.49413058161735535, 0.9486587643623352, -0.23609782755374908, -1.1489439010620117, -0.9077016115188599, 0.17496153712272644, 0.2590232789516449, 1.09574556350708, 0.586111307144165, -0.3712303936481476, -0.023201139643788338, -0.2014225870370865, -0.5906669497489929,...
def learn ( self, state, next _ state, action, reward, done ) : # push to replay memory self. replay _ memory. push ( state, next _ state, action, reward, done ) if self. step % target _ update = = 0 and self. net _ type = ='ddqn': self. targetnet. load _ state _ dict ( self. onlinenet. state _ dict ( ) ) if self. step...
[ 0.05725600942969322, -0.3977591395378113, 0.7002376914024353, -0.30366402864456177, -0.3146229386329651, -0.4735437035560608, -0.1392999142408371, -0.25140854716300964, 0.5111870169639587, 0.1622837334871292, -0.5002709031105042, 1.2423394918441772, 0.3839901387691498, -0.382752925157547, ...
def rewire ( op, a : int, b : int, *, dom = none ) : if len ( set ( [ a, b ] ) )! = 2 : raise valueerror ('the destination indices must be distinct') dom = qubit * * ( max ( a, b ) + 1 ) if dom is none else dom if len ( dom ) < 2 : raise valueerror ('dom size expected at least 2') if op. dom! = qubit * * 2 : raise valu...
[ -0.3005952835083008, 0.7656895518302917, 1.075822114944458, 0.2939288020133972, -1.1014617681503296, -0.2577810287475586, 0.5676344037055969, 0.012266330420970917, 0.1545761227607727, 0.4836603105068207, 0.8266893625259399, 0.8174176812171936, -0.1939384490251541, -1.226815938949585, 0.1...
def ovpn _ import ( target : str ) - > optional ['nm. connection'] : for vpn _ info in nm. vpnplugininfo. list _ load ( ) : try : return vpn _ info. load _ editor _ plugin ( ). import _ ( str ( target ) ) except exception as e : continue return none
[ -0.8187754154205322, -0.9427885413169861, 0.4140491783618927, -0.030909352004528046, 0.06832420080900192, -0.45775875449180603, -0.8656092882156372, -1.2287864685058594, 0.5897216796875, 0.7814316153526306, -0.6833280324935913, 0.023807179182767868, -0.5398398637771606, -1.3274677991867065...
def test _ lz ( ) : n _ lambda = sbp. lz / sbp. lam _ z assert n _ lambda - int ( n _ lambda ) = = 0, " simulation domain is not an integer number of lambda _ z "
[ 0.5828109979629517, 0.4841465651988983, 0.2641412615776062, 0.3327603042125702, 0.525566577911377, 1.2512084245681763, -0.013454928062856197, -0.2450188547372818, 0.7771120667457581, -0.8538733124732971, -0.4315045177936554, 0.06095635145902634, -0.8466898202896118, 0.8294970989227295, 1...
def search _ novel _ in _ scraper ( self, query : str ) - > generator [ searchresult, none, none ] : raise fallbacktobrowser ( )
[ -1.816880464553833, 0.3173304796218872, 0.28603044152259827, 0.33059316873550415, -0.1329517364501953, -0.08184806257486343, -1.0269434452056885, -1.0040395259857178, -0.25819334387779236, -0.3206839859485626, 0.3731934130191803, -0.6603955626487732, 0.013246019370853901, 0.652426123619079...
def on _ status ( self, status ) : try : # if the tweet is bigger than 280 characters long tweet _ text = status. extended _ tweet. full _ text except : # if the tweet is less than 280 characters long tweet _ text = status. text if tweet _ text. startswith ( " rt " ) : # ignore retweets return p. set _ options ( p. opt...
[ 0.5222752094268799, -0.17266350984573364, 0.7000560760498047, -0.572271466255188, -0.3567008376121521, 0.2506778836250305, -0.44800233840942383, 0.15011833608150482, 0.047956470400094986, 0.3852273225784302, -0.19464366137981415, 0.22233568131923676, -0.5456380248069763, 0.694874107837677,...
def crop ( image, _ xl, _ xr, _ yl, _ yr ) : width, height = parameters. width, parameters. height return image [ _ xl : width - _ xr, _ yl : height - _ yr ]
[ -0.5332938432693481, -0.501166582107544, 0.7086479067802429, 0.15254592895507812, -0.8679355978965759, 0.06913001090288162, -0.35960572957992554, -0.7385232448577881, -0.3999849855899811, 0.7862358093261719, 0.7122452259063721, 0.6319667100906372, 0.973580539226532, -0.26822665333747864, ...
def dist ( self, mola, molb ) : smia = oemoltosmiles ( mola ) if smia not in self. smilesidx : self. update ( mola ) idxa = 0 else : idxa = self. nmols - self. smilesidx [ smia ] - 1 smib = oemoltosmiles ( molb ) if smib not in self. smilesidx : self. update ( molb ) idxb = 0 idxa + = 1 else : idxb = self. nmols - self...
[ -0.03330150246620178, -0.9536063075065613, 0.6668827533721924, -0.2939803898334503, -0.21683384478092194, -0.16742603480815887, 0.2594531774520874, -0.34141191840171814, 1.1846084594726562, 0.27003324031829834, -0.022831398993730545, 0.4515618681907654, -1.0899087190628052, -0.233801648020...
def test _ atomic _ language _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 4. xsd ", instance = " nistda...
[ -0.4829798638820648, -0.2888011932373047, 0.547052800655365, 0.30360767245292664, -0.29199615120887756, 0.09938861429691315, -0.00395683478564024, -0.01758814975619316, 0.59352046251297, 0.6449788808822632, -0.18179908394813538, -0.7773235440254211, -0.08907166123390198, -0.382236748933792...
def page _ should _ have _ element ( self, name ) : selector = self. get _ web _ element _ selector ( name ) self. page _ should _ contain _ element ( selector )
[ -0.31758755445480347, -0.2370569258928299, 0.4717482924461365, 0.5168779492378235, 0.6155754327774048, 1.0049132108688354, -0.059739984571933746, 0.27049368619918823, 0.8108377456665039, -0.368463933467865, -0.1867680847644806, -0.3619665503501892, -0.15804488956928253, 1.1188850402832031,...
def retrieve _ overpass _ json ( wgs _ polygon = none, path = none, network _ type ='all _ private ', custom _ filter = none, force _ download = false ) : if path : # check to see if file already exists json _ path = path ( path ) if json _ path. is _ file ( ) and not force _ download : with json _ path. open ( ) as f ...
[ -0.9662292003631592, -1.0222420692443848, 0.7115426063537598, -0.23141106963157654, 0.09919146448373795, -0.24348823726177216, 0.0888683870434761, -1.1820311546325684, 0.31573185324668884, 0.03368600457906723, -0.422645628452301, 0.26121729612350464, 0.1473153978586197, -0.2366586178541183...
def get _ manifest ( self ) : raw _ data = self. client. _ perform _ json ( " get ", " / projects / % s / app - manifest " % self. project _ key ) return dssappmanifest ( self. client, raw _ data )
[ 0.23167788982391357, -0.0028567698318511248, 0.16569164395332336, 0.4012720286846161, -0.5259849429130554, -0.7459141612052917, -1.2689075469970703, 0.27449455857276917, 0.64427649974823, -0.7939455509185791, 0.024204302579164505, 0.2238539606332779, -0.011293075978755951, 0.19193331897258...
def test _ api _ shared _ live _ media _ delete _ by _ video _ playlist _ instructor ( self ) : user = userfactory ( ) # a playlist where the user is an instructor, with a video playlist = playlistfactory ( ) video = videofactory ( playlist = playlist ) shared _ live _ media = sharedlivemediafactory ( video = video ) p...
[ 0.2845994234085083, -0.14544260501861572, 0.5435089468955994, 0.8141611218452454, -0.043626561760902405, 0.3546482026576996, 1.433821201324463, 0.16977593302726746, 0.9911162257194519, 0.32093748450279236, -0.6843582391738892, 0.04694313555955887, -0.6640310287475586, 0.2380945086479187, ...
def _ _ init _ _ ( self, data ) : if isinstance ( data, datacontainer ) : self. _ _ dict _ _. update ( data. _ _ dict _ _ ) else : self. _ data = odict ( ) if np. all ( [ isinstance ( k, str ) for k in data. keys ( ) ] ) : # nested pol : { antpairs } for pol in data. keys ( ) : for antpair in data [ pol ] : self. _ dat...
[ -0.11385416984558105, -0.04063865914940834, 0.7695474028587341, -0.9477961659431458, -0.6079780459403992, 0.1549256443977356, -0.31634148955345154, -0.532881498336792, 0.06764163076877594, -0.4209020137786865, 0.017191391438245773, -0.06551190465688705, 0.8901227116584778, 0.27047368884086...
def parse ( self, input _ ) : if not self. _ is _ optional and input _ is none : raise valueerror ('field is not optional') else : return input _
[ 0.35495221614837646, -0.20162266492843628, 0.46866559982299805, 0.4318719208240509, 0.11472780257463455, 0.04188910499215126, -0.35895809531211853, 0.48098206520080566, 0.6999140381813049, -0.017808524891734123, 0.6582761406898499, -0.1394227296113968, -0.5604000091552734, 0.20873168110847...
def test _ message _ delete ( self ) : message = message ( id = 0xf00f, text = " hello world ", user _ id = self. testuser. id ) db. session. add ( message ) db. session. commit ( ) with self. client as c : with c. session _ transaction ( ) as session : session [ curr _ user _ key ] = self. testuser. id response = c. p...
[ 0.5885146856307983, 0.5449803471565247, 0.4270627498626709, 0.31632715463638306, 0.9452677965164185, 0.41503027081489563, 0.08219233900308609, -0.43692392110824585, 0.4490349590778351, -0.9085224270820618, 0.1371030956506729, -0.010420989245176315, -1.0456327199935913, 0.360211580991745, ...
def indicator _ path ( inid = none, ftype ='data ', mode ='r ', must _ work = false ) : # check that the input makes sense expected _ ftypes = ['data ','meta ','edges ','headlines ','json'] if ftype not in expected _ ftypes : raise valueerror ( " ftype must be on of : " + ", ". join ( expected _ ftypes ) ) prefix ='ind...
[ -0.6476019024848938, -0.47256454825401306, 0.6031548976898193, -0.02830345742404461, -0.7294104099273682, 0.33307212591171265, 0.83054119348526, -0.08355943113565445, -0.5095417499542236, 0.19083286821842194, 1.0555832386016846, 0.3189558684825897, -0.18081343173980713, -0.0298852566629648...
def etxtdct ( fname ='e. txt') : import readsketchup txt = open ( fname,'r'). read ( ) return readsketchup. readsketchup ( txt )
[ 0.12478243559598923, 0.3169080317020416, 0.5022101998329163, -0.7559508085250854, -1.3372576236724854, 0.08083836734294891, -0.2274952530860901, 0.8510249257087708, -0.7253249883651733, 1.0568416118621826, 0.5091575384140015, -0.9993448257446289, 1.1267577409744263, -1.0875463485717773, ...
def line _ color ( self, v ='blue') : return str ( v )
[ -0.5087367296218872, -1.0499703884124756, 0.5105157494544983, -0.2744600176811218, 0.8220611810684204, 1.090938925743103, -1.1934497356414795, 0.22835874557495117, -0.4454081058502197, -0.07977428287267685, -0.3312581777572632, 0.587500274181366, -0.14925158023834229, -0.06731735169887543,...
def make _ and _ save ( pi, lambda _, wses = none, nperiods = 4, log = true, figkwargs = none, axkwargs = none ) : if wses is none : params = load _ params ( ) all _ files = ar. get _ all _ files ( params ) wses = ar. read _ output ( all _ files, kind ='ws') df = get _ df ( pi, lambda _, wses [ pi, lambda _ ], params )...
[ -0.21291740238666534, 0.01950797252357006, 0.44212719798088074, -0.9003573060035706, -0.3925838768482208, -0.07859437167644501, -0.05766091123223305, 0.43734464049339294, -0.31041833758354187, 0.24698857963085175, -0.07938916981220245, 0.7778635025024414, 0.9803701043128967, 0.244558259844...
def plot _ one _ dimensional _ function ( function _ call, uniform _ design, selected _ design, axis _ bounds = [ 0, 1, - 6. 5, 16. 5 ] ) : plt. figure ( figsize = ( 8, 7 ) ) plt. plot ( uniform _ design, function _ call. f ( uniform _ design ), label ='forrester function') plt. scatter ( selected _ design, function _ ...
[ 0.7527034282684326, 1.0333476066589355, 0.5815237760543823, -0.3266368508338928, 0.24894697964191437, 0.17585943639278412, 0.3919816017150879, 0.15145692229270935, 0.008476325310766697, -0.6276947855949402, 0.45629367232322693, 2.039053440093994, 0.3139503300189972, 0.7685691118240356, 0...
def process _ dyn _ flags ( remaining _ args, dyn _ flags, invalid _ ext _ for _ dyn _ flag ) : for f in dyn _ flags : if f in remaining _ args : loc = remaining _ args. index ( f ) if loc < len ( remaining _ args ) - 1 : if remaining _ args [ loc + 1 ]. endswith ( invalid _ ext _ for _ dyn _ flag ) : remaining _ args ...
[ -0.829849123954773, -0.0928613618016243, 0.7394362092018127, 0.27296745777130127, 0.8224811553955078, 0.13136902451515198, -0.1606922298669815, 0.19555997848510742, -0.45470407605171204, 0.34512579441070557, -0.15972702205181122, 0.3526686131954193, -1.1604083776474, 0.4316207766532898, ...
def list _ authorized _ keys ( remote _ keys = none ) : remote _ keys _ path = get _ authorized _ keys ( ) local ('cat { } '. format ( remote _ keys _ path ) )
[ -0.09551656991243362, -0.19993478059768677, 0.21404105424880981, 0.20504526793956757, -0.5935726761817932, -0.14780688285827637, -0.9446713924407959, 0.9339582920074463, -0.9123214483261108, 0.7020400762557983, -0.28838661313056946, 2.1976068019866943, 0.29366883635520935, 0.40103948116302...
def score ( self, rev _ ids ) : raise notimplementederror ( )
[ -0.8786501288414001, -0.5786946415901184, 0.5012781620025635, 0.19528229534626007, 0.7824580669403076, -0.0009235541219823062, -0.32252374291419983, 0.0750344842672348, -0.032808803021907806, 0.44886043667793274, 0.08288196474313736, 0.08163518458604813, -0.03034854307770729, -0.3780158758...
def add _ asset _ to _ bank ( char _ code, name, capital, interest ) : for asset in app. bank. assets : if asset. name = = name : abort ( 403 ) try : capital = float ( capital ) interest = float ( interest ) except exception : abort ( 404 ) new _ asset = asset ( char _ code, name, capital, interest ) app. bank. add ( n...
[ 0.1775924414396286, -0.29069778323173523, 0.5861000418663025, -0.2768407464027405, 0.9380400776863098, 0.9031178951263428, 0.2534487843513489, -1.6582170724868774, -0.3671824634075165, 0.155463308095932, 0.5021981596946716, 0.3857981562614441, -1.2363232374191284, -0.47554904222488403, 0...
def vesak _ may _ date ( self, year : int ) - > date : dt = self. lunar _ to _ gre ( year, 3, 15, leap = false ) return dt if dt. month = = 5 else self. lunar _ to _ gre ( year, 4, 15, leap = false )
[ 1.2035263776779175, 0.95877605676651, 0.430181622505188, 0.27357035875320435, -0.8776419758796692, 0.340233713388443, -0.04131944477558136, -1.4256147146224976, 0.7220273613929749, -0.19813315570354462, 0.6553671956062317, 0.5561228394508362, -0.7714871168136597, 0.8184186816215515, -0.0...
def write ( self, translations, discard _ existing _ translations = false, metadata = none ) : raise notimplementederror
[ -0.8990171551704407, 0.29458072781562805, 0.5573124289512634, 0.8203128576278687, 0.7627615928649902, 0.5736892819404602, -0.02835508994758129, 0.45574042201042175, -0.18334218859672546, 0.31922245025634766, -0.8243917226791382, -0.5135679841041565, 0.3511047661304474, -0.3306516706943512,...
def _ save _ network ( self ) : self. network. save _ weights ( self. weight _ fname ) self. agent. network. load _ weights ( self. weight _ fname )
[ -0.3330276608467102, -1.3058639764785767, 0.239969864487648, -0.24029405415058136, 1.200054407119751, 0.19313891232013702, 0.18080955743789673, 0.08316171169281006, -0.3733275234699249, 0.11652473360300064, -0.9125972986221313, -0.8454546928405762, -0.12967462837696075, 0.8942850828170776,...
def getparam ( self, param _ vector, param _ name ) : if type ( self. free _ params [ param _ name ] [ 1 ] ) = = tuple : ( i, t ) = self. free _ params [ param _ name ] ( x, y ) = t return t. reshape ( param _ vector [ i : i + x * y ], ( x, y ) ) else : ( i, l ) = self. free _ params [ param _ name ] return param _ vec...
[ -1.0352061986923218, -0.09547103196382523, 0.42397060990333557, 0.22041627764701843, -0.4479919970035553, -0.33252060413360596, 0.1933673620223999, -0.5162838101387024, -0.13341198861598969, 0.7390813827514648, -0.0000997611423372291, 0.8400153517723083, -0.5598515272140503, -0.79207116365...
def post ( self ) : data = self. request. body
[ -0.6769535541534424, -0.22129489481449127, 0.3708662688732147, -0.37831151485443115, 1.2850825786590576, 1.0510833263397217, -1.0664112567901611, -0.3995509445667267, -0.449916809797287, -1.5864287614822388, -0.7642548680305481, 0.394199013710022, -0.4569959044456482, 0.4676429331302643, ...
def hough _ transform ( self, img ) : gray _ img = cv2. cvtcolor ( img, cv2. color _ bgr2gray ) gray _ img = cv2. medianblur ( gray _ img, 5 ) circles = cv2. houghcircles ( gray _ img, cv2. hough _ gradient, 1, 20, param1 = 50, param2 = 110, minradius = 0, maxradius = 0 ) if circles is not none : circles = np. uint16 (...
[ 0.025064364075660706, -0.2393217384815216, 0.8721151947975159, -0.7031874060630798, 0.20927205681800842, 0.1669161319732666, 1.0402761697769165, 0.12489820271730423, 0.44630828499794006, 0.918027400970459, 0.2092960625886917, 0.1425418108701706, 0.3265414834022522, 0.15515953302383423, 0...
def _ _ getitem _ _ ( self, item ) : return {'text': self. texts [ item ],'label': self. labels [ item ] }
[ -1.4514504671096802, -1.3965320587158203, 0.2564942538738251, -1.7459114789962769, -1.4220712184906006, 0.12313169986009598, -0.5456468462944031, -0.40025702118873596, 0.47148945927619934, 0.08335931599140167, -0.30662697553634644, -0.32582399249076843, -0.06607069820165634, -0.78732872009...
def shopify _ list _ all _ inventory _ level ( self, result ) : sum _ inventory _ list = [ ] catch = " " while result : page _ info = " " sum _ inventory _ list + = result link = shopify. shopifyresource. connection. response. headers. get ( " link " ) if not link or not isinstance ( link, str ) : return sum _ inventor...
[ -1.0267888307571411, -0.39670535922050476, 0.8645022511482239, 0.5274884104728699, 0.8847834467887878, -0.1338648945093155, 0.02722269669175148, -0.6721126437187195, 0.5269824266433716, 0.2563032805919647, -0.03617948666214943, -0.18880823254585266, -0.7580180168151855, 0.20321005582809448...
def do _ show ( self, arg ) : arg = arg. split ( ) if len ( arg ) = = 0 : print ( " * * class name missing * * " ) else : if not arg [ 0 ] in posi : print ( " * * class doesn't exist * * " ) elif len ( arg )! = 2 : print ( " * * instance id missing * * " ) else : key = str ( arg [ 0 ] ) + '.'+ str ( arg [ 1 ] ) if key ...
[ -0.3624309003353119, -0.7910720109939575, 1.0743330717086792, -0.35224103927612305, -0.4378851652145386, 0.541037917137146, 0.08216693997383118, 0.4650786221027374, -0.5377216339111328, 1.2749669551849365, 0.7228571176528931, 0.3899974822998047, -0.3450498878955841, 0.38190731406211853, ...
def modifyhardware ( vm ) : global cpu global ram global mac args = get _ args ( ) if args. cpu : cpu = int ( args. cpu ) if args. ram : ram = int ( args. ram ) if args. mac : mac = args. mac if vm. runtime. powerstate! = " poweredoff " : print " error : vm is not powered off. current state is ", vm. runtime. powerstat...
[ 0.34227654337882996, 0.5432248115539551, 0.6755537390708923, 0.7822180390357971, 0.39765164256095886, -0.29140809178352356, 0.8569513559341431, 1.0010473728179932, -0.6023615598678589, 0.7984815239906311, -0.49700745940208435, 0.3303559422492981, -0.8557802438735962, 0.5484811663627625, ...
def test _ get _ expansion _ candidate _ drives ( self ) : with patch ( self. netapp _ request _ func ) as netapp _ request : netapp _ request. return _ value = ( 200, self. expansion _ ddp _ drive _ data ) with patch ( self. drives _ property, new _ callable = propertymock ) as drives : drives. return _ value = self. ...
[ 0.32559284567832947, -0.5029404759407043, 0.7674869298934937, -0.2731802761554718, 0.5431801080703735, -0.010913962498307228, 0.6063829660415649, 0.3550267219543457, 0.045313406735658646, -0.5302944779396057, 0.04492264986038208, 0.08457957953214645, -0.7071391940116882, 0.0313822925090789...
def test _ atomic _ language _ length _ nistxml _ sv _ iv _ atomic _ language _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 1. xsd ", instance = " nistdata / atomic / langu...
[ 0.2672324776649475, -0.4836057722568512, 0.376477986574173, 0.574883222579956, -0.3577696979045868, 0.09729832410812378, -0.07060897350311279, 0.1899215579032898, -0.045938171446323395, 0.9006929993629456, -0.5332494974136353, -0.22650274634361267, 0.31989753246307373, 0.44574350118637085,...
def ship _ hit ( stats, aliens, bullets, ai _ settings, ship, screen, sb ) : if stats. ships _ left > 0 : # takes away ship life stats. ships _ left - = 1 # redraws ships lives sb. prep _ ships ( ) # empty bullet and alien group aliens. empty ( ) bullets. empty ( ) # create a new fleet and center ship create _ fleet ( ...
[ 0.08606956154108047, -0.23256941139698029, 0.44465145468711853, 0.07466142624616623, 1.0426169633865356, 0.3762638568878174, 0.032397497445344925, -0.44557517766952515, 0.15758734941482544, 0.6261990070343018, 0.09561974555253983, -0.16655538976192474, 0.574597954750061, -0.152108877897262...
def all _ gather ( data, group = none ) : if get _ world _ size ( ) = = 1 : return [ data ] if group is none : group = _ get _ global _ gloo _ group ( ) if dist. get _ world _ size ( group ) = = 1 : return [ data ] tensor = _ serialize _ to _ tensor ( data, group ) size _ list, tensor = _ pad _ to _ largest _ tensor ( ...
[ 0.389560341835022, 0.7164490818977356, 0.8273645639419556, 0.6350076794624329, -0.24865220487117767, 0.3430517613887787, -0.03191510960459709, -0.3212418556213379, 0.2669687271118164, 0.28022173047065735, -0.33947277069091797, 0.3389471471309662, 0.0688788890838623, 0.7717582583427429, 0...
def depickle ( netm ) : try : # depickle original object : message = pickle. loads ( netm ) assert ( isinstance ( message, netmess ) ) # # load the internal str and de - pickle that : if message. accvaltxt is not none : # print ( " textual calendar! " ) cg = pcalendar. usercal. calgenerator ( source = " network " ). ge...
[ 0.4563007056713104, -0.14379024505615234, 0.572105884552002, -0.6936569213867188, -1.140281319618225, 0.03335810452699661, 0.3619445264339447, -1.2435417175292969, 0.6300274729728699, -1.1367766857147217, 0.3364684581756592, -0.5024524331092834, -1.060421109199524, -0.15750478208065033, ...
def strip _ ext ( filename ) : s = filename sub = s [ : s. find ( ". " ) ] return sub
[ 0.4047401547431946, -0.7004210948944092, 0.722335696220398, 0.10936559736728668, -1.163054347038269, 1.0113959312438965, 0.23255738615989685, 0.40147295594215393, -0.007801540661603212, 0.2495272308588028, -0.20374231040477753, 0.7213958501815796, -0.4473079741001129, -1.4105132818222046, ...
def get _ trade ( self, trade _ id ) : url = " { 0 } / { 1 } / accounts / { 2 } / trades / { 3 } ". format ( self. domain, self. api _ version, self. account _ id, trade _ id ) try : return self. _ client _ _ call ( uri = url, method = " get " ) except requestexception : return false except assertionerror : return fals...
[ -0.5080247521400452, 0.9862918257713318, 0.37159180641174316, -0.4755336046218872, 1.0065479278564453, 0.22763429582118988, -0.2935861051082611, -1.27920401096344, 0.35174980759620667, -0.3705950975418091, -0.20555292069911957, 1.1021841764450073, -0.8245223164558411, -0.11835384368896484,...
def s3 _ cors _ credentials ( ) : # 10 minute expiration signer = policysigner ( 600, app. config ['aws _ bucket'], app. config ['branch'], app. config ['aws _ access _ key _ id'], app. config ['aws _ secret _ access _ key'] ) return signer. to _ json ( )
[ 0.6604671478271484, -1.5222409963607788, 0.5215566754341125, -0.6626163125038147, 0.11798382550477982, 0.3760817348957062, -1.2297641038894653, 0.9582682847976685, 0.2309206873178482, 0.5728622674942017, -0.7978491187095642, 0.6198434829711914, -0.2175494283437729, -0.5988666415214539, 0...
def _ _ init _ _ ( self ) - > none : # populate first with all defaults. self. update ( self. defaults ( ) )
[ -0.23286981880664825, 0.8158276677131653, 0.18266093730926514, 0.7192625999450684, 1.529469609260559, -0.34367313981056213, -0.5131368041038513, 0.16617605090141296, -0.19737231731414795, -0.4151456654071808, -0.6998616456985474, -0.818050742149353, 0.09903306514024734, 0.7392591834068298,...
def test _ list _ integer _ min _ length _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 1. xsd ", instance = " nistdata / list / inte...
[ -0.44980478286743164, -0.6495397686958313, 0.39015689492225647, 0.7521492838859558, -0.6253052353858948, -0.03850352391600609, -0.48417165875434875, 0.010713040828704834, 1.0831228494644165, 0.5714579224586487, -1.010818600654602, 0.14745178818702698, -0.5375306010246277, 0.995764076709747...
def test _ atomic _ id _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 4. xsd ", instance = " nistdata / atomic / id / schem...
[ -0.20962481200695038, -0.5848504304885864, 0.48862579464912415, 0.3599088490009308, -0.5466598868370056, 0.2711426317691803, 0.4038110673427582, -0.21398687362670898, -0.15849968791007996, 0.8158361315727234, -0.8841701149940491, -0.13408899307250977, -0.053318966180086136, -0.501086115837...
def active _ start _ time ( self, active _ start _ time ) : pattern _ dict = dict ( ) pattern _ dict ['freq _ type'] = self. schedule _ freq _ type pattern _ dict ['active _ start _ time'] = active _ start _ time schedule _ pattern = schedulepattern ( self. _ pattern ) self. _ pattern = schedule _ pattern. create _ sch...
[ -0.5457232594490051, -0.9683941602706909, 0.4535876512527466, -0.037507522851228714, 0.04741201922297478, 0.28704193234443665, 0.9711555242538452, 0.8411900401115417, 0.2937200665473938, 0.262602835893631, -0.7650336623191833, 0.9386739730834961, 0.446161687374115, -0.6871039867401123, -...
def read _ file ( self, relative _ path : str, read _ mode : str ) - > textiowrapper : try : return open ( self. path _ generator ( relative _ path ), read _ mode ) except filenotfounderror as err : print ( err )
[ -0.022175472229719162, -0.8238550424575806, 0.7016077637672424, 0.43733081221580505, -0.7914969325065613, 1.152087926864624, 0.13945862650871277, 0.05989260971546173, -1.7828006744384766, -0.2570306360721588, 1.4179341793060303, -0.5465366840362549, 0.5800330638885498, -1.3179904222488403,...
def get _ anime _ detail ( anl _ id, cache = false, cache _ dir = '.') : try : api _ url ='https : / / graphql. anilist. co'cache _ path = os. path. join ( cache _ dir,'{ }. json '. format ( anl _ id ) ) if cache and os. path. exists ( cache _ path ) : with open ( cache _ path,'r ', encoding ='utf - 8') as f : data = j...
[ -0.6875813007354736, -0.03861582651734352, 0.7634357213973999, -0.7520846724510193, -0.5678098201751709, -0.29028287529945374, -0.5522990226745605, -0.844732403755188, 0.6899731159210205, 0.7552661299705505, -0.5379058718681335, 1.0198719501495361, 0.24111278355121613, 0.2470899522304535, ...
def load _ data ( input _ filename, varname ) : dataset = nc. dataset ( input _ filename ) data = dataset. variables [ varname ] [ : ] angles = dataset. variables ['sunsatangles'] [ : ] latitudes = dataset. variables ['lat'] [ : ] cloudmask = dataset. variables ['cloudmask'] [ : ] return data, angles, latitudes, cloudm...
[ -0.501311182975769, 0.16741549968719482, 0.4149671196937561, -0.9971635341644287, -0.34464147686958313, 0.3930152952671051, -0.8171210289001465, -0.4140821695327759, -0.9623040556907654, -0.33277076482772827, -0.5108847618103027, 0.3700994849205017, -0.031143903732299805, -0.11786665767431...
def get _ closest _ single _ point ( self, point, parameterized = true ) : if parameterized : diffs = self. parameterized _ locations - point else : diffs = self. xyz - point dists = np. linalg. norm ( diffs, axis = 1 ) min _ loc = np. argmin ( dists ) closest _ parameterization = self. parameterized _ locations [ min ...
[ -0.8000994324684143, -0.32933229207992554, 0.5125559568405151, -0.11228837817907333, -0.8830440640449524, 0.06084365397691727, 0.4283946454524994, 0.06867218017578125, 0.5863467454910278, 0.3775007128715515, -0.4619092047214508, 0.3312769830226898, 0.09880966693162918, 0.6944037079811096, ...
def createphysicalinterface ( self, name, description = none ) : req = apiclient. allphysicalinterfacesurl % ( self. host, " / draft " ) body = { " name " : name } if description : body [ " description " ] = description resp = requests. post ( req, auth = self. credentials, headers = { " content - type " : " applicatio...
[ -1.1378310918807983, -0.0010782701428979635, 0.6927264928817749, 0.3193282186985016, -0.42013344168663025, 0.8445537686347961, -1.1928966045379639, -0.48962458968162537, -0.19287636876106262, -0.18785585463047028, -0.5875236988067627, -0.010443514212965965, -1.9649115800857544, 0.332720547...
def login ( force = false ) : # this modifies safari's cookies to be regular loginsuccess = false if not dict ['authentication'] : resetauthinfo ( ) authinfo = dict ['authentication'] # dicts are mutable, so authinfo is a reference & will change dict presumably if prefs ['username'] and prefs ['password'] : # fifteen m...
[ -1.532839059829712, 0.24705837666988373, 0.9759415984153748, 0.39731666445732117, -0.6733098030090332, 0.027242036536335945, 0.23991411924362183, 0.2074625939130783, 0.07675577700138092, -0.1235356479883194, -0.6686457395553589, 0.5688912272453308, -0.24880006909370422, 0.6574698090553284,...
def test _ atomic _ language _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 2. xsd ", instance = " nistdata / atomic ...
[ -0.06278694421052933, -0.6653266549110413, 0.549373209476471, 1.0418217182159424, -0.44288814067840576, 0.28721779584884644, -0.11976777017116547, 0.3028508424758911, -0.2041553258895874, 0.7693794965744019, -0.23522759974002838, 0.3470466136932373, 0.3774331510066986, -0.02160856686532497...
def move _ mesh ( self, event : str, iteration : str, hpc _ cluster = none, validation = false ) : import shutil # if we use mono - mesh we copy the salvus opt mesh here. if self. comm. project. meshes = = " mono - mesh " : optimizer = self. comm. project. get _ optimizer ( ) model = optimizer. model _ path # copy to l...
[ 0.27427685260772705, 0.47764700651168823, 0.8810002207756042, 0.6356793642044067, 0.11114287376403809, 1.076564073562622, 0.635942280292511, -0.08034856617450714, -0.36698609590530396, 0.4339314103126526, 0.17357772588729858, 0.4027358889579773, -0.0015816421946510673, -0.21070078015327454...
def events _ to _ timestamp _ image ( xn, yn, ts, pn, device = none, sensor _ size = ( 180, 240 ), clip _ out _ of _ range = true, interpolation ='bilinear ', padding = true, normalize _ timestamps = true ) : t0 = ts [ 0 ] xt, yt, ts, pt = torch. from _ numpy ( xn ), torch. from _ numpy ( yn ), torch. from _ numpy ( ts...
[ -0.33063820004463196, 0.3373854160308838, 1.0157618522644043, -0.15103642642498016, -0.26452645659446716, -0.5865447521209717, -0.38944971561431885, -0.02089821919798851, 0.8464593887329102, 0.5820120573043823, -0.06880640983581543, -0.24966657161712646, 1.3611376285552979, -0.547864973545...
def http _ tiledir ( http _ testdata _ dir ) : return http _ testdata _ dir / " cleantopo "
[ -0.34261354804039, 0.172345370054245, 0.29355189204216003, -0.9298824667930603, -0.1122518852353096, 1.0266892910003662, 0.7209736108779907, -0.44089797139167786, 0.0397275947034359, -0.3983786106109619, 0.4030028283596039, 1.172546148300171, 0.9659947752952576, -0.24126888811588287, -1....
def read _ dataset _ from _ files ( path ) : def _ list _ subfolders ( path ) : " " " list the immediate subfolders beneath the path. args : path : the path to be scanned. returns : a list of subfolders. " " " subfolders = [ ] for f in tf. io. gfile. listdir ( path ) : full _ path = os. path. join ( path, f ) if tf. io...
[ -0.5600893497467041, 0.11397416144609451, 0.6068488955497742, -0.4161960780620575, -1.4412809610366821, 0.2417973130941391, -0.12735195457935333, -0.4492317736148834, -0.6619472503662109, -0.3828902840614319, -0.5516445636749268, 0.3945263922214508, 0.36593887209892273, 0.21921084821224213...
def save _ weights ( self, h5 _ filename ) : self. _ _ model. save _ weights ( h5 _ filename )
[ -0.5410308837890625, -0.2004885971546173, -0.025400782003998756, 0.9174156188964844, 0.6146628856658936, 0.593250572681427, 1.331815481185913, -0.024998031556606293, -2.1926944255828857, 0.5905873775482178, -1.44016695022583, -0.5646359920501709, -0.45875227451324463, 0.7868697643280029, ...
def get ( self ) : return self. status
[ -0.5702277421951294, -1.4951473474502563, 0.13559040427207947, -0.18304558098316193, 0.03243838995695114, 0.42974942922592163, -0.8848193883895874, 0.4850398004055023, -0.0778907760977745, -1.1464111804962158, -0.7399206757545471, 0.7613836526870728, -0.17977707087993622, -0.36420741677284...
def product ( numbers : list ) - > int : from functools import reduce import operator return reduce ( operator. mul, numbers, 1 )
[ -0.9408828616142273, 1.4493684768676758, 0.49958378076553345, 1.1658082008361816, -0.06366395950317383, -0.1870521456003189, 0.8022325038909912, 0.3155359625816345, 0.9100039601325989, -0.31775861978530884, -0.8320876359939575, -0.9716123342514038, -0.2511197030544281, 0.5354973077774048, ...
def credential _ type ( self, credential _ type ) : allowed _ values = [ " password ", " api _ key ", " jwt " ] # noqa : e501 if credential _ type not in allowed _ values : raise valueerror ( " invalid value for ` credential _ type ` ( { 0 } ), must be one of { 1 } " # noqa : e501. format ( credential _ type, allowed _...
[ 0.6682569980621338, -0.016341419890522957, -0.45545992255210876, 0.7902929782867432, 0.540408730506897, 0.8763776421546936, -0.07877887785434723, 0.22218622267246246, -0.05738577991724014, 0.25058621168136597, -0.5254868268966675, 0.11500904709100723, -0.4035838842391968, 0.962333559989929...
def watch ( self ) : subscriber = yield from self. _ get _ subscriber ( ) address = none while not address : message = yield from subscriber. next _ published ( ) type _ = message. channel. decode ( self. _ encoding ). split ( " / " ) [ - 2 ] try : address = address. parse ( message. value. decode ( self. _ encoding ) ...
[ 0.0683458223938942, -0.9475839138031006, 0.6414673924446106, -1.033975601196289, 0.6527904272079468, -0.9175369739532471, 0.09146770089864731, -0.6214472651481628, -0.4060644507408142, -0.16249212622642517, -0.06576322764158249, 1.7393492460250854, -0.5122299790382385, 0.25033214688301086,...
def test _ description ( self ) : print ( f'{ self. test _ description. _ _ name _ _ }'f': executing unit test for property " description " of class " slashnexthostreport ".') self. assertequal ( self. host _ report _ action. description, self. description )
[ 1.0617810487747192, 0.38903114199638367, 0.17475943267345428, 0.20296458899974823, 1.6630101203918457, 1.1648896932601929, 0.7987089157104492, -0.21856991946697235, -0.06361356377601624, -0.07650303840637207, 0.39111441373825073, 0.6078183054924011, -0.8165675401687622, 0.03425300866365433...
def reload _ solver ( self ) : constraints = self. _ solver. constraints self. _ stored _ solver = none self. _ solver. add ( constraints )
[ -0.8224934339523315, -0.308700829744339, 0.29986467957496643, 0.2661840617656708, 0.013945993967354298, -0.4267970621585846, 0.5207629799842834, -1.1053885221481323, -0.14817357063293457, -0.282468318939209, -0.6449580192565918, 0.735301673412323, -0.5803617835044861, -0.47909265756607056,...
def test _ get _ raw ( self ) : self. create _ volume _ objects ( ) v = self. ep. search ( " volumes ", name _ _ contains _ some = " unittest " ). hits [ 0 ] self. assertisinstance ( v. _ get _ raw ( " volume _ group " ), krest. restobjectproxy )
[ 0.17036019265651703, 0.6487497091293335, 0.5021703839302063, -0.3119482696056366, 0.08052501827478409, -0.8851116895675659, -0.8506048321723938, -1.259547233581543, 0.2263302505016327, -0.7701419591903687, 0.5764913558959961, 0.06930959969758987, -0.323417603969574, -0.7808700203895569, ...
def test _ list _ integer _ max _ length _ 1 _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 2. xsd ", instance = " nistdata / list / ...
[ -0.6921253204345703, -0.5948101878166199, 0.3077492117881775, 0.9789921045303345, -0.6332864761352539, 0.0046376935206353664, -0.6489394903182983, 0.3279379904270172, 0.6342169642448425, 0.4557996392250061, -1.184531569480896, 0.07744709402322769, 0.025605564936995506, 1.035853624343872, ...
def _ _ negative _ acquisition _ function ( self, params ) : return - self. evaluate ( np. atleast _ 2d ( params ) )
[ -1.032434105873108, -0.7139585018157959, 0.43865907192230225, 0.21129757165908813, 0.5760356783866882, 0.0034977539908140898, -0.2702719569206238, -0.953471302986145, -0.7790320515632629, 0.07061029225587845, 0.9100797772407532, 0.9475018978118896, 0.059526026248931885, 0.20570869743824005...