text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def pltresults ( logdir, data1, data2, title, labelx, labely ) : plt. plot ( data1 ) plt. plot ( data2 ) plt. title ( title ) plt. xlabel ( labelx ) plt. ylabel ( labely ) plt. legend ( ['train ','test'], loc ='upper left') plt. savefig ( logdir +'/'+ labely + '. png') plt. show ( ) | [
0.5897856950759888,
0.36130914092063904,
0.6107800602912903,
-0.9496867060661316,
0.037087734788656235,
0.6859680414199829,
-0.009760928340256214,
-0.2645203769207001,
-0.34576845169067383,
-0.38801223039627075,
-0.49086686968803406,
1.1977736949920654,
0.23704339563846588,
-0.889709830284... |
def generate _ report ( request ) : if request. method! = " post " : return httpresponse ( status = 400 ) # data = json. loads ( request. body ) data = { } html _ template ='disc / hwbi - disc - report - template. html'report _ name ='disc - report. pdf'response = httpresponse ( content _ type = " application / pdf " )... | [
-0.3854524791240692,
0.3258543312549591,
0.7971818447113037,
-0.14724889397621155,
0.6105784773826599,
0.030796188861131668,
0.4314805865287781,
0.021929098293185234,
-0.39118683338165283,
-0.7408844232559204,
0.20421187579631805,
-0.7222533226013184,
-0.7726389169692993,
-0.19999431073665... |
def test _ setup _ rollover _ alias ( self ) : self. render _ config ( ) exit _ code = self. run _ beat ( logging _ args = [ " - v ", " - d ", " * " ], extra _ args = [ " setup ", self. cmd, " - e ", " setup. ilm. rollover _ alias = " + self. custom _ alias ] ) assert exit _ code = = 0 self. idxmgmt. assert _ ilm _ tem... | [
-0.06816969811916351,
-0.35429826378822327,
0.777363657951355,
-0.6638026833534241,
0.4970003664493561,
0.8867303133010864,
0.9886341094970703,
0.5022549033164978,
0.020200397819280624,
0.4864434599876404,
-0.5347081422805786,
0.4321347177028656,
-0.02352600358426571,
-0.313184529542923,
... |
def as _ wrapping _ formatters ( objs, fields, field _ labels, formatters, no _ wrap = none, no _ wrap _ fields = none ) : if no _ wrap _ fields is none : no _ wrap _ fields = [ ] no _ wrap = is _ nowrap _ set ( no _ wrap ) if not needs _ wrapping _ formatters ( formatters, no _ wrap ) : return formatters format _ spec... | [
-1.7469600439071655,
-0.46981415152549744,
0.44165781140327454,
0.216740682721138,
0.06950193643569946,
-0.20340386033058167,
-0.15044450759887695,
-0.5025268197059631,
0.3605440557003021,
0.5809226632118225,
0.3799828588962555,
0.36963117122650146,
0.5196422934532166,
0.8806391358375549,
... |
def page ( self, status : union [ " hostednumberorderinstance. status ", object ] = values. unset, sms _ capability : union [ bool, object ] = values. unset, phone _ number : union [ str, object ] = values. unset, incoming _ phone _ number _ sid : union [ str, object ] = values. unset, friendly _ name : union [ str, ob... | [
0.14319643378257751,
0.3564499020576477,
0.5602681040763855,
-0.11813750118017197,
0.0635206326842308,
0.5635524988174438,
-0.9890604615211487,
0.41347748041152954,
0.08191384375095367,
-0.20046426355838776,
-0.19645816087722778,
-0.05128161609172821,
-0.4845876395702362,
0.002281275810673... |
def process ( self, glyphrecords, script = " latn ", langsys = none, logger = none ) : applicablelookups = self. _ preprocess ( script, langsys ) if logger : logger. logapplicablelookups ( self, applicablelookups ) logger. logprocessingstart ( ) result = self. _ processlookups ( glyphrecords, applicablelookups, logger ... | [
-0.46316128969192505,
0.06243312731385231,
0.6000649333000183,
-0.489642858505249,
0.03417355939745903,
-0.6322867274284363,
0.2685721218585968,
-0.6345773935317993,
0.7007663249969482,
0.189252570271492,
-0.2883654236793518,
0.054212186485528946,
0.08841526508331299,
0.42009788751602173,
... |
def ui _ add _ capacity ( osd _ size _ capacity _ requested ) : osd _ size _ existing = get _ osd _ size ( ) device _ sets _ required = int ( osd _ size _ capacity _ requested / osd _ size _ existing ) old _ storage _ devices _ sets _ count = get _ deviceset _ count ( ) new _ storage _ devices _ sets _ count = int ( de... | [
-0.8596454858779907,
0.20558668673038483,
0.8225520253181458,
0.5095983147621155,
-0.27048394083976746,
0.015321907587349415,
1.3658099174499512,
-0.5722222328186035,
0.037636078894138336,
-0.7077286243438721,
0.35335466265678406,
-0.3524996042251587,
-0.08239050954580307,
0.19485045969486... |
def plotclusters ( clusters, cntrs, stepcnt, anlabel ) : p = open ( ". / " + anlabel + " _ output / dummy _ table. txt ", " w " ) for ix, cluster in enumerate ( clusters ) : for point in cluster : p. write ( ( ( " { } \ t " * len ( point ) ) + " { } \ n " ). format ( * point, ix ) ) for i in range ( len ( cntrs ) ) : f... | [
-0.15246711671352386,
0.3431949019432068,
0.5687012672424316,
0.08361721783876419,
-0.16050902009010315,
0.6744992733001709,
0.5576589703559875,
0.07495487481355667,
-1.185746192932129,
0.027164652943611145,
-0.2950393557548523,
0.5225403308868408,
0.20666256546974182,
-0.08161156624555588... |
def rand ( queue, shape, dtype, luxury = none, a = 0, b = 1 ) : from pyopencl. array import array gen = _ get _ generator ( queue, luxury ) result = array ( queue, shape, dtype ) gen. fill _ uniform ( result, a = a, b = b ) return result | [
-0.7454628944396973,
-0.19766923785209656,
0.5335879921913147,
-1.2218862771987915,
0.2552330791950226,
-0.1503515988588333,
0.002752539236098528,
-0.33327895402908325,
0.4695158004760742,
0.20271776616573334,
-0.6158161759376526,
1.000053882598877,
0.23766882717609406,
-0.2735766172409057... |
def parse _ any ( scanner, parsers ) : expected = set ( ) original _ next _ token = scanner. peek ( ) for parser in parsers : try : return parser ( scanner ) except parseerror as parse _ error : if scanner. peek ( ) = = original _ next _ token : # ok : merely a failure to parse that alternative. expected | = parse _ er... | [
-0.1127677857875824,
-0.5629516243934631,
0.470384418964386,
-0.1280735731124878,
-0.41007179021835327,
0.03392135724425316,
-1.1061757802963257,
-0.24757908284664154,
-0.4291098713874817,
-0.6228616833686829,
0.669340968132019,
-0.20994216203689575,
-0.4776225686073303,
0.3282049596309662... |
def initializeui ( self ) : self. setgeometry ( 100, 100, 1000, 1000 ) self. setwindowtitle ('3. 2 - create new user') self. displaywidgetstocollectinfo ( ) self. show ( ) | [
0.2979259490966797,
0.3516651690006256,
0.3381052613258362,
0.7127057313919067,
0.6692373156547546,
0.8901171088218689,
0.7020434737205505,
-0.5174164175987244,
-0.1124921515583992,
-0.5744176506996155,
-0.5312889218330383,
-0.06629651039838791,
0.03988077491521835,
0.725158154964447,
-0... |
def test _ increment _ self _ with _ sum _ matrix ( self ) : matrix = matrix ( [ [ 1, 2, 3 ], [ 4, 3, 2 ] ] ) matrix + = matrix ( [ [ 3, 2, 1 ], [ 1, 4, 7 ] ] ) self. assertequals ( [ [ 4, 4, 4 ], [ 5, 7, 9 ] ], matrix ) self. assertraises ( differentdimensionerror, matrix. _ _ iadd _ _, [ [ 3, 2 ], [ 1, 4 ] ] ) self. ... | [
0.05869082733988762,
-0.20167338848114014,
0.9101406931877136,
0.41008010506629944,
-0.29929420351982117,
0.4936926066875458,
0.8528430461883545,
-0.8309585452079773,
0.7909261584281921,
-0.10665713995695114,
-0.019862834364175797,
-0.12247022241353989,
-0.20893995463848114,
0.073998332023... |
def adc ( self, seq = res + trg + tok, ntrig = 1, verbose = false, udelay = 10, loopena = 0, loopparam = 4000, loopdelay = 10381 ) : if self. module. issingleroc ( ) : self. daq _ select _ deser160 ( self. deseradjust ) # no idea why we need this cmdlist = [ ] # to send sync signal ( following the signalprobedx command... | [
-0.3222014009952545,
0.22951896488666534,
0.8407431244850159,
0.20559796690940857,
-0.07375930994749069,
-0.06901030242443085,
0.3939363956451416,
-0.05745626613497734,
-0.37371453642845154,
-0.15287086367607117,
0.08310069888830185,
-0.12305356562137604,
-0.0650845617055893,
0.28702998161... |
def get ( key, default = none ) - > str : value = config ( key, default ) if value is none : logger. warning ('expected environment variable ( % s ) not set. ', key ) return value | [
-0.042290300130844116,
0.2923930287361145,
0.26813703775405884,
0.0025554965250194073,
-0.09110219776630402,
-0.36661267280578613,
-0.9595182538032532,
-0.43308863043785095,
-1.067457914352417,
1.2924010753631592,
0.054379772394895554,
0.2628709077835083,
-0.21887251734733582,
0.1198926419... |
def align _ start _ positions ( feat _ one _ lens, feat _ two _ lens, feat _ list _ one, feat _ list _ two ) - > ( list, list, int, int ) : updated _ features = [ ] skipped _ loci = [ ] start _ one, _ = smith _ waterman ( feat _ two _ lens, feat _ one _ lens ) start _ two, _ = smith _ waterman ( feat _ one _ lens, feat... | [
-0.6128342747688293,
-1.3209916353225708,
0.7561280131340027,
0.32627078890800476,
-0.39218464493751526,
-0.014341351576149464,
0.6976413726806641,
0.6355750560760498,
-0.10107263177633286,
0.3379572033882141,
-0.6143848299980164,
0.4222528040409088,
-0.048556528985500336,
-0.3321674466133... |
def is _ mangled ( self, # type : cryptomanager field _ name, # type : str ) - > bool : pass | [
-0.5639536380767822,
0.9177074432373047,
0.5513992309570312,
0.26080554723739624,
-0.21251021325588226,
0.31289392709732056,
-1.0355849266052246,
-0.20123125612735748,
-0.2867000699043274,
-0.1813315600156784,
-0.9106694459915161,
0.2950652539730072,
-0.9163172245025635,
1.2296236753463745... |
def check _ n ( cls, value ) : assert type ( value ) = = int, f'value = = { value }, must be an integer'assert value > = 1, f'n = = { value } must be greater or to 1'return value | [
-1.406072735786438,
0.0064769284799695015,
0.22880080342292786,
0.5824245810508728,
-0.2617262899875641,
0.7068672776222229,
0.290012001991272,
-0.6830148696899414,
0.2536000907421112,
-0.27827733755111694,
0.20372645556926727,
-0.1292514204978943,
-0.510446310043335,
1.3822376728057861,
... |
def read _ ds ( self, msg _ str ) : try : msg _ list = msg _ str. split ('|') except exception as e : msg _ list = list ( ) return msg _ list | [
-0.899178683757782,
0.9496080279350281,
0.6003171801567078,
0.10254257172346115,
-0.6277430057525635,
-0.10232161730527878,
-0.6387845277786255,
0.6397579312324524,
-0.9374434351921082,
-0.3138640224933624,
0.6926226019859314,
-0.26137059926986694,
-0.47111406922340393,
0.5505748987197876,... |
def sync ( self ) : # ensure to rerun only once to avoid infinite loops # caused by a constantly changing state value at each run. # # example : state. value + = 1 if self. _ state [ " is _ rerun " ] : self. _ state [ " is _ rerun " ] = false elif self. _ state [ " hash " ] is not none : if self. _ state [ " hash " ]! ... | [
-0.5100055932998657,
-0.36764422059059143,
0.6577168107032776,
0.7206079363822937,
0.38409358263015747,
-0.5377451777458191,
-0.4809965491294861,
-0.765312910079956,
-0.06759694963693619,
0.06438934057950974,
-0.7586342096328735,
0.6922261118888855,
0.39273902773857117,
0.1290799230337143,... |
def test _ get _ _ followed _ subjects ( self ) - > none : self. client. force _ login ( self. user ) self. user. subjects. add ( self. first _ subject ) response = self. client. get ( self. path ) self. asserttemplateused ( response,'buza / subject _ list. html') assert httpstatus. ok = = response. status _ code self.... | [
1.0750842094421387,
0.6979092359542847,
0.4503139555454254,
0.5523253083229065,
-0.00810830295085907,
0.9415802955627441,
0.1893945038318634,
-1.1112068891525269,
0.4088933765888214,
-1.041628360748291,
-0.3242223560810089,
0.9588412642478943,
0.18751810491085052,
0.36214983463287354,
-0... |
def is _ binary ( self ) : return self. domain = = ( 0, 1 ) or self. domain = = ( ( 0, 1 ), ) | [
-1.171085000038147,
-0.48279961943626404,
0.43179410696029663,
1.4814661741256714,
0.9376435279846191,
0.4686260521411896,
-0.10552164912223816,
-0.9438737630844116,
0.668678879737854,
-0.7167789340019226,
-0.5568607449531555,
1.138774037361145,
-0.9546480178833008,
0.7224324345588684,
-... |
async def unsubscribe _ topics ( self ) - > none : self. _ sub _ state = await self. _ mqtt _ client. unsubscribe ( self. _ sub _ state ) | [
0.8336588740348816,
0.2657419741153717,
0.016490111127495766,
0.0063469260931015015,
-0.6637205481529236,
0.5538727641105652,
-0.24970491230487823,
0.23291204869747162,
-0.37658074498176575,
-0.378380686044693,
-0.7302894592285156,
0.4110635817050934,
0.09907618910074234,
-0.48661515116691... |
async def on _ message _ without _ command ( self, msg ) : if not msg. author. bot and isinstance ( msg. channel, discord. textchannel ) : cfg = await self. config. guild ( msg. guild ). all ( ) enableguild = cfg ['enableguild'] enabledchannels = cfg ['enabledchannels'] if enableguild and msg. channel. id in enabledcha... | [
0.932137131690979,
0.22389350831508636,
0.601976752281189,
-1.3009246587753296,
-0.30458223819732666,
-0.3544526994228363,
-0.08827107399702072,
-0.029558371752500534,
-0.006885090377181768,
-0.13098269701004028,
-0.32945942878723145,
0.4663025140762329,
-1.1119029521942139,
0.919071733951... |
def check _ platform _ tests ( ) : os = platform. system ( ) if os = = " darwin " : cli. log. info ( " detected { fg _ cyan } macos " ) return check _ mac _ os ( ) elif os = = " linux " : cli. log. info ( " detected { fg _ cyan } linux " ) return check _ linux ( ) else : cli. log. info ( " assuming { fg _ cyan } window... | [
0.346988707780838,
-0.17970439791679382,
0.6490057110786438,
0.5665153861045837,
0.6573091149330139,
0.3428817391395569,
0.8764392137527466,
-0.5489100813865662,
-0.46543633937835693,
-0.46547165513038635,
0.11196153610944748,
0.5685054659843445,
-0.3377680480480194,
1.4120304584503174,
... |
def latest _ trigger ( self ) : if not self. _ soap _ actions : yield from self. _ cache _ soap _ actions ( ) detect _ time = none if'getlatestdetection'in self. _ soap _ actions : resp = yield from self. client. call ('getlatestdetection ', moduleid = self. module _ id ) detect _ time = float ( resp. latestdetecttime ... | [
0.9161271452903748,
-0.5335293412208557,
0.8368178606033325,
0.5031263828277588,
0.6577658653259277,
-0.4730905592441559,
-0.6891185641288757,
-0.08883287757635117,
0.8017694354057312,
0.029565557837486267,
-0.3209095895290375,
0.16958816349506378,
-0.586510181427002,
0.4690776467323303,
... |
def test _ node _ annotation _ k _ add _ a _ edit _ k _ edit ( ) : annotation _ key = random _ name ( ) annotation _ value = random _ name ( ) # get node details client, node = \ get _ node _ details ( cluster _ detail [ " cluster " ], cluster _ detail [ " client " ] ) node _ name = node. nodename command = " annotate ... | [
-0.08718536794185638,
-0.32019343972206116,
0.6545702815055847,
-0.4690105617046356,
0.24936892092227936,
0.29159846901893616,
0.661344587802887,
-0.04719334468245506,
-0.10070309042930603,
0.43218234181404114,
-0.4057195484638214,
0.8319407105445862,
0.03720442205667496,
0.073389098048210... |
def to _ dict ( self ) : dval = { } model = type ( self ) mapper = inspect ( model ) for col in mapper. attrs : col _ key = col. key dval [ col _ key ] = str ( getattr ( self, col _ key ) ) return dval | [
-1.3309907913208008,
-0.7688266038894653,
0.5324963331222534,
-0.7839804291725159,
-1.1131006479263306,
-0.2022276371717453,
-0.2793795168399811,
-0.4296983480453491,
-0.6848890781402588,
0.09557663649320602,
-0.9458203315734863,
-0.38509881496429443,
1.079040765762329,
0.4649085998535156,... |
def decorator ( fn, * named _ executors ) : if not named _ executors : named _ executors = [ ('reference ', reference _ executor. referenceexecutor ( compiler = none ) ), ('local ', executor _ stacks. local _ executor _ factory ( ) ), ] named _ parameters _ decorator = parameterized. named _ parameters ( * named _ exec... | [
-0.0021822291892021894,
0.53462815284729,
0.4302237927913666,
-0.17263635993003845,
0.4428504407405853,
-1.15676748752594,
-0.30213019251823425,
0.5037128329277039,
0.06962957978248596,
0.30185094475746155,
0.23225004971027374,
0.21692000329494476,
0.765055775642395,
1.0137083530426025,
... |
def size ( self, index ) : src _ size, tgt _ size = self. langpair _ dataset. size ( index ) src _ size = max ( src _ size, self. ctx _ dataset. size ( index ) ) if self. input _ form = ='sep'else ( src _ size + self. ctx _ dataset. size ( index ) ) return ( src _ size, tgt _ size ) | [
-1.3117902278900146,
0.49950501322746277,
0.565747082233429,
-1.2806787490844727,
-0.5901886820793152,
-0.013857015408575535,
-0.1646517515182495,
-0.0007944311946630478,
0.7378689646720886,
-0.6377671957015991,
0.12388573586940765,
-0.6499772667884827,
-0.22939342260360718,
-0.13837884366... |
def with _ queue ( self, queue ) : if queue is not none : assert queue. context = = self. context return self. _ new _ with _ changes ( self. base _ data, self. offset, queue = queue ) | [
0.15266969799995422,
-0.3678780794143677,
0.41354790329933167,
-0.7802844643592834,
-0.4957478642463684,
-0.22593365609645844,
-0.8819536566734314,
-0.7327039241790771,
0.9529465436935425,
-0.8178464770317078,
-0.44261860847473145,
1.0907831192016602,
0.48774442076683044,
0.177369758486747... |
def test _ learning _ curve _ plots ( ) : # test to validate learning curve output make _ learning _ curve _ data ( ) config _ template _ path = join ( _ my _ dir,'configs ','test _ learning _ curve. template. cfg') config _ path = fill _ in _ config _ paths ( config _ template _ path ) # run the learning curve experim... | [
0.5246127247810364,
0.11406291276216507,
0.5251129865646362,
-0.2888164520263672,
0.14113059639930725,
0.9136419296264648,
0.5721361637115479,
-0.3402066230773926,
-0.5352362394332886,
-0.6738879680633545,
-0.648219645023346,
0.38481706380844116,
0.585517942905426,
0.1492854505777359,
-0... |
def scan ( p ) : x, y = p d = sqrt ( x * * 2 + y * * 2 ) fi = atan2 ( y, x ) j _ p = np. array ( [ [ x / sqrt ( x * * 2 + y * * 2 ), y / sqrt ( x * * 2 + y * * 2 ) ], [ - y / ( x * * 2 + y * * 2 ), x / ( y * * 2 + x * * 2 ) ] ] ) return np. array ( [ d, fi ] ), j _ p | [
-0.17802344262599945,
-0.2020936757326126,
0.6627911925315857,
-0.4362693130970001,
-0.8883316516876221,
0.23112227022647858,
-0.3183996081352234,
-0.8712123036384583,
-0.19827835261821747,
-0.05783911421895027,
-0.07716000080108643,
0.09411625564098358,
0.19287221133708954,
-0.56452697515... |
def _ compute _ intermodulations ( self, orders ) : return frequencymaths. compute _ intermodulation ( self. stimulation. frequencies, fmin = self. fmin, fmax = self. fmax, orders = orders ) | [
-1.1636905670166016,
1.0540357828140259,
0.32349810004234314,
0.37960779666900635,
0.012595424428582191,
-1.3560389280319214,
0.13205379247665405,
-0.4181293845176697,
0.4853295087814331,
-0.2314847856760025,
0.6272427439689636,
-0.17464151978492737,
-0.6585108637809753,
-0.391060292720794... |
def collect _ list ( self ) : date _ list = [ ] date _ list. append ( self. date ) for i in self. args : date _ list. append ( i ) return date _ list | [
-0.46448856592178345,
-0.2542861998081207,
0.45083343982696533,
0.07784616202116013,
0.8915967345237732,
1.0910531282424927,
-0.6770026087760925,
0.2999044358730316,
-0.5067039132118225,
0.25202324986457825,
0.12686440348625183,
0.46549785137176514,
0.20286612212657928,
1.4875836372375488,... |
def _ _ init _ _ ( self, norm _ layer, num _ filters = 256 ) : super ( ). _ _ init _ _ ( ) self. inception = inceptionresnetv2 ( num _ classes = 1000, pretrained ='imagenet') self. enc0 = self. inception. conv2d _ 1a self. enc1 = nn. sequential ( self. inception. conv2d _ 2a, self. inception. conv2d _ 2b, self. incepti... | [
-0.030827071517705917,
-0.08689554780721664,
1.0175119638442993,
0.44633597135543823,
-0.5952693819999695,
-0.18988561630249023,
0.7878664135932922,
0.060891102999448776,
0.1819634884595871,
-0.1222541481256485,
-0.19726526737213135,
-0.3862251341342926,
-0.25468379259109497,
0.88187271356... |
def match ( self, record ) : if not self. _ is _ active : return true return any ( [ f. match ( record ) for f in self. _ registry. registry. values ( ) ] ) | [
0.02056766301393509,
0.19314147531986237,
0.52247154712677,
0.8198736310005188,
0.2177525907754898,
-0.3889419734477997,
0.30752032995224,
0.7373014092445374,
-0.2155914306640625,
-0.4324927031993866,
-0.6512793898582458,
0.015580784529447556,
-1.314605712890625,
0.40972641110420227,
-1.... |
def _ _ update _ dynamic _ files ( cls, parser : templateparser, args : list ) : for ( source _ path, tag, destination _ path ) in cls. _ get _ dynamic _ files ( ) : destination _ path = parser. render _ string ( destination _ path ) destination _ directory = os. path. dirname ( destination _ path ) # ensure the destin... | [
-0.537442684173584,
-0.44085693359375,
0.7408668398857117,
-0.07257474958896637,
0.21676650643348694,
-0.5126417279243469,
0.35945379734039307,
0.30544906854629517,
-1.3985886573791504,
0.2726457715034485,
-0.1072583869099617,
-0.24477508664131165,
0.47409260272979736,
0.24229048192501068,... |
def got _ dgram ( self, dest, data, srcport, dstport ) : if dest is none : print ( " we can't reply to a raw message, got : % s " % data ) else : print ( " we got a signed message from % s : % s " % ( dest, data ) ) self. connection. send _ dsa _ dgram ( dest, data ) raise return ( ) | [
-0.3426608443260193,
0.8703210949897766,
0.6518694162368774,
-0.6552249193191528,
-0.1787274032831192,
-0.7776618003845215,
-0.6761455535888672,
-0.015557155013084412,
0.47172433137893677,
-0.12484778463840485,
-0.4112001657485962,
0.7192795872688293,
-0.1876831203699112,
0.154548108577728... |
def processorder ( orderbook, order ) : try : result = orderbook. post _ order ( order ) except exception as e : # print ( str ( e ) ) result = - 1 return result | [
-1.4128626585006714,
0.25986582040786743,
0.7443506717681885,
1.4967775344848633,
-0.5134990811347961,
-0.3791393041610718,
-0.4329816997051239,
0.2740541398525238,
-0.7237074375152588,
0.2049601525068283,
-0.5362532734870911,
-1.0160555839538574,
-1.646039366722107,
0.6105624437332153,
... |
def async _ update _ model ( ) : global model, user _ items, user _ to _ id try : users = user. objects. all ( ) user _ to _ id = { user : index for index, user in enumerate ( users ) } modules _ count = len ( module _ data ) users _ count = users. count ( ) item _ user = csr _ matrix ( ( modules _ count, users _ count... | [
-0.2135952264070511,
-0.6947422027587891,
0.43452906608581543,
0.11818311363458633,
0.48570796847343445,
0.9643371105194092,
-0.07121584564447403,
0.5094208121299744,
-0.3521401286125183,
1.0795366764068604,
-0.5836236476898193,
0.31400975584983826,
-0.05292661860585213,
0.1250553876161575... |
def _ _ init _ _ ( self, request ) : self. request = request self. logged _ in = request. authenticated _ userid | [
-0.8896411657333374,
-1.071448802947998,
0.28189989924430847,
0.7216580510139465,
-0.2505935728549957,
0.8186079263687134,
-0.4248938262462616,
0.15283875167369843,
0.7502675652503967,
-0.8204664587974548,
0.03783661499619484,
0.31306618452072144,
0.6767414808273315,
0.30083736777305603,
... |
def get _ services _ by _ type _ view ( request ) : return get _ services _ runner ( request ) | [
-1.4359689950942993,
0.8379796147346497,
0.2354012429714203,
0.4397139251232147,
-0.03968525305390358,
-0.589169979095459,
1.0875357389450073,
-1.6658732891082764,
-0.09739165008068085,
-0.5424625277519226,
1.6663459539413452,
0.9773241281509399,
0.024743955582380295,
0.5947458148002625,
... |
def integer ( self ) : result ='' while self. current _ char is not none and self. current _ char. isdigit ( ) : result + = self. current _ char self. advance ( ) return int ( result ) | [
0.5354873538017273,
-0.10683555901050568,
0.4051474630832672,
-0.3001722991466522,
-0.3870781660079956,
-0.3221087157726288,
0.7843403816223145,
-0.2556103467941284,
-0.7233372330665588,
-1.1502790451049805,
0.14613820612430573,
0.18435199558734894,
-1.3026974201202393,
0.00155174965038895... |
def get _ nodes ( self, value ) : nodes _ list = [ ] for node in self. nodes : if node. value = = value : nodes _ list. append ( node ) return nodes _ list | [
-0.9770738482475281,
0.10376548767089844,
0.16111131012439728,
0.3536777198314667,
0.5426895618438721,
-0.2732473611831665,
-0.4187297523021698,
-0.058699432760477066,
0.26749932765960693,
1.3794522285461426,
-0.47220075130462646,
0.827541708946228,
0.05704081058502197,
0.20131494104862213... |
def _ insert _ row ( self, instance _ name : str, stream _ id : int ) - > none : def _ insert ( txn : loggingtransaction ) - > none : txn. execute ( " insert into foobar values (?,? ) ", ( stream _ id, instance _ name, ), ) txn. execute ( " " " insert into stream _ positions values ('test _ stream ',?,? ) on conflict (... | [
-0.07678771764039993,
0.8492094874382019,
0.6994830369949341,
-0.5859647989273071,
0.4383127987384796,
-0.19481682777404785,
-0.047843191772699356,
-0.29057303071022034,
-0.7424433827400208,
0.5692787170410156,
-0.643243134021759,
-0.16974861919879913,
-0.6069815754890442,
0.47247710824012... |
def do _ channel _ registration ( self, tile : tile, reference _ channel : int = 0 ) : reference _ peaks = [ ] for round in range ( tile. get _ round _ count ( ) ) : reference _ peaks. append ( self. peak _ finder. get _ channel _ peaks ( tile. get _ round ( round ), reference _ channel ) ) reference _ peaks = np. conc... | [
-0.4563930332660675,
0.13615326583385468,
0.9622734189033508,
-0.2525550425052643,
1.5356389284133911,
-0.5246750116348267,
0.6801072955131531,
-0.9796586632728577,
0.225713312625885,
0.6219550371170044,
-0.07577487081289291,
0.8603896498680115,
0.23682844638824463,
0.6640424132347107,
0... |
def _ compose _ distributions ( self, noise _ standard _ deviation : float ) - > pldlib. privacylossdistribution : composed, pld = none, none for mechanism _ spec _ internal in self. _ mechanisms : if mechanism _ spec _ internal. mechanism _ spec. mechanism _ type = = mechanismtype. laplace : # the laplace distribution... | [
0.2761494815349579,
-0.42360982298851013,
0.6865936517715454,
-0.8142151832580566,
0.18444092571735382,
-0.022393740713596344,
0.297319620847702,
-0.4582178592681885,
0.5485308170318604,
-0.5237086415290833,
0.9920823574066162,
0.3006608784198761,
-0.03591667488217354,
0.5666815638542175,
... |
def get _ unsaved _ form ( request, patient, page _ name, form _ class ) : if request. referrer and request. referrer. find ('relogin') : unsaved _ form = unsavedform. query. filter ( and _ ( unsavedform. patient _ id = = patient. id, unsavedform. app _ user _ id = = current _ user. id, unsavedform. page _ name. like (... | [
-0.12253840267658234,
-0.29429730772972107,
0.6568676829338074,
-0.7291867733001709,
-0.5968330502510071,
-0.19417572021484375,
-0.8910650014877319,
0.10696695744991302,
0.7006986141204834,
-0.5874943733215332,
-0.1216408759355545,
-0.32596713304519653,
0.10506060719490051,
-0.094882667064... |
def _ _ init _ _ ( self, name ) : self. name = name self. shelves = [ ] self. checked _ out = self. add _ shelf ( " checked out " ) | [
0.6430285573005676,
0.23442143201828003,
0.30844831466674805,
0.5653636455535889,
-0.34697774052619934,
0.7375143766403198,
0.5238991975784302,
-0.47427108883857727,
-0.25277507305145264,
0.535909116268158,
-1.2819538116455078,
-0.5985830426216125,
0.0707065537571907,
1.6130932569503784,
... |
def status _ card ( self, id : union [ status, idtype ] ) - > previewcard : if self. verify _ minimum _ version ( " 3. 0. 0 ", cached = true ) : return self. status ( id ). card else : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('get ', f'/ api / v1 / statuses / { id } / card') | [
-0.727735161781311,
-0.024106904864311218,
0.3528229892253876,
-0.01321006566286087,
-0.8078163266181946,
-0.20415376126766205,
-1.7164306640625,
0.25592219829559326,
1.472240924835205,
0.5610606670379639,
-0.3361181616783142,
1.0552374124526978,
0.26202020049095154,
0.1038292795419693,
... |
def evaluate ( self, data ) : result = true for condition in self. conditionlist : result = condition. evalfunc ( data, result ) return result | [
-0.7284682989120483,
-0.005049565341323614,
0.3935443162918091,
0.009955224581062794,
0.1369091421365738,
-0.16323430836200714,
-0.1372154951095581,
0.9620522856712341,
-0.7488290071487427,
-0.29006776213645935,
-0.6695618629455566,
-1.0146316289901733,
-1.4309728145599365,
0.5765658617019... |
def dict _ append ( dict, key, value ) : if key in dict : dict [ key ]. append ( value ) else : dict [ key ] = [ value ] | [
0.10410559177398682,
0.7736828923225403,
0.26370319724082947,
-0.4267328083515167,
-0.6460479497909546,
0.2432294487953186,
-1.693744421005249,
1.1552412509918213,
0.3149491548538208,
0.8239772915840149,
0.24754318594932556,
-0.0022348484490066767,
0.4455355405807495,
1.2798875570297241,
... |
def remove _ export ( self, context, volume ) : pass | [
-0.04340018704533577,
-1.1491470336914062,
0.36882928013801575,
0.29043129086494446,
-0.5842815637588501,
-0.4105623960494995,
0.23032037913799286,
0.2015264928340912,
0.910109281539917,
0.11597248166799545,
0.18374039232730865,
0.6283484697341919,
-0.9115756154060364,
-0.9865243434906006,... |
def _ boolean ( value ) : # maybe it's an integer value try : return bool ( int ( value ) ) except valueerror : pass # common strings value = value. lower ( ) if value in ['true ','yes'] : return true elif value in ['false ','no'] : return false raise valueerror ( " unrecognised boolean - like value % r " % value ) | [
0.16253672540187836,
0.6555364727973938,
0.6801156997680664,
-0.24629144370555878,
-0.9039741158485413,
0.72014981508255,
-0.09650731086730957,
0.252658873796463,
-0.5915539264678955,
0.1191222071647644,
0.5523647665977478,
-0.15164005756378174,
-0.1564798355102539,
-0.07912363857030869,
... |
def create _ critic _ loss ( self, cumulative _ rewards, estimated _ values, target _ present ) : missing = 1 - target _ present. float ( ) estimated _ values = torch. where ( target _ present, cumulative _ rewards, estimated _ values ) loss = nn. mseloss ( reduction ='none') l = loss ( estimated _ values, cumulative _... | [
0.38911399245262146,
-0.6883072853088379,
0.20373713970184326,
-0.2943830192089081,
0.21042059361934662,
0.5325366854667664,
-0.06768094748258591,
0.552905261516571,
-0.0734514370560646,
0.7074436545372009,
0.870821475982666,
-0.26494109630584717,
0.7883166074752808,
0.21654966473579407,
... |
def test _ 07 _ duskminus ( self ) : l _ time ='dusk - 00 : 21'l _ time, l _ seconds = timefield ( ). _ rise _ set ( l _ time, self. m _ riseset ) # print ('d1 - 07 - a - seconds { } - " { } " \ n '. format ( l _ seconds, l _ time ) ) self. assertequal ( l _ seconds, ( 20 * 60 + 58 ) * 60 + 30 ) | [
-0.16710342466831207,
0.2969444990158081,
0.4023175835609436,
0.00738432677462697,
-0.2131095826625824,
0.38375601172447205,
-0.08088678866624832,
-0.8783207535743713,
0.3125145733356476,
-0.09713319689035416,
-0.2572460472583771,
0.2358095347881317,
0.13237959146499634,
0.5837649703025818... |
def get _ matrix ( self ) : return self. value | [
-0.9632611870765686,
-0.6749257445335388,
0.1973116397857666,
-0.12132987380027771,
0.5147994160652161,
0.19581042230129242,
0.733259916305542,
-0.3859921395778656,
0.08270800113677979,
-1.2735596895217896,
0.6297690272331238,
1.0677844285964966,
-0.08855912834405899,
-0.0398554690182209,
... |
def target _ team _ member _ id ( self, target _ team _ member _ id ) : self. _ target _ team _ member _ id = target _ team _ member _ id | [
-0.46765729784965515,
-1.1182177066802979,
-0.5270066857337952,
-0.413947194814682,
0.2841123938560486,
1.2424283027648926,
-0.03987567126750946,
-0.04445734620094299,
-0.6485134363174438,
0.03276627138257027,
0.016827281564474106,
0.7085468173027039,
0.473421186208725,
-0.2688789069652557... |
def update ( self, index : int, value : _ t ) - > none : storage, length = self. _ st, len ( self ) index = self. _ nmlz _ index ( index, length ) binop = self. binop for idx in self. _ f _ zero _ lsb ( index, length ) : storage [ idx ] = binop ( storage [ idx ], value ) | [
-0.9212879538536072,
0.19960640370845795,
0.38576462864875793,
0.2703017294406891,
-0.5736508965492249,
-0.1817777007818222,
0.2580966651439667,
-0.9509382843971252,
0.4093053936958313,
0.14659443497657776,
-1.3319138288497925,
0.25831106305122375,
-0.6122472286224365,
-0.22285404801368713... |
def op1 ( i, j ) : if j < i : i1 = 0 elif j = = i : i1 = ( ( 2 * j + 1 ) * * 2 - 4 * i * * 2 ) * * 0. 5 / ( 2 * np. pi ) - 2 * j * op0 ( i, j ) elif j > i : i1 = ( ( ( 2 * j + 1 ) * * 2 - 4 * i * * 2 ) * * 0. 5 - ( ( 2 * j - 1 ) * * 2 - 4 * i * * 2 ) * * 0. 5 ) / ( 2 * np. pi ) - 2 * j * op0 ( i, j ) else : raise ( val... | [
-0.4075830280780792,
0.12347077578306198,
0.6347053647041321,
0.430279403924942,
-0.6467523574829102,
-0.18390639126300812,
1.5499627590179443,
-0.6238606572151184,
-0.021068768575787544,
1.2747409343719482,
-0.2743065059185028,
-0.1618543118238449,
-0.812499463558197,
-0.46209025382995605... |
def since _ vaccines ( df ) : return df [ df. index >'2020 - 12 - 31'] | [
-0.040914203971624374,
0.13637755811214447,
0.7737480998039246,
0.5575624704360962,
-0.5856748223304749,
0.44432851672172546,
-0.6136441826820374,
-0.811157763004303,
-0.09421922266483307,
0.0034337204415351152,
1.1647030115127563,
1.1517937183380127,
1.07191002368927,
-1.5834124088287354,... |
def zfill ( df ) : aux = df [ " time " ]. apply ( str ). apply ( lambda x : x. zfill ( 8 ) ). str return pd. to _ datetime ( df [ " date " ] + " " + aux [ : 2 ] + " : " + aux [ 2 : 4 ] + " : " + aux [ 4 : 6 ] + ". " + aux [ 6 : ] ) | [
0.08373343199491501,
0.236822709441185,
0.8225211501121521,
-0.4618145823478699,
0.2350347489118576,
-0.1352427899837494,
-0.763174831867218,
-0.7204688191413879,
0.6586071252822876,
0.7242911458015442,
0.24222470819950104,
0.7978968620300293,
0.7244564294815063,
0.019306061789393425,
0.... |
def setfilename ( filename ) : # implement me | [
-0.8937157392501831,
-1.197288990020752,
0.3369995653629303,
0.7720390558242798,
0.17942391335964203,
0.2038540244102478,
0.6277374029159546,
1.2225921154022217,
-0.5653692483901978,
-0.09593524038791656,
-0.7350386381149292,
-0.1027214378118515,
0.7539952993392944,
0.637006402015686,
-0... |
def event _ endpoint ( activity _ id, event _ id ) : try : with db _ session ( ) as db : event = db. query ( models. event ) \. filter _ by ( id = event _ id ) \. one ( ) except ( sqlalchemy. exc. dbapierror, sqlalchemy. exc. sqlalchemyerror ) as err : return flask. jsonify ( {'status': 404,'error':'event not found ', ... | [
-0.2775455713272095,
-0.6806502342224121,
0.6145910024642944,
0.5489094853401184,
0.5550701022148132,
-0.7459564208984375,
-0.047021593898534775,
-0.11519768834114075,
0.24350756406784058,
0.97573322057724,
0.7104639410972595,
0.3175675868988037,
0.24424627423286438,
-0.11114911735057831,
... |
def test _ console _ other _ user ( c, users : list [ user ], flights : list [ flight ] ) : mock _ data = [ " line1 ", " line2 ", "... ", " line1000 " ] httpretty. register _ uri ( httpretty. get, f " http : / / container - nodeodm : 3000 / task / { flights [ 0 ]. uuid } / output ", body = json. dumps ( mock _ data ) )... | [
-0.37671369314193726,
0.8876635432243347,
0.7349361777305603,
-0.11386239528656006,
0.18416471779346466,
-0.06616933643817902,
0.622886061668396,
-1.4929134845733643,
-0.7736836671829224,
-0.43014705181121826,
0.43062782287597656,
0.3583020865917206,
-0.4004034101963043,
-0.241810709238052... |
def get _ username2 ( ) : return getpass. getuser ( ) | [
-0.6024229526519775,
-1.2154299020767212,
0.39052748680114746,
1.7813255786895752,
-0.47219017148017883,
-0.2495938241481781,
0.533178448677063,
-0.3333999812602997,
-1.0405964851379395,
-0.5964474678039551,
-0.4135337769985199,
0.7331296801567078,
0.31323692202568054,
-0.32339921593666077... |
def getclass ( class _ path ) : module _ path, class _ name = class _ path. rsplit ( ". ", 1 ) # importing module module = none try : module = _ _ import _ _ ( module _ path, fromlist = [ class _ name ] ) except importerror : pass # getting class cls = none try : cls = getattr ( module, class _ name ) except attributee... | [
0.1294172704219818,
-0.7108314633369446,
0.5905648469924927,
0.6859412789344788,
0.4517987370491028,
0.2867349088191986,
0.53580242395401,
-0.40470823645591736,
0.5938441753387451,
0.3043285310268402,
0.4588535726070404,
0.5887948274612427,
-0.3013901710510254,
-0.5516281723976135,
1.175... |
def get _ filters ( ) : print ('hello! let \'s explore some us bikeshare data!') while true : try : city _ entry = input ( " enter city name from the following list of choices : \ n \ t * chicago \ n \ t * new york city \ n \ t * washington dc \ n " ) if city _ entry. lower ( ) in city _ data : break else : print ( " s... | [
0.2138005793094635,
-0.023118343204259872,
0.9442936182022095,
0.17730030417442322,
-0.957111120223999,
1.0961929559707642,
0.3220009207725525,
-0.06927041709423065,
-0.6011025905609131,
-0.5288172960281372,
0.14535737037658691,
0.9007025361061096,
-0.4574979543685913,
1.046446681022644,
... |
def get _ tiff ( new _ pdf, out _ dir ) : resolution = options. resolution # increase density by 25 %, then resize to only 75 % altered _ resolution = int ( resolution * 1. 25 ) output _ file = os. path. join ( out _ dir,'obj. tiff') if os. path. exists ( output _ file ) and os. path. isfile ( output _ file ) and optio... | [
0.27001842856407166,
-0.3065832257270813,
0.7892594933509827,
0.4336397349834442,
-0.29325687885284424,
-0.1610030233860016,
0.7670201659202576,
0.06551911681890488,
-0.10901183634996414,
0.2915760576725006,
0.5581128597259521,
-0.11917652189731598,
-0.10120226442813873,
-0.268898487091064... |
def test _ course _ invalid _ data ( self ) : school = school _ sample ( ) data = {'school': school,'major':'','course':'' } url = school _ course _ url ( school. id ) res = self. client. post ( url, data ) object = models. courses. objects. filter ( * * data ). exists ( ) self. assertequal ( res. status _ code, status... | [
-0.44338956475257874,
0.0510692335665226,
0.6828770041465759,
0.12678730487823486,
1.130399465560913,
1.4137253761291504,
-0.9301076531410217,
0.10440512001514435,
-0.09333425015211105,
-0.6147172451019287,
-0.41926684975624084,
0.20055033266544342,
-0.5536028742790222,
0.06432066857814789... |
def plot _ fire _ prob _ matrix ( self ) : lon = np. reshape ( self. centroids. lon, self. centroids. fire _ propa _ matrix. shape ) lat = np. reshape ( self. centroids. lat, self. centroids. fire _ propa _ matrix. shape ) plt. contourf ( lon, lat, self. centroids. fire _ propa _ matrix ) | [
1.1091570854187012,
-0.8511108160018921,
0.32817283272743225,
0.5374384522438049,
-0.08431258797645569,
0.6116734147071838,
0.21233750879764557,
1.2515085935592651,
-0.026785485446453094,
-0.2816128134727478,
0.8324849605560303,
0.7826886773109436,
0.22040420770645142,
-0.05522583797574043... |
def _ base _ dist ( self, * args, * * kwargs ) : return tfd. transformeddistribution ( distribution = tfd. studentt ( * args, * * kwargs ), bijector = tfp. bijectors. absolutevalue ( ), name = " halfstudentt ", ) | [
0.386730432510376,
-1.5330010652542114,
0.39879411458969116,
-1.2789263725280762,
0.19746200740337372,
0.488768070936203,
0.30477374792099,
0.3163703978061676,
-0.8707152009010315,
-0.08455778658390045,
-0.5222207307815552,
0.11192997545003891,
0.0997561514377594,
-0.649028480052948,
-0.... |
def command _ usage ( command : commands. command ) - > str : return f "! { command. name } { command. signature } " | [
-0.19424475729465485,
-0.4303779900074005,
0.5772501826286316,
-0.7853654623031616,
0.18342764675617218,
-0.5278823375701904,
-0.25008270144462585,
0.11321742832660675,
0.05980188027024269,
0.5671858787536621,
0.7747427225112915,
0.05819644406437874,
0.7552605271339417,
0.8064399361610413,... |
def status ( self, status ) : allowed _ values = [ " pending ", " auth " ] # noqa : e501 if self. local _ vars _ configuration. client _ side _ validation and status not in allowed _ values : # noqa : e501 raise valueerror ( " invalid value for ` status ` ( { 0 } ), must be one of { 1 } " # noqa : e501. format ( status... | [
-0.07687684148550034,
-0.013371759094297886,
-0.34869274497032166,
0.12856389582157135,
-0.2860192060470581,
0.9173464775085449,
0.16357026994228363,
0.8127883672714233,
0.041824307292699814,
-0.18525464832782745,
-0.47048622369766235,
0.07380934804677963,
0.17729155719280243,
0.8615536689... |
def turn _ on ( self, brightness = 100, * * kwargs ) - > none : if not self. _ node. on ( val = brightness ) : _ logger. debug ('unable to turn on light.') | [
0.21933482587337494,
0.4422982335090637,
0.25716111063957214,
0.5766653418540955,
0.7932626008987427,
-0.06590576469898224,
-0.6888608336448669,
0.43822333216667175,
-0.27528873085975647,
-0.6025367379188538,
-1.3613944053649902,
0.23591290414333344,
-0.12000613659620285,
0.862637281417846... |
def _ get _ sequence _ number ( self ) : return self. _ _ sequence _ number | [
-1.517712116241455,
-0.7805067300796509,
0.5776743292808533,
0.29386118054389954,
0.3483533263206482,
-0.6796317100524902,
1.0320438146591187,
1.241094946861267,
-0.3896763026714325,
-0.918082594871521,
-0.57928866147995,
-0.055476848036050797,
0.23791815340518951,
-0.1535264253616333,
1... |
def build ( self ) : for cmd in self. build _ cmds : log. info ('building command : { } '. format ( cmd ) ) full _ cmd ='cd { } ; { } '. format ( self. analyses _ path, cmd ) log. debug ('full command : { } '. format ( full _ cmd ) ) subprocess. call ( full _ cmd, shell = true ) log. info ('build done') | [
-0.4088056981563568,
-0.8254802227020264,
0.5960369110107422,
0.5081441402435303,
1.300984501838684,
0.6231092214584351,
0.9524282217025757,
-0.233613520860672,
-0.5560413002967834,
-1.432248830795288,
0.6553686261177063,
0.37801146507263184,
0.6391878128051758,
0.22497648000717163,
0.40... |
def test _ fit _ existing _ model ( ) : fset = sample _ featureset ( 10, 1, ['amplitude ','maximum ','minimum ','median'], ['class1 ','class2'] ) model = build _ model. models _ type _ dict ['randomforestclassifier'] ( ) model = build _ model. build _ model _ from _ featureset ( fset, model ) assert isinstance ( model,... | [
-0.5089482069015503,
-0.5451319217681885,
0.4163135886192322,
0.3911859691143036,
0.46225297451019287,
0.4575377404689789,
0.03779179975390434,
-0.3009481728076935,
-0.06891916692256927,
-0.5086261034011841,
-0.8343528509140015,
0.07893412560224533,
0.01972988061606884,
-0.0378466807305812... |
def slice _ data _ k _ fold ( self, k ) : self. k = k for class _ label in self. classes : sub _ data = self. data [ self. labels = = class _ label ] sub _ labels = np. ones ( len ( sub _ data ) ) * class _ label dslices = self. _ divide _ k _ fold ( sub _ data, sub _ labels, k ) self. class _ dslices [ class _ label ]... | [
-0.9166786670684814,
0.4500333368778229,
0.5990507006645203,
0.3754670023918152,
-0.5559853315353394,
0.560107946395874,
0.3957444131374359,
0.7284436225891113,
-0.06492874026298523,
0.5574585199356079,
-0.4132729470729828,
0.19208566844463348,
0.7659698724746704,
0.5478901267051697,
-0.... |
def findmatchingbrace ( self, position, string ) : # print eq stack = 0 pos = position if position! = - 1 : if string [ pos ]! ='(': return - 1 for i in string [ position : ] : if ( i = ='(') and ( stack! = - 1 ) : stack + = 1 if ( i = =')') and ( stack! = - 1 ) : stack - = 1 if stack = = 0 : return pos pos + = 1 retur... | [
0.3213026523590088,
-0.23986846208572388,
1.0248197317123413,
0.6166882514953613,
-0.14711003005504608,
-0.8909482955932617,
0.7723782658576965,
-0.2851726710796356,
-0.13390786945819855,
0.9451175332069397,
-0.45417320728302,
0.23018373548984528,
-2.164766788482666,
0.28811100125312805,
... |
def sliding _ window _ co _ occurrence ( self, characternr1, characternr2, windowsize = 2 ) : character1 = self. allcharacters [ str ( characternr1 ) ] character2 = self. allcharacters [ str ( characternr2 ) ] co _ occurrence _ count = 0 skipthis = false self. markedtext _ char = " ". join ( self. markedtext ) # splits... | [
0.09094599634408951,
-1.2931029796600342,
1.0956733226776123,
0.10876373946666718,
-0.7033434510231018,
-0.5803189277648926,
1.483085036277771,
0.07762506604194641,
-0.6005728244781494,
0.21186433732509613,
-0.37910008430480957,
0.7218827605247498,
-1.0527362823486328,
0.9541265368461609,
... |
def get _ source _ alias ( self ) : return self. source _ alias | [
-0.23699481785297394,
-0.7390979528427124,
0.5444251298904419,
-0.4792480170726776,
-0.4082670211791992,
1.0208507776260376,
0.3749065399169922,
0.5422080755233765,
0.1314089000225067,
0.08672226965427399,
-1.356902837753296,
0.7360643148422241,
0.3001993000507355,
0.4758959114551544,
-0... |
def test _ basically _ works ( self ) : now = dt. now ( ) self. _ create _ conversation ( topic = " laptop " ). close ( closing _ time = now, quality = " win " ) kw = {'channel _ id': str ( self. sc. id ),'from': self. one _ day _ before _ str,'to': self. one _ day _ after _ str,'level':'day ','limit': 10,'offset': 0,'... | [
-1.0612003803253174,
-0.009962162934243679,
0.5548306107521057,
-0.04912484809756279,
0.8017193078994751,
0.7047684192657471,
-0.9161123633384705,
-1.3070791959762573,
-0.2907353639602661,
-0.6691085696220398,
0.3717486560344696,
-0.5473234057426453,
-0.39977654814720154,
0.386830776929855... |
def list _ probes ( cmd = " spotread " ) : p = subprocess. popen ( cmd + " - h ", shell = true, stdout = subprocess. pipe, stderr = subprocess. pipe ) _, se = p. communicate ( ) in _ listing = false found = [ ] for line in se. splitlines ( ) : if line. strip ( ). startswith ( " - c listno " ) : in _ listing = true elif... | [
-0.22738729417324066,
-0.8762755393981934,
1.0710657835006714,
-0.2952713072299957,
-0.7036738395690918,
-0.11770682036876678,
0.018338989466428757,
0.17504441738128662,
0.04667222499847412,
0.8612631559371948,
-0.2584081292152405,
-0.331057608127594,
-0.20385600626468658,
0.87994557619094... |
def check _ dns _ sender ( self, msg, target = none ) : if not msg. sender _ address : self. ctxt. log. debug ( " message has no envelope sender " ) return false if " @ " in msg. sender _ address : domain = msg. sender _ address. rsplit ( " @ ", 1 ) [ 1 ] else : domain = msg. sender _ address if self. ctxt. dns. query ... | [
-0.7921510934829712,
0.3017140030860901,
0.6038222908973694,
-0.35800305008888245,
-0.3174941837787628,
-0.3594405949115753,
-0.1542082577943802,
0.7745161056518555,
0.5564969778060913,
-0.06518874317407608,
-0.2228921353816986,
0.5178038477897644,
-0.20748189091682434,
1.1877248287200928,... |
def get _ physicalmachines ( self, uuid = none, market ='market ', * * kwargs ) : return self. get _ entities ('physicalmachine ', uuid = uuid, market = market, * * kwargs ) | [
-1.4076647758483887,
0.4433112144470215,
0.18832585215568542,
0.6501449942588806,
1.0781737565994263,
0.23206275701522827,
-1.1876001358032227,
-0.010629010386765003,
-0.8872083425521851,
-0.7980794310569763,
0.6015863418579102,
0.07569995522499084,
-0.7790658473968506,
-0.8326868414878845... |
def v2 _ runner _ on _ ok ( self, result, * * kwargs ) : host = result. _ host print json. dumps ( { host. name : result. _ result }, indent = 4 ) | [
-0.11624574661254883,
-0.7356966137886047,
0.4440752863883972,
-0.036286383867263794,
-0.8402094841003418,
-0.3995405435562134,
-0.042075224220752716,
-0.8662155866622925,
-0.924913763999939,
0.6739529371261597,
-0.7237998843193054,
1.342373251914978,
0.1730508804321289,
-0.832154154777526... |
def make _ figure ( tracer _ var, bathy, mesh _ mask, cmap, depth _ integrated, figsize = ( 16, 9 ), theme = nowcast. figures. website _ theme, ) : plot _ data = _ prep _ plot _ data ( tracer _ var, mesh _ mask, depth _ integrated ) fig, ( ax _ thalweg, ax _ surface ) = _ prep _ fig _ axes ( figsize, theme ) clevels _ ... | [
0.37673094868659973,
0.5864455103874207,
0.5024739503860474,
-0.793701708316803,
-0.22810593247413635,
0.6815942525863647,
1.3334262371063232,
-0.670132577419281,
-0.15188230574131012,
-0.4451695680618286,
-0.7158454656600952,
-0.011506249196827412,
0.8675691485404968,
0.253168523311615,
... |
def _ _ neg _ _ ( self ) - > " translation2d " : return translation2d ( - self. x, - self. y ) | [
-1.1164578199386597,
-0.2904052138328552,
0.7755606770515442,
-0.26321184635162354,
-0.6281717419624329,
0.8882437348365784,
-1.010185956954956,
-0.9140739440917969,
-0.701991081237793,
-0.5805695056915283,
-0.3877372443675995,
-0.29184040427207947,
0.5658579468727112,
-0.7720673084259033,... |
def merge ( self, url, ids ) : return [ ] | [
-2.166041135787964,
-0.03485168144106865,
0.3122643232345581,
0.6996315121650696,
0.7247618436813354,
-0.1775142103433609,
-1.2888686656951904,
0.7241461277008057,
0.7089530229568481,
-0.24603667855262756,
-0.9590614438056946,
-0.8568880558013916,
-1.1316288709640503,
0.26465415954589844,
... |
def interval _ var ( start = none, end = none, length = none, size = none, intensity = none, granularity = none, optional = false, name = none ) : start = _ check _ arg _ interval ( start, " start " ) end = _ check _ arg _ interval ( end, " end " ) length = _ check _ arg _ interval ( length, " length " ) size = _ check... | [
0.06866917759180069,
-0.6316752433776855,
0.7490749955177307,
0.042368706315755844,
-0.8482245206832886,
0.5735915899276733,
0.14567779004573822,
0.18894615769386292,
-0.8982933759689331,
0.9411853551864624,
-0.15347248315811157,
0.6085400581359863,
-0.9599781036376953,
-0.4187343120574951... |
def get _ boundaries ( bio ) : boundaries = set ( ) boundary _ points = [ ] i = 0 while i < len ( bio ) : if bio [ i ] = = 2 : i + = 1 else : s = i i + = 1 while i < len ( bio ) and bio [ i ] = = 1 : i + = 1 boundaries. add ( ( s, i - 1 ) ) boundary _ points. append ( s ) boundary _ points. append ( i - 1 ) return boun... | [
0.007622967008501291,
0.0037258570082485676,
0.5413479804992676,
1.262451171875,
-0.12219881266355515,
-0.11693459749221802,
0.8628377914428711,
0.41125404834747314,
-0.36823180317878723,
0.7836952805519104,
-0.7821757793426514,
0.33552446961402893,
-0.5961723327636719,
0.05464746430516243... |
def b _ matrix ( a, c ) : n = a. ncols ( ) b = matrix ( n ) for i in range ( n ) : for j in range ( n ) : if i = = j : continue if c. index ( i ) < c. index ( j ) : b [ i, j ] = - a [ i, j ] else : b [ i, j ] = a [ i, j ] return b | [
0.6750597357749939,
-0.5960075855255127,
0.7104784250259399,
-0.0892467275261879,
0.6082207560539246,
-0.020436013117432594,
0.29039379954338074,
-0.10755204409360886,
0.0831514373421669,
0.23771275579929352,
0.5946350693702698,
0.6839826703071594,
-0.22251637279987335,
-0.4541341364383697... |
async def async _ get _ rx ( self ) : data = await self. connection. async _ run _ command ( _ rx _ command ) return int ( data [ 0 ] ) | [
-0.24670173227787018,
1.2940152883529663,
0.6383383274078369,
-0.4517921805381775,
0.8986645936965942,
-1.1986504793167114,
-0.5461588501930237,
0.013638411648571491,
-0.1122017577290535,
-0.9794219732284546,
0.5047360062599182,
0.5121663212776184,
-1.4035602807998657,
-1.096464991569519,
... |
def enet _ projection _ slow ( v, radius = 1, l1 _ ratio = 0. 1 ) : random _ state = check _ random _ state ( none ) if l1 _ ratio = = 0 : return v / sqrt ( np. sum ( v * * 2 ) ) gamma = 2 / l1 _ ratio - 2 radius / = l1 _ ratio m = v. shape [ 0 ] b _ abs = np. abs ( v ) norm = _ enet _ norm _ for _ projection ( b _ abs... | [
-0.570592999458313,
-0.5500640273094177,
0.9675453901290894,
-0.11358630657196045,
-0.684982419013977,
-0.2991124093532562,
0.46061012148857117,
0.0912681519985199,
0.13231132924556732,
1.0396314859390259,
0.5693833231925964,
0.02771792560815811,
-0.36115995049476624,
-0.12377693504095078,... |
def vox _ dict ( entries : list [ tuple [ str, str ] ] ) - > bytes : w = bytearray ( ) w. extend ( struct. pack ('< i ', len ( entries ) ) ) for ( key, value ) in entries : key _ b = bytes ( key,'utf - 8') value _ b = bytes ( value,'utf - 8') w. extend ( struct. pack ('< i ', len ( key _ b ) ) ) w. extend ( key _ b ) w... | [
-0.16345655918121338,
0.7452661991119385,
0.6188502311706543,
-0.6451719999313354,
-0.6575968265533447,
-0.3198011815547943,
-0.8243609666824341,
-0.42970794439315796,
-0.5022587776184082,
0.3830726444721222,
-0.050118234008550644,
-0.15045571327209473,
0.020854344591498375,
0.354425042867... |
def add _ drive ( self, drive _ config ) : return self. _ add _ and _ return ('drives ','drive _ id ', drive _ config, drive _ config. _ asdict ( ) ) | [
-0.3270540237426758,
-0.266510546207428,
0.37072017788887024,
0.18971575796604156,
1.3587734699249268,
0.14328935742378235,
-0.3716064691543579,
0.008125601336359978,
0.09980850666761398,
-0.19057536125183105,
-0.5680418610572815,
-0.44857725501060486,
-1.3573384284973145,
0.62537765502929... |
def acl6name ( self, acl6name ) : try : self. _ acl6name = acl6name except exception as e : raise e | [
0.7831363081932068,
-1.1136200428009033,
0.472512811422348,
0.30804187059402466,
-1.1579511165618896,
0.23132018744945526,
0.8379855751991272,
-0.4263117015361786,
0.7136943340301514,
0.8355727195739746,
-0.745533287525177,
-0.4069720208644867,
1.384738564491272,
-0.46319594979286194,
0.... |
def with _ model _ uri ( self, model _ uri ) : b = deepcopy ( self ) b. config ['model _ uri'] = model _ uri return b | [
-0.4305668771266937,
0.026618100702762604,
0.4770653545856476,
1.1825900077819824,
-0.2674421966075897,
0.8523807525634766,
-0.08320705592632294,
-0.14933346211910248,
0.15999506413936615,
-0.038404110819101334,
-0.7279098033905029,
-0.18902158737182617,
-0.10921480506658554,
-0.2693450152... |
def get _ decoy _ path ( self ) : return self. decoy _ dir | [
-0.3671035170555115,
-0.3708513081073761,
0.15989398956298828,
0.547975480556488,
-0.26924484968185425,
0.07631712406873703,
1.1351393461227417,
0.3042539954185486,
0.021107491105794907,
-0.806890606880188,
-0.13902230560779572,
0.09378775209188461,
0.04679104685783386,
0.673301100730896,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.