text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ variable _ on _ cpu ( name, shape, initializer ) : with tf. device ('/ cpu : 0') : dtype = tf. float16 if flags. use _ fp16 else tf. float32 var = tf. get _ variable ( name, shape, initializer = initializer, dtype = dtype ) return var
[ 0.8324049711227417, 0.36587217450141907, 0.3189220130443573, -0.6350317597389221, -0.8997936248779297, -0.498805433511734, -0.04101807624101639, -0.9251973628997803, -0.9770115613937378, 0.1902448683977127, -0.5116319060325623, 0.7313878536224365, -0.21278269588947296, -0.6108375787734985,...
def _ _ remove _ output _ item ( self, output _ name ) : self. _ _ output _ list _ box. remove _ item _ name ( output _ name )
[ -1.0670225620269775, -0.6324551701545715, 0.42668935656547546, 0.19768524169921875, -1.7667300701141357, -0.283638596534729, 0.43573999404907227, 0.23995086550712585, -0.5604851245880127, 0.481068879365921, -1.051190733909607, -1.0275872945785522, -0.4690566658973694, -0.2839619219303131, ...
def tell ( self, sentences ) : for sentence _ str in sentences : sentence _ obj = sentence ( sentence _ str ) self. sentences. append ( sentence _ obj ) for predicate in sentence _ obj. predicates : pred _ name = " " if predicate. is _ negation : pred _ name = " ~ " + predicate. name else : pred _ name = predicate. nam...
[ -0.44679194688796997, -0.9389871954917908, 0.6153126358985901, 0.4077189266681671, -0.2768670618534088, 0.5314803123474121, 0.26607099175453186, 0.6671723127365112, -0.48983684182167053, 0.5132573843002319, 0.4220803380012512, -0.6672348380088806, -0.45982277393341064, 1.0645593404769897, ...
def submission _ count ( self ) : return self. _ submission _ count
[ 0.6015225648880005, 0.2063133269548416, 0.34429970383644104, 0.17332719266414642, 0.27268102765083313, 0.5093836784362793, 0.41485512256622314, 0.2899521589279175, -0.3335128724575043, -1.0795916318893433, -0.6720573902130127, -0.08231045305728912, 0.13441726565361023, 0.4296378791332245, ...
def getalltrios ( self, db _ vervet, aln _ ref _ ind _ seq _ id ) : sys. stderr. write ( " finding trios, sequenced and aligned against individualsequence % s... " % ( aln _ ref _ ind _ seq _ id ) ) # find out all available alignments. alignmentquery = vervetdb. individualalignment. query. filter _ by ( ref _ ind _ seq...
[ 0.06114061176776886, -0.3450530469417572, 0.728596031665802, -0.772969663143158, 0.03909637778997421, -0.515246570110321, 0.4846174716949463, -0.23111602663993835, 0.2519816756248474, 0.6789956092834473, 0.01057671569287777, 0.2830817997455597, 0.18552128970623016, 0.5247933268547058, 0....
def getstipsdata ( to _ retrieve ) : local _ data _ dir = os. path. abspath ( os. path. join ( os. path. dirname ( os. path. realpath ( _ _ file _ _ ) ), ".. ", " data " ) ) if " stips _ data " not in os. environ : sys. stderr. write ( " warning : stips _ data environment variable not found. falling back on local stips...
[ -0.010485753417015076, -0.7664408683776855, 0.7810651063919067, -0.9582874178886414, 0.07119665294885635, 0.46175718307495117, 0.3366512358188629, 0.18866680562496185, 0.07299177348613739, -0.29476556181907654, 1.1806391477584839, -0.13927903771400452, 0.544599711894989, -0.213914930820465...
def _ _ init _ _ ( self, a, length = 1, dir = 0, tiplength = 0. 25, reltips = true ) : arrow. arrow _ counter + = 1 # increment counter of arrow instances self. arrow _ id = arrow. arrow _ counter self. a = np. array ( [ a [ 0 ], a [ 1 ] ] ) r = self. get _ rotation _ matrix ( dir ) b = np. array ( [ length, 0 ] ) self...
[ -0.5586411356925964, -0.4506215751171112, 0.7343091368675232, 0.06284620612859726, -0.4997721016407013, 0.26080766320228577, 1.1523289680480957, 0.41030752658843994, 1.7157745361328125, 0.08897003531455994, 0.0782824456691742, -0.008644860237836838, 0.7428820729255676, -0.3802453875541687,...
def test _ character _ name _ type ( self, mock _ stdout, mock _ user _ input ) : expected _ output = " i'm sorry! \ n " \ " welcome to the magical pokemon sud, rick! \ n " \ " before we begin, you will need to choose your pokemon. \ n " \ " from there, the adventure will begin. \ n \ n " character _ name ( ) self. ass...
[ 0.138987198472023, -0.4413335621356964, 0.5020619034767151, 0.4729856252670288, 0.026562318205833435, 0.029717938974499702, 0.1762453317642212, -0.9149865508079529, -0.10507108271121979, -0.2925393283367157, -0.5608915090560913, 0.4689871370792389, -0.30274882912635803, -0.2408481240272522...
def map _ port _ ranges ( psid, length, offset = 6 ) : port _ field _ len = 16 port _ field _ min = int ('0x0000 ', 16 ) port _ field _ max = int ('0xffff ', 16 ) a = offset k = length m = port _ field _ len - offset - length km = k + m j _ max = port _ field _ max > > a + k port _ ranges = [ ] for a in range ( 1, ( po...
[ -0.44522911310195923, -0.4957248568534851, 0.4938209056854248, -0.7161324620246887, -0.6721882224082947, 1.0699396133422852, -0.24224337935447693, 0.5239375233650208, 0.6284134984016418, 0.49824053049087524, -0.8885952830314636, -0.022137992084026337, -0.6151261329650879, -0.05361048504710...
def chao1 ( row, rarefy = 0 ) : row _ sum, r, s, d = sum ( row ), 0, 0, 0. 0000001 num _ reads = mil if math. isclose ( row _ sum, 1 ) else row _ sum # default to 1m reads if compositional num _ reads = rarefy if rarefy > 0 else num _ reads # if rarefy is set use that as read count for val in row : prob _ success = val...
[ -0.05915079265832901, 0.3173728287220001, 0.5786622166633606, 1.0755258798599243, 0.325387179851532, -0.3772626519203186, 0.6436933875083923, 0.33826008439064026, 0.8598902225494385, 0.025849970057606697, 1.025732159614563, 0.2060304433107376, 0.35011935234069824, 0.16126106679439545, 0....
def computecenter1d ( pointlist ) : center = 0. for point in pointlist : center + = point. getcoordinates ( ) center = center / float ( len ( pointlist ) ) return point1d ( center )
[ 0.028261782601475716, -0.2451678216457367, 0.15399383008480072, 0.7567077279090881, 0.15822552144527435, 0.6855124831199646, 0.15224632620811462, 0.8162800073623657, 1.187721848487854, 0.8156852126121521, 0.20667603611946106, -0.2123287469148636, -0.5563221573829651, 0.9809389114379883, ...
def have _ dm ( self ) : if self. executable is none : return false bin _ path = " {! s } / usr / bin / {! s } ". format ( self. root _ mount _ point, self. executable ) sbin _ path = " {! s } / usr / sbin / {! s } ". format ( self. root _ mount _ point, self. executable ) return os. path. exists ( bin _ path ) or os. ...
[ -0.11859377473592758, 0.03438979387283325, 0.7416026592254639, 0.7207697629928589, 0.37407463788986206, 0.44990718364715576, 0.2365770787000656, 0.28454649448394775, -0.3210219144821167, -1.2081488370895386, 0.4287833869457245, 0.37570440769195557, -0.6686177253723145, 1.2666038274765015, ...
def cc _ sort _ inds ( self, points _ o ) : # sort the mids counter - clockwise : cent = points _ o. mean ( axis = 0 ) # calculate the centre point angles = np. arctan2 ( points _ o [ :, 1 ] - cent [ 1 ], points _ o [ :, 0 ] - cent [ 0 ] ) # calculate point angles inds _ sort = np. argsort ( angles ) # sort indices cou...
[ 0.0417061448097229, -0.3635694980621338, 0.46237924695014954, -0.43027326464653015, -0.800648033618927, -0.026207616552710533, 1.0051497220993042, 0.03274984285235405, 0.35612189769744873, 1.159505844116211, 0.03840058669447899, 0.2784631550312042, -0.022115405648946762, -1.272074341773986...
def _ get _ observation ( self ) : self. seen [ self. position ] + = 1 return fuelmazeobservation ( self. current _ fuel _ level, transform _ coordinate ( self. position ), frozenset ( { transform _ coordinate ( self. last _ position ) } ) if self. last _ position else frozenset ( ), self. edge _ grid, frozenset ( map ...
[ -0.9264196753501892, -0.42728784680366516, 0.472429096698761, -0.6551803350448608, -0.13775533437728882, -1.39533269405365, 0.40198275446891785, 0.1797664910554886, -1.032885193824768, -0.35979142785072327, 0.0387314073741436, -0.6633078455924988, 0.4650906026363373, -0.3492964506149292, ...
def insert _ attributes2mysql ( attrs ) : db = mysqldb. connect ( db = config. db, host = config. host, user = config. user, passwd = config. passwd ) cursor = db. cursor ( ) for attr in attrs : if none in attr : continue sql = u " " " insert into beauty _ electronics \ ( product _ id, product _ nm, price, purposes, re...
[ -1.0116499662399292, 0.17192617058753967, 0.654897153377533, -0.1676574945449829, 0.23812517523765564, 0.16367478668689728, 0.060615383088588715, 0.22144700586795807, -0.31094714999198914, 0.22364696860313416, -0.41222432255744934, -0.26762986183166504, -0.184136763215065, 0.31967452168464...
def save _ final _ config ( self ) : fname = os. path. join ( self. state [ " model _ path " ], " model. statetxt " ) cfg _ file = open ( fname,'w') fname = os. path. join ( self. state [ " model _ path " ], self. state [ " model _ name " ] ) vals = dict ( [ ( x. name, x. get _ value ( ) ) for x in self. params ] ) num...
[ -0.4346455931663513, -0.8441938161849976, 0.6132673025131226, -0.625097393989563, 0.09870729595422745, 0.2401823103427887, 0.26965099573135376, 0.10078296065330505, -0.862794816493988, 0.8433002829551697, -1.2154239416122437, -0.3186154365539551, -0.2490631639957428, 1.1796265840530396, ...
def encrypted ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " encrypted " )
[ 0.21831673383712769, 0.8301836848258972, 0.4575495719909668, 0.6982603073120117, 1.1744701862335205, 1.069995403289795, 0.09282539784908295, -0.28563207387924194, 0.40178823471069336, 0.822011411190033, -0.6293250918388367, 1.0933648347854614, -0.5881370306015015, -0.7957492470741272, -1...
def setfkvshiftspeed ( index ) : return none
[ -0.21574054658412933, 0.4307439625263214, 0.3660193085670471, 1.2053730487823486, 0.5524217486381531, -0.4667273163795471, -0.118968166410923, -0.5753468871116638, 0.8097015619277954, -0.5422490239143372, -0.8050662279129028, -0.24908651411533356, -1.2636388540267944, 0.4324474334716797, ...
def get _ historical _ eod _ price ( fsym, tsyms, date, e ='all ', try _ conversion = true ) : # convert single fsym and tsym input to single element lists if not isinstance ( tsyms, list ) : tsyms = [ tsyms ] # convert date to timestamp ts = date _ to _ timestamp ( date ) # load data url = build _ url ( " pricehistori...
[ -1.3501030206680298, 0.9212242960929871, 0.7090306282043457, -0.01146702840924263, 0.2214965522289276, -0.5056187510490417, -1.0568759441375732, 0.5886750221252441, -0.47925788164138794, 1.1031986474990845, -0.03745550289750099, 1.1862646341323853, 0.8087015151977539, 0.1732238382101059, ...
def test _ find _ branch _ nodes ( self ) : prefix ='branch _ test _ prefix'written _ branches = ['branch _ node1. sub _ branch1. sub _ branch2. sub _ branch3 ','branch _ node2. sub _ branch11. sub _ branch22. sub _ branch33'] leaf _ nodes = ['leaf _ node1 ','leaf _ node2'] written _ series = [ ". ". join ( [ prefix, b...
[ 0.11551783978939056, 0.2885572910308838, 0.792412281036377, -0.218183696269989, 0.9770769476890564, 0.573294460773468, 0.05579616501927376, -0.6533814072608948, -0.9802765846252441, -0.1199813038110733, 0.08841390907764435, 0.24043628573417664, -0.22875674068927765, -0.4373684227466583, ...
def insertstate ( sortedlist, newstate, limit ) : i = 0 for state in sortedlist : if newstate. getvalue ( ) > state. getvalue ( ) : break i = i + 1 sortedlist. insert ( i, newstate ) if len ( sortedlist ) > limit : sortedlist. pop ( - 1 )
[ -0.7975593209266663, 1.115295648574829, 0.749943733215332, 0.05850791931152344, -0.24272684752941132, 0.49772271513938904, -0.2432393580675125, 0.35179463028907776, 0.27633315324783325, 0.786686897277832, -0.7670720815658569, -0.5462249517440796, -0.9001347422599792, -0.2515276074409485, ...
def max _ price ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " max _ price " )
[ 0.13080590963363647, 0.11029167473316193, 0.36184221506118774, 0.9277774691581726, 0.65775465965271, 1.4214344024658203, -0.8652723431587219, 0.16700690984725952, 1.1560736894607544, 0.9929778575897217, 0.6091451048851013, 0.4100666344165802, -0.02846032939851284, -1.2797493934631348, -0...
def get _ events ( self ) : handle = open ( self. filename, " r " ) line = handle. readline ( ) # indicates the last line of the text. while not re. search ( r " end. * calendar ", line, re. i ) : until = none # indicates the last line of an event. while not re. search ( r " end. * event ", line, re. i ) : m = re. sear...
[ -0.0330018475651741, -0.6111224889755249, 0.732891857624054, -0.23654705286026, 0.3164224922657013, 0.1922890990972519, -0.07858172059059143, 0.9378571510314941, -0.3633730709552765, -0.16615474224090576, -0.5187235474586487, 0.3687400817871094, 0.20242904126644135, -0.5811333656311035, ...
def wait _ for _ element _ disappear ( self, locator, timeout = 10, by = by. css _ selector ) : element = webdriverwait ( self. driver, timeout ). until _ not ( ec. presence _ of _ element _ located ( ( by, locator ) ) ) return element
[ -0.3423103094100952, -0.28172197937965393, 0.5431799292564392, 0.014483317732810974, 0.37842974066734314, 0.5065246820449829, -0.04437991976737976, 0.5507566332817078, 0.4104149639606476, -0.0008564860327169299, -0.24338015913963318, -0.1965453028678894, 0.056607332080602646, -0.0090581113...
def flatten ( nested _ iterable : iterable [ iterable [ t ] ] ) - > iterable [ t ] : return ( item for iterable in nested _ iterable for item in iterable )
[ -0.5493033528327942, -0.2424573302268982, 0.3841022849082947, 0.1954450011253357, 0.7355165481567383, 0.17296567559242249, -0.09321445971727371, 0.13711115717887878, -0.8433824181556702, -0.28703540563583374, -0.3448595404624939, -0.6569297313690186, -0.64372718334198, -0.4655779302120209,...
def post ( self ) : parser = reqparse. requestparser ( ) parser. add _ argument ('to ', type = str, required = true, location ='json ', help ='identifier of person or spark space to'' send the alert to. required.') parser. add _ argument ('subject ', type = str, required = true, location ='json ', help ='the subject ( ...
[ -0.4066304564476013, -0.30040061473846436, 0.5855624675750732, 0.13570484519004822, 0.33637145161628723, 0.1466190218925476, -0.3517955243587494, -0.2136150449514389, -0.8625966906547546, -0.12159225344657898, 0.23647518455982208, 1.4545973539352417, -0.4982110857963562, 0.3429210186004638...
def linear _ regression ( x, y ) : x = np. array ( x ) y = np. array ( y ) a = np. vstack ( [ x, np. ones ( len ( x ) ) ] ). t m, p = np. linalg. lstsq ( a, y ) [ 0 ] return m, p
[ 0.10357901453971863, -0.6597413420677185, 0.6957610249519348, -1.061854600906372, -0.28140315413475037, -0.2086658626794815, -1.4149222373962402, 0.059150949120521545, 0.2951035797595978, 1.0595616102218628, 0.09653785824775696, 0.3498900532722473, -0.4731820821762085, 0.01641998253762722,...
def _ _ ror _ _ ( self, other ) : return build _ cpo _ expr ( other ). _ _ or _ _ ( self )
[ -0.0044564660638570786, -0.3134056031703949, 0.757515549659729, 0.35954493284225464, -0.7227810621261597, -0.39155957102775574, 0.3642217516899109, -0.16261257231235504, -0.13627132773399353, 0.1736707091331482, -0.05319968983530998, 0.05135554075241089, -0.2809927463531494, -0.44579297304...
def initialize _ transactions ( ) : # create a dictionary to save successful buys, sells, and money available to bot. transactions = { } # maximum number of times the bot can buy the same stock transactions ['max buys'] = 3 # td ameritrade limitations requests _ allowed = 2 # minimum number of requests allowed per seco...
[ -0.010158373974263668, 0.3320888578891754, 0.7547787427902222, -0.7825517654418945, 0.1680157631635666, -0.7695836424827576, 0.02565697394311428, -0.5750401020050049, -0.14000315964221954, 0.3631996214389801, -0.8412963151931763, -0.19961394369602203, 0.451147198677063, 0.5067976117134094,...
def setup ( upgrade = false, upgrade _ strategy ='only - if - needed') : venv _ root = ctx ('virtualenv. dirs. root') venv _ name = ctx ('virtualenv. name') venv _ path = os. path. join ( venv _ root, venv _ name ) py ='python { } '. format ( ctx ('python. version') ) env. venv _ path = venv _ path if not fabtools. deb...
[ 0.2379017323255539, -1.4191389083862305, 0.7034773826599121, 0.9177214503288269, 0.5080788135528564, 0.07117175310850143, 0.10840531438589096, 0.20113015174865723, 0.18933075666427612, 0.8698304891586304, -0.3536645770072937, -0.06526166200637817, 0.9691515564918518, 0.32753825187683105, ...
def tracksep _ indices ( lat, time, timelag = 10 ) : n = lat. shape [ 0 ] i _ asc = np. zeros ( n, np. bool _ ) # data in - memory i _ des = np. zeros ( n, np. bool _ ) # all false if cmodule : # c function mod. tracksep _ indices ( lat, time, i _ asc, i _ des ) else : # py function i _ beg = 0 for i _ end in xrange ( ...
[ -0.9027593731880188, -0.3862542510032654, 1.0427498817443848, -0.998344361782074, -0.681069552898407, 0.16565075516700745, 0.18132160604000092, -0.2681199610233307, -0.6690146327018738, 0.9829620122909546, -0.33359581232070923, -0.5605199933052063, 0.45428749918937683, 0.16389553248882294,...
def upload _ file ( self, file _ name ) : # wait untill upload button is avaible in webpage and takes the proper path of the upload file upload _ f = self. driver. find _ elements _ by _ xpath ( " / / input [ @ type ='file'] " ) if os. name = = " nt " : send = ( os. getcwd ( ) +'\ \'+ file _ name ) if not file _ name. ...
[ -0.07117095589637756, -0.013115881010890007, 1.035576581954956, 0.7395904660224915, 0.9181169867515564, 0.25590217113494873, 0.8916463255882263, -0.027757778763771057, -0.7537628412246704, 1.007529854774475, 0.015884900465607643, -1.0592552423477173, -0.3915596008300781, 0.8001245260238647...
async def test _ remove _ reserved _ pin ( v3 _ server, v3 _ settings _ response ) : v3 _ server. get ( ( f " https : / / api. simplisafe. com / v1 / ss3 / subscriptions / { test _ subscription _ id } " " / settings / normal? forceupdate = true " ), status = 200, body = v3 _ settings _ response, ) async with aiohttp. c...
[ 0.2330773025751114, 1.25424063205719, 0.47558069229125977, -0.08086661249399185, 0.582355797290802, 0.5445272326469421, -0.22472654283046722, 0.16171149909496307, 1.279331088066101, 0.5044223666191101, -0.9028370380401611, 0.22392538189888, -0.5407220125198364, -0.8161141872406006, 1.213...
def test _ check _ input _ exceedmaxvals ( ) : with pytest. raises ( valueerror ) : mob. check _ inputs ( chmask, basevalues _ idx = [ 0 ], window _ idx = 100 )
[ 0.31311866641044617, 1.0126187801361084, 0.3723350763320923, 1.4067708253860474, 0.8334476351737976, 0.6584022045135498, -0.2888040542602539, -0.25818291306495667, -0.013332218863070011, -0.5321402549743652, 0.07185276597738266, 0.7007686495780945, 0.07913270592689514, 0.8105830550193787, ...
def throughput ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " throughput " )
[ 0.8301551342010498, 0.6440087556838989, 0.515677273273468, -0.35022246837615967, 0.5615890026092529, 1.1191760301589966, 2.227522850036621, -0.09302778542041779, -0.34905344247817993, -0.06389540433883667, 0.392174631357193, 0.051812391728162766, -0.6417403221130371, -1.656263828277588, ...
def marktreatments ( self ) : def treatments ( x ) : return x [ x. malariacat = ='malaria']. date. unique ( ) self. treatments = self. meta. groupby ( ['cohortid'] ). apply ( lambda x : treatments ( x ) )
[ 0.047321997582912445, 0.48481154441833496, 0.20092809200286865, -1.0467309951782227, 0.7309528589248657, -0.4175824820995331, 0.9216001033782959, 0.5119923949241638, 0.4113846719264984, -0.023449700325727463, 0.3556722402572632, 1.0653802156448364, 0.6783587336540222, -0.01883886009454727,...
def members ( id ) : st = idaapi. get _ struc ( id ) # if we couldn't get the structure, then blow up in the user's face. if st is none : raise e. structurenotfounderror ( u " { : s }. members ( { : # x } ) : unable to find the requested structure ( { : # x } ). ". format ( _ _ name _ _, id, id ) ) # grab some attribut...
[ -0.35521548986434937, -0.43067529797554016, 0.739605724811554, -0.8785943984985352, -0.14787811040878296, -0.2695722281932831, -0.20097407698631287, -0.41658714413642883, 0.18980112671852112, -0.5253608226776123, -0.4913901388645172, 0.4906182885169983, -0.19700777530670166, -0.15259175002...
def closest _ points _ 1 ( points ) : dist = [ ] for i in range ( len ( points ) ) : for j in range ( i + 1, len ( points ) ) : dist. append ( [ distance ( points [ i ], points [ j ] ), i, j ] ) return min ( dist )
[ -0.1618308126926422, -0.44919171929359436, 0.47162967920303345, 0.921515703201294, -0.8072397112846375, 0.34521329402923584, 0.5523970723152161, 0.4087637662887573, 0.27250921726226807, 0.4984169006347656, -0.6892127990722656, -0.4985305964946747, -0.8273949027061462, 0.6173874735832214, ...
def init _ container ( self, cont _ spec ) : if " objects " not in cont _ spec : raise runtimeerror ( " no objects in container spec % s " % cont _ spec ) for pool in self. pools : pool [ " count " ] + = int ( cont _ spec. get ( " count ", 1 ) ) cont = { " dup " : int ( cont _ spec. get ( " count ", 1 ) ), " key " : " ...
[ -0.2519250214099884, -0.3014850616455078, 0.6302987933158875, -0.3760480284690857, 1.1447937488555908, 0.06537134945392609, 1.360554814338684, 0.006326186005026102, -0.4096137583255768, 0.957734227180481, -0.791986882686615, -0.0202528927475214, 0.8893064856529236, 0.8417063355445862, -0...
def data _ generation ( caller, mode, key = none ) : if mode in ('simulated ','border _ events') : label = caller. _ metadata ['labels'] [ 0 ] segmentations = [ caller. _ segmentations [ label ] ] return segmentations elif mode = ='convergence': label _ rep1 = list ( filter ( lambda i : " rep1 " in i, caller. _ metadat...
[ -1.4784907102584839, -0.035736024379730225, 0.7723984718322754, -0.21854445338249207, 0.48579642176628113, -0.020736653357744217, -0.22668741643428802, -0.46634113788604736, -0.5226784944534302, 0.6254599094390869, -0.052378688007593155, -0.0706440806388855, 0.11492602527141571, 0.68658381...
def encryption _ mode ( self ) : return self. configuration _ field [ 0 ] & 0x0f
[ -0.3415440022945404, 1.0808641910552979, 0.23803310096263885, 0.22114326059818268, 0.6026439666748047, 1.242647409439087, 0.6864838004112244, -0.4783962070941925, -0.0419018529355526, 0.6833199858665466, -0.6053615808486938, -0.4090309143066406, -0.756629228591919, 0.08281442523002625, 0...
def matchvalue _ iterator ( matchobj = none, matchattr = none, drivenobj = none, drivenattr = none, driverattr = none, minin = - 179, maxin = 179, maxiterations = 40, matchvalue = none, itermode ='step') : _ str _ func ='matchvalue _ iterator'log. debug ( " | { 0 } | > >... ". format ( _ str _ func ) ) if type ( minin ...
[ -0.6027303338050842, -1.1979153156280518, 0.7216324210166931, 0.0736580491065979, -1.3177404403686523, -0.12312691658735275, 0.7809417247772217, 0.42182472348213196, -0.34953877329826355, -0.11375287175178528, 0.3579539358615875, 0.19952823221683502, 0.08135778456926346, -0.022987784817814...
def chdir ( self, path ) : # note : process cwd will be reset by the caller assert isinstance ( path, unicode ), path self. _ cwd = self. fs2ftp ( path )
[ -0.1282200664281845, -0.05506957322359085, 0.46691662073135376, -0.44267937541007996, -0.9893916249275208, 0.7150474190711975, 0.6833083629608154, -0.5891720652580261, 0.18389296531677246, -0.5877065658569336, -0.09268341958522797, 0.6472797989845276, 0.2798771262168884, -0.054950963705778...
def origin _ cam _ path ( self ) : if self. _ _ rop is not none : if self. _ _ cam is none : self. _ _ cam = self. _ _ get _ camera ( ) if self. _ _ cam is none : return return self. _ _ cam. path ( )
[ 0.09510045498609543, -1.2039395570755005, 0.8982527256011963, 1.5112290382385254, -0.14370110630989075, 0.7837402820587158, 1.221933126449585, 0.22696752846240997, 0.982816219329834, -0.5637751221656799, 0.8762398362159729, 0.6231247186660767, -0.7105693221092224, 0.26982080936431885, 0....
def on _ bt _ add _ edge _ clicked ( self ) : start = self. ui. cb _ starting _ node. currenttext ( ) end = self. ui. cb _ ending _ node. currenttext ( ) weight = self. ui. sb _ weight _ edge. value ( ) if start and end : self. add _ cb _ item ( start ) self. add _ cb _ item ( end ) self. graph. add _ edge ( start, end...
[ -0.1682351976633072, -0.2980585992336273, 0.8843094110488892, 0.4442768692970276, 0.5102512836456299, 0.6061573624610901, 0.15697307884693146, 0.3472769558429718, -0.1527685970067978, 0.6137220859527588, 0.3767865300178528, -0.06297433376312256, -1.0491063594818115, 0.3727397322654724, 0...
def check _ same _ shape ( predictions : torch. tensor, targets : torch. tensor ) : if predictions. shape! = targets. shape : raise runtimeerror ( " predictions and targets are expected to have same dimensions " )
[ 0.1873505711555481, -0.16492174565792084, 0.3377342224121094, 0.28795942664146423, 0.9676521420478821, 0.7973448634147644, -0.2575843632221222, 0.0851140022277832, -0.6430419683456421, 0.33727386593818665, 0.7250677943229675, 1.2123669385910034, 0.4153951108455658, 0.3650616705417633, 0....
def _ _ init _ _ ( _ _ self _ _, *, host _ id : optional [ str ] = none, hosting _ environment _ id : optional [ str ] = none, service _ url : optional [ str ] = none, use _ internal _ routing : optional [ bool ] = none ) : if host _ id is not none : pulumi. set ( _ _ self _ _, " host _ id ", host _ id ) if hosting _ e...
[ -0.3105679154396057, 0.7838289737701416, 0.7214460968971252, 0.03748142719268799, 0.7745526432991028, 0.16809974610805511, -1.1791496276855469, 0.6874495148658752, -0.6597803831100464, -0.20159834623336792, -0.6004663109779358, 0.6784679889678955, 0.05433867871761322, -0.2326829433441162, ...
def enemy _ race ( self ) - > race : return self. ai. enemy _ race
[ -0.4581731855869293, -0.19516882300376892, 0.21558108925819397, 0.6838697195053101, 0.8079345226287842, 0.6996331214904785, -0.040295518934726715, -0.6986560821533203, -0.42758363485336304, 0.262272447347641, 1.2827112674713135, 1.0901861190795898, 0.05329398065805435, -0.10823051631450653...
def get _ dns ( self ) : return self. dns
[ -0.4560904800891876, 0.9316485524177551, 0.1434241086244583, 0.5782278776168823, 0.5874056220054626, -0.7164270281791687, -0.11798083782196045, -0.7053556442260742, 1.5533090829849243, -1.3042079210281372, -0.7724932432174683, 1.0300133228302002, 0.603173553943634, -0.8847668766975403, -...
def bulk _ extraction ( dirname : str, ) : for filename in os. listdir ( dirname ) : if not filename. endswith ( '. json') : continue fullpath = os. path. join ( dirname, filename ) text _ extractor. handler ( fullpath )
[ -0.554470956325531, 0.03489143028855324, 0.885338544845581, 0.04477306082844734, 0.07986205071210861, -1.0755561590194702, 0.2799931764602661, 0.5634105801582336, -0.4658246338367462, 0.4557911455631256, -0.6295528411865234, -0.2987726926803589, 0.04391380026936531, 0.690801739692688, -0...
def _ printcurrent ( self ) : if self. _ account = = none : print ( " no account is current " ) else : print ( self. _ account )
[ -0.0022114620078355074, -1.1641987562179565, 0.45177099108695984, -0.03568768873810768, -0.010568982921540737, 0.23207738995552063, 0.79644376039505, 0.13372856378555298, -0.33701515197753906, 0.22882765531539917, 1.4149821996688843, 1.653734803199768, -0.30266618728637695, 0.1173647567629...
def setup ( hass : homeassistant, config : configtype ) - > bool : conf = config [ domain ] host = conf [ conf _ host ] name = conf [ conf _ name ] token = conf [ conf _ token ] user _ agent = conf [ conf _ user _ agent ] pin = conf [ conf _ pin ] # run discovery on the configured ip bridges = bridge. discover ( host )...
[ -0.14149998128414154, 0.6511434316635132, 0.586491584777832, 0.3037070333957672, 0.17880496382713318, 0.4225481450557709, 0.460862934589386, 0.05565452575683594, 0.49240192770957947, 0.08097979426383972, -0.6239095330238342, -0.7886418104171753, -0.6451677083969116, 0.5058398842811584, -...
def connecttoserver ( self, string, p _ int ) :...
[ -0.9659832715988159, -1.0436196327209473, 0.4094049632549286, -0.4018996059894562, -0.29774144291877747, 0.7251161336898804, -0.2490067481994629, -0.7688267827033997, -0.8319595456123352, 0.19860810041427612, -0.956745445728302, -0.18084168434143066, -1.3095526695251465, -0.680954277515411...
def clustering _ eucl ( nrange, digits, num _ sample, outfile ) : eucl _ dist = lambda a, b : np. linalg. norm ( a - b ) k = len ( digits ) a1, a2 = [ ], [ ] for n in nrange : print " doing % i of % i " % ( n, nrange [ - 1 ] ) ns = [ n ] * k for m in range ( num _ sample ) : originals, shapes, ext _ shapes, labels = pi...
[ -0.008544385433197021, 0.20983995497226715, 0.6976504921913147, -0.4902222156524658, -0.3145343065261841, 0.20257216691970825, 1.112095832824707, -0.3385857939720154, -0.17420901358127594, 0.4170064628124237, 0.5985779762268066, 1.33975088596344, 0.7856927514076233, 0.770390510559082, 0....
def twos _ comp ( val, bits ) : " " " ex : twos _ comp ( < int16 _ t >, 16 ) " " " " " " twos _ comp ( < int32 _ t >, 32 ) " " " if ( ( val & ( 1 < < ( bits - 1 ) ) )! = 0 ) : val = val - ( 1 < < bits ) return val
[ 0.36471202969551086, -0.32100048661231995, 0.6279515624046326, 0.3105246424674988, -0.813532292842865, 0.41654399037361145, 0.6817260980606079, -0.6789610981941223, -0.09199688583612442, 0.009801458567380905, -0.4110866189002991, 0.654310405254364, 0.3296409845352173, 0.5761002898216248, ...
def test _ set _ and _ get _ values _ of _ coordinates _ of _ matrix ( self ) : self. assertequals ( self. matrix. getelement ( 0, 0 ), 1. 0 ) self. assertequals ( self. matrix. getelement ( 0, 1 ), 2. 0 ) self. assertequals ( self. matrix. getelement ( 1, 0 ), 4. 0 ) self. assertequals ( self. matrix. getelement ( 1, ...
[ -0.08098313957452774, -0.21776153147220612, 0.4812137484550476, 0.08003310859203339, 0.49012067914009094, -0.06966140121221542, 0.8026331067085266, -0.6921693682670593, -0.06968880444765091, -0.6192043423652649, -0.102802574634552, 0.19470694661140442, 0.4914352297782898, 0.377965748310089...
def blit _ lines ( self, lines, color = 0x000000 ) : self. canvas. clear ( ) start = 0 for l in lines : start = start + self. lineheight self. canvas. text ( ( 3, start ), l, font = self. font, fill = color )
[ 0.8878216743469238, -0.0849592387676239, 0.4443831443786621, -0.37674981355667114, 0.40499240159988403, 0.8788774609565735, -0.43740081787109375, -0.7316668629646301, 0.32609647512435913, 0.12972760200500488, -0.14470410346984863, -0.0075688790529966354, -0.2575436532497406, 0.041462421417...
def lr _ log _ reduction ( learning _ rate _ start = 1e - 3, learning _ rate _ stop = 1e - 5, epo = 10000, epomin = 1000 ) : def lr _ out _ log ( epoch ) : if ( epoch < epomin ) : out = learning _ rate _ start else : out = np. exp ( float ( np. log ( learning _ rate _ start ) - ( np. log ( learning _ rate _ start ) - n...
[ 0.6523165106773376, -0.5569127798080444, 0.4242957830429077, -1.1126843690872192, -0.7276557087898254, 0.27257028222084045, -1.0626133680343628, 0.3681606352329254, -0.04470986872911453, 0.8447344899177551, 0.06923545151948929, 0.5671765804290771, 0.6539592742919922, -0.7106274962425232, ...
def centropyd ( x, y, base = 2 ) : xy = np. c _ [ x, y ] return entropyd ( xy, base ) - entropyd ( y, base )
[ -0.29767075181007385, -0.5407900214195251, 0.5241323113441467, -0.4015587270259857, -0.8217226266860962, 0.3430839776992798, -1.00767183303833, -0.6885015964508057, -0.3543308973312378, 0.6832900047302246, 0.9745872020721436, 0.3759334981441498, 0.3577811121940613, -1.6988754272460938, 1...
def test _ step _ to _ error _ non _ strict ( ) : graph = create _ object _ graph ( " example ", testing = true ) def func ( graph ) : raise exception ( ) state _ machine = statemachine ( graph, initial _ state = func ) assert _ that ( graph. error _ policy. strict, is _ ( equal _ to ( false ) ) ) next _ func = state _...
[ -0.3623722791671753, 0.6601510643959045, 0.21454644203186035, 0.28060415387153625, 1.1039345264434814, 0.9178310632705688, 0.02381601370871067, -0.3280978798866272, -0.40255671739578247, -0.6540828347206116, -1.2553373575210571, 0.36429548263549805, 0.2739492952823639, -0.01446664892137050...
def read _ txt ( path ) : jobs = [ ] with open ( path ) as file : lines = file. readlines ( ) id = 1 for line in lines [ 1 : ] : weight, length = line. split ('' ) weight, length = int ( weight ), int ( length ) jobs. append ( job ( id, weight, length ) ) id + = 1 return jobs
[ -0.009714866988360882, -0.8628672957420349, 0.4910866320133209, -0.5602353811264038, -0.6723544001579285, 0.620837390422821, -0.4846355617046356, 0.6162084937095642, -0.9704002141952515, 0.18356473743915558, -0.20946964621543884, -0.3745521605014801, -0.6698300838470459, -0.472188711166381...
def maketestsuitev201101 ( ) : suite = unittest. testsuite ( ) suite. addtests ( unittest. makesuite ( geolocationservicetestv201101 ) ) return suite
[ -0.11930490285158157, -0.455569863319397, 0.5215467214584351, 0.2128758281469345, 0.060895949602127075, 0.8217447996139526, -0.20406341552734375, 0.6127819418907166, 1.0934906005859375, 0.4150374233722687, 0.40213215351104736, -0.19332410395145416, 0.6187849044799805, -0.5223707556724548, ...
def get ( self, id _ : int ) - > optional [ dict ] : return self. _ transport. get ( f'/ objects / { id _ }. json ', { } )
[ -1.0088565349578857, -0.3849686086177826, 0.5100781321525574, -0.8263477087020874, -0.250997930765152, -0.6472839117050171, -1.1730154752731323, -1.2867573499679565, -0.1000310555100441, -0.04641604796051979, -1.2241722345352173, 0.6371176242828369, 0.12376581132411957, -0.8754702806472778...
def test _ interval ( ) : def _ success _ interval ( in _ dict ) : in _ dict ['num'] + = 1 return in _ dict ['num'] baz _ with _ interval = retry. retry ( success = lambda x : x > 5, interval = 1 ) ( _ success _ interval ) start = datetime. now ( ) baz _ with _ interval ( {'num': 0 } ) elapsed = datetime. now ( ) - sta...
[ 0.1721477210521698, 0.5298293232917786, 0.3052259087562561, 0.6346083283424377, -0.330366313457489, 0.5493983626365662, 0.11053821444511414, 0.2827397584915161, -0.49214649200439453, -0.4069351851940155, -1.4643518924713135, 0.5128607153892517, -0.4998531639575958, -0.20161275565624237, ...
def test _ incoming _ vertex _ traversal ( self ) : e1 = testedge. create ( self. v1, self. v2, numbers = 12 ) e2 = testedge. create ( self. v1, self. v3, numbers = 13 ) e3 = testedge. create ( self. v2, self. v3, numbers = 14 ) results = self. v2. inv ( testedge ) assert len ( results ) = = 1 assert self. v1 in result...
[ -0.10225238651037216, 0.8409176468849182, 0.650859534740448, 0.476042777299881, -0.008664343506097794, 0.7288013696670532, 0.9591277241706848, -0.17781269550323486, -0.35926786065101624, 0.04536354914307594, -0.903257429599762, -0.14361578226089478, -1.1949368715286255, -0.2256267517805099...
def get _ exception _ message ( e ) : if hasattr ( e,'message') : return e. message return u''. join ( e. args )
[ -0.38010281324386597, 0.8257101774215698, 0.6574103236198425, -0.13276976346969604, 0.3991840183734894, -0.4070948660373688, -0.5596304535865784, -0.052174899727106094, 0.21466681361198425, 0.6439270973205566, 0.945968747138977, -0.37345656752586365, 0.21921968460083008, 1.1395024061203003...
def _ _ init _ _ ( self, df, size = [ 256, 256, 3 ], modality = " v3 " ) : assert " pdf _ label " in df assert " image " in df assert " errors " in df assert len ( size ) = = 3 df = df. loc [ ~ df. errors ] self. classes = list ( set ( df. pdf _ label ) ) self. n _ classes = len ( self. classes ) self. mlb = pp. multil...
[ -0.46690183877944946, 0.0597391314804554, 0.851966917514801, 0.2435724288225174, 0.38645219802856445, -0.3364099860191345, -0.6228480935096741, 0.06714683026075363, 0.6015430092811584, 0.013792844489216805, 0.212693452835083, -0.005676353815943003, 0.6434056758880615, -0.02873523347079754,...
def search _ by _ name ( self, name, type = none, case _ sensitive = false, from _ cache = false, * * kwargs ) : results = [ ] if type is none : search _ classes = { x for x in _ entity _ filter _ class. values ( ) } elif isinstance ( type, list ) : search _ classes = [ _ entity _ filter _ class [ x. lower ( ) ] for x ...
[ -1.687415599822998, 0.2812090516090393, 0.9112316370010376, 0.4945039451122284, 0.5382494330406189, -0.819185733795166, -0.02886851318180561, -0.9924282431602478, 0.4306534230709076, 1.022891879081726, -0.32488512992858887, 0.37235403060913086, -0.48373204469680786, 1.0362191200256348, -...
def bintodec ( number ) : if isinstance ( number, list ) : number =''. join ( [ str ( i ) for i in number ] ) if ". " in number : [ x, y ] = number. split ( ". " ) bin _ x = int ( x, 2 ) a = - 1 bin _ y = 0 for i in list ( y ) : if i! = " 0 " and i! = " 1 " : raise exception ( " invalid input " ) bin _ y = bin _ y + ( ...
[ -0.28786665201187134, -0.41307705640792847, 0.8510541915893555, 0.8587794303894043, -0.2650431990623474, 0.29671329259872437, 1.2092267274856567, -0.0917028933763504, 0.08061832189559937, -1.0390348434448242, -0.5610026121139526, 0.5598138570785522, 0.4283238351345062, 0.45516252517700195,...
def count _ pairs ( pairs ) : counts = defaultdict ( float ) for pair in pairs : if pair in counts : counts [ pair ] + = 1. 0 else : counts [ pair ] = 1. 0 return counts
[ 0.22663170099258423, 0.3842463195323944, 0.36427855491638184, 0.5971815586090088, 0.09201741963624954, -0.3711851239204407, 0.8562167882919312, 0.2738388776779175, 0.2616901695728302, 0.23357000946998596, -0.29582715034484863, -1.0552276372909546, -0.22298118472099304, 1.7069694995880127, ...
def predict ( self, train _ df, test _ df, model _ filename, scaler _ filename ) : # add technical indicators to test data test _ df ['sma _ 10'] = test _ df ['open']. shift ( 1 ). rolling ( 10 ). mean ( ) test _ df ['sma _ 20'] = test _ df ['open']. shift ( 1 ). rolling ( 20 ). mean ( ) test _ df ['sma _ 50'] = test _...
[ -0.705721378326416, 0.10391934961080551, 0.9047126770019531, -0.22698350250720978, -0.39260536432266235, -0.1017039492726326, 0.7023410201072693, -0.1352517455816269, -0.4753338396549225, 0.7262752056121826, 0.030406462028622627, 0.8877586126327515, 0.6444279551506042, -0.7172608375549316,...
def drawredactionrectangles ( redaction _ shapes, img ) : for shape in redaction _ shapes : top _ left _ corner = ( int ( shape [ 0 ] ), int ( shape [ 2 ] ) ) bottom _ right _ corner = ( int ( shape [ 1 ] ), int ( shape [ 3 ] ) ) cv2. rectangle ( img, top _ left _ corner, bottom _ right _ corner, ( 255, 0, 0 ), 5 )
[ -0.7232489585876465, -0.43972107768058777, 0.5227048397064209, -0.0779997929930687, 1.0215593576431274, 0.5230233669281006, 0.47490620613098145, -0.07245038449764252, 0.5982303023338318, 0.48666664958000183, -0.4832714796066284, 0.08399850875139236, -0.022250758484005928, 0.693090140819549...
def get _ field _ cls ( self, cls ) : lst = [ f. to for f in [ field. rel for field in cls. _ meta. fields if field. rel ] if issubclass ( f. to, basevisittracking ) ] if not lst : raise visittrackingerror ('unable to determine the visit field in class { 0 }. '. format ( cls ) ) if not len ( lst ) = = 1 : raise visittr...
[ -0.5610482096672058, 1.1293418407440186, 0.764917254447937, 0.04310641065239906, 0.4377133846282959, 0.39530155062675476, 1.2354204654693604, -0.21465454995632172, -0.2200537472963333, 0.11031177639961243, 0.12571103870868683, -0.0522594191133976, -0.07350471615791321, -0.32606127858161926...
def rotate _ point _ cloud _ by _ angle ( batch _ data, rotation _ angle = none, axis = 0 ) : rotated _ data = np. zeros ( batch _ data. shape, dtype = np. float32 ) for k in range ( batch _ data. shape [ 0 ] ) : if rotation _ angle is none : angle = np. random. uniform ( ) * 2 * np. pi else : angle = rotation _ angle ...
[ -0.05769459158182144, 0.2969812750816345, 0.881197988986969, 0.07980772107839584, 0.39049920439720154, 0.2991625666618347, 0.1868133693933487, 0.012193682603538036, 0.3483423590660095, 0.24730809032917023, -0.10916418582201004, 0.20043523609638214, -0.3299221992492676, -0.7962362766265869,...
def create _ feed ( ) : feed = atomfeed ( feed _ title, feed _ url = request. url, url = request. url _ root ) newest _ documents = document. query. order _ by ( document. timestamp. desc ( ) ) \. limit ( feed _ num _ documents ). all ( ) for doc in newest _ documents : feed. add ( doc. title or u'( no title given ) ',...
[ 0.23176589608192444, -0.46495962142944336, 0.531078040599823, 0.168829083442688, 0.5658460855484009, -0.06852510571479797, -0.9768064618110657, -1.0607881546020508, -0.20827984809875488, -0.4718925952911377, 0.6160665154457092, 0.47742319107055664, 0.44395455718040466, 0.04631014168262482,...
def focal _ length ( self, axis ='x') : if axis = ='y': return self. matrix [ 1, 1 ] elif axis = ='x': return self. matrix [ 0, 0 ] return ( self. matrix [ 0, 0 ], self. matrix [ 1, 1 ] )
[ -0.15316882729530334, 0.07453861832618713, 0.3941017687320709, 0.02362658455967903, -0.29084205627441406, -0.10905955731868744, 0.06837797909975052, -0.5776841044425964, 0.9961056709289551, 0.21636807918548584, -0.39145782589912415, 0.44662579894065857, 0.3197348117828369, 0.01966850645840...
def status _ bookmark ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('post ', f'/ api / v1 / statuses / { id } / bookmark')
[ -0.9406349062919617, -0.2747790813446045, 0.2911311089992523, 0.7296097874641418, 0.14464440941810608, -0.23328818380832672, -0.6988188624382019, 0.19043128192424774, 0.4397223889827728, -0.061134908348321915, -1.339424967765808, 1.3185049295425415, -0.11840873956680298, 0.2847840189933777...
def _ time _ to _ python ( self, v, dsc = none ) : pv = none try : ( hms, fs ) = v. split ( '.') fs = int ( fs. ljust ( 6,'0') ) except valueerror : hms = v fs = 0 try : ( h, m, s ) = [ int ( d ) for d in hms. split (':') ] pv = datetime. timedelta ( hours = h, minutes = m, seconds = s, microseconds = fs ) except value...
[ -0.18716277182102203, -0.04481084272265434, 0.7146011590957642, -0.511227011680603, -0.1717960685491562, -0.38211601972579956, -0.38613560795783997, -0.20190882682800293, 0.2200293391942978, 0.32955828309059143, -0.47454753518104553, -0.18867991864681244, 0.14021344482898712, -0.2620493471...
def get _ vz _ dir ( self, path ) : return'/ vz / root / % d / % s'% ( self. ctid, path )
[ 0.5054510235786438, -0.6945115327835083, 0.240741565823555, 1.0581185817718506, -0.7549176812171936, 0.38994741439819336, 0.8557988405227661, -0.5750839710235596, 1.1753201484680176, -0.3154303729534149, 0.4741474390029907, 0.7512569427490234, -0.5403592586517334, 0.12517791986465454, -1...
def _ pick _ connection _ type ( self, connection _ types : list [ str ] ) \ - > optional [ connectiontype ] : server _ connection _ types = [ ] for type _ string in connection _ types : with suppress ( valueerror ) : server _ connection _ types. append ( connectiontype ( type _ string ) ) intersection = ( set ( server...
[ 0.2342560589313507, -0.7597301006317139, 0.6619729995727539, 0.5897466540336609, 0.889021635055542, -0.6072218418121338, -0.23003220558166504, -1.387581467628479, 0.2256414145231247, 0.02604893036186695, 0.7249967455863953, -0.08639993518590927, -1.7978366613388062, -0.045242831110954285, ...
def test _ get _ all _ phonemes ( self ) - > none : doc = self. nlp ( " one two 3 go! " ) # " go " has no entry and will be marked by oov _ phonemes ; # "! " is non - voiced and won't appear self. assertequal ( list ( self. px. get _ all _ phonemes ( doc ) ), [ " w ", " ʌn ", " t ", " uː ", " θ ", " riː ", oov _ phonem...
[ -0.04871483892202377, 0.3402245342731476, 0.3920498490333557, -0.24951505661010742, 0.515557050704956, 0.9016162753105164, -1.0324580669403076, -0.10823169350624084, 0.6410889625549316, -0.6229290962219238, -0.42675328254699707, -0.29872485995292664, 0.06613975763320923, -0.027874233201146...
def exists ( self, prefix, node = none ) : if not node : node = self. root if not prefix. startswith ( node. prefix ) : return false elif node. prefix = = prefix : return true elif not node. children : return false else : for child in node. children : if prefix. startswith ( child. prefix ) : return self. exists ( pref...
[ -0.5296937823295593, -0.07836215943098068, 0.8318074345588684, -0.1599063128232956, -0.043687283992767334, -0.22436922788619995, -0.9891789555549622, 1.1211802959442139, 0.13192756474018097, 0.229081928730011, 0.3772696852684021, 0.34542977809906006, -0.010703301057219505, 0.56908017396926...
def currentwidget ( self ) : if not self. editors : return none else : return super ( tabwidget, self ). currentwidget ( )
[ 0.15391996502876282, -0.8682422041893005, 0.39005881547927856, -0.4898200035095215, -0.2543570399284363, 0.23231765627861023, -0.635068953037262, -0.28901249170303345, -0.09182720631361008, -0.8418943285942078, 1.005524754524231, 0.14610622823238373, -0.7129515409469604, 0.1321049183607101...
def map _ wikidata _ id ( data, category ) : category _ df = json _ to _ df ( category ) mapping = category _ df. set _ index ('wikidata _ id'). t. to _ dict ('records') [ 0 ] data [ category ] = data [ category ]. map ( mapping ) return data
[ -1.2059437036514282, -0.20028804242610931, 0.3268500566482544, -1.0179297924041748, 0.16231845319271088, 0.013354436494410038, -1.2945057153701782, 0.6628703474998474, -0.5356354713439941, 0.07807864993810654, -0.014702224172651768, 0.7033621072769165, 0.701117217540741, -0.596202373504638...
def put _ files ( self, files, content _ type = none, compress = none, cache _ control = none, block = true ) : def base _ uploadfn ( path, content, interface ) : interface. put _ file ( path, content, content _ type, compress, cache _ control = cache _ control ) for path, content in files : content = compression. comp...
[ -0.39699310064315796, 0.8317785263061523, 0.5708174705505371, 0.4030052423477173, 0.7062461972236633, -0.26689058542251587, 0.6033840179443359, -0.3189246654510498, -0.8576425313949585, 0.0285623949021101, -0.3970736563205719, -1.119207501411438, -1.7311135530471802, 0.4627811312675476, ...
def add _ query _ from ( self, query _ items ) : query = normalizers. normalize _ query ( compat. urlencode ( query _ items ) ) return uribuilder ( scheme = self. scheme, userinfo = self. userinfo, host = self. host, port = self. port, path = self. path, query = query, fragment = self. fragment, )
[ -0.09813949465751648, -0.6743927597999573, 0.45503363013267517, 0.6224051713943481, -0.1395961493253708, 0.79456627368927, -0.6310551762580872, 0.8035077452659607, 0.9596689343452454, -1.0806254148483276, 0.6252750754356384, -0.9621201157569885, -1.0687541961669922, -0.9283627867698669, ...
def username ( self ) - > optional [ str ] : return self. _ _ username
[ 0.24521160125732422, -0.48221614956855774, 0.18348130583763123, 0.42444369196891785, 0.02719585970044136, 0.11992250382900238, 0.7629848718643188, 0.27893683314323425, 0.7274495959281921, -0.6893082857131958, 0.09717635065317154, -0.141338050365448, -0.04935596138238907, -0.639610290527343...
def sim _ msisdn ( ser ) : ser. write ('at + cpbs = sm \ r') res = wait _ for _ strs ( ser, ['ok ','error'], timeout = 5 ) if'error'in res : print'error : % s'% res return false ser. write ('at + cpbr = 1, 100 \ r') res = wait _ for _ strs ( ser, ['ok ','error'], timeout = 5 ) if'error'in res : print'error : % s'% res ...
[ -0.5181557536125183, 0.7917022109031677, 0.7672427892684937, 0.28438758850097656, -0.9241827130317688, -0.5532415509223938, 0.34299275279045105, -0.5274674296379089, 0.7372468709945679, -0.12490251660346985, -1.5871810913085938, -0.019772827625274658, -1.0176674127578735, -0.16160687804222...
def datebincounts ( self ) : cid _ enrolldates = self. meta [ ['cohortid ','enrolldate'] ]. drop _ duplicates ( ) bins = self. date _ bins. date _ bin. unique ( ) bin _ counts = [ ] for i, bin in enumerate ( bins [ : - 1 ] ) : bin _ counts. append ( cid _ enrolldates [ cid _ enrolldates. enrolldate < = bins [ i + 1 ] ]...
[ 0.019760800525546074, 0.46939656138420105, 0.5009427666664124, 0.33763810992240906, -0.018321994692087173, 1.293823003768921, 0.786972165107727, -0.009927922859787941, -0.022964151576161385, -0.15837377309799194, -0.14353416860103607, 1.4971123933792114, 0.18394869565963745, 0.792786717414...
def snapshot _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " snapshot _ id " )
[ 0.8710388541221619, 0.782773494720459, 0.2613270580768585, 0.8789706230163574, -0.012491660192608833, 1.1231633424758911, -0.19374381005764008, 0.4175342619419098, 1.4878712892532349, -0.38972207903862, 0.161894291639328, 0.43094536662101746, 0.38057443499565125, -0.7755738496780396, -0....
def single _ memory _ gate ( self, h, x, scope, bias _ init = 0. 0, unitary = false, orthogonal = false ) : with tf. variable _ scope ( scope, self. _ reuse ) : gh = complex _ matmul ( h, int ( self. _ num _ units / 2. 0 ), scope ='gh ', reuse = self. _ reuse, unitary = unitary, orthogonal = orthogonal ) gx = complex _...
[ -0.07353589683771133, -0.0967869833111763, 0.5442984700202942, -0.2991688847541809, -0.21701087057590485, 0.20597928762435913, 0.6102723479270935, 0.3852716386318207, -0.07162106037139893, 0.7578207850456238, -0.14810575544834137, 1.023355484008789, -0.8540772199630737, 0.7325333952903748,...
def parse ( self ) - > list [ object ] : self. _ result = [ ] self. _ operators = deque ( ) for token in self. _ tokens : self. _ process _ token ( token ) while len ( self. _ operators ) > 0 : self. _ result. append ( self. _ operators. pop ( ) ) return self. _ result
[ -0.7377976179122925, 0.23326483368873596, 0.9299014806747437, 0.016817420721054077, 0.42033806443214417, -0.5977989435195923, -0.2667878568172455, 0.12602218985557556, -0.27429908514022827, -0.47285398840904236, -0.759365439414978, -0.9097477793693542, -0.5233969688415527, 0.12715514004230...
def get _ topic _ acl ( self, project, topic ) : url = self. get _ url ( " topics ", topic, project, " acl " ) return self. get _ resource ( url ) [ " authorized _ users " ]
[ 0.3282947540283203, -0.39487960934638977, 0.3750004768371582, 0.3441769778728485, -0.36137136816978455, -0.14862801134586334, -0.5707902312278748, -0.4738565683364868, 0.0757661759853363, 0.8378079533576965, 1.0817856788635254, 0.5836771130561829, -0.43493273854255676, -0.6638161540031433,...
def ipv6 _ addresses ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input [ str ] ] ] ] : return pulumi. get ( self, " ipv6 _ addresses " )
[ -0.44710707664489746, -0.11710669100284576, 0.36923104524612427, 0.7251337170600891, 1.042820930480957, 0.3095037043094635, 0.2761611044406891, 0.10590080171823502, 1.4179893732070923, 0.57448810338974, -1.005860686302185, 0.3870539963245392, -0.2408609539270401, -1.663320779800415, -1.0...
def reset ( self ) : self. gamespeed = 4 self. ground. speed = - 1 * self. gamespeed self. is _ game _ over = false self. is _ game _ quit = false self. finished = false self. speedup _ counter = 0 self. _ cactus _ group. empty ( ) self. _ clouds _ group. empty ( ) self. _ pteras _ group. empty ( ) self. _ last _ obsta...
[ -0.5536190271377563, 0.6283263564109802, 0.46483147144317627, 0.3994537889957428, 0.7285560965538025, 0.5245360136032104, 0.6255387663841248, -1.3378515243530273, -1.702447772026062, 0.8701552152633667, -0.4447692036628723, -0.03930613398551941, -0.52752685546875, 0.46125757694244385, 0....
def getstate ( self ) : return self. curr _ state
[ -0.5257164239883423, -1.6408681869506836, 0.39138031005859375, 0.1971721649169922, -0.28944942355155945, 0.47745180130004883, 0.8566069006919861, -0.06877309828996658, -0.03647425398230553, -0.8394516706466675, 0.3625594973564148, 0.5671291947364807, -0.5771619081497192, -0.320178985595703...
def nearby _ bus2 ( lat, lng, apikey ) : places = get _ web _ json ('https : / / maps. googleapis. com / maps / api / place / nearbysearch / json?'+'key = % s & location = % f, % f'% ( apikey, lat, lng ) +'& rankby = distance & language = zh - tw & types = bus _ station') if places ['status']! ='ok': warning ( " status...
[ -1.466813325881958, 0.04657794162631035, 0.504599392414093, -0.08282362669706345, -0.5951317548751831, 0.19613613188266754, -0.05931757763028145, 0.19602759182453156, -0.7471688985824585, 0.422244131565094, -1.5322264432907104, 0.5084233283996582, -0.7537186145782471, 0.7600709199905396, ...
def issumofdoublsquares ( num, currentval ) : return ( float ( math. sqrt ( ( num - math. pow ( currentval, 2 ) ) ) ). is _ integer ( ) )
[ -1.179512858390808, 0.13594555854797363, 0.5735083818435669, 0.7393010854721069, -0.46810129284858704, 0.4465048015117645, 0.5179906487464905, -1.4160150289535522, 0.49238455295562744, 0.22794945538043976, -0.7762619853019714, 0.6607677936553955, -0.18946923315525055, 0.05456101521849632, ...
def plot _ maps _ tdep ( self, time, radius, *, nmax = none, deriv = none, * * kwargs ) : self. model _ tdep. plot _ maps ( time, radius, nmax = nmax, deriv = deriv, * * kwargs )
[ -0.9627727270126343, -0.057306837290525436, 0.5166161060333252, 0.025290926918387413, -0.31827402114868164, 0.2031441181898117, -0.7198252081871033, -0.636995255947113, -0.16370567679405212, -0.027877077460289, -0.18899154663085938, -0.33400166034698486, 0.33308932185173035, 0.586956799030...
def test _ create _ basic _ recipe ( self ) : payload = {'title':'sample recipe ','time _ minutes': 12,'price': 11. 09 } res = self. client. post ( recipe _ url, payload ) self. assertequal ( res. status _ code, status. http _ 201 _ created ) recipe = recipe. objects. get ( id = res. data ['id'] ) for key in payload. k...
[ 0.20996126532554626, 0.5055723786354065, 0.44978806376457214, 0.11018621921539307, 0.7724142074584961, 0.5227698087692261, -1.6336545944213867, 0.16039356589317322, -0.8033820390701294, -0.5304842591285706, -1.0276002883911133, -0.9937606453895569, 0.2985681891441345, 0.18469278514385223, ...