text
stringlengths
25
2.19k
embedding
listlengths
768
768
def scrape _ stats ( url, headers _ dict, stats _ all _ headers ) : # iterate through each position to retrieve stats and store them in dictionary dict _ stats = { } for k, v in headers _ dict. items ( ) : # use dictionary keys to retrieve html table for each position html = beautifulsoup ( requests. get ( url. format ...
[ -0.21162423491477966, -0.18312200903892517, 0.7888076305389404, -0.07703381031751633, 0.08858956396579742, -0.7317461967468262, -0.13968050479888916, -0.09766251593828201, -0.36030760407447815, 0.18376095592975616, 0.23453739285469055, -0.8570025563240051, 0.5111715197563171, 0.19779330492...
def set _ recache ( self, recache ) : self. recache = recache
[ -0.1988726407289505, 0.03194045275449753, 0.4253666400909424, 0.631509006023407, 0.09596865624189377, -0.27264368534088135, 0.5755864381790161, 0.18707869946956635, -0.020159868523478508, 0.1768062263727188, -0.6042079329490662, 0.2809657156467438, 0.31109756231307983, -0.33331745862960815...
def network _ ids ( self ) - > sequence [ str ] : return pulumi. get ( self, " network _ ids " )
[ -0.39601051807403564, 0.1212262213230133, 0.18396401405334473, 0.7994158267974854, 1.795820951461792, 1.2250630855560303, -0.1067018210887909, -0.20694901049137115, 1.1200350522994995, 0.06842397153377533, -1.4876954555511475, 0.7088199853897095, 0.421583354473114, -0.21591664850711823, ...
def create ( self, validated _ data ) : # is used to create the json object, need to check if this works properly also, needs to be tested return park. objects. create ( * * validated _ data )
[ -0.032512445002794266, -0.9666652679443359, 0.5667417645454407, 0.6975074410438538, 0.25915589928627014, 0.9230759739875793, -0.05379834398627281, 0.5398948788642883, -0.5594151616096497, -0.7303641438484192, -0.9616658091545105, -0.8614233136177063, -1.052247405052185, -0.9798497557640076...
def start _ single ( self, typ, scol ) : self. starting _ single = true single = self. single = single ( typ = typ, group = self, indent = ( scol - self. level ) ) self. singles. append ( single ) return single
[ -0.3838683068752289, 0.10392250865697861, 0.5439250469207764, 0.6330135464668274, 0.28515514731407166, 1.0900192260742188, 0.5826275944709778, 0.4442119300365448, -0.18040607869625092, -0.5314183235168457, -0.7012065649032593, 1.0207659006118774, -0.5213216543197632, 0.19137641787528992, ...
def getddgstepcoefficients ( mode, p1, p2 ) : andor _ solis. getddgstepcoefficients. restype = ctypes. c _ uint p1 = ctypes. c _ double ( ) p2 = ctypes. c _ double ( ) result = andor _ solis. getddgstepcoefficients ( ctypes. c _ ulong ( mode ), ctypes. byref ( p1 ), ctypes. byref ( p2 ) ) check _ status ( result ) retu...
[ -0.8102008104324341, 0.6685301661491394, 0.5412234663963318, -0.04237819463014603, -0.10503899306058884, -0.4849328398704529, -0.04759512096643448, 0.08318131417036057, -0.9367996454238892, -0.1352178305387497, -1.0648201704025269, 0.0979931503534317, -0.2828267514705658, 0.267021238803863...
def convert _ all _ pdfs _ to _ jpgs ( pdf _ dir ) : # pdf _ dir looks like " / users / miabramel / downloads / pdbs " os. chdir ( pdf _ dir ) for pdf _ file in os. listdir ( pdf _ dir ) : if pdf _ file. endswith ( ". pdf " ) : pages = convert _ from _ path ( pdf _ file, 300 ) pdf _ file = pdf _ file [ : - 4 ] for page...
[ -0.41981738805770874, -0.4435082674026489, 1.0286201238632202, 0.3717130720615387, 0.4196097254753113, -0.7433890700340271, -0.12138713151216507, 0.22740641236305237, 0.24180904030799866, 0.18027934432029724, 0.07935172319412231, -0.07181525975465775, 0.07226410508155823, 0.470044195652008...
def downloadbypart ( filename, bigstart, bigstop, url, path, port, threadstatus ) : clientsocket = skt. socket ( skt. af _ inet, skt. sock _ stream ) clientsocket. connect ( ( url, port ) ) content = " " head = " " request = ( " get { n } http / 1. 1 \ r \ n " + " host : { s } \ r \ n " + " connection : close \ r \ n "...
[ -0.07343289256095886, -0.39779791235923767, 0.9162201285362244, -0.02407483197748661, 0.1915988028049469, 0.6480534672737122, -0.07428983598947525, -0.29605165123939514, -1.3087525367736816, -0.03627825528383255, -0.34550368785858154, -0.0779646560549736, -0.997025191783905, 0.115961864590...
def calcular _ peso ( self, reticulado ) : seccion = self. seccion peso = seccion. peso ( ) largo = self. calcular _ largo ( reticulado ) return peso * largo
[ 1.37380051612854, -0.3692222833633423, 0.39124542474746704, 0.48070910573005676, -0.34753715991973877, -0.18249014019966125, -0.027424605563282967, -0.10245970636606216, -0.008145005442202091, 0.5696741342544556, -0.576134204864502, 0.22882868349552155, -0.17514432966709137, 0.138150677084...
def post _ process ( mask ) : bw = morphology _ abel ( mask = = 1 ) # 0 ) fill gap bw = binary _ closing ( bw, disk ( 3 ) ) # 1 ) detach mislabeled pixels bw = binary _ opening ( bw, rectangle ( 2, 20 ) ) # 2 ) remove small objects bw = remove _ small _ objects ( bw, min _ size = 4096, connectivity = 2 ) # 3 ) solve th...
[ -0.010937233455479145, -0.09718886017799377, 0.9150828123092651, 0.3643718957901001, -0.32918694615364075, -0.200936958193779, 0.9659531712532043, -0.44154810905456543, 0.8482884168624878, -0.07524215430021286, 0.23393791913986206, 0.2806928753852844, 0.10954314470291138, -0.20915159583091...
def exrex _ pattern ( patt, star _ len = 10, plus _ len = none ) : if plus _ len is none : plus _ len = star _ len return truncate _ pattern ( expand _ pattern ( patt ), star _ len = star _ len, plus _ len = plus _ len )
[ 0.6805281043052673, 1.2289336919784546, 0.5073009133338928, -0.8615962862968445, -1.0659164190292358, 0.2600128650665283, -0.22339046001434326, 1.1669751405715942, 1.4752092361450195, -0.017787428572773933, -0.15492863953113556, 0.3513322174549103, -0.11267632246017456, -0.3203456103801727...
def set _ name _ and _ type _ async ( self, name : optional [ str ], new _ type :'binaryninja. types. type') - > none : self. _ function. create _ user _ var ( self, new _ type, name )
[ -0.4062480926513672, -0.11141268908977509, 0.36200687289237976, 0.40388965606689453, 0.24831078946590424, -0.3990064263343811, 0.1934403032064438, -1.1159049272537231, -0.5267826914787292, 0.7923221588134766, -0.9731231927871704, 1.6638511419296265, -0.07877271622419357, 0.2633173167705536...
def stop ( self ) : self. logger. info ( " stopping receiver... " ) for thread in self. threads : thread. stop ( )
[ -0.715664267539978, -1.1212018728256226, 0.13729627430438995, -0.94027179479599, 1.006068229675293, 0.2916422188282013, 0.1398237943649292, 1.0979983806610107, -0.23872783780097961, -0.14363974332809448, 0.1407310962677002, -0.3091885447502136, -1.3409881591796875, 0.5915892720222473, -0...
def next ( self ) : try : item = self. api ( ) yield item if not item : raise stopiteration except stopiteration : pass except exception as err : query = " insert into error ( state, error, source ) \ values ( % s, % s, % s ) ; " self. cursor. execute ( query, ( self. state, str ( err ), self. queue _ id ) ) raise err ...
[ -0.837980329990387, 0.499133825302124, 0.6202488541603088, -0.4757102429866791, 0.033437348902225494, -0.1448799967765808, -0.30830118060112, -0.3146701753139496, 0.005605758633464575, -0.1090221181511879, 0.05266741290688515, -0.6076408624649048, -0.3534618318080902, -0.372903972864151, ...
def edit _ list _ item ( shoppinglist _ id, id ) : # check if user is logged in if check _ if _ user _ logged _ in ( ) : form = createlistform ( ) user = session ['user _ email'] # find list with item being edited shopping _ list = shopping _ list _ app. get _ shopping _ list ( shoppinglist _ id, user ) # from the shop...
[ -0.6860193610191345, -0.028571758419275284, 0.31263676285743713, 0.01611015945672989, 0.42685702443122864, 0.5668928027153015, -0.045336250215768814, 0.9376888275146484, 1.0479363203048706, 0.38203608989715576, -0.6579896807670593, -0.45437899231910706, 0.31860923767089844, 0.7092419266700...
def mean _ ensemble _ event _ counts ( event _ counts ) : result = { } for elem in event _ counts [ : ] : for key, value in elem. items ( ) : try : result [ key ] + = value except keyerror : result [ key ] = value try : for key in result : result [ key ] / = len ( event _ counts ) except zerodivisionerror : return none...
[ -0.008190900087356567, 0.016194848343729973, 0.435233473777771, -0.151124507188797, -0.4401126801967621, -0.1770750880241394, 0.6988632082939148, -0.06788939982652664, 0.1745903342962265, 0.7158751487731934, 0.48122724890708923, 0.12301424145698547, -0.4229428172111511, 0.8654121160507202,...
def get _ refs ( self ) : refs = [ ] relations = self. get _ relations ( ) for relation in relations : # get refs from relation return a tuple ( left side refs, right side refs ) # only the left side refs are the " input " refs refs + = relation. get _ refs ( ) # if the rules do not have any references return none to d...
[ 0.12245071679353714, 0.1334015280008316, 0.7609772682189941, -0.03374233469367027, 0.8431487083435059, 0.2112685590982437, 0.02274102158844471, -0.36360496282577515, -0.3519771099090576, 0.5548575520515442, 0.46778255701065063, -0.35059788823127747, -1.1841464042663574, 0.5895410180091858,...
def getrelativelnpdf ( self, x ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. getrelativelnpdf ( self, x )
[ 0.1365208774805069, -0.8918349742889404, 0.4993370771408081, -0.7729871273040771, -1.218093752861023, 0.23967164754867554, -0.5940308570861816, -0.8965996503829956, 0.05744503065943718, -0.4625861346721649, -0.5538856983184814, 0.26907023787498474, -0.9639351963996887, -0.6863839030265808,...
def _ fitgh _ residuals ( par, x, data ) : return ( data. ravel ( ) - gausshermite ( x, par ) )
[ 0.8238500952720642, 0.44822627305984497, 0.29731178283691406, -0.5560116171836853, 0.7114775776863098, 0.5671284794807434, -1.3694850206375122, 0.6738686561584473, -0.412090927362442, 0.020847737789154053, -0.8497423529624939, 0.16823509335517883, -1.2178239822387695, -0.9128060340881348, ...
def create _ hgf _ record _ json ( parameters, curdir, form, user _ info = none ) : # sort the files by name. this results in getting all structured # fields first and then ( in case they exist ) individual subfields. hgf _ files = sorted ( get _ hgf _ files ( curdir ) ) hgf _ rec = create _ json _ hgf _ record ( curdi...
[ 0.04555802419781685, -0.40248361229896545, 0.7829644083976746, 0.10122605413198471, 0.38834941387176514, -0.06675486266613007, 0.7933760285377502, 0.11817171424627304, -1.1036953926086426, 0.00802895613014698, -0.5752235651016235, -0.2321518510580063, 0.004841262940317392, 0.69880777597427...
def end _ time ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " end _ time " )
[ 0.6743663549423218, -0.11660723388195038, 0.43617168068885803, 0.18817083537578583, 0.49399083852767944, 1.05840003490448, -0.5445602536201477, 0.38735270500183105, -0.1539844572544098, 1.0419570207595825, 0.14364095032215118, 0.5016908049583435, -0.48135489225387573, -0.3756623864173889, ...
def depth ( self ) : stats = self. _ get _ stats ( ) return stats ['max _ depth']
[ 0.5494562387466431, 0.5683929920196533, 0.24848037958145142, 0.8117695450782776, 0.5903974771499634, 0.89186692237854, 0.5236013531684875, -0.46404528617858887, 0.7029647827148438, -1.3726906776428223, -0.07347770035266876, 0.5211648344993591, 0.018254758790135384, 0.16904334723949432, -...
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, opts : optional [ pulumi. resourceoptions ] = none, dataphin : optional [ pulumi. input [ str ] ] = none, dataphin _ count : optional [ pulumi. input [ str ] ] = none, logistics : optional [ pulumi. input [ str ] ] = none, modify _ type : optional [ pulumi. input ...
[ -0.007639961317181587, 0.27829721570014954, 0.8951314687728882, -0.7195557951927185, 0.1439356952905655, -0.2747850716114044, -0.6299875378608704, 0.3701007068157196, 1.3391902446746826, -0.5291371941566467, 0.18030309677124023, 0.8099507093429565, 0.5138766169548035, -1.4108061790466309, ...
def get _ num _ in _ interval ( lst, start, end ) : result = [ ] for elem in lst : if start < elem < end : result. append ( elem ) return result
[ -0.31206217408180237, -0.6018065810203552, 0.4851895272731781, 1.8157703876495361, -0.5601049661636353, 0.4943460524082184, -0.9292638897895813, 1.180120825767517, -1.115907907485962, -0.2909078896045685, -2.0927350521087646, 0.6647864580154419, -0.3908713459968567, -0.11783723533153534, ...
def naked _ twins ( values ) : # find all instances of naked twins # eliminate the naked twins as possibilities for their peers # initialise flag and lists flag = 1 # flag to decide whether to search for naked twins or not my _ list _ row = [ ] my _ list _ col = [ ] my _ list _ sq = [ ] my _ list _ diagonal = [ ] # sta...
[ -0.5420411825180054, -0.03290705010294914, 0.7010094523429871, -1.1154801845550537, -0.762320876121521, -0.12204332649707794, 0.8818485140800476, -0.8685047626495361, 0.4352544844150543, 0.05441070348024368, -0.3512616455554962, 0.4633147120475769, -0.12494620680809021, 0.4753060042858124,...
def variational _ objective ( self, params, iteration = none ) : mu, logstdev = self. _ unstack ( params ) eps _ sample = self. np _ random. randn ( self. num _ samples, self. dims ) # each row is a different sample. stdev = np. exp ( logstdev ) params _ sample = eps _ sample * stdev + mu # perturb stdev element - wise...
[ 0.029747746884822845, 0.16427184641361237, 0.9115718007087708, 0.44687968492507935, -0.45786169171333313, 0.0027400318067520857, -0.1040249913930893, 0.14766500890254974, -0.3108227849006653, 0.8073651194572449, 0.4990345537662506, 0.7836502194404602, -0.13687558472156525, -0.5788728594779...
def parse _ args ( args ) : # construct the parser ( which is stored in parser ) # module docstring lives in _ _ doc _ _ # see http : / / python - forum. com / pythonforum / viewtopic. php? f = 3 & t = 36847 # and a formatter class so our examples in the docstring look good. isn't it # convenient how we already wrapped...
[ 0.08965254575014114, -0.6871224641799927, 0.7497305274009705, -0.5926045179367065, -0.06211872026324272, -0.27735596895217896, -0.17325039207935333, 0.21257410943508148, -0.21464647352695465, 0.37916260957717896, 0.2848929762840271, -0.15340149402618408, -0.4119340181350708, 0.599776268005...
def message ( self, message _ text ) : if self. verbose is true : print ('ng :'+ message _ text +'at datetime = ', ( datetime. datetime. now ( ). time ( ) ) )
[ 0.7703962922096252, -0.11549068987369537, 0.5678485035896301, 0.12472717463970184, 0.6193723082542419, 0.22098809480667114, -1.0453439950942993, -0.39978739619255066, -0.9954009652137756, 1.056443214416504, 0.48093414306640625, 0.8761401772499084, -0.5628972053527832, 0.8074653148651123, ...
def _ log _ before _ and _ after ( context, host _ data, db _ session ) : try : # read the new vios data, and the old vios data from the database new _ vioses = [ ] old _ vioses = [ ] server _ dom = dom. parse _ to _ host ( host _ data, dom. no _ db _ dom _ factory ( ) ) for vios in server _ dom. vio _ servers : new _ ...
[ 0.42315807938575745, -0.8183335065841675, 0.6685802936553955, -0.0730133056640625, -0.21333876252174377, -0.23155558109283447, -0.5016252994537354, 0.46457648277282715, 0.08567436039447784, 0.24613557755947113, -0.13307271897792816, 0.9590940475463867, 0.9581413865089417, 0.496725916862487...
def common _ names ( female _ names, male _ names ) : male = set ( male _ names ) female = set ( female _ names ) return male. intersection ( female )
[ -0.10859759896993637, 0.4023568332195282, 0.8596226572990417, -0.518792450428009, 0.32312458753585815, 0.021104274317622185, -0.7428801655769348, -0.17166756093502045, -1.514514446258545, 0.8625295758247375, -0.33160337805747986, 0.11230804026126862, 0.48515594005584717, 0.3072319626808166...
def get _ server _ metadata ( self, headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =... ) - > service _ pb2. servermetadataresponse :
[ -1.6463956832885742, -0.5534330010414124, 0.5652194023132324, 0.13493692874908447, 0.460052490234375, -0.2490893453359604, -1.1426249742507935, -1.008266806602478, -0.18423695862293243, 0.5065272450447083, -0.5775031447410583, 1.1058679819107056, -0.6308526396751404, 0.26365846395492554, ...
def getaverage ( year, features, count ) : featureavg = [ ] for feature in features : featureavg. append ( feature / count ) return ( year, featureavg )
[ -0.7378239035606384, -0.5852547883987427, 0.24905277788639069, 0.36825892329216003, 0.028116658329963684, 0.18205273151397705, -0.461343914270401, 0.8825017213821411, -0.8499534130096436, 1.1031312942504883, -0.3841093182563782, 0.2474759817123413, 0.4777265191078186, 1.012620210647583, ...
def ndarange ( shape : sequence [ int ], dtype : union [ tf. dtype, np. dtype ] = np. float32 ) - > np. ndarray : # pytype doesn't understand the ternary with tf as " any " dtype = ( dtype. as _ numpy _ dtype if isinstance ( dtype, tf. dtype ) else dtype ) # pytype : disable = attribute - error return np. arange ( np. ...
[ -0.4273158311843872, 0.34037530422210693, 0.35104620456695557, -0.1725013107061386, 0.016246473416686058, -0.5505315065383911, -0.07682566344738007, -0.9860915541648865, 0.06776833534240723, 0.4910411238670349, -0.01538876909762621, 0.48388752341270447, -0.04293498769402504, 0.452265501022...
def test _ subscription _ api _ with _ passing _ string _ as _ card _ number ( self ) : data = { " event _ id " : self. event. id, " user _ id " : self. user _ id, " no _ of _ tickets " : 10, " card _ number " : " invalid card ", " expiry _ year " : 2022, " expiry _ month " : 7, " amount " : 1000, " discount _ amount "...
[ 0.37537726759910583, -0.6512933969497681, 1.0325907468795776, 0.33264651894569397, 0.16479112207889557, 0.3200814425945282, -0.8271328210830688, 0.3318905830383301, 0.06318733841180801, -0.15366803109645844, -0.40982386469841003, 0.43707704544067383, 0.09051565080881119, 0.1004400402307510...
def pin _ pos ( pin _ loc, modules ) : module _ name, local _ pin _ loc = pin _ loc minx, miny, maxx, maxy = modules [ module _ name ]. bounds pinx = ( maxx - minx ) * local _ pin _ loc [ 0 ] + minx piny = ( maxy - miny ) * local _ pin _ loc [ 1 ] + miny return pinx, piny
[ -0.9887236952781677, -1.5967384576797485, 0.2923996150493622, -0.6320433020591736, -0.13410638272762299, 0.5192135572433472, 0.06570933759212494, 0.43934813141822815, 0.7127504348754883, 0.6619417071342468, -0.7339683175086975, 0.02601582743227482, -0.24385973811149597, -0.2717735469341278...
def _ _ init _ _ ( self, * args, * * kwargs ) : self. config = config super ( requesthandlerwrapper, self ). _ _ init _ _ ( * args, * * kwargs )
[ -0.7295416593551636, -0.25185278058052063, 0.5570444464683533, 0.20986530184745789, -0.05985711142420769, 0.9188535213470459, -0.2963339388370514, 0.9499226808547974, -0.12815643846988678, -0.5652884840965271, -0.7052019834518433, 0.024039562791585922, -0.029995832592248917, 1.051203727722...
def allcommands ( self ) : return self. _ _ cmds
[ -0.13453860580921173, -0.94471275806427, 0.37685683369636536, 1.0833313465118408, 0.2684326767921448, -0.07932237535715103, -0.3698815703392029, -0.9170645475387573, 1.1525304317474365, -1.8198161125183105, 0.40977197885513306, 0.05438786745071411, 0.09770406782627106, 0.8005663156509399, ...
def np2pil ( im : union [ np. ndarray, image. image ], swap : bool = true ) - > image : try : im. verify ( ) log. warn ( " expected numpy received pil " ) return im except : if swap : if len ( im. shape ) = = 2 : color _ mode = " l " elif im. shape [ 2 ] = = 4 : im = bgra2rgba ( im ) color _ mode = " rgba " elif im. sh...
[ -0.3621692657470703, -0.11126484721899033, 0.8359412550926208, -0.09609874337911606, -0.0773928314447403, 0.7136524319648743, -0.4128256142139435, -0.5937346816062927, 1.5437731742858887, 0.8620189428329468, 1.0012410879135132, 0.39108383655548096, -0.05016612634062767, -0.4231939017772674...
def _ _ init _ _ ( self, dsxml, filename = none ) : self. _ filename = filename self. _ datasourcexml = dsxml self. _ datasourcetree = et. elementtree ( self. _ datasourcexml ) self. _ name = self. _ datasourcexml. get ('name') or self. _ datasourcexml. get ('formatted - name') # tds files don't have a name attribute s...
[ -0.7114080190658569, -0.06504203379154205, 0.5485566854476929, -1.0698192119598389, -1.0271515846252441, -0.1904001086950302, -0.5774050354957581, 0.5359619855880737, 0.16307729482650757, -0.2844898998737335, -0.2645208239555359, -0.742600679397583, 0.9807767271995544, -0.1520046442747116,...
def fullsearch ( q, options = { } ) : # dictionary for containing the get query parameters. payload = { } # setting the query parameter payload [ " query " ] = q # setting the google plus api key payload [ " key " ] = google _ api _ key # setting the parameter for the number of returned results to 20 payload [ " maxres...
[ -0.3884800672531128, 0.9546371102333069, 0.7675042152404785, -0.033723797649145126, 0.4277280271053314, -0.514674723148346, -0.3657708764076233, -0.6286759972572327, 0.5145748853683472, -0.36000609397888184, 0.06655503809452057, -0.1664046198129654, -0.7550179362297058, -0.2113307714462280...
def target _ help ( ) : return " " " \ for detailed documentation on the sagemaker deployment client, please visit https : / / mlflow. org / docs / latest / python _ api / mlflow. sagemaker. html # mlflow. sagemaker. sagemakerdeploymentclient the target uri must follow the following formats : - sagemaker - sagemaker : ...
[ 0.22062452137470245, -0.4366896450519562, 0.6236476898193359, -0.48883605003356934, 0.5638877749443054, -0.07583661377429962, 0.3063993453979492, -0.00990402139723301, -0.247346892952919, 0.5192276239395142, 0.7641316056251526, 1.0269033908843994, 0.4637819826602936, -0.8079717755317688, ...
def is _ subclass ( test, rootclass ) : try : classutils. _ cached _ subclasses [ rootclass. _ _ name _ _ ] except exception : classutils. _ cached _ subclasses = { } classutils. _ cached _ subclasses [ rootclass. _ _ name _ _ ] = \ classutils. get _ all _ subclasses ( rootclass ) finally : subclasses = classutils. _ c...
[ 0.2491948902606964, -0.0034657635260373354, 0.5054856538772583, 0.9787856936454773, -0.5506411194801331, -0.1365857571363449, -0.6084676384925842, -0.6562223434448242, 0.22693009674549103, -0.2519359588623047, -0.005018144380301237, 0.8255050182342529, -0.6222925782203674, 0.00761084118857...
def get _ boton ( archivo, flip = false, rotacion = none, pixels = 0, tooltip _ text = none ) : from gi. repository import gtk from gi. repository import gdkpixbuf if not pixels : pixels = get _ pixels ( 1 ) boton = gtk. toolbutton ( ) imagen = gtk. image ( ) pixbuf = gdkpixbuf. pixbuf. new _ from _ file _ at _ size ( ...
[ -0.11075783520936966, 0.06766503304243088, 0.6666959524154663, -0.3886277377605438, -0.76120525598526, 0.47322767972946167, -0.21332980692386627, 0.14214304089546204, -0.28486740589141846, 0.16259661316871643, -0.3033790588378906, 0.2456146478652954, 0.3967355489730835, -0.2845380306243896...
def test _ multi _ fetch _ non _ existant _ series ( self ) : path1, path2 ='fake _ path1 ','fake _ path2'reader1 = graphite _ influxdb. influxdbreader ( influxdbclient ( database = self. db _ name ), path1, graphite _ influxdb. utils. nullstatsd ( ) ) reader2 = graphite _ influxdb. influxdbreader ( influxdbclient ( da...
[ -0.35424965620040894, 0.07990948110818863, 0.44369015097618103, 0.11538416892290115, 0.5094736814498901, 1.0976676940917969, -0.31608814001083374, -1.2017310857772827, -1.1264362335205078, -0.3227959871292114, 0.22121483087539673, 0.27066782116889954, 0.4440782964229584, 0.398612380027771,...
def ways ( stair _ count, m ) : if stair _ count < = 1 : return stair _ count if m < = 1 : return 1 fib = [ 0, 1 ] for _ in range ( stair _ count ) : fib. append ( sum ( fib ) ) if len ( fib ) > m : fib. pop ( 0 ) return fib [ - 1 ]
[ 1.237864375114441, 0.4498750567436218, 0.4480378031730652, 1.8390995264053345, -0.11125992983579636, -0.3413289189338684, 0.865317165851593, 0.9185072183609009, -0.47057053446769714, 0.020604213699698448, 0.5872138142585754, -0.08390884101390839, -0.6599904894828796, 1.4804946184158325, ...
def get _ sari _ score ( source _ ids, prediction _ ids, list _ of _ targets, max _ gram _ size = 4, beta _ for _ deletion = 0 ) : addition _ scores = [ ] keep _ scores = [ ] deletion _ scores = [ ] for n in range ( 1, max _ gram _ size + 1 ) : source _ counts = _ get _ ngram _ counter ( source _ ids, n ) prediction _ ...
[ 0.34765318036079407, 0.7109119296073914, 0.7753584980964661, 0.39086204767227173, 0.42009687423706055, -0.3390904366970062, -0.17961958050727844, -0.4895264804363251, -0.4097159206867218, 1.1632224321365356, 0.19369028508663177, 0.36418551206588745, 0.12193326652050018, -0.0151339368894696...
def ha _ from _ lst ( lst, ra ) : hourangle = lst - ra return hourangle
[ -0.34375885128974915, -0.3637717664241791, 0.4361419677734375, -0.07307266443967819, -0.2071574479341507, 0.7318860292434692, -0.39197415113449097, 1.5742809772491455, 0.22925464808940887, 0.9102324843406677, -0.7832105159759521, -0.4813186228275299, -0.5814329385757446, 0.3365869522094726...
def quotient ( x, y ) : quotientvalue = x / y return ( quotientvalue )
[ 0.17457778751850128, -0.3724983334541321, 0.3074357211589813, -0.5839968919754028, -0.5940104126930237, -0.2466677576303482, -0.4623710513114929, -1.4693342447280884, -1.204033374786377, -0.318053275346756, -0.28217506408691406, 0.25673753023147583, 0.26532864570617676, -0.6721886396408081...
def get _ alphabet ( self ) : return''. join ( self. _ alphabet )
[ -0.39762791991233826, -0.717669665813446, 0.5239982008934021, -0.31204575300216675, 0.27179116010665894, 0.8434550762176514, -0.24171480536460876, -1.284000277519226, 0.3155456483364105, 0.3236994445323944, 0.3092239201068878, 0.8290876150131226, -0.7001559734344482, -0.29282552003860474, ...
def trellis _ kernel ( rx ) : # pragma : no cover butterfly _ lut = [ ( 0, 0, 1, 3 ), ( 2, 2, 3, 1 ), ( 4, 0, 5, 3 ), ( 6, 2, 7, 1 ), ( 8, 3, 9, 0 ), ( 10, 1, 11, 2 ), ( 12, 3, 13, 0 ), ( 14, 1, 15, 2 ), ( 16, 3, 17, 0 ), ( 18, 1, 19, 2 ), ( 20, 3, 21, 0 ), ( 22, 1, 23, 2 ), ( 24, 0, 25, 3 ), ( 26, 2, 27, 1 ), ( 28, 0,...
[ 0.3904285728931427, -0.16908490657806396, 1.3532633781433105, -0.12959633767604828, -0.7583657503128052, -0.36442989110946655, 0.5367547869682312, 0.017919933423399925, 0.2465372085571289, 0.7162520885467529, -0.6440433263778687, 0.15253791213035583, -0.5825654864311218, -0.451240748167037...
def _ _ init _ _ ( self, nfeat, nhid, noutput, dropout, alpha, nheads, region _ size ) : super ( gat, self ). _ _ init _ _ ( ) self. dropout = dropout # self. attentions = nn. modulelist ( [ graphattentionlayer ( nfeat, nhid, region _ size = region _ size, dropout = dropout, alpha = alpha, concat = true ) for _ in rang...
[ 0.5593207478523254, -0.03579220920801163, 0.6853992342948914, -0.3374280333518982, 0.15672996640205383, 0.11535236239433289, 0.8509194254875183, -0.9703258872032166, 0.296435683965683, -0.13570833206176758, 0.15199430286884308, 0.573252260684967, 0.4176771342754364, 0.5443033576011658, 0...
def sort _ by _ index ( meta, type _ weights, property _ name ='index') : has _ index = six. moves. filter ( lambda m : m. get _ property ( property _ name ) is not none, meta ) has _ no _ index = six. moves. filter ( lambda m : m. get _ property ( property _ name ) is none, meta ) return ( sorted ( has _ index, key = ...
[ 0.09688258916139603, -0.43655747175216675, 0.6282258033752441, 0.48779064416885376, 0.5099097490310669, -0.038129691034555435, 0.4548194408416748, -0.8042151927947998, -0.7327958345413208, 0.6056904792785645, 0.5561344027519226, 0.6714442372322083, -0.15721812844276428, -0.1327314823865890...
def cross _ with ( self, other, iterations = 1 ) : x1, x2 = self. copy ( ), other. copy ( ) for i in range ( iterations ) : n = randint ( 0, len ( self. _ _ genome ) - 1 ) x1. set _ value ( x1. get _ value ( ) [ : n ] + x2. get _ value ( ) [ n : ] ) x2. set _ value ( x2. get _ value ( ) [ : n ] + x1. get _ value ( ) [ ...
[ -0.4421660304069519, 0.475303590297699, 0.8522881865501404, 0.12184656411409378, -0.6553717255592346, 0.1546386033296585, -0.4766756594181061, -0.6919494867324829, 0.3279533386230469, 0.8304638266563416, 0.1320648491382599, 0.49842798709869385, -0.36660924553871155, 0.1163468137383461, -...
def next _ iteration ( self ) - > none : # noqa : d102 self. _ iteration + = 1 if self. _ iteration > self. _ restart _ iteration : self. _ iteration = 0 logger. debug ( " perform a restart. " ) self. _ probability = self. _ min _ probability + ( 0. 5 * ( self. _ max _ probability - self. _ min _ probability ) * ( 1 + ...
[ -0.39470428228378296, 0.514038622379303, 0.30787622928619385, -0.18927082419395447, -0.5820688009262085, 0.005878083873540163, 0.31190717220306396, 0.28212520480155945, -0.49579083919525146, 0.5627998113632202, 0.19909317791461945, 0.41731464862823486, -0.3745322823524475, -0.2456036061048...
def compute _ laplacian ( self ) : self. deg = np. diag ( self. w. sum ( axis = 1 ) ) self. l = self. deg - self. w
[ -0.19358819723129272, -0.31758761405944824, 0.21490992605686188, -0.7731285691261292, -0.5014817118644714, 0.3147725462913513, 0.7773150205612183, 0.9875110387802124, 0.19407035410404205, -0.07321074604988098, 0.18351887166500092, 0.13694056868553162, 0.23752740025520325, 0.192688539624214...
def main ( scores _ dir, stats _ dir, odds _ dir, ultimate _ dir, root _ dir, home _ metric, away _ metric, unique _ matches _ required, larger _ is _ better, min _ weeks, constructor, filename, ultimate ) : if ultimate : # load data locations ultimate _ names = [ os. path. join ( root _ dir, ultimate _ dir, " ultimate...
[ -0.648759663105011, 0.13790160417556763, 1.0587894916534424, -0.08444804698228836, 0.10053745657205582, 0.32104456424713135, 0.8244332075119019, 0.5957939624786377, -0.4364528954029083, 0.11539717763662338, 0.19687552750110626, 0.4144899845123291, 0.47092702984809875, -0.36964040994644165,...
def test _ email _ works ( tmpdir ) : email _ server, maildir = generate _ email _ server ( tmpdir ) email _ server. start ( ) time. sleep ( 3. 0 ) # send a test email email _ sent = actions. send _ email ( " test @ test. org ", " hello ", " this is a test ", [ " test @ test. org " ], " 127. 0. 0. 1 ", none, none, " sa...
[ -0.4845408797264099, 0.12677185237407684, 0.5803440809249878, -0.29297322034835815, 0.8147490620613098, 0.5973072648048401, 0.24385006725788116, -0.0016310762148350477, -0.15163390338420868, -0.6411994695663452, -0.5716394782066345, 0.7327053546905518, -0.534342348575592, -0.50540208816528...
def search ( self, word ) : return self. searchhelper ( word, self. root )
[ -0.1650431752204895, 0.20759347081184387, 0.10577329248189926, 1.1786398887634277, -0.35677310824394226, 0.18966791033744812, 0.41602402925491333, -1.0670863389968872, -0.4420507848262787, -0.8076987266540527, 0.36761659383773804, 0.12965552508831024, -1.0952728986740112, 0.617547690868377...
def _ app _ samp _ entropy ( self, x, order, metric ='chebyshev ', approximate = true ) : _ all _ metrics = kdtree. valid _ metrics if metric not in _ all _ metrics : raise valueerror ('the given metric ( % s ) is not valid. the valid'' metric names are : % s'% ( metric, _ all _ metrics ) ) phi = np. zeros ( 2 ) r = 0....
[ -0.38369402289390564, -0.0212808046489954, 0.7850725054740906, 0.2973901331424713, -1.271850347518921, 0.13326232135295868, -0.05770865082740784, 0.10962551832199097, -0.22259311378002167, 1.3973257541656494, 0.35662657022476196, 0.4936812222003937, 0.0716780349612236, 0.15985937416553497,...
def _ _ init _ _ ( self, line ) : # break up data from the line try : [ date, op, high, low, close, vol, adjusted _ close ] = line. rstrip ( ). split ( ',') except valueerror : self. date = none return # convert numeric values to floating points and assign data to this object self. date = date self. open = float ( op )...
[ 0.3359755277633667, -0.47431159019470215, 0.5746639370918274, 0.22477781772613525, 0.09704462438821793, 0.10683853924274445, -0.11621752381324768, -0.19858478009700775, -0.604193389415741, -0.5252884030342102, 0.3488275110721588, -0.1022627204656601, 0.09188856929540634, -0.129275918006896...
def _ query _ result _ path ( dump _ directory ) : return os. path. join ( dump _ directory, " random _ forest _ query _ results. csv " )
[ -0.44283780455589294, 0.40287867188453674, 0.13786177337169647, -0.10471417754888535, 0.4928215742111206, 0.6745565533638, 0.42578932642936707, -0.3049739599227905, -0.2888466715812683, -0.8993648886680603, 0.47936907410621643, -0.5390046238899231, 0.022533448413014412, -0.1938149482011795...
def number _ of _ layers ( self ) : return len ( self. _ layers ) + 1
[ -0.5351093411445618, 0.6328493356704712, 0.3895772695541382, 0.20917487144470215, 0.4377117156982422, -0.06087058037519455, 0.5036145448684692, -0.35392364859580994, 0.5265814065933228, -1.2116081714630127, -1.177932858467102, 0.1979808807373047, 0.19828049838542938, 0.49941444396972656, ...
def displaytalkwhisper ( self, fromid, avatarname, rawstring, mods ) : sender = base. cr. identifyavatar ( fromid ) if sender : chatstring, scrubbed = sender. scrubtalk ( rawstring, mods ) else : chatstring, scrubbed = self. scrubtalk ( rawstring, mods ) sender = self sfx = self. soundwhisper # mpg we need to identify ...
[ 0.12828803062438965, -0.5391083359718323, 0.6813780665397644, -0.5596817135810852, -1.252223014831543, 0.02780722826719284, 0.5122872591018677, -0.5331636071205139, 0.7778705954551697, -0.4068448841571808, 0.3307465612888336, 1.068690538406372, -0.08301981538534164, 0.5283088088035583, 0...
def jsonable ( value ) : if isinstance ( value, list ) : return [ jsonable ( i ) for i in value ] elif isinstance ( value, base ) : log. debug ( f " preparing = { value } " ) retval = dict ( ) mapper = sql. inspect ( value. _ _ class _ _ ) columns = [ c. key for c in mapper. columns if c. key not in value. _ hidden _ a...
[ -1.2887794971466064, -0.06667514145374298, 0.8680614233016968, -0.3208247125148773, -0.8516112565994263, -0.7511643171310425, -0.20831897854804993, -0.7704772353172302, -0.26502537727355957, 0.4048031270503998, -1.2445814609527588, 0.12059156596660614, 0.1713186502456665, 0.804171860218048...
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. openapi _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att...
[ -1.0918314456939697, -0.2934507131576538, 0.8755732774734497, -0.9140207171440125, -0.5602613091468811, -0.39216169714927673, 0.5610913038253784, -0.716509222984314, -0.11130552738904953, -0.010403653606772423, -0.6907275915145874, -0.47398683428764343, 0.07651932537555695, 0.7405382394790...
def get _ screenshot _ as _ base64 ( self ) : return self. screenshot64
[ -1.1328903436660767, -0.9222394824028015, 0.5504058599472046, 1.3986175060272217, -0.20698866248130798, 0.04316962882876396, -1.3609659671783447, -0.00579190393909812, 0.5479409694671631, -0.23413100838661194, 1.0114349126815796, 0.289823442697525, 0.0545760877430439, -0.06501990556716919,...
def _ reversecoordinates ( self, x, y ) : return x + self. xc, self. yc - y
[ -0.11090035736560822, -0.5542553067207336, 0.7042059302330017, -1.559883952140808, 0.23656341433525085, -0.044956136494874954, -1.0356031656265259, -0.6963385343551636, -0.869347870349884, -0.5205347537994385, -0.21679644286632538, 0.3999331593513489, 0.02674335241317749, -1.58435142040252...
def test _ single _ plot _ 05 ( self ) : inch _ per _ unit = 0. 5 x _ units = 4 y _ units = 4 left = 1 bottom = 1 width = 2 height = 2 figsize, coords = pt. make _ coordinates ( inch _ per _ unit, x _ units, y _ units, left, bottom, width, height ) self. assertequal ( figsize, ( 2, 2 ) ) self. assertequal ( coords, [ (...
[ -0.007665769662708044, 0.9940977692604065, 0.42094886302948, -0.1974388062953949, -0.2034182995557785, 1.2611486911773682, 1.297592043876648, -0.38706254959106445, -0.8340170979499817, -1.1042145490646362, -0.5827977061271667, -0.3108934164047241, -0.18980596959590912, -0.5407689213752747,...
def parse _ rosettascript ( self, protocol _ string, starting _ pose = none ) : tag = rosetta. utility. tag. tag. create ( protocol _ string ) if starting _ pose is none : protocol = self. parse _ protocol _ tag ( tag ) else : protocol = self. parse _ protocol _ tag ( starting _ pose, tag ) return rosettascriptwrapper ...
[ 0.20683227479457855, -0.7747613191604614, 0.19808173179626465, 0.50995934009552, -0.3405800759792328, -0.1115068793296814, -0.22339946031570435, -0.49229514598846436, -0.42133137583732605, -0.23124480247497559, -0.01904498040676117, 0.3580904006958008, -0.6846518516540527, -0.3475590944290...
def set _ altitude _ cmd ( self, cmd ) : self. altitude _ cmd = cmd
[ 0.27622637152671814, -1.7337311506271362, 0.6383813619613647, 0.2562158405780792, 0.13432273268699646, 1.9287394285202026, 0.09933207184076309, -0.1943204253911972, 0.12820079922676086, -0.17894156277179718, 0.3745889961719513, 1.3089537620544434, 0.5149407386779785, 1.1714816093444824, ...
def get _ vocabs ( language ='eng ', stag _ type ='ud') : vocab _ types = ['words ','pos ','lemmas ','plemmas ','labels ','stags ','predicates'] vocabs = { } for vocab _ type in vocab _ types : if vocab _ type = ='stags': fn ='data / { } / vocab / stags. { }. txt '. format ( language, stag _ type ) else : fn ='data / {...
[ -0.1883002072572708, 0.08441145718097687, 0.554186224937439, -0.35222139954566956, -0.37825825810432434, -0.1835695505142212, -0.6476401090621948, -0.411245733499527, -0.4440380930900574, 0.11149153113365173, -1.0379093885421753, 0.29420197010040283, 0.3200448155403137, 0.922470211982727, ...
def _ _ repr _ _ ( self ) : return f " { type ( self ). _ _ name _ _ } ( { self. locator! r } ) "
[ -1.2735079526901245, -1.8844692707061768, 0.4828239381313324, -0.9889482259750366, -0.4956037700176239, 0.42914772033691406, 0.1998761147260666, -0.1461229771375656, 0.900276780128479, 0.6559082865715027, 0.44029560685157776, 0.537726879119873, 0.3414282500743866, -0.47047463059425354, 0...
def mergefromstring ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.07735239714384079, -0.4030935764312744, 0.3827867805957794, 0.5413704514503479, 0.437933087348938, 0.11940450966358185, -0.3896506428718567, -0.23409034311771393, 0.22573520243167877, -1.0539062023162842, -1.0368655920028687, -0.26298800110816956, -1.1176848411560059, -0.215989649295806...
def test _ batch _ redetect _ with _ one _ face ( self ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : detection = detector. detectone ( image = vlimage _ one _ face ) redetect = detector. redetect ( images = [ imageforredetection ( image = vlimage _ one _ face, bbox...
[ -0.13125964999198914, -0.03307526186108589, 0.45895934104919434, 1.2583787441253662, 1.542724609375, -0.2602023780345917, 0.38680902123451233, -0.056243740022182465, 0.9176864624023438, -0.19366413354873657, -0.6282793283462524, -0.5227006077766418, 0.04961119964718819, 1.5334933996200562,...
def _ new _ dataset _ with _ indices ( self, indices _ cache _ file _ name : optional [ str ] = none, indices _ buffer : optional [ pa. buffer ] = none, fingerprint : optional [ str ] = none, ) - > " dataset " : assert ( indices _ cache _ file _ name is not none or indices _ buffer is not none ), " at least one of indi...
[ 0.00960234459489584, 0.09632200002670288, 0.4091326892375946, -0.011707852594554424, -1.0588597059249878, 0.24007609486579895, 0.010605626739561558, 0.09930001199245453, 0.3887398838996887, -0.4615080952644348, 0.6354852914810181, 0.04464181140065193, -0.331417977809906, -0.902620494365692...
def _ _ contains _ _ ( self, k ) : return os. path. isfile ( k )
[ 0.9870923757553101, -0.631344735622406, 0.6448478102684021, 0.4051266610622406, -0.34792521595954895, 1.0231245756149292, -0.24170856177806854, 0.6498424410820007, -0.5215388536453247, -0.3259308636188507, 0.42904821038246155, -0.8956461548805237, 0.4242357313632965, 0.03253449499607086, ...
def get _ tile _ north _ neighbor ( self, tile ) : return self. _ get _ tile _ neighbor ( tile, " north " )
[ -0.4083564877510071, 0.21429474651813507, 0.3624061644077301, 0.8964627385139465, -1.3190287351608276, 0.6404724717140198, -0.005918449256569147, -1.9189307689666748, -0.28463980555534363, 0.3120512068271637, -0.5119607448577881, 0.7320544123649597, 0.03710085526108742, 0.5109589695930481,...
def get _ model ( ) : # define experts : each expert is simple linear model experts = [ dense ( 1, " linear " ) for _ in range ( n _ experts ) ] # mixture of linear experts mole = mixtureofexpertslayer ( expert _ layers = experts, add _ dropout = false ) # build model input _ layer = input ( shape = ( 1, ) ) output _ l...
[ 0.046116288751363754, -0.4729711711406708, 0.5829406976699829, 0.35061001777648926, -0.2148285210132599, 0.8436110019683838, -0.2303580939769745, 0.32140856981277466, -0.031067349016666412, -0.30672964453697205, -0.6448851227760315, 0.141716867685318, 0.19060258567333221, 0.160578399896621...
def get ( org _ id ) : try : # keep old response until ui is updated if ( request. args. get ('new ','false') ). lower ( )! ='true': return jsonify ( {'entities': affiliationservice. find _ visible _ affiliations _ by _ org _ id ( org _ id ) } ), http _ status. http _ 200 _ ok # get affiliation identifiers and the urls...
[ -0.7285739779472351, 0.17561963200569153, 0.6146740317344666, -0.41931435465812683, -0.5974113941192627, -0.17979596555233002, 0.11251892149448395, 0.2344784438610077, 0.3885475993156433, 1.2989487648010254, 0.08271375298500061, 0.5720909833908081, 0.12916606664657593, 1.2064776420593262, ...
def find _ machine _ state ( conn ) : try : verify _ db _ machine _ state ( conn ) # first make sure our db tables are all in order. result = r. db ('wanwipe'). table ('machine _ state'). get _ all ( get _ boot _ id ( ), index ='boot _ id'). run ( conn ) for document in result : # look over the returned documents. ther...
[ 0.17783910036087036, 0.2801569998264313, 0.35807180404663086, 0.04223695769906044, -0.14521294832229614, -0.344589501619339, -0.21659719944000244, -0.788810133934021, -0.85104900598526, -0.7305354475975037, 0.6419498324394226, -1.0285519361495972, -1.1616569757461548, 0.6826226711273193, ...
def create _ dummy _ placement _ literal ( ) : value = placement _ literals. server type _ signature = computation _ types. placementtype ( ) return value, type _ signature
[ -0.40923061966896057, -0.5840843319892883, 0.38302043080329895, -1.043168306350708, 0.40636730194091797, 0.3910067677497864, 0.6689020991325378, -0.13016377389431, 0.04444156959652901, 0.5722048282623291, -0.9599549770355225, -0.2994939982891083, -0.2829572260379791, 0.5246539115905762, ...
def get _ all _ possible _ actions ( ) : return list ( range ( 0, len ( action _ lookup ) ) )
[ -0.5055996775627136, -0.3633559048175812, 0.19755779206752777, 1.9466748237609863, 0.9379039406776428, 0.3604583144187927, -0.3989394009113312, 0.49766308069229126, 0.653738260269165, -0.3102690875530243, -0.3933393359184265, 0.5437209010124207, 0.11402292549610138, -0.14603273570537567, ...
def _ _ init _ _ ( self, make, model, year ) : self. make = make self. model = model self. year = year self. odometer _ reading = 0
[ -0.3925814628601074, -0.35932183265686035, 0.6168290972709656, 0.06913606077432632, -0.2608209550380707, 1.1810492277145386, -0.8339678049087524, 0.06937828660011292, -0.2941046953201294, -0.018677420914173126, 0.24227482080459595, 0.07098428905010223, -0.18245546519756317, 0.0879476591944...
def frac ( dataframe, fraction ) : return dataframe. sample ( frac = fraction )
[ 0.39953577518463135, 0.5183377265930176, 0.1596098691225052, 0.3137834072113037, -0.044064946472644806, -0.9044442176818848, 0.40947696566581726, -0.5709564089775085, -0.28400856256484985, -1.0851401090621948, 1.2843290567398071, 0.1068822517991066, 0.24209009110927582, -1.2589830160140991...
def double _ reflection _ method ( pts, r0 = ( 1, 0, 0 ) ) : pts = np. array ( pts ) r0 = norm ( np. array ( r0 ) ) vecs = pts [ 1 : ] - pts [ : - 1 ] t0 = vecs [ 0 ] normals = [ r0 ] for index, v1 in enumerate ( vecs [ : - 1 ] ) : c1 = v1. dot ( v1 ) rl = r0 - ( 2 / c1 ) * ( v1. dot ( r0 ) ) * v1 tl = t0 - ( 2 / c1 ) ...
[ -0.8765646815299988, -0.5715014934539795, 0.7367777228355408, -0.3655921220779419, -0.7873357534408569, -0.2172086238861084, 0.5037059187889099, -0.06259600073099136, -0.5775660872459412, 1.3196184635162354, -0.5921018123626709, -0.0086776502430439, 0.008948576636612415, 0.6019319295883179...
def test _ cancelling _ free _ class ( self ) : event _ with _ cost = baker. make _ recipe ('booking. future _ ev ', cost = 10 ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = event _ with _ cost ) booking. free _ class = true booking. save ( ) booking. confirm _ space ( ) self. assertt...
[ 0.14280226826667786, 0.9621444940567017, 0.47627460956573486, 1.3020159006118774, -0.5691985487937927, 1.1148062944412231, -0.15262573957443237, 0.6556876301765442, -0.024633506312966347, -0.23811766505241394, -0.5492151379585266, -0.8333909511566162, 0.20240288972854614, 0.947850108146667...
def interp _ prop ( self, prop, psfcoords, imshape, compress = 1 ) : x, y = n. transpose ( psfcoords ) xi = x yi = y xo = n. arange ( 0. 0, round ( imshape [ 0 ] ), round ( compress ) ) yo = n. arange ( 0. 0, round ( imshape [ 1 ] ), round ( compress ) ) rgrid = nat. natgrid ( xi, yi, xo, yo ) prop _ int = rgrid. rgrd ...
[ -0.147769495844841, 0.09779171645641327, 0.6122876405715942, -0.3726850748062134, 0.08341208845376968, -0.7677196860313416, -0.18577110767364502, -0.010653689503669739, -1.1470296382904053, 0.01031259074807167, 1.1881531476974487, -0.28289031982421875, -1.1206010580062866, -0.7652889490127...
def _ upstream ( self ) - > list ['dataset'] :
[ -1.47163724899292, -0.055082179605960846, 0.5025805234909058, -0.06218535453081131, -0.7405192852020264, 0.8519037365913391, -0.3549133837223053, 0.9882684350013733, 0.825529932975769, -0.43631643056869507, -0.17522165179252625, 0.7928131818771362, 1.0991257429122925, -0.1828715205192566, ...
def insert _ value ( self, value, location ) : self. game _ mat [ location [ 0 ] ] [ location [ 1 ] ] = value
[ -0.6533258557319641, -0.19640794396400452, 0.48733311891555786, -0.8026934266090393, 0.46108368039131165, 0.6929485201835632, 0.132550910115242, 0.19023366272449493, -0.6117730736732483, 0.7747213840484619, -0.12880957126617432, -0.34406158328056335, -0.009908958338201046, -0.5293579101562...
def get ( self, context, key _ id, metadata _ only = false ) : if not key _ id : raise exception. keymanagererror ('key identifier not provided') resp = self. _ do _ http _ request ( self. _ session. get, self. _ get _ resource _ url ( key _ id ) ) if resp. status _ code = = requests. codes ['not _ found'] : raise exce...
[ -0.1720140278339386, -0.18529926240444183, 0.5841016173362732, 0.26463815569877625, 0.06619434803724289, -0.20248956978321075, -1.3938416242599487, -0.30302998423576355, 0.3111998736858368, 0.1440354436635971, 0.39136236906051636, 1.2909626960754395, -0.10167458653450012, 0.524422943592071...
def getprojection ( self ) : return self. projection. cvalues ( )
[ -0.3533056080341339, -0.24447807669639587, 0.385048508644104, 1.0444908142089844, 0.053875163197517395, -0.6023349761962891, -0.6754584312438965, -0.33818429708480835, -0.3511529862880707, 0.4313504695892334, -0.05338737368583679, -0.1510523557662964, -0.9585059285163879, -0.22208617627620...
def on _ epoch _ begin ( self, net, dataset _ train = none, dataset _ valid = none, * * kwargs ) :
[ -0.3120121359825134, 0.14623361825942993, 0.42085492610931396, -0.02246285229921341, 0.5202104449272156, 0.1313738226890564, -0.4877208471298218, 0.7190378308296204, 0.19656571745872498, -0.12193591892719269, -0.6183429956436157, 0.43352100253105164, 0.9227358102798462, 0.1288444548845291,...
def enable _ proctitle _ on _ current ( ) : global _ enabled _ enabled = true
[ 1.1334177255630493, -1.0717291831970215, 0.46217218041419983, 0.24710533022880554, -0.23515024781227112, 1.0681390762329102, -0.489852637052536, 0.7593925595283508, 0.03688240051269531, 0.5040981769561768, -0.04578313231468201, 1.3935028314590454, -1.475792407989502, -0.5459849834442139, ...
def _ find _ num _ features ( conf, arguments ) : arguments. num _ features = 0 for roi _ type, type _ conf in conf ['roi _ options']. items ( ) : if type _ conf ['include'] : plus = type _ conf ['num _ bins'] if isinstance ( plus, list ) : plus = np. sum ( plus ) if roi _ type = = " quarter _ img " : plus * = 4 argume...
[ 0.25647592544555664, 0.031333062797784805, 0.546065092086792, 0.19755716621875763, 1.225161075592041, -0.8848204016685486, 1.379930019378662, 0.5319073796272278, -0.060860246419906616, -0.0033840176183730364, -0.9963856935501099, -0.05557949095964432, -0.26520979404449463, 0.69800859689712...
def old _ format _ basis _ for _ cfour ( molrec, puream ) : text = [ ] for iat, elem in enumerate ( molrec ['elem'] ) : text. append ( " " " { } : cd _ { } " " ". format ( elem. upper ( ), iat + 1 ) ) text. append ('' ) text. append ('' ) text ='\ n '. join ( text ) options = collections. defaultdict ( lambda : collect...
[ -0.006418210919946432, -0.675996720790863, 0.6139510869979858, -0.8558563590049744, -0.4196399748325348, -0.011624577455222607, 0.0029033117461949587, 0.2688901722431183, -0.08339110761880875, 0.3887704312801361, -0.13512444496154785, 0.09375110268592834, 0.2634052336215973, 0.788543701171...
def union ( f, g ) : res = f. copy ( ) res. disjunct ( g ) res. minimize ( ) return res
[ -0.22809533774852753, 0.3111831843852997, 0.25030410289764404, 0.4499117136001587, -0.5272973775863647, -0.7030348181724548, -0.31887421011924744, 1.0817968845367432, 0.017270181328058243, 0.021090252324938774, 0.09109000861644745, -0.0024561805184930563, 0.21131515502929688, -1.3652137517...
def get _ point _ array ( poly, l _ dim = none ) : try : pvw = pv. wrap ( poly ) except : pvw = poly conn = pvw. extract _ cells ( 0 ). n _ points a _ points = np. zeros ( ( pvw. n _ cells, conn, 3 ) ) for i in range ( pvw. n _ cells ) : points _ cell = pvw. extract _ cells ( i ). points for j in range ( conn ) : a _ p...
[ -0.15745538473129272, -0.1979200839996338, 0.6664655804634094, 0.6230161190032959, -0.12702666223049164, 0.21043962240219116, -0.32116052508354187, -0.21537445485591888, 0.37445878982543945, 0.8895590305328369, 0.4242700934410095, 0.05626726523041725, -0.06792686134576797, -0.3832806050777...
def parse _ file ( self, the _ file ) : # packets come in out of order, order them init _ packets = [ ] for line in the _ file : p = packet ( ) p. parse ( line ) init _ packets. append ( ( p. time, p ) ) init _ packets. sort ( lambda x, y : int ( 10000 * ( x [ 0 ] - y [ 0 ] ) ) ) self. packets = init _ packets
[ 0.11444497108459473, 0.1441224366426468, 0.32549718022346497, -0.0863606184720993, 0.3520853817462921, -0.3385343551635742, -0.4064379930496216, 0.6857880353927612, -0.3368130624294281, -0.35350164771080017, -0.5875841379165649, -0.4657779335975647, 0.18903748691082, 1.112250804901123, -...
def get _ random _ opinion ( ) : while true : r1 = mpmath. rand ( ) r2 = mpmath. rand ( ) if r1 + r2 < 1 : return opinion ( r1, r2, mpmath. mpf ( " 1 " ) - ( r1 + r2 ), " 1 / 2 " )
[ -0.588583767414093, -0.6221405863761902, 0.40155187249183655, -0.3292556703090668, -0.5743020176887512, 0.33444273471832275, 0.1201929897069931, -0.4197806417942047, -0.023275649175047874, -0.24362383782863617, 0.2588793933391571, 0.0055151442065835, -1.1889625787734985, -0.785638093948364...
def getstartindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ getstartindex ( self )
[ 0.002529016463086009, -0.18150436878204346, 0.44055256247520447, 0.223633274435997, -0.19569753110408783, 0.9290242791175842, -0.204093798995018, 0.6619400382041931, 0.21564099192619324, -0.4396352171897888, -0.9200000166893005, 1.0800169706344604, -0.14953488111495972, -1.2803508043289185...