text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ issue _ 12209 _ follow _ symlinks ( file, modules, tmp _ path, state _ file _ account, follow _ symlinks ) : # make the directories for this test onedir = tmp _ path / " one " onedir. mkdir ( ) twodir = tmp _ path / " two " twodir. symlink _ to ( onedir, target _ is _ directory = is _ windows ) # run the sta...
[ 0.15690284967422485, 0.10722824186086655, 0.3858669400215149, 0.6510249376296997, 0.05530306324362755, -0.3262237012386322, 1.3948185443878174, 0.37823736667633057, 0.7098699808120728, -0.9742015600204468, 0.06619590520858765, 0.338691383600235, -0.1600193828344345, 0.8670933842658997, 0...
def play ( self, move ) - > " sgfnode " : for c in self. children : if c. move = = move : return c return self. _ _ class _ _ ( parent = self, move = move )
[ 0.12729011476039886, -0.15087401866912842, 0.4966641664505005, 0.6218858957290649, -0.37297019362449646, -0.9556187391281128, 0.3959599435329437, -1.3157800436019897, 0.37727588415145874, -0.11855144798755646, 0.0014778291806578636, 0.5422005653381348, -0.6083115339279175, -0.8527728319168...
def celllabeling ( self, channel, features, uid ) : if not os. path. exists ( " outputs / labeled _ segmentation " ) : os. makedirs ( " outputs / labeled _ segmentation " ) for idx, frames _ in enumerate ( self. frames [ channel ] ) : pl _. figure ( figsize = ( 30, 30 ) ) pl _. imshow ( frames _. contents. t, cmap = " ...
[ -0.49192312359809875, -0.4529503285884857, 0.7393518686294556, -0.3830791711807251, 0.32085439562797546, -0.11829666793346405, 0.7552435398101807, 0.3174784779548645, 0.3185102045536041, 0.6637611985206604, -0.2604367434978485, 0.562088668346405, -0.13518141210079193, 0.5481194257736206, ...
def counter _ 16 ( current _ counter, endian = " little " ) : divisor = int ('ff'* 8, base = 16 ) + 1 lower _ counter = current _ counter % divisor higher _ counter = current _ counter / / divisor if endian. lower ( ) = = " little " : end = " < " if endian. lower ( ) = = " big " : end = " > " return struct. pack ( end ...
[ 0.3693505525588989, -0.2029801458120346, 0.7233051657676697, -0.9690625667572021, -0.2652994692325592, 0.5815111994743347, -0.030214691534638405, -0.6885610222816467, -0.3665803372859955, -0.5880380868911743, -0.18622198700904846, -0.060598958283662796, -0.7637252807617188, 0.0267000384628...
def _ create _ user ( self, name, email, password, * * extra _ fields ) : if not email : raise valueerror ( _ ( " users must have an email address " ) ) if not name : raise valueerror ( _ ( " users must have a name " ) ) email = self. normalize _ email ( email ) user = self. model ( name = name, email = email, * * extr...
[ -0.07307944446802139, 0.5351298451423645, 0.3697657287120819, -0.09538520127534866, -0.28577548265457153, 0.787287175655365, -0.5572885274887085, 0.2795151472091675, -0.2943376302719116, 0.6305739879608154, -1.1235569715499878, -0.9524548053741455, -0.31210339069366455, -0.4424928426742553...
def compute _ crop _ parameters ( image _ size, bbox, image _ center = none ) : bbox = np. array ( bbox ) b = max ( bbox [ 2 : ] - bbox [ : 2 ] ) if isinstance ( image _ size, int ) : h = w = image _ size else : h, w, * c = image _ size image _ size = max ( image _ size ) if image _ center is none : image _ center = np...
[ -0.19057373702526093, -0.3029797673225403, 0.9352520108222961, 0.18833418190479279, -0.2526929974555969, -0.4935828745365143, -1.0300782918930054, 0.47652506828308105, 0.45639729499816895, 1.389451265335083, 0.849243700504303, 0.04216889292001724, 0.24198126792907715, 0.1798269897699356, ...
def test _ publisher ( self ) : result = self. runner. _ makeresult ( ) self. assertidentical ( result. _ publisher, log )
[ 0.24207188189029694, 0.44963809847831726, 0.11534858494997025, 0.19053125381469727, -0.2874909043312073, 0.4355033040046692, 0.5819615125656128, -0.19366490840911865, 0.4497711658477783, -0.92316734790802, -0.6248937845230103, -0.16347111761569977, -0.3538254201412201, 0.03386215493083, ...
def access _ key ( self ) : return self. _ data. get ('inputs ', { } ). get ('username')
[ -0.5707446932792664, -0.33595889806747437, 0.4280884563922882, -0.39377105236053467, -0.3509119749069214, 0.13264377415180206, 1.4519884586334229, -0.18826930224895477, -0.30473241209983826, -0.20823785662651062, 0.7293965220451355, 0.9807322025299072, 0.13401591777801514, 0.33598586916923...
def _ str ( self, v, desc = none ) : return str ( v )
[ 0.0013548759743571281, -0.37617969512939453, 0.1800464689731598, -1.176329255104065, -0.7120013236999512, 0.16031292080879211, -0.7732796669006348, 0.08557704836130142, 0.3614998459815979, -0.44772279262542725, 0.7162578105926514, 0.8414984345436096, 0.2166300266981125, -0.3657656311988830...
def pickle ( self, file _ ) : # drop cache before pickling cache = self. _ cache self. _ cache = { } if isinstance ( file _, basestring ) : pickle. dump ( self, open ( file _, openmode. wb ), 2 ) else : pickle. dump ( self, file _, 2 ) # put cache back self. _ cache = cache
[ -0.7710704803466797, 0.0878293588757515, 0.2988920211791992, -0.4053800702095032, -0.39573705196380615, 0.3302895426750183, 0.26429978013038635, 0.3994603753089905, -0.7965108752250671, 0.04434630274772644, -0.11551377177238464, -0.7007343769073486, -0.050787195563316345, 0.242508023977279...
def test _ nfc _ invalid _ ndef _ record ( dev, apdev ) : tests = [ " 11223344 ", " 00112233 ", " 0000112233445566 ", " 0800112233445566 ", " 080011223344 ", " 18000000 ", " 18010000 ", " 90000050 ", " 9000005000 ", " 9001013344 ", " 98010101334455 ", " 0017ffffffe3 ", " 0017ffffffe4 ", " 0017ffffffe9 ", " 0000fffffffa...
[ 0.19541658461093903, 0.5703870058059692, 0.8743930459022522, -0.5289875864982605, 0.2537781894207001, 0.04423099756240845, 0.4627227187156677, -0.3521743416786194, -0.7994242906570435, -0.26660436391830444, -0.10290159285068512, -0.3973674774169922, -0.49726244807243347, 1.2775731086730957...
def clear ( self ) - > none : self. registers. clear ( )
[ 0.27879461646080017, 0.6556745767593384, -0.01613251119852066, -0.3301677703857422, 1.1427980661392212, 0.24726106226444244, 0.40946531295776367, 0.05432969331741333, -0.07529788464307785, -0.29584696888923645, -0.2171124815940857, 1.6643896102905273, -0.4028853178024292, 1.248921036720275...
def getcymgshift ( ) : ixshift = ctypes. pointer ( ctypes. c _ int ( ixshift ) ) iyshift = ctypes. pointer ( ctypes. c _ int ( iyshift ) ) pass
[ 0.28760212659835815, -0.08314566314220428, 0.5889808535575867, 0.22955647110939026, 0.43325555324554443, -0.31081995368003845, 0.3116246461868286, -0.44158414006233215, -0.3791219890117645, -0.7072412371635437, -0.9768803119659424, 0.4710436761379242, -0.7733675241470337, 0.283606886863708...
def get _ view _ interval ( self ) : return self. axes. xaxis. get _ view _ interval ( )
[ -0.09195180982351303, 0.23535925149917603, 0.3199734091758728, 0.2590588331222534, -1.451680302619934, 0.44772613048553467, 0.642804741859436, -0.4549162983894348, 0.27746641635894775, -1.1139552593231201, 0.43988052010536194, 1.1648741960525513, -0.7922893166542053, -0.7465922832489014, ...
def get _ username ( self ) - > str : user = self. cognito. get _ user ( ) return user. _ data ['email']
[ 0.14128631353378296, 0.4663362503051758, 0.1947759985923767, 0.49786117672920227, 0.03473852202296257, -0.15191936492919922, 0.21148358285427094, 0.5288155674934387, -0.730372965335846, -0.07304776459932327, -0.38628312945365906, 1.151343822479248, 0.4247823655605316, -1.1461269855499268, ...
def genererarme ( degbasemin, degbasemax, totalratio ) : points = totalratio namelist = [ " dague ", " epee ", " lance ", " masse " ] suffixlist = [ " longue ", " lourde ", " magique ", " chaotique ", " benie ", " tempetueuse ", " tenebreuse " ] nom = r. choice ( namelist ) + " " + r. choice ( suffixlist ) degbase = r....
[ 0.4190009832382202, 0.28649118542671204, 0.6118425130844116, -0.8014369606971741, 0.07606716454029083, 0.26622411608695984, -0.6169690489768982, 0.01567106693983078, -0.6936467289924622, 0.4688229560852051, -0.6401764154434204, 0.027546221390366554, -0.34053608775138855, -0.004305061418563...
def step ( self, epoch, val _ loss = none ) : super ( ). step ( epoch, val _ loss ) # we don't change the learning rate at epoch boundaries return self. optimizer. get _ lr ( )
[ -0.42315688729286194, 0.46381962299346924, 0.3541162610054016, 0.08179821819067001, -0.18207725882530212, 0.058923687785863876, -1.2534037828445435, -0.10988517105579376, -0.27102652192115784, -0.9112548828125, -0.31167739629745483, -0.21686680614948273, -0.02191362902522087, 0.49782785773...
def root ( self ) - > " sgfnode " : if self. _ root is none : self. _ root = self. parent. root if self. parent else self return self. _ root
[ 1.1650434732437134, 0.4647083282470703, 0.4472167491912842, 0.39471837878227234, 0.2864699363708496, 0.28089994192123413, 0.7932879328727722, -0.5944122672080994, 0.7973137497901917, -0.7539640665054321, 0.0578007698059082, 1.1046327352523804, -0.9338669776916504, -0.0047696661204099655, ...
def cancion _ anterior ( self ) : if len ( self. lista _ canciones ) < 1 : return none try : cancion = self. lista _ canciones. get _ elemento ( self. actual - 1 ) self. actual - = 1 except indexerror : # no hay cancion anterior return return cancion
[ -0.2264307588338852, -0.7017241716384888, 0.9966809749603271, 0.6803939938545227, -0.43218156695365906, 0.20785468816757202, 0.8856173753738403, 0.21601997315883636, -0.1099092960357666, 0.30682671070098877, 0.5237557888031006, 0.430985689163208, -0.7550998330116272, -0.058113064616918564,...
def _ _ dict _ iter ( dictionary : dict, key ) : if key in dictionary. keys ( ) : dictionary [ key ] + = 1 else : dictionary [ key ] = 1
[ -0.5051959753036499, 0.5726315975189209, 0.49867480993270874, -0.7632041573524475, -0.7079851031303406, 0.6544945240020752, -0.03128751739859581, 0.3796268701553345, -0.49529898166656494, 0.7588790059089661, 0.37985506653785706, -0.3189344108104706, 0.64365154504776, 1.0717042684555054, ...
def mk _ fs _ tree ( self, build _ root _ src = none, ignore _ patterns = none, work _ dir = none ) : work _ dir = work _ dir or self. _ create _ work _ dir ( ) build _ root = os. path. join ( work _ dir,'build _ root') if build _ root _ src is not none : shutil. copytree ( build _ root _ src, build _ root, symlinks = ...
[ -0.1431659460067749, 0.6099731922149658, 0.7375214695930481, 0.2628554105758667, -0.549092710018158, 0.8403621315956116, 0.5674874782562256, 0.017353124916553497, 0.7651205062866211, -0.7725384831428528, 0.02563294768333435, -0.11978611350059509, -0.5843786597251892, -0.133424773812294, ...
def compute _ color _ on _ gradiant ( percent, color1, color2 ) : # dump the rgb values from qcolor objects r1, g1, b1, _ = color1. getrgb ( ) r2, g2, b2, _ = color2. getrgb ( ) # compute the new color across the gradiant of color1 - > color 2 r = r1 + percent * ( r2 - r1 ) g = g1 + percent * ( g2 - g1 ) b = b1 + perce...
[ 0.35840916633605957, -1.0302865505218506, 0.9127127528190613, -0.45053958892822266, -0.6490423679351807, 1.085448145866394, -0.896737277507782, -0.8111135363578796, -1.2983076572418213, 0.38675543665885925, 0.43968936800956726, 0.8835402727127075, -0.8700011372566223, -0.11206716299057007,...
def pretty _ print ( obj, indent = 2 ) : printer = prettyprinter ( indent = indent ) if hasattr ( obj, " _ _ pretty _ _ " ) : print ( obj. _ _ pretty _ _ ( printer ) ) else : printer. pprint ( obj )
[ -0.0992274284362793, -0.3860868513584137, 0.8847725987434387, 0.6292155981063843, -0.869208037853241, -0.30485713481903076, -0.45764419436454773, -0.6113336682319641, 0.07055236399173737, -0.430512934923172, 0.188845694065094, 0.4277181327342987, 0.06038900092244148, 0.12140355259180069, ...
def cmidd ( x, y, z, base = 2 ) : assert len ( x ) = = len ( y ) = = len ( z ), " arrays should have same length " xz = np. c _ [ x, z ] yz = np. c _ [ y, z ] xyz = np. c _ [ x, y, z ] return entropyd ( xz, base ) + entropyd ( yz, base ) - entropyd ( xyz, base ) - entropyd ( z, base )
[ 0.45099586248397827, -0.9944502711296082, 0.6711310148239136, -1.0840259790420532, 0.053099777549505234, 1.067564845085144, -0.6024610996246338, -0.20994433760643005, 0.3609626591205597, 0.21380628645420074, 0.1485411524772644, 0.20406976342201233, -0.9855819940567017, -0.8302619457244873,...
def get _ peptides _ bound _ by _ allele ( self, allele _ name : str ) - > pd. dataframe : s _ allele _ name = mhcnames. parse _ allele _ name ( allele _ name ) s _ allele _ name = s _ allele _ name. gene +'*'+ s _ allele _ name. allele _ family +':'+ s _ allele _ name. allele _ code current _ alleles = self. get _ all...
[ 0.033421747386455536, -0.29304027557373047, 0.695705235004425, 0.22198128700256348, -0.7089375853538513, -0.5938541293144226, -0.3251010477542877, 0.6222711801528931, 0.3177635073661804, 0.7424576878547668, 0.32860249280929565, 1.0680421590805054, -0.6175297498703003, -0.23525945842266083,...
def _ fill _ intensity _ max ( num _ centr, ind, index _ uni, lat _ lon _ cpy, fir _ bright ) : brightness _ ev = np. zeros ( ( 1, num _ centr ), dtype = numba. float64 ) for idx in range ( index _ uni. size ) : if ind [ idx ]! = - 1 : brightness _ ev [ 0, ind [ idx ] ] = max ( brightness _ ev [ 0, ind [ idx ] ], \ np....
[ 0.029741445556282997, 0.04313390702009201, 0.4146782457828522, 0.2816098928451538, 0.9621029496192932, -0.24167662858963013, 0.16412577033042908, 0.6006999611854553, 0.4165955185890198, -0.027606217190623283, 0.22294504940509796, 0.3532051146030426, -0.25434204936027527, 0.4850712716579437...
def _ _ init _ _ ( self ) : # initialize logger _ variable self. logger = logger _ variable ( _ _ name _ _,'sensordata. log') # open serial port self. serialopen = serial. serial ('/ dev / ttyacm0 ', 115200 ) # initialize wiringpi gpio mode wpi. wiringpisetupgpio ( ) # set gpio pins as output wpi. pinmode ( self. inter...
[ 0.010253802873194218, -0.4301799535751343, 0.6033093929290771, -0.06415171176195145, 0.29308778047561646, 0.6418607234954834, 1.0298235416412354, 0.25030896067619324, 0.10105852037668228, -0.19319471716880798, 0.3523564040660858, -0.4827776551246643, 0.0013027379754930735, 0.62433755397796...
def diversity _ plot ( clone _ df, png = none, title = " ", count _ col = " clustered ", split _ col = none, line _ width = 3, add _ control _ diversities = true, figsize = ( 1000, 700 ) ) : figure _ params = { " plot _ width " : figsize [ 0 ], " plot _ height " : figsize [ 1 ], " x _ range " : range1d ( 0, 10 ), " y _...
[ 0.33256909251213074, 0.8310855627059937, 1.016761302947998, 0.6142714619636536, 0.4022800922393799, 0.23466946184635162, 0.981285810470581, 0.1506035327911377, 0.02297421731054783, -0.3017668128013611, 0.18990705907344818, 1.1785355806350708, 0.37577736377716064, -0.1495734453201294, 1.1...
def gethitmask ( image ) : mask = [ ] for x in xrange ( image. get _ width ( ) ) : mask. append ( [ ] ) for y in xrange ( image. get _ height ( ) ) : mask [ x ]. append ( bool ( image. get _ at ( ( x, y ) ) [ 3 ] ) ) return mask
[ -1.2236502170562744, -0.6164481043815613, 0.6558061242103577, 0.010391980409622192, 0.9404844045639038, 0.10345171391963959, 0.0892133042216301, -0.2527187168598175, -0.15370899438858032, 0.8855278491973877, -0.8470341563224792, 0.21424230933189392, 0.04443913698196411, -0.1257549971342086...
def _ transformation ( self, x : np. ndarray ) - > np. ndarray : if self. exponent! = 0 : return ( ( x + self. shift ) * * self. exponent - 1 ) / self. exponent else : return np. log ( x + self. shift )
[ -0.7919207215309143, 0.20849010348320007, 0.6665952205657959, -0.3142065405845642, -0.6152750849723816, -0.034477297216653824, -0.3164292573928833, -0.3834702968597412, 1.2723456621170044, 0.15543526411056519, -0.1623125821352005, 0.3395918607711792, -0.18647587299346924, -0.23020701110363...
def task _ default ( ) : _ logger. warning ( " no task chosen from set'tests'" )
[ 1.0695035457611084, 0.4383551776409149, 0.21975596249103546, 0.6756605505943298, 1.207763910293579, -0.21272313594818115, 1.4137550592422485, 0.1456628441810608, -0.4206441342830658, 0.11288061738014221, -0.3780071437358856, 0.4304751455783844, 0.27861568331718445, 0.067294180393219, -0....
def view ( request, id, slug = none ) : account = request. account preferences = request. preferences try : visualization _ revision = visualizationdbdao ( ). get ( request. user, visualization _ id = id, published = true ) visualization = visualization _ revision ['visualization'] # for datastream sidebar functions ( ...
[ 0.256702721118927, 0.1624452918767929, 0.6728289127349854, -0.5955566167831421, -0.6728771328926086, -0.21648699045181274, 0.31632760167121887, 0.261406809091568, 0.8665400147438049, 0.06071485951542854, 1.0065091848373413, 0.8596672415733337, -0.05632584169507027, -0.5265317559242249, -...
def ini _ detector ( self, controller = none ) : self. status. update ( edict ( initialized = false, info = " ", x _ axis = none, y _ axis = none, controller = none ) ) try : if self. settings. child ( ('controller _ status') ). value ( ) = = " slave " : if controller is none : raise exception ('no controller has been ...
[ 1.0229657888412476, -0.9929104447364807, 1.0113171339035034, 0.3018101751804352, -0.06017553433775902, -0.2601047158241272, 0.6877120733261108, 0.6755955219268799, 0.02431100234389305, -0.14917518198490143, -0.9931036829948425, 0.04362555220723152, 0.07540764659643173, 0.6302285194396973, ...
def _ _ init _ _ ( self, public _ key ) : self. _ _ pk = ed25519. ed25519publickey. from _ public _ bytes ( public _ key. bytes )
[ 0.6943292617797852, 0.3489382266998291, 0.13102483749389648, 0.12995798885822296, -0.38785281777381897, 0.5026361346244812, -0.11315835267305374, 0.5206624269485474, 0.3913860321044922, 0.2590278685092926, -0.3294166624546051, -0.28298959136009216, -0.26841259002685547, 0.8902125358581543,...
def testgetvaluesforquery ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid : { u'username / bar': 42 } } securetagvalueapi ( self. user ). set ( values ) rundat...
[ -0.6031404137611389, 0.43123868107795715, 0.4308464527130127, -0.1943288892507553, 0.8121234178543091, 0.5428310036659241, -0.2823456823825836, -0.6277990341186523, -0.2181994765996933, -1.0627453327178955, -0.4911811351776123, -0.16617994010448456, 0.3626265823841095, -0.23536717891693115...
def parse _ config ( config : union [ dict, str, path ] ) - > dict : if isinstance ( config, str ) or isinstance ( config, path ) : config = datahandler ( ). load _ json ( config ) for agents in [ " patients ", " environments " ] : if isinstance ( config [ agents ], str ) : config [ agents ] = _ parse _ agents _ config...
[ 0.11117573827505112, -0.557609498500824, 0.48734545707702637, -0.15774112939834595, -0.9777871966362, 0.26468533277511597, 0.1258213073015213, 0.6541436314582825, 0.143564373254776, -0.09907560050487518, -0.3723529279232025, -0.5107601284980774, 0.5320225358009338, 0.8609461188316345, 0....
def query _ all _ pts _ within _ observation _ window ( observation _ window _ hours ) : table _ name = create _ all _ pts _ within _ observation _ window ( observation _ window _ hours ) query = f " select * from { table _ name } " cursor. execute ( query ) df = as _ pandas ( cursor ) return df, table _ name
[ -0.3148140013217926, 0.15076375007629395, 0.5172997713088989, 0.7383590340614319, -1.1067484617233276, -0.0012096849968656898, -0.15321826934814453, -0.2661355137825012, -0.6672872304916382, 0.6013753414154053, 0.8458205461502075, 0.25415346026420593, -0.18640607595443726, 0.20344153046607...
def upload _ file ( request ) : if request. method = ='post': # get file from request and store it in disk file = request. files ['file'] fs = filesystemstorage ( ) filename = fs. save ( file. name, file ) uploaded _ file _ url = fs. url ( filename ) # create file model for the uploaded file file _ model = file ( custo...
[ -0.15081726014614105, -0.1624130755662918, 0.67342209815979, 0.4946953058242798, -0.03700389340519905, -0.22660942375659943, -0.277900755405426, 0.09429318457841873, -1.308183193206787, 0.25708940625190735, 0.03712211921811104, -0.8185129761695862, 0.24368667602539062, 0.7279618382453918, ...
def setup _ db ( self ) : self. db = mongoclient ( host = self. settings ['mongo _ hostname'], ) [ self. settings ['mongo _ db'] ] self. db. authenticate ( name = self. settings ['mongo _ username'], password = self. settings ['mongo _ password'], source = self. settings ['mongo _ authentication _ db'] ) self. meta _ c...
[ -0.3413679599761963, 0.2982490658760071, 0.3277216851711273, 0.236008882522583, 0.8339898586273193, 0.7739658951759338, 0.1263245791196823, -0.18827591836452484, -0.10723515599966049, 0.26568880677223206, -0.6973011493682861, -0.10896981507539749, -0.21340502798557281, 0.28447219729423523,...
def y _ rotation ( vector, theta ) : r = np. array ( [ [ np. cos ( theta ), 0, np. sin ( theta ) ], [ 0, 1, 0 ], [ - np. sin ( theta ), 0, np. cos ( theta ) ] ] ) return np. dot ( r, vector )
[ -0.5103709101676941, 0.12188604474067688, 0.46886932849884033, -0.5993143916130066, 0.189887136220932, -0.731548011302948, 0.24673514068126678, -0.046388547867536545, -0.5302050709724426, 0.22102348506450653, -0.657239556312561, 0.3919603228569031, 0.13047604262828827, -0.5126239061355591,...
def _ firms _ centroids _ creation ( df _ firms, res _ data, centr _ res _ factor ) : centroids = centroids ( ) centroids. set _ raster _ from _ pnt _ bounds ( ( df _ firms ['longitude']. min ( ), \ df _ firms ['latitude']. min ( ), df _ firms ['longitude']. max ( ), \ df _ firms ['latitude']. max ( ) ), res = res _ da...
[ 0.33405670523643494, -0.9798105359077454, 0.15009889006614685, -0.21719014644622803, 0.5127509832382202, -0.04512486606836319, -0.48904913663864136, 0.02998252771794796, -0.7208051085472107, 0.2419699877500534, 0.9148220419883728, -0.20246390998363495, 0.5940491557121277, -0.16075260937213...
def organization ( self, value ) : organization = self. _ tower. get _ organization _ by _ name ( value ) if not organization : raise invalidorganization ( value ) self. _ update _ values ('organization ', organization. id )
[ -0.3730258345603943, 0.8168576955795288, 0.3619714081287384, 0.6480229496955872, -0.13005830347537994, 0.13081076741218567, 0.37636858224868774, -0.38255074620246887, 0.5653600096702576, 0.8997835516929626, -0.5127967000007629, -0.06760796904563904, 0.5787885189056396, 0.34986093640327454,...
def serialize ( self, root ) : # 法 1 方 if not root : return'' from collections import deque q = deque ( [ root ] ) ans = [ ] while q : node = q. popleft ( ) ans. append ( str ( node. val ) if node else'#') if node : q. extend ( [ node. left, node. right ] ) return ', '. join ( ans )
[ 0.09660250693559647, 0.08396132290363312, 0.7577793598175049, -0.04036380723118782, -0.8733677268028259, -0.0545649491250515, -0.4247815012931824, -0.16590477526187897, 0.7715715169906616, 0.5051756501197815, -0.32263118028640747, 0.7584092020988464, -0.178012877702713, 1.1284961700439453,...
def _ showview ( self, win, fn = none ) : win. show ( ) editor = win. geteditor ( ) for tw in self. tabwidgets : if tw. haseditor ( editor ) : tw. setcurrentwidget ( win ) self. currenttabwidget. showindicator ( false ) self. currenttabwidget = tw self. currenttabwidget. showindicator ( true ) break editor. setfocus ( ...
[ -0.004115959629416466, -0.591228187084198, 0.35646751523017883, -0.24247859418392181, -1.2003756761550903, -0.1718631088733673, 0.8987754583358765, 1.1431046724319458, -0.4141220152378082, -0.4213124215602875, 0.6929466724395752, -0.03875286504626274, 0.1845531165599823, 0.7197519540786743...
def test _ register _ user _ already _ exist ( self ) : user = { " username " : " rozzah ", " password " : " password " } userdata = json. dumps ( user ) self. client. post ( " / v1 / auth / register ", data = userdata, content _ type ='application / json') response = self. client. post ( " / v1 / auth / register ", da...
[ -0.956424355506897, 0.9383553862571716, 0.5862043499946594, 0.3713204562664032, 1.3159130811691284, 0.6029982566833496, 0.4838142991065979, -0.7059045433998108, -0.2022295892238617, 0.4155230224132538, -1.4983800649642944, 0.2923920452594757, -0.35061413049697876, 0.34683361649513245, 0....
def query ( self, attr _ name ) : try : pg _ config _ process = subprocess. popen ( [ self. sip _ exe, " - - " + attr _ name ], stdin = subprocess. pipe, stdout = subprocess. pipe, stderr = subprocess. pipe ) except oserror : raise warning ( " unable to find'sip'file in'% s'" % self. sip _ exe ) pg _ config _ process. ...
[ -0.12739019095897675, -0.36637067794799805, 0.7557088136672974, 0.2304956465959549, -1.45060396194458, -0.24060000479221344, -0.5365203022956848, -0.722707986831665, -0.39494648575782776, 0.5217546224594116, 1.3692078590393066, -0.5483009815216064, -0.20405171811580658, -0.5125189423561096...
def remove _ mc _ sg ( self, ns _ key, g _ vec, s _ vec ) : return self. _ mc _ sg _ gen ( ns _ key, g _ vec, s _ vec,'igmp _ ns _ sg _ remove')
[ -0.7279723882675171, 0.023773981258273125, 0.44475504755973816, 0.3978256285190582, -1.6251505613327026, -0.46292680501937866, 0.6042860746383667, -0.18992818892002106, -0.6608039736747742, 1.316159963607788, -0.11697794497013092, 0.4138928949832916, -0.9214901328086853, -0.193745821714401...
def rmse _ func ( x, y, w, b _ mat ) : mse = mse _ func ( x, y, w, b _ mat ) rmse = sqrt ( mse ) return rmse
[ 1.101089596748352, -0.3046303391456604, 0.14336137473583221, 0.5122750997543335, 0.43487659096717834, -0.6625388860702515, -0.052653223276138306, -0.3663650155067444, 0.03671097382903099, 0.5059381127357483, 0.2501620948314667, 0.5186449289321899, -0.0928826630115509, 0.16048391163349152, ...
def to _ subgait ( joints, duration, gait _ name ='balance _ gait ', gait _ type ='walk _ like ', version ='moveit ', subgait _ name ='balance _ subgait ', description ='subgait created using the moveit motion planning.') : return subgait ( joints, duration, gait _ type, gait _ name, subgait _ name, version, descriptio...
[ 0.9215192198753357, -0.5051050186157227, 0.6016032099723816, 0.03976643458008766, -0.7878564596176147, 1.0128265619277954, -0.7098095417022705, -0.537814199924469, -0.3925229012966156, 0.037278927862644196, -0.8002514243125916, 0.9579265117645264, -0.5111860036849976, -1.1403191089630127, ...
def load ( filename, method = none, * * kwargs ) : if not os. path. exists ( filename ) : raise ioerror ( " file does not exist : % s. " % filename ) if method is none : candidates = [ ] for candidate, c in arbor _ registry. items ( ) : if c. _ is _ valid ( filename, * * kwargs ) : candidates. append ( candidate ) if l...
[ 0.3298906087875366, -0.19670014083385468, 0.8123440742492676, 0.775118350982666, -0.11660276353359222, -0.3325493633747101, 1.0180296897888184, -0.3380647599697113, -0.27672985196113586, 0.0794648602604866, 0.15125682950019836, 0.9729175567626953, -0.24882662296295166, 0.1796329915523529, ...
def buildenvelope ( self, element ) : element = env ['envelope'] ( env ['body'] ( element ) ) element. set ( env ['encodingstyle'], " http : / / schemas. xmlsoap. org / soap / encoding / " ) return element
[ -0.6917245984077454, -0.06840982288122177, 0.31300315260887146, 0.08335844427347183, -0.32396236062049866, 0.6479974389076233, -0.8625252842903137, 0.05520413815975189, 0.9527917504310608, 0.5313276648521423, 0.07724014669656754, 0.8781203031539917, -0.37564221024513245, 0.1666860431432724...
def auditorium _ index ( self ) : return self. location. index
[ -1.1140334606170654, -1.1188465356826782, 0.181457981467247, -0.5248112678527832, -0.44674327969551086, 1.1140700578689575, 1.8347575664520264, 0.838195264339447, 1.0525118112564087, -0.15679070353507996, 0.3771874010562897, 0.8320292234420776, 0.25032249093055725, -0.680424153804779, 0....
def display _ name ( self ) - > optional [ str ] : return pulumi. get ( self, " display _ name " )
[ 1.2399240732192993, -0.16321362555027008, 0.606592059135437, 0.6133121848106384, -0.1297328919172287, 1.022692322731018, -0.310047447681427, -0.7166978120803833, 0.5034616589546204, 0.641900897026062, 0.4909004271030426, 0.587074339389801, 0.5253391861915588, -0.8610509037971497, -0.6826...
def test _ run ( self ) : self. holder. run ( self. result ) self. assertequal ( self. result. errors, [ ( self. holder, ( self. error. type, self. error. value, self. error. tb ) ) ] )
[ -0.7838457226753235, -0.2724260985851288, 0.2938508093357086, 0.05724979192018509, 0.6730930805206299, 0.9314605593681335, 0.339913934469223, -0.12405207753181458, -0.21580933034420013, -1.350307822227478, -0.20819762349128723, -0.01005476899445057, -0.7761967182159424, -0.2601783275604248...
def test _ 05 _ dusk ( self ) : l _ time ='dusk'l _ time, l _ seconds = timefield ( ). _ rise _ set ( l _ time, self. m _ riseset ) # print ('d1 - 05 - a - seconds { } - " { } " \ n '. format ( l _ seconds, l _ time ) ) self. assertequal ( l _ seconds, ( 20 * 60 + 58 ) * 60 + 30 )
[ 0.13800634443759918, 0.5663250088691711, 0.30983853340148926, -0.3064962327480316, 0.1803140789270401, -0.04076765105128288, 0.14373673498630524, -1.2152903079986572, 0.2795507311820984, 0.1289767473936081, -0.6067364811897278, 0.4734305441379547, 0.19972358644008636, 0.8095130324363708, ...
def getall ( self ) : return self. _ _ personrepository. getall ( )
[ -0.10773731023073196, -0.5693686008453369, 0.28629279136657715, 0.31038492918014526, 0.07450354099273682, 0.6658437848091125, -1.6501915454864502, 0.6439579129219055, -0.02117069810628891, -1.1053704023361206, 0.0567711740732193, -0.13625779747962952, -0.42285892367362976, 0.70403236150741...
def loss ( self, x : tuple [ tensor ], data _ samples : detsamplelist ) :
[ -0.5055525302886963, 0.05929321423172951, 0.031049057841300964, -0.04674283787608147, 0.4722946286201477, 0.36037877202033997, -0.10439429432153702, 0.39707502722740173, 0.1319492757320404, -0.41854849457740784, -1.0170600414276123, -0.15475240349769592, 0.5937632918357849, -0.184731975197...
def tour _ length ( matrix, tour ) : total = 0 t = tour. getinternallist ( ) for i in range ( cities ) : j = ( i + 1 ) % cities total + = matrix [ t [ i ], t [ j ] ] return total
[ -0.7774267792701721, -0.0169819463044405, 0.4132017493247986, -0.67866051197052, -0.4334816038608551, 0.5292378067970276, 1.197620153427124, 1.2811594009399414, 0.736476480960846, 1.5407036542892456, -0.6538687348365784, -1.0974814891815186, -1.0093482732772827, -0.5697420239448547, -0.1...
def without _ uncommon _ nodes ( networks, eligible = none ) : def items _ outside ( g, nbunch ) : " " " get eligible nodes outside nbunch " " " if eligible is none : return [ n for n in g. nodes ( ) if n not in nbunch ] return [ n for n in g. nodes ( ) if g. nodes [ n ] [ eligible ] and n not in nbunch ] common = set....
[ -0.1333886981010437, 0.1600928008556366, 0.6361691355705261, 0.3213990032672882, -0.29702508449554443, 0.8858626484870911, 0.33807507157325745, 0.3501019775867462, 0.6042212247848511, 0.6826106309890747, -0.47563841938972473, -0.6244145631790161, -0.6543659567832947, 0.1271807849407196, ...
def circd ( r ) : out = _ np. zeros ( _ np. shape ( r ) ) out [ _ np. abs ( r ) < 0. 5 ] = 1. 0 out [ _ np. abs ( r ) = = 0. 5 ] = 0. 5 return out
[ 0.33909207582473755, -0.6607115268707275, 0.4571387767791748, -0.3598725497722626, -0.42371249198913574, 0.9630954265594482, 1.1894468069076538, -0.6151975393295288, 0.2513843774795532, 1.0915476083755493, 0.9688904881477356, 0.50541752576828, -0.6893038153648376, 0.8278558850288391, 0.5...
def icon ( self ) : return'mdi : cloud '
[ 0.30888301134109497, 0.9374954700469971, 0.26176321506500244, 0.1408836841583252, -0.42071259021759033, 0.9262861609458923, 0.3782803416252136, 0.12591630220413208, -0.5541234612464905, 0.12539654970169067, -0.15364490449428558, -0.4671022593975067, 0.8424606323242188, -0.5552340745925903,...
def test _ info _ forwards _ 404 ( c, users : list [ user ], flights : list [ flight ] ) : httpretty. register _ uri ( httpretty. get, f " http : / / container - nodeodm : 3000 / task / { flights [ 0 ]. uuid } / info ", status = 404 ) # try to get info on working flight _ auth ( c, users [ 0 ] ) resp = c. get ( reverse...
[ -0.6278660297393799, 0.8606092929840088, 0.6939520239830017, -0.44013938307762146, 0.8984757661819458, 1.166325569152832, 0.15131455659866333, 0.14005644619464874, -0.897258996963501, -0.4980963468551636, 0.012078149244189262, 0.3660721778869629, 0.07179306447505951, -0.07640914618968964, ...
def _ unicode _ to _ gbase ( self, value ) : return value. encode ( self. charset )
[ -0.5076971650123596, -0.1390206217765808, 0.43150123953819275, -0.5129638910293579, 0.24457606673240662, 0.6473830938339233, -0.6676229238510132, -0.9190750122070312, -0.30009743571281433, 0.7189322113990784, -0.36905932426452637, 0.9671545624732971, -1.013248085975647, -0.1150401905179023...
def _ _ init _ _ ( self, fn : union [ callable [ [ np. number ], np. number ], callable [ [ pd. timestamp, np. number ], np. number ] ], inverse _ fn : union [ callable [ [ np. number ], np. number ], callable [ [ pd. timestamp, np. number ], np. number ] ], name : str = " invertiblemapper " ) : super ( ). _ _ init _ _...
[ -0.8421360850334167, 0.37433868646621704, 0.9395601749420166, 0.6107441782951355, -0.5725824236869812, 0.2529442608356476, -0.231092169880867, 0.6884017586708069, -0.1689697504043579, -0.08883712440729141, -0.6547347903251648, 0.13652968406677246, 0.2012585699558258, 0.00724834343418479, ...
def get _ chores ( filepath : str ='chores. json') - > typing. list [ chore ] : print ( f'loading chores from { filepath }...') chores : typing. list [ chore ] = [ ] with open ( filepath,'r') as f : chores = [ chore. from _ json ( obj ) for obj in json. load ( f ) ] print ( f'loaded { len ( chores ) } from { filepath }...
[ -0.7110269665718079, 0.29327696561813354, 0.5182260274887085, -0.42858678102493286, 0.32203739881515503, 0.5565856695175171, 0.10038502514362335, -0.6594300270080566, -0.26089611649513245, 0.3492814004421234, -1.3807756900787354, 1.0456302165985107, 0.5715982913970947, 0.40797045826911926,...
def test _ reporterdeprecations ( self ) : trialrunner = runner. trialrunner ( none ) result = self. fakereporter ( ) trialrunner. _ makeresult = lambda : result def f ( ) : # we have to use a pyunit test, otherwise we'll get deprecation # warnings about using iterate ( ) in a test. trialrunner. run ( pyunit. testcase ...
[ -0.28517892956733704, 0.8886749744415283, 0.5732964277267456, -0.2008209377527237, 0.9392940998077393, -0.32148075103759766, -0.06510944664478302, -0.5319624543190002, -0.586907684803009, -0.4070137143135071, -0.48212864995002747, -0.24558520317077637, -0.09956151247024536, 0.4656717181205...
def extract _ from _ json ( path, key, values, proc = ( lambda x : x ) ) : res = { } keys = [ ] with open ( path ) as f : for line in f : line = json. loads ( line ) item _ key = proc ( line [ key ] ) res [ item _ key ] = line [ values ] keys. append ( item _ key ) key _ count = collections. counter ( keys ) unique _ k...
[ -0.3316883146762848, -0.26254430413246155, 0.48863255977630615, -0.15826301276683807, -0.8181102871894836, -1.1295119524002075, -0.2103164792060852, 0.3549586236476898, -0.6833595633506775, 0.19847628474235535, -0.9691557884216309, -0.23873981833457947, 0.745820939540863, 0.060161646455526...
def validate _ argument ( self, name : str, value : str ) - > t. tuple [ str, t. any ] : return name, value
[ -0.9879307150840759, -1.0144133567810059, 0.33881744742393494, -0.9851797819137573, -0.9251416921615601, 0.23974351584911346, -1.0774788856506348, -0.35772833228111267, -0.7014867663383484, 0.8993099331855774, 0.14160408079624176, 0.34553971886634827, -0.06003066152334213, 0.27175036072731...
def indexof ( self, widget ) : if isinstance ( widget, qscintilla. editor. editor ) : widget = widget. parent ( ) return super ( tabwidget, self ). indexof ( widget )
[ 0.27621325850486755, -0.04881573095917702, 0.48318415880203247, -0.570132851600647, -0.5838138461112976, -0.14542105793952942, 0.12227634340524673, -0.6929182410240173, -0.3258435130119324, -0.5496375560760498, 0.6380788087844849, -0.4156523048877716, -0.05984523519873619, 0.35409376025199...
def _ extract _ and _ reduce _ lci ( node ) : filename = lci _ cache _ file ( node. version, node. model ) ref = test _ ref ( node. version, node. model ) if os. path. exists ( filename ) : a = archive _ from _ json ( filename, ref = ref ) else : a = lcarchive ( filename, ref = ref ) if ref not in cat. references : cat...
[ 0.46668902039527893, -0.3798537850379944, 0.9979384541511536, -1.1247178316116333, 0.3214069604873657, 0.2446911484003067, 0.271316260099411, 0.05584145709872246, 0.9324672222137451, 0.07881958782672882, -0.14552828669548035, -0.10314422845840454, -0.39968934655189514, 0.35536640882492065,...
def episodeeval ( log _ dir, task, save _ name ='episode _ eval. pkl ', num _ timesteps = 800, num _ cpu = 1 ) : file _ name = log _ dir + save _ name # can be changed accordingly if ( os. path. isfile ( file _ name ) ) : # eval _ reward = np. load ( file _ name ) with open ( file _ name,'rb') as f : eval _ reward = pi...
[ 0.21537122130393982, -0.2869102358818054, 0.8291995525360107, -0.6539808511734009, 0.5007242560386658, -0.15042228996753693, -0.4964595437049866, 0.5899609327316284, 0.3224404752254486, 1.1140378713607788, -0.1696157604455948, 0.1806313842535019, 0.2868320345878601, -0.26257991790771484, ...
def process _ collisions ( self, collisions ) : row, col = - 1, - 1 cells = [ ( r. rect ( ), r. cell ) for r in collisions if isinstance ( r, qgraphicsrectitem ) and hasattr ( r,'cell') ] rects = [ [ r. x ( ), r. y ( ), r. width ( ), r. height ( ) ] for ( r, w ) in cells ] tilerect = [ self. item. x ( ), self. item. y ...
[ -0.6592063903808594, 0.05983477085828781, 0.7765759229660034, -0.500476598739624, 0.06918621808290482, -0.3686196804046631, 1.0301283597946167, -0.6356182098388672, -0.07666440308094025, -0.006850639823824167, 0.24561841785907745, -1.2166697978973389, 0.09298484772443771, -0.59245574474334...
def validate _ application _ error _ trace _ count ( num _ errors ) : @ function _ wrapper def _ validate _ application _ error _ trace _ count ( wrapped, instace, args, kwargs ) : try : result = wrapped ( * args, * * kwargs ) except : raise else : stats = core _ application _ stats _ engine ( none ) assert len ( stats...
[ 0.7813534140586853, 0.2479468733072281, 0.4578266143798828, 0.532089352607727, -0.005410522688180208, 0.8239136934280396, 0.34102049469947815, -0.41386881470680237, 0.6217102408409119, -0.2892722189426422, 0.29106688499450684, -0.4984489679336548, 0.8461053371429443, 0.01858857460319996, ...
def testnewstylescalarsummary ( self ) : event _ sink = _ eventgenerator ( self, zero _ out _ timestamps = true ) writer = test _ util. filewriter ( self. get _ temp _ dir ( ) ) writer. event _ writer = event _ sink with tf. compat. v1. graph ( ). as _ default ( ) : with self. test _ session ( ) as sess : step = tf. co...
[ 0.5455058813095093, 0.5796141624450684, 0.6702688336372375, 0.10141756385564804, 0.5720997452735901, -0.14486373960971832, 0.7392948865890503, -0.35000932216644287, 0.07117342948913574, 0.09801670163869858, -0.2077292501926422, 0.7480352520942688, 0.8796154856681824, -0.21684829890727997, ...
def test _ push ( ) : list _ size = 10 mylist = create _ int _ list ( list _ size ) mylist. print _ list ( ) assert mylist. get _ size ( ) = = list _ size
[ 0.0021038081031292677, 1.13273286819458, 0.29586541652679443, -0.2093970775604248, 0.711811363697052, 0.03690175712108612, -0.5011785626411438, 0.2871154248714447, 0.8336049914360046, -0.015794970095157623, -1.266758918762207, 0.006738292519003153, -0.5255774855613708, 0.4929611086845398, ...
def solmatrixinf ( m, b ) : x = [ ] for i in range ( len ( m ) ) : x. append ( ( 1. 0 / ( m [ i ] [ i ] ) ) * ( b [ i ] - sum ( m [ i ] [ j ] * x [ j ] for j in range ( len ( x ) ) ) ) ) return x
[ 0.7271984219551086, 0.2738571763038635, 0.42463821172714233, 0.9858008027076721, 0.08271162211894989, -0.24671177566051483, -0.09850616008043289, 0.5088596343994141, -0.11704953014850616, 0.6947022676467896, 0.1813633292913437, -0.3881862461566925, -0.9961571097373962, -0.10182283818721771...
def getddggatetime ( ) : andor _ solis. getddggatetime. restype = ctypes. c _ uint delay = ctypes. c _ uint64 ( ) width = ctypes. c _ uint64 ( ) result = andor _ solis. getddggatetime ( ctypes. byref ( delay ), ctypes. byref ( width ) ) check _ status ( result ) return int ( delay. value ), int ( width. value )
[ -1.019830346107483, 0.9482570290565491, 0.8213309645652771, -0.5844966173171997, -0.49806341528892517, -0.9013071060180664, -0.09259204566478729, -0.44700905680656433, -0.15204840898513794, 0.16069769859313965, -0.2736974060535431, 0.12620776891708374, -0.43393808603286743, 0.5252587199211...
def _ _ init _ _ ( self, d _ ff, n _ experts = 64, temperature = 0. 1, mode ='train ', kernel _ initializer = init. glorotuniforminitializer ( ), bias _ initializer = init. randomnormalinitializer ( 1e - 6 ) ) : super ( ). _ _ init _ _ ( name = f'switchsparseff _ { d _ ff }') self. _ mode = mode self. _ d _ ff = d _ ff...
[ 0.00017998224939219654, 1.1373291015625, 0.7488024234771729, 0.3662700951099396, -0.6257894039154053, -0.07111997902393341, 0.6452492475509644, 0.909762978553772, -0.37821370363235474, -0.9063858389854431, -0.49586933851242065, 0.08732019364833832, 0.08128012716770172, 0.741661787033081, ...
def test _ length _ bidi ( self ) : vector = array ( 3, array ( 2, 0 ) ) res = len ( vector [ 0 ] ) self. assertequal ( res, 2 )
[ 0.39803650975227356, -0.514901876449585, 0.3255103528499603, 0.6446277499198914, 1.4844579696655273, 0.8716625571250916, 0.11943794786930084, 0.5030033588409424, 0.5105664730072021, -0.23661449551582336, -1.4006513357162476, 0.29558417201042175, -0.07160264253616333, 0.35368597507476807, ...
def comma _ partition ( s ) : s = s. strip ( " { " ). strip ( " } " ) in _ parens = 0 ixs = [ ] for i, c in enumerate ( s ) : if c = = " ( " : in _ parens + = 1 if c = = " ) " : in _ parens - = 1 if not in _ parens and c = = ", " : ixs. append ( i ) return [ s [ sc ] for sc in make _ partition _ slices ( ixs ) ]
[ -0.1430601179599762, -0.4960079789161682, 0.7236539125442505, -0.08283369988203049, -0.6387078762054443, -0.8936628699302673, -0.22599665820598602, 0.7809765934944153, 0.8764212727546692, 0.9234338402748108, -0.27933821082115173, -0.2598159611225128, -0.6754046082496643, -1.040068984031677...
def rebuild _ tree ( self ) : self. _ remote _ tree = none self. _ build _ tree ( )
[ -0.2645017206668854, -0.7638468742370605, 0.1406068056821823, -0.9138839840888977, -0.20928101241588593, 0.008312431164085865, -0.2965950667858124, 0.6145593523979187, -0.5262641310691833, -0.3485569953918457, -0.6682392954826355, 1.4450851678848267, -0.7756403088569641, -0.143676713109016...
def test _ addbothfailure ( self ) : failure = synchronousfailure ( runtimeerror ( ) ) l = [ ] sd = synchronousdeferred ( failure ). addboth ( l. append ) self. assertequals ( l, [ failure ] )
[ 0.22863610088825226, 0.20816828310489655, 0.6902297735214233, 0.20532314479351044, 0.3253268301486969, 0.9786290526390076, -0.8662437796592712, 0.06607934832572937, 0.24332189559936523, -1.4640077352523804, -0.9137367010116577, 0.26564693450927734, -0.33841472864151, 1.5123933553695679, ...
def import _ file ( self, imported _ format = none, progress _ from = 0. 0, progress _ to = none ) : if not hasattr ( resolwe _ runtime _ utils, " import _ file " ) : raise runtimeerror ( " requires resolwe - runtime - utils > = 2. 0. 0 " ) if imported _ format is none : imported _ format = resolwe _ runtime _ utils. i...
[ 0.14992037415504456, -0.5487838387489319, 0.5422307252883911, 0.3906782567501068, 0.2144678235054016, 0.2566608488559723, 0.40155068039894104, -0.04910775274038315, -1.097822904586792, -0.642030656337738, 0.032801076769828796, -0.9287013411521912, -0.23552314937114716, 0.036834608763456345...
def requestdailyusagereport ( self, date : str, account _ id : str ='' ) - > response : url = f'{ self. base _ url } / query / { date } '. format ( account _ id = account _ id or self. oauth. account _ id ) return self. session. post ( url, headers = self. oauth. headers )
[ -0.8700141310691833, 1.0705955028533936, 0.7954764366149902, 0.340847909450531, 1.1263394355773926, -0.9571423530578613, -0.2601446807384491, -1.1310874223709106, 0.3015810549259186, -0.48613452911376953, 0.7041110992431641, 0.48831188678741455, -1.1837702989578247, 0.6118062138557434, 0...
def test _ campaign _ edit ( self ) : pass
[ 0.07900417596101761, -0.5621370077133179, 0.03471142426133156, 0.23868729174137115, 0.7057843804359436, 0.16724582016468048, 1.5967764854431152, 0.7551527619361877, -0.26241204142570496, -0.6057185530662537, -0.3997119665145874, 0.56319260597229, -0.7093120813369751, -0.32011428475379944, ...
def _ _ flatten _ list _ of _ dicts ( self, list _ of _ dictionaries ) : result _ dict = { } for single _ dictionary in list _ of _ dictionaries : if type ( single _ dictionary ) = = dict : result _ dict. update ( single _ dictionary ) return result _ dict
[ -1.4892951250076294, 0.5199750065803528, 0.4385841190814972, -0.41122907400131226, 0.039423201233148575, -0.6958705186843872, 0.3930496871471405, 0.8096056580543518, 0.538338840007782, 0.07695785164833069, -0.2960822284221649, -1.4631012678146362, -0.8914188742637634, 1.378199815750122, ...
def test _ retrieving _ recipe _ authenticated ( self ) : user2 = get _ user _ model ( ). objects. create _ user ( email ='tstm @ gmail. com ', password ='secretpasscode') sample _ recipe ( user = user2 ) sample _ recipe ( user = self. user ) res = self. client. get ( recipe _ url ) recipe = recipe. objects. filter ( u...
[ 0.13286615908145905, 0.5952401757240295, 0.2902800738811493, 0.7717052698135376, 0.2444039136171341, 0.01485209260135889, -0.5856127142906189, 1.1637554168701172, 0.09143765270709991, -0.7390334606170654, -0.608808159828186, 0.47445744276046753, -0.003914485219866037, -0.4458097815513611, ...
def current _ period _ end ( self, current _ period _ end ) : if current _ period _ end is none : raise valueerror ( " invalid value for ` current _ period _ end `, must not be ` none ` " ) # noqa : e501 self. _ current _ period _ end = current _ period _ end
[ -0.4172418415546417, -1.2098145484924316, 0.01802423782646656, 0.5760582089424133, 0.11532647907733917, 1.6936346292495728, -0.30759716033935547, 1.2084472179412842, -1.1505807638168335, 0.7373937964439392, -0.3912871479988098, 0.07974666357040405, -0.5386949181556702, 0.742750346660614, ...
def inc ( self, var _ name, inc _ val = 1 ) : if self. _ lock. acquire ( true, 1 ) : try : if var _ name in self. _ variables : if type ( self. _ variables [ var _ name ] ) is int : self. _ variables [ var _ name ] + = inc _ val return true else : return false else : return false except exception as e : self. _ logger....
[ -0.6844840049743652, 0.46130773425102234, 0.981919527053833, 0.10103211551904678, -0.9936580061912537, 0.4898999333381653, 0.3026514947414398, -0.6659596562385559, -0.430561363697052, 0.07659246772527695, 0.006029803305864334, -0.23536810278892517, -1.0928841829299927, 0.14144881069660187,...
def _ traverse _ reachable ( paths, start ) : s = set ( [ start ] ) for target in paths [ start ] : s. update ( _ traverse _ reachable ( paths, target ) ) return s
[ -0.6132788062095642, 0.3079051673412323, 0.5476166009902954, 0.5789374709129333, 0.046013832092285156, -0.61907559633255, 0.5677300095558167, -0.3390253186225891, -1.4872114658355713, 0.696189820766449, -0.06742561608552933, -0.40785738825798035, -0.26320213079452515, -1.0608131885528564, ...
def run _ command ( self ) : if self. docs _ command. sub _ commands and self. command not in self. docs _ command. all _ commands : raise invaliddocscommandexception ( f " command not found. try using one of the following available commands : { os. linesep } " f " { os. linesep. join ( [ command for command in self. d...
[ -0.49372485280036926, -0.3821755647659302, 0.6636509299278259, 0.6234154105186462, 0.28872060775756836, 0.6665648818016052, 0.7906001806259155, 0.47864818572998047, 0.3680090606212616, -0.5084177255630493, 0.44702184200286865, 0.6156759858131409, -0.07054269313812256, 0.6594905257225037, ...
def _ get _ raw _ explainer _ create _ explanation _ kwargs ( *, kwargs = none, explanation = none ) : if explanation is not none and kwargs is not none : raise valueerror ( " both explanation and kwargs cannot be set " ) keys = [ explainparams. method, explainparams. classes, explainparams. model _ task, explainparams...
[ -0.5946535468101501, 0.38560035824775696, 0.8110613226890564, -0.3940928280353546, -0.8532596826553345, -0.4247100055217743, 0.25801509618759155, 0.47937095165252686, -0.5160373449325562, 0.8295707106590271, -0.7031868100166321, 0.5169724225997925, 0.7586933970451355, 1.3799676895141602, ...
def do _ update _ all ( self, * * kwargs ) : # pylint : disable = unused - argument _ error _ code = 0 _ msg ='' for _ node in self. tree. all _ nodes ( ) : try : _ error _ code, _ debug _ msg = self. do _ update ( _ node. identifier ) _ msg = _ msg + _ debug _ msg +'\ n'except attributeerror : _ error _ code = 1 _ msg...
[ -0.5513074994087219, -0.20403601229190826, 0.6988548040390015, -0.05855004861950874, 0.5609345436096191, 0.032713860273361206, -0.19153976440429688, 0.07769958674907684, -0.7735871076583862, 0.5977551937103271, -0.04836927354335785, 0.13470935821533203, 0.27075204253196716, 0.9230963587760...
def _ _ init _ _ ( self, request = none, * args, * * kwargs ) : self. request = request super ( appliancetypeform, self ). _ _ init _ _ ( * args, * * kwargs )
[ -0.6759952902793884, 0.38170307874679565, 0.6588147878646851, -0.21037361025810242, 0.5885903835296631, -0.6273874640464783, -0.31947654485702515, -0.18383295834064484, 0.2377626746892929, -1.3000274896621704, -0.3458373546600342, -0.09062594920396805, 0.11879748106002808, 1.28814804553985...
def input _ action ( ) : print ( " you are being chased by a group of goblins. " ) print ( " you and your friend for some reason decide to run to a cliff. what do you do? " ) action = input ( " [ sleep | jump | do nothing | fight ] " ) return action
[ -0.4672853350639343, -0.5908610224723816, 0.5322160720825195, 0.9394745826721191, 0.7414738535881042, 0.958416223526001, 0.6937053799629211, -1.152984619140625, -0.1207711324095726, -0.2863770127296448, -0.6687145233154297, 1.1468207836151123, -0.8891656994819641, -0.5445094108581543, 0....
def rotate ( self, symbol ) : if not self. current _ hero : return if symbol = ='q': self. current _ hero. facing = ( self. current _ hero. facing - 1 ) % 6 elif symbol = ='e': self. current _ hero. facing = ( self. current _ hero. facing + 1 ) % 6 if self. current _ hero. weapon : self. current _ hero. weapon. reset _...
[ -1.2397640943527222, 0.4003441333770752, 0.697004497051239, -0.2165210098028183, 1.1332758665084839, -0.7300216555595398, 1.1123379468917847, -0.6881394386291504, 0.5939851999282837, -0.09931632876396179, -0.7463880777359009, 0.08350705355405807, -0.53647381067276, -0.5354240536689758, 0...
def _ _ init _ _ ( self, n _ items _ to _ remember, mode ) : super ( ). _ _ init _ _ ( name ='_ rememberpad') self. _ n _ items _ to _ remember = n _ items _ to _ remember self. _ mode = mode self. _ portal _ mask = self. monkey _ patched _ mask ( ) # pylint : disable = assignment - from - none
[ -0.6841495037078857, 0.37130388617515564, 0.6088375449180603, -0.18774744868278503, 0.07323091477155685, -0.11669587343931198, 0.16318896412849426, -0.36632370948791504, 0.7510725855827332, 0.6654298901557922, -1.5480300188064575, -0.42040950059890747, 0.0358484648168087, -0.17304562032222...
def main _ loop ( mode = 0 ) : table _ pkg = import _ module ( configs ['cmd _ table'] ['package'] ) cmd _ table = getattr ( table _ pkg, configs ['cmd _ table'] ['table _ name'] ) build _ dict = getattr ( table _ pkg, configs ['cmd _ table'] ['build _ dict'] ) # chunk size of audio stream data for vosk recognizer. vos...
[ 0.33675310015678406, -0.6864320635795593, 0.8564714193344116, 0.7570453882217407, -0.02783428505063057, -0.3979472517967224, 0.9179307818412781, 0.260785847902298, -0.500108003616333, 0.5105859041213989, -0.37626826763153076, 0.46665433049201965, 0.5025528073310852, 0.4899943470954895, 0...
def calctemperaturefactor ( temperature, crystal ='si ', debyetemperature = 644. 92, millerindex = [ 1, 1, 1 ], atomicmass = 28. 09, dspacing = 3. 1354162886330583 ) : def debyefunc ( x ) : return x / ( np. exp ( - x ) - 1 ) def debyephi ( y ) : from scipy. integrate import quad integral = quad ( lambda x : debyefunc (...
[ 0.3510395288467407, 0.34478405117988586, 0.6385118365287781, -0.505330502986908, -0.5374860763549805, -0.11044147610664368, 0.44100502133369446, 0.8137413859367371, -0.4404078722000122, 0.6849635243415833, -0.7664043307304382, 0.045955199748277664, -0.8552674651145935, 0.747356653213501, ...
def getrandompipe ( ) : # y of gap between upper and lower pipe if not pipedetermintisic : gapy = random. randrange ( 0, int ( basey * 0. 6 - pipegapsize ) ) gapy + = int ( basey * 0. 2 ) else : gapy = int ( basey * 0. 2 ) + 50 pipeheight = images ['pipe'] [ 0 ]. get _ height ( ) pipex = screenwidth + 10 return [ {'x':...
[ -2.1100056171417236, -0.7578547596931458, 0.6967358589172363, -0.8032108545303345, -0.470805823802948, 0.09642931818962097, -0.06416856497526169, 0.3628956079483032, 0.4934600591659546, 0.0988655611872673, -0.32126864790916443, -0.47780781984329224, -0.16574202477931976, 0.3242177069187164...