text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ atomic _ base64 _ binary _ min _ length _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 1. xsd ", i...
[ 0.4145129919052124, -0.46266067028045654, 0.36676645278930664, 1.0165445804595947, 0.03553179278969765, 0.04812394082546234, 0.0875924676656723, -0.5123244524002075, 0.3703137934207916, 0.2609102129936218, -0.2703986167907715, -0.02873794361948967, -1.0814869403839111, 0.11603251099586487,...
def enterlearnmode ( self, inputevent = none ) : if orca _ state. learnmodeenabled : return true self. presentmessage ( messages. version ) self. speakmessage ( messages. learn _ mode _ start _ speech ) self. displaybraillemessage ( messages. learn _ mode _ start _ braille ) orca _ state. learnmodeenabled = true return...
[ 0.7399216294288635, -0.20437949895858765, 0.6880203485488892, -0.17585276067256927, 0.33818793296813965, 0.5417013764381409, 0.4330005347728729, -0.3562532067298889, 0.6285737156867981, 0.14176422357559204, -1.1066240072250366, 0.956246554851532, -0.545986533164978, 0.6576005220413208, 0...
def test _ atomic _ hex _ binary _ min _ length _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 1. xsd ", instance = " ...
[ 0.24357788264751434, -0.42113760113716125, 0.419060081243515, 0.6383038759231567, -0.3887087404727936, 0.36704638600349426, -0.1289929747581482, -0.24134600162506104, 0.20739451050758362, 0.3491189777851105, -0.6419497728347778, -0.44493722915649414, -0.54304438829422, 0.6011356711387634, ...
def test _ send _ only _ to _ test _ recipients ( app, users, testdata, mocker ) : class testmessage ( blocktemplatedmessage ) : def _ _ init _ _ ( self, * args, * * kwargs ) : template = " tests / subject _ body _ html. html " kwargs. pop ( " trigger ", none ) kwargs. pop ( " message _ ctx ", { } ) kwargs. setdefault ...
[ 0.562300443649292, 0.8814327120780945, 0.641819179058075, -0.5563401579856873, 0.3173868656158447, 0.4676225781440735, -0.09962284564971924, 0.07504232972860336, 0.014212612994015217, -0.1662924736738205, -0.6816120147705078, 1.2182021141052246, -0.45165419578552246, 0.38699057698249817, ...
def _ stretchy ( self ) : stretchy _ attr = self. ik _ controllers [ " hindleg " ] + ". stretchy " dist _ dict = { } stretchy _ grp = mc. group ( n ='{ } _ { } _ stretchy _ { } _ { } '. format ( self. side, self. name, self. suffix, self. instance _ num ), em = true, p = self. mod _ dict [ " ikcontrol " ] ) mc. hide ( ...
[ -0.006680202670395374, -0.07926619052886963, 0.8906134963035583, -1.265819787979126, -0.707129955291748, 0.009452207945287228, 1.2238202095031738, 0.2509256899356842, -0.5865256786346436, 0.023829476907849312, -0.11616839468479156, -0.13872581720352173, 0.008116728626191616, 0.379792779684...
def do _ quit ( self, arg ) : return true
[ -0.9434600472450256, 0.5399652719497681, 0.22286659479141235, 0.4069384038448334, 0.4736849069595337, 1.3155670166015625, 0.6408910155296326, -0.48809126019477844, -0.4616371989250183, 0.21220801770687103, -0.8162339925765991, -0.6354771852493286, -0.3689917325973511, 0.08686435967683792, ...
def accuracy ( output, target, topk = ( 1, ) ) : maxk = max ( topk ) batch _ size = target. size ( 0 ) _, pred = output. topk ( maxk, 1, true, true ) pred = pred. t ( ) correct = pred. eq ( target. view ( 1, - 1 ). expand _ as ( pred ) ) res = [ ] for k in topk : correct _ k = correct [ : k ]. view ( - 1 ). float ( ). ...
[ -0.8331899046897888, -0.5665203928947449, 0.625978946685791, 0.7391592860221863, -0.5760585069656372, -0.5138437747955322, 1.0204931497573853, 0.7640237808227539, -0.4128255844116211, 0.6112820506095886, 0.23162920773029327, 0.4498496949672699, 1.338513970375061, 0.39215561747550964, -0....
def s ( self, day, name ) : self. day _ select = day self. month _ select = self. month self. year _ select = self. year self. day _ name = name # getting data self. b ['day _ select'] = day self. b ['month _ select'] = self. month self. b ['year _ select'] = self. year self. b ['day _ name'] = name self. b ['month _ n...
[ -0.5881640315055847, 0.06206868961453438, 0.36002880334854126, -0.181115061044693, -0.14141616225242615, -0.15896058082580566, -0.41927018761634827, -0.42978808283805847, 0.04994973540306091, -0.37883180379867554, -0.8086158633232117, 0.6995367407798767, 0.21378245949745178, -0.08198282867...
def translate ( self, vector ) : newset = [ ] for i in range ( len ( self. set ) ) : newset. append ( ( self. set [ i ] + vector ) ) result = valuevectorset ( ) result. addall ( newset ) return result
[ -0.6519939303398132, 0.18692108988761902, 0.5345651507377625, -0.1299651712179184, -0.607243537902832, -0.817935585975647, -0.6092139482498169, -1.1475201845169067, 0.7282707095146179, -0.25426337122917175, -0.314568430185318, 0.36568617820739746, -0.7041957974433899, -0.7219929099082947, ...
def accept _ payment ( self, data ) : transaction _ id = data [ " txn _ id " ] self. log. debug ( " ipn for transaction # % s received " % transaction _ id ) if self. cart. payment _ class. objects. filter ( transaction _ id = transaction _ id ). count ( ) > 0 : self. log. warn ( " ipn # % s, already processed ", trans...
[ 0.1127469390630722, -0.4239960312843323, 0.8526632785797119, -0.8173467516899109, 0.07878704369068146, -0.8965737819671631, -0.23667170107364655, -0.34429410099983215, -0.1927691251039505, -0.09136289358139038, -0.053137004375457764, -0.21822361648082733, 0.6624599695205688, 0.154635176062...
def run ( self, detectormap = none, metadata = none ) : lightsources = { } lampelements = { } lampinfofrommetadata = none if len ( self. config. lightsources ) > 0 : lightsources = set ( self. config. lightsources ) else : lampinfofrommetadata = self. getlampinfo ( metadata ) lightsources = lampinfofrommetadata. lamps ...
[ 0.10816535353660583, -0.30485883355140686, 0.6107474565505981, 0.4051390588283539, -0.18136879801750183, 0.03127862140536308, 0.15032871067523956, -0.24190086126327515, 0.5450862050056458, -0.684539258480072, 0.047213584184646606, -0.22343310713768005, -0.3940013349056244, 0.76991879940032...
def calculate _ farthest _ dist _ km ( points, target ) : target _ pt = reverse _ coordinate _ order ( target ) # need ( lat, lng ) for vincenty max _ radius _ km = 0 for point in points : point = reverse _ coordinate _ order ( point ) # need ( lat, lng ) for vincenty distance = vincenty ( point, target _ pt ). kilomet...
[ -0.06136036291718483, -0.4291912317276001, 0.49135708808898926, 0.38305503129959106, 0.13845671713352203, -0.49243849515914917, -0.7649085521697998, 0.7861324548721313, -0.3179687261581421, 0.7762026786804199, -0.13494139909744263, 0.6970736980438232, 0.2714475393295288, 0.2653456926345825...
def project ( self, point ) : augmented = np. append ( point, 1 ) transformed = self. c. dot ( augmented ). a1 if transformed [ - 1 ] = = 0. 0 : return np. array ( [ 0, 0 ] ) else : return transformed [ 0 : - 1 ] / transformed [ - 1 ]
[ -0.4084872305393219, 0.09599116444587708, 0.4517386257648468, 0.7517258524894714, 0.36715957522392273, -0.21292416751384735, -0.03383546695113182, -0.23209305107593536, 1.062379240989685, 0.6581539511680603, 0.5062214732170105, -0.11371129006147385, -0.950222909450531, 0.12099555134773254,...
def download _ data ( self, dataset = none ) : fids = [ fid for fid, record in self. data _ catalog. items ( ) if dataset is none or record ['dataset'] = = dataset ] description ='downloading { } data '. format ( dataset if dataset else'all datasets') tqdm _ execute _ tasks ( self. download _ file, fids, description, s...
[ 0.227095365524292, 0.6441352367401123, 0.32840991020202637, 0.058834731578826904, 0.6673616766929626, -0.23437200486660004, -0.07895827293395996, 0.7175288796424866, -0.07083754986524582, -0.6824035048484802, 0.4186075031757355, 0.6090879440307617, -0.039352498948574066, 0.8379443883895874...
def set _ draw ( self, draw = true ) : self. draw = bool ( draw )
[ -0.023128768429160118, 0.7520247101783752, 0.41369280219078064, -0.1504501849412918, 0.25341615080833435, 1.8683503866195679, -0.29162538051605225, 0.5029389262199402, -0.21707464754581451, -0.7231261730194092, -0.1081637442111969, 0.1800789088010788, -0.2475654035806656, 0.594699740409851...
def fuzz _ forms ( self, url, forms, attack _ type ='all') :
[ -0.8547797799110413, -0.7109124660491943, 0.30037909746170044, 0.4210217297077179, 0.8730188012123108, -0.4585978388786316, 0.47134894132614136, -0.009842189960181713, 0.7722975015640259, -0.7718934416770935, -1.4426203966140747, -0.5371106266975403, -0.4213085472583771, 1.0720728635787964...
def _ prepopulate _ placeholders ( step _ config, step _ data ) : for itm in step _ config. cmd : if isinstance ( itm, util. outputplaceholder ) : step _ data. assign _ placeholder ( itm, none )
[ -0.4369480013847351, -0.07461744546890259, 0.28801625967025757, 0.22528134286403656, 0.3673158288002014, 0.19706030189990997, 0.774145781993866, 0.09565391391515732, -0.8494701981544495, 0.2636173963546753, 0.37541013956069946, -0.9719519019126892, -0.14206698536872864, 1.6275880336761475,...
def getdefaultkeybindings ( self ) : keybindings = keybindings. keybindings ( ) layout = _ settingsmanager. getsetting ('keyboardlayout') if layout = = settings. general _ keyboard _ layout _ desktop : for keybinding in self. _ _ getdesktopbindings ( ). keybindings : keybindings. add ( keybinding ) else : for keybindin...
[ -0.7386627793312073, 0.31149718165397644, 0.552146852016449, 1.4681799411773682, -0.5598387718200684, 0.5902785062789917, 0.34086114168167114, -0.6378481388092041, 1.0228335857391357, -0.1268240064382553, -0.9991955757141113, -0.4685784578323364, -1.0465582609176636, 0.448579877614975, 0...
def test _ atomic _ qname _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 5. xsd ", instance = " nistdata / atomic ...
[ -0.5220738053321838, -1.2425135374069214, 0.38928133249282837, 0.03284236788749695, -0.7824311256408691, -0.05638453736901283, 0.05396977439522743, -1.2420822381973267, -0.4458085000514984, 0.6645210385322571, -0.7712564468383789, -0.0626307874917984, -0.14383062720298767, 0.23843313753604...
def test _ deletes _ matching _ indices ( mock _ es _ client, interactive, monkeypatch ) : mocked _ input = mock ( return _ value ='yes') monkeypatch. setattr ('builtins. input ', mocked _ input ) mock _ es _ client. return _ value. cat. indices. return _ value = cat _ indices _ mock _ data management. call _ command (...
[ -0.2645496428012848, 0.19383659958839417, 0.48898863792419434, 0.09689468890428543, 0.5821385383605957, 0.10232372581958771, 0.2977648675441742, 0.4464477300643921, 0.6257467865943909, -0.7876347303390503, -0.264759361743927, 0.17943187057971954, -0.19732150435447693, -0.006322398781776428...
def execute _ command ( self, command, dir ) : try : self. _ env. run ( command, dir ) except exception as inst : print ( inst ) # the exception instance self. fail ( " could not execute command % s over directory % s failed " % ( command, dir ) )
[ -0.504620373249054, 0.09267086535692215, 0.3826048672199249, 0.3017854690551758, 0.4394895136356354, 1.131981372833252, -0.34716737270355225, -0.27610114216804504, -0.3556344509124756, 0.07068033516407013, 0.6884682178497314, 1.2370915412902832, -0.1993171125650406, 0.29802295565605164, ...
def last ( self, column = none ) : return self. _ _ get _ location ( max, column )
[ -0.5625388026237488, 0.48196086287498474, 0.8494488000869751, 0.4000270664691925, 0.1296098381280899, -0.47675904631614685, 0.3536427915096283, -0.48935315012931824, -0.5553092956542969, -0.18658196926116943, 0.16853177547454834, -0.036423005163669586, -0.4400802552700043, -1.0145438909530...
def _ check _ event _ description ( event _ desc, events ) : if event _ desc is none : # convert to int to make typing - checks happy event _ desc = list ( np. unique ( events [ :, 2 ] ) ) if isinstance ( event _ desc, dict ) : for val in event _ desc. values ( ) : _ validate _ type ( val, ( str, none ), " event names ...
[ 0.2270110845565796, 0.48186472058296204, 0.8177690505981445, -0.24776892364025116, 0.16867008805274963, -0.5818808674812317, -0.15268075466156006, 0.22411134839057922, 0.2983260154724121, 0.4070837199687958, 0.6912170648574829, 0.8691325187683105, 0.12109672278165817, 1.5160640478134155, ...
def average ( self, datalist : list, weighted = false ) : ret = copy. deepcopy ( self ) for d in datalist : if not np. array _ equal ( ret. xc, d. xc ) or not np. array _ equal ( ret. xc, d. xc ) or ret. datatype! = d. datatype : raise exception ( " attempted average between incompatiple data. " ) if weighted and d. er...
[ -0.8637198209762573, 0.7679750323295593, 0.5013616681098938, 0.5186874866485596, -0.04059708118438721, 0.5413179397583008, 0.47996968030929565, -0.23167650401592255, -0.42593157291412354, 0.5921637415885925, -0.04170000180602074, 0.08573122322559357, -0.8730257749557495, 1.2938770055770874...
def get _ playlists ( sp, username ) : return sp. user _ playlists ( username ) ['items']
[ -0.354826420545578, -0.05620736628770828, 0.023492515087127686, 1.6050728559494019, -0.5560595393180847, -0.11704624444246292, 0.012504799291491508, -0.32509326934814453, 0.6737824082374573, 0.2786417603492737, -0.8327196836471558, 0.371480792760849, -0.9704270362854004, -0.703293800354003...
def _ _ init _ _ ( self, t, trajectory, ats, molno, typelist ) : self. timestep = t self. ats = ats snapshot = trajectory [ t ] self. box = snapshot. configuration. box binds = np. argsort ( snapshot. particles. body ) self. pos = snapshot. particles. position [ binds ] sz = np. shape ( self. pos ) if sz [ 0 ] % ats! =...
[ -0.4341975152492523, -0.12573282420635223, 0.5594063997268677, -0.7511974573135376, 0.008140701800584793, -0.17509381473064423, -0.1921178102493286, -0.014444096013903618, 0.29891324043273926, 0.5309995412826538, -0.5854074358940125, -0.13895873725414276, 0.3541280925273895, 0.071644678711...
def activatelogicalinterfaceconfiguration ( self, logicalinterfaceid ) : req = apiclient. onelogicalinterfaceurl % ( self. host, " / draft ", logicalinterfaceid ) body = { " operation " : " activate - configuration " } resp = requests. patch ( req, auth = self. credentials, headers = { " content - type " : " applicatio...
[ -1.2571302652359009, -0.6436867117881775, 0.38244542479515076, -0.993767499923706, -0.7127043604850769, -0.24645282328128815, -0.25496795773506165, -0.18118199706077576, 0.3146299123764038, 0.6253518462181091, -1.1853691339492798, 0.40710845589637756, -1.213454008102417, 0.3182011842727661...
def _ calculate _ observation ( self ) - > observation : dist _ to _ exit = tuple ( map ( operator. sub, self. position _ exit, self. position _ agent ) ) neighbours = self. maze [ self. position _ agent [ 0 ] - 1 : self. position _ agent [ 0 ] + 2, # noqa e203 self. position _ agent [ 1 ] - 1 : self. position _ agent ...
[ -0.17885473370552063, -0.46905821561813354, 0.5122801065444946, -0.14332786202430725, -0.32180923223495483, -0.34659820795059204, 1.0586832761764526, 0.2862902283668518, -0.030220787972211838, 0.6462686657905579, -0.49480289220809937, -0.9136834144592285, -0.2822226285934448, -0.2502241134...
def setbrightness ( self, brightness ) : self. light. on = true self. light. brightness = brightness
[ 0.8449676632881165, -1.1156781911849976, 0.42041245102882385, 0.9657363891601562, 0.4818587005138397, 0.005864801350980997, -0.5287830233573914, 1.2772635221481323, 0.25032541155815125, -1.094717264175415, -1.65622079372406, 0.5100404620170593, 0.14128659665584564, 1.9999724626541138, 0....
def add _ package ( self, remote, local ) : # parse the url, get the server url = urlparse. urlparse ( remote ) server = url. netloc # check if server exists in the url _ queue [ server ] if server not in self. url _ queue : self. url _ queue [ server ] = [ ] # url _ queue [ server ] exists now! self. url _ queue [ ser...
[ -0.7295964956283569, -0.07215073704719543, 0.5934654474258423, -0.49422118067741394, 0.7459471821784973, 0.47280681133270264, -1.1719940900802612, 0.8923168778419495, 0.4922482371330261, -0.25884005427360535, -0.83448725938797, 0.47165554761886597, -0.29691722989082336, 0.927654504776001, ...
def test _ list _ decimal _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 2. xsd ", instance = " nistdata / list / decimal / schem...
[ -0.28663280606269836, -0.6273335814476013, 0.49574828147888184, 0.6645269989967346, 0.05963379517197609, -0.2529813051223755, -0.1537090241909027, 0.479748010635376, 0.2685704529285431, -0.24265089631080627, -1.217599868774414, -0.23204264044761658, 0.32176873087882996, 0.8766441941261292,...
def _ get _ array _ index ( self, index ) : block = ( index / self. initial _ allocation ) + 1 return int ( log ( block, 2 ) )
[ -0.35964885354042053, -0.0866260826587677, 0.33513274788856506, -0.1450067162513733, -0.24978181719779968, -0.31026914715766907, 0.9340887069702148, -0.3606882095336914, 0.08032002300024033, 0.00871051475405693, -0.08165241777896881, 1.0090792179107666, -0.06442680209875107, -0.34469699859...
def print _ params ( ) : strings = [ ] for item in [ par for par in dir ( parameters ) if par. isalnum ( ) ] : strings. append ( " { name } = { value } ". format ( name = item, value = getattr ( parameters, item ), ) ) string = ', '. join ( strings ) print ( string )
[ -0.06660394370555878, -0.9999492168426514, 0.623640775680542, -0.7613465189933777, 0.1475750058889389, 0.41488218307495117, -0.7186526656150818, -0.11036849766969681, -1.1261059045791626, 0.9607263803482056, 0.45486021041870117, 0.5922822952270508, 0.14744816720485687, 1.476407527923584, ...
def update ( ) : while not is _ outside _ road _ empty and is _ carpark _ avaliable : gointo _ carpark ( ) while not is _ waitfield _ empty and is _ carpark _ avaliable : fulfill ( )
[ -0.4595491290092468, -0.7388792037963867, 0.3412632942199707, 0.43649762868881226, 0.0982564389705658, 0.24277082085609436, -0.21027007699012756, 0.512854278087616, -0.9444808959960938, 0.5478074550628662, -0.38252654671669006, -0.72431480884552, -0.8792176842689514, 0.0501396618783474, ...
def build ( self, callback = none ) : self. set _ html ( self. builder. html, callback = callback )
[ 0.32404497265815735, 0.5030547380447388, 0.2697470188140869, 0.9377127885818481, -0.06478630751371384, 0.3825542628765106, 0.5522372126579285, 0.9788671135902405, 0.030808530747890472, -0.7639891505241394, 0.21388855576515198, -0.016437962651252747, -0.11958427727222443, 0.7706602811813354...
def _ channel ( self, * parts ) : channel = [ self. _ namespace, " channels " ] for part in parts : channel. append ( str ( part ) ) return " / ". join ( channel ). encode ( self. _ encoding )
[ -0.3805447518825531, -0.3161868751049042, 0.15102411806583405, -1.1586495637893677, 0.3884138762950897, 0.489883154630661, -1.173090934753418, -1.3713855743408203, -0.07237842679023743, -0.1735275685787201, 0.9785819053649902, -0.003696558764204383, -0.6842682957649231, -0.6373847723007202...
def task _ instances ( self ) : return self. _ task _ instances
[ -0.3585348129272461, 0.4456394612789154, 0.46136727929115295, -0.20170441269874573, -0.23707418143749237, 1.1982330083847046, 1.0138089656829834, 0.25227999687194824, -0.43850022554397583, -0.027834590524435043, -1.1407115459442139, -0.13139797747135162, -0.44672104716300964, 0.42983427643...
def _ project _ modulation ( s _ obj, v, radius, contribute = false ) : # check inputs : xyz, data, v, xsign = _ check _ projection ( s _ obj, v, radius, contribute ) logger. info ( proj _ str % ( len ( data ),'projection') ) index _ faced = v. shape [ 1 ] # modulation / proportion / ( min, max ) : modulation = np. ma....
[ -0.5900951027870178, -0.45249131321907043, 0.8286488056182861, -1.0228309631347656, -0.38094833493232727, -0.13222482800483704, 0.4867921769618988, -0.3433662950992584, 0.7160858511924744, 1.1017528772354126, 0.25624072551727295, 0.03709546849131584, 0.17026671767234802, -0.153790771961212...
def flatten ( x : float, y : float, z : float, scale : int, distance : int ) - > tuple : projected _ x = ( ( x * distance ) / ( z + distance ) ) * scale projected _ y = ( ( y * distance ) / ( z + distance ) ) * scale return projected _ x, projected _ y
[ -0.3962244987487793, -0.42887207865715027, 0.5593429207801819, -0.20752280950546265, -0.5355538725852966, 0.6206055283546448, -1.0595383644104004, 0.10303731262683868, -0.3670295178890228, 0.9652352929115295, -0.153391495347023, -0.7259351015090942, -1.2874276638031006, -1.1423159837722778...
def test _ atomic _ base64 _ binary _ length _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 5. xsd ", instance = "...
[ 0.23516112565994263, -0.32734379172325134, 0.34236258268356323, 0.844049870967865, 0.06762391328811646, -0.23478300869464874, 0.47391724586486816, -0.39043471217155457, -0.42821675539016724, 0.6654815673828125, -0.8245671987533569, -0.11888972669839859, -0.7633665204048157, 0.4206862151622...
def error ( self, msg ) : self. die _ with _ usage ( " % s : error : % s \ n " % ( self. prog, msg ) )
[ 0.14298123121261597, -0.013682103715837002, 0.5713987350463867, 0.09653730690479279, 0.7463928461074829, 0.9101167321205139, 0.31262457370758057, 0.39342737197875977, -0.49026045203208923, 0.6402034163475037, 0.20815423130989075, 0.5429882407188416, -0.26658669114112854, 0.4668321907520294...
def addlogicalinterfacetodevicetype ( self, typeid, logicalinterfaceid ) : req = apiclient. alldevicetypelogicalinterfacesurl % ( self. host, " / draft ", typeid ) body = { " id " : logicalinterfaceid } # body = { " name " : " required but not used!!! ", " id " : logicalinterfaceid, " schemaid " : schemaid } # if descr...
[ -1.1077858209609985, -0.5344587564468384, 0.5780824422836304, -0.43423163890838623, -0.19157297909259796, 0.5134169459342957, -0.5250523686408997, -1.011357307434082, 0.5012765526771545, 0.2369096428155899, -0.5058831572532654, 0.5331679582595825, -1.6148334741592407, 0.6180851459503174, ...
def find _ knee ( self, ) : if not self. maxima _ indices. size : warnings. warn ( " no local maxima found in the difference curve \ n " " the line is probably not polynomial, try plotting \ n " " the difference curve with plt. plot ( knee. x _ difference, knee. y _ difference ) \ n " " also check that you aren't mista...
[ 0.3179643154144287, -0.6370421051979065, 0.8702608942985535, -0.3600482642650604, -0.0452856682240963, -0.39311134815216064, 0.4121512472629547, 0.060443226248025894, -0.005354541819542646, -0.3251649737358093, 0.10073744505643845, 0.5745266675949097, -0.3410422205924988, -0.13644801080226...
def _ _ init _ _ ( self, orbital _ type : str, contract _ num : int, exponents : list, coeffs : list, centre : tuple = ( 0, 0, 0 ) ) : self. orbital _ type = orbital _ type self. contract _ num = contract _ num self. exponents = exponents self. coeffs = coeffs self. centre = centre self. angular = angular _ quanta [ or...
[ -0.10406283289194107, -0.5317904353141785, 0.5101580023765564, -0.6419031620025635, 0.45586085319519043, -0.04872649908065796, -0.4141068756580353, 0.028316915035247803, 0.942842960357666, 0.38305723667144775, -0.3273654580116272, 0.2943527400493622, -0.37479445338249207, -0.32900950312614...
def updatephysicalinterface ( self, physicalinterfaceid, name, schemaid, description = none ) : req = apiclient. onephysicalinterfacesurl % ( self. host, " / draft ", physicalinterfaceid ) body = { " name " : name, " schemaid " : schemaid } if description : body [ " description " ] = description resp = requests. put ( ...
[ -1.7641730308532715, -0.39326637983322144, 0.36375170946121216, 0.1846671998500824, -0.9693958163261414, 0.3660184442996979, -0.997728168964386, -0.4573844075202942, 0.07775746285915375, 0.18398059904575348, -0.42263898253440857, 0.38789841532707214, -2.501676559448242, -0.2030703574419021...
def previous ( self, callback = none ) : self. eval _ js ('table. movetosibling ( undefined, " previous " ) ; ', callback = callback )
[ 0.24237313866615295, 1.7813878059387207, 0.6087116599082947, 0.8583617210388184, -0.13038359582424164, -0.9360273480415344, 1.8378626108169556, -0.5608876347541809, -0.09714337438344955, 0.37005454301834106, -0.5346019864082336, 0.2787054777145386, -0.15172767639160156, 0.506024181842804, ...
def x ( self ) : return self. _ v _ x
[ -0.2000182718038559, 0.39789336919784546, 0.13177987933158875, 0.16085059940814972, -0.16041108965873718, 0.891736626625061, -0.17775274813175201, -0.09756423532962799, 1.0026135444641113, -0.4118853211402893, -0.6812155842781067, 1.1997311115264893, 0.33211395144462585, -1.294894576072692...
def testactiveservices ( self, mock _ gcm _ api ) : services = mock _ gcm _ api. return _ value. projects. return _ value. timeseries. return _ value. list services. return _ value. execute. return _ value = mock _ gcm _ metrics _ count active _ services = fake _ monitoring. activeservices ( ) self. assertin ('compute....
[ -0.1622258722782135, -0.24836938083171844, 0.41051095724105835, -0.3448723554611206, 0.7713372707366943, 0.4035993218421936, 0.8619813919067383, -0.2879687249660492, -0.26814842224121094, -0.040442753583192825, -0.11132442951202393, -0.38361656665802, -0.5952817797660828, 0.114389881491661...
def get _ fd _ qnm ( template = none, * * kwargs ) : input _ params = props ( template, qnm _ required _ args, * * kwargs ) f _ 0 = input _ params. pop ('f _ 0') tau = input _ params. pop ('tau') # the following have defaults, and so will be populated t _ 0 = input _ params. pop ('t _ 0') phi = input _ params. pop ('ph...
[ 0.4921019971370697, 0.036067478358745575, 0.9015674591064453, 0.09523225575685501, -0.08887209743261337, -0.30131712555885315, 0.03716539591550827, 0.1705656200647354, -0.37869957089424133, -0.7636212110519409, 0.18533827364444733, -0.2544504702091217, -0.4076540768146515, 0.40362152457237...
def discover _ hosts ( self ) : socket. setdefaulttimeout ( self. opt _ timeout ) sock = socket. socket ( socket. af _ inet, socket. sock _ dgram ) if self. opt _ port > 0 : try : sock. bind ( ('', self. opt _ port ) ) except oserror as e : print ( " socket bind failed : { 0 } ". format ( e ) ) return e. errno sock. se...
[ -0.17335698008537292, 0.7742089033126831, 0.9337708353996277, -0.37375155091285706, -0.08612382411956787, -0.5625670552253723, -0.12704326212406158, -0.2394830882549286, -0.013290843926370144, 0.14989995956420898, 0.5792105197906494, 1.3173571825027466, -0.13703051209449768, 0.427639216184...
def plan ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " plan " )
[ 0.32055339217185974, 0.47398245334625244, 0.28123366832733154, 0.01155568566173315, 0.590781033039093, 1.779166340827942, 0.008459869772195816, 0.04492424055933952, 0.7577952742576599, -0.3233737647533417, -0.10168559104204178, 0.9752399921417236, 0.6878649592399597, -1.5365012884140015, ...
def manage ( self ) - > bool : return pulumi. get ( self, " manage " )
[ 0.49788814783096313, 0.7177212834358215, 0.4494064152240753, 0.5966642498970032, 1.0660327672958374, 0.8963475227355957, -0.7056307792663574, -0.3286491334438324, 0.5344425439834595, -0.4435997009277344, 0.376110315322876, 0.9468582272529602, -0.5293224453926086, -0.08930423110723495, -1...
def do _ update ( self, arg ) : arg = arg. split ( " " ) intfields = [ " my _ number ", " number _ rooms ", " number _ bathrooms ", " max _ guest ", " price _ by _ night " ] floatfields = [ " latitude ", " longitude " ] if len ( arg ) = = 1 and arg [ 0 ] = = " " : print ( " * * class name missing * * " ) return if arg ...
[ -0.9506847262382507, -1.3083149194717407, 1.0905492305755615, -0.5355494618415833, -0.7789251804351807, 0.9395066499710083, 0.13252325356006622, 0.22633075714111328, -0.6980671286582947, 0.6782235503196716, -0.28447049856185913, -0.923788845539093, -0.7349525690078735, 0.3828123211860657, ...
def call _ subprocess _ and _ report _ rc ( command : str ) - > bool : process = call _ subprocess ( command ) process. wait ( ) return process. returncode = = 0
[ 0.7349004745483398, 0.6174784898757935, 0.8882586359977722, 0.15935209393501282, 0.2680042088031769, 0.9481046795845032, -0.5916967391967773, -0.16203059256076813, -0.01368735358119011, -0.221773162484169, -0.4990377426147461, 0.18130384385585785, -1.1065624952316284, -0.4669368267059326, ...
def test _ call _ existing _ blast _ db ( self ) : # build the blast database and keep track of the files to clean up blast _ db, files _ to _ remove = \ build _ blast _ db _ from _ fasta _ path ( self. reference _ seqs _ fp ) self. _ paths _ to _ clean _ up + = files _ to _ remove p = blasttaxonassigner ( {'blast _ db...
[ -0.28057074546813965, -0.6195676922798157, 0.44500210881233215, 0.41932904720306396, 0.5952888131141663, 0.422454833984375, 0.5552300214767456, 0.6072877049446106, -0.017175748944282532, 0.3865678310394287, -0.4710928201675415, -0.7563636302947998, -0.6631118655204773, -0.2146061360836029,...
def _ presenttextatnewcaretposition ( self, event, otherobj = none ) : obj = otherobj or event. source text = obj. querytext ( ) self. updatebraillefornewcaretposition ( obj ) if self. _ insayall : return if not orca _ state. lastinputevent : return if isinstance ( orca _ state. lastinputevent, input _ event. mousebutt...
[ 0.5541213154792786, -1.5437514781951904, 0.9360029101371765, 0.3672676980495453, -0.2847598195075989, -0.15045873820781708, -0.3172353208065033, -0.6508758664131165, 0.30599337816238403, 0.2703765034675598, 0.14595551788806915, -0.4688969552516937, -0.26486390829086304, 0.5616737604141235,...
def vgg _ to _ masks ( images _ dir : str, annotations _ file : str, masks _ dir : str, class _ labels _ file : str, combine _ into _ one : bool = false, ) : # arguments validation if not os. path. exists ( images _ dir ) : raise valueerror ( f " invalid images directory path : { images _ dir } " ) elif not os. path. e...
[ -0.6053658723831177, -0.046778950840234756, 0.6470224857330322, 0.05439847707748413, 0.9924273490905762, -0.370999276638031, 0.9590801000595093, -0.4491954743862152, -0.14398261904716492, 0.9736533164978027, 0.00468915281817317, -0.02556244470179081, 0.49468913674354553, 0.6006280183792114...
def find _ and _ get ( self, ns, prefix, usemsgpack = true ) : # note : sdl " * " usage is inconsistent with real python regex, where it would be ". * " ret _ dict = self. _ sdl. find _ and _ get ( ns, " { 0 } * ". format ( prefix ) ) if usemsgpack : ret _ dict = { k : msgpack. unpackb ( v, raw = false ) for k, v in re...
[ -0.6478093862533569, 0.5298305153846741, 0.8544755578041077, 0.12977612018585205, -0.9800891280174255, -1.7684400081634521, -0.7218800187110901, -0.7693668007850647, 0.048796940594911575, -0.1522773802280426, -0.5070810317993164, 0.055257804691791534, 0.16157209873199463, 0.391164183616638...
def create _ bucket ( self, bucket _ name : str, resource : dict | none = none, storage _ class : str = " multi _ regional ", location : str = " us ", project _ id : str | none = none, labels : dict | none = none, ) - > str : self. log. info ( " creating bucket : % s ; location : % s ; storage class : % s ", bucket _ n...
[ -0.06729547679424286, -0.17528775334358215, 0.45377078652381897, 0.7208980321884155, -0.06419606506824493, 0.8497084379196167, -0.5016635060310364, -0.3421061933040619, -0.14315424859523773, -0.26266202330589294, 0.08351100236177444, -0.15262079238891602, 0.3703433573246002, 0.041566915810...
def phase ( self ) : return self. data
[ -0.5426220893859863, -1.0798487663269043, 0.46297135949134827, -0.3622336685657501, -0.305652916431427, 0.4734783172607422, -1.0156781673431396, -0.5018513798713684, 0.2589742839336395, -0.7367063760757446, 0.09032677114009857, -0.3948238492012024, -0.8468934893608093, -0.1598406732082367,...
def on _ drag _ fatherdata _ received ( self, widget, context, x, y, sel _ data, info, time ) : if self. obj. get _ father _ handle ( ) : return for i in self. hidden : i. set _ sensitive ( true ) if sel _ data and sel _ data. get _ data ( ) : ( drag _ type, idval, handle, val ) = pickle. loads ( sel _ data. get _ data...
[ 0.13193665444850922, -0.3410187065601349, 0.5372961759567261, -0.604651927947998, 0.5584339499473572, -0.36609548330307007, -0.4284045696258545, -0.009483465924859047, -0.009219459258019924, -0.2799975574016571, -1.1390233039855957, -0.11523374915122986, 0.3412318527698517, 0.2634130418300...
def test _ list _ integer _ enumeration _ 1 _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 2. xsd ", instance = " nistdata / list / ...
[ -1.165480136871338, -1.1137771606445312, 0.5164202451705933, 0.7070739269256592, -0.4622317850589752, -0.22846421599388123, -0.12133198976516724, 0.43806788325309753, 0.6559343338012695, 0.456888884305954, -1.0181416273117065, 0.020985985174775124, 0.05368439480662346, 0.9988310933113098, ...
def test _ list _ decimal _ min _ length _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 1. xsd ", instance = " nistdata / list / deci...
[ -0.16023924946784973, -0.3664754033088684, 0.4157779812812805, 0.5032204985618591, -0.11374714970588684, -0.18726792931556702, -0.25896522402763367, -0.14813821017742157, 1.258000373840332, -0.29296326637268066, -0.9160000681877136, -0.49198463559150696, -0.7054479718208313, 0.446904271841...
def fit ( self, x, y = none, epochs : int = 10, batch _ size : int = 1, rand _ seed : int = 42 ) : if not self. _ is _ compiled : message = " " " you must compile your model with a loss function and optimizer before you can run the. fit method. " " " raise valueerror ( message ) if not isinstance ( x, np. ndarray ) : x...
[ 0.10096578299999237, 0.3758493661880493, 0.8733130693435669, 0.4134867787361145, 0.3317052721977234, -0.2920006811618805, -0.013592823408544064, -0.08570543676614761, 0.08573423326015472, 0.15997403860092163, -0.3537258207798004, 1.3134567737579346, 0.7193143367767334, 0.06697124987840652,...
def _ _ init _ _ ( self, msg _ type = none, tsx _ id = none, data = bytearray ( 20 ) ) : assert type ( data ) in ( bytearray, str ) if type ( data ) is str : self. _ buf = bytearray ( data ) else : self. _ buf = data if msg _ type! = none and tsx _ id! = none : assert type ( msg _ type ) is int if type ( tsx _ id ) is ...
[ 0.2502411901950836, 0.1135210245847702, 0.6450933814048767, -0.44340506196022034, -0.34505710005760193, -0.36275389790534973, -0.12798915803432465, -0.4177674353122711, 0.37644967436790466, -0.38096874952316284, -0.30532169342041016, 0.5926472544670105, -0.645122766494751, 0.54194897413253...
def compute _ stanzas _ and _ couplets ( self ) : for sonnet in self. sonnets : stanza = [ ] for i, line in enumerate ( sonnet ) : if i < len ( sonnet ) - 2 : stanza + = line if ( i + 1 ) % 4 = = 0 : self. stanzas. append ( stanza ) stanza = [ ] # last two lines form the couplet self. couplets. append ( sonnet [ - 2 ] ...
[ -1.0210150480270386, -0.2732153832912445, 0.4215908944606781, 0.24515564739704132, 0.5682110786437988, -0.33664312958717346, 0.3428090810775757, 0.4999177157878876, 0.7749359607696533, -0.18498410284519196, -0.14590775966644287, -1.0945830345153809, 0.4155014455318451, 0.725337564945221, ...
def evaluate ( self, values : iterable [ any ] ) - > any :...
[ -1.253527045249939, -0.03612794354557991, 0.05816586688160896, 0.2697236239910126, 0.9326276183128357, 0.1337434947490692, -0.34014633297920227, 0.4210311472415924, -0.5941123962402344, -0.7718794941902161, -0.6197930574417114, -0.23218496143817902, -0.382894366979599, 1.2952767610549927, ...
def test _ list _ integer _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ length _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 5. xsd ", instance = " nistdata / list / integer / schem...
[ -0.38847601413726807, -0.1439724713563919, 0.24229645729064941, 0.12330525368452072, -0.3398466408252716, -0.3918333649635315, 0.012925171293318272, -0.18567423522472382, 0.6887760758399963, 0.8436856269836426, -1.2826628684997559, -0.5587384700775146, -0.9449345469474792, 0.87656575441360...
def test _ atomic _ boolean _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 5. xsd ", instance = " nistdata / atomic / bo...
[ -0.29278919100761414, -0.37775757908821106, 0.46528512239456177, 1.0810121297836304, -0.22283802926540375, 0.4353938102722168, 0.633151113986969, -0.2731301486492157, -0.46529385447502136, 1.2238672971725464, -0.43966951966285706, 0.08077292144298553, -0.644188404083252, -0.213811174035072...
def setup ( self ) : user. query. delete ( ) message. query. delete ( ) self. client = app. test _ client ( ) self. testuser = user. signup ( username = " testuser ", email = " test @ test. com ", password = " testuser ", image _ url = none ) self. testuser2 = user. signup ( username = " testuser2 ", email = " other @ ...
[ 0.2647647261619568, 0.3250652551651001, 0.549022376537323, 0.4559340476989746, 0.6273667216300964, 0.02488006465137005, 1.227604627609253, -0.02067956142127514, -0.24826952815055847, 0.35104164481163025, -0.11961830407381058, -0.11045192182064056, -0.5309591889381409, 0.29194870591163635, ...
def test _ inputs _ count ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) self. assert _ util ( input _ page. table. get _ count _ title, " { } inputs ". format ( ...
[ 0.3467695713043213, 0.7851012349128723, 0.6759340167045593, 0.6437700986862183, 1.071782112121582, 0.24530431628227234, -0.11568648368120193, -0.4396197497844696, 0.053625527769327164, -0.39781099557876587, 0.6321704387664795, -0.6646437048912048, 0.06431696563959122, 0.047388914972543716,...
def flow ( self ) - > generator [ np. ndarray, none, none ] : index = list ( range ( self. x. shape [ 0 ] ) ) if self. shuffle : np. random. shuffle ( index ) idx = 0 run = true while run : # preallocation batch _ xs = np. zeros ( ( self. batch _ size, * self. x. shape [ 1 : ] ) ) batch _ ys = np. zeros ( ( self. batch...
[ -0.2533045709133148, -0.5970222353935242, 0.8070539236068726, -0.1735098958015442, -0.10416772216558456, 0.814984142780304, 0.6901772022247314, -0.36755800247192383, 0.7670000195503235, -0.33852192759513855, 0.17780059576034546, 0.7062196731567383, 0.27608662843704224, 0.5369524359703064, ...
def wrap _ ssl ( sock, * a, * * kw ) : return wrap _ ssl _ impl ( sock, * a, * * kw )
[ -0.15089872479438782, -0.06459901481866837, 0.3302600383758545, 0.2200331687927246, -1.5963330268859863, 0.09681881964206696, 0.14112120866775513, -0.9435422420501709, 0.9543027281761169, -0.2843979001045227, 0.23518037796020508, 1.4991401433944702, 1.0836477279663086, -0.16902637481689453...
def current _ payment _ status ( self ) : return self. _ current _ payment _ status
[ -0.21493394672870636, -1.267683744430542, 0.12696988880634308, -0.5135436058044434, -0.3659110963344574, 0.13485045731067657, -0.19514448940753937, 0.07103868573904037, -0.01842041313648224, -0.15077579021453857, 0.5743501782417297, 1.0879840850830078, 0.14400668442249298, 0.03053557500243...
def trade _ by _ strategy ( self, omega ) : pass
[ -0.40848004817962646, -0.508642852306366, 0.25827088952064514, 0.005996630527079105, 1.7553925514221191, -0.2991664707660675, 1.2831679582595825, -0.7848430275917053, 0.6353978514671326, 0.4735022783279419, -0.22366425395011902, 1.070122241973877, 0.6353391408920288, 0.049297843128442764, ...
def mkdir ( path ) : # remove space at the beginning path = path. strip ( ) # remove slash at the end path = path. rstrip ( " \ \ " ) # path exist? # true # false isexists = os. path. exists ( path ) # process if not isexists : # construct the path and folder # print path +'folder constructed!'# make dir os. makedirs (...
[ -0.5496441125869751, 0.014035085216164589, 1.0403406620025635, -0.5975236296653748, -0.21671828627586365, 1.1330829858779907, 0.7227993607521057, 0.11410495638847351, -0.29822710156440735, -0.5709279775619507, 0.018692174926400185, -0.7498233914375305, -0.04610311612486839, 0.0994560644030...
def confirm _ ipn _ data ( self, raw _ data ) : raw _ data + = " & cmd = _ notify - validate " req = urllib2. request ( self. submit _ url ) req. add _ header ( " content - type ", " application / x - www - form - urlencoded " ) result = urllib2. urlopen ( req, raw _ data ) ret = result. read ( ) if ret = = " verified ...
[ -0.37880104780197144, 0.3340470790863037, 0.6527228951454163, 0.3688662350177765, 0.06877794116735458, 0.6677942872047424, -1.3801838159561157, -0.4014773964881897, -0.14973613619804382, -0.6759064197540283, -0.9787740111351013, 0.7009897828102112, -0.34176453948020935, -0.1397706717252731...
def test _ atomic _ hex _ binary _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 3. xsd ", instance ...
[ -0.4540000259876251, -0.3288216292858124, 0.5980780720710754, 0.5533508658409119, -0.1720416098833084, 0.8342059254646301, -0.1554567664861679, 0.1239708811044693, -0.27174341678619385, 0.8432522416114807, -0.9781914353370667, -0.3631296753883362, -0.059666603803634644, 0.09609612077474594...
def clone ( ctx, # mandatory main parameter volumeid, # mandatory main parameter name, # optional main parameter newaccountid = none, # optional main parameter newsize = none, # optional main parameter access = none, # optional main parameter snapshotid = none, # optional main parameter attributes = none, # optional ma...
[ -0.09768868237733841, -0.6761623024940491, 1.1628624200820923, 0.5843694806098938, -0.7018928527832031, 0.1314546763896942, 0.012619946151971817, -0.4011172354221344, 0.7197079062461853, 0.4287591576576233, -0.013340193778276443, 0.6043264269828796, -0.4246244728565216, -0.6763014197349548...
def shuffle ( self ) : import random num _ cards = self. count ( ) for dummy in range ( 1, 3 ) : for i in range ( num _ cards ) : j = random. randrange ( i, num _ cards ) self. cards [ i ], self. cards [ j ] = self. cards [ j ], self. cards [ i ]
[ -1.044135570526123, 0.6201528906822205, 0.4232618510723114, -0.7413819432258606, 0.8527522087097168, 0.5213918089866638, 0.2803192734718323, 0.11193463951349258, 0.15861451625823975, 0.06179187819361687, -0.6842848062515259, 0.23147526383399963, -0.2755186855792999, -0.8419802784919739, ...
def test _ lotterynumbers _ view ( self ) : response = self. client. post ( url _ for ('postmylotterynumbers'), data = " 12 49 42 6 41 " ) self. assertequal ( response. status _ code, 200 )
[ 0.2825664281845093, -0.24019519984722137, 0.42883163690567017, -0.7981268763542175, -0.39603936672210693, 1.0032261610031128, -0.07338032126426697, 0.591151237487793, 0.4067627191543579, -1.9460370540618896, -1.072471261024475, -0.00008578725100960582, 0.49122560024261475, -0.0872170180082...
def getdraftthingtype ( self, thingtypeid, parameters = none ) : draftthingtypeurl = apiclient. draftthingtypeurl % ( self. host, thingtypeid ) r = requests. get ( draftthingtypeurl, auth = self. credentials, params = parameters, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ...
[ -1.9783092737197876, -0.11871643364429474, 0.5919833779335022, -0.4539850652217865, 0.17763780057430267, -0.4125761091709137, -0.7368137240409851, -1.3362408876419067, -0.07553510367870331, 0.5441476106643677, -0.10661017894744873, 1.4396741390228271, -1.4575285911560059, 0.374980449676513...
def test _ get _ post _ role _ admin ( self ) : # get one post : post = post. query. first ( ) post _ id = post. uuid. hex db. session. delete ( post ) db. session. commit ( ) # create # send request : response = self. client. get ( f'/ api / v2 / posts / { post _ id } ', headers = self. get _ api _ headers ( token = c...
[ 0.05653092637658119, 0.7024595141410828, 0.6062306761741638, -0.3263176381587982, 1.5928192138671875, 0.4625767171382904, -0.6162967681884766, -0.35471779108047485, 0.03695687651634216, -0.18126346170902252, -0.3539607524871826, 1.2663295269012451, 0.03883630782365799, 0.013794470578432083...
def update ( self, predicted : ndarray, labels : ndarray, step : int ) - > none : n : int = len ( labels ) acc = np. sum ( predicted = = labels ) / n self. _ accuracy. append ( acc ) if self. _ client : new _ data : ndarray = np. array ( [ acc, step ], dtype = np. float32 ) self. _ client. update _ plot ( self. _ id, n...
[ -0.5777945518493652, -0.07740786671638489, 0.18794995546340942, -0.24546045064926147, -0.6264858841896057, 0.7733101844787598, 0.28419700264930725, -0.0989692434668541, -0.8548805117607117, -0.19877080619335175, 0.4257136881351471, 1.1370774507522583, 0.058926455676555634, 0.61495947837829...
def test _ atomic _ hex _ binary _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 5. xsd ", instance = " nistdata / ...
[ 0.15721413493156433, 0.06633280962705612, 0.4081156849861145, 0.3446887135505676, -0.09968987852334976, 0.38713133335113525, -0.21136169135570526, -0.145038902759552, -0.12280002236366272, 0.37354859709739685, -0.8789601922035217, -0.7467368841171265, -0.5349256992340088, 0.517179667949676...
def weighted _ sum ( weights : tensor, axis : axeslike, values _ range : callable ) - > tensor : if not isinstance ( axis, int ) : axis = list ( axis ) values = values _ range ( np. array ( weights. shape ) [ axis ] ) shape = fill _ by _ indices ( np. ones _ like ( weights. shape ), values. shape, axis ) values = value...
[ 0.047483813017606735, 0.3542765974998474, 0.581193208694458, 0.5730010867118835, 0.24357999861240387, -0.3404191732406616, 0.5529658198356628, -0.5518630146980286, -0.20387482643127441, 0.20329436659812927, -0.223982036113739, 0.4785671830177307, -0.028105027973651886, -0.4840506315231323,...
def nearest _ neighbor ( data _ set, target ) : a = kdt ( ) for i in xrange ( data _ set. shape [ 0 ] ) : a. insert ( data _ set [ i ] ) return kdtsearch ( a. root, kdtnode ( target ), a. root, a. root - kdtnode ( target ) )
[ 0.20503516495227814, 0.22318990528583527, 0.4697767198085785, -0.1837979108095169, -1.0087438821792603, -0.5074798464775085, -1.2313916683197021, -0.6653183698654175, -0.2494237869977951, 0.14408300817012787, 0.9352420568466187, 0.7855855822563171, -0.33344635367393494, 0.3031611740589142,...
def annotation ( self ) : self. printstatus ( ) reference _ families = self. mtablenamereferencefamilies reference _ domains = self. mtablenamereferencedomains domains = self. mtablenamedomains min _ evidence = self. mannotationminevidence min _ overlap = self. mannotationminoverlap subset _ tables = self. msubsettable...
[ 0.2633363604545593, -0.5708704590797424, 0.8247055411338806, -0.3676372766494751, -0.07353153079748154, 0.030598413199186325, 1.1346540451049805, -0.38800257444381714, -0.11067656427621841, 0.37332555651664734, 0.19552306830883026, 0.5551212430000305, -0.29762861132621765, 0.92114651203155...
def test _ authenticated _ upload _ large _ file ( ) : # filename ='jazz3 _ solo. wav'filename ='eb _ comp. wav'user ='dakobedbard _ gmail'userid = " dakobedbard @ gmail. com " password ='1! ziontf'id _ token = authenticate _ user ( userid, password ) key ='{ } / { } '. format ( user, filename ) s3 = boto3. resource ('...
[ -0.30007269978523254, 0.3434179127216339, 0.9776302576065063, -0.024474862962961197, 0.39147862792015076, 0.9343923330307007, 0.22261866927146912, 0.15573382377624512, 0.5376036167144775, -0.392130583524704, -1.4450825452804565, -0.2371746003627777, 0.0372314490377903, 0.16677792370319366,...
def model _ testing _ with _ loocv _ single _ atlas ( ) : print'traing model with one atlas selected and test it with'+ \'leave - one - out cross - validation...'# - - directory config db _ dir = r'/ nfs / t2 / atlas / database'base _ dir = r'/ nfs / h1 / workingshop / huanglijie / autoroi'doc _ dir = os. path. join ( ...
[ -0.23432841897010803, -0.16827748715877533, 0.6658615469932556, 0.2502903640270233, 0.3138786852359772, 0.07699137181043625, 1.155493974685669, 0.8671622276306152, 0.6744510531425476, 0.30074137449264526, -0.3297232985496521, 0.027508769184350967, -0.07195845246315002, 0.6885043382644653, ...
def feedforward ( self, input _ act, weights, bias ) : self. input = input _ act self. z = input _ act. dot ( weights ) + bias self. output = actfun ( self. z, self. act _ func _ type ) return self. output
[ 0.3671683073043823, -0.6759728789329529, 0.2367154359817505, 0.1873874068260193, -0.17594188451766968, -0.4831125736236572, 1.8773680925369263, -0.37830957770347595, 0.33308538794517517, -0.7740956544876099, 0.21560432016849518, 1.6466468572616577, -0.2870946228504181, -0.2997254431247711,...
def read _ data ( file _ name ) : save _ log ('{ 0 } : : { 1 } '. format ( read _ data. _ _ module _ _, read _ data. _ _ name _ _ ) ) data = spark. read. csv ( file _ name, header = true, inferschema = true ) return data
[ 0.05392229184508324, -0.44609344005584717, 0.6725220680236816, 0.15273098647594452, -0.2924659550189972, 0.1582666039466858, -0.6737690567970276, 0.8919776678085327, -0.44318631291389465, -0.833318829536438, 0.052305735647678375, 0.7529056072235107, 0.02829092927277088, -0.1972939372062683...
def completeregister ( self, entry, widget _ names, security _ questions ) : accurate _ entry = true new _ entry = [ ] salt = uuid. uuid4 ( ). hex password = entry [ " password " ]. get ( ) hash _ function = hashlib. sha512 ( ) hash _ function. update ( ('% s % s'% ( salt, password ) ). encode ('utf - 8') ) hashed _ pa...
[ -0.10003624856472015, -0.02476627379655838, 0.7949444651603699, 0.2341473549604416, 0.5901230573654175, 0.47079935669898987, 0.6965776085853577, 0.3504231572151184, 0.1362777054309845, 0.9763742089271545, -0.6412824988365173, -0.8731467127799988, -0.2888886034488678, 0.805251955986023, -...
def find _ remote _ mesh ( self, event : str, gradient : bool = false, interpolate _ to : bool = true, check _ if _ exists : bool = false, hpc _ cluster = none, iteration : str = none, already _ interpolated : bool = false, validation : bool = false, ) - > pathlib. path : if hpc _ cluster is none : hpc _ cluster = get ...
[ 0.1863420307636261, 0.3938535153865814, 0.9514107704162598, 0.39841046929359436, 0.33620813488960266, 1.3151544332504272, 0.6614022254943848, -0.3969033658504486, -0.8234436511993408, -0.09357421845197678, -0.3698711395263672, 0.9324414730072021, -0.6829557418823242, 0.09645233303308487, ...
def showtestresults ( ) : user = getuser ( request, session ) questions = db. gettestquestions ( request. form. get ('problem') ) marks = 2 response ='' for quest in questions : ans = request. form. get ('problem'+ str ( quest ['id'] ) ) if ans = = str ( quest ['answer'] ) : marks + = 1 if ( marks * 100 / 20 > 75 ) : r...
[ 0.284220814704895, -0.044944677501916885, 0.46382230520248413, -0.6541815400123596, -0.27097469568252563, 0.23175927996635437, 0.6283795237541199, 0.13238400220870972, 0.1531214416027069, -0.4149948060512543, 0.20346246659755707, -1.0373315811157227, -0.11814087629318237, -0.21968854963779...
def test _ dispersion _ relation ( arr _ n _ 0, arr _ theta, arr _ lam _ z ) : n _ 0 = arr _ n _ 0 omega, m, k, k _ total, lam _ x = sbp. calc _ wave _ params ( arr _ n _ 0, arr _ theta, arr _ lam _ z ) # set up both sides of the equation lhs = omega * * 2 rhs = n _ 0 * * 2 * k * * 2 / ( k * * 2 + m * * 2 ) tolerance =...
[ 1.1150943040847778, -0.15329262614250183, 0.7315899133682251, 0.08991266787052155, 0.0916648656129837, 0.6295643448829651, 0.17149826884269714, 0.1383579969406128, 0.2837352454662323, -0.017321564257144928, -0.026605263352394104, -0.22959625720977783, -1.4217411279678345, 1.191117644309997...
def integrate ( self, origin, bounds ) : if self. gauss : gaussi = none gausstrace = none gausswidth = none # begin gaussian fit. broaden = 1 if bounds [ 0 ] > broaden - 1 and bounds [ 1 ] < len ( self. i ) - 1 - broaden : xb = [ bounds [ 0 ] - broaden, bounds [ 1 ] + broaden ] else : xb = bounds y = np. asarray ( self...
[ 0.6853860020637512, 0.104707270860672, 0.7576465010643005, 0.1377146989107132, -0.0209771990776062, -0.3479982316493988, 0.142759770154953, 0.06945279240608215, -0.1374024897813797, 0.18977749347686768, -0.5210874080657959, 0.5196370482444763, -0.39303016662597656, 0.37710103392601013, 0...
def load _ ui ( self ) : self. ui = ui _ calculator ( ) self. ui. setupui ( self )
[ 0.2498224526643753, 0.4758029878139496, 0.32404857873916626, 0.3532138168811798, -0.08842235058546066, 0.12993590533733368, 0.9220537543296814, 0.023603694513440132, 0.12638196349143982, -1.402029037475586, -0.4444558918476105, -1.0471869707107544, -0.2512381374835968, 0.5783656239509583, ...
def from _ numpy ( self, x ) : import torch return torch. from _ numpy ( x )
[ 0.5783881545066833, 0.15366002917289734, 0.09734276682138443, -0.13147114217281342, -0.379243940114975, 0.7418821454048157, -0.8337106108665466, -0.5224398970603943, 0.6388629674911499, 0.01777762360870838, -0.6311625242233276, 0.8724397420883179, 0.5084538459777832, -1.0073047876358032, ...
def test _ sync _ different _ branch ( synced _ repo _ and _ workspace ) : data = synced _ repo _ and _ workspace # create a branch in the source repo that is behind master data [ " source _ repo " ]. create _ head ( " my _ branch ", data [ " commits " ] [ 5 ] ) # modify manifest to track the new branch helpers. create...
[ 0.874828577041626, 0.5674477815628052, 0.6542983055114746, 0.16258852183818817, 0.44846296310424805, 0.8033661246299744, -0.14033202826976776, -0.36807742714881897, -0.06124689057469368, 0.0051288483664393425, -1.1058337688446045, 0.6947617530822754, 0.38303765654563904, 0.0395003296434879...