text
stringlengths
25
2.19k
embedding
listlengths
768
768
def run _ synapse _ simclr _ pretrain _ single _ epoch ( i _ epoch : int, args : argparse. namespace, ws : synapsesimclrworkspace ) - > list [ float ] : loss _ list = [ ] for i _ minibatch, minibatch _ data _ bundle in enumerate ( ws. train _ loader ) : # obtain two independent augmentations from the loaded data #.. no...
[ 0.09059469401836395, -0.13917525112628937, 0.8334697484970093, 0.09858334064483643, 0.46825891733169556, -0.19075068831443787, 0.869381308555603, 0.3500087559223175, 0.39393749833106995, 0.347104549407959, -0.5901309847831726, 0.5655161142349243, -0.04741889238357544, 0.5459140539169312, ...
def main ( ) : args = get _ args ( ) try : service _ instance = connect. smartconnect ( host = args. host, user = args. user, pwd = args. password, port = int ( args. port ) ) atexit. register ( connect. disconnect, service _ instance ) # connect. disconnect ( service _ instance ) session _ name = service _ instance. c...
[ -0.1135513037443161, -0.6579045057296753, 0.9709738492965698, 0.3467649519443512, 0.2850857675075531, -0.5226626992225647, -0.4125972390174866, 0.0024105370976030827, -0.13584457337856293, 0.6998040676116943, -0.15497995913028717, 0.33030998706817627, -0.9473724365234375, -0.45883071422576...
def id ( self, id ) : self. _ id = id
[ 0.057258181273937225, -0.8169193267822266, -0.2597116529941559, -0.2442382127046585, 0.30444735288619995, 1.319008469581604, -0.019123869016766548, 0.8602051138877869, 0.656208336353302, -0.3897295296192169, -1.0206947326660156, 0.026355067268013954, -0.27646732330322266, 0.730978667736053...
def prune ( self ) : # remove excess zero data points characteristic of a multi - event spectrum acquisition structure that occur inside peaks. # thermo data sometimes does this depending on acquisition parameters. if self. msevents > 1 : zstart = none zend = none for x, intensity in enumerate ( self. i ) : if intensit...
[ 0.6326131224632263, -0.298023521900177, 0.7381989359855652, -0.07010495662689209, -0.26309701800346375, 0.12454697489738464, 0.8534946441650391, 0.6817278861999512, 0.40886080265045166, 0.5627685785293579, -0.07934392243623734, -0.17099840939044952, -0.6359703540802002, -0.3303804397583008...
def get _ attr _ name ( self, table _ name : str = none ) - > str : if not self. auth _ model : self. auth _ model = self. get _ entity _ from _ ext ( table _ name ) if hasattr ( self. auth _ model, " _ _ mapper _ _ " ) : # sqlalchemy is the orm being used return self. auth _ model. _ _ mapper _ _. primary _ key [ 0 ]....
[ -1.1349122524261475, -0.33721277117729187, 0.8549923300743103, 0.817916750907898, -0.8032304048538208, 0.43971267342567444, 0.032781120389699936, 0.1782943308353424, 0.545503556728363, 0.5378674268722534, 0.7741054892539978, 0.13131406903266907, 0.3446500599384308, 0.44796785712242126, 0...
def scan ( self, x, z, non _ sequences, i, outputs _ info, w _ re, w _ in, b, go _ backwards = false, truncate _ gradient = - 1 ) : self. outputs _ info = outputs _ info self. non _ sequences = non _ sequences self. w _ re = w _ re self. w _ in = w _ in self. b = b self. go _ backwards = go _ backwards self. truncate _...
[ -0.23644493520259857, -0.05238683521747589, 0.5431416630744934, 0.500005841255188, -0.45561766624450684, -0.8115788102149963, 0.6934526562690735, -0.24222172796726227, -0.6944485902786255, -0.05628596246242523, -0.231548011302948, -0.41523295640945435, -0.9389610886573792, -0.0272504296153...
def graph _ query _ vertices ( self, query _ dict = none, root _ id = none, depth = none, direction = none, edge _ query _ dict = none ) : pass
[ -0.5357658863067627, 0.6149734258651733, 0.2826986014842987, 0.20329980552196503, -0.409591406583786, 0.04618620127439499, -0.18348070979118347, 0.3585163652896881, 0.5059875249862671, 0.10162670165300369, 0.34158357977867126, 0.9875858426094055, -0.39184677600860596, -0.49402496218681335,...
def fill ( self, text = " " ) : self. topbuffer ( ). write ( " \ n " + " " * self. _ indent + text )
[ -0.029907505959272385, -0.1864347606897354, 0.5961005091667175, 0.17559868097305298, -0.36302298307418823, 0.9479039907455444, -0.15173889696598053, -0.1788320094347, -0.01202984806150198, -0.8721108436584473, -0.23962201178073883, 0.4851903021335602, -1.2424604892730713, 0.964172899723053...
def compute _ equirectangular _ pano _ size ( imsize, fov ) : pano _ height = int ( imsize * 180 / fov ) pano _ width = pano _ height * 2 return ( pano _ width, pano _ height )
[ -0.9281646013259888, -0.3928179442882538, 0.3593136966228485, -0.09227623790502548, -1.256107211112976, -0.15159720182418823, 0.008008552715182304, 0.45341745018959045, 0.03376564756035805, 0.7079638838768005, -0.6572537422180176, -0.366061806678772, 0.14832182228565216, 0.1462439298629760...
def _ _ init _ _ ( self, temboo _ session ) : super ( searchbycategory, self ). _ _ init _ _ ( temboo _ session,'/ library / google / documents / searchbycategory')
[ -0.002105195540934801, 0.34340396523475647, 0.48817679286003113, 0.3781416416168213, 0.5658676028251648, -0.3712790906429291, 0.8153367638587952, -0.8330112099647522, -0.49297818541526794, -0.06466148793697357, -0.30513426661491394, -0.6808630228042603, 0.3715234100818634, 1.08343434333801...
def _ _ init _ _ ( self ) - > none : self. webdriver _ path ='assets / chromedriver. exe'self. extension _ path ='assets / tampermonkey. crx'self. driver = self. webdriver ( ) # start new webdriver.
[ 0.6640715003013611, -0.7880420088768005, 0.3084111511707306, 1.4326436519622803, -0.028983252122998238, -0.03843413665890694, 0.33072248101234436, 0.8207459449768066, 0.30863940715789795, -0.1487198919057846, -0.7717452049255371, 0.29331257939338684, -0.09174530953168869, 0.678547382354736...
def upload _ entities _ from _ tsv ( namespace, workspace, entities _ tsv _ file ) : res = firecloud _ api. upload _ entities _ tsv ( namespace, workspace, entities _ tsv = entities _ tsv _ file ) return res
[ -0.8274142146110535, -0.4210096299648285, 0.3525440990924835, -0.961183488368988, 0.3142421245574951, 0.14749889075756073, -0.7977209687232971, -0.12368761748075485, -0.43701231479644775, 0.8598889112472534, -0.3259350657463074, 0.34420686960220337, 0.5328887104988098, 0.7083426713943481, ...
async def uploadsettings ( self, ctx ) : if os. path. exists ( " json / " ) : shutil. make _ archive ( " json / ", " zip ", ". / ", " json " ) if os. path. exists ( " json. zip " ) : await ctx. send ( file = discord. file ( fp = " json. zip ", filename = f'json. zip') ) else : await ctx. send ('can not find the setting...
[ -0.7987021803855896, 0.5305741429328918, 0.9320122599601746, -0.2538246512413025, 0.5504496097564697, 0.03761843964457512, -0.3993375301361084, -0.28704845905303955, -0.1982046514749527, 1.0762126445770264, -0.6849047541618347, 0.2715962827205658, -0.7171975374221802, 0.49057087302207947, ...
def read _ box ( self ) : for _ in range ( 4 ) : self. file. readline ( ) box = [ float ( jx. split ( ) [ 1 ] ) - float ( jx. split ( ) [ 0 ] ) for jx in [ self. file. readline ( ) for _ in range ( 3 ) ] ] self. file. readline ( ) return box
[ -0.24238073825836182, -0.10626749694347382, 0.7254794836044312, -0.7746075987815857, 0.11869768053293228, 0.6519299745559692, -0.04279070347547531, -0.14697644114494324, -0.996060311794281, -0.04478153958916664, -0.5699612498283386, -0.308948278427124, -0.16310051083564758, 0.0851396769285...
def add _ testsuite _ to _ project ( client, project _ id, suite _ name ) : data = {'name': suite _ name,'description':'' } try : suite = client. send _ post ('add _ suite /'+ project _ id, data ) return suite except apierror as e : print ('add suite error : ', e ) return none
[ -0.4922170341014862, 0.0038606419693678617, 0.5424538850784302, -0.04388447478413582, 0.43686774373054504, 0.6826017498970032, -0.8205832242965698, -0.8167105317115784, 0.1579219549894333, 0.5332996249198914, 0.04599651321768761, 0.628722608089447, -1.5460585355758667, 0.1844753473997116, ...
def imshow _ gray ( image, rescale = false ) : if not rescale : assert np. max ( image ) < = 1,'max value must be < = 1'assert np. min ( image ) > = 0,'max value must be > = 0'plt. imshow ( image, cmap = plt. get _ cmap ('gray'), vmin = 0, vmax = 1, interpolation ='none') else : plt. imshow ( image, cmap = plt. get _ c...
[ -0.6681169271469116, 0.8047667145729065, 0.5395914316177368, 0.29631367325782776, -0.03909313306212425, 0.5971839427947998, 0.5286750793457031, 0.201655775308609, 0.8443153500556946, -0.07960667461156845, 1.0046299695968628, 0.6587830781936646, -0.7433322072029114, 0.8560020923614502, 0....
def write _ generator _ data ( self, file ) : for generator in self. case. generators : vals = [ ] vals. append ( generator. bus. _ i ) # i vals. append ( " 1 " ) # id vals. append ( generator. p ) vals. append ( generator. q ) vals. append ( generator. q _ max ) vals. append ( generator. q _ min ) vals. append ( gener...
[ -0.8951311111450195, -0.48240378499031067, 0.8279711604118347, -0.6314420700073242, 0.14739134907722473, 0.9734041094779968, 0.7303475141525269, 0.11936827003955841, -1.4975848197937012, -0.16397175192832947, -0.46151208877563477, -0.08789997547864914, -0.5099356174468994, 1.15395665168762...
def publishtoall ( self, key, value ) : for p in self. plugins : p. _ _ setattr _ _ ( key, value )
[ -1.0374064445495605, -1.1546307802200317, 0.34634044766426086, -0.2568105161190033, 0.29571259021759033, -0.1954493522644043, -0.4152623116970062, -0.15395264327526093, 0.20000289380550385, 0.9729167819023132, -0.4068286120891571, 1.0289952754974365, 0.14550839364528656, 1.124927282333374,...
def make _ upgrade ( self, player : player, post _ ids = ( ), train _ ids = ( ) ) : with self. _ lock : # get posts from request : posts = [ ] for post _ id in post _ ids : if post _ id not in self. map. post : return result. resource _ not _ found post = self. map. post [ post _ id ] if post. type! = posttype. town : ...
[ -1.0509978532791138, -0.48819902539253235, 0.9113576412200928, 0.28445571660995483, 0.12444881349802017, 0.14719046652317047, -0.3713493049144745, -0.4871272146701813, -0.9820463061332703, -0.05327897146344185, -0.16861575841903687, -0.34277859330177307, 0.553978681564331, -0.3000853657722...
def get _ asr _ hypotheses ( self, flac _ file _ name ) : baseurl = " http : / / www. google. com / speech - api / v2 / recognize? xjerr = 1 & client = chromium & lang = % s & maxresults = % d & key = % s " % ( self. language, self. maxresults, self. key ) header = { " user - agent " : " mozilla / 5. 0 ( x11 ; u ; linu...
[ -0.7133469581604004, -0.25480249524116516, 0.6531484127044678, -0.607033371925354, 0.13080428540706635, -0.12644769251346588, -0.8137878179550171, -0.17920944094657898, -0.9575738906860352, 1.037784218788147, -0.9386091828346252, 0.575374186038971, -0.2103894203901291, 0.6390154957771301, ...
def predicates ( ) : return { }
[ -0.5071575045585632, -0.3034101128578186, 0.39635205268859863, -0.209852933883667, -1.3374780416488647, -0.44846096634864807, 0.04101056233048439, 0.569139301776886, -0.21101725101470947, -0.5680598020553589, -1.3498467206954956, -0.32237598299980164, -0.6707941293716431, 0.288790851831436...
def save ( self ) : if self. project _ key is none : raise exception ( " this manifest object wasn't created from a project, cannot be saved back " ) self. client. _ perform _ empty ( " put ", " / projects / % s / app - manifest " % self. project _ key, body = self. raw _ data )
[ -0.3033628463745117, -0.4793694019317627, 0.4016474783420563, 0.06613416224718094, 0.020376861095428467, 0.5551433563232422, -0.46622222661972046, 0.4134853184223175, 0.20709657669067383, -0.03498370200395584, -0.7575628757476807, -0.09478098899126053, -1.0064411163330078, 0.11996080726385...
def to _ dict ( self ) : return { k : v. to _ dict ( ) if isinstance ( v, attrdict ) else v for k, v in self. _ _ dict _ _. items ( ) }
[ -0.798176109790802, -0.6281599402427673, 0.4048214554786682, -0.8272574543952942, -0.9842535257339478, -0.3324489891529083, -0.3540543019771576, 0.09321016818284988, 0.38276976346969604, -0.3156009018421173, -0.2774854600429535, 0.3784956634044647, 0.3170508146286011, 1.1565616130828857, ...
def apply _ options ( builder, options, pred = lambda s : s. startswith ( " - " ) ) : for ( key, values ) in dict ( options ). iteritems ( ) : if not isinstance ( key, types. stringtypes ) : raise typeerror ( " keys must be strings, not % r " % ( key. _ _ class _ _. _ _ name _ _, ) ) elif pred ( key ) : if isinstance (...
[ -0.3507433235645294, 0.5960935354232788, 0.6096733808517456, 0.6629061102867126, -0.05309803783893585, 0.02787676453590393, -0.0751805379986763, 0.6591975688934326, 0.18090125918388367, 0.14551836252212524, 0.28441888093948364, 0.03747008740901947, -0.07822493463754654, 1.1275808811187744,...
def load _ user ( user _ id ) : return user. objects. get ( id = user _ id )
[ 0.39792898297309875, -0.025356490164995193, 0.25355204939842224, 0.16458913683891296, -0.2908465564250946, -0.05268053337931633, -0.5345541834831238, -0.5937861204147339, 0.17636260390281677, -0.3491610288619995, -0.3124419152736664, 0.32291483879089355, -0.01950027048587799, -0.0653518363...
def test _ list _ integer _ min _ length _ 3 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 4. xsd ", instance = " nistdata / list / ...
[ -0.048194605857133865, -0.44947922229766846, 0.34551844000816345, 0.28527313470840454, -0.7055085301399231, 0.09327839314937592, -0.2928593158721924, -0.026956602931022644, 0.7130617499351501, 0.4580479562282562, -1.420583724975586, -0.3463127017021179, -0.9420256614685059, 0.2611171305179...
def imagetostring ( im, timestamp = 0 ) : adict = { } ; adict [ " timestamp " ] = timestamp ; adict [ " width " ] = im. shape [ 1 ] ; adict [ " height " ] = im. shape [ 0 ] ; adict [ " channels " ] = im. shape [ 2 ] ; adata = im. reshape ( im. shape [ 1 ] * im. shape [ 0 ] * im. shape [ 2 ] ) ; adict [ " data " ] = ada...
[ -0.44615718722343445, -0.3824935853481293, 0.7048220038414001, -1.8782529830932617, -1.2806040048599243, -1.0301549434661865, -0.5594632625579834, -0.2440287172794342, 0.3828295171260834, 1.055541753768921, -0.6232463121414185, -0.37413159012794495, 1.0369629859924316, -0.3378300666809082,...
def _ _ init _ _ ( self, win, angle, velocity, height ) : self. proj = projectile ( angle, velocity, height, 0 ) self. marker = circle ( point ( 0, height ), 2 ) self. marker. setfill ( color _ rgb ( randrange ( 0, 256 ), randrange ( 0, 256 ), randrange ( 0, 256 ) ) ) self. marker. setoutline ( " red " ) self. marker. ...
[ -0.029576484113931656, -0.05963486060500145, 0.6702615022659302, -0.33640366792678833, -0.14868856966495514, 0.8258485198020935, -0.17070358991622925, -0.14232265949249268, 0.33571773767471313, 0.3158194124698639, -0.2592150568962097, 0.06801815330982208, -0.4034557342529297, 0.39054399728...
def window _ rd ( self ) - > int : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " rd _ window " )
[ -0.5496200919151306, 0.20507225394248962, 0.4212164282798767, -0.016063030809164047, -0.16031040251255035, 0.33839496970176697, 0.2126079648733139, 0.29287371039390564, 0.3956110179424286, -0.3471846878528595, 0.8125312328338623, 1.2585653066635132, -0.5203779935836792, 0.46641775965690613...
def calculate _ true _ values ( game ) : xp = [ 0, game. size + 1 ] fp = [ - 1. 0, 1. 0 ] states = [ s for s in game. states if s not in game. terminal _ states ] values = np. interp ( np. arange ( game. size + 2 ), xp, fp ) [ 1 : - 1 ] true _ values = pd. series ( values, index = states ) return true _ values
[ -0.088060662150383, 0.5394576191902161, 0.5813122987747192, -0.4393778443336487, -0.23991259932518005, -0.26322242617607117, -0.6459702849388123, 0.3119436800479889, -0.18047235906124115, 0.455146461725235, -0.4946943521499634, -0.06825055927038193, -0.1692158579826355, -0.4450879096984863...
def listusers ( self ) : catalog = gettoolbyname ( self, toolname ) results = catalog ( object _ implements = ( user _ ifaces. imembraneuserauth. _ _ identifier _ _ ) ) value = [ ] for r in results : key = r. getusername is not none and r. getusername. strip ( ) \ or r. getuserid value. append ( ( key. lower ( ), ( r. ...
[ -0.2502133846282959, -0.5310928225517273, 0.4607807993888855, -0.24340498447418213, -0.7680929899215698, -0.10861673206090927, 0.025242682546377182, -0.8904264569282532, 0.25800439715385437, 0.47814619541168213, 0.005706697702407837, 0.7761454582214355, -0.3327101767063141, 1.1803735494613...
def resolve ( self, context, provider ) : while self. lookups : resolved _ lookups = resolve _ lookups ( self. lookups, context, provider ) self. replace ( resolved _ lookups )
[ -0.9432506561279297, 0.30707672238349915, 0.2835870087146759, 0.19281005859375, 0.8411754369735718, -0.46726271510124207, -0.7397962808609009, 0.9017341136932373, 0.7109950184822083, -0.6025494933128357, -0.6819398999214172, -0.24660396575927734, -0.44923731684684753, -0.6840107440948486, ...
def _ _ call _ _ ( self, simcatalog, field, plot _ diag = false, ktest = none, bands = ['acs _ f435w ','acs _ f606w ','acs _ f775w ','acs _ f850lp'], sn _ lolim = {'acs _ f850lp': 5. 0 }, sn _ hilim = { }, interpolate = false, dznew = 0. 1 ) : # initialize i - dropout color criteria self. lcc = lcc. colorcrit ( lib = l...
[ 0.7087530493736267, 0.4576472043991089, 0.5865834951400757, 0.26440665125846863, -0.3494969308376312, -0.19241274893283844, 0.6129267811775208, 0.17263351380825043, -0.0920398160815239, -0.41236165165901184, -0.364864319562912, 0.2932705879211426, 0.8461528420448303, 0.4382210373878479, ...
def count _ stems ( corpus ) : return count _ types ( pre. stem ( pre. lemmatize ( corpus ) ) )
[ 0.2314521074295044, 0.5018025040626526, 0.42135244607925415, -0.16973359882831573, 0.4117125868797302, 0.06757565587759018, 0.19155938923358917, 1.2802457809448242, -0.5139779448509216, 0.12640278041362762, -1.2577086687088013, -0.5650489926338196, 0.07933210581541061, 0.5412655472755432, ...
def invoice _ number ( self ) : return self. _ invoice _ number
[ 0.2569580078125, -0.5871428847312927, 0.6921781301498413, 0.7883054614067078, 0.3331037759780884, -0.3585413992404938, 0.9570505023002625, 0.8781872987747192, 0.1752084195613861, -1.359265685081482, -0.2175178974866867, 0.8838673830032349, 0.23362666368484497, -0.2051570862531662, 0.7532...
def setup _ hook ( config ) : metadata = config ['metadata'] requires = metadata. get ('requires _ dist ','' ). split ('\ n') if sys. platform = ='win32': requires. append ('pywin32') requires. append ('wmi') elif sys. platform. startswith ('linux') : requires. append ('pyudev') metadata ['requires _ dist'] = " \ n ". ...
[ -0.7323336601257324, -0.3165377974510193, 0.4490673542022705, -0.3318668305873871, 0.9098716378211975, 0.7457647323608398, -0.06777331978082657, 1.0887330770492554, -0.508590817451477, 1.2844454050064087, 0.17588253319263458, 0.29259589314460754, 0.22427824139595032, 1.0488535165786743, ...
def get _ steps ( self, as _ np = false ) - > union [ list, ndarray ] : if as _ np : return np. array ( self. _ steps ) return self. _ steps
[ -0.7146565318107605, 0.2712441682815552, 0.38246390223503113, 1.075045108795166, 0.9118274450302124, 0.28678470849990845, -0.4997082054615021, -0.6951765418052673, 0.34038856625556946, -0.26237621903419495, -0.3109145164489746, 0.3018853962421417, 0.20331698656082153, 1.278168797492981, ...
def test _ suspend _ hooks ( self ) : example _ py2 _ check = false with standard _ library. suspend _ hooks ( ) : # an example of fragile import code that we don't want to break : try : import builtins except importerror : example _ py2 _ check = true if utils. py2 : self. asserttrue ( example _ py2 _ check ) else : s...
[ 0.1159277930855751, -0.011874031275510788, 0.3262594938278198, 1.370126485824585, 0.38934770226478577, 1.5575436353683472, 0.6868276596069336, -0.25668415427207947, -0.37887275218963623, 0.04019108787178993, -0.9740703701972961, -0.048243869096040726, -0.6504337191581726, -0.31960409879684...
def initbeta ( im, frac =. 25, nmax = 5 ) : beta _ max = max ( im. shape [ 0 ] / ( ( nmax + 1. ) * *. 5 ), im. shape [ 1 ] / ( ( nmax + 1. ) * *. 5 ) ) # print im. shape [ 0 ] / ( ( nmax + 1. ) * *. 5 ), im. shape [ 1 ] / ( ( nmax + 1. ) * *. 5 ) beta0 = min ( frac * ( ( nmax + 1. ) * *. 5 ), beta _ max ) return [ beta...
[ 0.029468588531017303, -0.818832516670227, 0.5298332571983337, -0.09143645316362381, 0.38229605555534363, -0.010249470360577106, 0.8320067524909973, -0.946993887424469, -0.06726802885532379, 0.2686571180820465, -0.83921879529953, 0.11690156906843185, 0.206099733710289, 1.1027028560638428, ...
def globmatch ( self, patterns : str | sequence [ str ], *, flags : int = 0, limit : int = _ wcparse. pattern _ limit, exclude : str | sequence [ str ] | none = none ) - > bool : return glob. globmatch ( self. _ translate _ path ( ), patterns, flags = self. _ translate _ flags ( flags ), limit = limit, exclude = exclud...
[ 0.16004054248332977, 0.6964552998542786, 0.8185329437255859, 0.16725370287895203, -0.39861971139907837, 1.241326928138733, 0.6226897239685059, -0.17278315126895905, 0.4178664982318878, -0.1975700557231903, 0.0061131310649216175, 0.10574205964803696, -1.1495035886764526, -0.517905056476593,...
def finalize _ hypos ( step, bbsz _ idx, eos _ scores ) : assert bbsz _ idx. numel ( ) = = eos _ scores. numel ( ) # clone relevant token and attention tensors tokens _ clone = tokens. index _ select ( 0, bbsz _ idx ) tokens _ clone = tokens _ clone [ :, 1 : step + 2 ] # skip the first index, which is eos assert not to...
[ 0.5158359408378601, 0.12766647338867188, 0.9013141393661499, -0.5257443189620972, -0.30724871158599854, -0.7950883507728577, 1.2430367469787598, 0.3216315805912018, 0.012767842039465904, 0.5755216479301453, -0.1416824460029602, -0.09241581708192825, 0.3241076171398163, -0.2034406214952469,...
def update _ leases ( machine _ type _ key, responses ) : machine _ type = machine _ type _ key. get ( ) if not machine _ type : logging. warning ('machinetype no longer exists : % s ', machine _ type _ key ) return lease _ request _ map = { request. client _ request _ id : request for request in machine _ type. leases...
[ -0.37908995151519775, -0.5011500716209412, 0.6587395071983337, -0.4017552137374878, 0.2816627323627472, 0.27033543586730957, -1.1183792352676392, 0.13390964269638062, 0.0348890945315361, 0.3281157314777374, -0.07863741368055344, 0.040664419531822205, 0.1778474748134613, 0.40343424677848816...
def test _ create _ comment ( self ) : response = self. client. post ('/ api / v1 / comment ', data = json. dumps ( self. comment _ data ), content _ type ='application / json') res = json. loads ( response. data. decode ( ) ) self. assertequal ( response. status _ code, 201 )
[ -0.2360791712999344, -0.21870790421962738, 0.4420734941959381, -0.1722559630870819, 1.5547045469284058, 0.8833706974983215, -0.477708101272583, 0.44417980313301086, -0.46131959557533264, -0.14467880129814148, -0.877155601978302, -0.32968780398368835, -0.2035103291273117, -0.389846712350845...
def subtract _ ( self, path : str, payload : dict, rev : int ) - > dict : return self. _ http. patch ( path, payload, rev = rev )
[ -0.7028705477714539, -0.3958442211151123, 0.8679884076118469, -1.1986169815063477, -1.1039389371871948, 0.673969030380249, 0.20267024636268616, 0.48660096526145935, -0.6862847805023193, -0.3294878304004669, -0.15326285362243652, -0.25144097208976746, -0.7642219066619873, -1.604719281196594...
def tsp ( bitmask, pos ) : min _ cost = float ('inf') # all vertices have been explored 11111111 if bitmask = = ( ( 1 < < n ) - 1 ) : # cost to go back to 0 node return graph [ pos ] [ 0 ] # if already computed if memo [ bitmask ] [ pos ]! = - 1 : return memo [ bitmask ] [ pos ] # for every vertex for i in range ( n ) ...
[ 0.30020084977149963, 0.6416081786155701, 0.6492488980293274, -0.023417215794324875, -0.187480628490448, -1.461017370223999, 0.5121381878852844, -0.4669392704963684, 0.5138198733329773, 1.0658055543899536, -0.5712032318115234, -0.33280837535858154, -0.7465091347694397, -0.40551167726516724,...
def install _ rule ( switch, pattern, actions, priority, idle _ timeout ) : inst. stats. tally _ install ( switch ) if not experiment : inst. send _ flow _ command ( switch, openflow. ofpfc _ add, pattern, priority, ( idle _ timeout, actions, uint32 _ max ), openflow. ofp _ flow _ permanent ) return
[ 0.6285724639892578, 0.2112710177898407, 0.4773029088973999, -0.16413471102714539, 1.5104787349700928, 0.37131622433662415, 0.4307328164577484, 0.09638495743274689, 0.6572839021682739, 0.016847332939505577, 0.6197104454040527, -0.4194526672363281, -0.46630948781967163, -0.00775042874738574,...
def get _ default _ checksum _ algorithm ( ) : return d1 _ common. const. default _ checksum _ algorithm
[ 0.5975165367126465, 0.7405089139938354, 0.3706495761871338, 0.6556531190872192, 0.18793325126171112, 0.8275530934333801, 0.8342899680137634, 0.3038938045501709, -0.3999105989933014, 0.12202106416225433, -0.40345364809036255, 0.6076207160949707, 0.13557884097099304, 0.32830512523651123, -...
def update _ walkup _ sheets ( tsca _ id ) : files = glob. glob ('/ users / mimoun / production _ fc / metadata _ exports / walkupseq _ files / tsca *') dfs = [ ] for f in files : dfs. append ( pd. read _ table ( f, comment ='# ', encoding ='latin1') ) combined = pd. concat ( dfs, axis = 0 ) fname = " / users / mimoun ...
[ -0.8812705874443054, -0.6317399740219116, 0.5931635499000549, 0.131575807929039, -0.35544446110725403, 0.2345583736896515, 0.7395947575569153, 0.4776327311992645, -0.15741218626499176, 0.5531055927276611, 0.6638772487640381, -0.13198159635066986, 0.2679136395454407, 0.22734732925891876, ...
def test _ mandatory _ constants _ defined ( self ) : import ots. worker. conductor. conductor _ config as c c. debug _ log _ file c. test _ definition _ file _ name c. testrun _ log _ file c. testrun _ log _ cleaner c. conductor _ workdir c. testrunner _ workdir c. cmd _ testrunner % ( 1, 2, 3, 4, 5, 6, 7, 8 ) c. test...
[ -0.33992838859558105, -0.13359571993350983, 0.8848804831504822, 0.25167572498321533, 0.23332642018795013, 0.9427396059036255, 0.3533864915370941, -0.16357313096523285, -0.9456672668457031, 0.16919106245040894, -0.576637327671051, -0.437867671251297, -0.2782849073410034, 0.9442421197891235,...
def subtotal ( self ) : return self. _ subtotal
[ 0.7321217656135559, -0.14757254719734192, 0.3643399477005005, -0.49792400002479553, -0.08658577501773834, 0.6020451188087463, 0.3139745593070984, -0.7203299403190613, -0.17806513607501984, -0.28566569089889526, -1.2702674865722656, 0.9321678876876831, -0.056628722697496414, -2.067145586013...
def test _ classmethod _ set _ parameters ( self ) : assert jungle. f _ max = = 800. 0
[ -0.891228437423706, 0.7850199937820435, 0.40447697043418884, 0.7198134064674377, 1.194330096244812, -0.19817021489143372, 0.18014438450336456, -0.5743383169174194, -0.1406620591878891, 0.19959872961044312, -0.4822046160697937, 0.28589168190956116, 0.9647321105003357, 1.3850916624069214, ...
def add _ subsegment ( self, subsegment ) : super ( subsegment, self ). add _ subsegment ( subsegment ) self. parent _ segment. increment ( )
[ -0.23881736397743225, 0.5123292803764343, 0.697931170463562, 0.4249650239944458, 0.5745289325714111, 0.5450103878974915, 0.5408920049667358, -0.42385104298591614, 0.32053008675575256, -1.361655354499817, -1.2697746753692627, -0.5874626040458679, 0.3230736255645752, 0.2023857831954956, -0...
def compare ( self, node, new _ node ) : if new _ node. get _ value ( ) = = node. get _ value ( ) : return 0 elif new _ node. get _ value ( ) < node. get _ value ( ) : return - 1 else : return 1
[ -0.6634416580200195, -0.5189186334609985, 0.7440510392189026, -0.32585933804512024, 0.1511501669883728, -0.09304109215736389, -0.6252316236495972, -0.36003655195236206, -0.8423975706100464, 0.15781788527965546, 0.5274775624275208, 0.8091544508934021, -0.32983922958374023, 1.255403637886047...
def assert _ after _ create ( self, entity ) : pass
[ -0.47187069058418274, -0.46483275294303894, 0.3365618884563446, 0.057033684104681015, 0.9062229990959167, 1.3761664628982544, 0.6476532816886902, -0.3446802496910095, -0.07700284570455551, -0.7374794483184814, -0.4222387969493866, -0.46031442284584045, 0.08823080360889435, 1.29956555366516...
def verify _ slider _ value ( self, locator, expected ) : slider = self. state. _ get _ typed _ item _ by _ locator ( slider, locator ) self. state. _ verify _ value ( float ( expected ), slider. value )
[ -0.21863770484924316, -0.5067431926727295, 0.30544015765190125, 0.35728490352630615, 0.8297510147094727, 0.3076869547367096, -0.3842531740665436, -0.1694766879081726, 0.13846996426582336, -0.09546200186014175, -0.5879736542701721, 0.4409354627132416, 0.6547430157661438, 0.38947415351867676...
def rotate _ point _ z ( xyz, theta, radians = false ) : if not radians : theta = np. radians ( theta ) cost = np. cos ( theta ) sint = np. sin ( theta ) rz = np. array ( [ [ cost, sint, 0. 0 ], [ - sint, cost, 0. 0 ], [ 0. 0, 0. 0, 1. 0 ] ] ) return np. matmul ( xyz, rz )
[ -0.5725386738777161, 0.06273650377988815, 0.11256247758865356, 0.04900558292865753, 0.637773334980011, -0.8966199159622192, -0.5924842357635498, 0.4896593689918518, 0.8159999251365662, 0.30491042137145996, 0.015311190858483315, 0.1627316027879715, -0.4144649803638458, -0.7700987458229065, ...
def my _ function _ sum ( * args ) : return sum ( args )
[ -0.619420051574707, -0.13133840262889862, 0.287900447845459, -0.11937402188777924, 0.8325823545455933, -0.6266371607780457, 0.024033043533563614, 0.017144741490483284, -1.0603928565979004, -0.24374882876873016, -0.6401796340942383, 0.47724655270576477, -0.3714616298675537, -0.2572540342807...
def test _ atomic _ hex _ binary _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 3. xsd ", instance ...
[ 0.31650492548942566, 0.04105699807405472, 0.5171278715133667, 0.4422794580459595, -0.014087552204728127, 0.7624323964118958, -1.053152322769165, 0.009008343331515789, 0.6697179675102234, 0.21692974865436554, -0.4220826327800751, -0.4270681142807007, -0.5255780816078186, -0.0073079974390566...
def _ read _ htuple ( self, items, subtypes ) : nitems = self. _ read _ int ( ) ntypes = len ( subtypes ) for i in xrange ( nitems ) : items. append ( self. read _ value ( subtypes [ i % ntypes ] ) ) return items
[ -1.4246301651000977, 0.8022394180297852, 0.7965337634086609, 0.3277360200881958, 0.3891715109348297, 0.1251598596572876, -0.3483814001083374, -0.35551944375038147, -1.24163019657135, 0.20346033573150635, -0.5248563289642334, -0.4937828481197357, -0.8042857646942139, -0.869199275970459, 0...
def retrieveok ( ) - > bool : return _ _ responsestatuscode = = 2000
[ 0.7771361470222473, -0.7587162852287292, 0.5497506260871887, 0.7926560044288635, 0.2958783805370331, -0.5555534362792969, -0.12169253826141357, 0.2737140655517578, 0.7964093685150146, -0.8130159378051758, -1.2200934886932373, -0.0455273874104023, -0.1542975902557373, -0.24433425068855286, ...
def test _ atomic _ hex _ binary _ pattern _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 1. xsd ", instance = " nistdata / a...
[ -0.16184364259243011, -0.3804924190044403, 0.5097566843032837, 0.8195375800132751, -0.1128065288066864, 0.39428600668907166, 0.38760533928871155, 0.171010822057724, -0.23205004632472992, 0.5545209646224976, -0.6929383277893066, -0.4482206404209137, -0.24838563799858093, 0.5392012596130371,...
def verify _ cmd _ exists _ in _ path ( cmd : str ) - > none : tprint ( f " checking for { cmd }.. ", debug _ only = true ) if not call _ subprocess _ and _ report _ rc ( f " which { cmd } " ) : raise commandmissing ( f " { cmd } is missing, please install it " ) tprint ( f " { cmd } exists ", debug _ only = true )
[ 0.8562612533569336, -0.6566643118858337, 0.6566979885101318, 0.18540696799755096, 1.3833072185516357, 0.6688536405563354, 0.4531765282154083, 0.013096505776047707, 0.08211167901754379, -0.16122356057167053, 0.35425713658332825, 0.7278182506561279, 0.41991323232650757, 1.2306933403015137, ...
def linearregressiononcluster ( labels, latitude, longitude, numtrain, numtest ) : # get label of required site assert ( len ( coordinates ) = = len ( labels ) ) lab, pos = none, none sitetopredict = none for i in range ( 0, len ( coordinates ) ) : x, y = parsecoordinates ( coordinates [ i ] ) if x = = latitude and y =...
[ 0.16574601829051971, -0.7105079889297485, 0.2972644865512848, -1.119698166847229, 0.7455278038978577, 0.11943082511425018, -0.30592775344848633, -0.02566448412835598, -0.03644098341464996, -0.10779815912246704, 0.13252176344394684, 0.0886775553226471, -1.620870590209961, -0.757982790470123...
def load ( cls, dataset _ uri : str, *, dataset _ id : str = none, dataset _ version : str = none, dataset _ name : str = none, lazy : bool = false, compute _ digest : computedigest = computedigest. only _ if _ missing, strict _ digest : bool = false, handle _ score _ split : bool = true ) - >'dataset': for loader in c...
[ -0.6864797472953796, 0.41785770654678345, 0.4689803123474121, -0.009543884545564651, -0.47190314531326294, -0.43204888701438904, -1.0915911197662354, -0.13527680933475494, 0.08050160109996796, -0.9104233384132385, 0.22152380645275116, 0.5351362228393555, -0.3659408986568451, -0.00350056448...
def sne _ init _ embedding ( x _ hds, init, n _ components, rand _ state ) : global module _ name if init = = " pca " : # apply a pca and keep the first n _ components principal components. return apply _ pca ( x _ hds = x _ hds, n _ components = n _ components, whiten = false ) elif init = ='random': return sne _ init...
[ -0.20455865561962128, -0.36478671431541443, 0.7058554887771606, 0.11329661309719086, 0.07385219633579254, 0.5468273162841797, -0.3850128650665283, 0.22012463212013245, 0.9260125160217285, 0.3100215196609497, -0.2674873471260071, 0.2007448673248291, 0.07827842235565186, 0.24509261548519135,...
def make _ autoimport ( * mods, * * named ) : text1 = " \ n ". join ( [ x. _ _ name _ _ for x in mods ] ) text2 = " \ n ". join ( [ " { } as { } ". format ( v. _ _ name _ _, k ) for k, v in named. items ( ) ] ) text = " { } \ n { } ". format ( text1, text2 ) with open ( _ path, " w " ) as f : f. write ( text )
[ -0.6668545603752136, -1.0159155130386353, 0.8268985152244568, -0.28212907910346985, -0.5895393490791321, 0.4164544939994812, -0.08494298905134201, -0.34474703669548035, -0.5502200722694397, 0.5061357021331787, -1.3730404376983643, 0.46651822328567505, 0.4688907563686371, -0.164052456617355...
def append ( self, lb, ub ) : self. lb = np. vstack ( ( self. lb. value, lb ) ) self. ub = np. vstack ( ( self. ub. value, ub ) )
[ 0.07444162666797638, -0.4317360818386078, 0.6561521887779236, -0.11356675624847412, 0.6268020868301392, 1.047061562538147, -1.0499919652938843, 0.1651168018579483, -0.05323818698525429, -0.20568141341209412, -0.24364641308784485, 0.7732568979263306, -0.5216934680938721, 0.6560753583908081,...
def requires _ log _ in ( func ) : @ wraps ( func ) def wrapped ( * args, * * kwargs ) : if'user _ id'not in session : return redirect ( url _ for ('login') ) return func ( * args, * * kwargs ) return wrapped
[ -0.6613941192626953, -0.9408486485481262, 0.8585821986198425, 0.4498555362224579, -0.392130583524704, 0.38392922282218933, 0.05480577051639557, -0.20641973614692688, 1.4171881675720215, -0.18233177065849304, 0.5646562576293945, 0.6790223717689514, 0.8715960383415222, 0.25528067350387573, ...
def _ evaluate _ for _ shape ( self ) : child _ eval = self. children [ 0 ]. evaluate _ for _ shape ( ) vec = pybamm. evaluate _ for _ shape _ using _ domain ( self. domains ) return child _ eval * vec
[ 0.6290289163589478, -0.3390558958053589, 0.4718687832355499, -1.0023528337478638, 0.4897216856479645, -0.1287030577659607, 0.3646123707294464, 0.16332228481769562, -0.7656112313270569, -0.8181421160697937, -0.488059937953949, 0.13493765890598297, 0.6098961234092712, 0.4413321912288666, -...
def find _ sp _ ids ( sp _ label ) : # pick the subproj subjids from cohort df subproj _ bool _ _ chrt = self. chrt _ df. subproj = = sp _ label subjids _ in _ subproj = self. chrt _ df. index [ subproj _ bool _ _ chrt ] # pick the data rows corresponding to subjids in subproj subproj _ bool _ _ data = pd. series ( dat...
[ 0.21637259423732758, -0.04408855736255646, 0.7282056212425232, -0.19019465148448944, -0.3971940279006958, 0.6543492078781128, -0.6607022285461426, 0.04107057675719261, 0.2862534821033478, 0.6160528063774109, -0.05826224014163017, 1.1185423135757446, -0.58767169713974, -0.6791621446609497, ...
def _ _ init _ _ ( self, visit _ code, metric ) : # instance variable unique to each instance self. visit _ code = visit _ code self. metric = metric if metric = = " l1 " : self. metric _ label = r " ad ( $ \ mu $ m $ ^ 2 $ / ms ) " # 10 ^ - 3 mm ^ 2 / s = 1 um ^ 2 / ms elif metric in [ " md ", " rd " ] : self. metric ...
[ 0.04801119118928909, 0.06405024230480194, 0.7157726883888245, 0.04142340272665024, 0.160944402217865, 0.23970556259155273, 0.9356587529182434, 0.033237215131521225, -0.3779793083667755, 0.10110347718000412, 0.9403892159461975, 0.841372549533844, 0.5569567084312439, -0.790643036365509, 1....
def test _ atomic _ boolean _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 3. xsd ", instance = " nistdata / atomic / bo...
[ -0.0031568126287311316, -0.22639033198356628, 0.5876036882400513, 0.7443600296974182, -0.25030434131622314, 0.8219297528266907, 0.013052478432655334, 0.0880061611533165, -0.43003910779953003, 1.319277286529541, -0.6986448764801025, 0.26072534918785095, -0.04768797382712364, -0.584032595157...
def escape _ sequence _ check ( ) : if platform. system ( ) = = " windows " : if debug : print ( " microsoft { } release : { } version : { } ". format ( platform. system ( ), platform. release ( ), platform. version ( ) ) ) ver _ list = platform. version ( ). split ( ". " ) if int ( platform. release ( ) ) < 10 : print...
[ 0.018635762855410576, -0.4992445707321167, 0.9258288741111755, 0.2073177844285965, -0.8275296092033386, -0.13606061041355133, 0.03500508889555931, -0.5945425629615784, -0.4829278290271759, 0.9671216011047363, -0.3635389506816864, 0.07171405851840973, -0.7808239459991455, 0.4076492190361023...
def test _ atomic _ base64 _ binary _ pattern _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 1. xsd ", instance = " ...
[ -0.04385398328304291, -0.5017776489257812, 0.44456520676612854, 1.2427185773849487, 0.30380555987358093, 0.044152937829494476, 0.5428751111030579, -0.2096046507358551, 0.059767093509435654, 0.4383305013179779, -0.25110897421836853, -0.05098668858408928, -0.7847394943237305, 0.1849642544984...
def findxpath ( dct, key, default = none ) : if key is none or dct is none : return default paths = key. split ( " / " ) data = dct i = 0 while i < len ( paths ) : if data is none : return default pathelement = paths [ i ] if len ( pathelement ) = = 0 : # return if there is an empty path element return default elif ( m...
[ 0.0009010106441564858, 0.7208895683288574, 0.9215165376663208, 0.5517783761024475, -0.6592062711715698, -0.1915118545293808, -0.06204961985349655, -0.12219209969043732, -0.40478813648223877, 0.22461241483688354, 0.026501640677452087, -0.672086775302887, -1.1791472434997559, 0.4708460867404...
def sim _ hash ( feature _ set ) : # initialize a vector of b bits. here i am using md5 128 bit hashing. hence b = 128 v = [ 0 ] * 128 for ti, wi in feature _ set : # create a hash on ti hex _ dig = hashlib. md5 ( ti. encode ('utf - 8') ). hexdigest ( ) bin _ repr = bin ( int ( hex _ dig, 16 ) ) [ 2 : ]. zfill ( 128 ) ...
[ 0.0004898345796391368, 0.45589497685432434, 0.47995996475219727, 0.4932417571544647, -0.179581418633461, 0.0787682980298996, -0.008853744715452194, 0.15628698468208313, 0.04786290228366852, 1.1610325574874878, -0.2978229522705078, -0.15574529767036438, -0.2602823078632355, 0.20160414278507...
def t _ ( data : types. ndtensor, dtype : torch. dtype = torch. float, device : optional [ types. device ] = " cpu ", requires _ grad : bool = false, ) - > torch. tensor : if isinstance ( device, str ) : device = torch. device ( device ) tt = torch. as _ tensor ( data, dtype = dtype, device = device ). requires _ grad ...
[ -0.0488625206053257, 0.9258849620819092, 0.13627831637859344, -0.11930625885725021, -1.049638271331787, 0.03731021285057068, 0.04548920691013336, -0.6268092393875122, -0.25111326575279236, 0.6214153170585632, -0.21017128229141235, -0.1230812668800354, -0.04768891632556915, -0.5506950020790...
def cn _ createexpanded ( self, scale ) : depr ('createexpanded ', 1. 1,'obj. expand ( scale )') return self. expand ( scale )
[ -0.14010415971279144, 0.2327411025762558, 0.5627775192260742, 0.6461221575737, -1.113383412361145, 0.20630723237991333, 0.008133736439049244, -1.348237156867981, -0.11949865520000458, -0.3241279125213623, -0.08697127550840378, -0.7650609612464905, -0.3661564886569977, 0.2068510502576828, ...
def get _ gender ( ) : # draw the menu selection menu _ selection ( " menu _ 2 - gender ", menu _ 2 ) value = get _ integer ( " select gender ", " 0 ", len ( menu _ 1 ) - 1 ) if value = = 0 : gender = " male " else : gender = " female " write _ field ( gender, 61, 2, 18, " left ", foreground, background ) # clear the m...
[ -1.2007741928100586, 0.6782563924789429, 0.7658134698867798, 0.19275887310504913, 0.8817369937896729, 0.3367522358894348, 0.48234984278678894, 0.33518847823143005, -0.49045708775520325, -0.3286008834838867, -0.8158616423606873, 0.7679944038391113, -0.41165709495544434, 1.327134609222412, ...
def forward ( self, x : torch. nn. utils. rnn. packedsequence, lengths : torch. tensor ) - > torch. tensor : out, _ = pad _ packed _ sequence ( x, batch _ first = self. batch _ first, total _ length = self. max _ length # type : ignore ) return out # type : ignore
[ -0.1538698971271515, 1.1099213361740112, 0.23010507225990295, -0.2800016701221466, -0.0887058824300766, 0.7571223378181458, -0.07538693398237228, 0.30653733015060425, 0.480971097946167, 0.0018697407795116305, -0.8501078486442566, 0.27939730882644653, 0.36267587542533875, 0.0534055940806865...
def tag _ to _ entity ( tag _ seq, label _ alphabet ) : entities = [ ] for idj, tag in enumerate ( tag _ seq ) : try : tag = label _ alphabet. get _ instance ( tag ) if tag. split ('- ', 1 ) [ 0 ] = ='b'or tag. split ('- ', 1 ) [ 0 ] = ='s': entities. append ( [ idj, idj + 1, tag. split ('- ', 1 ) [ 1 ] ] ) elif tag. s...
[ -1.084270715713501, -1.3738484382629395, 0.564679741859436, -0.7171708345413208, 0.6684771776199341, -0.4400752782821655, 0.508708119392395, 0.6313702464103699, 0.018576499074697495, 1.3753631114959717, -0.8955021500587463, -0.34464138746261597, 0.1814795583486557, -0.025906944647431374, ...
def _ set _ result ( self, result ) : if self. running _ cmd : cmd = self. running _ cmd self. running _ cmd = none cmd. result = result cmd. done. set ( )
[ -0.7323649525642395, -0.34061944484710693, 0.4628807306289673, 0.43904227018356323, 0.46605709195137024, -0.4913046360015869, 0.8622161746025085, -0.44414612650871277, -0.6465914249420166, -0.7904306054115295, -0.9753982424736023, 0.0876268595457077, -1.0481781959533691, 0.4035759866237640...
def crossover _ strategy ( data, close _ column, fast _ ma = 25, slow _ ma = 50 ) : # calculate sma sma _ fast = pd. series ( talib. sma ( data [ close _ column ], fast _ ma ) ) sma _ slow = pd. series ( talib. sma ( data [ close _ column ], slow _ ma ) ) # primary model : make signs data = data. iloc [ ( slow _ ma - 1...
[ -0.1797834187746048, 0.6274027824401855, 0.7893657684326172, 0.037081435322761536, -0.4578101933002472, 0.14427366852760315, 0.2066802680492401, 0.7434114813804626, 0.359314888715744, 0.5307106375694275, 0.26235079765319824, 0.2869110107421875, 0.4797569811344147, -0.2191019207239151, 0....
def from _ file ( file, typcls ) : s = stream ( file ) return s. read _ value ( typcls. _ ep _ typedesc )
[ 0.0006269580917432904, 0.02605428919196129, 0.32944920659065247, -0.014455477707087994, -0.4317770302295685, 0.6683810353279114, -0.1500319391489029, -0.37194669246673584, -0.7366311550140381, 0.16139280796051025, 0.34847933053970337, 0.1757984310388565, -0.27478742599487305, -0.6355798840...
def _ bidirectional _ step ( self, x _ st, u _ st, hx _ s, entity : str, direction : str ) : batch _ size, hidden _ size = x _ st. size ( 0 ), self. human _ segment _ rnn _ fcell. hidden _ size dtype, device = x _ st. dtype, x _ st. device if direction = ='forward': h _ st = grab _ last _ state _ or _ zeros ( hx _ s, b...
[ -0.24838806688785553, 0.15048158168792725, 0.6888074278831482, -0.16715097427368164, 0.07323348522186279, 0.04519793391227722, 0.2511233985424042, -0.14671006798744202, -0.3278040587902069, -0.5343930721282959, 0.0384008064866066, 0.28662097454071045, 0.6786759495735168, -0.303026437759399...
def test _ cache _ invalidates _ on _ object _ save ( self ) : class counturiaccess ( bliptvnodownloadstorage ) : count = 0 def _ urlopen _ read ( self, uri ) : self. count + = 1 return super ( counturiaccess, self ). _ urlopen _ read ( uri ) cache. clear ( ) backend = counturiaccess ( ) embed = backend. serve ( self. ...
[ -0.582097589969635, -0.2687663733959198, 0.6468327045440674, 0.722048282623291, 0.20236587524414062, 0.20330986380577087, 0.25877848267555237, 0.22882457077503204, 0.05189172923564911, -0.12629926204681396, -1.2462780475616455, -0.18470118939876556, -0.3411470055580139, -0.0020484363194555...
def load _ timeseries _ cubes ( mip _ table : str ='amon') - > list : timeseries _ dir = base _ dir /'data'/'timeseries'paths = timeseries _ dir. glob ( f'* * / { mip _ table } / * * / *. nc') input _ dirs = list ( set ( path. parent for path in paths ) ) input _ dirs = list ( filter _ ignored _ datasets ( input _ dirs...
[ -0.644408106803894, 1.0328905582427979, 0.5264783501625061, 0.3160448670387268, -0.7306862473487854, 0.09159000217914581, 0.11329226940870285, -0.07843225449323654, 0.231259286403656, 1.2762949466705322, -0.2523452639579773, -0.09968972206115723, -0.21020299196243286, -0.4531223475933075, ...
def where ( self, test = " and ", * * kw ) : test = self. _ _ process _ test ( test, kw ) copy = type ( self ) ( ) copy. _ _ columns = self. _ _ columns copy. _ _ data _ area = self. _ _ data _ area. copy ( ) copy. _ _ row _ index = self. _ _ row _ index self. _ _ remove ( copy. _ _ data _ area, false, test ) return co...
[ 0.3619326949119568, -0.8619307279586792, 0.584391713142395, -0.30997174978256226, -1.6908735036849976, 0.11749022454023361, 1.0028893947601318, -0.44585275650024414, 0.28254595398902893, -0.058603424578905106, 0.2955518662929535, 0.7708881497383118, -0.6278011798858643, -1.1032699346542358...
def get _ stacks ( ntoken : optional [ str ] = none ) - > generator : if ntoken : kwargs = dict ( nexttoken = ntoken ) else : kwargs = { } res = _ cf. describe _ stacks ( * * kwargs ) if len ( res ['stacks'] ) < = 0 : raise stopiteration ( ) for s in res ['stacks'] : # avoid nested stacks if not s. get ('rootid ', none...
[ 0.4358908534049988, 1.1919276714324951, 0.6011182069778442, 0.4813847541809082, 0.07267128676176071, -0.6496275067329407, -0.34409114718437195, -1.0635589361190796, -0.29429179430007935, -0.41219067573547363, 0.11898379772901535, -0.0376649871468544, -0.576029360294342, 0.9165595769882202,...
def display ( values ) : width = 1 + max ( len ( values [ s ] ) for s in boxes ) line ='+ '. join ( ['-'* ( width * 3 ) ] * 3 ) for r in rows : print (''. join ( values [ r + c ]. center ( width ) + ('|'if c in'36'else'' ) for c in cols ) ) if r in'cf': print ( line ) return
[ 0.5610067844390869, 0.2224401831626892, 0.7123512625694275, 0.0046293167397379875, -0.8553912043571472, 0.39858657121658325, -0.3591102659702301, -0.45846742391586304, -0.19793440401554108, -0.024937782436609268, 0.7087128162384033, -0.36006712913513184, 0.039232801645994186, 0.57721149921...
def test _ atomic _ qname _ length _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 3. xsd ", instance = " nistdata / atomic / qname / schem...
[ 0.44339966773986816, -0.27538353204727173, 0.409943550825119, -0.19616658985614777, -0.13431891798973083, 0.33032310009002686, -0.6640262007713318, -0.6125727891921997, 0.2841171324253082, 0.5179973840713501, -0.5467173457145691, -0.3146534264087677, 0.028315549716353416, -0.36558616161346...
def getdevicesfortype ( self, typeid, parameters = none ) : deviceurl = apiclient. devicesurl % ( self. host, typeid ) r = requests. get ( deviceurl, auth = self. credentials, params = parameters, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " device was successfully retri...
[ -1.709830641746521, -0.3817277252674103, 0.7762984037399292, 0.2356811910867691, 0.3179931938648224, -0.6286835074424744, 0.06140356883406639, -0.9643680453300476, -0.08221212774515152, 0.6262376308441162, 0.31956925988197327, 1.0511857271194458, -1.4455662965774536, 1.0507116317749023, ...
def test _ get _ request _ command ( mocker, request _ id, raw _ response, expected _ outputs, expected _ hr ) : from crowdstrikemalquery import get _ request _ command mocker. patch. object ( client,'get _ request ', return _ value = raw _ response ) result = get _ request _ command ( client, { " request _ id " : requ...
[ 0.012705348432064056, -0.26555395126342773, 0.43142756819725037, 0.42021143436431885, 1.2285572290420532, -0.3326045274734497, -0.4724888205528259, -1.1201832294464111, 0.3226194381713867, -1.273597240447998, 0.37011557817459106, 0.3759303689002991, 0.4316980838775635, -0.5751311779022217,...
def train _ transforms ( example _ batch ) : example _ batch [ " pixel _ values " ] = [ _ train _ transforms ( pil _ img. convert ( " rgb " ) ) for pil _ img in example _ batch [ " image " ] ] return example _ batch
[ -0.7496236562728882, -0.3808392584323883, 0.40224793553352356, -0.20103074610233307, 0.18707521259784698, -0.1084493100643158, -0.6271373629570007, 0.39140599966049194, -0.0018648358527570963, 0.44428181648254395, -1.880537748336792, -0.20785997807979584, 1.374557614326477, 0.3742682635784...
def retrieve ( request, pk = none ) : messages = chatmessage. objects. filter ( q ( sender _ id = request. user. id, receiver _ id = pk ) | q ( sender _ id = pk, receiver _ id = request. user. id ) ) \. order _ by ( " - id " ) serializer = messageserializer ( data = messages, many = true ) serializer. is _ valid ( ) re...
[ -0.11773040890693665, 0.011731923557817936, 0.47683730721473694, -0.2692767083644867, 0.343915194272995, -0.5037826895713806, -0.2028021514415741, -0.8171660900115967, -0.15751805901527405, -1.3032745122909546, 0.4920976459980011, -0.19248634576797485, -0.11136174947023392, 0.3040920495986...
def sensorsfromcommuc ( self, sensor _ data ) : # us sensor result *. 34 * 0. 0393701 to get inches sensor _ data [ " ultrasonic " ] [ " left " ] = float ( sensor _ data [ " ultrasonic " ] [ " left " ] ) * 0. 013385834 sensor _ data [ " ultrasonic " ] [ " right " ] = float ( sensor _ data [ " ultrasonic " ] [ " right "...
[ 0.3294202387332916, -0.026781883090734482, 0.6019566059112549, -0.9848408699035645, 0.5436191558837891, 0.19499973952770233, 0.20860253274440765, -0.0637902244925499, 0.014901163056492805, 0.4311743676662445, -0.5475354194641113, -0.5955331921577454, -0.44455960392951965, 0.217108875513076...
def download _ summary _ layer ( layer _ url, stream = true ) : # print ( " downloading % s " % layer _ url ) r = requests. get ( layer _ url ) if r. status _ code = = 200 : # get name of netcdf file filename = layer _ url. split ( " / " ) [ - 1 ] netcdf _ file = os. path. abspath ( os. path. join ( os. path. dirname (...
[ -0.03728867322206497, -0.3097778260707855, 0.6378787159919739, -0.286655455827713, 0.1764342188835144, 0.45498502254486084, 1.1474438905715942, -0.8258700370788574, -0.31943070888519287, -0.2814505398273468, -0.6895462274551392, 0.39557787775993347, 0.12744930386543274, 0.580720067024231, ...
def test _ atomic _ any _ uri _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 1. xsd ", instance = " nistdata / atomic / anyuri ...
[ -0.14366750419139862, -0.199596107006073, 0.4428810477256775, 0.9660674929618835, -0.12596063315868378, -0.15511295199394226, 0.11853605508804321, 0.17518971860408783, 0.27711546421051025, 0.1346692591905594, 0.3370799124240875, -0.44216030836105347, -0.26511627435684204, 0.407456070184707...
def _ _ init _ _ ( self, agent ) : self. _ agent = agent
[ 0.2001660019159317, -1.053634524345398, 0.006972057279199362, -0.42204850912094116, -0.29382815957069397, -0.12632626295089722, 0.018877947703003883, 0.27686747908592224, 1.1723551750183105, -0.449568510055542, -0.692009687423706, 0.20892450213432312, 0.8133613467216492, 0.7596414685249329...
def end _ other ( a, b ) : # 1. make both strings lowercase a = a. lower ( ) b = b. lower ( ) # 2. get the length of two strings and compare, swap if the " a " is smaller than " b " if len ( a ) < len ( b ) : a, b = b, a # 3. check if the shorter string appears at the end of longer string return a [ - len ( b ) : ] = =...
[ 0.34883812069892883, -0.5137317180633545, 0.9959595799446106, -0.8852272629737854, -0.2994441092014313, 0.15408360958099365, -1.1688201427459717, -0.41092735528945923, -0.23747789859771729, 0.47408750653266907, 0.06541269272565842, 0.869697630405426, -0.7324584722518921, -0.271566808223724...