text
stringlengths
25
2.19k
embedding
listlengths
768
768
def handle _ args ( ) : usage = " " " usage : % prog [ options ] dataset _ id " " " parser = optparse. optionparser ( usage ) options, args = parser. parse _ args ( ) if len ( args )! = 1 : parser. print _ help ( ) sys. exit ( 1 ) print " grabbing data for dataset id : ", args [ 0 ] return options, int ( args [ 0 ] )
[ -0.13007108867168427, 0.2993440330028534, 0.6472691893577576, -0.9133986234664917, 0.4312150180339813, -0.287626713514328, -0.2788675129413605, 0.17823685705661774, -0.3336627781391144, -0.31167730689048767, 0.7312313914299011, -0.06354714184999466, -0.003177587641403079, 0.412980020046234...
def test _ network _ creation ( self, input _ size ) : tf. keras. backend. set _ image _ data _ format ('channels _ last') network = efficientnet. efficientnet ( model _ id ='b0') inputs = tf. keras. input ( shape = ( input _ size, input _ size, 3 ), batch _ size = 1 ) endpoints = network ( inputs ) self. assertallequa...
[ -0.6477248072624207, 0.29149699211120605, 0.4396110773086548, -0.1309320330619812, 1.5132337808609009, 0.3034413754940033, 0.3632592260837555, -0.33413025736808777, -0.3539060950279236, -0.6155050992965698, -0.43522998690605164, -0.43314239382743835, -0.041526757180690765, 0.57807326316833...
def play _ over ( self ) : if self. play _ mode = = 1 : self. currentindex + = 1 self. shuffled = false elif self. play _ mode = = 2 : if not self. shuffled : self. shuffled = true random. shuffle ( self. music ) self. updateinterface ( ) self. currentindex = 0 else : self. currentindex + = 1 else : self. shuffled = fa...
[ -0.7037014365196228, 0.19128286838531494, 0.7411400675773621, -0.16513828933238983, 0.3603278398513794, 1.3315035104751587, 1.35101318359375, -0.7801361680030823, 0.18786439299583435, -0.005926418583840132, 0.20192022621631622, -0.046072352677583694, -0.5387980341911316, -0.237941816449165...
def check _ args ( parsed _ args ) : if parsed _ args. multi _ gpu > 1 and parsed _ args. batch _ size < parsed _ args. multi _ gpu : raise valueerror ( " batch size ( { } ) must be equal to or higher than the number of gpus ( { } ) ". format ( parsed _ args. batch _ size, parsed _ args. multi _ gpu ) ) if parsed _ arg...
[ 0.30277273058891296, 0.27323171496391296, 0.8280024528503418, 0.17902742326259613, 0.24831447005271912, 0.5161155462265015, -0.4437810778617859, 0.40939852595329285, 0.025358494371175766, 0.38175174593925476, 0.6156543493270874, -0.19475099444389343, -0.15739522874355316, 0.437699377536773...
def usage _ key _ with _ run ( self, usage _ key _ string ) : usage _ key = usagekey. from _ string ( usage _ key _ string ) usage _ key = usage _ key. replace ( course _ key = modulestore ( ). fill _ in _ run ( usage _ key. course _ key ) ) return usage _ key
[ -0.2499057799577713, -0.4966004192829132, 0.38994285464286804, -0.17701870203018188, 0.45099687576293945, 0.2043081521987915, 0.5345743298530579, -0.17683403193950653, 0.1409844309091568, 1.2012284994125366, 0.41992512345314026, 0.4076795279979706, -0.5609780550003052, 0.07725761830806732,...
def _ _ init _ _ ( self, ads _ client ) : self. _ client = ads _ client self. _ client. open ( ) # all ads devices are registered here self. _ devices = [ ] self. _ notification _ items = { } self. _ lock = threading. lock ( )
[ 0.3546931743621826, 0.5045865774154663, 0.4454624056816101, 0.22133290767669678, -0.5481956601142883, 0.38577696681022644, 0.8594528436660767, 0.42357704043388367, -0.08717028796672821, 0.08499670028686523, -0.4262825548648834, 0.3474755883216858, 0.05179870128631592, 0.7512220144271851, ...
def do _ test _ datacenter ( self, args ) : global datacenter global dct print ( " datacenter = " + datacenter ) print ( " url = " + dct [ datacenter ] ) r = requests. get ( dct [ datacenter ] ) if r. status _ code = = 200 : print ( fore. green + " link to datacenter ok " + style. reset _ all ) self. updateprompt ( 0 )...
[ -0.6143566370010376, 0.09656216949224472, 0.4848904609680176, -0.42539384961128235, 0.6218557953834534, 0.31243467330932617, 0.6403205990791321, 0.04493243992328644, 0.8482241034507751, -0.19763188064098358, -0.2592192590236664, 0.5423482656478882, -0.5780028104782104, 0.04429233819246292,...
def visualize _ game _ population ( ) : x _ rounds = pre. game _ visualizations [ " x _ rounds " ] y _ population = pre. game _ visualizations [ " y _ population " ] fig = go. figure ( go. scatter ( x = x _ rounds, y = y _ population, mode ='lines + markers') ) fig. update _ layout ( title ='world population') return h...
[ -0.440113365650177, 1.2631430625915527, 0.6627278923988342, -0.9496724009513855, -0.49487122893333435, 0.3122079372406006, 0.6117282509803772, -0.5231491923332214, -0.15057514607906342, 1.3753681182861328, 1.0660045146942139, 0.2591453194618225, 1.076733112335205, -0.7413539886474609, 0....
def test _ atomic _ base64 _ binary _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 3. xsd ", instance ...
[ 0.12353125959634781, -0.176619753241539, 0.5265358686447144, 1.091968059539795, 0.26045265793800354, 0.24958838522434235, -0.11674124002456665, -0.25623050332069397, 0.12146187573671341, 0.5271400809288025, -0.2719897925853729, 0.044718172401189804, -0.5915912985801697, -0.1817201524972915...
def describebillsummary ( self, request ) : try : params = request. _ serialize ( ) headers = request. headers body = self. call ( " describebillsummary ", params, headers = headers ) response = json. loads ( body ) model = models. describebillsummaryresponse ( ) model. _ deserialize ( response [ " response " ] ) retur...
[ -1.000719666481018, 1.3149559497833252, 0.6023218631744385, -0.2046341896057129, -0.22135865688323975, 0.2733834683895111, -0.04648517817258835, -0.639610230922699, -0.020817352458834648, 0.20661412179470062, -0.5249211192131042, 0.9613717198371887, -0.6132827997207642, 0.6187893152236938,...
def block _ tuple ( self ) - > tuple [ block,... ] : return ( self. base _ block, ) + self. extra _ blocks
[ -0.7667229771614075, 0.31800341606140137, 0.6072952747344971, 0.26327890157699585, 0.473311185836792, 0.4402424395084381, -0.6088874936103821, -0.149087056517601, -0.9404057264328003, 0.5354683995246887, -0.9503060579299927, 0.002147558843716979, -0.3709602653980255, 0.03189238905906677, ...
def from _ image ( self, mask, cls ) : assert len ( mask. shape ) = = 2, " mask image is not 2d. " assert self. classes, " classes are not set yet. " self. masks [ cls ] = mask
[ -0.8005290627479553, 0.006316798739135265, 0.17616233229637146, 0.7314761281013489, 0.9006905555725098, 0.21347159147262573, 0.21838442981243134, -0.748239278793335, -0.17855225503444672, 0.10212961584329605, -0.3444177806377411, 0.8081325888633728, 1.218087911605835, 0.22927530109882355, ...
def test _ list _ decimal _ pattern _ 2 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 3. xsd ", instance = " nistdata / list / decimal / sc...
[ -0.2370152324438095, 0.007681089919060469, 0.6727674603462219, 0.4709363281726837, -0.015089532360434532, 0.2819279432296753, -0.21316835284233093, 0.49708035588264465, 0.8535963892936707, 0.6057497262954712, -1.3039076328277588, -0.30948299169540405, 0.09635734558105469, 0.080081164836883...
def north _ american _ child ( self ) : # for each child, find one with a last name name = name ( ) # the editor requires a surname name. add _ surname ( surname ( ) ) name. set _ primary _ surname ( 0 ) for ref in self. obj. get _ child _ ref _ list ( ) : child = self. db. get _ person _ from _ handle ( ref. ref ) if ...
[ 0.017670582979917526, 0.044781867414712906, 0.6177192330360413, -0.41493356227874756, -1.010312557220459, 0.46253761649131775, -0.40672677755355835, -0.9412642121315002, -0.08676754683256149, 0.023984551429748535, -0.5646938681602478, -1.1596667766571045, 0.36616721749305725, 0.78671926259...
def gap _ ring _ score ( seq ) : seq = sorted ( seq, reverse = true ) if len ( seq ) = = 0 : return 0 if len ( seq ) = = 1 : return 1 p0 = seq [ 0 ] p1 = seq [ 1 ] return 1 - p1 / p0
[ -0.8112391233444214, -0.15988875925540924, 0.779341459274292, -0.06371492147445679, 0.29203417897224426, 1.0060757398605347, 0.9549813270568848, -0.013532866723835468, 0.7517421841621399, 1.1779775619506836, 0.37499409914016724, -0.4899502694606781, -0.8186282515525818, 0.9170676469802856,...
def _ _ init _ _ ( self, created = none, program _ id = none, customer _ profile _ id = none, card _ id = none, customer _ session _ id = none, event _ id = none, type = none, amount = none, start _ date = none, expiry _ date = none, name = none, sub _ ledger _ id = none, user _ id = none, archived = none, local _ vars...
[ 1.9845943450927734, -0.27098333835601807, 0.6860709190368652, 0.0412866584956646, -0.36205846071243286, 0.09355597198009491, 0.30467361211776733, 0.13876256346702576, 0.6253296136856079, 0.03000487945973873, -0.6400335431098938, 1.066072940826416, 0.23040688037872314, -0.20990394055843353,...
def test _ list _ decimal _ enumeration _ 1 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 2. xsd ", instance = " nistdata / list / ...
[ -0.7925003170967102, -1.059147596359253, 0.6244691014289856, 0.875648558139801, 0.09896775335073471, -0.4402371942996979, -0.010587051510810852, 0.0529618002474308, 0.22476613521575928, -0.2552066743373871, -1.01531982421875, -0.3573131859302521, 0.09244397282600403, 0.8433780670166016, ...
def mi _ mixture _ 1d _ gd ( x, y ) : x, y = np. atleast _ 2d ( x ), np. squeeze ( y ) if x. ndim > 2 : raise valueerror ( " x must be at most 2d " ) if y. ndim > 1 : raise valueerror ( " only univariate discrete variables supported " ) if not np. issubdtype ( y. dtype, int ) : raise valueerror ( " y should be an integ...
[ 0.12337548285722733, 0.01581159606575966, 0.9691164493560791, -0.3119332194328308, -0.6319258213043213, 0.11708114296197891, -0.03661644086241722, -0.4749773144721985, 0.3901629149913788, 1.1015552282333374, 0.8126993775367737, 0.5476076006889343, 0.06863844394683838, 0.38470396399497986, ...
def d _ compare ( self, p _ sv : np. array ) - > bool : res = np. dot ( self. n _ u, p _ sv ) isin = res > = self. dot _ value if isin : p. print ('debug ', f'threshold : { self. dot _ value :. 5 } \ tresult : { p. green } { res :. 5 } { p. cend }') else : p. print ('debug ', f'threshold : { self. dot _ value :. 5 } \ ...
[ -0.7072940468788147, -0.2639312744140625, 0.7477415800094604, 0.14950236678123474, -0.4143124520778656, 0.7302294373512268, 0.36085423827171326, -1.152099847793579, 0.3153712749481201, -0.4524362087249756, -0.12153744697570801, 0.6189888119697571, 0.1784653663635254, 0.23674362897872925, ...
def adjustdatacard ( path _ to _ datacard, dictionary ) : # check whether it exists if not os. path. exists ( path _ to _ datacard ) : raise ioexception ( " no txt file at " + path _ to _ datacard ) # replace for tag, value in dictionary. iteritems ( ) : replacetag ( path _ to _ datacard, tag, value )
[ 0.013015691190958023, 0.11050264537334442, 0.5584015846252441, -1.6135483980178833, 0.4124373495578766, 0.34694603085517883, -0.8205773234367371, 1.3965119123458862, -0.7623489499092102, 0.3123062252998352, -0.17015716433525085, 0.30509597063064575, 0.7559405565261841, 0.6770116686820984, ...
def definebounds ( self, origin, detect _ below _ frac ) : # find peak edges so we can integrate. bounds = [ ] left = range ( 0, origin ) right = range ( origin + 1, len ( self. i ) - 1 ) der = np. diff ( self. i ) / np. diff ( self. t ) # corrected first derivative thresh = max ( der ) / self. bound _ sensitivity # fi...
[ 0.08174049109220505, -0.8170309662818909, 0.70269775390625, 0.5291794538497925, 0.4473312497138977, -0.13150720298290253, -0.2276594042778015, -0.4881626069545746, -0.44288939237594604, -0.18049049377441406, -0.7088582515716553, 0.11546995490789413, -0.4123336672782898, 0.8542761206626892,...
def _ free _ backpack _ io ( self ) : def remove _ net _ io ( module ) : if self. _ has _ children ( module ) : for mod in module. children ( ) : remove _ net _ io ( mod ) else : self. _ remove _ module _ io ( module ) if isinstance ( self. tproblem, testproblem ) : remove _ net _ io ( self. tproblem. net ) else : mode...
[ 0.5442802309989929, -0.7833787798881531, 0.5119245648384094, 0.2605402171611786, 0.09478172659873962, 0.2839301526546478, 1.1888186931610107, -1.147504448890686, 0.030332082882523537, -0.046557437628507614, -0.7624684572219849, -0.8495290875434875, -0.4553298354148865, 0.871904730796814, ...
def whereamibasic ( self, inputevent ) : self. dowhereami ( inputevent, true )
[ 0.8086107969284058, -0.425362229347229, 0.24176737666130066, 0.13983485102653503, -0.20571869611740112, 0.6644335389137268, 0.5256994962692261, -0.691715657711029, -0.6019169688224792, 0.2948535680770874, -0.18588027358055115, 0.3387991487979889, 0.19061279296875, -0.6434808969497681, -0...
def to _ de _ bruijn ( lf ) : lf = simplify _ single _ list ( lf ) targets = get _ target _ addresses ( lf ) targets = dict ( targets ) lf = replace _ refs _ with _ addresses ( lf, targets ) lf = remove _ path ( lf, ['xtarget'] ) lf = simplify _ single _ dict ( lf,'word') return lf
[ 0.1289975494146347, 0.04693594574928284, 0.4383547306060791, -1.0301284790039062, 0.3056277334690094, -0.42102286219596863, 0.23212546110153198, 0.5191816687583923, 0.4256724417209625, 0.21484996378421783, -1.019118070602417, 0.6062688827514648, -0.07179661095142365, -0.10487394034862518, ...
def get _ fp2lines ( self ) : return self. _ _ filepathtolines
[ 0.09830568730831146, -1.466545820236206, 0.3974834978580475, -0.2752954959869385, 0.6343291997909546, 0.45072898268699646, -0.033060796558856964, -0.4200924038887024, -0.7216068506240845, -0.8547018766403198, 0.09812525659799576, -0.31759506464004517, 0.22473911941051483, -0.07532729208469...
def set _ url ( self, url ) : self. url = url
[ -0.37826329469680786, 0.08002208173274994, 0.13331857323646545, -0.019598444923758507, 0.30699288845062256, 0.7252599000930786, -0.04870341718196869, 1.0196682214736938, -0.07117462158203125, 0.16990779340267181, -1.1821852922439575, 0.7254827618598938, -0.28033602237701416, 0.758990764617...
def flows _ intersecting ( flows1, flows2 ) : # todo : make args ordered # todo : right now this assumes that patterns have the same " granularity " as in our examples. need to uncomment to return to general case. # for flow1 in flows1 : # for flow2 in flows2 : # if flow1 < = flow2 or flow2 < = flow1 : # return true # ...
[ -0.18502254784107208, -0.7058042883872986, 0.8024834990501404, 0.23482513427734375, -0.5777558088302612, 0.9530879855155945, -0.05608523264527321, 0.30065879225730896, -0.28037625551223755, 0.21538251638412476, -0.10802824050188065, 0.18580545485019684, -1.0424950122833252, 0.1306770741939...
def test _ atomic _ qname _ length _ nistxml _ sv _ iv _ atomic _ qname _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 1. xsd ", instance = " nistdata / atomic / qname / schema + ...
[ 0.31836897134780884, -0.38717541098594666, 0.3020094633102417, -0.1632583737373352, -0.20722144842147827, 0.1458549052476883, -0.09901417046785355, -0.49442368745803833, 0.34876084327697754, 0.42107656598091125, -0.5108044147491455, -0.5920149683952332, -0.22281485795974731, 0.044587705284...
def get _ bloginfotext ( self ) : try : cnx = self. env. get _ db _ cnx ( ) cursor = cnx. cursor ( ) cursor. execute ( " select value from system " \ " where name ='fullblog _ infotext'" ) rows = cursor. fetchall ( ) if rows : return rows [ 0 ] [ 0 ] # only item in cursor ( hopefully ) else : return'' except : return''
[ 0.8454605340957642, 0.027726562693715096, 0.6015688180923462, 0.578182578086853, -0.7927293181419373, 0.26149266958236694, -0.15310171246528625, -0.25247880816459656, -0.2509409487247467, 0.6251895427703857, -0.37856200337409973, -0.6345842480659485, -1.492817997932434, -0.0667955949902534...
def session _ scope ( ) : dal. connect ( ) session = dal. session ( ) try : yield session session. commit ( ) except : session. rollback ( ) raise finally : session. close ( )
[ -0.283793181180954, 0.3808923661708832, 0.8091375231742859, -0.492125004529953, -0.41456282138824463, -1.0166265964508057, -0.21783655881881714, -0.8722155094146729, 0.7457500100135803, 1.3531403541564941, 0.7992144227027893, -0.10270332545042038, 0.4541746973991394, -1.1497524976730347, ...
def gettestqueryresponse ( self, url, querytext, fields ) : # data to be sent to api - " where 1 = 1 " pulls all features params = {'f':'pjson ','where': querytext,'outsr':'4326 ','returngeometry':'false ','outfields': fields,'orderbyfields':'objectid asc ','token': self. tokenno } # get the objects ids from the rest r...
[ -0.22313712537288666, -0.957283079624176, 0.4270517826080322, -0.2251913696527481, 0.002129912842065096, -0.19410140812397003, -0.13138306140899658, -0.6890720725059509, 0.34182682633399963, -0.04098174348473549, -0.7684584259986877, 0.08894053846597672, -1.0578782558441162, -0.77042293548...
def process _ file _ hashes ( stix2obj : dict [ str, any ], log ) : pattern = stix2obj. get ( " pattern ", " " ) hash _ mapping = { " hashes. md5 " : " md5 ", " hashes.'sha - 1'" : " sha1 ", " hashes.'sha - 256'" : " sha256 ", " hashes.'sha - 512'" : " sha512 ", " hashes. ssdeep " : " ssdeep ", } stix _ regex _ parser ...
[ 0.24617686867713928, -0.311014324426651, 0.818589448928833, 0.40250396728515625, -0.17707324028015137, 0.49024227261543274, 0.310016006231308, -0.5357298254966736, -0.7763922214508057, 0.1543000042438507, -0.29045870900154114, -0.3288004994392395, 0.49140024185180664, -0.01929810456931591,...
def storprop _ cdromknowngooddigitalplayback ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " devinfo ", " devinfodata " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.6900296211242676, 0.15154923498630524, 0.6202823519706726, -0.7771731019020081, -0.6577894687652588, 0.5183612108230591, 1.0152305364608765, -0.8499150276184082, 0.45374539494514465, 0.6552310585975647, -0.3689805865287781, 0.3395519554615021, -0.2614780068397522, 0.49903926253318787, ...
def _ normalize _ nics ( nics ) : def _ normalize ( nic ) : if'port - id'in nic and'net - id'in nic : nic = nic. copy ( ) del nic ['net - id'] return nic return [ _ normalize ( nic ) for nic in nics ]
[ -0.0005467180162668228, -0.6838345527648926, 0.2427833378314972, 0.07725472748279572, 0.10015729069709778, 0.07904592901468277, 0.040118977427482605, -0.5814371705055237, 1.3475589752197266, 0.6048637628555298, -0.39283010363578796, -1.089505910873413, -0.42478063702583313, 0.2288947254419...
def mousereleaseevent ( self, event ) : button = event. button ( ) # select an item on which we clicked a = event. x ( ) item = event. y ( ) # item = self. itemat ( event. x ( ), event. y ( ) ) if item : # self. setcurrentitem ( item ) if button = = 1 : idx = self. centerindex ( ) # s ='/ home / geunho / caffe _ ssdh /...
[ -0.4824763834476471, -0.3360067903995514, 0.5082701444625854, 0.3098140060901642, -0.41828808188438416, -0.5286234021186829, 0.4698733985424042, 1.0528990030288696, 0.6382753252983093, 0.43214094638824463, -0.007862466387450695, 0.5099945068359375, 0.5749196410179138, -0.07955389469861984,...
def fibonacci ( n : int ) - > int : if 0 < = n < = 1 : return n n _ minus1, n _ minus2 = 1, 0 result = none for f in range ( n - 1 ) : result = n _ minus2 + n _ minus1 n _ minus2 = n _ minus1 n _ minus1 = result return result
[ -0.3582819104194641, 0.4537450969219208, 0.38418257236480713, 0.7221811413764954, 0.5244814157485962, -0.9207435250282288, 0.973045825958252, -0.6340497136116028, -0.1848318874835968, -1.2145648002624512, -0.9627061486244202, 0.07083775848150253, -0.391932874917984, 0.6555420160293579, 1...
def print _ message ( message, file _ name = " out. txt " ) : print ( message ) # print the message with open ( os. path. join ( log _ dir, file _ name ), " a " ) as log _ file : log _ file. write ('% s \ n'% message ) # save the message
[ 0.9670307636260986, -0.18621443212032318, 0.5423077344894409, 0.028896795585751534, 0.20891422033309937, 0.2847435772418976, 0.14365893602371216, 0.7335084080696106, -0.8214488625526428, -0.01194370910525322, 0.16778410971164703, 0.7360756993293762, -0.5823896527290344, 0.6035712361335754,...
def unit _ to _ dict ( unit _ in, unit _ spawn, all _ units, valid _ types ) : unit _ dict = dict ( ) # remove below for non - vis dataset for attribute in unit _ attrs : unit _ dict [ attribute ] = getattr ( unit _ in, attribute ) unit _ dict ['percent _ health'] = unit _ in. health * 1. 0 / unit _ in. max _ health un...
[ -0.717555820941925, -0.8376110196113586, 0.6333141326904297, -0.5794656872749329, -0.6703295111656189, 0.6685410141944885, 0.2787875831127167, -0.01117402222007513, -0.06346737593412399, 0.00885777734220028, -0.36442846059799194, 0.5373494625091553, 0.47523635625839233, 0.01120419986546039...
def grad ( x, f, f0 = none, h = _ epsilon ) : # if necessary, calculate f ( x ) if f0 : pass else : f0 = f ( x ) # ensure query point is np. array if type ( x ). _ _ module _ _ = = np. _ _ name _ _ : pass else : x = np. array ( x ) # calculate gradient df = np. empty ( np. size ( x ) ) # reserve space e = np. eye ( np....
[ -0.4763568937778473, 0.9563552737236023, 0.6087458729743958, 0.4295288622379303, -0.3792986273765564, 0.2116479128599167, -0.2260255366563797, 0.6828754544258118, -0.9049013257026672, -0.18630985915660858, -0.2680051922798157, 0.1497727334499359, -0.14270465075969696, -0.018377138301730156...
def savesnapshoth5 ( fname, dscalar, dvector ) : n1 = max ( [ len ( v [ 0 ] ) for v in dscalar ] ) n2 = max ( [ len ( v [ 1 ] ) for v in dscalar ] ) dt = np. dtype ( [ ('element ', " s % d " % n1 ), ('field ', " s % d " % n2 ), ( " value ",'d') ] ) d = np. array ( dscalar, dtype = dt ) f = h5py. file ( fname,'w') grp =...
[ -0.9609241485595703, -0.06673422455787659, 0.8428071737289429, 0.27417051792144775, -0.8973821997642517, 0.34312018752098083, 0.9606784582138062, -0.3599444627761841, -0.4680202305316925, -0.3237571120262146, -1.5595614910125732, 0.13830280303955078, 0.4731539785861969, 0.3086947500705719,...
def frame _ image ( self, photo ) : photo = photo. resize ( ( self. width, self. height ), pil. image. antialias ) photo = pil. imagetk. photoimage ( photo ) image _ label = label ( self. image _ frame, image = photo ) image _ label. image = photo image _ label. grid ( row = self. row _ no, column = self. column _ no )
[ -0.699653148651123, 0.5187954306602478, 0.7207979559898376, 0.6196912527084351, -0.3897259533405304, 0.13937345147132874, 0.22383137047290802, -0.06296591460704803, 0.45803919434547424, 0.27860119938850403, 0.3176717758178711, 0.23871363699436188, 0.5156486630439758, 0.4505546987056732, ...
def calc _ max _ deflection _ angles ( x, y, max _ deflection _ df, skip _ odd = true, reference _ axis = [ 0, 1, 0 ], view _ axis = np. array ( [ 0, 0, 1 ] ) ) : if skip _ odd : max _ deflection _ df = max _ deflection _ df. iloc [ : : 2 ] n _ elem = len ( max _ deflection _ df. max _ deflection ) max _ deflection _ v...
[ -0.3547246754169464, 0.532244086265564, 0.7962305545806885, 0.02585388533771038, -0.09500174224376678, 0.029934024438261986, 0.675192654132843, -0.06422088295221329, 0.4562532305717468, 0.5544205904006958, 0.03400828689336777, 0.44027531147003174, 0.632318913936615, -0.7878687977790833, ...
def test _ atomic _ hex _ binary _ length _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 3. xsd ", instance = " nistdata / ...
[ 0.2707667946815491, 0.12736095488071442, 0.49900904297828674, 0.424625962972641, 0.2751704752445221, 0.7858637571334839, -0.6791189908981323, 0.44014641642570496, 0.260633647441864, 0.45328328013420105, -0.584632933139801, -0.4668847620487213, -0.04521752893924713, 0.20432035624980927, 0...
def setfillcolor ( self, color ) : self. button. setfillcolor ( color )
[ 0.2621705234050751, -0.4946502447128296, 0.47040021419525146, -0.30273544788360596, 1.4031109809875488, 1.6208935976028442, 0.4543808102607727, 0.046409547328948975, 0.4822118878364563, -0.6280110478401184, -1.3887267112731934, 0.40466931462287903, -0.07986108958721161, 1.8571197986602783,...
def int _ to _ time ( sec ) : t = time ( ) t. minute, t. second = divmod ( sec, 60 ) t. hour, t. minute = divmod ( t. minute, 60 ) return t
[ -0.6143593192100525, 0.08015909045934677, 0.39388757944107056, -0.8834031224250793, -0.2321331799030304, -0.442597359418869, -0.3702831566333771, -1.5254024267196655, -0.26359057426452637, 1.2885961532592773, -1.0206360816955566, -0.877155065536499, 0.12344103306531906, -0.4268937110900879...
def perform ( self, repository, user _ id, car _ make, car _ model, car _ color, license _ plate, telephone ) : driver = repository. add ( user _ id, car _ make, car _ model, car _ color, license _ plate, telephone ) self. publish ('driver _ created ', driver )
[ 0.06730715930461884, -0.06915419548749924, 0.27072158455848694, 0.2706032395362854, 1.4911346435546875, 0.0001654045918257907, -1.2553913593292236, 0.48812156915664673, -0.6545184850692749, -0.22278332710266113, -0.2311680167913437, 0.4841015338897705, -0.44451990723609924, 0.2555313408374...
def handle _ add _ movie ( self, title, year, category ) : # only add movie when title, year, category are provided if title and year and category : # make sure that title input is correct title _ check = self. handle _ input ( title, is _ title = true ) # make sure that category is on category list category _ check = ...
[ -0.8698495030403137, 0.2206045538187027, 0.8123037219047546, 0.6587150692939758, 0.3913096785545349, 0.992480456829071, -0.4545091986656189, 0.2915123701095581, -0.12419051676988602, 0.5964356660842896, 0.021182218566536903, -0.0816068947315216, -0.35085827112197876, 0.9455469250679016, ...
def model _ 3 ( seq _ length, embedding _ layer, num _ categories ) : model _ input = input ( shape = ( seq _ length, ), dtype ='int32') embed = embedding _ layer ( model _ input ) fc = timedistributed ( dense ( 100, activation = " relu " ) ) ( embed ) rnn = bidirectional ( gru ( units = 100, return _ sequences = false...
[ 0.4511159360408783, 0.2479446679353714, 0.5685303807258606, 0.9475998878479004, -0.10698405653238297, 0.25070565938949585, 0.1876911222934723, 0.0716889500617981, -0.05051187053322792, 0.4532448351383209, -0.7715626955032349, -0.036877334117889404, 0.6310128569602966, -0.05061791464686394,...
def test _ atomic _ id _ enumeration _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 1. xsd ", instance = " nistdata / atomic / id / schema + ...
[ -0.3250504434108734, -0.47089606523513794, 0.5067741870880127, 0.19472451508045197, -0.06847690045833588, 0.34011590480804443, 0.19792044162750244, -0.16588807106018066, 0.9819525480270386, 0.8927096724510193, -0.023654678836464882, -0.09099902212619781, -0.08972024917602539, -0.2396726459...
def test _ atomic _ any _ uri _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 4. xsd ", instance = " nistdata / atomic / ...
[ -0.3748980462551117, 0.004438835196197033, 0.5971819758415222, 0.8291800022125244, -0.1467059999704361, 0.06983314454555511, -0.06600721925497055, 0.060923390090465546, 0.26395905017852783, -0.20249581336975098, 0.18354113399982452, -0.7047903537750244, -0.565342903137207, -0.3514951765537...
def include _ masks ( self, rule ) : self. masks _ include = self. masks. copy ( ) for cls in self. classes : if not hasattr ( rule, cls ) : continue for include in getattr ( rule, cls ) [ " includes " ] : if include not in self. masks : continue self. masks _ include [ cls ] = cv2. bitwise _ or ( self. masks [ cls ], ...
[ 0.09071084856987, -0.2595446705818176, 0.7181557416915894, 0.1874646246433258, 0.5284834504127502, 0.8583314418792725, 0.856338381767273, -0.263591468334198, 0.8516550064086914, 0.3441518545150757, 0.01154662761837244, -0.01995127648115158, 0.0027024175506085157, 1.4491188526153564, 0.03...
def main ( ) : gdp _ state _ table ( )
[ 0.5395447611808777, 0.7153337597846985, 0.29765716195106506, 1.4636564254760742, 0.5768889784812927, 0.06093207001686096, 1.5114145278930664, -0.014429259113967419, -0.7537052035331726, 0.25415655970573425, 0.0385858379304409, 0.45618367195129395, 0.7181622982025146, -0.4415186941623688, ...
def source ( self ) - > str | none : return self. _ currently _ playing. get ( " device ", { } ). get ( " name " )
[ -0.5601420402526855, 0.34300777316093445, 0.5906417369842529, 0.20222193002700806, -0.6042059063911438, -0.04620780050754547, 0.9222943186759949, -0.37153947353363037, 0.45302730798721313, 0.14588682353496552, 0.04134102165699005, -0.3142939805984497, -0.11628219485282898, -0.1260974109172...
def simpleextractlineswithkeywords ( filename, keywords ) : fout = open ( filename + " _ keywords ", " w " ) mylist = open ( filename ). readlines ( ) for ele in mylist : if keywords in ele : fout. write ( ele ) fout. close ( )
[ 0.4445037841796875, -0.49222683906555176, 0.5398529171943665, 0.4586114287376404, -0.8875908255577087, 0.02447979524731636, -1.1017534732818604, 1.047851800918579, -0.39798691868782043, 0.5518348217010498, -0.8988361358642578, -0.737066388130188, -0.2504189610481262, 0.3792514204978943, ...
def getlogicalinterfaces ( self, draft = false, name = none, schemaid = none ) : if draft : req = apiclient. alllogicalinterfacesurl % ( self. host, " / draft " ) else : req = apiclient. alllogicalinterfacesurl % ( self. host, " " ) if name or schemaid : req + = "? " if name : req + = " name = " + name if schemaid : if...
[ -0.11430251598358154, -0.08770979940891266, 0.632150411605835, -0.013946197926998138, -0.5122086405754089, 0.13385635614395142, -1.1176457405090332, 0.5575106143951416, 1.1235172748565674, 0.0033598945010453463, -0.625070333480835, 0.7036620378494263, -1.9907636642456055, 0.419938832521438...
def remove _ repeated _ characters ( text ) : regex _ pattern = re. compile ( r'(. ) \ 1 +') clean _ text = regex _ pattern. sub ( r'\ 1 \ 1 ', text ) return clean _ text
[ -0.6889192461967468, 0.10074524581432343, 0.4294915497303009, 0.1830453723669052, -0.8238420486450195, -0.0672624260187149, 0.9488707184791565, 0.9009340405464172, 0.6571705341339111, 0.5913987755775452, -1.2633284330368042, 0.2683148980140686, -1.078639030456543, -0.6990569233894348, -0...
def test _ is _ magic ( ) : assert is _ magic ( array = [ [ 5, 3, 4 ], [ 1, 5, 8 ], [ 6, 4, 2 ] ] ) is false assert is _ magic ( array = [ [ 8, 3, 4 ], [ 1, 5, 9 ], [ 6, 7, 2 ] ] ) is true
[ -0.049186620861291885, -0.13382788002490997, 0.4924141466617584, 1.0316438674926758, 0.21481144428253174, 0.020984075963497162, 0.2609839141368866, -0.006747276056557894, 0.6579003930091858, 0.40753689408302307, 0.05586882308125496, 0.3191927969455719, -0.13317599892616272, 0.3376873433589...
def test _ add _ exe _ args _ list _ of _ ints ( ) : settings = runsettings ( " python " ) with pytest. raises ( typeerror ) : settings. add _ exe _ args ( [ 1, 2, 3 ] )
[ -0.8200249075889587, 1.2091346979141235, 0.696904718875885, 0.7830209136009216, 1.4213935136795044, 0.7131001949310303, -0.3315412700176239, -0.5293467044830322, 0.12789365649223328, 0.741573691368103, -1.2281924486160278, -0.8965455293655396, -1.1911910772323608, 0.8408530354499817, 0.3...
def _ _ str _ _ ( self ) : return f " { self. task. name } at { self. location. name } "
[ -0.4860953092575073, -2.2871739864349365, 0.608920156955719, -1.3876327276229858, -0.6983427405357361, 0.6973841190338135, 0.1474335938692093, -0.101216621696949, -0.9284340143203735, 0.7038043141365051, 0.08404220640659332, 0.29963746666908264, 1.32257080078125, -0.6142342686653137, -0....
async def test _ service _ info ( self ) : resp = await self. client. request ( " get ", " / service - info " ) data = await resp. json ( ) assert 200 = = resp. status assert " elixir - fi beacon test " = = data [ " name " ] assert data [ " type " ] [ " artifact " ] = = " beacon - test "
[ 0.3116651475429535, 0.25438693165779114, 0.20961326360702515, 0.3727668523788452, 1.2097920179367065, 0.6901608109474182, -0.21776548027992249, -0.5165759921073914, 0.05806009843945503, -0.8120983839035034, -0.24009279906749725, 0.3642711341381073, 0.19235670566558838, 0.23582834005355835,...
def potential _ zeros ( self ) : nqbtl = self. geo _ data. non _ qbx _ box _ target _ lists ( ) from pytools. obj _ array import make _ obj _ array return make _ obj _ array ( [ cl. array. zeros ( self. queue, nqbtl. nfiltered _ targets, dtype = self. dtype ) for k in self. code. out _ kernels ] )
[ -1.1686054468154907, -0.8573119044303894, 0.5643420219421387, 0.14386868476867676, 0.263123482465744, -0.19745826721191406, -0.3635295033454895, -1.245160460472107, 0.22847500443458557, -0.403493195772171, 0.27004221081733704, 0.9253032803535461, -0.11630721390247345, 0.8208177089691162, ...
def vector _ cost ( self, x, y ) : y _ p = np. dot ( x, self. w ) return y - y _ p
[ -0.09483099728822708, -0.6071146726608276, 0.5898945331573486, -0.8084326982498169, -0.3138113021850586, 0.40406081080436707, -0.2527574896812439, -0.5331195592880249, 0.37962979078292847, 1.0925464630126953, -0.09215330332517624, 0.6011244058609009, 0.4385501444339752, -0.454166054725647,...
def choose _ aws _ role ( self, assertion ) : roles = self. _ _ extract _ available _ roles _ from ( assertion ) if self. account : roles = [ elem for elem in roles if self. account in elem [ 1 ] ] role _ info = self. _ _ get _ role _ info ( roles, assertion ) if self. role : predefined _ role = self. _ _ find _ predef...
[ -0.025370247662067413, -0.24806714057922363, 0.5758457183837891, -0.4891175627708435, 0.6893660426139832, -0.03418252244591713, 0.7176291346549988, -0.7436535358428955, 0.8448077440261841, -0.7674551010131836, 1.3813954591751099, 0.7604682445526123, -0.6626015901565552, 0.10750273615121841...
def remove _ section _ from _ testsuite ( client, section _ id ) : client. send _ post ('delete _ section /'+ section _ id, none )
[ 0.3167601525783539, -0.49039313197135925, 0.17612923681735992, 0.2528894245624542, 0.34445396065711975, -0.05921552702784538, 0.25303879380226135, -0.1695137470960617, 0.36370131373405457, 0.48349064588546753, 0.05206335708498955, 0.737332284450531, -0.8253947496414185, 1.4783269166946411,...
def setidentifier ( self, union, qbytearray = none, bytes = none, bytearray = none ) : # real signature unknown ; restored from _ _ doc _ _ pass
[ -0.46597689390182495, -0.05807140842080116, 0.3624173700809479, 0.3064189553260803, 0.4375501871109009, 1.0588114261627197, 0.9893774390220642, 0.22224248945713043, 1.129677414894104, -0.2606799006462097, -1.0040481090545654, 0.030321402475237846, -0.8501472473144531, 0.511701226234436, ...
def rsidfinder ( rsid, filename ) : # project. rsidfinder ('i3001931 ','mygenome. txt') with open ( filename,'rt') as fin : return any ( rsid = = line. split ( ) [ 0 ] for line in fin )
[ 0.08669324219226837, -1.1569087505340576, 0.32273730635643005, -0.1358816921710968, 0.06972688436508179, -0.32888656854629517, -0.1735888421535492, 0.23513594269752502, -0.20882932841777802, 0.17785464227199554, 0.4989985525608063, 0.46099981665611267, -1.0356932878494263, 0.17221978306770...
def get _ description ( self, response : response ) - > dict : result = { } title = none for row in response. xpath ( " / / div [ @ class ='ncd - data fields display - block indented'] / * " ) : tag = row. xpath ('name ( )'). get ( ) if tag. startswith ('h') : # it is a title title = row. xpath ('string ( )'). get ( ) ...
[ -0.05968167632818222, -0.023646937683224678, 0.8503607511520386, 0.01376053411513567, -0.8551129102706909, -0.3524686396121979, -0.9501063823699951, -0.14387305080890656, -0.035717736929655075, -0.06399623304605484, -0.0026714468840509653, -0.214117169380188, 0.4384714663028717, 1.03867137...
def test _ list _ decimal _ enumeration _ 4 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 5. xsd ", instance = " nistdata / list / ...
[ -0.7828197479248047, -0.36864781379699707, 0.5608827471733093, 0.3700752258300781, -0.13286282122135162, -0.09104704111814499, 0.04460470750927925, -0.15688948333263397, 0.8553414940834045, 0.2612127959728241, -1.1906784772872925, -0.6974077820777893, -0.3834259510040283, 0.427971929311752...
async def start _ charge ( self ) - > none : data = await self. _ send _ command ( " start _ charge " ) if data and data [ " response " ] [ " result " ] is true : params = { " charging _ state " : " charging " } self. _ vehicle _ data [ " charge _ state " ]. update ( params )
[ -0.01744180917739868, 0.051037777215242386, 0.5561919212341309, 0.46712785959243774, 1.25766122341156, -0.3260524868965149, -0.7674482464790344, 0.12679895758628845, -0.09795312583446503, 0.03010660409927368, -0.15097229182720184, 1.0766775608062744, -0.3802916407585144, 0.7679226398468018...
def decodeasbaidu ( url ) : pattern ='http : / / www. baidu. com / s \? wd = (? p < englishtext > [ a - za - z0 - 9 + ] + )'matches = re. match ( pattern, url ) urldata = matches. group ('englishtext') words = urldata. split ('+') data = decodeasenglish ( words ) return data
[ -1.1322206258773804, -0.2688107192516327, 0.5726742744445801, -0.5366352796554565, -0.6087592244148254, 0.07898423820734024, -0.3594461679458618, 1.1465333700180054, 0.386269748210907, -0.006667271722108126, -0.5656774640083313, 0.6345267295837402, -0.6000158786773682, 0.031926821917295456...
def generateimportsfromexports ( ) : sys. stdout. write ( " \ n > auto - importing bookmarks : " ) # todo : add the config setup check before this for paths with spinner ( ) : b _ 1, c _ 1 = get _ browserexports ( buku = true ) b _ 2, c _ 2 = get _ mediumexports ( ) print ( c _ 1 + c _ 2, " objects imported " ) b _ 1. ...
[ 0.05319499224424362, -0.06642583012580872, 0.47419273853302, 1.5642253160476685, 0.5280580520629883, 0.06954959779977798, 0.669092059135437, -0.5531304478645325, -0.043673329055309296, 0.23456552624702454, -0.6508362293243408, 0.269256055355072, 0.05691045522689819, -0.034913551062345505, ...
def is _ updated _ after ( self, bucket _ name : str, object _ name : str, ts : datetime ) - > bool : blob _ update _ time = self. get _ blob _ update _ time ( bucket _ name, object _ name ) if blob _ update _ time is not none : if not ts. tzinfo : ts = ts. replace ( tzinfo = timezone. utc ) self. log. info ( " verify ...
[ 0.08567874133586884, -0.9891340732574463, 0.8323086500167847, 0.8710619211196899, -0.2989122271537781, 0.7160453796386719, -1.3722491264343262, -0.2918263077735901, -0.21017016470432281, 0.44279229640960693, -1.4340769052505493, 0.4161161184310913, 0.48883455991744995, -0.572998046875, -...
def check _ hangman ( fail _ count ) : if ( fail _ count = = 1 ) : print " you have'h'now " elif ( fail _ count = = 2 ) : print " you have'ha'now " elif ( fail _ count = = 3 ) : print " you have'han'now " elif ( fail _ count = = 4 ) : print " you have'hang'now " elif ( fail _ count = = 5 ) : print " you have'hangm'now ...
[ 0.026237642392516136, -0.33583712577819824, 0.7260526418685913, 0.8994035124778748, 0.03832341730594635, 0.5107882618904114, 0.20920994877815247, -0.11222424358129501, -1.1603485345840454, 0.2650371193885803, -0.10949839651584625, 0.4277191162109375, -1.1386038064956665, 0.6809805035591125...
def get ( self, request, * args, * * kwargs ) : if'order _ pk'in self. kwargs : user = self. request. user self. order = get _ object _ or _ 404 ( order, id = self. kwargs ['order _ pk'], created _ by = user ) return super ( ). get ( self, request, * args, * * kwargs )
[ -0.2723097801208496, 0.41529369354248047, 0.6572594046592712, 1.028960943222046, 0.856654942035675, 0.04760919138789177, -0.3676876723766327, -0.30468007922172546, 0.030454808846116066, 0.13632623851299286, 0.2368748039007187, 0.4240471422672272, 0.42596960067749023, 0.7946083545684814, ...
def initializeboard ( self ) : self. board = [ [ none for j in range ( cols ) ] for i in range ( rows ) ] for row in range ( rows ) : # ( row + 1 ) % 2 selects the alternate black columns in each row to # place the pieces. for col in range ( ( row + 1 ) % 2, cols, 2 ) : if row < 3 : self. board [ row ] [ col ] = piece ...
[ -0.6758546829223633, 1.1230769157409668, 0.5304927229881287, -0.34234949946403503, 0.9516848921775818, -0.143125519156456, 0.6001588106155396, -0.011215463280677795, 0.35694101452827454, -0.665068507194519, -0.5084081888198853, -0.02539718523621559, -0.43924376368522644, 0.5711797475814819...
def _ _ init _ _ ( self, instance : dict [ str, any ], ac _ key : str, zone _ key : str ) - > none : super ( ). _ _ init _ _ ( instance, ac _ key, zone _ key ) self. _ attr _ name = self. _ zone [ " name " ]
[ 0.06417401880025864, -0.34197357296943665, 0.4864160716533661, -0.5769750475883484, -0.8604645133018494, -0.15144827961921692, 0.5329314470291138, 0.7907850742340088, 0.17346924543380737, 0.8382841944694519, -0.20693835616111755, 0.266142338514328, 0.9800377488136292, 0.13365031778812408, ...
def mock _ vardir ( ) : today = datetime. date. today ( ) with temporarydirectory ( ) as td : for v in ('t _ 2m ','pres _ sfc ','rain _ gsp _ rate') : fname ='test _ { } _ { } z. nc '. format ( v, today. strftime ( " % y % m % d " ) ) write _ file ( path ( td ) / fname, ( v, ), 144, firststep = today, dt ='10min') yiel...
[ -1.137382984161377, -0.07305514812469482, 0.6676859855651855, -0.04495537281036377, 0.3126451373100281, 0.10985781252384186, 0.7409952282905579, -0.673491358757019, -0.7045994400978088, -0.529190182685852, 0.10249192267656326, -0.6812694668769836, 0.5130259394645691, 0.6047734022140503, ...
def safe _ peekline ( handle ) : line = handle. peekline ( ) if not line : raise valueerror ( " unexpected end of stream. " ) return line
[ 1.479967713356018, 0.3025263845920563, 0.4680684506893158, 0.2236817181110382, 0.18874621391296387, 0.10560867935419083, -0.5623084306716919, -1.4075052738189697, -0.5595439672470093, -0.6341837644577026, 0.5932109355926514, 0.14212816953659058, -0.3400310277938843, -0.4732305109500885, ...
def multiproc _ pool _ function ( ) - > any : with pool ( 40 ) as pool : result = sum ( pool. map ( slow _ calculate, range ( 500 ) ) ) return result
[ 0.192146897315979, 0.5506539344787598, 0.37017035484313965, 0.22374720871448517, 0.2338283658027649, -0.35302460193634033, 1.0547574758529663, -0.5094636082649231, 0.1326294243335724, -0.1723288893699646, -1.2605109214782715, 0.437118798494339, -0.12176686525344849, 0.1802016943693161, -...
def item _ upload ( instance, filename ) : y = get _ random _ name ( ) return'item / { }. { } '. format ( y, imghdr. what ( instance. image ) )
[ -1.1191809177398682, -0.4375382363796234, 0.5386215448379517, -0.7954069375991821, 0.24479793012142181, 0.5206339359283447, 0.12898631393909454, -0.1350155919790268, 0.05037589743733406, 0.6018878817558289, -0.13055942952632904, -0.031279273331165314, 0.26058274507522583, -0.27804899215698...
def is _ preconditioning _ enabled ( self ) - > bool : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " preconditioning _ enabled " )
[ 0.13189712166786194, 0.5608184933662415, 0.32787981629371643, 0.5923579335212708, 0.17836004495620728, -0.011064492166042328, -0.05997277423739433, 0.7423639297485352, 0.07662395387887955, 0.5765958428382874, -0.6309731602668762, -0.4407203197479248, -0.6713613867759705, 0.8188228607177734...
def _ _ getlaptopbindings ( self ) : import orca. laptop _ keyboardmap as laptop _ keyboardmap keybindings = keybindings. keybindings ( ) keybindings. load ( laptop _ keyboardmap. keymap, self. inputeventhandlers ) return keybindings
[ -1.3146511316299438, -0.26282578706741333, 0.5117356777191162, 0.5123717784881592, -0.9420883059501648, 0.3461630344390869, -0.023745879530906677, -0.14568740129470825, 0.9637486934661865, -0.2070455402135849, -1.0787630081176758, -0.6676062941551208, -0.5624743700027466, -0.28687623143196...
def test _ atomic _ hex _ binary _ max _ length _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 1. xsd ", instance = " ...
[ 0.17732976377010345, -0.10671016573905945, 0.3129977583885193, 0.9552299976348877, -0.42352086305618286, 0.4671230614185333, -0.18463896214962006, 0.13619516789913177, -0.013683000579476357, 0.5078452229499817, -0.7047494649887085, -0.6150877475738525, -0.21287015080451965, 0.6727595925331...
def get _ form _ titles _ list ( self, form _ titles _ elements ) : form _ titles _ list = [ ] for form _ title in form _ titles _ elements : form _ title = form _ title. text. strip ( ) form _ titles _ list. append ( form _ title ) return form _ titles _ list
[ -0.39974239468574524, -0.7618252038955688, 0.38156646490097046, 0.005473665427416563, -0.003163608955219388, 0.5362679362297058, -1.6891554594039917, 0.7059929966926575, 0.25793904066085815, -0.3463473618030548, -0.5037970542907715, -0.812066376209259, 0.22201097011566162, 1.06340003013610...
def run ( self ) : # change the working directory to the external batch id try : self. conn. cwd ( " / " + self. external _ id ) for filename in self. filelist : # external id is the bucket name, add this to the file name download _ file _ path = os. path. join ( self. target _ dir, filename ) # check that the the sub ...
[ -0.30726510286331177, -0.46734338998794556, 0.7586891651153564, 0.8016140460968018, 1.0935829877853394, 0.1366652399301529, 0.13109642267227173, 0.6352689862251282, -0.6055057048797607, -0.3466878831386566, -0.18494997918605804, -0.1424359530210495, -0.4732591211795807, 0.06596671789884567...
def dblogin ( email, password ) : err = [ ] syserr = [ ] user = dbaccessconnection. userinfo. select ( dbaccessconnection. userinfo. c. emailaddress = = email ). execute ( ). first ( ) if user is none : err. append ( " invalid e - mail address " ) return ( none, ( err, syserr ) ) elif ( user ['password'] = = password )...
[ 0.21322406828403473, 0.12155087292194366, 0.7632917165756226, 0.14414829015731812, -0.03779890388250351, -0.06890890747308731, -0.36784908175468445, -0.17013804614543915, 0.23052692413330078, 0.1874094307422638, -0.3361096680164337, -0.20132972300052643, -0.35684093832969666, 0.15145349502...
def absmove ( self, position ) : return self. run ( " absmove ", position )
[ -0.8296287655830383, -0.7221973538398743, 0.4993171691894531, 0.8490610718727112, -0.4282679259777069, -0.281823068857193, -0.6293621063232422, -0.8686116337776184, -0.0619676411151886, 0.5030112266540527, -0.04844975471496582, -0.011458583176136017, -0.3408195972442627, 0.1101370304822921...
def crypt _ file _ contents ( self, data : bytes ) - > optional [ bytes ] : assert ( len ( data ) < = self. read _ len ) return self. _ encrypt ( data )
[ 0.0761105939745903, 0.04326701536774635, 0.3666309714317322, -0.03420605510473251, -0.1533667892217636, -0.2223903238773346, -0.7424201369285583, -1.7821260690689087, -0.45474594831466675, -0.18191644549369812, -0.01738157868385315, -0.5802638530731201, -0.9271767735481262, -0.650396645069...
def test _ list _ decimal _ enumeration _ 4 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 5. xsd ", instance = " nistdata / list / ...
[ -0.9231500029563904, -0.6573212742805481, 0.5487762093544006, 0.7851269841194153, -0.04950226843357086, -0.24318479001522064, 0.4467330276966095, 0.0533505342900753, 0.6341230273246765, 0.4071445167064667, -1.1414448022842407, -0.5051974654197693, -0.3745967447757721, 0.6433233022689819, ...
def import _ submodules ( package, recursive = true ) : if isinstance ( package, str ) : package = importlib. import _ module ( package ) results = { } for loader, name, is _ pkg in pkgutil. walk _ packages ( package. _ _ path _ _ ) : full _ name = package. _ _ name _ _ + '.'+ name results [ full _ name ] = importlib. ...
[ -0.3526516258716583, 1.6384718418121338, 0.7477226853370667, 0.43499311804771423, -0.9424251317977905, -0.011571922339498997, 0.46510782837867737, -0.5630232691764832, -0.02123984321951866, 0.12344533205032349, -1.2933406829833984, -0.5912824273109436, -0.398190975189209, 0.573773980140686...
def _ get _ reads ( chrom, strand, gcoord, inbams ) : if strand = ='+': return itertools. ifilter ( lambda rd : not rd. is _ reverse, itertools. chain. from _ iterable ( ( bamfile. fetch ( reference = chrom, start = gcoord, end = gcoord + 1 ) for bamfile in inbams ) ) ) else : # strand = ='-'return itertools. ifilter (...
[ 0.6558412909507751, -0.40921515226364136, 0.6003217697143555, 0.278034508228302, 0.4609401822090149, 0.6171405911445618, -0.3858221769332886, -0.2634904980659485, -0.9807103872299194, -0.2583317756652832, 1.0376050472259521, 0.877607524394989, -0.48263463377952576, -0.5817983150482178, 0...
def register _ commands ( registry, subparsers, defaults ) : buildgcecomponentimagesfactory ( ). register ( registry, subparsers, defaults )
[ -0.4052492082118988, 0.7858726978302002, 0.06227478012442589, 0.08670659363269806, 1.4608368873596191, 0.005936477333307266, -0.18717703223228455, 0.20062114298343658, -0.5741052627563477, -0.5589932799339294, -1.19358491897583, 0.16438327729701996, 0.19380176067352295, 0.4216917157173157,...
def captured _ stdout ( encoding ='utf - 8') : orig _ stdout = sys. stdout sys. stdout = io. textiowrapper ( io. bytesio ( ), encoding = encoding ) try : yield sys. stdout finally : sys. stdout = orig _ stdout
[ 1.2764947414398193, -0.4806585907936096, 0.6772470474243164, 0.18435049057006836, -0.4672112464904785, -0.3207593858242035, -0.18556919693946838, -0.9855292439460754, 0.2567466199398041, -0.6829370260238647, -0.6824274063110352, 0.15208010375499725, 1.1243058443069458, 0.007124729454517364...
def parse ( self, input _, serialize = false ) : # validate input : if input _ is none and not self. _ is _ optional : raise valueerror ('repeatedfield is not optional') elif input _ is none and self. _ is _ optional : return none elif not isinstance ( input _, list ) : raise valueerror ('repeatedfield expected list bu...
[ -0.8444954752922058, 0.4062712788581848, 0.49649277329444885, 0.36732545495033264, 0.5186890363693237, -0.10884391516447067, 0.010364457964897156, 0.6998752951622009, 0.5007355809211731, 0.055292852222919464, -1.0256673097610474, -0.17410063743591309, -1.150645136833191, -0.081467188894748...
def integrand _ example ( xarr, weight = fone ) : n _ dim = xarr. shape [ - 1 ] a = tf. constant ( 0. 1, dtype = dtype ) n100 = tf. cast ( 100 * dim, dtype = dtype ) pref = tf. pow ( 1. 0 / a / np. sqrt ( np. pi ), n _ dim ) coef = tf. reduce _ sum ( tf. range ( n100 + 1 ) ) coef + = tf. reduce _ sum ( tf. square ( ( x...
[ 0.6984473466873169, 0.4386405348777771, 0.57100909948349, 0.07092836499214172, -0.3411937952041626, -0.6914408206939697, 0.4874957203865051, 0.40733978152275085, 0.41507333517074585, 0.43587392568588257, -0.18858250975608826, -0.0298598725348711, 0.2441883683204651, 0.3112458884716034, 0...
def _ parse _ args ( ) : def year _ month _ day ( value ) - > datetime : if value = ='today': return datetime. now ( ) return datetime. strptime ( value, tokens. date _ format ) year _ month _ day. _ _ name _ _ ='year - month - day ( yyyy - mm - dd )'# shared command line options. option _ db = argparse. argumentparser...
[ 0.2634231746196747, 0.5976106524467468, 1.0082271099090576, -0.6260585188865662, 0.6633811593055725, 0.1427510678768158, -0.26226669549942017, -0.07262106984853745, -0.8145191073417664, -0.1617058515548706, -0.22756972908973694, 0.5768824219703674, 0.02068307064473629, 0.48303157091140747,...
def train _ gnb _ model ( x _ train _ scaled, y _ train ) : clf = gaussiannb ( ) clf. fit ( x _ train _ scaled, y _ train ) print ( clf. score ( x _ train _ scaled, y _ train ) ) return clf
[ -0.292707622051239, -0.0530894473195076, 0.6057479977607727, 0.6008254289627075, 0.98375403881073, 1.0439784526824951, -0.7089260816574097, -0.9095637798309326, -1.3297032117843628, 0.07841075956821442, -1.0388075113296509, 1.1213277578353882, 0.0788557156920433, -0.0809793546795845, -0....
def phone ( self ) : return self. _ phone
[ 0.06740043312311172, -0.1962006539106369, 0.03859969601035118, 0.5053567290306091, 0.28390443325042725, 1.263291835784912, 0.536960244178772, -0.46597567200660706, 0.611685037612915, -1.0687354803085327, 0.6562345027923584, -0.4472190737724304, -0.26383277773857117, -0.2470579743385315, ...
def scroll _ to ( self, id ) : self. eval _ js ('table. _ scrollto ( { } ) ; '. format ( id ) )
[ -0.9871277213096619, 0.47259145975112915, 0.4662361145019531, -0.4106886684894562, -0.19914297759532928, -0.7348286509513855, 0.4350891411304474, -1.3131887912750244, -0.5430758595466614, 0.2137860655784607, -1.345649242401123, 0.9917933940887451, 0.8216737508773804, 0.37491828203201294, ...
def test _ atomic _ language _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 3. xsd ", instance = " nistda...
[ -0.18563920259475708, -0.6218533515930176, 0.5127996206283569, 0.3096705675125122, -0.4460572302341461, 0.4669080078601837, 0.15875403583049774, 0.07792296260595322, 0.07845190912485123, 1.2650638818740845, -0.7249130606651306, -0.07541491836309433, 0.22480322420597076, -0.2454760074615478...