text
stringlengths
25
2.19k
embedding
listlengths
768
768
def process _ dna _ string ( dnastring, wordmodel ) : return''. join ( [ dnastring [ i ] for i in range ( len ( dnastring ) ) if int ( wordmodel [ i ] ) = = 1 ] )
[ -0.2319900244474411, 0.09394682943820953, 0.3647507131099701, -0.15733596682548523, -0.5958227515220642, 0.15618504583835602, 0.01063340064138174, -0.418657511472702, 0.35875850915908813, 1.0778648853302002, -0.21358253061771393, 0.2440984547138214, -1.1853917837142944, -0.2887672781944275...
def run _ notebook ( template _ notebook, parameters, out _ notebook _ fp = none, kernel _ name ='python3') : print ( " running the { } notebook ". format ( template _ notebook ) ) timestamp = datetime. utcnow ( ). strftime ( " % y % m % d % h % m " ) process _ id = mp. current _ process ( ). pid prefix ='{ } - '. form...
[ -0.32952648401260376, -0.6317367553710938, 0.9218057990074158, 0.9629167318344116, 0.09098538756370544, -0.046903789043426514, 0.1258244514465332, 0.6949024796485901, -0.7538914680480957, 0.05145769193768501, 0.1644468456506729, 0.19277824461460114, -0.6898468732833862, 0.3946456015110016,...
def adddraftthingtype ( self, thingtypeid, name = none, description = none, schemaid = none, metadata = none ) : draftthingtypesurl = apiclient. draftthingtypesurl % ( self. host ) payload = {'id': thingtypeid,'name': name,'description': description,'schemaid': schemaid,'metadata': metadata } r = requests. post ( draft...
[ -1.8393315076828003, 0.2162429392337799, 0.6923810839653015, -0.18404094874858856, 0.35298067331314087, 0.331416517496109, -0.9776409268379211, -0.6971879005432129, -0.3040740489959717, 0.43034619092941284, -0.7134116888046265, 1.00178062915802, -1.7191381454467773, 0.07869629561901093, ...
def _ _ del _ _ ( self ) : self. log. debug ( " stopping tsdbhandler... " )
[ 0.25903287529945374, -0.9058964252471924, 0.4055810570716858, -0.7573343515396118, -0.2554928958415985, 1.1173652410507202, 0.20579324662685394, 1.0723568201065063, -0.8290913105010986, -0.45433372259140015, 0.031020550057291985, 0.17180141806602478, -0.4238114058971405, 0.4425315856933594...
def open _ website _ in _ browser ( cls, voice _ transcript, skill ) : tags = cls. _ extract _ tags ( voice _ transcript, skill ['tags'] ) for tag in tags : reg _ ex = re. search ( tag +'( [ a - za - z ] + ) ', voice _ transcript ) try : if reg _ ex : domain = reg _ ex. group ( 1 ) url = cls. _ create _ url ( domain ) ...
[ -0.6243305206298828, -0.29532137513160706, 0.48443901538848877, 0.4216356873512268, 0.05962010473012924, -0.3094710111618042, 0.4275110960006714, -0.0012957124272361398, 0.3564307689666748, -0.006864917930215597, -0.468118816614151, 0.831184446811676, 0.13983839750289917, 0.618712961673736...
def prep _ usb _ lookup ( local _ usb _ ids = none ) : if local _ usb _ ids : usb _ file = open ( local _ usb _ ids, encoding ='latin1') else : usb _ file = usb _ lookup. get _ usb _ file ( ) return usb _ lookup. parse _ file ( usb _ file )
[ -0.3784352242946625, -0.48775482177734375, 0.3199344873428345, 0.6878488659858704, -0.05234307795763016, 0.07761520892381668, 0.3649151921272278, 0.9831660985946655, -0.17076794803142548, -0.05416630953550339, 0.41421666741371155, -0.7254523634910583, -0.2809273302555084, -0.77696889638900...
def admin _ enable _ user ( userpoolid = none, username = none ) : pass
[ -0.08421618491411209, 0.26867347955703735, 0.12786605954170227, 1.0051095485687256, -0.16307179629802704, 0.6102856397628784, 0.834109365940094, 0.3034794330596924, 0.5142865777015686, 0.3883388936519623, -1.168755292892456, 1.7514238357543945, -1.0219806432724, -0.38742566108703613, 0.0...
def show _ help ( self ) : return self. help
[ 0.7518684267997742, -0.12075915932655334, 0.4581538438796997, 0.04706601798534393, -0.5469213128089905, 0.7149605751037598, 0.8120529055595398, -0.04828539118170738, -0.13838572800159454, 0.24065880477428436, 0.4173329770565033, 0.8312179446220398, 0.3023756742477417, -0.23077209293842316,...
def clear _ line _ 23 ( fore _ colour = line _ 23 _ fore, back _ colour = line _ 23 _ back ) : # execute function to check for valid colours and force correction fore _ colour, back _ colour = colour _ check ( fore _ colour, back _ colour ) # set foreground and background colours. print ( " { } { } m { } { } m ". forma...
[ 0.7962817549705505, -0.011937905102968216, 0.958541750907898, -0.2928873300552368, 0.2038598209619522, 0.3335726261138916, 0.22608588635921478, 0.3829401135444641, -0.1618422120809555, 0.36780673265457153, 0.668620228767395, 1.2593196630477905, -0.15260758996009827, 0.16123278439044952, ...
def closeevent ( self, qcloseevent ) : if self. playing = = 1 : pygame. mixer. music. fadeout ( 1000 ) if self. parent. custominfo [ " memoryplaylist " ] = = " 1 " : saveplaylist ( '. ', self. music ) print ( " saving " ) else : saveplaylist ( '. ', self. music )
[ 0.4923190474510193, -0.20245301723480225, 0.6551269292831421, 0.44124603271484375, -0.36595937609672546, 0.8339853286743164, 0.5903666019439697, -0.09061773866415024, 0.31412866711616516, 0.5925038456916809, -0.5462858080863953, 0.14074543118476868, -1.5471309423446655, 1.0742369890213013,...
def test _ mandated _ params ( self ) : v = requestvalidator ( ) e = baseendpoint ( v ) r = e. _ create _ request ('https : / / a. b / ','get ','oauth _ signature = a & oauth _ consumer _ key = b & oauth _ nonce ', urlencoded ) self. assertraises ( errors. invalidrequesterror, e. _ check _ mandatory _ parameters, r )
[ -0.04672214388847351, 0.2359546571969986, 0.5205672383308411, 0.8395950794219971, 0.9227683544158936, 0.8950313329696655, -1.0505009889602661, 0.4295428991317749, -0.3300305902957916, 0.051492840051651, 0.1766621470451355, 0.5046311020851135, -0.4132373034954071, 0.9724354147911072, 0.09...
def _ get _ params _ for _ sql _ statement ( self ) : pool _ term = self. _ get _ pool _ id _ term ( ) conc = self. concentration / concentration _ conversion _ factor vol = ( self. minimum _ volume + stock _ dead _ volume ) \ / volume _ conversion _ factor tube _ specs _ term = get _ stock _ tube _ specs _ db _ term (...
[ -0.7126864790916443, -0.47868043184280396, 0.3582731783390045, -0.6055467128753662, -0.023995527997612953, -0.01571802981197834, -0.7426315546035767, -0.9089977741241455, -1.046413779258728, 0.5707443952560425, -0.22116683423519135, 0.4926338195800781, 0.3288726210594177, 0.488958865404129...
def test _ list _ decimal _ enumeration _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 1. xsd ", instance = " nistdata / list / deci...
[ -0.769141435623169, -0.8143731951713562, 0.5960009694099426, 0.6596310138702393, -0.03604700788855553, -0.26776042580604553, 0.642524778842926, 0.3199041783809662, 0.7524372935295105, 0.2585256099700928, -1.105954647064209, -0.4618114233016968, -0.05319943651556969, 0.7385374307632446, 0...
def validate _ boolean ( value ) : if isinstance ( value, bool ) : return value elif str ( value ). lower ( ) in ['true ','t ','1'] : return true elif str ( value ). lower ( ) in ['false ','f ','0'] : return false else : raise validationerror ( message ='invalid boolean value : % ( value ) s ', params = {'value': value...
[ -0.1177188828587532, 0.09312690794467926, 0.5630136728286743, 0.6293116211891174, -0.5186375975608826, 0.9182652235031128, 0.4301016628742218, 0.09329453855752945, -1.3306758403778076, 0.3022103011608124, 0.31436681747436523, -0.8131073117256165, -0.30962133407592773, 0.3352310061454773, ...
def test _ atomic _ base64 _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 5. xsd ...
[ 0.295552134513855, -0.08405570685863495, 0.39760810136795044, 0.7111713290214539, -0.2160726934671402, -0.010718800127506256, -0.05577177554368973, -0.8053410649299622, 0.22551827132701874, 0.38394349813461304, -0.7002723217010498, -0.06545629352331161, -1.2269113063812256, 0.0144106298685...
def draw _ room ( self, room : int ) : if room = = 0 : self. _ draw _ bedroom ( ) elif room = = 1 : self. _ draw _ kitchen ( ) elif room = = 2 : self. _ draw _ bathroom ( ) elif room = = 3 : # self. _ draw _ bedroom ( ) self. _ draw _ menu ( ) self. _ draw _ current _ time ( )
[ -1.7696146965026855, 0.8448172807693481, 0.6167741417884827, 0.9257984757423401, 0.17936350405216217, 0.5285427570343018, 0.23195308446884155, 0.1499442458152771, 0.2659958302974701, -0.33539509773254395, -0.34442076086997986, -0.028466317802667618, -0.16425582766532898, 1.44393789768219, ...
def get _ token _ type _ ratio ( corpus ) : return count _ tokens ( corpus ) / count _ types ( corpus )
[ -0.43998321890830994, 0.25264301896095276, 0.27883094549179077, -0.7855526804924011, 0.3229048550128937, -0.1715339720249176, -0.002488975180312991, -0.4065936803817749, -0.9017955660820007, 0.4659375846385956, -0.08696098625659943, -0.07250229269266129, -0.8183634877204895, 0.639065504074...
def all _ subclasses ( cls ) : return set ( cls. _ _ subclasses _ _ ( ) ). union ( [ s for c in cls. _ _ subclasses _ _ ( ) for s in all _ subclasses ( c ) ] )
[ 0.9208993315696716, 0.2737118899822235, 0.805806577205658, 0.7712761759757996, 0.19069267809391022, 0.845391571521759, -0.24232162535190582, -0.33075305819511414, 0.9754389524459839, -0.7510740756988525, -1.0064367055892944, 0.46623465418815613, -0.1084161102771759, 0.06503348052501678, ...
def category ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " category " )
[ 0.5024458765983582, 0.02275335043668747, 0.31571924686431885, 0.3517061173915863, 0.17088308930397034, 0.6909046173095703, 0.34011420607566833, -0.12816183269023895, 0.15246936678886414, -0.642043948173523, 1.3922547101974487, 0.7827929258346558, 0.9586637616157532, -0.5402450561523438, ...
def write _ pdb ( mol : chem. mol, filepath : str ) - > str : chem. moltopdbfile ( mol, filepath ) return chem. moltopdbblock ( mol )
[ -0.28869426250457764, -0.9056522250175476, 0.6055449843406677, 0.1092069074511528, 1.0379289388656616, 0.424296498298645, 0.17755374312400818, -0.4613964855670929, -0.38455766439437866, -0.26758521795272827, 0.17231124639511108, -0.244711235165596, -0.2951757609844208, -0.6912819743156433,...
def tmp _ dir ( dirname = none ) : tmp = make _ tmp _ dir ( dirname ) yield tmp rm _ tmp _ dir ( tmp )
[ -0.8076379299163818, 0.5900967717170715, 0.558971107006073, -0.431016206741333, -0.38424456119537354, -0.7247029542922974, 0.5864261984825134, 0.22852633893489838, 0.29793575406074524, 0.10367612540721893, -0.18706364929676056, -0.7539315223693848, -0.3872804045677185, -0.42706820368766785...
def parse _ args ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ( " - - db ", type = str, help = " input db file with urls, output is automatically inserted in db " ) parser. add _ argument ( " - - csv ", type = str, help = " input csv file with current urls " ) parser. add _ argument ( " - - out ",...
[ 0.02350136637687683, -0.10398789495229721, 0.7884853482246399, -0.11690421402454376, 0.1316477656364441, 0.5246825814247131, 0.24242453277111053, 0.7578763961791992, -1.2249881029129028, 0.4087650179862976, 0.00557158375158906, -0.3795398473739624, -0.4711427390575409, 1.2316240072250366, ...
def save _ dict _ to _ json ( d, json _ path ) : with open ( json _ path,'w') as f : # we need to convert the values to float for json ( it doesn't accept np. array, np. float, ) d = { k : float ( v ) for k, v in d. items ( ) } json. dump ( d, f, indent = 4 )
[ -0.5223330855369568, -0.601859986782074, 0.5135557651519775, -0.6777006387710571, -0.15273702144622803, 0.4720836877822876, -0.1012800931930542, -0.06162511929869652, -0.3133769631385803, 0.6247672438621521, -0.8135214447975159, 0.08734863996505737, 0.43274781107902527, 1.109589695930481, ...
def collect _ under _ performers ( nums, threshold ) : collect = [ ] i = 0 while i < len ( nums ) : if nums [ i ] < threshold : collect. append ( nums [ i ] ) i = i + 1 return collect
[ 0.1560729295015335, -0.6670824885368347, 0.2811352610588074, 0.011491860263049603, -0.23962447047233582, 0.49993911385536194, 0.19905903935432434, -0.26924023032188416, 0.14128872752189636, -0.2356473058462143, -0.1528378278017044, 1.2003487348556519, -0.630357563495636, 0.5985397100448608...
def calc _ carbon ( self, km ) : if km < 1500 : c = self. short _ haul _ dict elif km > 2500 : c = self. long _ haul _ dict else : c = self. interp _ dict ( km ) cw = self. get _ cw ( c ) x = km + c ['dc'] term1 = ( c ['a'] * x * * 2 + c ['b'] * x + c ['c'] ) / ( c ['s'] * c ['plf'] ) term2 = ( 1 - c ['cf'] ) * cw * ( ...
[ 0.47645115852355957, 0.14808973670005798, 0.825106143951416, -0.2809726893901825, -1.1070984601974487, -0.26638954877853394, 0.05537568777799606, 0.5144701600074768, -0.7758005857467651, -0.15688881278038025, -0.6301726698875427, -0.07803922146558762, -0.7661395072937012, -0.31711348891258...
def test _ workqueue _ aborts _ on _ nested _ parallelism ( self ) : runme = " " " if 1 : from numba import njit, prange import numpy as np @ njit ( parallel = true ) def nested ( x ) : for i in prange ( len ( x ) ) : x [ i ] + = 1 @ njit ( parallel = true ) def main ( ) : z = np. zeros ( ( 5, 10 ) ) for i in prange ( ...
[ 0.7625699043273926, -0.024059489369392395, 0.8006274700164795, 0.31484830379486084, 0.5878390073776245, 0.493001788854599, 1.32868492603302, -0.539945125579834, 0.1930622011423111, -0.7048146724700928, 0.23505248129367828, 0.4454902112483978, -1.162087321281433, 0.6986006498336792, 0.004...
def load _ climo ( self ) : if self. name = = " isccp " : self. time _ range _ str = " 2000 - 2016 " return xr. open _ dataset ( " / volumes / drudonna / isccph / processed / fv09 / isccp - basic. hgg. global. 10km. nan _ climo. 2000 - 2016. nc " ) elif self. name = = " modis " : self. time _ range _ str = " 2002 - 202...
[ -0.3305140733718872, -0.12163092941045761, 0.6428517699241638, -0.6335866451263428, -0.9924507737159729, 0.0784449577331543, -0.9883401393890381, -0.5335310697555542, -0.1282823532819748, 0.1862337440252304, 0.37054139375686646, 0.65373694896698, 0.337563693523407, -0.25894981622695923, ...
def raw _ recv ( self, size ) : raise notimplemented
[ -0.5961699485778809, 0.25121352076530457, 0.8664522171020508, -0.8616980314254761, -1.021287202835083, -0.278085321187973, -0.2615234851837158, -0.4202435314655304, 0.1534193754196167, -0.7536134719848633, -1.0654263496398926, 0.5309361219406128, 0.9752011895179749, -0.31082087755203247, ...
def _ _ init _ _ ( self ) : self. s = socket. socket ( socket. af _ inet, socket. sock _ stream ) port = 7021 self. s. bind ( ( " ", port ) ) self. s. listen ( 6 ) logger. success ( f " server is listening on 127. 0. 0. 1 : { port } " )
[ 0.5700505375862122, 0.010120559483766556, 0.577929675579071, -0.4150627851486206, -0.46693044900894165, 0.06868184357881546, 0.12327305227518082, 0.46192488074302673, 0.11108408123254776, -0.7487532496452332, -0.43365687131881714, 0.34957218170166016, 0.4915754497051239, 0.4441338479518890...
def request _ for _ shopify _ template ( self, template, model _ id, log _ book _ id ) : if not template. shopify _ tmpl _ id : return false try : new _ product = shopify. product ( ). find ( template. shopify _ tmpl _ id ) except clienterror as error : if hasattr ( error, " response " ) : if error. response. code = = ...
[ -0.9166646003723145, 0.11130651831626892, 0.5580137968063354, 0.05001978203654289, 0.024505749344825745, 0.12556025385856628, -0.41754642128944397, -1.381272792816162, 0.32389920949935913, 0.43890380859375, -0.35524046421051025, -0.36782801151275635, -1.0094696283340454, -0.119807310402393...
def loadvideos ( catalog ) : videosfile = cf. data _ dir +'videos - small. csv'input _ file = csv. dictreader ( open ( videosfile, encoding ='utf - 8') ) for video in input _ file : model. addvideo ( catalog, video )
[ -0.4245437681674957, 0.7885527014732361, 0.3457535207271576, 0.03426985442638397, 0.46446576714515686, 0.6091421842575073, -0.5515247583389282, 0.3184354603290558, -0.2041541486978531, 0.009079416282474995, -1.212841272354126, -0.1317683309316635, -0.0007108251447789371, 0.0352230668067932...
async def show _ detail ( self, request ) : if not self. sonos _ data. is _ playing ( ) : return web. httpbadrequest ( reason = " not playing " ) payload = await request. post ( ) detail = payload. get ( " detail " ) if not detail : return web. httpbadrequest ( reason = " parameter'detail'must be provided " ) detail = ...
[ -0.28837111592292786, 0.3817295432090759, 0.746504008769989, 0.5669935345649719, -0.13385634124279022, 0.8807639479637146, -0.0017443408723920584, -0.003307419829070568, 0.6310418248176575, 0.43368762731552124, -0.09754341095685959, 1.279528021812439, -0.38464584946632385, 0.25490993261337...
def time _ to _ int ( self ) : return self. seconds
[ -0.08437732607126236, -0.3438514173030853, 0.4743523597717285, -0.7769850492477417, -0.17051243782043457, -0.04389742761850357, -0.036170508712530136, -0.8974257707595825, -0.9694147109985352, 0.14324232935905457, -0.8406955599784851, -0.17220047116279602, -0.197601318359375, 0.77248102426...
def xmpp _ federation ( self, xmpp _ federation ) : self. _ xmpp _ federation = xmpp _ federation
[ 0.5507786870002747, -0.5387290716171265, 0.3650546967983246, -0.11533953249454498, -0.12645405530929565, 0.3999868929386139, -0.044061996042728424, 0.14579229056835175, 0.29861029982566833, -0.0471922867000103, -0.8079695105552673, 0.14400039613246918, -0.9189289808273315, 0.07741560041904...
def test _ sla _ patch _ sla ( self ) : pass
[ 0.44169628620147705, -0.9879891276359558, 0.36546066403388977, -0.357036292552948, -0.561119794845581, 0.9060627818107605, 1.4253368377685547, 1.0535658597946167, 2.0966367721557617, -0.43188342452049255, -0.5096120238304138, 0.596722424030304, -0.8144446015357971, 0.566339373588562, -1....
def generate _ selected _ info _ panel ( tap _ node, tap _ edge, tag _ update _ signal, applied _ tag _ update _ signal ) - > list [ any ] : if tap _ node is none and tap _ edge is none : raise preventupdate latest _ tapped _ element = utils. get _ latest _ tapped _ element ( tap _ node, tap _ edge ) ujt _ id = latest ...
[ -0.4838998019695282, -0.13379152119159698, 0.5918902158737183, -0.49109891057014465, -0.31688570976257324, -0.4843337833881378, 0.45043936371803284, -0.3407990634441376, 0.39798223972320557, 0.0778048038482666, 0.16387636959552765, -0.35171300172805786, 0.5547860860824585, -0.2041576206684...
def reset _ system ( self ) : self. _ send ( resetsystem ( ), timeout =. 5, retry = 5 ) if not self. channels : _ log. debug ( " querying ant capabilities " ) cap = self. get _ capabilities ( ) # ver = self. get _ ant _ version ( ) # sn = self. get _ serial _ number ( ) _ log. debug ( " device capabilities : % s ", cap...
[ -0.2950580418109894, -0.17280440032482147, 0.41410133242607117, -0.21608272194862366, 0.8155374526977539, -1.0422331094741821, 0.1856987029314041, -1.5820848941802979, 0.19105695188045502, -0.8488633632659912, -0.17456941306591034, 0.7021700143814087, -0.06724303960800171, 0.23183308541774...
def relu ( self, data, epsilon ) : # recuperer le max return np. maximum ( epsilon * data, data )
[ 0.5472294092178345, -0.9517178535461426, 0.4884243607521057, -0.2461586594581604, 0.6670159697532654, -0.7966250777244568, -1.9515663385391235, 1.0313043594360352, 0.4237070381641388, 0.088321253657341, -0.1654800921678543, 0.400291383266449, -0.4181309938430786, -0.8249644041061401, -0....
def local ( self ) : local = self. jid if self. nick : local + ='/ % s'% self. nick local + =':'if self. password : config. set _ and _ save ('password ', self. password, section = self. jid ) return local
[ 0.5547545552253723, -1.5694246292114258, 0.5532065033912659, -0.4801303744316101, -0.3850259780883789, 0.5221244096755981, 0.2822186052799225, 0.9088373780250549, -0.3714068830013275, -0.11881892383098602, -0.3402843177318573, 0.13915999233722687, -0.3624354302883148, -0.21138066053390503,...
def show _ ( self ) : self. logger. debug ( " open report selector " ) self. dialogopened. emit ( ) self. btnselnone. setvisible ( false ) self. show ( ) self. _ parent. update _ reportmodel _ data ( ) self. resizetables ( ) self. select ( none ) self. activatewindow ( )
[ 0.40055394172668457, 0.43255817890167236, 0.4219452738761902, -0.15551172196865082, -0.1188531443476677, -0.08114282786846161, 1.5611189603805542, 1.0128718614578247, 0.11406509578227997, -0.44391965866088867, -0.45407548546791077, 0.22088414430618286, -0.4088798761367798, -0.0720363855361...
def test _ atomic _ language _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 4. xsd ", instance = " nistdata / atomic / l...
[ 0.5607850551605225, -0.09265847504138947, 0.325464129447937, 0.2924320697784424, -0.411869615316391, 0.2644289433956146, 0.08335763961076736, 0.06312377750873566, -0.25633305311203003, 0.7581421136856079, -0.8786592483520508, -0.7058606743812561, -0.24178136885166168, -0.10210293531417847,...
def sort ( self ) : super ( rolleddice, self ). sort ( ) return self
[ -0.29610759019851685, -0.3846965730190277, 0.3714618682861328, -0.1867775171995163, -0.5474936962127686, 0.25778037309646606, 0.3838765621185303, 0.03360028564929962, 0.0861065685749054, -0.664972186088562, 0.3202888071537018, 1.1673460006713867, -0.22169336676597595, 0.5460840463638306, ...
def isochemical _ potential ( data, max _ t, max _ conc ) : try : chem _ pot = [ ] t = [ ] conc = [ ] min _ mu = np. inf max _ mu = - np. inf for key, value in data. iteritems ( ) : if ( value [ " mu _ c1 _ 0 " ] < min _ mu ) : min _ mu = value [ " mu _ c1 _ 0 " ] if ( value [ " mu _ c1 _ 0 " ] > max _ mu ) : max _ mu ...
[ -0.09044177830219269, -0.2600334882736206, 0.9242908954620361, 0.038817793130874634, -0.6291457414627075, 0.37442469596862793, -0.2994942367076874, 0.3101397454738617, -0.4399683475494385, 1.0216012001037598, 0.8262894153594971, 0.763145387172699, 0.28306785225868225, -0.10062632709741592,...
def test _ constructor ( self ) : assert isinstance ( self. d, desert )
[ -0.30444616079330444, 0.16267716884613037, 0.0881430059671402, 0.28627437353134155, 0.2420252114534378, 1.8718448877334595, 0.8939327001571655, -0.3724256455898285, 0.6569935083389282, -2.0865960121154785, 0.3084254562854767, -0.3070932626724243, 0.8138229250907898, 0.6966661214828491, 0...
def fluidqueue ( q, rin, rout, * argv ) : # parse options prec = 1e - 14 needst = false q0 = [ ] eaten = [ ] for i in range ( len ( argv ) ) : if type ( argv [ i ] ) is str and argv [ i ] = = " prec " : prec = argv [ i + 1 ] eaten. append ( i ) eaten. append ( i + 1 ) elif type ( argv [ i ] ) is str and argv [ i ] = = ...
[ -0.3279297351837158, -0.9275041222572327, 1.030219554901123, -0.13701851665973663, 0.2505614757537842, -0.12036137282848358, -0.1648983210325241, 0.19595786929130554, -0.47094783186912537, -0.2556580901145935, 0.38879111409187317, 0.21075347065925598, -0.8574596643447876, 0.866641402244567...
def escape ( u ) : if not isinstance ( u, unicode _ type ) : raise valueerror ('only unicode objects are escapable.') return quote ( u. encode ('utf - 8'), safe = b'~')
[ -0.20298026502132416, 0.0732155591249466, 0.4028536081314087, 1.0206362009048462, -0.5323134064674377, 0.3491935729980469, 0.30164408683776855, 0.11378373205661774, 0.3934178054332733, 0.12643149495124817, -0.1588229238986969, 0.44172829389572144, -0.48038578033447266, -0.941641628742218, ...
def seto ( n, a, b ) : return [ a. union ( b ), a. intersection ( b ), a - b, b - a, n - a, n - b ]
[ -0.33734264969825745, 0.4568271338939667, 0.27102214097976685, 0.3198879063129425, 0.6816072463989258, -1.0582314729690552, -0.16619309782981873, -0.47624969482421875, -0.055336710065603256, 0.9193050265312195, -0.6432859897613525, -0.707423210144043, 0.9145094156265259, -0.371626526117324...
def add _ file ( self, filename : str ) - > none : filee = open ( filename, " r ", encoding ='utf - 8') each _ lines = filee. readlines ( ) for i in each _ lines : wordd = i. split ( ) for j in wordd : each _ word = j. strip ( punctuation ). lower ( ) if self. dic. find _ word ( each _ word ) : # if it's in dictionary ...
[ 0.39954128861427307, 0.06909643858671188, 0.7671455144882202, 0.0993313416838646, 0.049808893352746964, 0.5169742107391357, 0.3494757413864136, 1.313019037246704, -1.3712955713272095, 0.3841567635536194, 0.25716930627822876, -0.42383795976638794, 0.056250713765621185, 1.4000030755996704, ...
def cyclespeakingpunctuationlevel ( self, inputevent = none ) : currentlevel = _ settingsmanager. getsetting ('verbalizepunctuationstyle') if currentlevel = = settings. punctuation _ style _ none : newlevel = settings. punctuation _ style _ some full = messages. punctuation _ some _ full brief = messages. punctuation _...
[ -0.5880822539329529, -0.1384316086769104, 0.8593422174453735, -0.4260757267475128, 0.03510066866874695, -0.19244197010993958, 0.2291596382856369, -0.5124872326850891, -0.24566014111042023, 0.5746368765830994, 0.2342633754014969, 0.13350628316402435, -1.0229463577270508, 0.35340821743011475...
def getcontributorsenabled ( self ) : return self. _ contributors _ enabled
[ -0.14486829936504364, -0.5291185975074768, 0.24077023565769196, -0.13804121315479279, 0.4052039086818695, -0.05656273663043976, -0.13128624856472015, 1.3302685022354126, 0.33573126792907715, 0.00953493919223547, -1.0528295040130615, -0.07349129766225815, -2.318202495574951, 0.2127521485090...
def _ _ init _ _ ( self, file ) : self. data = { } self. dates = ordereddict ( ) with open ( file ) as f : skip = true for line in f : if skip : # skip header skip = false continue # split line of : 0 : date, 1 : ticker, 2 : stories, 3 : terms, 4 : abn _ pct _ old, 5 : abn _ pct _ rec current = line. rstrip ('\ n'). sp...
[ 0.13587939739227295, -0.46534502506256104, 0.6178193688392639, -0.7496330142021179, -0.7347624897956848, -0.009306730702519417, 0.2847161591053009, 0.008183544501662254, -1.3175158500671387, -0.6484938859939575, 0.4293651282787323, -0.12078185379505157, 0.2247033566236496, 0.59303706884384...
def is _ issued _ currency ( amount : amount ) - > bool : return isinstance ( amount, issuedcurrencyamount )
[ -0.011442105285823345, -0.461793452501297, 0.31894201040267944, 0.02340499870479107, -0.8297116756439209, -0.14385966956615448, 0.32931533455848694, -0.2183108925819397, 1.998536467552185, -0.39312076568603516, 0.031242160126566887, 0.00020844936079811305, -1.0447698831558228, 0.0766135528...
def test _ get _ comments ( self ) : response = self. client. get ('/ api / v1 / comment') res = json. loads ( response. data. decode ( ) ) self. assertequal ( response. status _ code, 200 )
[ -0.14039385318756104, -0.410719633102417, 0.4771955609321594, -0.21512824296951294, 1.678965449333191, 0.19245682656764984, -0.5447873473167419, 0.1908288449048996, -0.7392024993896484, -0.32440465688705444, -0.3685782849788666, 0.20694807171821594, -0.035633884370326996, -0.94197928905487...
def convertyamlpathtojsonpath ( yaml _ path ) : name, ext = os. path. splitext ( yaml _ path ) if ext. lower ( )! = '. yaml': name = yaml _ path return name + '. json '
[ 0.5002799034118652, -1.1464080810546875, 0.7789326310157776, 0.04105300083756447, -0.4575495719909668, -0.48960429430007935, 0.5438748002052307, -0.10055410116910934, 1.0295785665512085, 0.7133741974830627, -0.31236380338668823, 0.6125138401985168, 0.38090580701828003, 0.3881065845489502, ...
async def greenpill ( self, ctx ) : msg = copy ( ctx. message ) msg. content = ctx. prefix + " pill # 008000 " ctx. bot. dispatch ( " message ", msg )
[ 0.4345369040966034, -0.14501750469207764, 0.6025604009628296, -0.8073140382766724, 0.7409253120422363, 1.9150358438491821, -1.250831961631775, 0.03183535113930702, 0.4509243369102478, 0.055601537227630615, 0.16548728942871094, 1.593492031097412, -0.2783024311065674, -0.23582914471626282, ...
def from _ dict ( clss, data, filter _ keys = [ ], ignore _ keys = [ ] ) : record = none if len ( filter _ keys ) = = 0 : # try to grab a record based off of the primary key. record = clss. query. get ( tuple ( [ data. get ( key ) for key in get _ primary _ keys ( clss ) ] ) ) else : # try to grab a record based off of...
[ 0.0170699805021286, 0.36231595277786255, 0.7533577680587769, -0.930023729801178, -0.4454067051410675, -0.05641159415245056, -1.114253044128418, 0.08715452998876572, 0.1496666967868805, 0.5326942801475525, -0.05982937663793564, -0.14122651517391205, 0.2508344054222107, -0.43080979585647583,...
def evaluate ( self, test _ file ) : correct = 0. 0 total = 0. 0 for ( label, features ) in self. read _ conll _ file ( test _ file ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # * * * optional : * * * # # * * * your code here * * * # # # # # # # # # # # # # # # # # # # # # # # # # # # total + = 1. 0 predict...
[ 0.1606038361787796, -0.9470406770706177, 0.8615830540657043, 0.1883942186832428, 0.32077503204345703, 0.4318349361419678, 1.419285774230957, 0.341185986995697, -1.3055073022842407, 0.5357823371887207, 0.4747632145881653, -0.45922207832336426, -1.2850868701934814, 0.6018754243850708, -1.1...
def provide _ file _ and _ upload ( self, bucket _ name : str = provide _ bucket, object _ name : str | none = none, object _ url : str | none = none, user _ project : str | none = none, ) - > generator [ io [ bytes ], none, none ] : if object _ name is none : raise valueerror ( " object name can not be empty " ) _, _,...
[ -0.27977344393730164, -0.06643703579902649, 0.8218635320663452, 0.3871863782405853, -0.38376450538635254, 0.4551921486854553, 0.5049160122871399, -0.020521681755781174, -0.28802067041397095, 0.06406814604997635, -0.5831705331802368, -0.3947727084159851, 0.6740524768829346, 0.12465139478445...
def start _ component ( component _ name, parent _ instance ) : vstart _ input = rwvcs. vstartinput ( component _ name = component _ name, parent _ instance = parent _ instance ) iter _ resp = yield from self. _ dts. query _ rpc ( xpath = " / rw - vcs : vstart ", flags = 0, msg = vstart _ input ) # vstart " should " on...
[ 0.41424044966697693, -0.8624531626701355, 0.42176708579063416, -0.5716795325279236, 0.055841684341430664, -0.3366674482822418, -0.4647929072380066, -0.522011935710907, 0.3464483320713043, -0.2801443338394165, -0.035145796835422516, 0.19216138124465942, -0.6093614101409912, -0.5489827990531...
def detect _ outliers ( y, zs _ thr = none, sided ='both ', report _ thresh = true ) : assert y. ndim = = 1 if zs _ thr is none : # find the z - score where the expectation value is 0. 5 data points, # in either tail. use this as threshold, since beyond that we # expect to find 0 data points for this data set. # old : ...
[ 0.4157775342464447, -0.3789292275905609, 0.7425989508628845, -0.32849371433258057, -0.07501723617315292, -0.12330076098442078, 0.5476663112640381, -0.3532276749610901, 0.14280663430690765, 0.2571882903575897, -0.6196553111076355, 0.2904958128929138, 0.4806385338306427, 0.35468804836273193,...
def _ lunar _ year _ days ( self, year : int ) - > int : days = 0 months _ day = self. g _ lunar _ month _ days [ year - self. start _ year ] for i in range ( 1, 13 if self. _ get _ leap _ month ( year ) = = 0x0f else 14 ) : day = 29 + ( ( months _ day > > i ) & 0x01 ) days + = day return days
[ 0.031410884112119675, 0.2155541032552719, 0.45783665776252747, -1.0574977397918701, -0.2695671617984772, 0.73583984375, -0.7243418097496033, -0.2389613687992096, 0.6063757538795471, -1.1089801788330078, 0.09331528097391129, 0.5900974273681641, -0.801337480545044, 0.6163356304168701, 1.09...
def bgr2gray ( img : np. ndarray, keepdim : bool = false ) - > np. ndarray : out _ img = cv2. cvtcolor ( img, cv2. color _ bgr2gray ) if keepdim : out _ img = out _ img [..., none ] return out _ img
[ -0.12309478223323822, 0.5523704290390015, 0.7757991552352905, 0.47326597571372986, 0.7389520406723022, 0.3696766495704651, -0.0700678899884224, -0.5420880317687988, -0.3128601014614105, 0.9546931982040405, 0.46995580196380615, 1.1577926874160767, -0.2053125649690628, 0.5505403876304626, ...
def current _ model _ pruned _ fraction ( model, result _ dir, verbose = true ) : # load the dense models path = os. path. join ( result _ dir, " checkpoint _ dense. pth. tar " ) pl = [ ] if os. path. exists ( path ) : state _ dict = torch. load ( path, map _ location = " cpu " ) [ " state _ dict " ] for i, v in model....
[ -0.4948957562446594, 0.09306962043046951, 0.5816821455955505, 0.06652672588825226, 0.16958317160606384, 0.35240089893341064, 0.7559211850166321, -0.33970725536346436, 0.051847510039806366, 0.7929563522338867, 0.14457260072231293, -0.941978394985199, -0.41245606541633606, 0.4206002354621887...
def send _ command _ to _ targets ( self, document, key, value, comment, parameters ) : response = self. client. send _ command ( targets = [ {'key':'tag :'+ key,'values': [ value ] }, ], documentname = document, parameters = parameters, comment = comment ) return response ['command']
[ -1.3400665521621704, -0.5335490107536316, 0.2974953353404999, -0.2037665843963623, 1.1738752126693726, -0.4243943691253662, -0.48330962657928467, -0.8471153378486633, -0.9145700335502625, 0.8580482602119446, 0.28548839688301086, 0.7069724798202515, -0.438799649477005, 0.3690296709537506, ...
def _ _ init _ _ ( self, in _ features, out _ features ) : # # # # # # # # # # # # # # # # # # # # # # # # # put your code here # # # # # # # # # # # # # # # # # # # # # # # # self. params = {'weight': np. random. uniform ( 0, 0. 0001, ( out _ features, in _ features ) ),'bias': np. zeros ( ( out _ features, 1 ) ) } se...
[ 0.28971874713897705, -0.2808517515659332, 1.0393335819244385, 0.24512779712677002, -0.046618420630693436, -0.11699234694242477, 0.25789758563041687, 0.3410128355026245, -0.568523645401001, 0.32828289270401, -0.9317201375961304, 0.7591113448143005, -0.2428966462612152, 0.4529745876789093, ...
def makemask _ sphere ( self, voxloc, radius, atlasshape = ( 91, 109, 91 ), maskname ='spheremask. nii. gz') : spheremask = np. zeros ( atlasshape ) for i, e in enumerate ( voxloc ) : spheremask, loc = roimethod. sphere _ roi ( e, radius, i + 1, datashape = atlasshape, data = spheremask ) if self. _ issave is true : io...
[ -0.9072511792182922, -1.0649207830429077, 0.3968288004398346, 0.1431606560945511, 0.3447718620300293, -0.17900675535202026, 0.6779691576957703, 0.05811990052461624, 0.6665653586387634, 0.38850560784339905, -0.5965318083763123, 0.18572713434696198, 0.3380172848701477, -0.3280962109565735, ...
def checkaddedpaths ( location, urls ) : current _ paths = set ( [ os. path. join ( location, s ) for s in os. listdir ( location ) ] ) recipe _ paths = set ( urls. keys ( ) ) added _ paths = list ( current _ paths - recipe _ paths ) for path in added _ paths [ : ] : if path. endswith ( '. svn') : added _ paths. remove...
[ 0.8261289000511169, 0.6296219229698181, 0.4484387934207916, 0.2358967363834381, 0.5622979402542114, 0.1378086805343628, -0.22286568582057953, 0.5088759660720825, 0.40287795662879944, 0.544736385345459, 0.594240665435791, -0.26639896631240845, -0.09055484086275101, 0.7110534906387329, -0....
def test _ duration _ 2 ( ) : precision = 1e - 15 assert ( harvard. duration ( ) - 18. 356190476190477 ) < precision
[ 1.1088308095932007, 0.17235460877418518, 0.5293253064155579, 0.346031129360199, 0.7870200872421265, 1.2176682949066162, 0.4285833537578583, -0.06741686165332794, -0.20657779276371002, -0.21745745837688446, -0.3312894105911255, -0.21281543374061584, 0.23190777003765106, 0.5932344794273376, ...
def loss _ accuracy _ without _ validation _ plot ( df : dataframe ) : _ start _ index _ from _ one ( df ) fig, axes = plt. subplots ( nrows = 1, ncols = 2, figsize = ( 12. 8, 4. 8 ) ) for i in range ( 2 ) : sns. lineplot ( data = df [ _ loss _ accuracy _ columns [ i ] [ 0 ] ], marker ='o ', ax = axes [ i ] ) axes [ i ...
[ 0.07087468355894089, -0.012605767697095871, 0.6099351644515991, -0.5566157698631287, -0.043007880449295044, 0.639370858669281, 0.6790646910667419, -0.1693880409002304, 0.034517623484134674, -0.5273021459579468, 0.20507951080799103, 1.3167922496795654, 1.0342315435409546, -0.079622521996498...
def update _ backend _ servers ( self, blb _ id, backend _ server _ list, client _ token = none, config = none ) : path = utils. append _ uri ( self. version,'blb ', blb _ id,'backendserver') params = { } params [ b'update'] = none if client _ token is none : params [ b'clienttoken'] = generate _ client _ token ( ) els...
[ -1.4095724821090698, -0.43708446621894836, 0.5228372812271118, 0.12689167261123657, 0.9344689249992371, 0.15635760128498077, -0.15604789555072784, -0.3905359208583832, 0.17789722979068756, 1.2193995714187622, -1.7232942581176758, 1.410338044166565, -2.0391857624053955, -0.2427072674036026,...
def configure _ string ( ) : test _ config ='''customer : id : 11 - acme - 01 full - name : acme widgets, inc. short - name : acme possessive : acme widget, inc's short - capital : acme possessive - capital : acme's instances : internal : url : " http : / / username : password @ localhost : 8000 / internal / " name : i...
[ -0.2683826982975006, -0.6579673886299133, 0.37065592408180237, -0.9188238382339478, -0.624427080154419, -0.40899890661239624, -0.44562533497810364, -0.8054413199424744, -0.5328959822654724, 0.3032829761505127, 0.3810440003871918, 0.1684461534023285, 0.01427718810737133, -0.2142958045005798...
def test _ module _ command ( client _ id, client _ secret, channel _ code, session, verify ) : response = session. send ( request = sixgillauthrequest ( client _ id, client _ secret, channel _ code ). prepare ( ), verify = verify, ) if not response. ok : raise exception ( " auth request failed - please verify client _...
[ 0.31561338901519775, -0.2388618290424347, 0.4842250347137451, 0.47996899485588074, 1.3396384716033936, -0.11820436269044876, -0.26251840591430664, -0.5796222686767578, 0.7755020260810852, -0.47198930382728577, 0.07084225863218307, 1.3587168455123901, -0.001563333673402667, 0.04786695539951...
def sir _ step ( s, i, b, k ) : s _ dot = - b * s * i i _ dot = b * s * i - k * i r _ dot = k * i return s _ dot, i _ dot, r _ dot
[ 0.3810909688472748, -0.5928007960319519, 0.3320278525352478, 0.04241563752293587, -0.5031012296676636, -0.014521583914756775, 0.2123134285211563, 0.6852902173995972, 0.5071800947189331, 0.4131322205066681, -1.5156389474868774, -0.3683464825153351, -0.5694364905357361, -0.9958162307739258, ...
def _ eggify ( self ) : if self. eggify : target = self. buildout ['buildout'] ['develop - eggs - directory'] for path in self. urls. keys ( ) : # if we update the recipe, and we don't have newest, # and that some path have been deleted, all of them # might not be there. if checkexistpath ( path, warning = self. warnin...
[ -0.03719642013311386, 0.35445377230644226, 0.3006778359413147, 0.3863629102706909, 0.9844893217086792, -0.4936220943927765, 0.028347661718726158, 0.4224202036857605, -0.07461463660001755, -0.21736104786396027, 0.05147532746195793, -0.17951922118663788, 0.29121851921081543, 1.25230038166046...
def testlistdiskbylabels ( self, mock _ gce _ api, mock _ labels ) : mock _ gce _ api. return _ value. disks. return _ value = none mock _ labels. return _ value = mock _ gce _ operation _ disks _ labels _ success # labels found, gce api will return disks disks = fake _ analysis _ project. compute. listdiskbylabels ( l...
[ -0.8923877477645874, 0.1327531337738037, 0.6463380455970764, -0.7326512336730957, 0.8859763741493225, 0.6352766752243042, -0.21158279478549957, -0.6199272274971008, -0.5596643686294556, -0.3233993649482727, 0.14151646196842194, -0.42771634459495544, -0.25754985213279724, 0.1716906130313873...
def wave _ manger ( self ) : self. enemies _ dead = 0 self. wave + = 1 # restets enemies and adds they enemies you have killed to a list for enemy in self. enemy _ list : # checks if the wall or the player killed the enemy if max ( enemy. health ) = = 0 : # adds the dif to the enemies killed list self. enemies _ killed...
[ -0.5055273771286011, 0.16173692047595978, 0.8597120046615601, -0.31952548027038574, 0.46540567278862, 0.5551993250846863, 0.036651305854320526, 0.9018341898918152, 0.245051309466362, -0.2124069780111313, -0.6209257245063782, -0.07100909948348999, -0.23476101458072662, 1.6366525888442993, ...
def _ humans _ to _ human _ message ( self, x _ hft, h _ hft, h, hh _ dists = none ) : x _ hfth = x _ hft [ :, h ] h _ hfth = h _ hft [ :, h ] receiver = torch. cat ( [ x _ hfth, h _ hfth ], dim = - 1 ) x _ hft = torch. cat ( [ x _ hft [ :, : h ], x _ hft [ :, h + 1 : ] ], dim = 1 ) h _ hft = torch. cat ( [ h _ hft [ :...
[ 0.1841023862361908, 0.3815152049064636, 0.7539851069450378, -0.38476529717445374, 0.200203537940979, -0.08777809888124466, 0.21267764270305634, -0.0038379833567887545, -0.6525439620018005, 0.4321017563343048, -0.0005225864006206393, 0.7310550808906555, 0.2602422535419464, 0.505438566207885...
def create _ tree _ view ( self, start _ path = " / home ", callback = none ) : file _ manager = qtreeview ( ) self. callback _ func = callback self. model = qfilesystemmodel ( ) self. model. setrootpath ( start _ path ) # for viewtype in ( qcolumnview, qtreeview ) : file _ manager. setmodel ( self. model ) # hide all ...
[ 0.3584759831428528, -0.14935153722763062, 0.4707949459552765, -0.2020028531551361, -0.7697298526763916, -0.45169150829315186, 0.6355254054069519, -0.13180387020111084, -0.5216028094291687, -1.1441620588302612, -0.06804842501878738, -0.016183797270059586, -0.2699531316757202, 0.995330393314...
def deserialize ( value : influxdatatypes ) - > bool : # also including true and false since ` ` value ` ` will already be a bool when # using the input from ` ` iterpoints ` ` true _ values = { " t ", " t ", " true ", " true ", " true ", true } false _ values = { " f ", " f ", " false ", " false ", " false ", false } ...
[ -0.4543558955192566, 0.1004393920302391, 0.5798575282096863, 0.12226811796426773, -0.11889643967151642, 0.3205316960811615, -0.02198072336614132, -0.23607562482357025, -0.6448699831962585, 0.27431225776672363, -0.7336828708648682, -0.5374709367752075, 0.029608145356178284, -0.7231953144073...
def add _ matrix ( * attrs ) : return _ create _ and _ connect _ node ('add _ matrix ', * attrs )
[ -1.0181055068969727, 0.5329134464263916, 0.3361012935638428, -0.02309294603765011, -0.1867481917142868, 0.1527000367641449, 0.4339084029197693, -0.11551767587661743, 0.1449480801820755, -0.7284463047981262, 0.23550552129745483, 0.06041034311056137, -0.41139352321624756, -0.1448252350091934...
def fixreferences ( padding = 3, start = none ) : tofix = checkreferences ( padding ) f = none for f, values in tofix. iteritems ( ) : incremented = getincrementednamespace ( values ['namespace'], separator ='_ ', padding = padding, start = start ) renamereference ( f, incremented ) if f : fixreferences ( padding = pad...
[ -0.7537559270858765, 0.2964211106300354, 0.5880509614944458, -0.24615877866744995, 0.15259073674678802, -0.7215844988822937, -0.14458203315734863, -1.569906234741211, 0.09379899501800537, -0.1802748739719391, -0.024654319509863853, 0.6584538221359253, -0.15063530206680298, 1.09568417072296...
def randomcolors ( n, bright = true ) : brightness = 1. 0 if bright else 0. 7 hsv = [ ( i / n, 1, brightness ) for i in range ( n ) ] colors = list ( map ( lambda c : colorsys. hsv _ to _ rgb ( * c ), hsv ) ) # detectron uses random shuffle to give the differences random. seed ( 8888 ) random. shuffle ( colors ) return...
[ -0.630051851272583, -0.059479717165231705, 0.36183875799179077, 0.5143311023712158, 0.17413771152496338, 0.018049584701657295, -0.3732917904853821, -0.3342371881008148, 0.9340463876724243, -0.5566645264625549, -0.44827958941459656, -0.12146539986133575, 0.08083400875329971, 1.4529941082000...
def teardown ( self ) : sys. stdout = self. stdout shutil. rmtree ( self. dir ) migrator. migrations _ path = self. old _ path
[ 0.8671960234642029, -0.5073285102844238, 0.4511169195175171, -0.1361815631389618, 0.33271023631095886, -0.045468054711818695, 1.2013479471206665, 0.02286529541015625, 0.2564372420310974, -0.39978155493736267, 0.3352319002151489, 0.5606685876846313, -0.43608328700065613, 0.6055628657341003,...
def add _ csrf _ token _ to _ response ( response, request = none ) : if request is none : return # early parsing must've failed csrf _ token = request. context. get ('csrf _ token') if csrf _ token : # don't set httponly so that we can post using xhr. # https : / / github. com / gratipay / gratipay. com / issues / 303...
[ 0.6163192391395569, -0.644183337688446, 0.30720874667167664, 0.7080288529396057, 0.8331680297851562, -0.6079728007316589, -0.5878906846046448, 0.21372340619564056, 0.6639854907989502, -0.28705641627311707, -0.13615478575229645, -0.21386824548244476, 0.16800706088542938, -0.0034946261439472...
def generate _ double _ moves _ without _ collision ( self, black _ marbles : list, white _ marbles : list, turn : chr, marble _ pairs : list ) : result = [ ] forbidden = self. forbidden _ spots marbles = black _ marbles + white _ marbles moves = [ ] movements = self. movements for marble _ tuple in marble _ pairs : cu...
[ -0.43720686435699463, 0.2504596412181854, 1.0169334411621094, -0.3851690888404846, 0.07657141983509064, -0.17068199813365936, 0.856435239315033, 0.04192309081554413, -0.1398801952600479, 1.504237174987793, -0.48487040400505066, -0.08716071397066116, -0.4025056064128876, 0.2990182936191559,...
def test _ change _ record _ priority _ field ( self ) : # pass to home page self. client. get ( reverse ('hello : home') ) request _ store = requestsstore. objects. first ( ) # change priority to 1 and send post to home page request _ store. priority = 1 request _ store. save ( ) self. client. post ( reverse ('hello :...
[ -0.0022173775359988213, 0.7072616815567017, 0.4419437646865845, 0.2782294750213623, 0.3821914494037628, 0.30882924795150757, -0.21387748420238495, 0.8847042918205261, 0.5014802813529968, -0.5181214809417725, -0.5520415306091309, 0.23166310787200928, -0.48125818371772766, 0.5475418567657471...
def lines _ to _ polygon ( list _ lines, buffer _ amt = 0. 0001 ) : final _ shape = list _ lines [ 0 ] for line in list _ lines : final _ shape = final _ shape. union ( line ) line _ poly = final _ shape. buffer ( buffer _ amt ) final _ poly = line _ poly # return final _ poly # this represents the outer shell of a pol...
[ 0.20261269807815552, -1.2609087228775024, 0.651592493057251, -0.012685799039900303, 0.1602754443883896, 0.27355560660362244, -0.34192442893981934, 0.15656837821006775, 1.2166177034378052, -0.1578075885772705, -0.812553346157074, 0.2930915355682373, -0.09549383074045181, -0.2240192145109176...
def eval _ model ( net, loader, criterion ) : net. eval ( ) epoch _ loss = np. array ( [ ], dtype = np. float32 ) print ('evaluating validation set') for i, data in enumerate ( loader, 1 ) : images = data [ 0 ]. cuda ( ). float ( ) labels = data [ - 1 ]. cuda ( ). float ( ) if len ( data ) = = 3 : additional = data [ 1...
[ -0.3993077278137207, -0.08715890347957611, 0.615706205368042, -0.4742569029331207, 0.23945479094982147, 0.09033668041229248, -0.2153937667608261, -0.20039397478103638, -0.8515040874481201, 0.3060826361179352, 0.3093934655189514, 0.06695199757814407, 0.5896861553192139, 1.5276986360549927, ...
def test _ atomic _ language _ max _ length _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 1. xsd ", instance = " nistdata /...
[ 0.2112727016210556, -0.3689837157726288, 0.3009834885597229, 0.9807823896408081, -0.6877753138542175, 0.18971940875053406, -0.406078040599823, 0.15708324313163757, 0.11487840116024017, 0.7903527021408081, -0.5347372889518738, 0.07970607280731201, 0.27175018191337585, 0.2756637632846832, ...
def map _ to _ city ( input _ val : dict ) - > city : return city ( name = input _ val [ " city " ] [ " name " ], lat _ coord = input _ val [ " city " ] [ " coord " ] [ " lat " ], lon _ coord = input _ val [ " city " ] [ " coord " ] [ " lon " ], country = input _ val [ " city " ] [ " country " ], )
[ 0.07405058294534683, -1.0029247999191284, 0.5461780428886414, -1.2608972787857056, -1.064004898071289, 1.1583943367004395, -0.72440505027771, 0.19455945491790771, -0.0032347131054848433, 0.4085395932197571, -0.9824943542480469, -0.4680370092391968, 0.7258008122444153, -0.4248626232147217, ...
def do _ open ( self, arg ) : try : number = int ( arg. split ( ) [ 0 ] ) % 10 # 10 is the maximum list length if ( number < 0 ) or ( number > len ( self. s. interesting ) - 1 ) : if len ( self. s. interesting ) = = 0 : print ( " you have to execute a search first. " ) # this error statement is somewhat outdated, to be...
[ -0.869109034538269, 0.8566575050354004, 0.7826996445655823, -0.7660032510757446, -0.09516087174415588, 0.32543861865997314, 0.6671133041381836, 0.7291654348373413, -0.006781980860978365, -0.4144027531147003, -0.06617055088281631, -0.0013409313978627324, -1.0928939580917358, -0.013481775298...
def _ replace _ blank _ nodes ( dummy _ namespace, assertion _ rdf ) : for s, p, o in assertion _ rdf : assertion _ rdf. remove ( ( s, p, o ) ) if isinstance ( s, rdflib. term. bnode ) : s = dummy _ namespace [ str ( s ) ] if isinstance ( o, rdflib. term. bnode ) : o = dummy _ namespace [ str ( o ) ] assertion _ rdf. a...
[ 0.20349833369255066, -0.0776384174823761, 0.558966338634491, -0.5424501299858093, 0.7208380699157715, 0.27050215005874634, 0.19310498237609863, 0.3449404239654541, 0.643385648727417, 0.914029598236084, -0.259046345949173, 1.4749703407287598, -1.2933659553527832, 0.1320323795080185, -0.97...
def configure _ blueprints ( app, blueprints ) : for blueprint in blueprints : app. register _ blueprint ( blueprint )
[ -0.050015032291412354, 0.34159815311431885, 0.4677528440952301, 1.590936541557312, 1.039102554321289, -0.05075151473283768, -0.7847171425819397, 0.2225237637758255, 0.19645440578460693, 0.8574837446212769, -0.08115999400615692, -0.14944250881671906, -0.09582822769880295, 1.2540028095245361...
def _ parse _ cron _ yaml ( self ) : for cron _ yaml in ('cron. yaml ','cron. yml') : try : with open ( os. path. join ( self. configuration. modules [ 0 ]. application _ root, cron _ yaml ) ) as f : cron _ info = croninfo. loadsinglecron ( f ) return cron _ info except ioerror : continue return none
[ 1.4817924499511719, -0.9029448628425598, 0.4894217252731323, 0.34794682264328003, 0.23576720058918, -0.4307800829410553, 0.6910238862037659, -0.1369062215089798, -0.5477776527404785, 0.20653274655342102, -0.6850252747535706, 0.07962152361869812, 0.1059844121336937, 0.9040707945823669, 0....
def move _ down ( self ) : warnings. warn ( _ ( " the method move _ down ( ) is deprecated and will be removed in the next release. please use down ( ) instead! " ), deprecationwarning ) return self. down ( )
[ -0.0317705012857914, 0.05292254313826561, 0.6607849597930908, 0.4499783217906952, -0.4696594476699829, -0.6120559573173523, 0.14718671143054962, -0.40601128339767456, -0.030575033277273178, -0.4673347771167755, 0.16264225542545319, -0.14064791798591614, -0.5734326839447021, -0.035296734422...
def solvelocation2 ( sudokulist, solvedlist ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # check to see if 2 out of 3 row blocks have a value and the 3rd block has 2 out of 3 values solved in that row # # # # # # # # # # # # # # # # # # # # # # # # # ...
[ -0.03657360374927521, 0.236760213971138, 0.9641223549842834, 0.43913376331329346, -0.6947228312492371, -0.5769873261451721, 1.3712528944015503, 0.6244585514068604, 0.18960753083229065, 0.5973923802375793, -0.4114862084388733, -0.9605045914649963, -0.5823232531547546, 0.46450045704841614, ...
def _ get _ unravelled _ plug ( input _ plug ) : log. info ( " about to unravel plug > { } < ". format ( input _ plug ) ) if not cmds. objexists ( input _ plug ) : log. error ( " input _ plug does not exist : { } ". format ( input _ plug ) ) attr = ". ". join ( input _ plug. split ( ". " ) [ 1 : ] ) node = input _ plug...
[ -0.9774042963981628, -1.3324263095855713, 0.7891063094139099, -0.5596256852149963, -0.2251404970884323, -0.0844649150967598, 0.9544907212257385, 0.5375968217849731, 0.634170651435852, -0.4608708620071411, -0.06736868619918823, 0.3371565043926239, -0.7869369983673096, -0.6988559365272522, ...
def definecharacteristics ( self ) : # the name that the user will see in the toolbox self. name ='applying angle constraint'# the branch of the toolbox under which the algorithm will appear self. group ='algorithms for applying constraints'# we add the input vector layer. it can have any kind of geometry # it is a man...
[ 0.31299522519111633, -0.16820530593395233, 0.47991159558296204, -0.03035387024283409, -0.03310175985097885, 0.30700400471687317, 0.6895353198051453, -0.08922186493873596, -0.3305150866508484, -0.12419263273477554, 0.12677542865276337, 0.30169886350631714, -0.14721624553203583, 0.5634017586...
def to _ variable ( f ) : def variable _ wrapper ( * args, * * kwargs ) : rez = f ( * args, * * kwargs ) if isinstance ( rez, tuple ) : return tuple ( [ variable ( x ) for x in rez ] ) return variable ( rez ) return variable _ wrapper
[ -0.9947382211685181, 0.2688833177089691, 0.3350394368171692, 0.2621042728424072, -0.13940909504890442, -0.5934266448020935, 0.2278897911310196, 0.17999409139156342, -0.14928236603736877, 0.48715054988861084, -0.5366601347923279, -0.05076879262924194, 0.5328115820884705, -0.8389933109283447...
def run _ trials ( node, trainer, num _ trials = 1000, include _ xpcosts = false ) : outcomes = { d. name : [ ] for d in node. descendants ( ) } xpcosts = [ ] for n in range ( num _ trials ) : trial _ node = copy. deepcopy ( node ) xpcosts. append ( trainer ( trial _ node ) ) for d in trial _ node. descendants ( ) : ou...
[ -0.046157337725162506, 1.0839159488677979, 0.6789742112159729, 0.08357163518667221, -1.0731432437896729, -0.48841941356658936, -0.47882091999053955, 0.9467753171920776, -0.489851176738739, 0.4919426739215851, -0.5085659027099609, -0.11668079346418381, 0.8904119729995728, 0.3486508131027221...