text
stringlengths
25
2.19k
embedding
listlengths
768
768
def resolveimports ( self, dependencies ) : if not isinstance ( dependencies, dict ) : raise typeerror ( " module dependencies must be a dictionary " ) resolveddependencies = { } for modulepath, moduledepenendencies in dependencies. items ( ) : # compute final package name of module. modulename = self. getpackagename (...
[ -1.0574240684509277, -0.4788569211959839, 0.7350675463676453, -0.4959050714969635, -0.14387980103492737, 0.061761755496263504, -0.16744883358478546, -0.4519779086112976, -0.08400920033454895, 0.04889523610472679, -0.7575159668922424, -0.8580901026725769, 0.00002396763738943264, 0.420379310...
def execute _ sp _ row0 ( self, sql : str, * params ) - > optional [ dict [ str, any ] ] : cursor = self. _ _ conn. cursor ( as _ dict = true ) cursor. execute ( sql, params ) rows = cursor. fetchall ( ) cursor. close ( ) n = len ( rows ) if n = = 1 : return rows [ 0 ] elif n = = 0 : return none else : raise resultexce...
[ -0.03648776188492775, 0.707129180431366, 0.662888765335083, 1.0493159294128418, 0.07674466073513031, -0.6588302850723267, -0.569843590259552, -0.4088146984577179, 0.2359042763710022, 0.16412408649921417, 0.9448696374893188, 0.08826101571321487, -0.18831077218055725, 1.021584391593933, -0...
def valid _ temp ( cls, new _ temp ) : if cls. min _ temp < = new _ temp < = cls. max _ temp : return true # else return false
[ -0.3626959025859833, -1.334346055984497, 0.4679768979549408, 0.3452226221561432, -0.6161388158798218, 0.651803195476532, -0.751430094242096, 0.010108215734362602, -0.6264966130256653, 0.19016095995903015, -0.9779678583145142, -0.049502596259117126, -0.6524513959884644, -0.3962070047855377,...
def on _ key _ release ( self, key, modifiers ) : if key = = arcade. key. up or key = = arcade. key. w : self. accel = 0 elif key = = arcade. key. down or key = = arcade. key. s : self. accel = 0 elif key = = arcade. key. space : self. brake = 0 elif key = = arcade. key. left or key = = arcade. key. a : self. steer = 0...
[ -0.29131385684013367, -0.12077537178993225, 0.9379688501358032, -0.4545617997646332, 0.39697885513305664, -0.3366626501083374, -0.5357210636138916, -0.13656282424926758, 0.2942095100879669, 0.4455430805683136, 0.06224198639392853, -0.47529178857803345, -0.3467375338077545, 0.37863749265670...
def printvectorfile ( matrix ) : # print 1st line # # import pdb ; pdb. set _ trace ( ) num _ row = len ( matrix ) print ('% d : w'% num _ row ) # print vectors # weight = 1 / float ( num _ row ) dim = len ( matrix [ 0 ] ) index = 0 while index < num _ row : dim = len ( matrix [ index ] ) print ('%. 23f % d :'% ( weigh...
[ 0.7218735814094543, -0.19016671180725098, 0.7181524038314819, 0.23530425131320953, 0.09470449388027191, 0.90025794506073, 0.9520798325538635, -0.32128751277923584, -0.7024932503700256, 0.49694713950157166, 0.6342354416847229, 0.4094083607196808, -0.23191295564174652, 0.7249243855476379, ...
def load _ backend ( name ) : if name = = " tf " : # treat the tensorflow backend differently, to # isolate the import of tensorflow from. tfbackend import tfbackend return tfbackend ( ) if name in supported _ backends : backend = supported _ backends [ name ] ( ) return backend raise valueerror ( " backend'{ }'is not ...
[ 0.6870207786560059, 0.22912080585956573, 0.3465343415737152, 0.12358050048351288, -0.3591975271701813, -0.4325943887233734, -0.5403341054916382, -0.5633825063705444, 0.21105201542377472, 0.5628122091293335, -0.38010239601135254, -0.12109268456697464, -0.8659054636955261, -0.192398756742477...
def get _ style ( self, name ) : return self. document. get _ style _ range ( name, 0, len ( self. document. text ) )
[ -0.9077919721603394, -0.31589949131011963, 0.4213334023952484, 0.3139840364456177, -1.2393293380737305, -0.6284313201904297, -0.507239818572998, -0.9355934858322144, -0.07562766224145889, 0.7970690131187439, -0.43440914154052734, 0.07976800948381424, -1.2239848375320435, -0.458486557006835...
def install ( ) : shell ( " pip install - r requirements. txt " )
[ -0.1658937633037567, -0.9087830781936646, 0.4163285791873932, 0.2372114360332489, 0.7712475657463074, 1.1990752220153809, 0.02153552509844303, 1.2849611043930054, -0.6398995518684387, 1.0357844829559326, -0.4426462650299072, -0.8687529563903809, -0.2192329615354538, 0.7995479106903076, -...
def random _ cost ( low = 1, high = 150000 ) : return random. uniform ( low, high )
[ -0.7061176300048828, -0.12110743671655655, 0.3871504068374634, -0.7996496558189392, -0.3535272777080536, 0.09263844043016434, -0.7238625884056091, 0.2477084845304489, 0.49876999855041504, -0.06295646727085114, -0.4560824930667877, 0.7092906832695007, -0.47264719009399414, -0.58651900291442...
def _ _ str _ _ ( self ) : return " ". join ( [ str ( x ) for x in self. id ] )
[ -0.21630877256393433, -1.493767499923706, 0.5067924857139587, -1.0724456310272217, 0.4848399758338928, 1.0511209964752197, -1.8632923364639282, -0.45454141497612, 0.31629523634910583, 0.31430721282958984, -0.17370642721652985, 0.5608498454093933, -0.7561268210411072, -0.6539268493652344, ...
def actioncleanupbefore ( self ) : return self. _ killallvboxprocesses ( ) ;
[ 0.36636194586753845, -0.6548367142677307, 0.5530720353126526, 0.6906236410140991, 0.8286275267601013, -0.5314612984657288, 0.36822617053985596, -0.8506405353546143, 0.7172566652297974, 0.4665953516960144, 0.07929519563913345, 0.47393733263015747, -0.4698047637939453, -0.008886867202818394,...
def build _ maze ( filename ) : infile = open ( filename, " r " ) # read the size of the maze. nrows, ncols = read _ value _ pair ( infile ) maze = maze ( nrows, ncols ) # read the starting and exit positions. row, col = read _ value _ pair ( infile ) maze. set _ start ( row, col ) row, col = read _ value _ pair ( infi...
[ -0.5318973064422607, -0.8794245719909668, 0.41356173157691956, 0.2369648516178131, -0.5470587015151978, 0.45269501209259033, 1.0200589895248413, 0.8978095054626465, -0.25230762362480164, -0.17954197525978088, 0.4315118193626404, -0.36942780017852783, -0.6288005113601685, -0.511659383773803...
def remove _ stopwords ( words ) : stopwords = nltk. corpus. stopwords. words ( " english " ) words = [ w for w in words if w not in stopwords ] return words
[ -0.8496556878089905, -0.3172864615917206, 0.031420834362506866, 0.06632459908723831, -0.09582455456256866, 0.4398561716079712, -0.7382516264915466, 0.04673956707119942, -0.26448386907577515, 1.0869063138961792, -0.8238977789878845, -0.3179212212562561, -0.9539708495140076, 0.91438537836074...
def number _ of _ i ( word ) : return word. count ( " l " )
[ -0.13127382099628448, 0.47989755868911743, 0.26830077171325684, -0.28902971744537354, -0.3629092276096344, -0.20245173573493958, 0.28144875168800354, 0.6863868832588196, -0.21236544847488403, 0.19739583134651184, -1.1803091764450073, -0.779710054397583, 0.06624966859817505, -0.083742327988...
def build _ loader _ model _ grapher ( args ) : train _ transform, test _ transform = build _ train _ and _ test _ transforms ( ) loader _ dict = {'train _ transform': train _ transform,'test _ transform': test _ transform, * * vars ( args ) } loader = get _ loader ( * * loader _ dict ) # set the input tensor shape ( i...
[ -0.008451145142316818, 0.5486565232276917, 1.0020166635513306, 0.08755198121070862, 0.302797794342041, 0.13646896183490753, 0.5241897702217102, -0.28724372386932373, 0.027127254754304886, -0.14524197578430176, 0.47001203894615173, 0.37189844250679016, 0.46733590960502625, 0.188793584704399...
def load _ covobs _ txtfile ( filepath, name = none ) : with open ( filepath,'r') as f : lines = f. readlines ( ) if name is none : # get name without extension name = os. path. splitext ( os. path. basename ( filepath ) ) [ 0 ] tmp = np. fromstring ( lines [ 1 ], sep ='' ) # read parameters and breaks nmax = int ( tmp...
[ 0.23667393624782562, -0.2326478362083435, 0.7642427086830139, -0.10545149445533752, -1.0206260681152344, 0.5837893486022949, -0.5148493051528931, 0.1211337149143219, -0.4392656087875366, 0.8689110279083252, -0.13206060230731964, -0.027507223188877106, -0.10529538244009018, -0.8963345885276...
def test _ config _ failure ( self ) : with assert _ setup _ component ( 0, device _ tracker. domain ) : setup _ component ( self. hass, device _ tracker. domain, { device _ tracker. domain : { device _ tracker. conf _ consider _ home : - 1 } } )
[ -0.2071593552827835, 0.7201264500617981, 0.19254860281944275, 0.2167833298444748, 1.212565541267395, 0.636214554309845, 0.7771523594856262, 0.26111170649528503, -0.16732628643512726, -0.3758620321750641, 0.009530377574265003, -0.5079155564308167, 0.2932678759098053, 0.5461981296539307, 1...
def set _ loads ( self, mean = 100, standard _ deviation = 20, power _ factor = 95 ) : # collect all load elements loads = self. app. getcalcrelevantobjects ('*. elmlod') # create keys for loads dictionary form all names of loads keys = [ ] for key in loads : keys. append ( key. loc _ name ) # create values for keys dr...
[ 0.14068929851055145, -0.7165966629981995, 0.5339429974555969, -0.40849268436431885, -0.3587667942047119, 1.1288560628890991, -0.710252583026886, -0.581797182559967, -0.5979753732681274, 0.15308967232704163, -0.561303436756134, 0.042728763073682785, 0.6200416088104248, 0.45744165778160095, ...
def split ( self, file _ path, col _ name, target, sep ='\ t ', index _ col = 0, nan _ strategy ='train ', * * kwargs ) : # assumes index corresponds to self. common _ subjects df = self. _ read _ behav _ file ( file _ path = file _ path, sep = sep, index _ col = index _ col, * * kwargs ) common _ idx = df. index. isin...
[ -0.1680840253829956, -0.24502761662006378, 0.7269949913024902, -0.18464797735214233, 0.3992413282394409, -0.1781700998544693, 0.3280841112136841, 0.0808669924736023, -0.27597394585609436, 0.4169693887233734, 0.5208200216293335, 1.376530408859253, -0.2915278375148773, -0.7932490110397339, ...
def get _ bbox _ from _ grid _ spec ( center _ x : float, center _ y : float, cell _ size : tuple [ float, float ], cols : int, rows : int ) - > boundingbox2d : half _ width = cell _ size [ 0 ] * cols / 2 half _ height = cell _ size [ 1 ] * rows / 2 return boundingbox2d ( minx = center _ x - half _ width, maxx = center...
[ 0.1601782888174057, -0.1314835548400879, 0.629234790802002, -0.22905206680297852, -0.04746349900960922, -1.0679116249084473, -0.45303815603256226, -0.06298908591270447, -0.3789733052253723, -0.1035824790596962, 0.43109720945358276, 0.8701792359352112, 0.5664643049240112, -0.093799874186515...
def index _ path ( self ) : index _ path = [ ] node = self while node. _ parent is not none : index _ path. append ( node. index ( ) ) node = node. parent ( ) index _ path. reverse ( ) print index _ path return index _ path
[ -0.5116539001464844, -0.38439443707466125, 0.6914187669754028, 0.7310107946395874, 0.41189828515052795, 0.10475163161754608, 1.6287246942520142, 0.2924313247203827, 0.031403571367263794, 0.2855357229709625, -0.04226246103644371, 0.3837917149066925, -0.65300452709198, -0.028786879032850266,...
def set _ meters _ per _ px ( self, px ) : if px and px > 0 : self. meters _ per _ px = px else : pass
[ -0.23994694650173187, -0.30401331186294556, 0.555763304233551, -0.025052109733223915, -0.35164880752563477, 1.6811470985412598, -0.689363956451416, -0.4807984232902527, 0.5478710532188416, -0.6618785262107849, 1.1443216800689697, -1.335091233253479, -0.9090591669082642, 0.7453426122665405,...
def spls1 ( x, y, l, lambda _ val ) : # to do return [ b, w, p, q ]
[ 0.5008111596107483, -0.047822918742895126, 0.2637353837490082, 0.8184096813201904, -0.29381245374679565, 0.671722412109375, -1.0681687593460083, 0.1032760888338089, 0.5250623226165771, 0.2068057507276535, -1.0244275331497192, 0.7412541508674622, 0.0875178724527359, 0.20483039319515228, -...
def to _ list ( * args ) : result = [ ] for value in args : if isinstance ( value, ( list, tuple, dict ) ) : result. extend ( value ) elif value is not none : result. append ( value ) return [ i for i in result if i is not none ]
[ -0.520315945148468, -0.024148887023329735, 0.6887456178665161, 0.18313604593276978, 1.0568348169326782, -0.8224736452102661, -0.7099184989929199, 0.6908884048461914, 0.09167878329753876, 0.48718196153640747, -0.6555613875389099, -0.1033613458275795, -0.6333446502685547, 0.5225380659103394,...
def test _ comoving _ distance _ converter _ inversion ( cosmology, scale, n _ interp ) : cdc = comovingdistanceconverter ( d _ min = 100, d _ max = 5000, cosmology = cosmology, scale = scale, n _ interp = n _ interp, ) dl = np. random. uniform ( 100, 5000, 100 ) u, _ = cdc. to _ uniform _ parameter ( dl ) dl _ out, _ ...
[ -1.2832225561141968, -0.22014077007770538, 0.6445832848548889, -0.31420645117759705, 0.5277213454246521, 1.1831070184707642, 0.1750972419977188, 0.12738607823848724, -0.051283836364746094, 0.0072715552523732185, -1.5173391103744507, 0.04818097874522209, 0.14527350664138794, 0.4619713723659...
def files _ exist ( self, file _ paths ) : return self. _ interface. files _ exist ( file _ paths )
[ -0.42463091015815735, 0.5000080466270447, 0.21667546033859253, 0.9128501415252686, 1.517519474029541, 0.672199010848999, 0.062185827642679214, 0.8492791056632996, -1.349792242050171, 0.6849614381790161, 0.17866301536560059, -1.7627781629562378, -0.5050902962684631, 0.26256000995635986, -...
def board _ size ( self ) - > tuple [ int, int ] : size = str ( self. root. get _ property ( " sz ", " 19 " ) ) if " : " in size : x, y = map ( int, size. split ( " : " ) ) else : x = int ( size ) y = x return x, y
[ 0.06054113060235977, 0.5299462676048279, 0.7295197248458862, 0.13023552298545837, -0.3152180314064026, -0.2599869668483734, 0.20714272558689117, 0.38278788328170776, 0.2312963455915451, 0.5385271906852722, -0.9957252144813538, -0.7928460240364075, -0.9668102264404297, -0.3081001937389374, ...
def _ jinc2 ( x ) : # todo!!! implement jinc ( 0 ) = 0. 5 m, n = x. shape result = _ np. empty ( ( m, n ) ) with _ warnings. catch _ warnings ( ) : _ warnings. simplefilter ( " ignore " ) for i in range ( m ) : for j in range ( n ) : result [ i, j ] = _ sps. j1 ( x [ i, j ] ) / ( x [ i, j ] ) return result
[ 0.4563312232494354, -0.21084026992321014, 0.5856133699417114, 0.1950330287218094, -1.298047661781311, -0.512213408946991, 0.8270207643508911, -0.8111231327056885, -0.542826235294342, 0.6476485133171082, 0.3109184503555298, 0.7046340703964233, 0.37633925676345825, 0.21941803395748138, -0....
def verifier ( self ) - > verifier :... # pragma : no cover
[ 1.3117483854293823, -0.7140917778015137, 0.1496293991804123, 1.0073559284210205, 0.5474948287010193, 0.41188564896583557, 0.015337471850216389, 0.33899787068367004, -0.37409794330596924, -2.0888919830322266, -1.1598559617996216, 0.47718507051467896, -0.11998395621776581, 0.4451667070388794...
def get _ chores _ from _ user ( existing _ chores : typing. list [ chore ] ) - > typing. list [ chore ] : print ('these are the existing chores :') print _ chores ( existing _ chores ) user _ wants _ to _ add : bool = input ('is there any that you would like to add? ( y / n )'). lower ( ) = ='y'if not user _ wants _ t...
[ -0.6589095592498779, 0.28048500418663025, 0.7007116079330444, 0.32706189155578613, -0.1767708957195282, 0.6330086588859558, 0.3041718006134033, -1.2556602954864502, -0.35263365507125854, -0.5978652238845825, -0.2152315080165863, 1.007534146308899, 0.0050726477056741714, 0.9004758596420288,...
def calculate _ meanfreepath ( photon, material = " water " ) : if photon is none : return " " " linear attenuation coefficient for water. from https : / / physics. nist. gov / physrefdata / xraymasscoef / comtab / water. html. the units are in cm ^ 2 / g. " " " if material = = " water " : muvsen = [ 1. 00000e - 03, 4....
[ 0.6874747276306152, -0.22580601274967194, 1.0423920154571533, -0.8019468784332275, -1.24967622756958, -0.3891182839870453, 1.169514775276184, -0.4673711955547333, 0.1338786482810974, 0.29046788811683655, -0.35595235228538513, 0.3267529308795929, -0.4829602539539337, 0.3519463837146759, -...
def all ( request ) - > httpresponse : articles = _ _ default _ articles _ query ( request. user. is _ superuser ) context = { " articles _ view _ title " : " welcome on my page ", " articles " : articles } return render ( request, " view _ all. html ", context )
[ 0.802643895149231, 0.46779218316078186, 0.37084054946899414, 0.5551202893257141, -0.4865975081920624, 0.04792231321334839, -0.36545252799987793, 0.9274001121520996, -0.14135538041591644, -0.10538221150636673, 0.24139617383480072, -0.09370782971382141, -0.04420745000243187, -0.1970230340957...
def custom _ toggle _ modules ( ) - > list [ str ] :
[ -1.8355118036270142, -0.6339025497436523, 0.3175835907459259, 0.2032666653394699, 0.4516279995441437, 0.19277185201644897, -0.09397714585065842, 0.053255509585142136, 0.9760870933532715, 0.9933157563209534, -0.75124591588974, 0.5321246981620789, 0.13498182594776154, 0.006986358668655157, ...
def run _ cli ( cmd : str ='ls - l'# command to execute in the cli ) : p = subprocess. run ( cmd, stdout = subprocess. pipe, shell = true ) print ( str ( p. stdout,'utf - 8') )
[ 0.8223017454147339, -0.4977632462978363, 0.6342352628707886, -0.11768897622823715, -0.4287871718406677, 0.8147300481796265, -0.5800648331642151, 0.8899465799331665, -0.2462187558412552, -0.7504410743713379, -0.048095379024744034, 0.8720973134040833, 0.5912126302719116, -0.26011228561401367...
def test _ check _ missing _ bad ( self ) : args = lambda : none args. args = { " city " :'london'} with self. assertraises ( exception ) as context : helpers. check _ missing ('args ', args,'name') exception = context. exception self. assertequal ( exception. args [ 0 ] [ " status _ code " ], 400 ) self. assertequal (...
[ 0.3362635374069214, 0.18054181337356567, 0.810817301273346, -0.019380299374461174, 0.7961291074752808, 0.8126286864280701, -1.1376323699951172, 0.32933521270751953, 0.19422779977321625, 0.4168938100337982, -0.40541064739227295, 0.19685330986976624, -0.07768051326274872, 1.2947255373001099,...
def _ setup ( self, beta ) : reward _ normalizer = popart. popart ( running _ statistics. emameanstd ( beta ) ) strategy = test _ utils. create _ distribution _ strategy ( use _ tpu = self. primary _ device = ='tpu') self. assertequal ( strategy. num _ replicas _ in _ sync, 2 ) with strategy. scope ( ) : reward _ norma...
[ 0.18261075019836426, 0.14830084145069122, 0.26148778200149536, -0.6607323288917542, 0.581744372844696, 0.13043706119060516, 0.2988554835319519, 0.3902426064014435, 0.06586688756942749, 0.6784611940383911, 0.26715582609176636, 0.03703433275222778, 0.42556366324424744, 0.25559741258621216, ...
def min _ coils _ lp ( coil _ widths, product _ widths, wastes, coils _ max, instance _ name = " " ) : prob = pulp. lpproblem ( " mwp instance : % s " % instance _ name, pulp. lpminimize ) # - - - total waste - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -...
[ 0.07913298159837723, -1.1843096017837524, 1.095319151878357, -1.138396143913269, -0.5947415232658386, -0.3186337947845459, 0.27612119913101196, -0.04722059518098831, 0.3989733159542084, 0.8997994065284729, -0.22450093924999237, 0.03294175863265991, -0.5000482201576233, -0.2815950810909271,...
def send _ custom _ notification ( notif _ name, template _ vars, params _ dict = none, user = none, message _ direction = none, attachments = none ) : from core. models. master import notifications from core. models. message import messages from core. models. users import notificationsubscriber try : if not params _ d...
[ -0.1690375804901123, 0.1043052226305008, 0.8140804767608643, 1.2666332721710205, -0.23934780061244965, -0.194785937666893, 0.4707868695259094, 0.33424779772758484, -0.006513931788504124, 0.6195312738418579, -0.3304896652698517, 0.5384419560432434, 1.029218077659607, 0.829840898513794, -0...
def cscs _ par _ fit ( y, l, maxitr = 100, tol = 1e - 4, warmstart = false, debug = false, num _ workers = none ) : n, p = y. shape s = np. matmul ( y. t, y ) / n if ( num _ workers is none ) : num _ workers = multiprocessing. cpu _ count ( ) - 1 l = np. vstack ( parallel ( n _ jobs = num _ workers ) ( delayed ( _ hk _...
[ 0.5656346678733826, 0.4125792980194092, 0.7325208187103271, 0.4366309642791748, -0.5955542922019958, 0.1176639199256897, -0.07547938078641891, 0.21537578105926514, -0.34567752480506897, 0.09030138701200485, -0.005886560771614313, 0.012175845913589, -0.5501382946968079, 0.01537357922643423,...
def store _ solution ( self, final _ fit, binspec, rmstol = 0. 15, force _ save = false, wvcalib = none ) : # for return wvarxiv _ name = none # line ids ans ='' if not force _ save : while ans! ='y'and ans! ='n': ans = input ( " would you like to store the line ids? ( y / n ) : " ) else : ans ='y'if ans = ='y': self. ...
[ -0.20097769796848297, -0.981386661529541, 0.6872495412826538, -0.009924200363457203, 0.08899633586406708, 0.2487100213766098, 0.5679197907447815, -0.4179163873195648, -0.1335383951663971, -0.4113628566265106, -0.24707703292369843, 0.9827162623405457, -0.2947706878185272, 0.1753323078155517...
def test _ extract _ pairs ( self ) : ing _ list = [ ( 1, 2, 3 ), ( 4, 5 ), ( 1, 2 ), ( 6, ) ] actual = extract _ pairs ( ing _ list ) expected = map ( lambda pair : ingredientpair ( * pair ), [ ( 1, 2 ), ( 1, 3 ), ( 2, 3 ), ( 4, 5 ), ( 1, 2 ) ] ) self. assertequal ( actual, expected )
[ -1.1246744394302368, -0.03870619460940361, 0.5968396663665771, 0.6650630235671997, -0.5727144479751587, -0.7837833762168884, 0.37934333086013794, 0.7379081845283508, 0.43254032731056213, 0.7513245344161987, -0.8468272686004639, -1.5302449464797974, -0.7665918469429016, 0.5476237535476685, ...
def cut _ solution ( self ) : damage _ array = [ [ ] for x in range ( 0, self. number _ axons, 1 ) ] temp _ array = [ 0. 0 for x in range ( 0, self. number _ axons, 1 ) ] for x in range ( 0, self. number _ axons, 1 ) : first _ node = int ( len ( self. sol _ array [ x ] [ 0 ] ) / 36 ) damage _ array [ x ] = [ self. dmg ...
[ 0.16021431982517242, -0.806002140045166, 0.8049954175949097, -0.7052146792411804, 0.6432884931564331, 0.04672534763813019, 0.4328438937664032, -0.5577741265296936, 0.16341564059257507, 1.377608060836792, -0.030387787148356438, 0.3483792245388031, -0.3253141939640045, -0.8407116532325745, ...
def get _ team _ position ( team ) : team _ id = _ get _ team _ id ( team ) team _ lg = _ get _ team _ league ( team ) team _ name = get _ team _ name ( team ) " " " do not forget to check if teamd id and lg are null " " " " " " do not forget get date, timezone " " " # req = _ get ('soccerseasons / { id } / fixtures? t...
[ -0.4571514129638672, -0.3159641623497009, 0.9273478984832764, -0.4856470823287964, -0.09707149118185043, 0.019268671050667763, -0.18281623721122742, 0.05373845994472504, -0.8877582550048828, 0.5788788199424744, -0.4583260118961334, -0.08991969376802444, 0.19302760064601898, -0.121386826038...
def _ calc _ clevels ( plot _ data ) : percent _ 98 _ surf = np. percentile ( plot _ data. surface _ hr. compressed ( ), 98 ) percent _ 2 _ surf = np. percentile ( plot _ data. surface _ hr. compressed ( ), 2 ) percent _ 98 _ grid = np. percentile ( np. ma. masked _ values ( plot _ data. tracer _ hr, 0 ). compressed ( ...
[ 0.6023627519607544, 0.003971955273300409, 0.6696504950523376, -0.11590610444545746, -0.5608949661254883, 0.5039023756980896, 1.894086480140686, -0.42069894075393677, -0.587533175945282, 0.44571518898010254, -0.20487315952777863, -0.44617322087287903, 0.1481075882911682, 1.0892775058746338,...
def detect _ abstract _ lang ( df ) : if cfg. detect _ lang : logger. info ('detecting abstract language...') df [ ['abstract _ lang ','abstract _ lang _ score'] ] = df. abstract. fillna ('' ). apply ( detect _ lang _ wrapper ) if cfg. fill _ not _ detected _ lang : df. abstract _ lang. fillna ( df. iso _ lang, inplace...
[ -0.2192545086145401, 0.21497568488121033, 0.33964699506759644, -0.17244316637516022, 0.15649011731147766, 0.5734298229217529, -0.19222809374332428, -0.07542099803686142, -0.16704614460468292, 0.47220543026924133, 0.1503399908542633, -0.2544066607952118, 1.4932574033737183, 1.79559898376464...
def grab _ header _ metadata ( json _ results, run _ id _ keys, param ) : param _ value _ list = [ ] header _ metadata _ str ='' for key, value in run _ id _ keys. items ( ) : if param in json _ results [ value ] : header _ metadata _ str = header _ metadata _ str +'{ } : { } \ n '. format ( key, json _ results [ value...
[ -0.7751910090446472, -1.1472692489624023, 0.711563766002655, -0.5417280793190002, 0.40788695216178894, 0.11010776460170746, -0.2998090982437134, -1.5160973072052002, -0.844507098197937, 0.8095558881759644, 0.45431023836135864, 0.5885443091392517, 0.2960398495197296, 0.7550112009048462, 0...
def unshelf ( self ) : if self. shelf is not none : self. shelf. books. pop ( self. book _ id ) self. last _ shelf = self. shelf print ( " unshelved { book } from the { shelf } shelf. ". format ( book = self. title, shelf = self. shelf. name ) ) self. shelf = none else : print ( " book not on a shelf! " )
[ 1.02073073387146, -0.3705563545227051, 0.29500240087509155, 0.00766550749540329, 0.3835671544075012, 0.4539863169193268, 0.4628410041332245, 0.6001845598220825, -0.9797535538673401, 0.06939303874969482, -0.3883689045906067, 0.5623314380645752, -0.9292818307876587, 0.9313083291053772, 1.2...
def get _ domain ( self, domain _ name, domain _ type = none ) : domain = self. domains. get ( domain _ name, none ) if domain is none : raise nameerror ('invalid domain name : % s ', ( domain _ name, ) ) if domain _ type is not none and domain. domaintype! = domain _ type : raise typeerror ('% s is not a domain of typ...
[ 0.021216366440057755, 0.2907649576663971, 0.25326007604599, 0.6540558934211731, 0.7320090532302856, -0.01806795969605446, -0.3252221643924713, -0.7395546436309814, 0.7030338644981384, -0.6202006340026855, 0.8195367455482483, 2.0378599166870117, -0.4397350251674652, 0.4104665219783783, 0....
def getdistance ( self, other : " translation2d " ) - > float : return math. hypot ( other. x - self. x, other. y - self. y )
[ 0.4861283004283905, -0.2883366048336029, 0.7635941505432129, 0.5265501141548157, -0.5435543060302734, 0.5073562860488892, -0.6238499879837036, -1.1478447914123535, -0.3568498194217682, -0.10802296549081802, -0.5504127740859985, -0.31434690952301025, 0.2668343186378479, -0.48660823702812195...
def make _ pdf ( image _ list ) : if ( not image _ list ) : print ( " \ nnu s - a gasit niciun document! " ) return 0 print ( " \ nse genereaza pdf din imaginile descarcate. " ) for image in image _ list : pdf. add _ page ( ) pdf. image ( image, 0, 0, 210, 297 ) pdf. output ( pdf _ location + number + ". pdf ", " f " )
[ -0.8328849077224731, 0.05260927230119705, 0.5221062898635864, 0.2343386858701706, 0.3866654932498932, 0.13864900171756744, 0.7546652555465698, 0.8364372253417969, -0.12041681259870529, -0.13454663753509521, -0.0034245364367961884, -0.2716137766838074, 0.7403386235237122, 0.5501232743263245...
def clustercandidates ( parameter1, parameter2, n _ clusters ) : stackedparameters = np. vstack ( ( parameter1, parameter2 ) ) # cluster _ centers = k _ means ( stackedparameters. t, n _ clusters = n _ clusters ) cluster _ centers = kmeans ( n _ clusters = n _ clusters ). fit ( stackedparameters. t ) clusterlabels = cl...
[ -0.7867106199264526, -0.7831818461418152, 0.4986419677734375, 0.3704073131084442, 0.15692564845085144, 0.19240042567253113, -0.573045551776886, 0.2285185158252716, -0.4304381012916565, 1.3529322147369385, 0.23194053769111633, 1.5766888856887817, -0.18030939996242523, -0.07982080429792404, ...
def call ( self, x, * args, * * kwargs ) : training = kwargs [ " training " ] logger = tf. get _ logger ( ) # get layer output y = self. layer ( x, * args, * * kwargs ) if self. params [ " mode " ] = = " debug " : logger. debug ( " before dropout " ) logger. debug ( y ) # postprocessing : apply dropout if training : y ...
[ -0.6221292614936829, 0.2936612367630005, 0.9415856003761292, -0.25485074520111084, -0.5135790109634399, 0.4424836337566376, -0.026792174205183983, -0.6161409616470337, -0.20113946497440338, 0.10072645545005798, -0.2450961172580719, 0.21953195333480835, -0.6143676042556763, 0.26555007696151...
def test _ else _ that _ can _ be _ removed _ in _ function ( assert _ errors, parse _ ast _ tree, code, template, default _ options, mode, ) : tree = parse _ ast _ tree ( mode ( template. format ( code, code ) ) ) visitor = ifstatementvisitor ( default _ options, tree = tree ) visitor. run ( ) assert _ errors ( visito...
[ -0.04001116380095482, 1.092738151550293, 0.39715775847435, -0.10062287747859955, 0.24593281745910645, -0.4596591889858246, 0.22360293567180634, 0.5551187992095947, -0.13306498527526855, 0.20751738548278809, -0.17087726294994354, -0.4374365210533142, -0.07329677790403366, 0.1275210082530975...
def test _ get _ root ( self ) : pass
[ 0.9193649888038635, 0.35109737515449524, 0.11193826794624329, 1.9123207330703735, 1.0559916496276855, 0.21947838366031647, 1.5738247632980347, -0.8149530291557312, 0.34090569615364075, -0.7922012209892273, -0.7087776064872742, 1.5400359630584717, -1.104195475578308, 0.1083366647362709, 0...
def get _ token ( self ) : headers = {'content - type':'application / yaml ','accept':'application / json ', } data = " { username :'" + self. username + " ', password :'" + \ self. password + " ', project _ id :'" + self. project _ id + "'} " url = f " https : / / { self. ip } : 9999 / osm / admin / v1 / tokens " resp...
[ -0.04553950950503349, 0.010983778163790703, 0.6045114398002625, 0.46460580825805664, 0.5342102646827698, 0.2916114330291748, -0.726346492767334, 0.04445229470729828, -0.4650372862815857, -0.47654420137405396, -0.5224941372871399, 1.2324483394622803, -1.162510871887207, 0.01867019012570381,...
def inbound _ hosts ( self, to _ host, limit _ hosts = 2500, skip _ hosts = 0, sort _ hosts = " from _ host _ rank10 _ desc " ) : data = self. _ request ('/ api / inbound ', locals ( ) ) return result ( json. loads ( data ) )
[ -1.2866325378417969, 0.22983744740486145, 0.5248810648918152, 0.0553896427154541, -0.15057112276554108, -0.12096729874610901, -0.5987889170646667, -0.45320409536361694, -0.5826940536499023, 0.6893964409828186, -0.7532165050506592, 1.9175679683685303, -0.4792371392250061, -0.633873403072357...
def get _ list _ of _ friends ( user : str ) : r = requests. get ('https : / / www. livejournal. com / misc / fdata. bml ', params = {'user': user } ) data = r. text. splitlines ( ) data = data [ 1 : ] data =''. join ( data ) data = data. split ( ) data = set ( filter ( lambda a : a! ='>'and a! ='< ', data ) ) return l...
[ -0.3687034845352173, 0.21425238251686096, 0.6414039134979248, 0.25400224328041077, -0.2583189904689789, -0.34074491262435913, -1.0341813564300537, -0.13892759382724762, -0.1750355362892151, -0.3971177935600281, -0.6588531732559204, 0.123956598341465, -0.35997140407562256, 0.129572719335556...
def add _ assertions ( assertions = none ) : if not assertions : assertions = [ ] if not isinstance ( assertions, list ) : raise valueerror ('assertion parameter was not a list : % s ', assertions ) snap _ cmd = [ snappy _ cmd,'ack'] combined = " \ n ". join ( assertions ) if len ( combined ) = = 0 : raise valueerror (...
[ -0.7212386727333069, -0.28478822112083435, 0.6803773045539856, 0.48487618565559387, 0.3954061269760132, 0.7766160368919373, 0.7414665818214417, 0.173089861869812, 0.7328192591667175, 0.028198130428791046, 0.28279802203178406, -0.13527527451515198, -0.42602166533470154, 1.1622765064239502, ...
def normalize ( word ) : return word. strip ( '.?')
[ 1.0292155742645264, -0.6998525261878967, 0.4550096094608307, 0.3181343674659729, -1.2272233963012695, 0.07430563122034073, -0.3394806385040283, 0.4976949095726013, 0.6866676211357117, -0.12546828389167786, -0.24000117182731628, -0.06069827079772949, -1.2612810134887695, -0.9107931852340698...
def to _ datetime ( string : str ) - > datetime : return datetime. strptime ( string, time _ format _ pattern )
[ 0.6413949728012085, -0.6842948794364929, 0.24918532371520996, -0.44867753982543945, -0.5808472633361816, -0.05444405972957611, -0.8390429019927979, 0.1527356207370758, 0.23476915061473846, 0.4836169481277466, -0.6370869278907776, -0.29484421014785767, -0.2508840262889862, -0.96918725967407...
def setup _ app ( app ) : iiif. init _ app ( app ) api = app. extensions ['restful'] iiif. init _ restful ( api ) image _ path = os. path. join ( app. instance _ path,'images') def uuid _ to _ source ( uuid ) : " " " full path of specified file. " " " return os. path. join ( image _ path, uuid ) iiif. uuid _ to _ image...
[ -0.0861414298415184, -0.11046919226646423, 0.40052375197410583, 0.20632892847061157, -0.2344224900007248, 0.1927894949913025, 0.4865831732749939, 0.5054566264152527, 0.694265604019165, 0.2898750305175781, -0.20150388777256012, -0.3732786476612091, 0.5098200440406799, -0.521822452545166, ...
def load _ state _ county _ zips ( state ) : global state _ county _ zip with sqlite3. connect ('source. db') as conn : cur = conn. cursor ( ) state _ county _ zip = [ ( str ( row [ 0 ] ), row [ 1 ] ) for row in cur. execute ( " select county, zip from states where state = : st and county not null and county < >'' orde...
[ -0.753670871257782, 0.2156478613615036, 0.5741186738014221, -0.550097644329071, -0.3523641526699066, -0.3727699816226959, 0.04590028151869774, 0.07015235722064972, 0.5907344818115234, 0.03190113231539726, -0.6286382675170898, -0.48948609828948975, 0.5700709223747253, 0.7595142126083374, ...
def is _ role _ mention ( text ) : return role _ mention _ rp. fullmatch ( text ) is not none
[ 0.6327255964279175, -1.3351812362670898, 0.28361108899116516, 0.0019247179152444005, 0.5131102204322815, -0.036046698689460754, 0.3209906816482544, 0.8846178650856018, 0.9609584808349609, 1.105601191520691, -0.08413930982351303, 0.5246321558952332, -1.2127004861831665, 0.658720076084137, ...
def select ( display ) : global scene scene = display return display
[ 0.11240708082914352, -0.8315654397010803, 0.14563599228858948, -0.24745681881904602, -0.6418084502220154, -0.22536325454711914, 1.1757903099060059, -1.0999236106872559, 0.5761126279830933, -0.36629313230514526, 0.41876646876335144, 1.2718427181243896, -1.1896594762802124, 0.220898449420928...
def _ read _ file ( self, raise _ exc : bool = false ) : try : with open ( self. ctrlfilename ) as f : lines = f. readlines ( ) except oserror : if raise _ exc and pid : raise return for line in lines : # parse line ; format is " module _ id pid timestamp site " try : _ id, _ pid, _ time, _ site = line. split ('' ) pro...
[ 0.9986086487770081, -0.6985006928443909, 0.3629087805747986, -0.19735288619995117, 0.7328577637672424, 0.3304774761199951, -0.23988798260688782, 0.3646792471408844, -0.96311354637146, 0.17491181194782257, 0.9329312443733215, -0.15280269086360931, 0.16712512075901031, 0.1849246621131897, ...
def get _ iso _ systime ( self ) : return time. strftime ( u " % y - % m - % dt % h : % m : % s ", time. localtime ( time. time ( ) ) ) + self. _ get _ timezone ( )
[ -0.5263559818267822, -0.3959907591342926, 0.8188081383705139, 0.10443101078271866, 0.2326078712940216, 0.16690020263195038, -0.24644522368907928, -0.7177239060401917, 0.11150594800710678, 1.0235134363174438, -0.6262555718421936, 0.01661502942442894, 0.15657754242420197, -0.1966154575347900...
def go _ to _ sellers _ cabinet ( self ) : self. wait _ and _ click ( locator _ type = by. xpath, locator = self. constants. my _ profile _ arrow _ xpath ) self. wait _ and _ click ( locator _ type = by. xpath, locator = self. constants. seller _ cabinet _ xpath ) self. log. info ( " go to seller's cabinet " ) from pag...
[ -0.45135781168937683, -0.2982320189476013, 0.3493975102901459, -0.3474154770374298, 0.7859824895858765, -0.9079893231391907, 1.5107226371765137, -0.22121451795101166, 0.20057211816310883, 0.16078190505504608, -0.2782469093799591, 0.7556243538856506, 0.12759745121002197, -0.5519641041755676...
def _ _ str _ _ ( self ) : if self. landmark = = cdna _ stop _ codon : coord _ prefix ='*'else : coord _ prefix ='' if self. offset < 0 : offset ='% d'% self. offset elif self. offset > 0 : offset ='+ % d'% self. offset else : offset ='' return'% s % d % s'% ( coord _ prefix, self. coord, offset )
[ -0.12489701062440872, -0.9306294322013855, 0.752911388874054, -1.5831706523895264, -1.0613861083984375, 1.0246105194091797, -0.4221113920211792, 0.12644203007221222, -0.09346307069063187, 0.11323142051696777, 0.2691757082939148, 0.6548210382461548, 0.714204728603363, -0.6572142839431763, ...
def cancascade ( self ) : return false
[ 0.4445362091064453, 0.19039984047412872, 0.5228618383407593, 1.483176589012146, -1.2288261651992798, 0.8050243258476257, 0.3446592688560486, -0.21107308566570282, 0.2653203010559082, -0.14099493622779846, -0.06865508109331131, 0.25176888704299927, -0.8058410882949829, 0.8415700197219849, ...
def letter _ freq ( txt ) : freq = { } txt _ lowered = txt. lower ( ) for char in txt _ lowered : if char in freq. keys ( ) : freq [ char ] + = 1 else : freq [ char ] = 1 return freq
[ -0.20146429538726807, -0.17343366146087646, 0.3733932077884674, -0.8377920389175415, -0.7539684772491455, -0.2525644600391388, 0.5992960333824158, 0.4647371470928192, -0.16855984926223755, -0.3264947533607483, -0.8112480044364929, -0.3514626920223236, -0.4373627305030823, 0.683786690235137...
def next ( self, * args ) : return _ topods. topods _ iterator _ next ( self, * args )
[ -1.1575183868408203, 0.15943846106529236, 0.2874809205532074, 0.5068581104278564, -0.5192493200302124, 0.5291241407394409, 0.22342795133590698, -0.8464643955230713, -0.2613985240459442, -0.11861608922481537, 0.6206099390983582, -0.39705154299736023, -0.6836639642715454, -0.0616558715701103...
def delete ( org _ id ) : try : orgservice. delete _ org ( org _ id ) response, status ='', http _ status. http _ 204 _ no _ content except businessexception as exception : response, status = {'code': exception. code,'message': exception. message }, exception. status _ code return response, status
[ -0.22685272991657257, -0.047720443457365036, 0.671673595905304, 0.993206262588501, 0.5018683671951294, -0.30989351868629456, 0.08382734656333923, 0.7927530407905579, 0.4050513505935669, 0.5104396343231201, -0.5414790511131287, 0.47089940309524536, -0.7433412075042725, 0.45051291584968567, ...
def _ mgui _ set _ orientation ( self, value : str ) - > none : if value = = " vertical " : layout = qtw. qvboxlayout ( ) self. _ qwidget. setorientation ( qt. vertical ) layout. addwidget ( self. _ qwidget, alignment = qt. alignhcenter ) layout. addwidget ( self. _ readout _ widget, alignment = qt. alignhcenter ) self...
[ 0.33376404643058777, 0.42061376571655273, 0.7460312843322754, -0.47042715549468994, -0.5158359408378601, -0.05758216604590416, 0.8348257541656494, -0.26535287499427795, 0.06115978956222534, 0.2788516879081726, 0.5292413830757141, -1.0194822549819946, -0.1900428682565689, 0.3340372443199157...
def plot _ shape ( id, unit _ info, ax, s = none ) : # plt. figure ( ) # ax = plt. axes ( ) ax. set _ aspect ('equal') shape _ ex = sf. shape ( id ) x _ lon = np. zeros ( ( len ( shape _ ex. points ), 1 ) ) y _ lat = np. zeros ( ( len ( shape _ ex. points ), 1 ) ) for ip in range ( len ( shape _ ex. points ) ) : x _ lo...
[ 0.39454299211502075, -0.3402630686759949, 1.0921738147735596, -0.4589937925338745, -0.16271452605724335, 0.5435237884521484, 0.3039655089378357, 0.6781671047210693, 0.2973541021347046, -0.6417869329452515, 0.364093542098999, 1.0662684440612793, 1.0713106393814087, 0.22351256012916565, 1....
def load _ model ( model, network _ type, algorithm, appliance, saved _ model _ dir ) : # model _ name = " saved _ models / " + appliance + " _ " + algorithm + " _ " + network _ type + " _ model. h5 " model _ name = saved _ model _ dir print ( " path name : ", model _ name ) if network _ type = = " t2vattention " or al...
[ 0.0005388823919929564, 0.15003255009651184, 0.47319936752319336, 0.14173251390457153, -0.08408236503601074, 0.16245673596858978, 0.5601690411567688, -0.6556687951087952, -0.24274896085262299, 0.7141786217689514, 0.07653524726629257, -0.6086865663528442, 0.5071179866790771, 0.37001249194145...
def run _ con _ fibstr ( n, s ) : nseed ( s ) rseed ( s ) print n alphabet = set ( " qwertyuiopasdfghjklzxcvbnm " ) x = choice ( list ( alphabet ) ) alphabet. remove ( x ) y = choice ( list ( alphabet ) ) fibs = fibonacci ( n ) fiblen = randrange ( 3, len ( fibs ) ) before = randint ( 0, n - fibs [ fiblen ] ) after = n...
[ 0.42959773540496826, -0.20718613266944885, 0.6096619367599487, 0.38852977752685547, -0.46852368116378784, 0.04120221734046936, 0.44719523191452026, -0.5662136673927307, -0.004465256351977587, 0.22376275062561035, -0.4145904779434204, 0.5845796465873718, -0.6587846875190735, 0.0905280113220...
def start ( self ) : self. incoming. start ( )
[ 0.8041629791259766, 0.027214376255869865, 0.3149794936180115, -0.1384267508983612, 0.8921608328819275, 0.7336885929107666, 0.324677973985672, 1.0200870037078857, -0.5730260610580444, -0.9194118976593018, -0.1284463256597519, 1.403899908065796, -0.43536803126335144, 0.7843727469444275, -0...
def _ f _ zero _ lsb ( index : int, stop : int ) - > _ gen : while index < stop : yield index index | = index + 1
[ -0.9393070936203003, -0.11529286205768585, 0.576854407787323, 0.04115607216954231, -0.2265075445175171, 0.3769682049751282, 0.5630838871002197, -0.7118921279907227, -0.5667746067047119, -1.0717893838882446, -0.05318974331021309, -0.02315141260623932, 0.166204571723938, -0.7102486491203308,...
def custom _ parameters ( self ) - > optional [ mapping [ str,'outputs. apioauthsettingsparameterresponse'] ] : return pulumi. get ( self, " custom _ parameters " )
[ -0.57209712266922, 0.05515587329864502, 0.40717729926109314, -0.4797145426273346, 0.33147022128105164, -0.13425886631011963, 0.18177001178264618, -0.5024327635765076, 1.2004448175430298, 1.196661114692688, -0.5209519863128662, 0.7190248966217041, 0.1273752748966217, -0.6565409302711487, ...
def getpixelat ( self, x, y ) : return self. _ hsv [ y ] [ x ]
[ -0.1451849341392517, -0.17613600194454193, 0.5446023941040039, -0.9843623638153076, -0.6818253397941589, -0.5536735653877258, -1.6948316097259521, -2.20495867729187, 0.5868114829063416, -0.0043300143443048, 0.7223644256591797, 1.882436752319336, -0.24551346898078918, -0.5891485214233398, ...
def parse ( self, name ) : # does hgvs name have transcript / gene prefix? if':'in name : prefix, allele = name. split (': ', 1 ) else : prefix ='' allele = name self. name = name # parse prefix and allele. self. parse _ allele ( allele ) self. parse _ prefix ( prefix, self. kind ) self. _ validate ( )
[ -0.32897302508354187, -0.3530372679233551, 0.4535486400127411, 0.3010469675064087, -0.6911205649375916, -0.23697949945926666, -0.4616750478744507, 0.5812612175941467, -0.17657986283302307, 0.029247106984257698, -0.5426700711250305, -0.17749054729938507, 0.427256315946579, -0.06621776521205...
def build _ roi _ box _ head ( cfg, in _ channels ) : return roiboxhead ( cfg, in _ channels )
[ -0.4501432776451111, -0.7356863617897034, 0.41218239068984985, 0.044678445905447006, 0.45242539048194885, -0.2236035019159317, -0.417235404253006, -0.3336166441440582, 0.3353516757488251, -0.3441307842731476, -0.29029616713523865, 0.7900112271308899, -0.7092697620391846, -0.957068085670471...
def _ fast _ inference _ update _ state ( inputs, state ) : assert math. backend _ name ( ) = ='jax ', ('jax backend is required to use the predict mode.') for x in inputs : assert x. shape [ 1 ] = = 1, ('in predict mode the input sequence must be of length 1.') # fast inference : run with only 1 query in each step, st...
[ -1.145020842552185, -0.19223561882972717, 0.5039125084877014, 0.18734538555145264, -0.3416217565536499, -0.48914769291877747, 0.13683827221393585, -0.3454769253730774, -0.5712710022926331, 0.7434316873550415, -0.1369510143995285, 0.183979794383049, 0.869324803352356, 0.1340053528547287, ...
def bitwiseor ( a, b ) : return a | b
[ 0.34775426983833313, 0.16851820051670074, 0.5774176716804504, -0.6592977643013, -0.4267793297767639, -0.010019904933869839, -1.3161252737045288, -0.5616165399551392, -0.6211968660354614, -0.6936341524124146, 1.1235120296478271, -0.04052295535802841, 0.375464528799057, -1.3210538625717163, ...
def unique ( self, column : str ) - > list [ any ] : if column not in self. _ data. column _ names : raise valueerror ( f " column ( { column } ) not in table columns ( { self. _ data. column _ names } ). " ) if self. _ indices is not none and self. _ indices. num _ rows! = self. _ data. num _ rows : raise valueerror (...
[ -0.8016857504844666, 0.52890545129776, 0.6015609502792358, 0.09214428812265396, 0.15301382541656494, 0.06484247744083405, 0.20054545998573303, -0.7285740375518799, 0.998263418674469, -0.0423860177397728, -0.8864555954933167, 0.9850889444351196, 0.42374929785728455, -0.4836026728153229, -...
def chapter _ word _ count ( self, indices ) : return sum ( len ( line. split ( ) ) for ch _ start, ch _ end in indices for line in self [ ch _ start : ch _ end ]. readfile ( path ) )
[ 0.1154034435749054, -0.5995666980743408, 0.4774200916290283, -0.72404944896698, 0.35794374346733093, -0.032507091760635376, -0.22682024538516998, 0.49470266699790955, -0.7452358603477478, 0.7781116366386414, -0.0640472024679184, -0.5605781078338623, -0.01282681617885828, -0.412566334009170...
def clean _ format ( s, * args ) : return multi _ format ( s, clean _ strs ( * args ) )
[ 0.27872979640960693, -1.321687936782837, 0.25654906034469604, 0.4498922824859619, -0.3909752368927002, -1.475524663925171, -0.8062618374824524, 0.24406129121780396, -0.08005843311548233, -0.07155243307352066, 0.8800273537635803, 0.41897696256637573, 0.420891135931015, 0.7824984192848206, ...
def _ udp _ transact ( self, hp, payload, handler, action, keyfind, timeout = - 1, * * kwargs ) : u = self keyv = keyfind ( hp, payload ) u. buffer _ l. acquire ( ) host = hp [ 0 ] broadcast = host is none or ( len ( host ) > 4 and host [ - 4 : ] = = '. 255') if broadcast : u. buffer. clear ( ) elif keyv in u. buffer :...
[ -0.16133010387420654, -0.006319717969745398, 0.9715564846992493, -0.0843401625752449, -0.4042355418205261, -0.30044734477996826, 0.19718065857887268, -0.3567158579826355, -0.27862340211868286, -0.34580978751182556, -0.13207867741584778, 0.6832340955734253, -0.3861919939517975, 0.0124934352...
def callback ( self ) : if'code'not in request. args : return none, none, none oauth _ session = self. service. get _ auth _ session ( data = {'code': request. args ['code'],'grant _ type':'authorization _ code ','redirect _ uri': self. get _ callback _ url ( ) }, decoder = json. loads ) me = oauth _ session. get ('' )...
[ -1.3976300954818726, 0.6195133328437805, 0.7217596769332886, 0.07953774929046631, -0.0850793793797493, -0.028454817831516266, -0.17215631902217865, -0.6382813453674316, 0.8101581335067749, 0.9673596620559692, -0.48532143235206604, 0.4305562674999237, -0.013966171070933342, 0.27233457565307...
def shrink ( pcur, delta, lower, upper ) : tmp = pcur - delta maskl = tmp < lower masku = tmp > upper if maskl. any ( ) : return numpy. min ( ( pcur [ maskl ] - lower [ maskl ] ) / delta [ maskl ] ) elif masku. any ( ) : return numpy. min ( ( pcur [ masku ] - upper [ masku ] ) / delta [ masku ] ) else : return 1. 0
[ -0.27547192573547363, -0.33051854372024536, 0.6300106048583984, 0.3670029044151306, -0.32354629039764404, 0.5087343454360962, 0.14477866888046265, -0.6586225628852844, 0.6675575971603394, -1.2048062086105347, 0.8398988246917725, 0.09115166962146759, -1.712662696838379, -0.14042338728904724...
def det _ centroid _ intersection ( self, square ) : a, b, c, d = square ab _ mid = self. det _ midpoint ( a, b ) cd _ mid = self. det _ midpoint ( c, d ) da _ mid = self. det _ midpoint ( d, a ) bc _ mid = self. det _ midpoint ( b, c ) return ab _ mid, cd _ mid, da _ mid, bc _ mid
[ 0.3815142512321472, -0.6434201598167419, 0.5708392262458801, -0.13884896039962769, 0.23139190673828125, -0.3517319858074188, 0.1887390911579132, -0.17719018459320068, 0.8105507493019104, 0.7071713805198669, -0.35803651809692383, -1.0892047882080078, -0.27067264914512634, -0.013908281922340...
def is _ pass ( self ) : return self. coords is none
[ -0.39978206157684326, -0.3802180290222168, 0.4172179698944092, 0.37292444705963135, 1.2349698543548584, 0.7926226854324341, -0.07695987820625305, -0.29051050543785095, 0.015735141932964325, -0.7741756439208984, 0.5546450614929199, -0.3420322835445404, -0.32894182205200195, -0.6001840829849...
def test _ unknown _ redirect _ uris _ are _ rejected ( self ) : data = {'client _ id': self. client. client _ id,'response _ type':'code ','redirect _ uri':'http : / / neverseenthis. com ','scope':'openid email ','state': self. state, } response = self. _ auth _ request ('get ', data ) self. assertin ( redirecturierro...
[ -0.9730389714241028, 0.6817154884338379, 0.45076510310173035, -0.5206707715988159, -0.0008440719684585929, 0.8075915575027466, -0.3830936849117279, -0.4323447644710541, 0.6412078738212585, -1.0601599216461182, -0.19528517127037048, 0.57461017370224, -0.545354425907135, -0.6093781590461731,...
def get _ space _ converter ( internal _ params, internal _ constraints, ) : transformations, constr _ info = process _ constraints ( constraints = internal _ constraints, params _ vec = internal _ params. values, lower _ bounds = internal _ params. lower _ bounds, upper _ bounds = internal _ params. upper _ bounds, pa...
[ -0.03617924451828003, -0.5008898377418518, 0.8284633159637451, 0.1784011870622635, -0.977687418460846, -0.3395948112010956, 0.1999838650226593, -0.16984626650810242, -0.5452486872673035, -0.6327758431434631, -0.16027547419071198, 0.3135770857334137, 0.1644035130739212, 0.7675657868385315, ...
def test _ insert _ returning ( self ) : response = ( manager. insert ( manager ( name = " maz " ) ). returning ( manager. name ). run _ sync ( ) ) self. assertlistequal ( response, [ { " name " : " maz " } ] )
[ -0.3577076494693756, 0.698226809501648, 0.35122689604759216, -0.2113027423620224, 0.18471167981624603, -0.12221415340900421, -0.20625807344913483, 0.1987505704164505, -0.043567124754190445, 0.32499486207962036, -1.124286413192749, -0.6272104382514954, -1.2568681240081787, 0.184155359864234...
async def _ subscribe _ to _ button _ led _ status ( self, button _ led _ id ) : _ log. debug ( " subscribing to button led status updates for led id % s ", button _ led _ id ) try : response, _ = await self. _ subscribe ( f " / led / { button _ led _ id } / status ", self. _ handle _ button _ led _ status, ) _ log. de...
[ 0.13535284996032715, -0.24593615531921387, 0.2486565262079239, -0.4579389691352844, 0.1468253880739212, 0.43590348958969116, -0.8384021520614624, -0.3501130938529968, 0.8078010082244873, -0.28696244955062866, -0.9241965413093567, 0.32243812084198, 0.011366288177669048, 0.9820793867111206, ...
def test _ parameters ( ) : # check that both yank and repex parameters are accepted yank ( store _ directory ='test ', randomize _ ligand = true, nsteps _ per _ iteration = 1 )
[ -0.06662372499704361, 0.6955435276031494, 0.2818736732006073, 0.24354416131973267, 0.44071632623672485, 1.0961583852767944, 0.5995171070098877, 0.5297709703445435, 0.18083907663822174, -0.3641338050365448, 0.3255981504917145, 0.5684289932250977, 0.009950850158929825, 1.0948035717010498, ...
def view _ bill ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='get': appointment = appointment. objects. get ( pk = request. get. get ('appointment _ pk') ) bill = iteminbill. objects. filter ( appointment = appointment ) request. session ['appointment _ for _ bill'] = request. get. get (...
[ -0.10873182117938995, -0.007157796528190374, 0.5280446410179138, 0.533979058265686, -0.8382493257522583, 1.3619496822357178, 0.054489538073539734, 0.48397427797317505, 0.4469676911830902, 0.03996763378381729, 0.5458242297172546, 0.9555385708808899, 0.014156249351799488, 0.9886249303817749,...
def prune ( self, threshold : int ) : self. _ log. info ( " pruning to min % d occurrences ", threshold ) pruned = documentfrequencies ( ) pruned. _ docs = self. docs pruned. _ df = { k : v for k, v in self. _ df. items ( ) if v > = threshold } pruned. _ meta = self. meta return pruned
[ 0.46548476815223694, 0.13357269763946533, 0.36365044116973877, -0.24025557935237885, -0.24533115327358246, -0.5877516865730286, -0.4399529993534088, -0.34747859835624695, -0.46867331862449646, -0.9992581009864807, 0.5433483719825745, 0.22005856037139893, -0.3189501166343689, -1.01159822940...
def scan ( args ) : connectsl ( ) connectcouchdb ( ) print " * * * * * * * * * * * * * * * " vlan = input ( " specify backend or frontend vlan : " ) vlanid = vlan _ num _ to _ id ( vlan ) subnets = get _ hydra _ portable _ subnets ( vlanid ) print'found % s portable subnets in vlan # % s marked hydra only'% ( len ( sub...
[ 0.3465341627597809, 0.9005007743835449, 0.6400790810585022, 0.31469249725341797, 0.3261692225933075, 0.1999163180589676, 0.3109488785266876, 0.0007480139029212296, -0.2506487965583801, -0.5873708128929138, 0.0832284539937973, 0.1107710525393486, -0.6767604351043701, 0.4056026041507721, 0...