text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def destroy ( self ) : url ='% s / % s / % s'% ( self. identica. url, self. entity, self. id ) self. identica. _ request ( url, method ='delete') return self | [
-0.739670991897583,
-0.27250075340270996,
0.4028668999671936,
-0.03114650957286358,
0.6160113215446472,
0.07708436995744705,
-0.10814268887042999,
0.4456518888473511,
0.5585799813270569,
-0.6709640026092529,
0.6535936594009399,
0.22714942693710327,
-0.5160238146781921,
-0.00154666171874850... |
def sh _ escape ( string ) : s1 ='"'+ escape _ chars ( string,'\ \ "') +'"'s2 = escape _ chars ( string, r " " " \ | & < > "'" " " ) if len ( s1 ) < len ( s2 ) : return s1 else : return s2 | [
0.9465785026550293,
-0.5135955810546875,
0.7663785815238953,
0.47458893060684204,
-0.6212153434753418,
-0.4648442268371582,
-0.6345234513282776,
-0.21091529726982117,
-0.2646251916885376,
0.6253091096878052,
0.07659163326025009,
0.6895869374275208,
0.5482535362243652,
0.30016523599624634,
... |
def k2f ( k ) : return c2f ( k2c ( _ np. asanyarray ( k ) ) ) | [
0.07631899416446686,
-0.9281449317932129,
0.5139517188072205,
0.2352627068758011,
-0.3416691720485687,
-0.8763381242752075,
-0.1827506124973297,
0.0905991941690445,
-0.5400886535644531,
0.06415469944477081,
-0.07511334866285324,
-0.4740566611289978,
0.6721735000610352,
-0.3098280429840088,... |
def joinfiles ( files ) : configlet ='' for f in files : # let ioerrors happen naturally. configlet = configlet + ( open ( f ). read ( ) ) return configlet | [
0.2102462202310562,
-0.4397558271884918,
0.3101849853992462,
0.38339856266975403,
-0.07359286397695541,
0.6366225481033325,
-0.17166109383106232,
0.6755348443984985,
-1.2455899715423584,
0.5888004302978516,
0.49045082926750183,
-1.5752882957458496,
-0.5455308556556702,
0.30415424704551697,... |
def get _ top _ k ( m, k = 1, diagonal _ ignore = true ) : rows = m. shape [ 0 ] cols = m. shape [ 1 ] i, j = 0, 0 h = [ ] for i in range ( 0, rows ) : for j in range ( 0, cols ) : # ignore diagonal elements if diagonal _ ignore and i < = j : continue ; else : elem = m [ i, j ] tup = ( i, j ) # to track indexes of high... | [
0.043974991887807846,
0.5217299461364746,
0.8480058908462524,
0.8395184874534607,
-0.8885015249252319,
0.054575271904468536,
-0.3437749445438385,
0.2956289052963257,
0.2804810702800751,
1.4679667949676514,
-0.020359251648187637,
-0.4976397156715393,
-0.14179261028766632,
0.1313596218824386... |
def send ( self, void, p _ int ) :... | [
-0.3316323459148407,
0.2738555669784546,
0.2623717486858368,
-0.3267979323863983,
0.1873052567243576,
0.4865814745426178,
-0.04902976378798485,
-1.0486116409301758,
-0.3712429106235504,
0.17358678579330444,
-0.9361384510993958,
0.9406200051307678,
-0.3422158658504486,
0.20489263534545898,
... |
def lo _ u ( x, y, gamma = 1, t = 1, nu = 1, polarin = false, polarout = false ) : if polarin : r = x theta = y else : r = np. sqrt ( x * * 2 + y * * 2 ) theta = np. arctan2 ( y, x ) ut = np. zeros ( x. shape ) # r > 0 bpos = r > 1e - 12 r = r [ bpos ] ut [ bpos ] = gamma / ( 2 * np. pi * r ) * ( 1 - np. exp ( - r * * ... | [
-0.26478272676467896,
-0.6768753528594971,
0.5303540229797363,
-1.079276204109192,
-0.10551857948303223,
-0.1629360467195511,
-0.5127099752426147,
0.5711342692375183,
0.442854106426239,
0.18066202104091644,
-0.21428585052490234,
0.4334161579608917,
0.7182185649871826,
-0.7999541163444519,
... |
def remove _ item ( self, usr, id _ ) : pass | [
-0.8495538234710693,
-0.015416284091770649,
0.18772122263908386,
1.3486539125442505,
-0.7210561633110046,
0.5162444710731506,
-0.07130017131567001,
1.0427297353744507,
-0.318867951631546,
-0.08660682290792465,
-1.0910382270812988,
-0.08670157939195633,
-0.05634983628988266,
-0.553089797496... |
def keys _ to _ filters ( keys ) : return [ k for k in keys if k + ". err " in keys ] | [
-1.0339913368225098,
-0.361348956823349,
0.5405835509300232,
0.2180505096912384,
0.1713288575410843,
-0.16416271030902863,
-0.9110697507858276,
0.27122265100479126,
0.27490171790122986,
1.1412075757980347,
-0.21105609834194183,
1.1462217569351196,
0.12266413122415543,
0.48629292845726013,
... |
def trans ( m ) : nf = len ( m ) nc = len ( m [ 0 ] ) return [ [ m [ i ] [ j ] for i in range ( nf ) ] for j in range ( nc ) ] | [
-0.28628528118133545,
0.12028595060110092,
0.5902108550071716,
0.35143110156059265,
-0.28798604011535645,
-0.44797512888908386,
0.5381971001625061,
0.5287461280822754,
0.4462416172027588,
1.0985653400421143,
-0.7625607848167419,
-0.8317117691040039,
-0.17742183804512024,
0.1357582509517669... |
def update ( self, flags ='' ) : return ( 0,'' ) | [
-0.7077545523643494,
-0.7217507362365723,
0.269432008266449,
-0.13017922639846802,
0.006281306501477957,
0.4784737229347229,
-0.3015347719192505,
-0.23888953030109406,
-0.43803125619888306,
0.21630042791366577,
-0.44250673055648804,
-0.0723065659403801,
-1.3619328737258911,
0.4471009075641... |
def load _ checkerboard _ kernel ( kernlen ) : if kernlen % 2 = = 1 : # forcing it to be odd kernlen + = 1 sigma = kernlen / 4. 0 # sigma of the gaussian g = gkern ( kernlen, sigma ) ckern = np. ones ( ( kernlen, kernlen ) ) lenb2 = kernlen / 2 for ii in np. arange ( lenb2 ) : ckern [ ii, : lenb2 ] * = - 1 ckern [ kern... | [
-0.26196399331092834,
0.3869067132472992,
0.4603659510612488,
0.9051204919815063,
-0.723318874835968,
-0.32623350620269775,
0.3039081394672394,
0.045548681169748306,
0.07704824954271317,
-0.047361522912979126,
-0.5834333896636963,
-0.1982339769601822,
-1.4769905805587769,
1.079442620277404... |
def grant _ write _ acess ( self, shared _ var ) : pass | [
-0.6658653020858765,
-0.6818296909332275,
0.5828835964202881,
0.18038231134414673,
0.25093287229537964,
0.07207989692687988,
1.6219933032989502,
0.7505465745925903,
-0.0061742812395095825,
-0.23238830268383026,
0.32012277841567993,
1.1223963499069214,
-0.37953171133995056,
0.92564237117767... |
def emit ( self, * * kwargs ) : for arg _ name, arg _ type in self. arguments : if arg _ name not in kwargs : raise exception ('incorrect argument name of event { 0 } '. format ( self. name ) ) value _ rpc = utils. get _ rpc _ value ( arg _ type, kwargs [ arg _ name ] ) self. _ call ('set _ argument _ value ', argument... | [
-1.0300214290618896,
0.06947951018810272,
0.7578440308570862,
0.4444653391838074,
0.8217629194259644,
0.16790038347244263,
-0.6812194585800171,
-0.18670667707920074,
-0.5323272943496704,
0.986113429069519,
-0.6528253555297852,
0.8907463550567627,
-0.6359745264053345,
1.2484220266342163,
... |
def computetrilinearformbyrow ( self, gs, gpsk, basisk, gpi, basisi, gpj, basisj ) : b = np. ndarray ( len ( gpsk ) ) err = 0. # run over all entries for k, gpk in enumerate ( gpsk ) : # compute trilinear form for one entry b [ k ], erri = self. gettrilinearformentry ( gs, gpk, basisk, gpi, basisi, gpj, basisj ) err + ... | [
0.17494496703147888,
-0.13389962911605835,
0.33964186906814575,
0.07204537093639374,
0.27340054512023926,
-0.48141950368881226,
0.14638514816761017,
0.6806635856628418,
0.3116549551486969,
0.5563421249389648,
0.04853086173534393,
-0.42700469493865967,
-0.2632495164871216,
-0.12990656495094... |
def _ infersparsetensorrepresentationsfromschema ( schema : schema _ pb2. schema, columns _ remaining : dict [ str, schema _ pb2. feature ] ) - > tuple [ dict [ str, schema _ pb2. tensorrepresentation ], dict [ str, schema _ pb2. feature ] ] : sparse _ tensor _ representations = { } for sparse _ feature in schema. spar... | [
-0.5279480218887329,
-0.3128529489040375,
0.6058008670806885,
-0.04921140894293785,
0.35724446177482605,
-0.5011509656906128,
0.8892148733139038,
0.20794737339019775,
-0.09398319572210312,
-0.0457211472094059,
-0.7299453616142273,
0.34813106060028076,
-0.1104041188955307,
0.017255669459700... |
def _ compute _ approx _ kl ( log _ probs : torch. tensor, log _ probs _ base : torch. tensor, action _ mask : optional [ torch. tensor ] = none ) - > torch. tensor : log _ ratio = log _ probs _ base - log _ probs approx _ kl = ( log _ ratio. exp ( ) - 1 ) - log _ ratio if action _ mask is not none : approx _ kl = mask... | [
1.1083815097808838,
-0.5542063117027283,
0.7013111710548401,
0.6312837600708008,
-0.6975482702255249,
0.1620170772075653,
-0.29447609186172485,
0.31833991408348083,
0.04014939069747925,
1.5576977729797363,
0.9738626480102539,
0.3494890034198761,
0.10203827172517776,
-0.35339730978012085,
... |
def save ( self, file ) : write _ file ( file, self. to _ bytes ( ) ) | [
-0.9265268445014954,
0.05739361420273781,
0.11036930233240128,
0.07258863002061844,
1.3592350482940674,
0.7434887290000916,
0.22336505353450775,
0.16381476819515228,
-1.1335768699645996,
-0.1689484566450119,
-1.6055693626403809,
-0.5723445415496826,
-0.29221078753471375,
0.6297751665115356... |
def showwateringcanbutton ( self, add = 0 ) : if add : self. wateringcanbuttonactivecount + = add else : self. showingwateringcan = 1 self. _ _ gardeninggui. show ( ) self. _ _ wateringcanbutton. show ( ) self. basketbutton. show ( ) | [
0.26688677072525024,
-0.07576461881399155,
0.5676440000534058,
0.5586495995521545,
-0.31912732124328613,
1.117085576057434,
1.291149616241455,
0.13019099831581116,
0.20889359712600708,
0.14283572137355804,
-0.2720261812210083,
0.25176259875297546,
-0.19728133082389832,
0.7320494055747986,
... |
def _ translate _ _ interfaces _ state _ interface _ ipv6 _ address ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. prefix _ length. _ changed ( ) : input _ yang _ obj. prefix _ length = input _ yang _ obj. prefix _ length if input _ yang _ obj. origin. _ changed ( ) : input _ yang _ obj... | [
-0.6118044257164001,
-0.5870015025138855,
0.3101882040500641,
-0.844947099685669,
-0.5489547848701477,
-0.2647196054458618,
1.0914627313613892,
0.18955302238464355,
1.6567003726959229,
0.8252751231193542,
-0.7259926795959473,
0.2631813585758209,
0.1397770494222641,
-0.4454275369644165,
-... |
def get ( business _ identifier ) : pagination _ info = paginationinfo ( limit = int ( request. args. get ('limit ', 10 ) ), page = int ( request. args. get ('page ', 1 ) ) ) try : data = orgservice. search _ orgs _ by _ affiliation ( business _ identifier, pagination _ info ) org _ details = [ {'name': org. name,'uuid... | [
-0.9227206110954285,
0.33985164761543274,
0.8718796372413635,
0.3223327100276947,
0.8521823883056641,
0.045002780854701996,
0.5307640433311462,
0.5530074238777161,
0.0637008398771286,
0.6884980201721191,
0.2660446763038635,
0.22377988696098328,
-0.11855635046958923,
0.3129311501979828,
0... |
def get _ users ( employee _ ids : optional [ sequence [ str ] ] = none, ignore _ missing : optional [ bool ] = none, mail _ nicknames : optional [ sequence [ str ] ] = none, object _ ids : optional [ sequence [ str ] ] = none, return _ all : optional [ bool ] = none, user _ principal _ names : optional [ sequence [ st... | [
-0.6738994717597961,
0.5265700817108154,
0.9243984222412109,
0.15726704895496368,
0.530765175819397,
0.6669216156005859,
-0.6109039187431335,
-0.36898842453956604,
0.49690601229667664,
0.37482374906539917,
0.06945613771677017,
1.704863429069519,
-0.7257146835327148,
-0.9490088224411011,
... |
def validate _ default _ module ( ) : # check the default module exists. this isn't strictly necessary, but it # gives a clearer error message than failing later on. if default _ module not in [ m. name for m in search _ modules ] : raise exception ('failed to locate default module : % s'% ( default _ module ) ) | [
-0.2873695194721222,
0.4358694553375244,
0.23292943835258484,
0.21994532644748688,
1.979640245437622,
1.0845322608947754,
-0.28085246682167053,
-0.687563419342041,
-0.4688488245010376,
0.4982245862483978,
0.2013663798570633,
0.6984515190124512,
-0.4006108045578003,
0.9001914262771606,
-0... |
def _ _ eq _ _ ( self, other ) : if isinstance ( other, apitoken ) : return self. _ token _ value = = other. token _ value return false | [
-0.8181740641593933,
-0.37521326541900635,
0.5958700180053711,
-0.17958247661590576,
-0.1857830435037613,
0.20775771141052246,
-0.6117190718650818,
0.055727120488882065,
0.464998722076416,
-0.5362672805786133,
-1.3128026723861694,
0.48707255721092224,
-0.13240346312522888,
-0.3234592378139... |
def get _ raw _ frequency _ domain ( self ) : return self. frequency _ domain | [
-0.7690994739532471,
0.21815936267375946,
0.3353079557418823,
-0.11314116418361664,
-0.3020172119140625,
-0.6627652049064636,
-0.006007886491715908,
-0.5774766802787781,
0.6897419691085815,
-2.0633747577667236,
-0.07536811381578445,
1.1345161199569702,
0.6448001861572266,
-0.11871971189975... |
def test _ instanciation _ of _ object _ vectors ( self ) : self. assertraises ( nonvectorerror, vector,'a') self. assertraises ( nonnumericerror, vector, [ 1, 2. 5,'a'] ) a = vector ( [ 1, 2, 2. 5 ] ) self. assertequals ( a. coordinates, [ 1. 0, 2. 0, 2. 5 ] ) self. assertequals ( [ 1, 2, 3 ], vector ( [ 1, 2, 3 ] ). ... | [
-0.8663858771324158,
-0.41775208711624146,
0.25169938802719116,
0.05301841348409653,
0.24673858284950256,
0.8904688358306885,
1.042988657951355,
-0.16611598432064056,
-0.2017837017774582,
-0.3001776933670044,
-0.6209474205970764,
-0.21579919755458832,
0.6559166312217712,
0.4281680583953857... |
def _ check _ io ( transaction ) : return len ( transaction. inputs ) > 0 and len ( transaction. outputs ) > 0 | [
-0.2680606245994568,
0.1825101524591446,
0.459198534488678,
0.07698412239551544,
0.04481653496623039,
-0.35727497935295105,
0.15132445096969604,
-0.2668937146663666,
-0.41784778237342834,
0.12860740721225739,
0.07098198682069778,
-1.256435513496399,
0.004604591056704521,
0.0001608354068594... |
def get _ multiple _ data ( collection ) : data = collection. find ( ) return list ( data ) | [
-0.7186604142189026,
0.6870762705802917,
0.3321226239204407,
0.826237678527832,
1.4405251741409302,
0.7980299592018127,
-1.5589848756790161,
-0.16935235261917114,
-0.6784783005714417,
0.1399674117565155,
-0.7617015838623047,
-0.15560002624988556,
0.27466124296188354,
1.0357486009597778,
... |
def plot _ sky _ passes ( ra, dec, passnum, z, clip _ lo = none, clip _ hi = none, label ='label ', cmap ='viridis ', save = none ) : import matplotlib. pyplot as plt z = desiutil. plots. prepare _ data ( z, clip _ lo = clip _ lo, clip _ hi = clip _ hi, save _ limits = true ) vmin, vmax = z. vmin, z. vmax hopts = dict ... | [
-0.2682230472564697,
-0.027539383620023727,
0.806717038154602,
0.09092160314321518,
-0.0803871750831604,
0.16429029405117035,
0.7099098563194275,
0.5632013082504272,
0.6698688268661499,
-0.19519124925136566,
-0.025617577135562897,
1.3327347040176392,
0.6998156905174255,
0.22911624610424042... |
def get _ smallest _ possible ( value ) : if not int ( value ) = = value : return datatype [ " float32 " ] cands = datatype. get _ accumulator _ dt _ cands ( ) for cand in cands : dt = datatype [ cand ] if ( dt. min ( ) < = value ) and ( value < = dt. max ( ) ) : return dt raise exception ( " could not find a suitable ... | [
0.8808643221855164,
0.8548900485038757,
0.5073345303535461,
-0.583828866481781,
-1.1907023191452026,
-0.08233359456062317,
0.10426925867795944,
-1.8741189241409302,
-0.24888338148593903,
-0.797058641910553,
0.3556843400001526,
0.3837083578109741,
-0.22152872383594513,
0.7968368530273438,
... |
def _ _ init _ _ ( self, user = none, current _ user _ following = false, current _ user _ friend = false, equity _ score = none, following _ count = none, submission _ count = none, friend _ request _ status = none ) : self. swagger _ types = {'user':'user ','current _ user _ following':'bool ','current _ user _ frien... | [
0.031399261206388474,
-0.357334703207016,
0.8692554235458374,
0.33561477065086365,
-0.24864722788333893,
0.45952221751213074,
0.2644532322883606,
-0.7307788133621216,
-0.5229058265686035,
-0.26131510734558105,
0.14892011880874634,
-0.22530384361743927,
0.15763269364833832,
0.15236018598079... |
def col ( n, s ) : col = num ( n, s ) if re. search ( " ^ [ a - z ] + ", s ) else sym ( n, s ) col [ " isignored " ] = re. search ( " x $ ", s )! = none col [ " isklass " ] = re. search ( "! $ ", s )! = none col [ " isgoal " ] = re. search ( " [! + - ] $ ", s )! = none return col | [
-0.19157133996486664,
-0.03848890960216522,
0.5136396884918213,
0.2053791880607605,
-0.40471553802490234,
-0.7473745346069336,
-0.18100689351558685,
-0.10903315991163254,
-0.5972079038619995,
-0.011731897480785847,
-0.6308545470237732,
0.08408482372760773,
0.37154334783554077,
-0.644937992... |
def _ struct _ time _ to _ gbase ( self, value ) : return time. strftime ('% y - % m - % d % h : % m : % s ', value ) | [
-0.35181447863578796,
-0.04910846799612045,
0.8432784676551819,
-0.7558992505073547,
0.38102829456329346,
0.7895145416259766,
-0.7575321793556213,
-1.0171177387237549,
-0.3342456817626953,
1.8660258054733276,
-0.6107538938522339,
-0.14054811000823975,
-0.2546977698802948,
0.250454545021057... |
def make _ output _ dir ( out _ dir ) : if os. path. exists ( out _ dir ) and not os. path. isdir ( out _ dir ) : print textcolor. red ( " the output % s is not a directory " % out _ dir ) return false if os. path. exists ( out _ dir ) : return true else : try : os. makedirs ( out _ dir ) return true except exception a... | [
-0.7316381931304932,
0.2585793733596802,
0.97510826587677,
0.04007051885128021,
-0.8084256052970886,
0.5727136135101318,
0.7600663304328918,
0.13889731466770172,
0.5004404783248901,
-0.5511424541473389,
0.49629300832748413,
-0.11533913016319275,
-0.21372991800308228,
-0.05152074992656708,
... |
def test _ check _ config _ params _ invalid _ repo _ path ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " repo _ path " ] = " test " with pytest. raises ( systemexit ) : gitdelver. _ check _ config _ para... | [
0.11067290604114532,
0.607979953289032,
0.30969467759132385,
0.6884462833404541,
0.25916239619255066,
0.4525788724422455,
0.3014253079891205,
0.9447569251060486,
-0.5681424140930176,
0.7108988761901855,
-0.8313319087028503,
-0.30359789729118347,
-0.18181867897510529,
0.9612343311309814,
... |
def from _ bytes ( cls, b ) : hdr = none head _ chunks = [ ] end = ( " iend ", make _ chunk ( " iend ", b " " ) ) frame _ chunks = [ ] frames = [ ] num _ plays = 0 frame _ has _ head _ chunks = false control = none for type _, data in parse _ chunks ( b ) : if type _ = = " ihdr " : hdr = data frame _ chunks. append ( (... | [
-0.1180385872721672,
-0.5313825011253357,
0.9480518102645874,
-1.0414105653762817,
-0.41801917552948,
-0.29396504163742065,
0.21487821638584137,
-1.0867630243301392,
1.0428060293197632,
-0.1643371284008026,
-0.6668838858604431,
-0.32180413603782654,
0.1959567815065384,
0.3342204988002777,
... |
def target _ template ( self, target _ template ) : self. _ target _ template = target _ template | [
-1.2350972890853882,
-0.5502323508262634,
-0.08500616997480392,
-0.033523548394441605,
0.0026151267811656,
0.6715640425682068,
0.3737542927265167,
0.45042961835861206,
-0.6429595351219177,
0.5695164203643799,
-0.5977769494056702,
-0.8270456194877625,
0.0722011923789978,
-0.8906345367431641... |
def rotatecsvfile180 ( csvpath ) : # get data and rotate with open ( csvpath, " r " ) as csvfile : reader = csv. reader ( csvfile, delimiter = " ; " ) csvcontent = [ row for row in reader ] csvcontent _ new = [ [ csvcontent [ i ] [ j ] for j in reversed ( range ( len ( csvcontent [ 0 ] ) ) ) ] for i in reversed ( range... | [
0.019821129739284515,
-0.8256131410598755,
0.792341411113739,
-0.4935954809188843,
0.9324386715888977,
0.05524921789765358,
0.49843788146972656,
0.02853095531463623,
0.2522129714488983,
-0.1622774451971054,
-0.4590167999267578,
0.171544149518013,
-0.012241058982908726,
-0.6390800476074219,... |
def members _ total ( ) : return jsonify ( httpx. get ( graphite _ host, params = { " target " : " stats. gauges. bot. guild. total _ members ", " from " : time _ frames [ request. args. get ( " frame ", " day " ) ], " format " : " json ", " maxdatapoints " : " 300 ", }, ). json ( ) [ 0 ] [ " datapoints " ] ) | [
-0.34403178095817566,
0.6974825263023376,
0.5798550248146057,
-0.8685615062713623,
0.6881366968154907,
-0.7562423944473267,
-1.32973051071167,
-0.7242985963821411,
-0.5886075496673584,
0.6292991042137146,
-0.5801504850387573,
1.0295052528381348,
-0.4039435088634491,
-0.42385581135749817,
... |
def get _ subject _ by _ id ( self, subject _ id ) : query = " select * from subjects where subject _ id = % s " response = database ( ). fetch _ one ( query, subject _ id ) return response | [
0.492307186126709,
0.019320016726851463,
0.03344014659523964,
-0.35027554631233215,
0.1527588963508606,
-0.6449269652366638,
-0.39759811758995056,
-1.4347764253616333,
0.007658285088837147,
0.19454613327980042,
0.4232158958911896,
0.7738714218139648,
-0.1245480328798294,
-0.132885932922363... |
def process _ ipfuzzing ( self, text ) : ips = re. findall ( " \ d { 1, 3 } \. \ d { 1, 3 } \. \ d { 1, 3 } \. \ d { 1, 3 } ", text ) for ip in ips : text = text. replace ( ip, str ( self. _ ipdwordencode ( ip ) ) ) return text | [
-0.7371249794960022,
0.14729541540145874,
0.5247308015823364,
0.10629630833864212,
-0.7956320643424988,
-0.5747377872467041,
0.26559755206108093,
0.8489969372749329,
0.4175090491771698,
0.2608143389225006,
-0.10129856318235397,
-0.3533204197883606,
-0.9733346104621887,
-0.1900210976600647,... |
def search ( func, first _ layer, layer _ num, min _ layer, margin = 1 ) : hyper = [ ] current = [ 0 for i in range ( layer _ num ) ] def construct _ layer ( prev _ layer, depth ) : n = len ( current ) - depth for i in range ( min _ layer, prev _ layer + margin ) : current [ n - 1 ] = i if depth = = 0 : hyper. append (... | [
-0.06585146486759186,
0.39802035689353943,
0.7238945960998535,
0.827118456363678,
0.4919934868812561,
-0.28162533044815063,
1.0492278337478638,
0.03292542323470116,
-0.23080070316791534,
-0.6060742139816284,
0.07643423974514008,
0.741222620010376,
0.10376214981079102,
0.29864153265953064,
... |
def produce _ new _ generation ( self, bequest _ rule : callable, marital _ tradition : callable, tax _ rate : float ) - >'generation': bach _ m, bach _ f = self. produce _ next _ gen _ bachelors ( bequest _ rule ) lump _ sum = self. redistribute _ taxes ( bach _ m, bach _ f, tax _ rate ) new _ gen = self. match _ bach... | [
-0.08531322330236435,
0.2852118909358978,
0.6920067071914673,
0.21112295985221863,
0.10488907247781754,
0.6215029954910278,
0.33212271332740784,
-0.07659405469894409,
-0.9935705661773682,
0.010219274088740349,
0.38440582156181335,
0.19133129715919495,
0.5433148145675659,
0.1415210515260696... |
def mean _ squared _ error _ 5 ( gauss _ kernel ) : def mse ( y _ true, y _ pred ) : if gauss _ kernel : y _ shape = y _ pred. shape ker = gaussian _ kernel ( d = y _ shape [ 1 ], l = y _ shape [ 2 ], sig = 2 ) ker = ker [ none, :, :, : ] ker = tf. constant ( ker, dtype = np. float32 ) y _ 1 = y _ pred [ :, :, :, :, 0 ... | [
-0.34655818343162537,
-0.8619948625564575,
0.6874364018440247,
-0.010473490692675114,
-0.8596624135971069,
-0.38906726241111755,
0.02877000719308853,
-0.16414709389209747,
-0.12122755497694016,
1.166159749031067,
-0.522849977016449,
0.5477686524391174,
0.38508471846580505,
1.00282597541809... |
def create _ parser ( ) : parser = argparse. argumentparser ( description = description ) parser. add _ argument ( " taskwarrior _ args ", help = " ( optional ) arguments that will be passed to taskwarrior, e. g. in order to set a filter for a project. ", nargs ='*') return parser | [
-0.015071195550262928,
-0.5003396272659302,
0.5163155198097229,
-0.6787070631980896,
0.07914756238460541,
0.36451035737991333,
-0.7149657011032104,
0.6124481558799744,
-0.6661036014556885,
-0.1919197142124176,
0.7262555956840515,
0.03727139160037041,
-0.35855749249458313,
0.635687708854675... |
def plot _ swot ( axn, var, lonv, latv, vmin, vmax, cmap, merv, parv, box, plotstyle, levels = 0 ) : lomin = box [ 0 ] lomax = box [ 1 ] lamin = box [ 2 ] lamax = box [ 3 ] my _ mapn = basemap ( projection ='merc ', lat _ 0 = ( lamin + lamax ) / 2, lon _ 0 = ( lomin + lomax ) / 2, resolution ='l ', llcrnrlon = lomin, l... | [
0.33955657482147217,
-0.4851685166358948,
0.8793203830718994,
-0.4580264389514923,
-0.6720143556594849,
0.2018757313489914,
-0.1418202668428421,
0.45910733938217163,
0.28671976923942566,
-0.6273899674415588,
0.31701162457466125,
0.9114192724227905,
0.12730742990970612,
0.019689638167619705... |
def get ( self, key ) : # key is in cache - - > return key and value associated if key in self. hash _ map : node = self. hash _ map [ key ] self. remove ( node ) self. add _ to _ front ( node ) value = node. value return key, value # key was not in cache else : raise valueerror ( " key not in cache " ) | [
-0.3273172676563263,
0.006939618848264217,
0.600748598575592,
-0.2914881110191345,
-0.43985164165496826,
-0.10548713058233261,
-0.44115570187568665,
0.34738054871559143,
-0.06734795868396759,
0.9435878992080688,
0.6930481195449829,
0.2684308886528015,
-0.13096562027931213,
0.71978306770324... |
def test _ initial _ value ( self ) - > none : id _ gen = self. _ create _ id _ generator ( ) self. assertequal ( id _ gen. get _ current _ token ( ), 123 ) | [
-0.1446993052959442,
-0.5741890668869019,
0.33488860726356506,
-0.3268831670284271,
0.7836900949478149,
0.9358517527580261,
0.2972281873226166,
0.9565449357032776,
-1.084145188331604,
-1.2970975637435913,
-0.859898030757904,
-0.09514932334423065,
0.2515060305595398,
0.1084093451499939,
-... |
def ol ( self, season _ year ) : url = " http : / / www. nfl. com / stats / categorystats? " params = { " archive " : " true ", " conference " : " null ", " role " : " tm ", " offensivestatisticcategory " : " offensive _ line ", " defensivestatisticcategory " : " null ", " season " : season _ year, " seasontype " : " r... | [
-0.34007197618484497,
0.9809507131576538,
0.544077455997467,
-0.7313621044158936,
0.48768511414527893,
-0.1701335608959198,
-0.3203063905239105,
-0.677215039730072,
0.7531939148902893,
-0.235591322183609,
0.4822995364665985,
0.46560391783714294,
0.6490570306777954,
0.22324247658252716,
-... |
def add _ date ( df ) : df ['proc _ date'] = datetime. datetime. now ( ). strftime ('% d - % m - % y') return df | [
-0.17298902571201324,
0.4143214225769043,
0.7879713177680969,
-0.5015315413475037,
0.5824419856071472,
0.29658403992652893,
-0.9460374712944031,
-0.07567967474460602,
-0.2930264472961426,
-0.26098933815956116,
0.8814559578895569,
1.3437299728393555,
0.5727450847625732,
0.0803270936012268,
... |
def rawuncompressed ( self ) - > databytes : return self. m _ pub _ key. rawuncompressed ( ) | [
-0.1921016275882721,
0.4849454164505005,
0.44016048312187195,
-0.43884986639022827,
-1.3133518695831299,
0.06234117969870567,
-0.5446423888206482,
0.17576217651367188,
-0.3491477370262146,
-0.7305318713188171,
-0.7308108806610107,
0.43043795228004456,
-0.7256842851638794,
-0.15053755044937... |
def test _ gf _ write _ step _ without _ doc _ string _ without _ data _ table ( given _ rule _ type, expected _ indentation, disabled _ colors, capsys, mocker ) : # given step = mocker. magicmock ( spec = step ) step. keyword = " given " step. used _ keyword = " given " step. text = " there is a step " step. doc _ str... | [
0.043630678206682205,
-0.07802174985408783,
0.30069050192832947,
0.2237941175699234,
0.9257572293281555,
0.23808623850345612,
0.16717541217803955,
0.14757300913333893,
-1.2578686475753784,
-0.7162021994590759,
-0.4020506739616394,
0.044985584914684296,
0.2157256305217743,
0.869045913219451... |
def get _ hopsize ( ds _ folder, ragas, set _ type ='train') : file = glob. glob ( ds _ folder +'/'+ set _ type + " / " + ragas [ 0 ] +'/ *. pitch') [ 0 ] time _ pitch = np. loadtxt ( file ) return time _ pitch [ 1, 0 ] - time _ pitch [ 0, 0 ] | [
-0.6799771189689636,
0.6893414855003357,
0.6819959282875061,
0.11786174774169922,
-0.2512877285480499,
-0.03227697312831879,
1.229652762413025,
0.03541748225688934,
-0.723696231842041,
0.7165058255195618,
0.5250678658485413,
-0.28056299686431885,
-0.4504893124103546,
0.28891226649284363,
... |
def get _ licensees _ by _ county _ ok ( licensees, counties ) : config = dotenv _ values ( '.. /.. /.. /. env') fred = fred ( api _ key = config ['fred _ api _ key'] ) county _ data = { } for county in counties : county _ name = county ['name'] fred _ code = county ['population _ source _ code'] county _ licensees = l... | [
0.24531391263008118,
0.015196768566966057,
0.3752434253692627,
-0.49925628304481506,
-0.025627098977565765,
0.06615763157606125,
-0.2842014729976654,
0.25340569019317627,
-0.9015009999275208,
0.5721046328544617,
-0.18114665150642395,
-0.04354054108262062,
0.6305328011512756,
0.592788577079... |
def _ date _ to _ gbase ( self, value ) : return'% d - % 02d - % 02d'% ( value. year, value. month, value. day ) | [
-0.30405569076538086,
0.3037221431732178,
0.8218834400177002,
-0.30112558603286743,
0.338070273399353,
1.230317234992981,
-1.051769495010376,
-0.9954472780227661,
-0.4697980284690857,
1.1124595403671265,
-0.2538206875324249,
0.5473987460136414,
0.07592783868312836,
0.8492615818977356,
0.... |
def setup ( self ) : db. drop _ all ( ) db. create _ all ( ) self. client = app. test _ client ( ) self. testuser = user. signup ( username = " testuser ", email = " test @ test. com ", password = " testuser ", image _ url = none, ) self. user _ 1 = user. signup ( " user1 ", " user1 @ test1. com ", " password ", none )... | [
0.07926658540964127,
0.17694443464279175,
0.7367220520973206,
0.46788761019706726,
0.7224292755126953,
0.5083821415901184,
1.1541917324066162,
0.10199862718582153,
-0.18924839794635773,
0.19264648854732513,
-0.49086251854896545,
-0.8974594473838806,
-0.5315156579017639,
0.02334534935653209... |
def forward ( self, w _ value, x _ value, b _ value, is _ numba ) : self. w _ value = w _ value self. x _ value = x _ value self. b _ value = b _ value if is _ numba : return self. _ forward ( w _ value, x _ value, b _ value ) else : return np. dot ( x _ value, w _ value ) + b _ value | [
0.658693790435791,
0.31661897897720337,
0.6483218669891357,
-0.054477300494909286,
0.4120628535747528,
0.20311133563518524,
0.8098157644271851,
-0.056536220014095306,
-0.00015438756963703781,
-0.37865516543388367,
0.4488319456577301,
0.90312260389328,
0.09586752951145172,
0.160216629505157... |
def setcommname ( self, cmname ) : self. commname = cmname | [
0.012258684262633324,
-1.1525954008102417,
0.5266510248184204,
-0.6482512354850769,
0.23719069361686707,
0.13189855217933655,
0.5816521048545837,
-0.04865051060914993,
-0.07641170918941498,
0.16630740463733673,
-0.6779692769050598,
0.28418755531311035,
-1.0072853565216064,
0.92495739459991... |
def to _ json ( data ) : return dump _ to _ json ( data, separators = ( ', ',':'), ensure _ ascii = true, default = added _ json _ serializer ) | [
-0.8674287796020508,
-0.8129829168319702,
0.37059950828552246,
-0.6496227979660034,
-0.8448284864425659,
-0.6025470495223999,
-0.7336629033088684,
-0.5791299343109131,
0.8448237776756287,
0.3784320652484894,
-1.2869919538497925,
0.39789512753486633,
-0.02950536273419857,
-0.334903687238693... |
def first _ party _ login _ uri ( self ) - > optional [ str ] : return pulumi. get ( self, " first _ party _ login _ uri " ) | [
-0.10478775948286057,
-0.7631441950798035,
0.3905114531517029,
0.2400878220796585,
0.6750330328941345,
1.0948736667633057,
-0.5471382141113281,
0.7102630138397217,
0.31319835782051086,
-1.0691434144973755,
0.5442622303962708,
0.549655556678772,
-0.2729318141937256,
-0.9406011700630188,
-... |
def group _ anagrams2 ( lst ) : # dictionary comprehension # d = { key : value for ( key, value ) in iterable } syntax anagrams _ dict = { " ". join ( sorted ( word ) ) : [ ] for word in lst } for word in lst : anagrams _ dict [ " ". join ( sorted ( word ) ) ]. append ( word ) # return list of anagrams print anagrams _... | [
0.14279265701770782,
0.2653905749320984,
0.5054946541786194,
0.11891186237335205,
-1.3409851789474487,
-0.004168234765529633,
-0.05081523582339287,
-0.1470327228307724,
-0.5805833339691162,
0.4937746822834015,
-0.39925146102905273,
0.5081556439399719,
0.30938565731048584,
1.301755309104919... |
def is _ not _ zero ( self, pacbra, packet, component = none ) : # todo : consider more general api and call signature raise notimplementederror ( "'sparsityoracle'is an abstract interface. " ) | [
-0.16861699521541595,
0.17735622823238373,
0.7277064919471741,
0.3418481945991516,
0.8605929017066956,
0.04340215399861336,
0.15767695009708405,
0.4947037100791931,
0.6984942555427551,
0.11053433269262314,
-0.3263566792011261,
-0.07610641419887543,
-0.8086923956871033,
0.5198020339012146,
... |
def get _ widgets ( self ) : return widgetinstance. objects. filter ( widget _ list = self ). order _ by ( " position " ) | [
-0.10552436113357544,
-0.08921551704406738,
0.36973685026168823,
0.014243691228330135,
0.36730581521987915,
-0.05811888724565506,
-0.7423295974731445,
0.7044863104820251,
-0.07962404191493988,
-0.39932602643966675,
-0.9120514988899231,
-0.29754602909088135,
-1.0262677669525146,
0.667634963... |
async def query ( q : str, useragent : str = default _ user _ agent, safesearch : bool = true, html : bool = false, meanings : bool = true, * * kwargs, ) - > results : logger. info ( " performing ddg query :'% s'", query ) logger. debug ( " safesearch : % s ", safesearch ) logger. debug ( " html : % s ", html ) logger.... | [
-1.8473173379898071,
1.4311128854751587,
0.8492054343223572,
-0.8311551809310913,
-0.4391867518424988,
-0.9175669550895691,
-0.42612218856811523,
-0.500298261642456,
0.07104332000017166,
0.5296728610992432,
0.10832750797271729,
0.5669350028038025,
0.06922180950641632,
0.6998410224914551,
... |
def stack _ params ( mu, sigma, from _ square = false ) : if from _ square : sigma = np. diagonal ( a = sigma, offset = 0, axis1 = - 1, axis2 = - 2 ) logstdev = 0. 5 * np. log ( sigma ) params = np. concatenate ( ( mu, logstdev ), axis = - 1 ) return params | [
0.30551615357398987,
0.7540549039840698,
0.6705546975135803,
0.7079207301139832,
-0.44834479689598083,
-0.5118604898452759,
0.10526308417320251,
-0.30744317173957825,
-0.422254353761673,
1.53377103805542,
0.6612063050270081,
1.1530746221542358,
0.4045361876487732,
0.7661229372024536,
0.3... |
def total _ gifts ( self ) : value = 0 for category in self. categories : if category. category _ gifts > 0 : value + = category. category _ gifts return value | [
0.34483781456947327,
0.41537871956825256,
0.6181429028511047,
-0.45030564069747925,
0.2641333043575287,
0.38936492800712585,
0.8865386247634888,
0.12813691794872284,
-0.28231608867645264,
-0.4331517517566681,
-0.1335616409778595,
-0.2862769365310669,
-0.047723446041345596,
1.16764354705810... |
def add _ credentials ( self, username, password ) : if username is none : raise valueerror ( " username cannot be none " ) userinfo = normalizers. normalize _ username ( username ) if password is not none : userinfo = " { } : { } ". format ( userinfo, normalizers. normalize _ password ( password ), ) return uribuilder... | [
-0.1276502162218094,
-0.21039564907550812,
0.6415314674377441,
0.5933483839035034,
-0.28592151403427124,
0.6596514582633972,
-0.20611737668514252,
0.9516910910606384,
0.2818461060523987,
-1.4210065603256226,
0.299318790435791,
-0.32281744480133057,
-1.1400232315063477,
-0.6469238996505737,... |
def check _ linux ( ) : test ='systemctl list - unit - files | grep enabled | grep - i modemmanager'if os. system ( test ) = = 0 : cli. log. warn ( " { bg _ yellow } detected modem manager. please disable it if you are using pro micros " ) | [
0.5726591944694519,
-0.2562966048717499,
0.4794282019138336,
0.5688409805297852,
-0.034843672066926956,
0.11735450476408005,
-0.847610592842102,
0.760607898235321,
0.26248446106910706,
-0.9115856885910034,
-0.3180631101131439,
0.8218457102775574,
-0.422384113073349,
1.313715934753418,
-0... |
def force _ bytes ( value ) : # if is _ py3 : # if isinstance ( value, str ) : # value = value. encode ('utf - 8 ','backslashreplace') # else : if isinstance ( value, unicode ) : value = value. encode ('utf - 8') return value | [
-0.058209288865327835,
0.36687713861465454,
0.547135055065155,
0.36352649331092834,
0.051537297666072845,
0.10981906950473785,
-0.4758214056491852,
-0.5498980283737183,
0.35590216517448425,
-0.43284186720848083,
-0.2589116096496582,
0.3235706388950348,
-1.2067668437957764,
0.25664472579956... |
def binary _ var _ dict ( keys, name = none ) : return integer _ var _ dict ( keys, binary _ domain, name = name ) | [
-0.6929947733879089,
0.4181991219520569,
0.2177470624446869,
-0.08232074230909348,
-1.0850335359573364,
-0.7945654988288879,
-0.2669801414012909,
-0.713872492313385,
-1.0692048072814941,
-0.022699929773807526,
-1.4871920347213745,
0.8401098847389221,
-0.5796469449996948,
0.5530176758766174... |
def get _ 3c7 ( ) : combos = [ ] n = 7 for i in range ( 0, n - 2 ) : for j in range ( i + 1, n - 1 ) : for k in range ( j + 1, n ) : c = [ 0 ] * n c [ i ] = 1 c [ j ] = 1 c [ k ] = 1 combos. append ( c ) return combos | [
-0.4271078109741211,
0.16924965381622314,
0.5047602653503418,
0.7150669097900391,
0.6001929640769958,
-0.3998764455318451,
0.3210899531841278,
0.2745378017425537,
0.2587505877017975,
0.6683239340782166,
-1.0313047170639038,
-0.5399365425109863,
0.45083948969841003,
-0.07228420674800873,
... |
def index ( self, index ) : item = self. client. lindex ( self. key, index ) if item is not none : return self. client. decode ( item ) else : raise indexerror ( " index out of range. " ) | [
0.01278128381818533,
0.06705259531736374,
0.2932986617088318,
-0.7478628158569336,
-0.36623871326446533,
-0.5397231578826904,
-0.7766777873039246,
-0.8172225952148438,
0.6791093349456787,
-0.36965176463127136,
-0.4246440827846527,
0.5282273888587952,
-1.1556329727172852,
-1.796285033226013... |
def file _ type _ desc ( self, file _ type _ desc : str ) : if file _ type _ desc is none : raise valueerror ( " invalid value for ` file _ type _ desc `, must not be ` none ` " ) # noqa : e501 self. _ file _ type _ desc = file _ type _ desc | [
0.6708002090454102,
-0.19497708976268768,
-0.1315092146396637,
0.5124652981758118,
0.8611075282096863,
0.7931041717529297,
0.11893280595541,
0.6480851769447327,
-0.8042722940444946,
-0.143459752202034,
0.07382817566394806,
0.5445172190666199,
0.2933840751647949,
0.6977596282958984,
0.011... |
def isfull ( self ) - > bool : if ( self. tail + 1 ) % self. capacity = = self. head : return true else : return false | [
-0.013643413782119751,
0.0050932434387505054,
0.7858701348304749,
0.7834436893463135,
-0.02177724614739418,
0.08784116059541702,
-0.3218767046928406,
-0.20517498254776,
0.49926894903182983,
-0.09071486443281174,
-1.178773045539856,
0.19021546840667725,
-1.1035325527191162,
0.37489190697669... |
def tiles _ str _ compact ( tiles ) : s = " " for j in range ( 12 * 8 ) : for i in range ( 12 * 8 ) : x, x _ rem = divmod ( i, 8 ) y, y _ rem = divmod ( j, 8 ) t = tiles. get ( ( x, y ) ) if t : # tile block is 11 per line ( 10 + newline ) # we add 1 to avoid the first row and first col c = t [ ( y _ rem + 1 ) * 11 + x... | [
0.754629373550415,
-0.3142898678779602,
0.6596446633338928,
-1.0012321472167969,
-0.6909066438674927,
-0.15621888637542725,
0.3626791536808014,
-0.6707192659378052,
0.0500689297914505,
0.3923797607421875,
0.1906920075416565,
0.2514577805995941,
0.23435282707214355,
-0.3727501332759857,
0... |
def based _ on ( self, log _ item ) : xpath = self. util. read _ xpath _ list _ from _ xml ( self. object _ repo, " basedon ", self. my _ object ) text _ from _ xml, ids, eng _ list = self. util. get _ text _ from _ xml ( self. string _ xml, log _ item, " trans - unit ", config. selected _ language. strip ( ) ) text _ ... | [
0.05123034864664078,
-0.5019380450248718,
0.7510052919387817,
0.08835344761610031,
0.037742577493190765,
-0.038433220237493515,
0.25320178270339966,
-0.0700579360127449,
-0.09172865748405457,
0.05436868220567703,
-0.09003428369760513,
0.424046128988266,
-1.107938289642334,
0.23603227734565... |
def button _ release _ callback ( self, event ) : self. _ msedown = false if event. inaxes is none : return if event. inaxes = = self. axes ['info'] : if ( event. xdata > 0. 8 ) and ( event. xdata < 0. 9 ) : answer = " y " elif event. xdata > = 0. 9 : answer = " n " else : return self. operations ( answer, - 1 ) self. ... | [
0.34699130058288574,
-0.4532402753829956,
0.8230032324790955,
-0.06350916624069214,
-0.5751680731773376,
0.5133293271064758,
1.0125548839569092,
-0.30387669801712036,
0.8890213966369629,
-0.49532046914100647,
-0.04720524325966835,
0.05064431577920914,
-0.192160502076149,
-0.106705658137798... |
def run _ epoch ( model, data, optimizer ) : traindata, valdata = data model. train ( ) train _ elbo = epoch _ iter ( model, traindata, optimizer ) model. eval ( ) val _ elbo = epoch _ iter ( model, valdata, optimizer ) return train _ elbo, val _ elbo | [
-0.3843299448490143,
-0.2196243852376938,
0.501472532749176,
0.2870141863822937,
-0.030929528176784515,
0.993590235710144,
-1.3016941547393799,
0.8855802416801453,
-1.423547625541687,
0.33451032638549805,
-1.0723330974578857,
0.4063784182071686,
0.6494950652122498,
0.3154148757457733,
-0... |
def _ _ init _ _ ( self, game, target : independententity, * * kwargs ) : super ( ). _ _ init _ _ ( game ) self. target = target # the creator of this enchantment. self. creator = kwargs. pop ('creator ', none ) # todo : is this correct? or make this a property that always trace the recent oop value of target? self. oo... | [
-0.49363115429878235,
0.23437409102916718,
0.6390055418014526,
0.42420151829719543,
0.10031455010175705,
-0.2722495198249817,
0.24143372476100922,
-0.6488218307495117,
0.986508846282959,
0.21537967026233673,
-0.11898761987686157,
0.8373253345489502,
0.10970839112997055,
-0.0488521195948123... |
def create _ mask ( dispersion, regions ) : mask = np. zeros ( dispersion. size, dtype = bool ) if isinstance ( regions [ 0 ], ( int, float ) ) : regions = [ regions ] for start, end in regions : start, end = ( start or - np. inf, end or + np. inf ) mask [ ( end > = dispersion ) * ( dispersion > = start ) ] = true retu... | [
-0.7861505150794983,
-0.9082829356193542,
0.6015846133232117,
-0.19735027849674225,
0.6512047052383423,
-0.17292287945747375,
0.06193814426660538,
-0.003966202028095722,
0.13066385686397552,
-0.03822445496916771,
0.16879257559776306,
-0.4283284544944763,
-0.5416009426116943,
0.097483813762... |
def get _ weights ( self, include _ trivial _ donors = true ) : if include _ trivial _ donors or not self. trivial _ units. any ( ) : return self. _ sc _ weights if self. model _ type! = " full " : trivial _ donors = self. trivial _ units [ self. control _ units ] else : trivial _ donors = self. trivial _ units _ _ wei... | [
-0.4001224935054779,
0.5086867213249207,
0.673599898815155,
0.28470486402511597,
0.23304715752601624,
0.46149203181266785,
0.3387543857097626,
-0.07198129594326019,
0.296408474445343,
-0.2614760994911194,
0.0036890937481075525,
0.278926819562912,
-0.5889863967895508,
0.12036479264497757,
... |
def get _ frequency _ scan ( self ) : scan _ folder = self. app. getfromstudycase ('intscn') fault = scan _ folder. getcontents ('*. scnfreq') [ 0 ] num _ of _ violations = fault. getnumberofviolations ( ) time _ stamp = [ ] for i in range ( 1, num _ of _ violations + 1 ) : time _ stamp. append ( fault. getviolationtim... | [
0.03932091221213341,
0.5374308228492737,
0.47615304589271545,
0.8155688643455505,
0.5391797423362732,
-1.0100677013397217,
0.20458850264549255,
-0.1594771444797516,
0.5922954678535461,
-0.751944363117218,
-0.47473272681236267,
-0.08816894888877869,
0.05984886735677719,
0.7178254127502441,
... |
def copy _ pars ( oldcomp, newcomp, sametype = true ) : if sametype : if not ( type ( oldcomp ) = = type ( newcomp ) ) : raise typeerror ('old and new model component must be of same type') # for parold, parnew in zip ( oldcomp. pars, newcomp. pars ) : # min cannot be above max. # set to - + inf to avoid problems with ... | [
-0.7073628902435303,
-1.109355092048645,
0.7682487964630127,
-0.11835602670907974,
-0.41760513186454773,
0.9108102917671204,
-0.45466816425323486,
-0.29641130566596985,
-0.31360721588134766,
0.839211106300354,
-0.02224058471620083,
0.39101651310920715,
-0.012877478264272213,
0.907417774200... |
def on _ cleanup ( self, action ) : self. _ cleanups. append ( action ) | [
0.20222637057304382,
-0.6019171476364136,
0.25110703706741333,
-0.1271800696849823,
0.32896527647972107,
-0.06067114323377609,
-0.16276289522647858,
-0.21429720520973206,
1.1466856002807617,
-0.5732221603393555,
-1.7676475048065186,
0.5665090680122375,
0.8323410749435425,
0.560847699642181... |
def check _ jsov _ children ( child ) : res = true for param in child : if param not in utils. children _ attributes. keys ( ) : print ( " error :'{ }'is not a recognized attribute. ". format ( param ) ) return false if param = = " children " : for onlykey in child. keys ( ) : for newchild in child ['children'] : res &... | [
-0.9051088094711304,
0.44282814860343933,
0.8011512160301208,
0.4885135889053345,
-0.47394856810569763,
0.05337068438529968,
-0.030244097113609314,
-0.22206652164459229,
-0.6917791366577148,
0.39455607533454895,
-1.0407592058181763,
-0.6438679695129395,
0.5857048630714417,
1.17901217937469... |
def createap203structure ( self, * args ) : return _ stepap209. stepap209 _ construct _ createap203structure ( self, * args ) | [
-1.6206265687942505,
-0.7268442511558533,
0.5688098669052124,
-0.2188890129327774,
-0.8585520386695862,
0.6259437799453735,
0.47939059138298035,
0.2545652687549591,
1.476906657218933,
-0.7968701720237732,
-0.03926505520939827,
-0.7880420684814453,
0.6421852111816406,
-1.0001517534255981,
... |
def randomsampling ( self, batch, labels ) : if isinstance ( labels, torch. tensor ) : labels = labels. detach ( ). numpy ( ) unique _ classes = np. unique ( labels ) indices = np. arange ( len ( batch ) ) class _ dict = { i : indices [ labels = = i ] for i in unique _ classes } sampled _ triplets = [ list ( it. produc... | [
-0.7951033711433411,
0.24545502662658691,
0.7977830171585083,
0.06280402839183807,
-0.41082000732421875,
0.8920410871505737,
-0.08728557080030441,
0.43693044781684875,
0.9023211002349854,
0.8931081295013428,
-0.2867158353328705,
-0.04936324805021286,
0.05591521039605141,
-0.902504801750183... |
def make _ partitions _ for _ model ( model, n = 1 ) : logger = logging. getlogger ( " feature. management. commands. partition. make _ partitions " ) logger. info ( " creating partitions for % s " % model ) class partitionfeature ( woomefeature ) : def _ _ init _ _ ( self, model, * args, * * kwargs ) : self. models. a... | [
-0.30731919407844543,
0.8013527393341064,
0.558558464050293,
0.26870423555374146,
0.13654616475105286,
-0.020085208117961884,
0.13968490064144135,
0.08628453314304352,
0.032742392271757126,
-0.7523758411407471,
-0.8113001585006714,
-0.7639248371124268,
0.31495919823646545,
0.06056342646479... |
def test _ set _ parameter ( self ) : pass | [
-0.8109923005104065,
0.21634458005428314,
0.09511515498161316,
0.8182068467140198,
0.9553613066673279,
0.8199279308319092,
1.4131073951721191,
-0.030437303707003593,
-0.1070392057299614,
-0.15208987891674042,
-0.5677694082260132,
1.2906519174575806,
-0.6984748840332031,
0.6259454488754272,... |
def gaussian _ kernel ( shape : tuple [ int, int ] = ( 3, 3 ), sigma : float = 0. 5 ) : m, n = [ int ( ( ss - 1. ) / 2. ) for ss in shape ] y, x = np. ogrid [ - m : m + 1, - n : n + 1 ] kernel = np. exp ( - ( x * x + y * y ) / ( 2. * sigma * sigma ) ) kernel [ kernel < np. finfo ( kernel. dtype ). eps * kernel. max ( )... | [
-0.13106051087379456,
-0.01521027460694313,
0.4916946589946747,
0.37789246439933777,
-0.707456648349762,
-0.10178747773170471,
0.17279359698295593,
-0.038174744695425034,
-0.2562589943408966,
0.6628066301345825,
0.254971981048584,
0.7126171588897705,
0.0768810585141182,
0.24801261723041534... |
def add _ command ( self, regexp, fn ) : self. _ commands. append ( ( regexp, fn ) ) | [
-0.6716378331184387,
-0.3966781795024872,
0.33333367109298706,
0.589450478553772,
1.487248420715332,
-0.4616694748401642,
-0.31456899642944336,
0.7899959683418274,
0.24886459112167358,
-1.7282838821411133,
-0.4163271188735962,
0.5280765295028687,
0.0619487538933754,
0.14642414450645447,
... |
def get _ limits ( self, dim, phys = false ) : if phys : return self. limits [ dim ] * self. voxel _ size [ dim ] else : return self. limits [ dim ] | [
0.2196303904056549,
0.44901081919670105,
0.6015539765357971,
0.11578357219696045,
-0.16261017322540283,
-0.37015020847320557,
-1.487601399421692,
-0.9504138231277466,
-0.10460186004638672,
0.18037374317646027,
0.6101604104042053,
0.15708576142787933,
-0.8313698768615723,
-0.219192147254943... |
def difficultychange ( self, difficultytext ) : if ( difficultytext = = " newb " ) : self. difficultylabel. settext ( " a good difficulty for children and casuals " ) elif ( difficultytext = = " decent " ) : self. difficultylabel. settext ( " fun and exciting adventure awaits " ) elif ( difficultytext = = " gud " ) : s... | [
-1.0563628673553467,
-0.6419826745986938,
0.3987560272216797,
-0.07794462889432907,
-0.11701256036758423,
1.483917236328125,
-0.2574779689311981,
0.17931781709194183,
0.4825047254562378,
0.6306900978088379,
-0.5168418288230896,
0.12794890999794006,
-0.5555656552314758,
0.7029868960380554,
... |
def evaluate _ fitness ( program, task ) : score = 0 # for each sample for sample in task : i = np. array ( sample ['input'] ) if i. shape [ 0 ] = = 0 or i. shape [ 1 ] = = 0 : return np. inf o = np. array ( sample ['output'] ) # for each fitness function images = evaluate _ flat ( program, i ) score + = total _ fitnes... | [
-0.6532610058784485,
-0.3155990242958069,
0.4437622129917145,
0.58738774061203,
-0.12313655763864517,
-0.2967016398906708,
0.728933572769165,
0.39086535573005676,
-0.7815179228782654,
0.16660214960575104,
-0.08237840980291367,
-0.35519933700561523,
-0.1222882866859436,
0.8062036633491516,
... |
def test _ add _ seen _ feed _ no _ identifier ( self, history ) : entry = {'foo':'bar'} " an entry with no id / link / title " assert not history. add _ seen _ feed ( entry,'http : / / example. com') | [
-0.2931220829486847,
0.1560266613960266,
0.40548574924468994,
-0.6234106421470642,
0.26298123598098755,
0.4510499835014343,
-0.4817517399787903,
-0.38610851764678955,
0.45961013436317444,
-1.3166413307189941,
-0.6990256309509277,
0.5662136077880859,
-0.07183025777339935,
0.0008167298510670... |
def main ( ) : os. chdir ( lyrics _ folder ) for directory _ name, subdirectories, filenames in os. walk ( '.') : print ( " directory : ", directory _ name ) print ( " \ tcontains subdirectories : ", subdirectories ) print ( " \ tand files : ", filenames ) print ( " ( current working directory is : { } ) ". format ( os... | [
0.19659258425235748,
-0.22285735607147217,
0.9402664303779602,
0.3713194727897644,
-0.0008788288687355816,
0.4733330011367798,
2.2000880241394043,
0.8100114464759827,
-0.6391516327857971,
0.18351706862449646,
0.11933620274066925,
0.5473601222038269,
-0.2816818058490753,
0.7648454308509827,... |
def update _ labels _ text ( self ) : self. label _ steps. settext ('steps :'+ str ( self. steps ) ) self. label _ coordinates. settext ('( z, y, x ) :'+ str ( self. current _ position ) ) self. label _ direction. settext ('direction :'+ str ( self. current _ direction ) ) | [
-0.8066723942756653,
-1.768898367881775,
0.25874999165534973,
-1.0047379732131958,
-0.05593804270029068,
0.8677053451538086,
-0.5608647465705872,
-0.13501106202602386,
-0.5532774925231934,
1.2853697538375854,
-0.3953016996383667,
-0.4263310432434082,
-0.1317344605922699,
0.2944766283035278... |
def _ resolve _ existing _ subpath ( self, candidate : union [ path, str ] ) - > optional [ path ] : candidate = self. directory / candidate if not os. path. isabs ( candidate ) else path ( candidate ) if candidate. exists ( ) or candidate. is _ symlink ( ) : path = candidate. resolve ( ) # note : if resolved path is n... | [
-0.00895768590271473,
-0.45905181765556335,
0.7297795414924622,
0.5414867997169495,
-0.15727314352989197,
0.6639024019241333,
-0.16340406239032745,
0.4513739049434662,
-0.03405588120222092,
-0.786230742931366,
0.9881617426872253,
0.31574010848999023,
-0.02147466130554676,
-0.19364783167839... |
def sample _ to _ cell ( ps, cs, n, low _ corner, high _ corner, rng ) : unit _ cell _ points = sample _ our _ uniform ( n = n, d = 2, rng = rng ) low _ corner _ array = np. array ( low _ corner ) high _ corner _ array = np. array ( high _ corner ) side _ lengths = high _ corner _ array - low _ corner _ array shifted _... | [
-0.18099834024906158,
-0.1445491760969162,
0.3977123498916626,
-0.47405028343200684,
0.7931221723556519,
-0.08298122882843018,
-0.38807418942451477,
-0.6010460257530212,
0.4813586473464966,
0.5218812227249146,
0.14025411009788513,
0.5201051235198975,
0.9405452013015747,
-0.0536672770977020... |
def check _ config _ titles ( self, config ) : for style in self. config ['alternate _ styles'] or \ self. config ['preferred _ styles'] : if'title _ attr'not in style or not style ['title _ attr'] \ or style ['title _ attr'] is none : raise valueerror ('alternate and preferred stylesheets must \ have a \'title \'attri... | [
-0.2131199836730957,
-0.1721879243850708,
0.4315939247608185,
-0.8177175521850586,
0.11397252976894379,
0.8915700316429138,
-0.7494632601737976,
0.04498467594385147,
-0.46677449345588684,
0.6549234390258789,
0.7100521326065063,
-0.4914480149745941,
0.23381565511226654,
1.2877010107040405,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.