text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def revlogcompressor ( self, opts = none ) : raise notimplementederror ( ) | [
-0.0022388887591660023,
-0.072240449488163,
0.8552472591400146,
0.42194750905036926,
-0.9696394205093384,
-0.32259178161621094,
0.04448902979493141,
0.47977256774902344,
-0.45242926478385925,
-0.48487311601638794,
-0.1553383469581604,
1.0379643440246582,
-0.7688024640083313,
-0.53899836540... |
def compute _ statistic ( statistic, data, mask = none, axis = none, finite = true, positive = false, percentile = none ) : data = np. asanyarray ( data ) if mask is not none : mask = np. asanyarray ( mask, dtype = bool ) # note : this function should not ever have to use glue - specific objects. # the aim is to eventu... | [
0.28961753845214844,
0.7090135216712952,
0.6754037737846375,
0.9012779593467712,
-0.4150722622871399,
-0.6792235970497131,
0.24459052085876465,
-0.2593348026275635,
0.03596866503357887,
-0.00461212731897831,
0.7732731699943542,
0.6749340295791626,
0.5600083470344543,
-0.8632803559303284,
... |
def time _ of _ trip ( datum, city ) : week = ['monday ','tuesday ','wednesday ','thursday ','friday ','saturday ','sunday'] # your code here if city = = " nyc " : # 01 - 01 - 2016 00 : 09 dt _ format = " % m / % d / % y % h : % m : % s " d1 = datetime. strptime ( datum ['starttime'], dt _ format ) month = d1. month ho... | [
-0.2887999713420868,
-0.3551376760005951,
0.9609174132347107,
-1.0436296463012695,
-0.19588053226470947,
-0.05012720078229904,
-0.6826587915420532,
-0.11438896507024765,
-0.16336116194725037,
0.8408763408660889,
-0.09268854558467865,
-0.5496469736099243,
0.26087686419487,
-0.01237013749778... |
def configure ( self, parameters ) : raise notimplementederror | [
-0.9802724719047546,
-0.12770995497703552,
0.3638756573200226,
0.4135703444480896,
0.9181974530220032,
0.2016008347272873,
-0.055200885981321335,
0.11567883938550949,
-0.21934513747692108,
0.37824735045433044,
-0.29084038734436035,
-0.3900029957294464,
-0.26437413692474365,
0.9311667084693... |
def extract _ data ( self, excel _ file, sheet _ name = none, way ='all') : # in case, only one sheet is enter if isinstance ( sheet _ name, str ) or isinstance ( sheet _ name, int ) : sheet _ name = [ sheet _ name ] # load files book = openpyxl. load _ workbook ( excel _ file ) # sheet to iterate all _ sheets = book. ... | [
-0.41112372279167175,
-0.3443707525730133,
0.7815303802490234,
0.3213918209075928,
-0.8624905943870544,
0.38060545921325684,
-0.5668551921844482,
0.8114039897918701,
-0.6518435478210449,
0.4031962454319,
-0.6146215200424194,
-0.17774057388305664,
0.11979185789823532,
1.1309497356414795,
... |
def _ search _ for _ key ( metadata, key _ variants ) : val = none for variant in key _ variants : if variant in metadata : val = metadata [ variant ] elif variant. capitalize ( ) in metadata : val = metadata [ variant. capitalize ( ) ] # if a value was found, try to parse as float if val : try : return float ( val. en... | [
0.2705208361148834,
-0.2744945287704468,
0.4807971715927124,
-0.05199701339006424,
-0.31111061573028564,
-0.22823849320411682,
-1.2437105178833008,
-0.9812687635421753,
-1.7436059713363647,
0.5681964755058289,
1.4732006788253784,
0.07535330951213837,
-0.4927099347114563,
0.2912556529045105... |
def extract _ dataset _ descriptors ( self ) : assert self. vocab is not none start = time. time ( ) self. n _ words _ in _ img = np. zeros ( self. n _ imgs ) # n _ word _ occurences [ i ] is the number of images that contain i - th word self. n _ word _ occurences = np. zeros ( self. n _ words ) self. dataset = np. ze... | [
0.06531985849142075,
0.025255024433135986,
0.5127081274986267,
-0.2143058031797409,
0.3812606632709503,
-0.877043604850769,
0.40531545877456665,
0.5624375343322754,
-0.2563566267490387,
0.5039754509925842,
0.5646283030509949,
0.7417206168174744,
0.2620692253112793,
0.9925491809844971,
0.... |
def test _ get _ digest _ canonical ( image _ config : imageconfig, image _ config _ signed : imageconfig, config _ digest _ canonical : str, config _ digest _ signed _ canonical : str, ) : assert image _ config. get _ digest _ canonical ( ) = = config _ digest _ canonical assert image _ config _ signed. get _ digest _... | [
-0.30456605553627014,
-0.5409098267555237,
0.6351948380470276,
0.5739048719406128,
0.47384440898895264,
0.4043746590614319,
0.3233955502510071,
0.06799953430891037,
-0.010235073044896126,
-0.34967243671417236,
0.21031686663627625,
0.5381640195846558,
0.6503514051437378,
0.2694544196128845,... |
def create _ family ( self, child _ gender, mom _ aff, dad _ aff ) : fam = family ('test') fam. add _ child ('child ','mother ','father ', child _ gender,'2 ','child _ vcf') fam. add _ mother ('mother ','0 ','0 ','female ', mom _ aff,'mother _ vcf') fam. add _ father ('father ','0 ','0 ','male ', dad _ aff,'father _ vc... | [
0.6235480904579163,
0.14588619768619537,
0.5287647247314453,
0.18827702105045319,
0.3327747881412506,
-0.00944135058671236,
-0.18547382950782776,
-0.28437235951423645,
-0.9053054451942444,
-0.42464479804039,
-0.6502208709716797,
-0.44514036178588867,
0.061425477266311646,
0.231577619910240... |
def build _ soup _ page ( page = " ", url = " ", use _ url = false ) : if use _ url : page = urllib2. urlopen ( url ) return beautifulsoup ( page ) else : return beautifulsoup ( page ) | [
-0.4161720275878906,
0.07120192795991898,
0.5611516237258911,
-0.07299547642469406,
0.09060272574424744,
0.2050226628780365,
-0.46752896904945374,
0.7093726396560669,
0.47326186299324036,
0.22217419743537903,
0.8182240128517151,
-0.5659505724906921,
0.08339934051036835,
-0.5205637216567993... |
def countplayers ( ) : # fetch resul from the db and format in python to meet requirements. query = " select count ( * ) from players ; " db = psycopg2. connect ( " dbname = tournament " ) c = db. cursor ( ) c. execute ( query ) result = c. fetchall ( ) db. commit ( ) db. close return result [ 0 ] [ 0 ] | [
-0.3831157386302948,
-0.3127589225769043,
0.8451492190361023,
-0.5317684412002563,
0.894343912601471,
-0.327659010887146,
0.059198666363954544,
0.4431644082069397,
-0.6264539361000061,
0.7102513313293457,
-0.2427491992712021,
-1.044978380203247,
-0.7470390200614929,
-0.6265125870704651,
... |
def split ( a, n ) : k, m = divmod ( len ( a ), n ) return [ x for x in ( a [ i * k + min ( i, m ) : ( i + 1 ) * k + min ( i + 1, m ) ] for i in range ( n ) ) ] | [
-1.0396617650985718,
0.1153535470366478,
0.32911771535873413,
0.5023373365402222,
-0.778347909450531,
-0.46355199813842773,
0.21248406171798706,
0.36862292885780334,
1.427419662475586,
0.42555928230285645,
-0.7137333750724792,
-0.14247506856918335,
-0.2134450376033783,
-0.04495703428983688... |
def generate _ trapezoid _ profile ( max _ v, time _ to _ max _ v, dt, goal ) : t _ rec = [ 0. 0 ] x _ rec = [ 0. 0 ] v _ rec = [ 0. 0 ] a _ rec = [ 0. 0 ] a = max _ v / time _ to _ max _ v time _ at _ max _ v = goal / max _ v - time _ to _ max _ v # if profile is short if max _ v * time _ to _ max _ v > goal : time _ ... | [
0.22428351640701294,
0.3734247386455536,
0.9048621654510498,
-0.22802098095417023,
-0.08173289895057678,
-0.35838383436203003,
0.021487148478627205,
-0.3080498278141022,
-0.4864586293697357,
0.8861432671546936,
-0.6328200697898865,
-0.5663578510284424,
0.7379803657531738,
-0.66233730316162... |
def phone _ number _ validator ( ph _ no ) : if not isinstance ( ph _ no, str ) : return false ph _ no = ph _ no. replace ('','' ). replace ('- ','' ). replace ( '. ','' ). replace ('( ','' ). replace (') ','' ) if ph _ no. startswith ('00') : if len ( ph _ no ) < 12 or len ( ph _ no ) > 15 : return false elif ph _ no.... | [
-0.1902540624141693,
-0.5658714175224304,
1.0370914936065674,
-0.20626702904701233,
-0.956255316734314,
0.7591212391853333,
-0.5745314359664917,
0.45769432187080383,
0.88194340467453,
-1.1432971954345703,
-0.6394752860069275,
-0.7791943550109863,
-0.2493244707584381,
0.7375082969665527,
... |
def instantiate _ ns ( self, nsname, nsdid, vimaccountid ) : osm _ url = f " https : / / { self. ip } : 9999 / osm / nslcm / v1 / ns _ instances _ content " data = " { { nsname : { 0 }, nsdid : { 1 }, vimaccountid : { 2 } } } ". format ( nsname, nsdid, vimaccountid ) while true : headers = {'content - type':'applicatio... | [
0.5093548893928528,
-0.12620601058006287,
0.5973300337791443,
-0.23393628001213074,
-0.38811421394348145,
-0.14175249636173248,
-0.9422217607498169,
-1.0480400323867798,
-0.5233982801437378,
-0.1754266321659088,
-0.6667040586471558,
1.24810791015625,
-0.9856525659561157,
-0.048923891037702... |
def text _ compare ( self, t1, t2 ) : if not t1 and not t2 : return true if t1 = ='*'or t2 = ='*': return true return ( t1 or'' ). strip ( ) = = ( t2 or'' ). strip ( ) | [
-0.41122734546661377,
-0.8372609615325928,
0.693400502204895,
-0.1020873561501503,
-1.4551441669464111,
0.6769452095031738,
-1.4887137413024902,
0.44367459416389465,
-0.753649890422821,
1.1119459867477417,
-0.33803462982177734,
0.1738322675228119,
-0.4016789197921753,
0.3229629397392273,
... |
def move _ pen ( self, position ) : self. send _ command ( servo _ clockwise _ move, ['s'+ self. format _ number ( position ) ] ) | [
-0.5772185325622559,
-0.599186360836029,
0.2110956311225891,
0.22545403242111206,
-0.02098044939339161,
0.4581586420536041,
0.5559592843055725,
-1.167663335800171,
0.06518688797950745,
0.7087028622627258,
-0.9930064678192139,
0.684321939945221,
-0.46775898337364197,
-1.0073556900024414,
... |
def init ( ) : x = ( 1, 231, 14, 61, 56, 85, 23, 87, 101, 712 ) print ( " items in tuple : " ) print ( x ) print ( " slicing elements from 5 to 8 " ) print ( x [ 4 : 8 ] ) print ( " repetition with * operator " ) print ( x * 2 ) y = ( 1, 2, 3 ) print ( " concatenation with another tuple % s " % ( y, ) ) print ( x + y ) | [
-0.872511625289917,
0.37306520342826843,
0.7246896028518677,
0.38403457403182983,
-0.05310288071632385,
-0.14223197102546692,
0.33710792660713196,
-0.006699272897094488,
-0.1334141343832016,
0.25979217886924744,
-0.3373878002166748,
-0.44436705112457275,
0.46892181038856506,
-0.55983281135... |
def _ _ init _ _ ( self, in _ planes, out _ planes, stride = 1, nsample = 16 ) : super ( ). _ _ init _ _ ( ) self. stride, self. nsample = stride, nsample if stride! = 1 : self. linear = layers. dense ( out _ planes, use _ bias = false ) self. pool = layers. maxpool1d ( nsample ) else : self. linear = layers. dense ( o... | [
1.251375436782837,
0.21889415383338928,
0.5529270768165588,
0.8291709423065186,
-0.6923748850822449,
0.5807080864906311,
0.518146276473999,
0.13750362396240234,
-0.04358798265457153,
-0.3243822455406189,
-0.24604196846485138,
-0.38156551122665405,
-0.7159774303436279,
0.6027202010154724,
... |
def call ( fn, arg ) : return fn ( arg ) | [
-0.1610337197780609,
-0.2482035905122757,
0.20966853201389313,
-0.3216194808483124,
-0.36828646063804626,
0.0330081470310688,
-1.4273803234100342,
0.8864679932594299,
-0.5570056438446045,
-0.7350040078163147,
0.4980095624923706,
0.3593853712081909,
0.9959898591041565,
-0.23769648373126984,... |
def start _ select _ roi ( img ) : global touches touches = [ ] def mouse _ fn ( event, x, y, flags, param ) : " " " function to process the user's mouse inputs " " " global regions, touch _ map if event! = 1 : # left mouse button return # no previous touches or last touch is full? add a new touch if len ( touches ) = ... | [
0.5246046185493469,
-0.6907157897949219,
0.6603160500526428,
0.1866581290960312,
0.07154287397861481,
-0.07488031685352325,
1.326154112815857,
-0.05716171860694885,
0.500309944152832,
0.07175211608409882,
-0.20913094282150269,
0.04207734391093254,
0.2751809358596802,
-0.4069233238697052,
... |
def display ( * * named ) : item = display ( * * named ) scenes. append ( item ) return item | [
0.45415621995925903,
-0.6388236880302429,
0.341399610042572,
0.10419286042451859,
-1.0975799560546875,
0.6508131623268127,
-0.8937900066375732,
-1.2122081518173218,
0.17175403237342834,
-0.19508156180381775,
-0.4064375162124634,
-0.35766929388046265,
-0.8327203392982483,
-0.541542649269104... |
def enter _ address ( self ) : self. driver. find _ element _ by _ css _ selector ( self. css _ flatno ). send _ keys ( " 11111 " ) self. driver. implicitly _ wait ( 5 ) self. driver. find _ element _ by _ css _ selector ( self. css _ street ). send _ keys ( " 11111 " ) self. driver. press _ keycode ( 61 ) self. driver... | [
-0.3586530387401581,
0.7112862467765808,
1.0444977283477783,
0.3958006501197815,
0.910553514957428,
0.33593839406967163,
1.785094141960144,
-0.4923568069934845,
1.0755664110183716,
0.05864866077899933,
0.04043829068541527,
0.2718389332294464,
-0.020298389717936516,
0.09321165084838867,
0... |
def teardownclass ( cls ) : shutil. rmtree ( os. path. join ( arc _ path,'arc ','testing ','test _ jobadapter'), ignore _ errors = true ) shutil. rmtree ( os. path. join ( arc _ path,'arc ','testing ','test _ jobadapter _ scan'), ignore _ errors = true ) | [
0.05974305421113968,
-0.5462188720703125,
0.5924563407897949,
-0.2751885950565338,
-0.07108316570520401,
0.6378559470176697,
1.3244624137878418,
0.048431627452373505,
0.6402773261070251,
-0.8273957371711731,
0.6088775396347046,
-0.013805498369038105,
-0.0926593765616417,
0.1656551212072372... |
def update _ params ( self, learning _ rate ) : # n : batch _ size, w : width, h : height, a, b, c, d : weight dimensions. input _ patches = get _ 3x3 _ patches ( self. input _ ) grad = np. einsum ( " nwhabc, nwhd - > abcd ", input _ patches, self. err ) self. weights - = learning _ rate * grad | [
0.07964298129081726,
-0.39314332604408264,
0.3755700886249542,
-0.6058294773101807,
0.005426517687737942,
0.7117725014686584,
0.2800224721431732,
-0.06695645302534103,
-0.7272302508354187,
0.5951347947120667,
0.20305785536766052,
0.17112362384796143,
-0.05101441964507103,
1.166417837142944... |
def simulate ( self, n = 100, pack = false, cutoff ='truncate') : return super ( ). _ simulate ( ( n, true, lambda r : self. kappa * ( self. theta - r ), lambda r, sigma : self. sigma * np. sqrt ( _ modify ( r, cutoff ) ) ), pack ) | [
-0.3580881953239441,
1.3217302560806274,
0.3699515163898468,
-0.019718484953045845,
-0.5811527371406555,
-0.2352634072303772,
-0.18119873106479645,
-0.48447084426879883,
0.7088248133659363,
0.6382797360420227,
-0.8372616171836853,
-0.5880213975906372,
0.02046116255223751,
-0.32754784822463... |
def compute _ theta _ phi _ range ( phys _ t, phys _ p ) : t _ min = - 0. 5 * phys _ t t _ max = 0. 5 * phys _ t p _ min = 185. 0 - phys _ p p _ max = 185. 0 return ( t _ min, t _ max, p _ min, p _ max ) | [
-0.7169893980026245,
-0.42499300837516785,
0.4089801013469696,
-0.3332391679286957,
1.0037798881530762,
0.6580603122711182,
-1.0375652313232422,
-0.08394020795822144,
-1.3534095287322998,
1.3428280353546143,
-0.4025717079639435,
0.4034533202648163,
-0.07559666037559509,
-0.8048001527786255... |
def convert _ dict _ of _ lists _ to _ html ( data ) : return render _ template _ string ( " " " { % for key, list in data. items ( ) % } < h2 > { { key } } < / h2 > < ul > { % if key! ='files'% } { % for item in list % } < li > < a href = " { { item } } " > { { item } } < / a > < / li > { % endfor % } { % else % } { %... | [
-0.3170749545097351,
0.14358198642730713,
0.6702846884727478,
-0.9564924240112305,
-0.5638977885246277,
0.3269473910331726,
-0.9026215076446533,
0.8120183944702148,
0.2226783037185669,
-0.2465142011642456,
-0.04282794147729874,
-0.9342269897460938,
0.6641845703125,
1.1287829875946045,
-0... |
def rollout ( self, z _ last, num = none, sample = false, return _ std = false, actions = none, appearance = none ) : cl = self. c. cl if num is none : num = self. c. num _ rollout z = [ z _ last ] # keep scale constant during rollout scale = z _ last [..., : 2 ] rewards = [ ] # need last z _ dyn _ std if sample or ret... | [
-0.4029487073421478,
0.2228301763534546,
0.9643997550010681,
0.15440569818019867,
-0.38862502574920654,
-0.5433930158615112,
0.8638426661491394,
0.027552226558327675,
0.49814721941947937,
0.823344886302948,
0.07998595386743546,
0.5703901052474976,
0.13687439262866974,
-0.11626303941011429,... |
def readfile ( file ) : for line in file. readlines ( ) : line = line. rstrip ( ) # remove endline parseline ( line ) | [
0.7957167029380798,
-0.3904654085636139,
0.46433544158935547,
-0.03765849769115448,
0.6946299076080322,
1.4528566598892212,
-0.9613827466964722,
1.3468208312988281,
-0.9006520509719849,
-0.4201868772506714,
0.7342285513877869,
-0.9344133734703064,
0.5890044569969177,
0.7011091709136963,
... |
def plugin _ name ( self ) : return self. _ _ class _ _. _ _ name _ _ | [
-0.5996891260147095,
-1.877637505531311,
0.8508743047714233,
0.2595169246196747,
-0.2609221637248993,
0.3520301878452301,
0.16029226779937744,
-0.7188937067985535,
1.0833408832550049,
0.19475822150707245,
-0.5917288661003113,
0.8269014954566956,
0.6217857003211975,
-0.1462942212820053,
0... |
def do _ select _ all ( self, * * kwargs ) : _ hardware _ id = kwargs ['hardware _ id'] # don't use the ramstkdatamodel. do _ select _ all ( ) method because we don't # want to clear the tree or we'll only be left with the last hardware # id passed. _ session = self. dao. ramstk _ session ( bind = self. dao. engine, au... | [
0.19968216121196747,
0.4889101982116699,
0.5691127777099609,
-0.06980385631322861,
0.5571736097335815,
-0.6158298254013062,
-0.10421542078256607,
-1.0055015087127686,
0.1748276799917221,
0.17485108971595764,
-0.0699261948466301,
0.17270462214946747,
-0.6183068156242371,
0.9185274839401245,... |
def exclusions _ equal ( ex1, ex2 ) : if len ( ex1 [ " segments " ] )! = len ( ex2 [ " segments " ] ) : return false if len ( ex1 [ " circles " ] )! = len ( ex2 [ " circles " ] ) : return false for slist1, slist2 in zip ( ex1 [ " segments " ], ex2 [ " segments " ] ) : if len ( slist1 )! = len ( slist2 ) : return false ... | [
0.06721914559602737,
-0.13864745199680328,
0.9437144994735718,
-0.4598604142665863,
-0.4123891294002533,
0.5382127165794373,
-0.13093096017837524,
-0.465737521648407,
0.6984637975692749,
0.982765257358551,
-0.8246756196022034,
0.6549863219261169,
-0.33757421374320984,
-0.8683791756629944,
... |
def remote _ list _ files ( path = '.') : # - l ensures symlinks are followed and output as filenames too lslines = run ( f " find - l { path } - mindepth 1 - type f - printf'% p \ n'" ) if not lslines. succeeded : raise exception ( " failed to list remote files : % s " % lslines ) filepaths = lslines. splitlines ( ) f... | [
0.3971756398677826,
-0.245944082736969,
0.7095546722412109,
0.1299009770154953,
-0.5093056559562683,
0.12776398658752441,
-0.4414598345756531,
0.19050143659114838,
0.5112403035163879,
0.23731468617916107,
-0.7578698992729187,
0.5571863055229187,
-0.9644113779067993,
0.7514655590057373,
-... |
def sample _ ingredient ( user, name ='sample ingredient') : return ingredient. objects. create ( user = user, name = name ) | [
0.8106918334960938,
-0.352659672498703,
0.21506664156913757,
0.4732479751110077,
-1.6447144746780396,
0.3045291304588318,
-0.3206976652145386,
-0.18338702619075775,
0.1578669250011444,
0.6831754446029663,
-0.5379451513290405,
0.3987460434436798,
-0.49633100628852844,
-1.1983588933944702,
... |
def currency _ calculator ( foreign _ currency, dollar _ amount ) : if foreign _ currency = = 1 : from currency import to _ euro conversion = to _ euro ( dollar _ amount ) print ( " it is converted to ", conversion,'euros') elif foreign _ currency = = 2 : from currency import to _ yen conversion = to _ yen ( dollar _ a... | [
-0.14060771465301514,
0.2906583249568939,
0.5956567525863647,
0.5380987524986267,
0.12513044476509094,
-0.04321533441543579,
1.04801607131958,
-0.3771970272064209,
-0.05672333389520645,
0.3990025520324707,
-0.05736901983618736,
-0.4899534285068512,
0.4086797535419464,
0.4554208219051361,
... |
def upload _ file _ if _ missing ( bucket _ name : str, file _ path : pathorstring ) - > uri : with open ( file _ path,'rb') as f : file _ bytes = f. read ( ) return upload _ bytes _ if _ missing ( bucket _ name, file _ bytes ) | [
0.17051374912261963,
0.2251957207918167,
0.6561110019683838,
-0.16630634665489197,
0.49238458275794983,
-0.10225836932659149,
-0.5438755750656128,
-0.11678600311279297,
-1.32777738571167,
0.24912969768047333,
-0.13207685947418213,
-0.6168919801712036,
-0.20666000247001648,
-0.5540135502815... |
def send ( self, client ) : logging. debug ('received % s response : % s ', type ( self ). _ _ name _ _, self ) try : client. api _ call ( self. api _ method, * * self. to _ dict ( ) ) except exception as e : logging. error ('error sending response : % s, % s ', self, e, exc _ info = true ) | [
-0.8596599698066711,
-0.5655235648155212,
0.2566150426864624,
-0.6706529855728149,
0.17814289033412933,
-0.2827157974243164,
-0.018833132460713387,
-0.5718781352043152,
-0.5003502368927002,
0.4310360252857208,
-0.7924254536628723,
-0.3342796266078949,
-0.21892142295837402,
-0.3238628208637... |
def _ get _ countries _ by _ codes ( self, code _ list ) : countries = [ ] for code in code _ list. split ( ',') : if code : try : with transaction. atomic ( ) : instance, created = country. objects. get _ or _ create ( code = code ) except integrityerror : try : instance, created = country ( code = code ). save ( ), t... | [
-0.10211002826690674,
0.9103007316589355,
0.32318979501724243,
0.7140066623687744,
1.0597248077392578,
0.11178988218307495,
-0.3749544024467468,
-0.11142348498106003,
0.08919946849346161,
0.7181597948074341,
-0.14825856685638428,
-1.0533267259597778,
-0.9356935024261475,
0.8023773431777954... |
async def leave ( self, ctx ) : self. _ now _ playing = none await ctx. voice _ client. disconnect ( ) | [
0.3694065511226654,
-0.1946263462305069,
0.35548925399780273,
-0.5472688674926758,
0.5351262092590332,
0.6771877408027649,
-0.7599800825119019,
-0.504665732383728,
0.561164140701294,
-0.33903026580810547,
0.11899461597204208,
0.28186526894569397,
-1.5820714235305786,
-0.2937701344490051,
... |
def train ( self, xtrain, ytrain ) : n = len ( ytrain ) m = len ( xtrain [ 0 ] ) b = 0 w = numpy. ones ( m, dtype = numpy. float64 ) count = 0 pp = pprint. prettyprinter ( indent = 4 ) counts = [ ] llscores = [ ] accs = [ ] etas = [ ] bvals = [ ] for i in range ( self. totaliterations ) : print " iteration = % d " % i ... | [
0.23983067274093628,
-0.04663050174713135,
0.8377313017845154,
-0.6852806806564331,
-0.36880889534950256,
-0.28796154260635376,
0.7931815981864929,
0.026906272396445274,
-0.3996305763721466,
0.647509753704071,
0.46414607763290405,
0.9886335730552673,
-0.06433629989624023,
0.583994507789611... |
def main ( args ) : # load dataset, and optionally shuffle. dataset = qadataset ( args, args. path ) samples = dataset. samples if args. shuffle : random. shuffle ( samples ) vis _ samples = samples [ : args. samples ] print ( ) print ('-'* rule _ length ) print ( ) # visualize samples. for ( qid, context, question, an... | [
0.4093170762062073,
0.25075477361679077,
0.8277319073677063,
-1.1490594148635864,
-0.08778136968612671,
0.44972866773605347,
0.49689605832099915,
-0.05915488302707672,
0.26567351818084717,
0.17653998732566833,
1.060352087020874,
1.1727948188781738,
0.9337738156318665,
-0.3888271749019623,
... |
def info _ msg _ box ( self, text, title ) : msg = qmessagebox ( ) msg. seticon ( qmessagebox. information ) msg. setwindowtitle ( title ) msg. settext ( text ) x = msg. exec _ ( ) | [
0.45324674248695374,
0.38109666109085083,
0.5654531121253967,
-0.7097322940826416,
-0.34521573781967163,
-0.014709034003317356,
-0.4146612286567688,
-0.733034074306488,
-0.526211142539978,
-0.6479334235191345,
-0.4301975667476654,
1.095749855041504,
-0.41666871309280396,
0.532656729221344,... |
def filter _ indices _ by _ size ( self, indices, max _ sizes ) : # print ( indices ) if isinstance ( max _ sizes, float ) or isinstance ( max _ sizes, int ) : if hasattr ( self, " sizes " ) and isinstance ( self. sizes, np. ndarray ) : ignored = indices [ self. sizes [ indices ] > max _ sizes ]. tolist ( ) indices = i... | [
-0.8459754586219788,
0.10046486556529999,
0.6089093685150146,
0.10394606739282608,
-0.035805001854896545,
-0.12528856098651886,
0.1003529503941536,
-0.6577373743057251,
0.4377448260784149,
0.2169320434331894,
0.4849297106266022,
0.4291786551475525,
-0.7391854524612427,
0.037313077598810196... |
def measure _ all ( self, ft _ channel = 5, pump _ id = 5 ) : measure _ all _ dictionary = dict ( ) try : measure _ all _ dictionary [ " pwm _ settings " ] = true, self. get _ pwm _ settings ( ) except exception : measure _ all _ dictionary [ " pwm _ settings " ] = false, " cannot get pwm settings " try : measure _ all... | [
-0.4529338777065277,
-0.29090893268585205,
0.7037934064865112,
-0.3968327045440674,
-0.27111703157424927,
0.07080542296171188,
-0.2511177659034729,
-0.34579721093177795,
-0.8543913960456848,
-0.039170872420072556,
-0.4299605190753937,
-0.4287145733833313,
-0.11185778677463531,
1.8766540288... |
def addroottopackage ( self, package ) : rootpackage = util. getprojectroot ( self. rootdirectory ) if len ( package ) > 0 : return " { }. { } ". format ( rootpackage, package ) else : return rootpackage | [
-0.12222035229206085,
0.2893417477607727,
0.6468475461006165,
0.3389708995819092,
0.2558104395866394,
0.6827969551086426,
-0.32399412989616394,
-0.09412837028503418,
1.492586374282837,
-0.39181822538375854,
1.1926593780517578,
-0.00925838015973568,
-0.488605260848999,
0.6590144038200378,
... |
def test _ project _ sprint _ view ( self ) : target = project. objects. create ( name ='test project ', slug ='test _ project') sp1 = sprint. objects. create ( project = target, number = 1 ) response = self. client. get ('/ backlog / project / test _ project / sprint / % d /'% sp1. number ) self. failunlessequal ( 200... | [
0.3215143084526062,
0.7277000546455383,
0.45678016543388367,
0.35724759101867676,
0.21400810778141022,
0.7086442112922668,
0.19669993221759796,
0.26813408732414246,
0.003750263713300228,
-0.9784315824508667,
0.580213189125061,
0.4996919333934784,
-0.27015119791030884,
0.12995634973049164,
... |
async def test _ process _ binary ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", value _ type = " binary ", group _ address = " 1 / 2 / 3 " ) expose _ sensor. sensor _ value. value = true telegram = telegram ( groupaddress ( " 1 / 2 / 3 " ), payload = groupvalueread ( ) ) await expose... | [
0.08078441023826599,
1.0916489362716675,
0.5865898728370667,
0.027794644236564636,
-0.15884533524513245,
0.3364385664463043,
-0.02230367809534073,
-1.03115975856781,
-0.09224805980920792,
-0.2313578724861145,
-0.5758212804794312,
0.12196677178144455,
-0.371420294046402,
-0.0727595016360282... |
def flap _ type ( self ) : return self. _ _ flap _ type | [
0.1751098334789276,
0.6462857723236084,
0.5381492376327515,
0.8969546556472778,
-0.35877516865730286,
1.7690589427947998,
0.6015230417251587,
-0.7315182685852051,
1.399013876914978,
-1.021230936050415,
-0.07625211775302887,
1.564881443977356,
-0.13285914063453674,
1.1675941944122314,
0.4... |
def cleanse _ pymodule _ filename ( filename ) : filename = re. sub ( r'^ [ ^ a - za - z _ ] ', " _ ", filename ) filename = re. sub ( r'[ ^ a - za - z0 - 9 _ ] ', " _ ", filename ) return filename | [
-1.4042915105819702,
-1.4803484678268433,
0.591436505317688,
-0.6980571746826172,
0.13139136135578156,
0.4311830997467041,
0.08821865171194077,
0.7456580400466919,
-0.29286351799964905,
0.7163611054420471,
-0.43387484550476074,
0.4110455811023712,
0.4033840298652649,
0.698090672492981,
1... |
def assymetric _ cut _ energy _ correction ( crystal : str ='si ', energy : float = 11, miller : list = [ 2, 2, 0 ], alpha : float = 12. 37 ) - > tuple [ float, float ] : import scipy. constants as cte from scipy. optimize import newton from scipy. interpolate import interp1d target = energy crystal _ dict = xraylib. c... | [
0.3014753758907318,
-0.08857256174087524,
0.9820224046707153,
-0.33694976568222046,
-0.2205774337053299,
-0.5056463479995728,
0.5226052403450012,
0.4333164691925049,
-0.12144259363412857,
1.2406927347183228,
-0.0780230239033699,
0.05368303880095482,
-0.0779934674501419,
-0.1553543657064438... |
def train ( self ) : record _ dir = self. _ train _ or _ eval ( self. _ train _ model _ properties, self. _ num _ train _ steps, is _ training = true ) if record _ dir : # we delete the record _ dir because each cycle, new tfrecords is generated # by the async process. tf. gfile. deleterecursively ( record _ dir ) | [
-0.285411536693573,
1.018820881843567,
0.2379993200302124,
0.2292928248643875,
0.8402636051177979,
-0.5354597568511963,
0.9526854157447815,
0.7657083868980408,
-1.116025447845459,
-0.16019095480442047,
0.11630311608314514,
0.2378467321395874,
0.11084125190973282,
0.39381173253059387,
-0.... |
def linear ( xs, ys, full = false ) : # optimization of polyfit, since linear regression is the most common one. sxs = sum ( xs ) cs = numpy. linalg. solve ( [ [ len ( xs ), sxs ], [ sxs, sum ( xs * * 2 ) ] ], [ sum ( ys ), sum ( xs * ys ) ] ) def g ( x ) : return cs [ 0 ] + cs [ 1 ] * x if full : return ( g, cs [ : : ... | [
0.8057864308357239,
0.3036321699619293,
0.5879046320915222,
-0.6567273139953613,
-0.36066383123397827,
-0.49749356508255005,
-0.26244741678237915,
-0.4754568040370941,
0.13045690953731537,
0.1153278723359108,
-0.9774123430252075,
0.19277843832969666,
0.2862103283405304,
-1.014137625694275,... |
def predict ( self, x ) - > np. ndarray : two _ class _ preds = logisticregression. predict _ proba ( self = self, x = self. transform _ input ( x, force = false ) ) one _ class _ preds = two _ class _ preds [ :, self. classes _. tolist ( ). index ( true ) ] return one _ class _ preds | [
-1.5120158195495605,
-0.35269057750701904,
0.6979789137840271,
0.2278820425271988,
0.46596771478652954,
0.08807357400655746,
-0.599897563457489,
-0.4603134095668793,
0.40254923701286316,
-0.2981347143650055,
-0.660390317440033,
0.9200025796890259,
-0.24505870044231415,
-0.23694078624248505... |
def alreadyin ( state, statelist ) : for s in statelist : if state = = s : return true return false | [
-0.31293731927871704,
-0.528560996055603,
0.5015578269958496,
0.18203625082969666,
-0.5027785897254944,
-0.29858219623565674,
-0.9596534371376038,
0.4661813974380493,
0.6070175766944885,
0.764434278011322,
-1.1779688596725464,
0.15110638737678528,
-0.1965044140815735,
0.7971939444541931,
... |
def testgetvaluesforquerywithfluiddbidtag ( self ) : securetagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) objectid = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid : { u'username / tag': 12 } } securetagvalueapi ( self. user ). set (... | [
-0.18589936196804047,
-0.33908718824386597,
0.43276670575141907,
-0.1899542659521103,
0.5942259430885315,
0.19434137642383575,
-0.10818406194448471,
-0.4789729714393616,
-0.4160690903663635,
-1.1004748344421387,
-1.0261794328689575,
-0.52537602186203,
-0.07341907173395157,
0.27334117889404... |
def _ validatefile ( self ) : self. app. statusbar. showmessage ('importing har file...') self. import _ start = time. time ( ) # catch decoding issues try : with open ( self. har _ path,'r ', encoding ='utf - 8 - sig') as har _ file : self. har _ raw = json. load ( har _ file ) except json. decoder. jsondecodeerror : ... | [
0.5762328505516052,
-0.2830275893211365,
0.5964679718017578,
-0.04236946254968643,
0.21349629759788513,
0.7300957441329956,
0.6861896514892578,
0.5186975002288818,
-1.040677547454834,
0.01692129671573639,
0.4601818919181824,
-0.30169788002967834,
0.3771840035915375,
0.4856260120868683,
1... |
def main ( argv ) : ops = {'deploy _ challenge': create _ txt _ record,'clean _ challenge': delete _ txt _ record,'deploy _ cert': deploy _ cert,'unchanged _ cert': unchanged _ cert, } logger. info ( " + ( hook ) executing : { 0 } ". format ( argv [ 0 ] ) ) ops [ argv [ 0 ] ] ( argv [ 1 : ] ) | [
-0.3915036618709564,
-0.09256713837385178,
0.6167954802513123,
0.7208656072616577,
1.2194246053695679,
0.49430567026138306,
0.8491036891937256,
0.6152396202087402,
-0.9039316773414612,
1.3307843208312988,
0.1626003086566925,
0.14904624223709106,
0.08806473016738892,
-0.22548137605190277,
... |
def write ( self, data, offset = 0, length = none ) : if length is none : length = len ( data ) if length < 1 : return self. bind ( ) # we need to cast to bytes, because bytearray gives weird. self. ctx. glbuffersubdata ( self. target, offset, length, bytes ( data ) ) | [
-0.5232661962509155,
0.014115696772933006,
0.7071341276168823,
-0.26119720935821533,
0.11319870501756668,
0.921925961971283,
-0.39629238843917847,
-0.409605473279953,
0.9440603256225586,
-0.8546645641326904,
-0.7814016938209534,
0.9249586462974548,
-0.6381973028182983,
-0.27132469415664673... |
def get _ descriptors _ text ( dl ) : uri _ regex = r'\ w + : ( \ /? \ /? ) [ ^ \ s ] +'dl = list ( filter ( lambda x : x is not none, dl ) ) return list ( filter ( lambda x : not re. match ( uri _ regex, x ), dl ) ) | [
-0.5778234004974365,
-0.8736109137535095,
0.5405688285827637,
-0.13982495665550232,
-0.43327760696411133,
-0.43326884508132935,
-0.9644989371299744,
0.9251194596290588,
0.3602522909641266,
0.7159997224807739,
-0.19768138229846954,
-0.21719425916671753,
-0.46840977668762207,
0.2585071623325... |
def subselect _ nmin ( ds, props ) : nmin = props ['nmin'] hmin = props ['hmin'] # nb of valid data for each profile : # len ( ds ['n _ levels'] ) - ds ['potm _ obs']. isnull ( ). sum ('n _ levels') n = ds ['potm _ obs']. notnull ( ). sum ('n _ levels') # print n ds ['n'] = n # thickness of the valid points layer : h =... | [
-0.13109220564365387,
-0.5580548644065857,
0.6030546426773071,
-0.2970132827758789,
-0.42885416746139526,
0.16208209097385406,
-0.272899866104126,
-0.4251745045185089,
-0.03341129422187805,
-0.012118595652282238,
0.20562368631362915,
0.9164015650749207,
0.054437145590782166,
-0.55258584022... |
def builddict ( self, words ) : for word in words : for i in range ( len ( word ) ) : key ='{ 0 }, { 1 } '. format ( word [ : i ], word [ i + 1 : ] ) if key not in self. words : self. words [ key ] = set ( ) # add char to distinct word if its same self. words [ key ]. add ( word [ i ] ) | [
-0.6472130417823792,
0.15367360413074493,
0.42567646503448486,
-1.0658502578735352,
0.10037806630134583,
0.04998832568526268,
0.27239763736724854,
0.2831808030605316,
-0.07067526876926422,
0.8162067532539368,
-0.18623226881027222,
0.42782285809516907,
-0.29856881499290466,
0.51337724924087... |
def validate _ csv _ file ( self, file _ object, headers, file _ name ) : csv _ file = csv. dictreader ( file _ object ) if csv _ file. fieldnames is none : raise exception ('the { } file is invalid ; no headers present. '. format ( file _ name ) ) csv _ headers = set ( csv _ file. fieldnames ) required _ headers = set... | [
0.512140154838562,
-0.6515008807182312,
0.7312266826629639,
-0.09274197369813919,
-0.6644703149795532,
0.6942829489707947,
-0.3082156181335449,
0.017586607486009598,
-0.8093892335891724,
-0.3557823896408081,
0.3411431610584259,
-0.3595643937587738,
0.39651116728782654,
-0.02309870161116123... |
def data _ disks ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input ['launchtemplatedatadiskargs'] ] ] ] : return pulumi. get ( self, " data _ disks " ) | [
-0.1736074686050415,
0.705762505531311,
0.5278903245925903,
-0.07414565235376358,
0.7900546789169312,
0.8253850936889648,
-0.2628171145915985,
0.5493059754371643,
0.47048839926719666,
-0.619288444519043,
-1.037960171699524,
0.9782617688179016,
0.44800877571105957,
-0.440028578042984,
-0.... |
def extract _ by _ squares _ with _ annotation ( self, gray, fname, retry = true, extension = 6 ) : base _ fn = fname. rsplit ( ". ", 1 ) [ 0 ] retry _ img = gray. copy ( ) img = gray. copy ( ) gray = cv2. cvtcolor ( gray, cv2. color _ bgr2gray ) # apparently this does not generalize well for very large resolutions h, ... | [
0.09970199316740036,
-0.00190318888053298,
1.0247654914855957,
0.633918046951294,
-0.6129772067070007,
-0.5373919606208801,
0.8650045394897461,
-0.6123220324516296,
1.1352766752243042,
0.42038142681121826,
-0.5377196669578552,
-0.15274038910865784,
0.48002877831459045,
0.7846856117248535,
... |
def get _ model ( hidden _ size, optimizer, dropout ) : model = sequential ( ) model. add ( simplernn ( hidden _ size, input _ shape = ( none, vocab _ size ), return _ sequences = true, dropout _ w = dropout, dropout _ u = dropout ) ) model. add ( dense ( vocab _ size ) ) model. add ( activation ( " softmax " ) ) model... | [
0.6238864660263062,
0.2963070869445801,
0.6560519933700562,
0.7634990811347961,
0.22876687347888947,
-0.1590416133403778,
-0.3848915696144104,
0.3353836238384247,
0.22800907492637634,
-0.00756114860996604,
-1.1757502555847168,
0.855739951133728,
0.4094686806201935,
-0.05369795113801956,
... |
def test _ get _ children _ alias ( self ) : pass | [
0.5295339822769165,
0.0954393818974495,
0.5217914581298828,
1.0482736825942993,
0.25437572598457336,
0.721794843673706,
1.131314992904663,
0.13667897880077362,
-0.9400952458381653,
-1.304670810699463,
-1.1765128374099731,
0.03275110200047493,
-0.24968849122524261,
0.08431515097618103,
-0... |
def unate _ cover ( self, primes, ones ) : chart = [ ] for one in ones : column = [ ] for i in range ( len ( primes ) ) : if ( one & ( ~ primes [ i ] [ 1 ] ) ) = = primes [ i ] [ 0 ] : column. append ( i ) chart. append ( column ) covers = [ ] if len ( chart ) > 0 : covers = [ set ( [ i ] ) for i in chart [ 0 ] ] for i... | [
-0.965164065361023,
0.09866788983345032,
0.9405747056007385,
0.23519471287727356,
-0.8111223578453064,
-0.5402337312698364,
1.162429690361023,
0.13136374950408936,
1.2931385040283203,
0.430405855178833,
-0.7835661172866821,
-0.6811801195144653,
-0.2947724163532257,
0.22818607091903687,
-... |
def create _ spark _ session ( ) : spark = sparksession \. builder \. config ( " spark. jars. packages ", " org. apache. hadoop : hadoop - aws : 2. 7. 0 " ) \. getorcreate ( ) return spark | [
0.4146024286746979,
-0.2554458677768707,
0.38357365131378174,
0.33597519993782043,
0.040062837302684784,
0.04924123361706734,
0.12349511682987213,
-0.21318820118904114,
1.0946526527404785,
-0.9962636828422546,
0.026812177151441574,
-0.32043716311454773,
-0.27016884088516235,
-0.01213417481... |
def get _ templatetag _ libraries ( self, custom _ libraries ) : libraries = get _ installed _ libraries ( ) libraries. update ( custom _ libraries ) return libraries | [
-0.22796447575092316,
-1.1309269666671753,
-0.006659060250967741,
-0.11730462312698364,
0.36108019948005676,
-0.4050295352935791,
-0.6387353539466858,
-0.3766447603702545,
0.3397424519062042,
0.33645614981651306,
-0.7009937167167664,
-0.65822434425354,
-0.7188524603843689,
0.82700383663177... |
def evaluate _ model ( model _ predict, benchmark _ path, equation _ idx, num _ test _ points, pointwise _ acc _ rtol, pointwise _ acc _ atol ) : # dataset = load _ dataset ( path ) gt _ equation, num _ variables, supp = get _ robust _ data ( eq, cfg ) print ( f'gt _ equation : { gt _ equation }') metrics = {'gt _ equa... | [
0.056912850588560104,
0.060482174158096313,
0.6695232391357422,
-0.37208959460258484,
-0.03360523283481598,
0.1315959393978119,
0.6107732057571411,
-0.31038373708724976,
-0.5944633483886719,
1.0282037258148193,
0.3596588671207428,
0.410695880651474,
0.8177716135978699,
-0.30193403363227844... |
def lookup ( self, name ) : for scope in reversed ( self. scopes ) : if name in scope : return scope [ name ] return none | [
-0.5414771437644958,
-0.7598804235458374,
0.7143166065216064,
-0.7019981741905212,
-0.4876789152622223,
-0.804519772529602,
-0.2021072506904602,
-1.3474699258804321,
0.07153666019439697,
1.3655266761779785,
0.41542956233024597,
0.545050323009491,
-0.6259145736694336,
-0.1096830740571022,
... |
def waitforresponse ( self, id, timeout = defaulttimeout ) : self. _ expected [ id ] = none has _ timed _ out = 0 abort _ time = time. time ( ) + timeout self. debug ( " waiting for id : % s with timeout % s... " % ( id, timeout ),'wait') while not self. _ expected [ id ] : if not self. process ( 0. 04 ) : self. _ owne... | [
0.11513115465641022,
-0.8152232766151428,
0.49707236886024475,
-1.1069040298461914,
-0.0025559209752827883,
-0.5710668563842773,
-0.704951822757721,
-0.8457193970680237,
1.2798200845718384,
-0.1924251914024353,
0.2044445425271988,
-0.13598495721817017,
-0.8531768918037415,
-0.8779711723327... |
def get _ geoweights ( beta, delta, xmat ) : # begin by calculating beta _ x, an s x h matrix : # each row has the sum over k of beta [ s _ i, k ] * x [ h _ j, k ] # for each household where s _ i is the state in row i # each column is a specific household beta _ x = np. dot ( beta, xmat. t ) # add the delta vector of ... | [
0.1624523401260376,
0.38895368576049805,
0.6521255970001221,
-0.39411023259162903,
0.7617437839508057,
0.6226974129676819,
-0.08131798356771469,
0.7692329287528992,
-1.1752609014511108,
0.2564440071582794,
-0.4261886179447174,
0.23936358094215393,
0.024644318968057632,
0.1584574580192566,
... |
def preparetasks ( self, ticketsbyid ) : | [
-0.1283300369977951,
0.13730667531490326,
0.255572646856308,
0.5870841145515442,
-0.23827917873859406,
-0.27665841579437256,
0.8106274604797363,
0.24237202107906342,
0.7908818125724792,
0.2523106038570404,
-1.877759575843811,
-1.2069931030273438,
0.66281658411026,
0.7195348739624023,
-1.... |
def close _ file ( fp _ id ) : if fp _ id! = none : fp = pop _ object ( fp _ id ) fp. close ( ) | [
0.9585962891578674,
-1.0843706130981445,
0.48671281337738037,
-0.007330307736992836,
-0.005723975133150816,
0.6728689670562744,
0.32961615920066833,
0.04237734526395798,
-0.5858988761901855,
0.21341273188591003,
0.19596165418624878,
-0.665732204914093,
0.08505716919898987,
0.51283407211303... |
def _ getvelocities ( self ) : if self. _ velocs is not none : indices = self. _ traj. _ indices if indices is none : return self. _ velocs else : return self. _ velocs [ indices ] | [
0.012343814596533775,
0.4851389229297638,
0.4372696578502655,
0.39513474702835083,
0.6792389750480652,
-0.43423616886138916,
0.08073089271783829,
-1.1184895038604736,
0.8216913938522339,
-0.13545538485050201,
0.2286054491996765,
-0.42105963826179504,
0.18494457006454468,
-0.120131134986877... |
def create _ request _ table ( self ) - > none : cur = self. db. connection. cursor ( ) try : cur. execute ( " create table if not exists request ( " " req _ id integer auto _ increment, " " tid integer, " " uid integer, " " sid integer, " " create _ date datetime default current _ timestamp null, " " last _ update tim... | [
-0.5689201354980469,
-0.20784099400043488,
0.7258533239364624,
0.41505053639411926,
1.078454613685608,
0.20261920988559723,
0.16638988256454468,
-0.829288125038147,
-0.6176393032073975,
-0.329115629196167,
0.255690336227417,
-0.012534933164715767,
-0.34052589535713196,
0.6479813456535339,
... |
def get _ team ( self, team _ id ) : # send request url = self. base _ url + " team / " + str ( self. game ) + ". l. " + str ( self. league ) + ". t. " + str ( team _ id ) + " / " response = self. get ( url, format ='xml') # convert xml text into object and return the outer team tag return et. fromstring ( response ) \... | [
0.15136028826236725,
0.16071276366710663,
0.41668522357940674,
-0.34784284234046936,
0.02746041677892208,
-0.4496132731437683,
-1.1044402122497559,
-0.5722036957740784,
0.3285803496837616,
-0.0749291330575943,
-0.2318490594625473,
0.9803577065467834,
-0.45251306891441345,
0.167835399508476... |
def children ( self ) - > iterable [ phraseentity ] : yield from self. lines | [
0.748378574848175,
-1.0913443565368652,
0.4735511243343353,
-0.7931792736053467,
0.14080402255058289,
0.7061666250228882,
-0.9762361645698547,
-0.06304243206977844,
-0.07648958265781403,
-0.554275631904602,
0.3884599208831787,
-0.4422827363014221,
0.14295119047164917,
0.5043331980705261,
... |
async def put _ complicated ( self, complex _ body : " models. salmon ", * * kwargs ) - > none : cls = kwargs. pop ('cls ', none ) # type : clstype [ none ] error _ map = { 404 : resourcenotfounderror, 409 : resourceexistserror } error _ map. update ( kwargs. pop ('error _ map ', { } ) ) content _ type = kwargs. pop ( ... | [
-1.218440055847168,
-0.33805176615715027,
0.944232702255249,
-0.11922220885753632,
0.034211721271276474,
-0.18623514473438263,
0.15073709189891815,
-0.06927543878555298,
0.18910349905490875,
0.35886189341545105,
-0.9579098224639893,
0.6945749521255493,
-0.4757247269153595,
-0.5505302548408... |
def process _ value _ for _ verification ( self, bucket _ col, doc _ gen _ list, results, buckets = none ) : for collection in bucket _ col : self. log. info ( " validation started for collection % s " % collection ) gen _ load = doc _ gen _ list [ collection ] self. validate _ dict = { } self. deleted _ key = [ ] doc ... | [
-0.30611082911491394,
-0.43749114871025085,
0.6687730550765991,
0.19790895283222198,
0.016360515728592873,
0.10252052545547485,
0.38934627175331116,
-0.6024661660194397,
-0.7364053130149841,
0.0007850259426049888,
-0.6301959753036499,
0.047407716512680054,
-0.20624232292175293,
0.768650531... |
def assemble ( self ) : result = np. zeros ( self. shape ) for index in np. ndindex ( * self. num _ blocks ) : lower = self. compute _ block _ lower ( index ) upper = self. compute _ block _ upper ( index ) result [ [ slice ( l, u ) for ( l, u ) in zip ( lower, upper ) ] ] = op. context. pull ( np. ndarray, self. block... | [
-0.6882501244544983,
-1.118277907371521,
0.5525146126747131,
0.08357861638069153,
-0.01772502437233925,
-0.30617284774780273,
0.5519328117370605,
-0.6105718016624451,
-0.20756296813488007,
0.5545057654380798,
0.02970525436103344,
0.41021624207496643,
-0.2814769446849823,
-0.179602816700935... |
def get _ dimensions ( self ) : return self. maze. shape | [
0.28814440965652466,
0.5992335081100464,
0.40677616000175476,
0.9464842677116394,
0.23374399542808533,
0.1644746959209442,
1.402598261833191,
0.30425193905830383,
0.05681137368083,
-0.368148535490036,
-0.686729371547699,
-0.6898050904273987,
-0.801245391368866,
0.39408984780311584,
0.393... |
def scanserverdlls ( config, distribution, output _ dir ) : print " scanning for server dlls in " + output _ dir registered _ dll _ list = [ ] scandllsinsection ( config,'general ', output _ dir, registered _ dll _ list ) if distribution : if len ( distribution ) > 1 and distribution [ 0 ] = ='_': distribution = distri... | [
-1.2349539995193481,
-0.4861066937446594,
0.396183580160141,
0.3441227078437805,
-0.49092480540275574,
-0.44383034110069275,
-0.29081353545188904,
-0.23028840124607086,
0.3551829755306244,
0.6330183148384094,
-0.4832966923713684,
1.0260076522827148,
-0.06827232241630554,
1.2704191207885742... |
def test _ cant _ create _ driver _ missing _ or _ invalid _ params ( self ) : json _ response = api _ call ( self, " post ", " / driver / create ", dict ( ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 400 ) self. assertequal ( json _ response [ " message " ], " missing first _ name " ) json... | [
-0.8252184391021729,
-0.5330620408058167,
0.9601840376853943,
0.3375442922115326,
0.8519051671028137,
0.2592022120952606,
-0.24291707575321198,
-0.30615198612213135,
-0.5683671832084656,
-0.07173410803079605,
-0.4618973731994629,
-0.7125880718231201,
-0.1918918788433075,
1.1905040740966797... |
def predict ( inputs : pipe. spec. input _ model ) : return pipe ( inputs ) | [
-0.35737213492393494,
-0.6120039820671082,
0.18618881702423096,
0.1849726438522339,
-0.6102198362350464,
0.3683835566043854,
-0.3016176223754883,
0.43403324484825134,
-1.3136035203933716,
-0.8822922706604004,
0.1678079217672348,
0.4973547160625458,
-0.04820166900753975,
-0.0660578161478042... |
def freq _ to _ channel ( freq ) : if 2412000000 < = freq < = 2472000000 : return 1 + int ( ( freq - 2412000000 ) / ( 5 * 1000000 ) ) if freq = = 2484000000 : return 14 if 5035000000 < = freq < = 5825000000 : return 7 + int ( ( freq - 5035000000 ) / ( 5 * 1000000 ) ) return none | [
-0.4119213819503784,
0.4137808680534363,
0.7993931174278259,
-1.0805692672729492,
-0.004990789107978344,
-1.1914175748825073,
0.9817346930503845,
-0.35647422075271606,
0.435001939535141,
-0.45099586248397827,
0.552433431148529,
0.2298421859741211,
-0.7010676264762878,
0.4653373658657074,
... |
def top _ correlation _ to _ name ( stocks, column _ name, searchstring, top = 5 ) : incl = [ x for x in list ( stocks ) if x not in column _ name ] # # # first drop all na rows since they will mess up your correlations. stocks. dropna ( inplace = true ) # # # now find the highest correlated rows to the selected row # ... | [
-0.38087931275367737,
0.021865375339984894,
0.7922079563140869,
-1.0302772521972656,
-0.4459690451622009,
-0.9402140974998474,
1.202812910079956,
-0.6457792520523071,
0.45519277453422546,
0.5332611203193665,
0.38184046745300293,
0.21603527665138245,
0.6980742812156677,
-0.27470582723617554... |
def toggle _ location _ services ( self ) : self. execute ( command. toggle _ location _ services, { } ) return self | [
-1.2575312852859497,
-0.22560998797416687,
0.5321460366249084,
0.4315754473209381,
0.3458126187324524,
1.0987980365753174,
0.8790796995162964,
0.21636685729026794,
0.9658869504928589,
-0.8616728186607361,
0.6418564915657043,
0.8213428854942322,
-0.648285984992981,
0.08846329152584076,
-0... |
def query _ and _ save ( self, query, fileout, print _ time = true ) : fileformat = fileout. split ( '.') [ - 1 ] mode = fileformat if fileformat in options _ out : pass else : print ( colored ('\ nfile format not valid. \ n ','red') ) print ('supported formats : \ n') for jj, ff in enumerate ( options _ out ) : print ... | [
-0.08037181198596954,
-0.1027679294347763,
0.9007282853126526,
0.4730244278907776,
0.01624617911875248,
0.032310597598552704,
0.3059842586517334,
-0.4843302369117737,
-1.022649884223938,
0.04733659327030182,
0.6358588933944702,
0.23268479108810425,
-0.21125595271587372,
0.9878683090209961,... |
def group _ files _ by _ barcode ( barcoded _ files ) : print ( " grouping files by barcode " ) dxfiles = [ dxpy. dxfile ( item ) for item in barcoded _ files ] sample _ dict = { } for dxfile in dxfiles : props = dxfile. get _ properties ( ) barcode = props [ " barcode " ] # will be noindex if non - multiplex ( see bcl... | [
0.05367530509829521,
-0.18400177359580994,
0.3068850040435791,
-0.5475360751152039,
-0.11811348050832748,
-0.2939020097255707,
0.8277642726898193,
0.2616431415081024,
-0.5703009366989136,
-0.6661714315414429,
-0.042403947561979294,
-0.2841525375843048,
-0.5566464066505432,
0.79941725730896... |
def make _ adder ( n ) : def adder ( k ) : return k + n return adder | [
-0.6164506077766418,
0.17781971395015717,
0.3481338322162628,
-0.11542978137731552,
-1.4473402500152588,
0.06202935799956322,
-0.4530845284461975,
-0.7001963257789612,
0.9009178876876831,
-0.42579981684684753,
-0.444450706243515,
0.0006573926075361669,
0.3719921112060547,
0.097838558256626... |
def clean _ attendance _ records ( ) : lecture _ records = db _ session. query ( lecture ). delete ( ) practical _ records = db _ session. query ( practical ). delete ( ) db _ session. commit ( ) return lecture _ records, practical _ records | [
-0.1488288789987564,
-0.8059582710266113,
0.7114464044570923,
-0.4897661507129669,
-0.6253688931465149,
0.9906802773475647,
0.1935327649116516,
0.44967836141586304,
-0.17366087436676025,
1.5806214809417725,
0.617294430732727,
-0.39296290278434753,
0.4187434911727905,
0.18400079011917114,
... |
def _ _ init _ _ ( self, session _ id, custom _ data, site _ id, reactivated _ from _ session _ id ) : # type : ( str, optional [ str ], str, optional [ str ] ) - > none self. session _ id = session _ id self. custom _ data = custom _ data self. site _ id = site _ id self. reactivated _ from _ session _ id = reactivate... | [
0.8560339212417603,
-1.1011009216308594,
0.15081410109996796,
-0.36964842677116394,
-0.10408367216587067,
-1.0728777647018433,
-0.041046980768442154,
0.16974644362926483,
1.1391757726669312,
0.17807644605636597,
-0.922595739364624,
1.6559890508651733,
0.23370741307735443,
-0.92096495628356... |
def tuple _ translater ( coords, new _ origin, y _ sign = - 1 ) : x _ min = min ( coords, key = lambda t : ( t [ 0 ], t [ 1 ] ) ) [ 0 ] x _ max = max ( coords, key = lambda t : ( t [ 0 ], t [ 1 ] ) ) [ 0 ] y _ min = min ( coords, key = lambda t : ( t [ 1 ], t [ 0 ] ) ) [ 1 ] y _ max = max ( coords, key = lambda t : ( t... | [
-1.3160736560821533,
-0.9086953997612,
0.6572575569152832,
-0.231236070394516,
-0.19290916621685028,
-0.15715095400810242,
-0.46353772282600403,
0.7414721846580505,
-0.646421492099762,
1.080805778503418,
-1.1625488996505737,
-1.2861262559890747,
0.8729378581047058,
-0.7864689230918884,
0... |
def _ run _ shell _ command ( command, stdout = subprocess. pipe, log _ output = false ) : def format _ command ( cmd ) : return " ". join ( cmd ) if isinstance ( cmd, list ) else command def _ encode _ command _ output ( output ) : return ustr ( output, encoding = " utf - 8 ", errors = " backslashreplace " ) try : pro... | [
-0.14479833841323853,
-0.5860272645950317,
0.8834571838378906,
-0.030485140159726143,
-0.6442679762840271,
-0.8216341137886047,
-0.5131315588951111,
-0.0269367266446352,
0.3168798089027405,
-0.15916010737419128,
0.32335877418518066,
0.6710745096206665,
0.25981152057647705,
0.71373718976974... |
def normalize _ adj ( adj ) : adj = sp. coo _ matrix ( adj ) rowsum = np. array ( adj. sum ( 1 ) ) d _ inv _ sqrt = np. power ( rowsum, - 0. 5 ). flatten ( ) d _ inv _ sqrt [ np. isinf ( d _ inv _ sqrt ) ] = 0. d _ mat _ inv _ sqrt = sp. diags ( d _ inv _ sqrt ) return adj. dot ( d _ mat _ inv _ sqrt ). transpose ( ). ... | [
0.156986266374588,
-0.17539256811141968,
0.5207114815711975,
-0.2449171245098114,
-0.7715778946876526,
-0.3685298264026642,
0.8503904938697815,
0.3038366436958313,
1.19723641872406,
0.7924309968948364,
0.8168767094612122,
0.1407388597726822,
-0.09706520289182663,
0.038840118795633316,
0.... |
def rmse _ dim _ 1 ( y, y _ hat ) : return torch. sqrt ( torch. mean ( ( y - y _ hat ). pow ( 2 ), 1 ) ) | [
0.28648656606674194,
-0.5379099249839783,
0.39135926961898804,
1.0739489793777466,
0.22656606137752533,
-0.052971262484788895,
-0.07060686498880386,
0.026809146627783775,
-0.23038442432880402,
0.4919986128807068,
-0.526453971862793,
0.9580407738685608,
0.260774165391922,
0.2902026772499084... |
async def _ load _ ra3 _ button _ led ( self, button _ led, button _ id, keypad _ device ) : button = self. buttons [ button _ id ] button _ name = button [ " button _ name " ] keypad _ name = keypad _ device [ " name " ] self. devices. setdefault ( button _ led, { " device _ id " : button _ led, " current _ state " : ... | [
0.6345484852790833,
-0.3250327706336975,
0.47666773200035095,
-0.46148863434791565,
0.5922855138778687,
1.1638810634613037,
-1.460350513458252,
0.13221485912799835,
0.7368947863578796,
0.3785325586795807,
-1.2916483879089355,
0.41517263650894165,
-0.4558209776878357,
0.3529440760612488,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.