text
stringlengths
25
2.19k
embedding
listlengths
768
768
def rospyspin ( ) : rospy. spin ( )
[ -0.16695302724838257, -1.0403114557266235, 0.061130888760089874, 1.1028927564620972, 1.5292491912841797, 0.4520900845527649, 0.33015406131744385, -0.03775811195373535, 0.7466542720794678, -0.1820816695690155, 0.10859845578670502, 0.4124426543712616, 0.12255580723285675, -0.2149645239114761...
def _ _ repr _ _ ( self :'linked _ list') - > str : result ='['current = self. head while current : result + = repr ( current. data ) if current. link : result + = ','current = current. link result + =']'return result
[ -0.46301594376564026, -0.97874516248703, 0.44749680161476135, -1.250078797340393, -0.19416646659374237, 0.3196474611759186, -0.7806792855262756, 0.16955742239952087, 0.9441606998443604, -0.13627885282039642, 0.14593754708766937, 0.8113406896591187, -0.2024606317281723, 0.20229434967041016,...
def compute _ bundle _ coverage _ scores ( sft, ground _ truth _ mask ) : gt _ data = ground _ truth _ mask. get _ data ( ) candidate _ data = _ create _ binary _ map ( sft, ground _ truth _ mask ) overlap = _ compute _ overlap ( gt _ data, candidate _ data ) overreach = _ compute _ overreach ( gt _ data, candidate _ d...
[ -0.3711032271385193, -0.4128858149051666, 0.6139898300170898, 0.32141074538230896, 0.07391908019781113, 0.045053765177726746, 0.7683300375938416, -0.6022735834121704, -0.8068812489509583, -0.12926951050758362, -0.17760446667671204, -0.25966891646385193, 0.9070858955383301, -0.1372160911560...
def get _ rules ( row ) : # global prefbias, suffbias, allprules, allsrules if prefbias > suffbias : lemma = list ( reversed ( row [ 3 ] ) ) form = list ( reversed ( row [ 0 ] ) ) else : lemma = row [ 3 ] form = row [ 0 ] lp, lr, ls, fp, fr, fs = alignprs ( lemma, form ) # get six parts, three for in three for out # su...
[ 0.2848520576953888, 0.3569866716861725, 0.6348088979721069, -0.816133439540863, -0.017010444775223732, -0.21182499825954437, -0.5573837757110596, 0.41777855157852173, -0.40561893582344055, 0.834506094455719, 0.36313965916633606, 0.09336894005537033, -0.07603813707828522, -0.320025742053985...
def run _ history ( self ) : # do nothing if starttime not given if not self. fetch _ history : return # get list of hsitoric events self. _ _ fetch _ event _ history ( ) # estimate occupancy for history cc = 0 for i, event _ data in enumerate ( self. event _ history ) : cc = hlp. loop _ progress ( cc, i, len ( self. e...
[ -0.17216253280639648, 0.008579938672482967, 0.8994268178939819, 0.5015981197357178, 0.2597208321094513, 0.37443801760673523, 0.7283153533935547, 0.2858423888683319, -0.6107689738273621, 0.09153304994106293, 0.3467671275138855, 0.8771215677261353, 0.13023369014263153, 1.2408511638641357, ...
def aoe _ eval ( detpath, annopath, imagesetfile, classname, # cachedir, ovthresh = 0. 5 ) : with open ( imagesetfile,'r') as f : lines = f. readlines ( ) imagenames = [ x. strip ( ) for x in lines ] recs = { } for i, imagename in enumerate ( imagenames ) : recs [ imagename ] = parse _ gt ( annopath. format ( imagename...
[ -0.4905672073364258, 0.011038059368729591, 0.7793533205986023, -0.8021338582038879, 0.08792086690664291, 0.415868878364563, 1.0457844734191895, 0.04108819365501404, -0.5639854669570923, 1.1479439735412598, 0.09477962553501129, -0.09883517026901245, 0.6391298174858093, 0.6562973856925964, ...
def main ( argv = none ) : signal. signal ( signal. sigint, lambda * args : sys. exit ( _ signal _ exit _ code _ base + signal. sigint ) ) if hasattr ( signal, " siginfo " ) : signal. signal ( getattr ( signal, " siginfo " ), lambda * args : report _ progress ( sys. stderr ) ) try : return cli ( argv ) except filenotfo...
[ 0.4091203510761261, -0.38996338844299316, 0.8913142085075378, 0.47129034996032715, -0.551460862159729, -0.2293207198381424, 0.5546691417694092, 0.2078782618045807, -0.4480326771736145, -0.01983802579343319, 1.052808165550232, 0.04428889602422714, -0.5474257469177246, 0.4123665988445282, ...
def _ split _ dataset _ stratified ( self, label _ dirs, splits ) : num _ splits = len ( splits ) label _ samples = [ glob. glob ( os. path. join ( dir,'*. *') ) for dir in label _ dirs ] num _ samples = sum ( [ len ( samples ) for samples in label _ samples ] ) num _ labels = len ( label _ dirs ) splits _ filenames = ...
[ -1.256467342376709, 0.13241027295589447, 0.8721861243247986, -0.5845194458961487, 0.06536209583282471, 0.48954781889915466, 0.8780299425125122, 0.2245495468378067, 0.4601217210292816, 0.6134441494941711, 0.673865556716919, -0.08261730521917343, 0.019411835819482803, -0.4408567547798157, ...
def clearpoint ( self, p ) : previous = self. b [ p [ 0 ] ] [ p [ 1 ] ] [ p [ 2 ] ] self. b [ p [ 0 ] ] [ p [ 1 ] ] [ p [ 2 ] ] = 0 if previous! = 0 : self. movelist. remove ( ( p, previous ) ) self. pointslist [ 0 ]. add ( p ) self. pointslist [ previous ]. remove ( p ) self. updatelines ( previous, p ) return previou...
[ 0.021446770057082176, 0.04139658436179161, 0.7254323959350586, 0.18439170718193054, -0.40915465354919434, 0.39837974309921265, -0.14480888843536377, 0.45053359866142273, 0.6118988394737244, 1.250625491142273, 0.2108342945575714, 0.11738705635070801, -1.238524079322815, -0.9298538565635681,...
def display ( request ) : title ='treasury'userbalance = usertreasury. get _ balance ( user = request. user ) content = {'title': title,'balance': userbalance } return render ( request,'treasury / treasury. html ', content )
[ 0.3880200684070587, 0.10804232954978943, 0.24711255729198456, -0.33944886922836304, -0.2153390347957611, 0.6616965532302856, 0.3894205689430237, -0.3639093339443207, 0.2620444595813751, 0.08986590802669525, 0.905608594417572, -0.23574799299240112, 0.3430299162864685, -0.2716156840324402, ...
def hung _ total _ rate ( cls, sum _ data, * * search _ info ) : product _ list = [ 1, 2 ] sum _ measure _ data = dictwrapper ( { } ) sum _ measure _ data. volume _ total = 0 sum _ measure _ data. open _ number _ total = 0 sum _ measure _ data. activation _ number _ total = 0 sum _ measure _ data. conversion _ rate _ t...
[ -0.18431904911994934, -0.14001868665218353, 0.9943456649780273, -0.00473442068323493, 0.5294305086135864, 0.3401668071746826, 0.004970247857272625, -0.2760755717754364, -0.11915645748376846, 0.7326253652572632, -0.2581026256084442, -0.6032078862190247, -0.5137913227081299, -0.0078921383246...
def mousepressevent ( self, event ) : if event. button ( ) = = qt. leftbutton : self. _ _ dragstartpos = qpoint ( event. pos ( ) ) super ( tabbar, self ). mousepressevent ( event )
[ 0.6790732741355896, -0.2495969980955124, 0.7059943675994873, -0.04182172939181328, 0.2133789211511612, 1.2627227306365967, -0.4891737699508667, 0.01811528392136097, -0.12547196447849274, 0.2909596264362335, -0.8667585849761963, -0.9082626700401306, 0.852131724357605, 0.7648062109947205, ...
def _ get _ temporary _ dataset ( self, jobid ) : return self. temporarydatasetfactory. get ( datatype = self. outputdataset. datatype, name = f'{ self. outputdataset. name } _ { jobid : 03 }')
[ -0.39308059215545654, -0.325651079416275, 0.16893713176250458, -1.0334521532058716, -1.5893563032150269, -0.621425986289978, -0.29113253951072693, -0.8527764081954956, -0.08824016898870468, -0.6709067821502686, 0.14496751129627228, 0.8301990032196045, -0.30566152930259705, -0.1993129849433...
def to _ json ( self ) : del self. nodes [ : ] dump = self. booster. get _ dump ( with _ stats = true, dump _ format ='json') for i, tree in enumerate ( dump ) : self. nodes. append ( [ ] ) self. recursive _ bfs ( json. loads ( tree ) ) for i, n in enumerate ( self. nodes ) : self. nodes [ i ] = " " " { predict : funct...
[ -0.32541772723197937, -0.5855305194854736, 0.6143210530281067, -0.49251607060432434, 0.15169137716293335, -0.3142435550689697, 0.2867065668106079, -0.8432850241661072, 0.015154620632529259, 0.22213146090507507, -0.737743079662323, 1.0274502038955688, 0.7378477454185486, 0.9892492890357971,...
def create _ prediction ( conn, cur _ inference ) : data _ tuple = ( cur _ inference. pred _ id, cur _ inference. user _ id, cur _ inference. time _ stamp, cur _ inference. prob, cur _ inference. stype ) sql ='''insert into ` fake _ voice ` ( pred _ id, user _ id, time _ stamp, prob, stype ) values ( % s, % s, % s, % s...
[ 0.08832953125238419, -0.22130337357521057, 0.7467144131660461, 0.0839109867811203, 0.11290504783391953, 0.21035411953926086, -0.17157121002674103, -0.03412986546754837, -1.2416298389434814, 0.7719933390617371, -0.07115204632282257, -0.3471350371837616, -1.4323201179504395, 0.62839221954345...
def alignment _ builder ( columns, rows, trace _ matrix, align _ matrix, align ='global ', affine _ adjust = false, x _ matrix = none, y _ matrix = none ) : # instantiate alignment lists align _ a = [ ] align _ b = [ ] if align = ='global': i = len ( rows ) - 1 j = len ( columns ) - 1 elif align = ='local': row _ maxs ...
[ 0.8029325008392334, -0.3827607333660126, 0.9352688193321228, 0.5380481481552124, -0.40533044934272766, -0.14518937468528748, 0.5655999183654785, 0.5612621903419495, -0.09212721139192581, 0.7372807264328003, 0.6428271532058716, 0.008723137900233269, -0.1333458572626114, 0.013729841448366642...
def get _ forest _ properties ( forest : union [ randomforestregressor, randomforestclassifier ], average : bool = true ) : properties = ['max _ depth ','node _ count ','n _ leaves'] counts = np. zeros ( ( forest. n _ estimators, len ( properties ) ), dtype = np. int64 ) for i, tree in enumerate ( forest. estimators _ ...
[ -1.1340783834457397, 0.327411949634552, 0.4231070280075073, 0.6976912021636963, 0.48299407958984375, -0.6826229691505432, 0.1728491187095642, 0.004233090672641993, -0.932292103767395, -0.2131492793560028, 1.110042929649353, 0.3893885314464569, -0.038859546184539795, 0.16623321175575256, ...
def clean _ str ( s ) : try : return escape ( s, quote = true ) except attributeerror : # not a string type return escape ( str ( s ), quote = true )
[ 0.44242334365844727, -0.57215815782547, 0.06263807415962219, 0.4511517286300659, -1.075974702835083, -0.33156976103782654, -0.2061806619167328, -1.1211975812911987, 0.1569795310497284, 0.7076192498207092, 0.6820475459098816, 0.4068393409252167, 0.127585306763649, -0.05692888796329498, 0....
def _ set _ proba _ intensity ( self, centr _ burned ) : # the brightness values are chosen randomly at every burned centroids # from the brightness values of the historical fire ev _ proba _ uni = centr _ burned. nonzero ( ) [ 0 ] * self. centroids. shape [ 1 ] + \ centr _ burned. nonzero ( ) [ 1 ] proba _ intensity =...
[ 0.22028209269046783, -0.7168211936950684, 0.31764504313468933, 0.5033376216888428, 0.05240963399410248, 0.35891857743263245, 0.020420262590050697, 0.7653144598007202, 0.01725049875676632, 0.02467574179172516, 0.5730106234550476, -0.14238916337490082, -1.1215848922729492, 0.1014252901077270...
def metrics ( self ) : return self. _ metrics
[ -0.36162906885147095, 0.4417431056499481, 0.23487600684165955, 0.051854804158210754, -0.024369485676288605, 0.9733415842056274, 0.5950329303741455, -0.3325093388557434, 0.10708919167518616, -0.9936951994895935, 0.11134516447782516, -0.2441636621952057, -0.13113130629062653, -0.255680739879...
def load ( self, sensorid, type = " raw " ) : # selecting the correct table typetable = " sensor _ values " ; if ( type = = " min " ) : typetable = " sensor _ values _ minute " elif ( type = = " hour " ) : typetable = " sensor _ values _ hour " elif ( type = = " day " ) : typetable = " sensor _ values _ day " # retriev...
[ -0.8568339943885803, 0.49933546781539917, 0.5431568026542664, -0.17718271911144257, -0.12567183375358582, -0.03991999849677086, -0.8378472924232483, -0.964595377445221, 0.3044940233230591, -0.5659517645835876, 0.8814581036567688, 0.41840997338294983, -0.5815356969833374, 0.335310697555542,...
def _ _ init _ _ ( self, id, type, data = none, # pylint : disable = too - many - arguments files = none, user _ defined = none ) : self. raw = { } # note these are all going to raw behind the scenes ( see _ _ setattr _ _ ) self. id = id self. type = type self. data = data if data else { } self. files = files if files ...
[ -0.26952964067459106, -0.3973523676395416, 0.634429931640625, 0.21485744416713715, -0.055327825248241425, -0.39315065741539, -0.4940434992313385, 0.20289874076843262, 0.14016468822956085, -0.6570634841918945, -0.645696222782135, 0.22734029591083527, 0.5119621753692627, 0.6457062363624573, ...
def register _ argument _ parser ( add _ parser, action ) : sub _ command = str ( action ) return add _ parser ( sub _ command, help = f'{ sub _ command } token ', description = f'{ sub _ command. capitalize ( ) } a waiter token.'' in addition to the optional arguments'' explicitly listed below,'' you can optionally pr...
[ 0.47949936985969543, 0.16633480787277222, 0.8321440815925598, -0.09547150135040283, 0.1593298763036728, 0.018893977627158165, -0.7418795228004456, 0.30882012844085693, -0.5488590002059937, 0.2404169738292694, -0.4829566180706024, 1.4764381647109985, 0.16730615496635437, 0.43737441301345825...
def hex _ to _ byte _ array ( hex _ str ) : try : return bytearray ( binascii. unhexlify ( hex _ str ) ) except binascii. error as err : logger. error ( " caught exception while converting hex string to bytearray - % s ", err ) return none except typeerror as err : logger. error ( " caught exception while converting he...
[ 0.168893501162529, -1.0690256357192993, 0.34598228335380554, -0.004074071999639273, 0.0719451904296875, -0.1509646475315094, -0.2947862148284912, 0.18927326798439026, 0.030231794342398643, -0.6634892821311951, -0.49676182866096497, 0.03902200981974602, -0.8577025532722473, 0.86447900533676...
def get _ dex ( self ) : return self. get _ file ( " classes. dex " )
[ -0.4673624634742737, 0.22454850375652313, 0.6073864698410034, -0.32489654421806335, 0.6087300181388855, 0.7987658381462097, 0.5529771447181702, -0.15077538788318634, 0.5356446504592896, -0.883857011795044, 0.9142419099807739, 0.05656042695045471, 0.08886204659938812, -0.43488043546676636, ...
def get _ leverage ( self ) : a = self. get _ ledger ( ). get _ asset _ valuation ( ) l = self. get _ ledger ( ). get _ liability _ valuation ( ) if a = = 0 : # prevents divide by 0 return 0 return ( a - l ) / a
[ 0.7531844973564148, -0.4403400719165802, 0.6258643269538879, -0.5648911595344543, 0.761968195438385, 0.3968085050582886, -0.15175825357437134, 0.07338622212409973, 0.13358712196350098, -0.12013565748929977, 1.0388336181640625, -0.00462938891723752, -0.4287166893482208, 0.5052038431167603, ...
def find _ complementary _ nodes ( network, inds, asmask = false ) : node _ prefix = get _ node _ prefix ( network ) inds = np. unique ( inds ) n = network [ node _ prefix + '. coords']. shape [ 0 ] mask = np. ones ( shape = n, dtype = bool ) mask [ inds ] = false if asmask : return mask else : return np. arange ( n ) ...
[ -0.8828179240226746, -0.0325133390724659, 0.32979506254196167, 0.5232751369476318, 0.5163273811340332, -0.7446212768554688, 0.582293689250946, -0.4276830852031708, 0.6957820057868958, 0.9849838614463806, 0.37719741463661194, -0.13898985087871552, 0.0010732183000072837, -0.2995074987411499,...
def docs ( self ) : return self. _ docs
[ -0.400581419467926, 0.07136977463960648, 0.26019716262817383, 0.34099581837654114, -0.3188132643699646, 0.3891495168209076, 0.6886829733848572, -0.8383309245109558, 0.9930738210678101, -1.2032625675201416, 0.19588620960712433, -0.12445516139268875, -0.084296315908432, -0.2507927715778351, ...
def test _ ticketid ( self ) : testresult = { } testresult = dataparser _ map. advancesearch ( " 2 ", " _ id ", " 1a227508 - 9f39 - 427c - 8f57 - 1b72f3fab87c " ) # print ( testresult ) self. assertequal ( testresult [ 0 ] [ " _ id " ], " 1a227508 - 9f39 - 427c - 8f57 - 1b72f3fab87c ", " ticket id not found " ) testres...
[ 0.22310006618499756, -0.1815757155418396, 0.8262407183647156, -0.7932464480400085, -0.31764450669288635, 0.3551962971687317, 0.014319730922579765, -0.02587682567536831, -0.7436897158622742, -0.9695740342140198, -0.7754069566726685, -0.5697978734970093, -0.2443535178899765, 0.15386006236076...
def get _ granularity ( self ) : return self. granularity
[ 0.21923589706420898, 0.4902991056442261, 0.48512884974479675, 0.6163080930709839, 0.887965202331543, 0.13216634094715118, 0.715168833732605, -0.22640660405158997, -0.09930448979139328, -0.09748619794845581, 0.4166918694972992, 1.0318543910980225, -0.8259770274162292, -0.14998847246170044, ...
def compileregexpattern ( self, patterns ) : # assume an empty pattern is a confused user, match everything. if patterns = ='' : patterns ='^ (. * )'try : repattern = re. compile ( patterns ) self. repattern = repattern except re. error : raise
[ -0.35443076491355896, 0.12196704000234604, 0.3193269371986389, 0.5889344811439514, 0.4516567885875702, 0.5193501114845276, 0.021361323073506355, 0.9586668014526367, 0.7046941518783569, -1.0837267637252808, -0.7066704630851746, 0.0602860264480114, -0.6776466965675354, 0.052984658628702164, ...
def get _ username3 ( ) : return os. getlogin ( )
[ -0.38867783546447754, -0.4685850441455841, 0.4240860641002655, 1.177359938621521, -1.0119447708129883, 0.5869449377059937, 0.557536244392395, -0.14225304126739502, -0.21027390658855438, -0.2930414080619812, -0.6062350273132324, 0.4362991452217102, -0.19937802851200104, -1.5443249940872192,...
def readzeroquerynumberdata ( input _ stream ) : zero _ query _ dict = defaultdict ( list ) for line in input _ stream : if line. startswith ('#') : continue line = line. rstrip ('\ r \ n') if not line : continue tokens = line. split ('\ t') key = tokens [ 0 ] values = tokens [ 1 ]. split ( ',') for value in values : z...
[ 0.09263358265161514, -0.41004279255867004, 0.21927860379219055, -0.3172210454940796, -0.64935302734375, -0.015632539987564087, 0.20714929699897766, 0.5101537108421326, -0.7579160928726196, -0.5144480466842651, -0.6377465128898621, 0.07634518295526505, 0.2766183018684387, 0.7097684741020203...
def parse _ message ( line, year = none ) : return re. search ( pattern, line )
[ 0.12393863499164581, 0.48789966106414795, 0.5073179006576538, -0.0015856244135648012, 0.3336588144302368, -0.6077160835266113, -0.11334074288606644, 0.5328492522239685, -0.48885756731033325, -0.5046221613883972, 0.23118525743484497, -0.10255850106477737, -1.2079259157180786, -0.50283080339...
def bank _ debit _ details ( self, bank _ debit _ details ) : self. _ bank _ debit _ details = bank _ debit _ details
[ 0.8344224095344543, 0.40690362453460693, 0.10173504799604416, 0.19164489209651947, 0.6396852731704712, 2.180860996246338, -0.3304626941680908, -0.12287385016679764, -1.1450543403625488, -0.7958216071128845, -0.30230996012687683, -0.2731286883354187, -0.5762383937835693, 1.2642090320587158,...
def insert ( self, k, v ) : assert false, " not implemented " # todo : use bisect to locate the insertion point ` i ` self. _ index. insert ( i, k ) self. _ value. insert ( i, v )
[ -0.4136946201324463, 0.24134676158428192, 0.31616565585136414, 0.027932845056056976, 0.4648006558418274, 0.6410335302352905, 0.3272686302661896, 0.945612370967865, -0.5306820869445801, 0.7646570801734924, -0.6512302160263062, -0.2105764001607895, -0.7640326619148254, -0.6416915655136108, ...
def length _ loss ( logits, lengths, eos ) : mask = sequence _ mask ( lengths - 1, lengths. max ( ) ) eos _ labels = ( ( 1 - mask ) * eos ). long ( ). contiguous ( ). view ( - 1 ) _ logits = logits. contiguous ( ). view ( - 1, logits. size ( - 1 ) ) loss = f. cross _ entropy ( _ logits, eos _ labels, ignore _ index = 0...
[ -0.6976897716522217, -0.031558532267808914, 0.5056990385055542, -1.3875998258590698, -0.04155480116605759, -0.2638683021068573, -0.482075959444046, -0.005048563703894615, 0.7099606394767761, 1.3817130327224731, -0.21715706586837769, -0.2291335165500641, 0.4833233952522278, -0.8008257746696...
def trace ( logger, fn ) : def inner ( * args, * * kwargs ) : source = fn _ to _ source ( fn ) logger. trace ('{ } * args = { } * * kwargs = { } '. format ( source, args, kwargs ) ) # for frame in inspect. stack ( ) : # logger. trace ( frame ) # logger. trace ( inspect. getframeinfo ( frame [ 0 ] ) ) # logger. trace ( ...
[ 0.27208513021469116, 0.17843347787857056, 0.8757627010345459, -0.8376262784004211, -0.06106007844209671, -0.7973819971084595, 0.10564618557691574, -0.05053311586380005, 0.6080177426338196, -0.4762297570705414, -0.1809210628271103, 0.21909593045711517, 0.784785807132721, 0.6870384812355042,...
def on _ txtsearch _ textchanged ( self, text ) : self. filtermodel. setfilterregexp ( text )
[ -0.21804483234882355, -0.36330702900886536, 0.2895616292953491, -0.14962902665138245, -0.15084239840507507, 0.3819524645805359, -0.2642250061035156, 0.707310676574707, -0.49030083417892456, 0.9729930758476257, -0.8991427421569824, 0.4992252588272095, -0.09872796386480331, -0.32613062858581...
def dataset ( self ) : data = tablib. dataset ( ) data. headers = self. keys ( ) row = _ reduce _ datetimes ( self. values ( ) ) data. append ( row ) return data
[ -0.41635313630104065, 0.017085006460547447, 0.4738113284111023, -0.07885649800300598, -0.5651428699493408, 0.41479718685150146, -0.9302218556404114, -0.11013088375329971, -0.4887346029281616, -1.0754584074020386, 0.39982402324676514, -0.09764936566352844, 0.35254883766174316, -0.6859030127...
def build _ default _ wing _ settings ( degen _ mgr : dg. degengeommgr, default _ template = none ) : # provided default template current template is empty if default _ template is none : with open ( os. path. join ( os. path. dirname ( _ _ file _ _ ), " test ", " prop _ rw. inp " ) ) as f : default _ template = f. rea...
[ -0.138993039727211, -0.1724998652935028, 0.5090199708938599, 0.18667912483215332, 0.33032500743865967, 0.1092677190899849, 0.014237777329981327, -0.4707656502723694, -0.6648324131965637, -0.30313119292259216, -0.22625796496868134, -0.6113612055778503, -0.8461049199104309, 0.735497534275054...
def sub _ commands ( self ) - > list [ str ] : return self. _ filter _ arguments ( sys. argv [ 2 : ] )
[ 0.19989994168281555, -0.000007890603228588589, 0.7208970189094543, 1.298561692237854, 0.2712893784046173, 0.22448183596134186, -0.4467414617538452, -0.24470172822475433, 0.07714495807886124, -0.2191055566072464, -1.2221013307571411, 1.5369092226028442, 0.15855014324188232, 0.16846489906311...
def dump _ params ( self, param _ file ) : par _ out = open ( param _ file,'w') target _ abund = { } bias _ params = { } for gi, prob in self. sel _ targ _ abundances. iteritems ( ) : target _ abund [ gi ] = float ( prob ) for base, biases in self. bias _ model. bias _ params. iteritems ( ) : bias _ params [ base ] = [...
[ -0.07135744392871857, -0.8913924694061279, 0.3990403711795807, -0.9141237139701843, 1.105500340461731, 0.6585389971733093, 0.41924595832824707, 0.9538016319274902, -1.2947882413864136, 0.5986973643302917, -0.007389978971332312, 0.9464277029037476, 0.435375452041626, 1.2542057037353516, -...
def forward _ pass ( self, x, input _ data _ format = " channels _ last " ) : if self. _ data _ format! = input _ data _ format : if input _ data _ format = = " channels _ last " : # computation requires channels _ first. x = tf. transpose ( x, [ 0, 3, 1, 2 ] ) else : # computation requires channels _ last. x = tf. tra...
[ -0.11828252673149109, 0.3611844778060913, 0.7025603652000427, 0.17802530527114868, -0.04308921843767166, 0.12243888527154922, 0.4529086947441101, -0.6209656000137329, -0.30900782346725464, 0.3673444986343384, -0.07139286398887634, -0.05312715098261833, 0.09283474087715149, -0.2855410277843...
def new _ listing ( ) : produce = db. session. query ( produce ). order _ by ( produce. prod _ id. desc ( ) ). first ( ) current _ user = user. query. filter ( user. user _ id = = session ['user _ id'] ). first ( ) return render _ template ('/ new _ listing. html ', prod _ name = produce. prod _ name, prod _ type = pro...
[ -0.3411884307861328, -0.3175029456615448, 0.4994359612464905, 0.7387405633926392, -0.6930817365646362, -0.39106425642967224, 0.012378363870084286, 0.2727091908454895, -0.3296072483062744, 0.21299344301223755, 0.5880763530731201, 0.5652552247047424, 0.529102087020874, 0.23452366888523102, ...
def update _ stacks ( dominoes ) : count = 0 unplayed = [ ] computer = [ ] player = [ ] unplayed _ out = { } player _ out = { } computer _ out = { } for i in dominoes : if not dominoes [ i ] ['assigned'] : unplayed. append ( i ) elif dominoes [ i ] ['assigned'] = ='computer': computer. append ( i ) elif dominoes [ i ] ...
[ -0.6181085109710693, -0.013161205686628819, 0.9400193691253662, -0.4433983564376831, -0.6815797090530396, -0.14695055782794952, 1.3203208446502686, 0.27458199858665466, -1.2357884645462036, 0.9121696949005127, -0.4534377455711365, -0.9508184790611267, -0.2422955483198166, 0.468055725097656...
def test _ translation _ rules _ g _ suite _ get ( self ) : pass
[ -0.5046373605728149, 1.1972180604934692, 0.21321266889572144, 0.04762408137321472, 0.9240500330924988, 0.8305301666259766, 0.23895752429962158, -0.13101798295974731, -1.2569071054458618, 0.3977437913417816, -0.2636677920818329, 0.28345435857772827, -0.45595458149909973, -0.2518020272254944...
def set _ config _ filename ( filename ) : global _ config _ file _ name _ config _ file _ name = filename return filename
[ -1.0384626388549805, -0.710737407207489, 0.5438759326934814, 0.20479293167591095, -0.11434642970561981, 0.42862004041671753, 0.8979026079177856, 1.3735382556915283, -1.3065364360809326, 0.9902055263519287, -0.8995283246040344, -0.0025578963104635477, 0.1001422107219696, 0.8840484619140625,...
def move ( self, position ) : x1, y1 = self. current _ pos x2, y2 = position dx, dy = x2 - x1, y2 - y1 d = dx * dx + dy * dy if d > self. min _ move * * 2 : self. pen _ up ( ) self. send _ command ( rapid _ position, self. format _ coordinates ( self. transform _ coordinates ( position ) ) ) self. pen _ down ( ) self. ...
[ -0.20807960629463196, -0.6866671442985535, 0.49172577261924744, 0.0398358553647995, -0.32545047998428345, -0.12081508338451385, 0.5377772450447083, -0.9230799078941345, 0.2028992474079132, -0.28306207060813904, -0.5904290080070496, -0.12875151634216309, 0.20199859142303467, -1.009944319725...
def check _ agent _ key ( session, hostname, pg _ data, pg _ port, agent _ key ) : row _ key = db. get _ agent _ key ( session, hostname, pg _ data, pg _ port ) if not row _ key : raise exception ( " could not find agent key. " ) if row _ key! = agent _ key : raise exception ( " agent key does not match. " )
[ -0.045870590955019, -0.38941049575805664, 0.37688148021698, 0.34733259677886963, 0.3832988440990448, -0.33416083455085754, -1.067792296409607, -0.4914378821849823, -0.4645903706550598, 1.4136199951171875, 0.8675828576087952, 0.3097323179244995, 0.19824638962745667, -0.03484780341386795, ...
def test _ lines ( self, tmpdir ) : # create a dummy file with one line p = tmpdir. mkdir ( " sub " ). join ( " test. txt " ) p. write ( " content1 " ) # parse the file result = utils. get _ file _ lines ( str ( p. realpath ( ) ) ) assert type ( result ) = = list, " it should return a list " assert result = = [ " conte...
[ 0.29340508580207825, -0.10550845414400101, 0.42269060015678406, 0.37699341773986816, 1.0656059980392456, 0.5737430453300476, -0.5430099368095398, 0.559665858745575, -0.19786757230758667, -0.9023880958557129, 0.15458427369594574, -0.46441134810447693, 0.10095172375440598, 0.2573341429233551...
def create _ update _ file _ objects ( remote _ path, fileset = none, prefix _ path ='', location _ base ='' ) : with cd ( remote _ path ) : filepaths = remote _ list _ files ( '.') urls = [ ( f'{ location _ base } / { fpath } ', fpath ) for fpath in filepaths ] file _ objs = [ ] for location, filepath in urls : fname ...
[ -0.06901565939188004, -0.976720929145813, 0.7610657811164856, 0.08407706022262573, -0.010289868339896202, 0.09905526041984558, -0.07864188402891159, 0.0416070930659771, -0.2654927670955658, -0.15378127992153168, -0.10310235619544983, -0.41069015860557556, 0.21341750025749207, -0.0821222141...
def validate _ transaction _ exception _ message ( expected _ message ) : @ transient _ function _ wrapper ('newrelic. core. stats _ engine ','statsengine. record _ transaction') def _ validate _ transaction _ exception _ message ( wrapped, instance, args, kwargs ) : try : result = wrapped ( * args, * * kwargs ) except...
[ -0.08676005154848099, 0.3084176182746887, 0.2975254952907562, -0.9247646927833557, -0.07913322001695633, -0.5081381797790527, -0.145855113863945, -0.5768141746520996, 0.17133793234825134, 0.699492335319519, 0.6615387797355652, 0.36638766527175903, -0.08234000951051712, -0.5287870764732361,...
def draw _ ship ( x, y, w, h ) : draw _ deck ( x, y, w, 0. 2 * h ) draw _ sails ( x + 0. 35 * w, y - 0. 2 * h, 0. 25 * w, 0. 8 * h )
[ 0.2695366144180298, 0.4658655822277069, 0.6276568174362183, -0.8289393782615662, 0.014727054163813591, 0.7910272479057312, -0.9058234691619873, -0.7741013765335083, 0.009014256298542023, -0.390168696641922, 0.14632710814476013, 1.8487350940704346, 0.9602940678596497, -0.17530766129493713, ...
def update _ clonelists _ metadata ( config : config, gui _ input : userinput | none, no _ exit : bool = false ) - > none : # download the latest internal - config. json and datafile. dtd download _ location : str = config. clone _ list _ metadata _ download _ location if gui _ input : download _ location = config. use...
[ -0.03588348254561424, -0.4665449559688568, 0.7298575639724731, 0.1460513174533844, -0.015167002566158772, 0.6933296918869019, 0.31996968388557434, 0.1801327019929886, -0.7315639853477478, 0.7120784521102905, -0.5355241298675537, 0.3836306929588318, 0.09377606958150864, 0.2398630529642105, ...
def inv _ scan ( y ) : d, fi = y p = np. array ( [ d * cos ( fi ), d * sin ( fi ) ] ) j _ y = np. array ( [ [ cos ( fi ), - d * sin ( fi ) ], [ sin ( fi ), d * cos ( fi ) ] ] ) return p, j _ y
[ -0.9639167785644531, 0.3432019352912903, 0.5603199005126953, -0.39644140005111694, -0.46914535760879517, -0.39837846159935, -0.03934082016348839, -0.08120930194854736, -0.33653655648231506, 0.6493145823478699, 0.010292263701558113, 0.07627113908529282, 0.07725688070058823, 0.05590975284576...
def radial _ distribution _ function _ pairs ( coordinates, box _ l, simname, coords _ loc = [ 3, 6 ], nhis = 200, save = false ) : coords _ p = coordinates [ coordinates ['type'] = = 2 ]. iloc [ :, coords _ loc [ 0 ] : coords _ loc [ 1 ] ]. values # convert # to numpy array coords _ n = coordinates [ coordinates ['typ...
[ 0.2861708104610443, 0.21604423224925995, 0.7384876012802124, -1.0143684148788452, 0.2421402484178543, 0.07517225295305252, 0.302055686712265, 0.2608628273010254, -0.14919711649417877, -0.1838144063949585, -0.6946608424186707, -0.12208601832389832, -0.20997744798660278, 0.41098466515541077,...
def prefix _ list _ ids ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input [ str ] ] ] ] : return pulumi. get ( self, " prefix _ list _ ids " )
[ -0.3721555173397064, 0.13187818229198456, 0.3643105924129486, 0.5552862882614136, 1.1923654079437256, 0.9150334596633911, -0.1392730176448822, 0.27679264545440674, 1.711327075958252, 0.8011391162872314, -1.498881459236145, 1.1765533685684204, -0.4778055250644684, -0.12242646515369415, -1...
def parseoutputstring ( self, output ) : parser = zapxmlparser ( output ) for site in parser. sites : host = [ ] if site. host! = site. ip : host = [ site. host ] h _ id = self. createandaddhost ( site. ip, hostnames = host ) s _ id = self. createandaddservicetohost ( h _ id, " http ", " tcp ", ports = [ site. port ], ...
[ -0.2660844624042511, -0.5604752898216248, 0.321289986371994, 0.2816580533981323, -0.5080949664115906, 0.49482646584510803, 1.0338221788406372, -0.29494214057922363, -0.15282177925109863, -0.9547958970069885, -0.20717602968215942, -0.7174234986305237, -0.4111001491546631, 0.4039978981018066...
def _ _ repr _ _ ( self ) : return " < katdal. { }'{ }'len = { } type = { } at { : # x } > ". format ( self. _ _ class _ _. _ _ name _ _, self. name, len ( self. _ data ), self. _ data ['value']. dtype, id ( self ) )
[ 0.10735736042261124, -0.8919535875320435, 0.45452970266342163, -1.365726113319397, -1.057887077331543, 0.8414748311042786, -0.4645308554172516, -0.6137968301773071, 0.18201734125614166, 0.10777807980775833, -0.12795399129390717, 1.0298724174499512, 0.8335111737251282, 0.0013550256844609976...
def get _ available _ fields ( ) : return all _ fields
[ -0.33299607038497925, -0.2504248321056366, 0.33220306038856506, 0.3809162974357605, 0.08260144293308258, 0.7994699478149414, -0.8836399912834167, 0.4569200873374939, 0.12441838532686234, -0.05401097983121872, -1.2877846956253052, 0.4111018776893616, -0.2416476607322693, -0.6098618507385254...
def format _ cdna ( self ) : return self. format _ cdna _ coords ( ) + self. format _ dna _ allele ( )
[ 0.005097902379930019, -0.7405968904495239, 0.39044713973999023, -0.5875316262245178, -0.1932600885629654, -0.1077834740281105, -0.043451663106679916, -0.6148032546043396, 0.7182512283325195, -0.2514147162437439, 0.9353907108306885, 0.7484794855117798, 0.8122298717498779, 0.4970626831054687...
def _ _ chunk ( self, chunk, axis = none ) : chunk _ shape _ phys = chunk. get _ shape ( phys = true ) overlap _ phys = self. overlap * self. voxel _ size if axis is none : max _ dim = sorted ( enumerate ( chunk _ shape _ phys - self. max _ chunk _ shape * self. voxel _ size ), key = lambda x : x [ 1 ] ) [ 2 ] [ 0 ] el...
[ 0.18195897340774536, -0.10818269848823547, 1.0947593450546265, -0.07836441695690155, -0.01691049337387085, 0.4318344295024872, 0.6304435133934021, -0.18697454035282135, -0.27353909611701965, -0.37516269087791443, 0.20209431648254395, 0.7851395010948181, 0.07051560282707214, -0.219142258167...
def roman ( self ) : number = self. _ arabic roman _ numeral ='' roman _ conversions = [ ('m ', 1000 ), ('cm ', 900 ), ('d ', 500 ), ('cd ', 400 ), ('c ', 100 ), ('xc ', 90 ), ('l ', 50 ), ('xl ', 40 ), ('x ', 10 ), ('ix ', 9 ), ('v ', 5 ), ('iv ', 4 ), ('i ', 1 ) ] for value in roman _ conversions : while number > = v...
[ -0.33115413784980774, 0.10959460586309433, 0.5987749695777893, -1.0018813610076904, 0.11803259700536728, -0.43564343452453613, 0.16744549572467804, -0.7668413519859314, 0.24457517266273499, 0.3445757031440735, -0.046031102538108826, 0.15700559318065643, -0.325575590133667, -0.7594597935676...
def dns _ aaaa ( self, domainname ) : return self. dns ( domainname,'aaaa')
[ -0.3704230785369873, 0.2810460925102234, 0.26541727781295776, -0.8183779120445251, 0.15848368406295776, -0.6958655714988708, 0.25360336899757385, -0.3756578266620636, 1.4301706552505493, 0.34147554636001587, 0.5435691475868225, 0.6638404726982117, 0.42554551362991333, -0.4976956844329834, ...
def evaluatexml ( xmlpath, returndfinsteadoflayerid = true, limitreturn = true, frompickle = true, buildpickle = false ) : tree = et. parse ( xmlpath ) root = tree. getroot ( ) resultdir = root. attrib ['resultdir'] studyid = root. attrib ['studyid'] epsg = root. attrib ['epsg'] print ( " % s % s % s " % ( resultdir, s...
[ -0.3797776699066162, -0.4365183711051941, 0.6415450572967529, -0.47253620624542236, -0.26939812302589417, 0.15556125342845917, 1.1474800109863281, 0.3430606722831726, 0.49575841426849365, 0.08983023464679718, 0.29368963837623596, 0.13661381602287292, -0.5273081660270691, 0.76063472032547, ...
def get _ instances _ by _ state ( self, state, maxstate = none ) :
[ -0.8208889961242676, 0.4310539662837982, 0.1881420761346817, 0.07014761120080948, -0.20953838527202606, -0.02252197265625, -0.4170166850090027, 0.3813536763191223, 0.16579614579677582, 0.1745716631412506, -0.6408283114433289, -0.05145883560180664, -0.03246862813830376, -0.05015535280108452...
def test _ public _ client _ implicit _ auto _ approval ( self ) : data = {'client _ id': self. client _ public _ no _ consent. client _ id,'response _ type': next ( self. client _ public _ no _ consent. response _ type _ values ( ) ),'redirect _ uri': self. client _ public _ no _ consent. default _ redirect _ uri,'sco...
[ -0.25046154856681824, 0.12276199460029602, 0.5291765928268433, -0.3331574499607086, -0.07317811250686646, 0.6636232733726501, -0.267147421836853, 0.26166781783103943, -0.23769892752170563, -0.40854382514953613, -0.2661401033401489, 0.6900090575218201, -0.4358949363231659, -0.20495197176933...
def glamparams ( cls, model _ dim, ff _ dim, attention _ num _ heads, attention _ key _ value _ dim, name ='transformer ', moe = false, moe _ hidden _ dim = none, ffn _ activation ='gated _ gelu ', mask _ self _ attention = true, cross _ attention = false, attention _ extra _ logit = 0. 0, relative _ attention _ num _ ...
[ 0.09969694912433624, 0.09725511074066162, 0.9089542031288147, -0.3195836842060089, -1.0269551277160645, 0.09249866008758545, 1.1534645557403564, -0.056245893239974976, 0.21193107962608337, 0.6263501644134521, -0.586578369140625, 0.3769526183605194, 0.31671422719955444, 0.32655689120292664,...
def check _ json ( self, filename ) : # read the json file to be checked json _ data = self. loadfile ( filename ) # check the resulting dict based on top - level nodes - one of the main types above try : the _ validator = self. top _ node _ value _ dict [ json _ data. get ( self. m _ top _ node _ key ) ] the _ validat...
[ -1.118991494178772, -0.5244633555412292, 0.7918310165405273, 0.058136146515607834, -0.36869263648986816, 0.36204057931900024, 0.43540439009666443, 0.7545077204704285, -0.9897531867027283, 0.10911639034748077, 0.3472706377506256, 0.3851134479045868, 0.23344117403030396, 0.883133590221405, ...
def add ( vec _ 1, vec _ 2 ) : # add two vectors vec _ 3 = [ float ( vec _ 1 [ 0 ] ) + float ( vec _ 2 [ 0 ] ), float ( vec _ 1 [ 1 ] ) + float ( vec _ 2 [ 1 ] ), float ( vec _ 1 [ 2 ] ) + float ( vec _ 2 [ 2 ] ) ] return vec _ 3
[ 0.24464693665504456, -1.0418368577957153, 0.8878994584083557, -0.23354201018810272, 0.999808132648468, 1.1736760139465332, -0.6425539255142212, -0.5448690056800842, -0.5572824478149414, 0.5519527792930603, -0.6087176203727722, 0.7906496524810791, -0.0063077425584197044, -0.2134009152650833...
def urlify ( s, true _ length ) : num _ spaces = 0 s = list ( s ) for i in range ( true _ length ) : if s [ i ] = = " " : num _ spaces + = 1 index = true _ length + 2 * num _ spaces for i in range ( true _ length - 1, 0, - 1 ) : if s [ i ] = = " " : s [ index - 1 ] = " 0 " s [ index - 2 ] = " 2 " s [ index - 3 ] = " % ...
[ 0.123075932264328, 0.45877745747566223, 0.6595107913017273, -0.4247109293937683, -0.46147796511650085, -0.45819056034088135, 0.06433630734682083, 1.0461097955703735, 0.09974174946546555, 0.07847121357917786, -0.13720054924488068, 0.012658457271754742, -0.709577202796936, -0.029829783365130...
def pretrain ( self, sess, dataset, batch _ size = 50, pretraining _ epochs = 10, lr = 0. 01, k = 1, display _ step = 1 ) : train _ x = dataset [ 0 ] train _ y = dataset [ 1 ] print ('starting pretraining... \ n') batch _ num = len ( train _ x ) / batch _ size print ( " batch _ num { 0 } ". format ( batch _ num ) ) # p...
[ -0.1645209640264511, 0.765566885471344, 0.77203369140625, 0.6804805397987366, -0.09962224960327148, -0.7442659139633179, 0.5562975406646729, -0.007415673695504665, -0.15063995122909546, 0.21582186222076416, -0.5838488340377808, 0.015189306810498238, 0.10102258622646332, 0.7202714085578918,...
def symbolic _ joint _ probabilities ( symx, symy ) : if len ( symx )! = len ( symy ) : raise valueerror ('all arrays must have same length') symx = np. array ( symx ) symy = np. array ( symy ) # initialize jp = { } n = len ( symx ) for yi, xi in zip ( symy, symx ) : if yi in jp : if xi in jp [ yi ] : jp [ yi ] [ xi ] ...
[ 0.4498364329338074, -0.01569540426135063, 0.5758939385414124, 0.36643826961517334, -0.2844788134098053, -0.7622643709182739, 0.79473876953125, 0.14304181933403015, 0.14496596157550812, 0.8552533984184265, -0.015612366609275341, -0.08115046471357346, -0.5558779835700989, 0.5490575432777405,...
def genetic ( network, max _ it = 300, population _ size = 30, method ='ranked ', breeding _ coeff = 0. 5, num _ in _ group = 4, p _ mut = 0. 08 ) : # check if method parameter value is valid. if method not in {'ranked ','tournament'} : raise ( valueerror ('unknown method parameter value') ) # initialize list for stori...
[ -0.7366613149642944, 0.8072519302368164, 0.8962252736091614, 0.5679491758346558, 0.27358734607696533, 0.2645283639431, 0.7866235375404358, -0.30929529666900635, -0.5759233832359314, 0.8440992832183838, 0.22121118009090424, 0.681869387626648, 0.0445701964199543, 0.23373150825500488, -0.57...
def resolveimport ( self, dependantmodulepath, importedmodule ) : if not isinstance ( dependantmodulepath, str ) : raise typeerror ( " path to dependant module must be a string " ) if not importedmodule. isrelative ( ) : raise valueerror ( " imported module'{ }'should be a relative import ". format ( importedmodule. mo...
[ -0.7154927253723145, -0.6911657452583313, 1.1161527633666992, 0.21708257496356964, 0.031679119914770126, 0.5694437623023987, 0.6238787174224854, -0.2257649153470993, -0.15334439277648926, 0.043301329016685486, -0.2253802865743637, 0.5382876992225647, -0.6329736709594727, -0.275923550128936...
def add _ vertex ( self, vertex _ id ) : self. vertices [ vertex _ id ] = [ ]
[ 0.01254224218428135, -0.029851462692022324, 0.06105228140950203, 0.06471885740756989, 0.6503490209579468, 0.4181458055973053, -0.9195525050163269, 0.663876473903656, 1.0802814960479736, 0.19179216027259827, -1.16591477394104, 0.938142716884613, -0.506788432598114, 0.6122964024543762, -0....
def menu ( ) : print ( " " " 1 - ввести список с клавиатуры через пробел 2 - сгенерировать случаино 3 - выити " " " )
[ -0.2508591413497925, -0.12578356266021729, 0.7072100043296814, 0.4055430293083191, -0.20122626423835754, 0.6188499331474304, 0.22641566395759583, 0.3682655096054077, -0.27895885705947876, 0.18915940821170807, -0.7361185550689697, 0.2850341498851776, 0.2006828337907791, 0.576889157295227, ...
def version _ number ( self, version _ number ) : self. _ version _ number = version _ number
[ -0.29915788769721985, -0.5219356417655945, 0.04316553846001625, 0.689765214920044, 1.1956394910812378, 0.5734288692474365, 0.7736960053443909, 1.3966988325119019, -0.22102802991867065, -0.6693531274795532, -1.8569221496582031, -0.0069115920923650265, 1.1593929529190063, 0.8012501001358032,...
def store _ transition ( self, s, a, r ) : value = self. get _ v ( s ) self. memory. store ( s, a, r, value )
[ 0.12049043923616409, -0.3251706063747406, 0.19131191074848175, -0.505192220211029, -0.4896535277366638, -0.6677660942077637, 0.47481441497802734, -0.1814805567264557, 1.1296058893203735, 0.2842574119567871, -1.4289191961288452, 0.27603480219841003, 0.06731921434402466, -0.5838093161582947,...
def compute ( self, data ) : if self. mean _ trajectories : data _ arr = np. array ( data ) trajs = [ ] for i in range ( np. shape ( data ) [ 0 ] ) : y = data _ arr [ i, : ] r = np. std ( y ) / np. mean ( y ) if not self. improvement : # original burstiness due to goh and barabasi out = ( r - 1 ) / ( r + 1 ) else : # i...
[ 0.03160342201590538, 0.34684547781944275, 0.8528373837471008, 0.8714205622673035, -0.33180344104766846, 0.008519827388226986, 0.44591814279556274, 0.11456266045570374, 0.10263682901859283, 0.8188490867614746, -0.2968251407146454, 0.6584779620170593, -0.26933810114860535, 0.8623364567756653...
def serialize ( self, root :'node') - > str : def tuplify ( root ) : return root and ( root. val, [ tuplify ( c ) for c in root. children ] ) return json. dumps ( tuplify ( root ) )
[ -0.5217116475105286, -0.2997438907623291, 0.5375442504882812, -0.0197368785738945, -1.508312463760376, -0.4239845275878906, -0.5040578246116638, -0.738666296005249, 0.18431973457336426, 0.11196286976337433, -0.7175732851028442, 0.6224538683891296, 0.7578387260437012, 0.45147445797920227, ...
def _ _ str _ _ ( self ) : return self. title
[ -0.49227645993232727, -1.9881129264831543, 0.7152469754219055, -1.1985374689102173, -0.8845866918563843, 0.7638307213783264, -1.09532630443573, -0.6012926697731018, 0.4945630133152008, 0.03191110119223595, 0.46746736764907837, 0.6779823303222656, -0.16213564574718475, -0.9517988562583923, ...
def _ upd _ repo ( self, day, utc, bcols, ecols, check _ clock _ shift = true ) : ow _ cols = repo. col _ idx ( ['lr ','vol ','vbs ','lpx'] ) mid = bcols [ :, - 1 ] lm = np. log ( mid ) lr = np. r _ [ 0, lm [ 1 : ] - lm [ : - 1 ] ] ow _ arr = np. vstack ( ( lr, bcols [ :, : 2 ]. t, mid ) ). t upd _ cols = repo. col _ i...
[ -1.0442514419555664, -0.30824315547943115, 0.8774839043617249, -0.4571727216243744, 0.3023841381072998, 0.4189301133155823, 0.43602603673934937, -0.14422549307346344, 0.1478061079978943, 0.7785652279853821, 0.668170690536499, 0.13776278495788574, -0.3339357376098633, -0.3935399651527405, ...
def get _ soup ( self ) : if self. _ soup is none : self. _ soup = get _ soup ( self. get _ url ( ) ) return self. _ soup
[ -0.4730357229709625, 0.14964216947555542, 0.44342687726020813, 0.09071522951126099, -0.088872991502285, -0.7803829312324524, 0.3984546363353729, -0.734271228313446, 0.8028374910354614, -0.9906245470046997, 0.49333709478378296, 0.6324631571769714, 0.5402040481567383, -0.6642982363700867, ...
def _ options ( cmd, manager, callback ) : cmd = cmd. split ( ) if len ( cmd ) = = 0 : pass elif cmd [ 0 ] = = " cr " and len ( cmd ) = = 3 and cmd [ 2 ]. isdigit ( ) : callback ( manager. create ( cmd [ 1 ], int ( cmd [ 2 ] ) ) ) elif cmd [ 0 ] = = " de " and len ( cmd [ 0 ] ) = = 2 : callback ( manager. destroy ( cmd...
[ -0.24431025981903076, -0.43701228499412537, 1.0210483074188232, -0.441623330116272, -0.311637282371521, -0.24694320559501648, -0.1396278291940689, -0.29904231429100037, -0.20909105241298676, -0.2132643312215805, 0.44907763600349426, -0.3941676616668701, -0.17444171011447906, 0.815993726253...
def all _ students ( self ) : if not self. is _ sorted : self. students. sort ( ) self. is _ sorted = true for s in self. students : yield s
[ -0.503720223903656, -0.7556942105293274, 0.6589670181274414, 0.4795932173728943, -0.5516696572303772, 0.969359278678894, -0.44443389773368835, -0.5727387070655823, 0.11517984420061111, -0.01183969248086214, 0.18834716081619263, 0.5528761744499207, -0.1362341046333313, 0.6755056381225586, ...
def create _ menu ( ) : menudata = [ ( " & translate abaqus. fil to feresult database ", p. postabq ), ( " & open feresult database ", p. importdb ), ( " & select feresult data ", selectdb ), ( " & forget feresult data ", p. selection. forget ), ( " - - - ", none ), ( " show geometry ", p. showmodel ), ( " select step ...
[ 0.3645637035369873, 0.02055145800113678, 0.530414879322052, -0.23883919417858124, 0.053910139948129654, 0.42521482706069946, -0.01838822104036808, 0.21807892620563507, -1.3256884813308716, -1.1478091478347778, -0.24491150677204132, -0.17223577201366425, -0.4930594861507416, 0.7975573539733...
def _ update _ proxy ( self, change ) : # the superclass handler implementation is sufficient. super ( webview, self ). _ update _ proxy ( change )
[ -0.5631936192512512, -0.07021678984165192, 0.3512645363807678, -0.4114586412906647, -1.1294673681259155, -0.12969467043876648, 0.5617212653160095, 0.3334527611732483, 0.5749298930168152, -0.7491695880889893, -0.5338114500045776, 0.3892914950847626, -0.045505672693252563, 1.1712090969085693...
def write ( self, path : str = none ) : if not path : output _ folder = " panels " else : output _ folder = " { } ". format ( path ) if not path ( output _ folder ). is _ dir ( ) : path ( output _ folder ). mkdir ( ) panel _ name = self. name. replace ( " - ", " " ) panel _ name = panel _ name. replace ( " - ", " " ) p...
[ -0.5556894540786743, -0.9426171183586121, 0.8412846326828003, -0.9336617588996887, 0.2188846915960312, 0.40177515149116516, -0.22858458757400513, 0.02474263124167919, -1.7200483083724976, 0.00689572561532259, -0.36373138427734375, 0.5655924677848816, -0.1299181580543518, 0.3959700763225555...
def min _ cosine ( start, end ) : return min ( np. cos ( start ), np. cos ( end ) )
[ 0.4649425148963928, -1.5721086263656616, 0.3792787790298462, -0.21366944909095764, -0.26479899883270264, -0.4035007059574127, -1.1344006061553955, -0.2776899039745331, -0.7630602717399597, 0.5160281658172607, 0.6014087796211243, 0.29537516832351685, -0.46648675203323364, -1.326393365859985...
def get _ user ( self, username, password ) : existing _ user = user ( * * self. database. get _ user _ document _ by _ id ( user _ id = hashlib. sha256 ( username. encode ('utf - 8') ). hexdigest ( ), username = username ) ) if existing _ user. compare _ passwords ( password = hashlib. sha256 ( password. encode ('utf ...
[ 0.4370925724506378, -0.6314637064933777, 0.4914948344230652, 0.47504597902297974, 0.021363716572523117, -0.3551926910877228, -0.4303245544433594, -0.7924732565879822, 0.48308348655700684, 0.42361217737197876, -0.02823774889111519, -0.35413840413093567, -0.9970219731330872, -0.5665154457092...
def _ _ setstate _ _ ( self, state ) : if'diff'in state : diff = state ['diff'] if not isinstance ( diff, attrdict ) : diff = attrdict ( diff ) state ['diff'] = diff for attr, val in diff. items ( ) : if not isinstance ( val, diff ) : diff [ attr ] = diff ( * * val ) self. state = state ['state'] self. diff = state ['d...
[ -0.9312946200370789, -0.06076803803443909, 0.5094237923622131, -1.041553258895874, -0.5035675764083862, -0.14884772896766663, 0.22749774158000946, 0.821348249912262, 0.5765964388847351, -0.4561633765697479, -1.1492161750793457, 0.1157238632440567, 1.067088007926941, 1.3953728675842285, -...
async def get _ all _ tasks ( self ) - > mythicresponse : url = " { } { } : { } / api / v { } / tasks / ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) resp = await self. get _ json ( url ) if resp. response _ code = = 200 : # update the response with apitoken object...
[ -0.6100856065750122, -0.46095550060272217, 0.7612987756729126, 0.3291807770729065, 0.9281721711158752, -0.7532459497451782, -0.49388134479522705, 0.498725026845932, 0.06454039365053177, 0.09037844836711884, -1.0751852989196777, 0.296225368976593, -0.04366787523031235, 0.18420115113258362, ...
def get _ row ( self, row : int ) - > int : return sum ( self. pos _ y _ list [ : row + 1 ] )
[ -0.7740746736526489, 1.4909032583236694, 0.5769332647323608, 0.8142173886299133, 0.020728761330246925, -0.9755052328109741, 0.553307831287384, 0.05296649411320686, 0.7035754919052124, -0.5351830720901489, -0.5511699914932251, -0.48357266187667847, 0.5298288464546204, 0.5321698188781738, ...
def iteratethroughfiles ( self ) : for filename in os. listdir ( self. pathtofiles ) : with open ( '. / { } / { } '. format ( self. pathtofiles, filename ) ) as currentfile : self. tokenizer ( currentfile, filename )
[ -0.391037255525589, -1.1075372695922852, 0.29508957266807556, -0.6259005665779114, 0.5171439051628113, -0.40288788080215454, 0.5952053070068359, 0.8442007899284363, -1.1723780632019043, -0.30803120136260986, 0.5104078650474548, -0.22661323845386505, -0.29599031805992126, 1.0091655254364014...
def push _ image _ to _ ecr ( image = default _ image _ name ) : import boto3 _ logger. info ( " pushing image to ecr " ) client = boto3. client ( " sts " ) caller _ id = client. get _ caller _ identity ( ) account = caller _ id [ " account " ] my _ session = boto3. session. session ( ) region = my _ session. region _ ...
[ -0.5970776081085205, 0.703508198261261, 0.5370080471038818, -0.8081017136573792, 0.3630618751049042, 0.019172335043549538, -0.254104346036911, -0.2734692096710205, 0.3377346992492676, 0.5205935835838318, -0.31470590829849243, 0.4971402883529663, 0.09121724963188171, 0.8124366998672485, 0...
def get _ images ( url ) : req = requests. get ( url, allow _ redirects = true, timeout = 20 ) soup = beautifulsoup ( req. text, " lxml " ) url _ parsed = list ( urlparse ( url ) ) for image in soup. findall ( " img " ) : print ( " image : % ( src ) s " % image ) if not image [ " src " ]. lower ( ). startswith ( " http...
[ -0.6509218811988831, 0.586162805557251, 0.7960165739059448, 0.19632135331630707, 0.6194961071014404, 0.02949460782110691, 0.28578007221221924, 0.6784749031066895, -0.08044742792844772, 0.4709588587284088, -0.3014591336250305, -0.09358657896518707, 0.09388970583677292, 1.1778291463851929, ...
def fetch _ all ( modules : typing. iterable [ object ], ) - > typing. iterable [ typing. tuple [ operationmetadata, typing. callable ] ] : for module in modules : for _, func in inspect. getmembers ( module, predicate = lambda x : inspect. isfunction ( x ) ) : if not hasattr ( func, metadata _ attribute _ name ) : con...
[ -0.6611620187759399, 0.0475609265267849, 0.5482497215270996, 0.3744986057281494, 0.5241122245788574, -0.17904187738895416, -0.3148103654384613, -0.7213217616081238, -0.11322993040084839, 0.31659579277038574, 0.2368626743555069, 0.1941818743944168, 0.3228214979171753, 0.9125055074691772, ...
def summary ( self ) : print ( " false negatives : \ t " + str ( self. fns ) ) print ( " false positives : \ t " + str ( self. fps ) ) print ( " true positives : \ t " + str ( self. tps ) ) print ( " sample size : \ t \ t " + str ( self. sample _ size ) ) print ( " sensitivity : \ t \ t " + str ( self. sensitivity ) ) ...
[ 0.4281660318374634, -0.5142301321029663, 0.8134344816207886, -1.1527966260910034, 0.7209362387657166, 0.6480651497840881, -0.6711254715919495, -0.518791913986206, -0.44524744153022766, 0.1511453092098236, 0.06046011671423912, 1.094264030456543, 0.17197845876216888, 0.42632314562797546, 0...