text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def filter _ soft _ decisions ( ux _ s : list, update _ threshold : float = 0. 5 ) : num _ steps = len ( ux _ s ) ux _ h = [ ] for t in range ( num _ steps ) : u _ s _ t = ux _ s [ t ] if t : u _ s _ tm1 = ux _ s [ t - 1 ] else : u _ s _ tm1 = torch. zeros _ like ( u _ s _ t ) try : u _ s _ tp1 = ux _ s [ t + 1 ] excep... | [
-0.08931519836187363,
-0.3249644637107849,
0.7519490718841553,
1.254724144935608,
-1.081557273864746,
0.5380226373672485,
-0.10095088183879852,
0.5811824798583984,
-0.007444374263286591,
0.5255629420280457,
-0.260998398065567,
0.2297852635383606,
0.7186603546142578,
-0.26926717162132263,
... |
def test _ rendering ( renderer ) : assert renderer. list _ templates ( ) = = [ " template. tex " ] data = dict ( doc = dict ( oxalink = " https : / / curvenote. com ", title = " a paper ", authors = [ dict ( name = name ) for name in [ " curve note ", " io oxa " ] ], date = parser. parse ( " 6 / 18 / 2021 " ), ), tagg... | [
0.15021607279777527,
0.10092104226350784,
0.5390436053276062,
-0.4007548391819,
-0.13607704639434814,
0.09930484741926193,
-0.39934006333351135,
-0.0787358358502388,
-0.2047615349292755,
-0.8649449348449707,
-0.4231351613998413,
-0.544924795627594,
-0.10465970635414124,
0.1723710298538208,... |
def draw ( self ) : self. _ group. set _ state _ recursive ( ) self. _ vertex _ list. draw ( gl _ quads ) self. _ group. unset _ state _ recursive ( ) | [
-0.26478341221809387,
0.894115149974823,
0.11394650489091873,
0.04188812896609306,
-0.3603692650794983,
0.4913877844810486,
0.426992803812027,
-0.3198612332344055,
0.3397621810436249,
-0.8188564777374268,
-0.6700518727302551,
0.8048256635665894,
-0.12467395514249802,
0.4304927587509155,
... |
def log ( self, loss _ dict, epoch, it, pbar ) : pass | [
-0.7396671175956726,
-0.5605006217956543,
0.20980870723724365,
-0.5299999713897705,
0.06287684291601181,
1.1716350317001343,
-0.869769275188446,
0.39432722330093384,
-0.4440881311893463,
0.04284996911883354,
-0.3608221411705017,
-0.27140572667121887,
-0.00441090390086174,
-0.14110881090164... |
def visualize _ img ( * no _ title _ images, cols = 1, show = true, * * images ) : n = len ( images ) + len ( no _ title _ images ) rows = math. ceil ( n / cols ) plt. figure ( figsize = ( 5 * cols, 5 * rows ) ) cols = np. ceil ( n / rows ) for i, image in enumerate ( no _ title _ images ) : plt. subplot ( rows, cols, ... | [
-0.462273508310318,
1.1718906164169312,
0.5510823726654053,
-0.5202054977416992,
-0.968275249004364,
-0.010797766968607903,
0.17093569040298462,
0.20423507690429688,
-0.35628536343574524,
0.2518850862979889,
0.15969890356063843,
0.3389422297477722,
0.8384886980056763,
0.18733885884284973,
... |
def abnormalvolatility ( self, firm, date, t1 _ offset, t2 _ offset ) : dates = list ( self. dates. keys ( ) ) if ( date not in dates ) or ( dates. index ( date ) + t1 _ offset ) < 0 or ( dates. index ( date ) + t2 _ offset ) > = len ( dates ) : return - 1 start _ ind = dates. index ( date ) + t1 _ offset end _ ind = d... | [
0.24049481749534607,
-0.35590270161628723,
0.7426279187202454,
-0.42410457134246826,
-1.0009812116622925,
0.41887491941452026,
0.0758412703871727,
-0.3551902770996094,
-0.45365890860557556,
0.564446747303009,
0.8566498160362244,
1.084151029586792,
0.5079818367958069,
0.1999228596687317,
... |
def parse _ receipt _ ids ( self, dictionary _ file ) : results _ list = [ ] for res in dictionary _ file ['results'] : results _ list. append ( res ) receipt _ id _ list = [ ] for each _ entry in results _ list : receipt _ id _ list. append ( each _ entry ['receipt _ id'] ) formatted _ id _ list = str ( receipt _ id _... | [
-0.3671841621398926,
-1.126521110534668,
0.41687557101249695,
-1.506790041923523,
0.5160809755325317,
0.33009958267211914,
-0.2555816173553467,
0.8583046793937683,
0.3699137568473816,
0.5840485095977783,
-0.09961000829935074,
-0.2971418797969818,
0.46055173873901367,
0.8106459975242615,
... |
def walk _ files ( root _ file _ path : str ) : target _ dir = os. path. dirname ( root _ file _ path ) for reload _ dir in [ target _ dir ] : for subdir, dirs, files in os. walk ( reload _ dir ) : for file in files : yield fileinfo ( file _ name = file, path = subdir + os. sep + file ) | [
0.13973462581634521,
-0.6281916499137878,
0.7190170288085938,
-0.0609465055167675,
-0.03246809169650078,
0.395020067691803,
1.0897891521453857,
-0.1467159241437912,
-0.7577747106552124,
-0.6973676085472107,
0.20401571691036224,
0.2672007083892822,
-0.04343842342495918,
0.47254645824432373,... |
def list _ of _ ids _ to _ string ( ids, vocab ) : assert ( isinstance ( ids, list ) ) result = " " for i in ids : if i = = vocab. end _ id : return result result = result + " " + str ( vocab. id _ to _ word ( i ) ) if i = = vocab. word _ to _ id ( ". " ) : return result return result. strip ( ). lower ( ) | [
-0.49697840213775635,
-1.1245102882385254,
0.5494424104690552,
-0.26004651188850403,
0.1977757215499878,
-0.8105803728103638,
-0.9934417605400085,
-0.42660093307495117,
1.0853132009506226,
1.3105047941207886,
-0.12495207041501999,
0.26755401492118835,
-0.9269433617591858,
0.029549200087785... |
def _ normalise _ format ( self, alias _ format ) : display = none representation = [ ] if isinstance ( alias _ format, str ) or isinstance ( alias _ format, bytes ) : display = alias _ format representation. append ( alias _ format ) if isinstance ( alias _ format, dict ) : display = alias _ format. get ('display') re... | [
-0.019379012286663055,
-0.9982194900512695,
0.37038305401802063,
-1.3213969469070435,
-0.4075949788093567,
-0.19277755916118622,
-0.11830732971429825,
0.4041312038898468,
0.7861072421073914,
0.7775506377220154,
0.5034238696098328,
0.21208158135414124,
0.17420290410518646,
0.967203199863433... |
def delete _ domain _ record ( self, fqdn : str, record : record ) : url = self. domain _ record _ by _ name _ type _ url. format ( fqdn, record. get _ rrset _ name ( ), record. get _ rrst _ type ( ) ) response = requests. delete ( url, headers = self. header ) return response | [
0.189740389585495,
0.10516255348920822,
0.43432000279426575,
-0.17218810319900513,
-0.058059435337781906,
-0.34055134654045105,
-0.49326297640800476,
-0.42301151156425476,
0.4313390552997589,
-0.2167235016822815,
-0.37097203731536865,
1.1368380784988403,
-0.36548978090286255,
0.48370790481... |
def _ _ str _ _ ( self ) : return self. nombre | [
-0.34574806690216064,
-1.2750208377838135,
0.5880287885665894,
-1.1406476497650146,
-0.8173167705535889,
0.6930670142173767,
-0.9452922344207764,
-0.8408703804016113,
-0.22916515171527863,
-0.2243005484342575,
0.2076280415058136,
1.1913738250732422,
0.09265796840190887,
-0.7827004194259644... |
def zapisz _ parametry ( nazwa _ pliku ) : if os. path. isfile ( nazwa _ pliku ) : okno _ interfejsu _ glownego. wx _ wyswietl _ wiadomosc ( " istnieje juz taki plik ", " warning " ) else : with open ( nazwa _ pliku, " w " ) as f : f. write ( konfiguracja [ " klucz _ zabezpieczajacy _ slownik " ] + " \ n " ) for k, v i... | [
-0.008771030232310295,
-0.8645386099815369,
0.28742101788520813,
-0.5627825856208801,
-0.3459257185459137,
0.5458340644836426,
0.6669588088989258,
0.054773103445768356,
-0.34148868918418884,
0.7730662226676941,
-1.031191110610962,
0.006568372715264559,
-0.020235402509570122,
0.217229768633... |
def introduceinfo ( self ) : if not self. informations : infoid = 0 else : infoid = self. informations [ - 1 ]. id + 1 if self. verbose : print ( " introducing information number " + str ( infoid ) ) self. informations. append ( info ( infoid, 2, self. nodes. keys ( ), self. verbose ) ) | [
0.17975549399852753,
0.41178983449935913,
0.39056259393692017,
-0.5324272513389587,
0.977057158946991,
0.3793265223503113,
0.5234930515289307,
0.02025994099676609,
-0.5908724069595337,
-0.39630889892578125,
-0.41617557406425476,
0.6490423083305359,
-0.29491618275642395,
0.6665220856666565,... |
def display _ end _ of _ game ( self ) : self. display ( " , 。 " ) | [
0.48479780554771423,
0.08510897308588028,
0.7526183724403381,
-0.25528472661972046,
-0.366344153881073,
0.4827149212360382,
0.0015536029823124409,
-1.0267258882522583,
0.6057840585708618,
1.5448580980300903,
0.6938430666923523,
1.0833648443222046,
-0.6365901827812195,
0.35360604524612427,
... |
def onboard _ task _ volume _ create ( context, task _ id, vol _ uuid, values ) : return impl. onboard _ task _ volume _ create ( context, task _ id, vol _ uuid, values ) | [
-0.27188727259635925,
0.2611997425556183,
0.3565853536128998,
0.10436567664146423,
0.16435153782367706,
0.020596390590071678,
0.012630864977836609,
-0.27147558331489563,
-1.2176810503005981,
0.3767155110836029,
-0.27396655082702637,
-0.10823521763086319,
0.5686580538749695,
0.1444845348596... |
def copy _ optimizer _ params _ to _ model ( named _ params _ model, named _ params _ optimizer ) : for ( name _ opti, param _ opti ), ( name _ model, param _ model ) in zip ( named _ params _ optimizer, named _ params _ model ) : if name _ opti! = name _ model : logger. error ( " name _ opti! = name _ model : { } { } ... | [
-0.3812371492385864,
-0.5473939180374146,
0.5704358220100403,
0.31747952103614807,
-0.3415904641151428,
0.9821354150772095,
-0.6527494192123413,
-0.7482312917709351,
-1.010192632675171,
2.2099146842956543,
-1.175603985786438,
0.6594661474227905,
-0.09237761050462723,
-0.10804963111877441,
... |
def _ _ init _ _ ( self, * arg, * * kws ) - > none : self. name = arg [ 0 ] self. channel = kws [ " channel " ] self. gainindex = kws [ " gain " ] self. description = kws [ " description " ] self. conversion _ id = kws [ " conversion function " ] self. full _ scale = kws. get ( " full scale ", none ) self. set _ conver... | [
-0.11231689155101776,
-0.68585604429245,
0.6989482641220093,
-0.3788624107837677,
-0.3265796899795532,
-0.742267906665802,
-0.8959301114082336,
-0.8184325695037842,
0.14608238637447357,
0.32729285955429077,
-0.9855172634124756,
0.6615855693817139,
0.26442840695381165,
0.5756428241729736,
... |
def queue _ notification ( notification _ type, message ) : # look up what systems this notification should go to try : destinations = saq. config ['messaging'] [ f'notification _ type _ { notification _ type }']. split ( ',') except keyerror : logging. error ( f " unknown notification type : { notification _ type } " ... | [
-0.3838101625442505,
0.9074298143386841,
0.6217343807220459,
0.7360898852348328,
0.8817026615142822,
0.3057388663291931,
-0.20112821459770203,
-0.3910948932170868,
-0.15370403230190277,
0.65885329246521,
-0.4150214195251465,
-0.19032461941242218,
-0.0363701656460762,
0.9413352608680725,
... |
def update _ kernel ( ) : if resourcemanager ( ). get _ updating _ kernel ( ) is true : return { " status " : " currently the pharos toolset is updating. try later please. " } base _ image = request. get _ json ( ) ['content'] t = thread ( target = thread _ update _ kernel, args = ( base _ image, ) ) t. start ( ) retur... | [
-1.027234673500061,
-0.38318419456481934,
0.2998340427875519,
0.3068048357963562,
0.23546674847602844,
-1.1652143001556396,
-0.4992201328277588,
-0.5537552237510681,
-0.4493102431297302,
-0.14979444444179535,
0.4332661032676697,
0.9446202516555786,
-0.9340813159942627,
0.8816722631454468,
... |
def wx _ 3 _ pojedyncze _ klikniecie ( self, evt ) : lista _ kom = [ ] z = ( evt. getrow ( ), evt. getcol ( ) ) lista _ kom. append ( z ) self. aktualnie _ zaznaczone _ kom = ( lista _ kom ) evt. skip ( ) | [
-0.0852096825838089,
-0.39467647671699524,
0.37874895334243774,
0.6261763572692871,
-0.2380082905292511,
0.5955033302307129,
1.120442271232605,
0.00015997886657714844,
-0.4124222993850708,
0.8267585635185242,
-1.4920438528060913,
-0.35881108045578003,
0.3671886622905731,
-0.064503647387027... |
def join ( list ) : s = " " for elem in list : s + = elem + ", " return s [ : - 1 ] | [
-0.12964342534542084,
-0.10649363696575165,
0.7148423790931702,
0.6129598617553711,
0.49606239795684814,
0.5943738222122192,
-1.4054412841796875,
0.8903063535690308,
0.940902829170227,
0.051514241844415665,
-0.39044469594955444,
-0.23315691947937012,
-1.1792277097702026,
0.2042276859283447... |
async def async _ unload _ entry ( hass, config _ entry ) : hass. data [ domain ] [ data _ client ]. pop ( config _ entry. entry _ id ) await hass. config _ entries. async _ forward _ entry _ unload ( config _ entry, " air _ quality " ) return true | [
-0.2575664818286896,
0.6845355033874512,
0.2667806148529053,
-1.483020305633545,
0.29566657543182373,
0.48852142691612244,
-0.28970101475715637,
0.39007458090782166,
-0.20351336896419525,
0.27294185757637024,
0.29009655117988586,
0.3575199544429779,
0.1877003014087677,
-0.35379543900489807... |
def constrain _ anyone ( self, value : union [ str, none ] ) - > bool : return self. _ constrain _ presence ('anyone ', value ) | [
-0.6918123364448547,
-0.5191136002540588,
0.5259047746658325,
0.7953840494155884,
-0.3186810612678528,
0.6656816601753235,
0.4287765622138977,
-0.19182798266410828,
-0.4447570741176605,
0.2200774848461151,
-0.18638469278812408,
-0.8081696629524231,
-0.822306752204895,
0.6058008074760437,
... |
def test _ atomic _ any _ uri _ pattern _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 1. xsd ", instance = " nistdata / atomic / anyu... | [
-0.32440677285194397,
0.029927652329206467,
0.5773419141769409,
1.032172679901123,
-0.04041922837495804,
0.3751614987850189,
0.12368606775999069,
0.28374072909355164,
0.453305184841156,
0.08524437248706818,
0.3974936902523041,
-0.5145951509475708,
-0.5287137627601624,
-0.2164308875799179,
... |
def odata _ id ( self ) : return self. _ json. get ( prop _ resource _ id ) | [
0.5348842144012451,
-0.6287721395492554,
0.31191733479499817,
-0.9337049126625061,
0.6127409338951111,
1.0423136949539185,
-0.30911198258399963,
0.05235039070248604,
0.8562784790992737,
0.16329163312911987,
1.0456879138946533,
1.167002558708191,
0.20461122691631317,
-0.7174555063247681,
... |
def imagecircle ( r ) : im = np. zeros ( [ 2 * r - 1 ] * 2, dtype = int ) r2 = r * * 2 for i in range ( 2 * r - 1 ) : for j in range ( 2 * r - 1 ) : if ( i - r + 1 ) * * 2 + ( j - r + 1 ) * * 2 < r2 : im [ i, j ] = 1 else : im [ i, j ] = 0 return im | [
-1.3204864263534546,
-0.5347583889961243,
0.5575964450836182,
-0.45759546756744385,
-0.32391592860221863,
-0.53345787525177,
1.2857511043548584,
-1.1421176195144653,
0.25053006410598755,
0.822776734828949,
0.07358565926551819,
0.3969361484050751,
0.08533290773630142,
0.38978227972984314,
... |
def broadcast _ return ( fn, horovod ) : result = fn ( ) if is _ on _ master ( ) else none if horovod : name = f'broadcast _ return _ { int ( time. time ( ) ) }'result = _ hvd. broadcast _ object ( result, name = name ) return result | [
-0.25312870740890503,
-0.04890242591500282,
0.6317838430404663,
1.3141510486602783,
-0.5369751453399658,
-0.8170966506004333,
0.3683258593082428,
0.26243528723716736,
-0.015225823037326336,
0.18376752734184265,
0.23178234696388245,
1.1458238363265991,
-0.9388182759284973,
-0.36969542503356... |
def chequearceldasid ( cadena, indice, tope ) : contmina = 0 if 0 < indice < tope : # si no estoy en la primera ni ultima celda, debo mirar a izq y derecha if cadena [ indice - 1 ] = ='*': # chequeo espacio anterior contmina = contmina + 1 if cadena [ indice + 1 ] = ='*': # chequeo espacio siguiente contmina = contmina... | [
-0.054536569863557816,
-0.7826076149940491,
0.6200860142707825,
0.06198637932538986,
-1.088416576385498,
0.02232060581445694,
-0.10938261449337006,
0.39668628573417664,
0.12975183129310608,
-0.16331198811531067,
0.8743802905082703,
0.6817314624786377,
-0.6158680319786072,
-0.19092349708080... |
def execute _ with _ requirements ( script : str, required : union [ list, dict ], silent = false, configured = true, * * kwargs ) : requirejs = requirejs ( ) if not configured : if isinstance ( required, dict ) : requirejs. config ( required, * * kwargs ) else : raise typeerror ( f " attribute ` required ` expected to... | [
-0.5041109323501587,
-0.2662939131259918,
0.7510192394256592,
-0.22725869715213776,
-0.6930178999900818,
-0.5833341479301453,
-0.6192188858985901,
-0.1448478102684021,
0.3288211226463318,
0.9199402332305908,
-0.1894560605287552,
0.10798997431993484,
-0.31414949893951416,
0.3751513063907623... |
def get _ default _ config _ help ( self ) : config = super ( tsdbhandler, self ). get _ default _ config _ help ( ) config. update ( {'host':'','port':'','timeout':'','tags':'','prefix':'','batch':'','compression':'','user':'','password':'','cleanmetrics': true,'skipaggregates': true, } ) return config | [
0.1806006133556366,
0.6668962836265564,
0.5571063756942749,
-0.21060526371002197,
0.4584287405014038,
0.5399469137191772,
-0.15931163728237152,
0.4202006459236145,
-1.499100923538208,
0.6789774894714355,
-0.9023458957672119,
-0.6374213099479675,
0.1393834352493286,
0.9816819429397583,
0.... |
def _ eofs _ impl ( * arrays, n _ modes = none, center = true, bias = false, ddof = none, skipna = true ) : n _ arrays = len ( arrays ) n _ samples = _ check _ eofs _ input _ arrays ( arrays ) has _ dask _ array = any ( [ is _ dask _ array ( a ) for a in arrays ] ) # retain original shapes for reshaping after computing... | [
0.2591206729412079,
0.4094056487083435,
0.9421871304512024,
-0.07466842979192734,
-0.25606369972229004,
-0.461864709854126,
0.35140493512153625,
0.3021261394023895,
0.40240293741226196,
0.5915756821632385,
0.6266939640045166,
-0.16364869475364685,
1.2771930694580078,
0.14428631961345673,
... |
def propagate _ attribute ( self, attr, val ) : setattr ( self. workflow, attr, val ) | [
0.41301262378692627,
-0.3598649203777313,
0.38118934631347656,
-0.02638828381896019,
-0.60723876953125,
0.09408988803625107,
0.7902899384498596,
0.17073482275009155,
0.436964750289917,
0.003204010659828782,
0.5711982846260071,
0.806134045124054,
0.3021843731403351,
0.3025451898574829,
0.... |
def escape _ special _ chars ( string, special _ chars ) : escape _ string = string for ss in special _ chars : escape _ string = re. sub ( ss,'\ \'+ ss, escape _ string ) return escape _ string | [
0.19931860268115997,
-0.48308810591697693,
-0.00896738562732935,
0.4008374810218811,
-0.1886824518442154,
-0.25325867533683777,
-0.7164097428321838,
0.7366888523101807,
-0.938999593257904,
0.6689918041229248,
-0.5937004089355469,
1.4282121658325195,
0.20812761783599854,
-0.9805759787559509... |
def test _ update _ record _ rejection _ multiple _ same _ english _ values ( ) : res = requests. post ( f'{ env. awg _ base _ url } / api / cve - id / ', headers = utils. base _ headers, params = {'amount': 1,'cve _ year': 2000,'short _ name':'mitre'} ) id _ num = json. loads ( res. content. decode ( ) ) ['cve _ ids']... | [
-0.42572492361068726,
0.22353751957416534,
0.7778641581535339,
-0.30880215764045715,
0.6002572774887085,
0.2995992600917816,
-0.054105594754219055,
0.6350086331367493,
0.3084571063518524,
0.5241345763206482,
-1.3230563402175903,
0.3901999890804291,
-0.3027981221675873,
-0.2675146162509918,... |
def setup ( self ) : super ( liveinvoicecollectionbasetestcase, self ). setup ( ) self. api _ client = api. apiclient ( ) | [
0.637864887714386,
-1.113539218902588,
0.3736054301261902,
-0.30212387442588806,
0.9364073276519775,
0.01865021325647831,
0.24628829956054688,
0.486663818359375,
0.13870200514793396,
-0.2713020145893097,
-0.12924475967884064,
-0.6189447641372681,
-0.6990696787834167,
-0.04179701581597328,
... |
def wikipage _ factory ( table _ pagenum ) : class wikipage ( object ) : " " " class object to model wikipage [ 0 - n ] table. text, wiki text markup author, wiki text author " " " def _ _ init _ _ ( self, text, author = u'' ) : self. text = text self. author = author # hitch wiki translation for ` text ` self. transla... | [
-0.13298192620277405,
0.004166650585830212,
0.6051726341247559,
-0.0008691981784068048,
-0.24284885823726654,
-0.12208883464336395,
-0.44915664196014404,
0.4002643823623657,
-0.2417471706867218,
0.1350633054971695,
0.19337068498134613,
-0.28697288036346436,
0.6815855503082275,
-0.019939228... |
def _ hard _ remove _ tags ( self ) : if self. hard _ tags : p = re. compile ( " | ". join ( [ " < { tag } [ ^ > ] * > | < / { tag } > ". format ( tag = tag ) for tag in self. hard _ tags ] ) ) self. cleaned _ html = re. sub ( p, " ", self. html ) | [
0.06139805167913437,
0.5494511723518372,
0.49988463521003723,
0.6466187238693237,
0.40721815824508667,
-0.12183499336242676,
-0.19481953978538513,
0.6993301510810852,
-0.706548273563385,
0.8657852411270142,
-0.5422857403755188,
0.1550423949956894,
-0.30278629064559937,
1.4008511304855347,
... |
def clone _ revision ( self, instance, instance _ class, instance _ name, indexer, check = true, state = states. open ) : if not isinstance ( indexer, user ) : raise typeerror, " please supply a valid indexer. " if not isinstance ( instance, instance _ class ) : raise typeerror, " please supply a valid % s. " % instanc... | [
0.1370762437582016,
0.009853484109044075,
0.777163565158844,
0.41450023651123047,
-0.22670605778694153,
0.10684648901224136,
0.20570124685764313,
0.5267571210861206,
0.10219213366508484,
0.7119997143745422,
0.5547014474868774,
0.15215076506137848,
-0.8100979924201965,
-0.8685479760169983,
... |
def write _ file _ to _ slack ( self ) : hidden _ files = [ ] # read file input _ file = self. input length = len ( input _ file ) # position for input file partitioning pos = 0 # random id for file metadata file _ id = " 123 " # create hidden file object with id and length hidden _ file = slackfile ( file _ id, length... | [
-0.0068666678853333,
-0.04031810164451599,
0.6820651292800903,
-0.8432485461235046,
1.2958259582519531,
0.5954968929290771,
0.6707505583763123,
-0.39322829246520996,
-0.474850058555603,
-0.06293026357889175,
-0.5459046363830566,
0.40945079922676086,
-0.1791824847459793,
0.6275601387023926,... |
def finish ( ) : log. msg ( " statistics " ) combined = defaultdict ( int ) for ptype in statistics. keys ( ) : psum = 0 log. msg ('from % s'% ptype ) sorted _ p = sorted ( statistics [ ptype ]. iteritems ( ), key = operator. itemgetter ( 1 ), reverse = true ) for pid, pcount in sorted _ p : log. msg ( " \ tid : \ t % ... | [
0.47967907786369324,
-0.2974945902824402,
0.9100973606109619,
-1.2102077007293701,
0.2762175500392914,
0.2523074150085449,
0.4279097318649292,
-0.8190896511077881,
-0.06374192982912064,
0.02620641142129898,
-0.27769482135772705,
0.28227436542510986,
0.6223756074905396,
0.7494716048240662,
... |
def is _ edge _ port ( self, dpid, port ) : for link in self. adjacency : if link. dpid1 = = dpid and link. port1 = = port : return false if link. dpid2 = = dpid and link. port2 = = port : return false return true | [
-0.4323018491268158,
-0.33901098370552063,
0.6801260113716125,
-0.36567631363868713,
0.6197723150253296,
0.14086733758449554,
-0.24133814871311188,
-0.2853563725948334,
0.5702587366104126,
0.6232485771179199,
0.5023784637451172,
0.6288447380065918,
-1.0094801187515259,
-0.6846057772636414,... |
def main ( sts _ train _ file, sts _ dev _ file, w2v _ file ) : min _ paraphrase = 4. 0 max _ nonparaphrase = 3. 0 # todo 1 : load data partitions and convert to paraphrase dataset as in the lab # you will train a logistic regression on the train partition train _ texts _ sts, train _ y _ sts = parse _ sts ( sts _ trai... | [
0.38820675015449524,
0.1675032079219818,
0.7275165915489197,
0.5418736338615417,
0.10546721518039703,
0.44125550985336304,
-0.49910441040992737,
0.17195655405521393,
-0.25551486015319824,
-0.7908630967140198,
0.07526864856481552,
-0.05864180251955986,
-0.005708509590476751,
-0.550045907497... |
def _ cache _ miss ( cls, user _ hash : str ) : try : return json. loads ( cloud _ storage. get _ object ( user _ hash ) ) except cloud _ storage. nosuchkey : raise usernotfound ( ) | [
0.04864484444260597,
-0.3604850769042969,
0.40626540780067444,
-0.08503127843141556,
-0.8302628993988037,
0.1370597928762436,
-0.5784050822257996,
-1.0409226417541504,
-0.3509332239627838,
0.323757141828537,
0.20110367238521576,
0.11918140947818756,
0.6830447912216187,
-0.33379074931144714... |
def tt _ comp ( ) : # init training _ epochs = 25 train _ ae = [ ] train _ ffn = [ ] test _ ffn = [ ] # ae tmp1, tmp2, tmp3 = train _ test _ plot ( for _ comparison = true ) train _ ae + = [ tmp1 ] train _ ffn + = [ tmp2 ] test _ ffn + = [ tmp3 ] # ae _ sparsity tmp1, tmp2, tmp3 = train _ test _ plot ( use _ momentum =... | [
0.7418272495269775,
0.1340465247631073,
0.8835875988006592,
-0.8284610509872437,
0.8598820567131042,
0.35985371470451355,
1.2274820804595947,
0.21915532648563385,
-0.31770890951156616,
0.09957752376794815,
0.2436247020959854,
-0.017580734565854073,
0.5714196562767029,
0.22344602644443512,
... |
def update ( clss, * * kwargs ) : primary _ keys = [ key. name for key in inspect ( clss ). primary _ key ] primary _ key _ filter = dict ( ( k, kwargs [ k ] ) for k in primary _ keys ) find _ query = clss. query. filter _ by ( * * primary _ key _ filter ) if find _ query. first ( ) : find _ query. update ( kwargs ) re... | [
-0.510394811630249,
-0.39768362045288086,
0.49291566014289856,
0.04404992237687111,
-0.5440574884414673,
-0.28054577112197876,
-0.6340281963348389,
-0.4594408869743347,
-0.4707154631614685,
0.6456897854804993,
0.06692004203796387,
-0.25643840432167053,
-0.8291126489639282,
-0.0822064653038... |
def toarray ( self ) : sz = np. shape ( self. pos ) carray = np. zeros ( 4 + 3 * self. ats * sz [ 0 ] + sz [ 0 ] ) carray [ 0 ] = self. timestep carray [ 1 ] = self. nclusts carray [ 2 ] = self. ats molno = sz [ 0 ] carray [ 3 ] = molno pend = 4 + 3 * self. ats * molno carray [ 4 : pend ] = np. reshape ( self. pos, [ 1... | [
-0.3499809801578522,
-0.8255494832992554,
0.4771864414215088,
-0.6843348145484924,
0.7032794952392578,
-0.3799428939819336,
-0.7981374263763428,
-0.7224557995796204,
-0.03951345384120941,
0.28850388526916504,
-0.4878826141357422,
0.19659674167633057,
-0.3170115649700165,
-0.460018515586853... |
def load _ parameters ( self, num _ neurons = none, h _ alpha = none, h _ x0 = none, h _ y0 = none, set = 0, sigma _ center = 0. 5, sigma _ surround = 0. 8 ) : if num _ neurons is not none : self. num _ neurons = num _ neurons if h _ alpha is none or h _ x0 is none or h _ y0 is none : raise valueerror ( " must specify ... | [
0.16517135500907898,
0.2001325637102127,
0.6841500401496887,
0.330233097076416,
0.579450786113739,
0.24548748135566711,
-0.26204267144203186,
0.18320773541927338,
-0.44362765550613403,
0.8748695850372314,
-0.19473394751548767,
0.19350217282772064,
-0.15308566391468048,
0.7015493512153625,
... |
def json _ transform ( obj, format = none ) : # base cases serializable _ types = ( int, float, bool ) if isinstance ( obj, serializable _ types ) or ( obj is none ) : return obj elif isinstance ( obj, datetime. datetime ) : if format : return obj. strftime ( format ) else : return obj. ctime ( ) # recursive cases elif... | [
-0.0973823145031929,
-0.28440365195274353,
0.9062150716781616,
0.504102349281311,
-0.9304841160774231,
-0.5127027630805969,
-0.1320924162864685,
-0.4260561764240265,
0.9222120046615601,
-0.17626559734344482,
-0.38049110770225525,
0.6077702045440674,
-0.14848542213439941,
0.4053338170051574... |
def test _ get _ post _ role _ user ( self ) : # get one post : post = post. query. first ( ) post = post. to _ json ( ) # send request : response = self. client. get ( f'/ api / v2 / posts / { post [ " id " ] } ', headers = self. get _ api _ headers ( token = current _ app. config ['auth0 _ role _ user'] ), content _ ... | [
0.09926143288612366,
-0.06724903732538223,
0.8202911615371704,
-0.17114406824111938,
0.9940029382705688,
0.2788485884666443,
-0.5577901005744934,
0.192291721701622,
-0.11484361439943314,
-0.6336293816566467,
-0.21152229607105255,
0.5919005870819092,
0.4232461750507355,
-0.6592153310775757,... |
def _ loc _ sets _ to _ aggregate ( self ) : main _ set = self. args. location _ set _ id supp _ sets = self. args. add _ agg _ loc _ set _ ids loc _ sets = [ main _ set ] + supp _ sets # these warnings are future - defensive and non - essential, so # if there are any failures, we want to log a warning but not # stop e... | [
0.027517544105648994,
-0.03463345021009445,
0.4132058620452881,
-0.46101880073547363,
0.5983825325965881,
0.3425680100917816,
0.07071516662836075,
0.11951195448637009,
0.26356902718544006,
0.20553475618362427,
1.6800241470336914,
0.3957226276397705,
0.8314309120178223,
0.05799716338515282,... |
def add _ new _ edge _ same _ currency _ different _ exchanges ( self, vertex ) : # before adding a new edge, we check if this edge already exists or not # we get all indexes of edges from the list _ edges which have the same currency attribute as the vertex currency # attribut passed as a parameter tab _ index = self.... | [
-0.20896098017692566,
-0.1935325711965561,
0.8231204748153687,
-0.1365622580051422,
-0.06616822630167007,
0.35939833521842957,
0.2464822679758072,
0.05405466631054878,
1.3132257461547852,
1.0807814598083496,
-0.4405938982963562,
-0.058564722537994385,
-1.1607061624526978,
0.426352441310882... |
def test _ example _ input _ one _ clone _ backend _ validation ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. wait _ for _ rows _ to _ appear ( 1 ) input _ pag... | [
-0.048635393381118774,
0.5390163660049438,
0.8403397798538208,
0.8589615821838379,
0.6403182744979858,
0.7261109352111816,
0.24752837419509888,
-0.1150691956281662,
-0.03849124163389206,
0.9247478246688843,
-0.4425331652164459,
0.35580408573150635,
-0.31378212571144104,
-0.0758309960365295... |
def stop ( ) : tidyup ( ) shutdown _ server ( ) return " parando servidor " | [
-1.3063907623291016,
-0.706271767616272,
0.2304011583328247,
-0.09654919803142548,
-0.41075196862220764,
0.4347831904888153,
-0.1216641515493393,
0.44721880555152893,
-0.7207781076431274,
0.37683188915252686,
0.0020517525263130665,
1.0867668390274048,
0.08679625391960144,
0.090556517243385... |
def test _ all _ by _ participant ( self ) : pass | [
0.6740049719810486,
-0.7719734907150269,
0.6308367848396301,
2.055061101913452,
0.7226673364639282,
0.8670082688331604,
0.9790303111076355,
0.13284824788570404,
0.26817694306373596,
-0.3608865737915039,
-0.14148381352424622,
-0.3707868456840515,
-0.8097817897796631,
-0.009005510248243809,
... |
def unescape ( self, string ) : return string. decode ('string _ escape') | [
0.08620620518922806,
-0.6836069226264954,
0.2489374279975891,
-0.4836532771587372,
-0.45715513825416565,
-0.9153711199760437,
-0.9578694701194763,
-0.0697120875120163,
-0.3960743248462677,
0.5410922765731812,
-0.9559579491615295,
0.41171368956565857,
-0.5914081335067749,
-2.010016202926635... |
def test _ list _ decimal _ max _ length _ 2 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 3. xsd ", instance = " nistdata / list / ... | [
-0.3206857144832611,
0.18487529456615448,
0.5253825783729553,
1.0910618305206299,
-0.12332304567098618,
0.5394454598426819,
-0.9169430732727051,
0.6684020161628723,
1.274775743484497,
0.42060530185699463,
-1.0237668752670288,
-0.01937561295926571,
0.3521934449672699,
-0.1421525478363037,
... |
def remove ( self, chb ) : if chb. collection is not self : self. error ( " can't remove the checkbox from this collection as it is not " " attached to this collection! " ) return chb. collection = none self. _ items. remove ( chb ) | [
0.021475715562701225,
-0.4207327365875244,
0.27158263325691223,
0.1930830478668213,
0.4537705183029175,
1.1403480768203735,
0.4298437237739563,
0.04876541718840599,
0.0705733373761177,
-0.04031669721007347,
-1.439229130744934,
-0.024895718321204185,
-1.6442118883132935,
0.29606083035469055... |
def save ( self, * * kwargs ) : self. table _ exists ( ) if self. validate ( ) : # type : ignore self. updated _ at = arrow. utcnow ( ). datetime return super ( ). save ( * * kwargs ) | [
-0.7973203659057617,
-0.32148241996765137,
0.526793897151947,
1.0436478853225708,
0.5253303050994873,
0.691379725933075,
-0.7830383777618408,
0.12188031524419785,
-0.533882200717926,
0.08627448976039886,
-0.715789794921875,
-0.19666063785552979,
0.21174561977386475,
0.5452293753623962,
-... |
async def _ setcelebrate _ add ( self, ctx, user : discord. member ) : guild = ctx. guild group = self. config. guild ( guild ) async with group. blocked _ ids ( ) as blocked _ ids : if user. id in blocked _ ids : await ctx. send ( " this user is already in the block list, did you mean to ` - - setcelebrate remove `? "... | [
0.8833630084991455,
0.7937616109848022,
0.626686692237854,
1.52403724193573,
-0.04217661917209625,
0.2670603394508362,
-0.3643094301223755,
-0.3691268265247345,
-0.34645193815231323,
1.0259308815002441,
-1.1351394653320312,
1.3657811880111694,
-1.336072325706482,
0.744940996170044,
0.413... |
def schedule _ safety _ net _ messages ( self, window _ start, window _ finish, threshold, timeout ) : if threshold < 0 or threshold > 1 : raise exception ( " 0 < = threshold < = 1 must be true " ) adherence _ percentage _ by _ patients _ list = \ self. _ compute _ adherence _ percentage _ by _ patients ( window _ star... | [
0.17767058312892914,
-0.0998879075050354,
0.5137112140655518,
1.061967134475708,
-0.07513181120157242,
0.22098365426063538,
0.24290747940540314,
-0.5197396278381348,
-0.8103652000427246,
0.48696133494377136,
0.10508090257644653,
0.6484754085540771,
-0.31252843141555786,
0.7889889478683472,... |
def _ _ init _ _ ( _ _ self _ _, *, auto _ enable _ controls : optional [ pulumi. input [ bool ] ] = none, control _ finding _ generator : optional [ pulumi. input [ str ] ] = none, enable _ default _ standards : optional [ pulumi. input [ bool ] ] = none ) : if auto _ enable _ controls is not none : pulumi. set ( _ _ ... | [
-0.2705307900905609,
0.3421212136745453,
0.6203677654266357,
0.45038628578186035,
0.810865044593811,
0.8555234670639038,
-0.1869410276412964,
0.27270886301994324,
0.1347687542438507,
0.02740871161222458,
-1.343795895576477,
-0.27572986483573914,
0.048543233424425125,
-0.565211832523346,
... |
def create _ audio _ stream ( encoding, audio _ input _ stream ) : # create the audio codec configuration that will be used during the encoding. # the encoded audio will have a bitrate of 128kbps and sample rate of 48khz audio _ codec _ configuration = aaccodecconfiguration ( name ='audio _ codec _ configuration ', bit... | [
0.8289667367935181,
-0.5443637371063232,
0.45380279421806335,
-0.06639297306537628,
0.1585778146982193,
-0.387124240398407,
-0.5954142212867737,
-0.2649114727973938,
0.5755396485328674,
-0.3353380858898163,
0.5159686207771301,
1.0136308670043945,
0.15070264041423798,
0.5906406044960022,
... |
def format _ time ( in _ s ) : time _ list = list ( map ( lambda x : int ( x ), in _ s. split ( '.') ) ) return datetime. time ( * time _ list ) | [
0.023573271930217743,
-0.47252631187438965,
0.7071560621261597,
-0.09939257800579071,
-0.23407909274101257,
-0.6475928425788879,
-0.6126821041107178,
0.48983272910118103,
0.36988916993141174,
1.2626826763153076,
-0.33315902948379517,
-0.049392130225896835,
-0.7314167618751526,
-0.162252470... |
def update _ observations ( self, pulled _ arm, reward ) : super ( ). update _ observations ( pulled _ arm, reward ) self. beta _ parameters [ pulled _ arm, 0 ] + = reward self. beta _ parameters [ pulled _ arm, 1 ] + = 1. 0 - reward | [
-0.4925113916397095,
-0.2980234920978546,
0.32102227210998535,
-0.8283289074897766,
1.3482977151870728,
0.38397538661956787,
0.07249962538480759,
-0.26567986607551575,
-0.4700169861316681,
0.22508932650089264,
-0.12432220578193665,
0.3479711413383484,
0.1984996199607849,
-0.122145712375640... |
def get _ session ( self ) : return self. session | [
-0.3783285319805145,
-0.7194973826408386,
0.2693622410297394,
0.3325529098510742,
0.3096299171447754,
-0.17891710996627808,
1.2874622344970703,
-1.1478091478347778,
0.6789402961730957,
-1.3403202295303345,
0.10334968566894531,
0.7023215889930725,
-0.3305887281894684,
-0.9693437218666077,
... |
def check _ sources ( ) : session = dbsession ( ) sources = session. query ( source ) \. filter ( source. parse _ period! = - 1, source. next _ crawling _ time < datetime. datetime. now ( ), source. wait = = true ). all ( ) for source in sources : print ( " need crawl : ", source. source _ id ) source. wait = false sou... | [
-0.3046257197856903,
0.5170128345489502,
0.6873504519462585,
-0.0562354251742363,
0.499679297208786,
-0.0011027453001588583,
0.43403807282447815,
0.1545020341873169,
-0.2880316972732544,
0.02344101294875145,
0.015151833184063435,
-0.23181478679180145,
-0.26380816102027893,
1.03289079666137... |
def test _ accounting _ simple _ hifo _ order ( accountant ) : asset = a _ btc cost _ basis = accountant. pots [ 0 ]. cost _ basis cost _ basis. reset ( dbsettings ( cost _ basis _ method = costbasismethod. hifo ) ) asset _ events = cost _ basis. get _ events ( asset ) event1 = assetacquisitionevent ( amount = fval ( 2... | [
0.7051030993461609,
0.07606710493564606,
0.7598438262939453,
0.5351728200912476,
0.9463924169540405,
-0.3860749900341034,
0.38527143001556396,
-0.14057780802249908,
0.0740898922085762,
-0.09064551442861557,
-0.2489912360906601,
-0.6412416696548462,
0.7008677124977112,
0.0847461149096489,
... |
def rotate _ point _ x ( xyz, theta, radians = false ) : if not radians : theta = np. radians ( theta ) cost = np. cos ( theta ) sint = np. sin ( theta ) rx = np. array ( [ [ 1. 0, 0. 0, 0. 0 ], [ 0. 0, cost, sint ], [ 0. 0, - sint, cost ] ] ) return np. matmul ( xyz, rx ) | [
-0.6790281534194946,
0.6077883243560791,
0.19501057267189026,
-0.22682106494903564,
0.4768237769603729,
-0.5166425704956055,
-1.3964530229568481,
0.6252506971359253,
0.8966667056083679,
0.18782886862754822,
-0.35386040806770325,
0.01029027160257101,
-0.4278845489025116,
-0.9491533041000366... |
def posterior _ decode ( self, tree, cont, ignore _ rel = none ) : # compute scores given the observation sequence. self. treerepr _ scores ( tree ) best _ states = self. inference. run _ max _ posterior ( tree, self. n, cont, ignore _ rel = ignore _ rel ) return best _ states | [
-0.6168453097343445,
-0.022949732840061188,
0.47988706827163696,
0.16682414710521698,
0.22189907729625702,
-0.4020991325378418,
-0.7534394264221191,
0.29351806640625,
-0.10965251922607422,
0.002376361982896924,
-0.37917041778564453,
-0.3027748167514801,
-0.10283193737268448,
-0.43090850114... |
def compute _ clustering _ coefficient ( adjacency, node ) : # cc = 2 * l / ( k * ( k - 1 ) ) # k : = number of neighbors # l : = number of links between neighbor nodes # get the list of all neighbor nodes neighbors = np. nonzero ( adjacency [ :, node ] ) [ 0 ] k = len ( neighbors ) if k < 2 : return 0 # generate adjac... | [
0.01373706478625536,
0.793097972869873,
0.6725463271141052,
0.1914893239736557,
0.11861791461706161,
-0.8647350072860718,
0.6796656250953674,
0.6862726807594299,
0.26440656185150146,
0.9132111072540283,
1.172247052192688,
0.5326678156852722,
0.1872367262840271,
0.15816934406757355,
-0.40... |
def get _ cps ( self ) : return self. _ current _ cps | [
-0.34763339161872864,
-0.8254908323287964,
0.479737788438797,
0.31117957830429077,
-0.3986036777496338,
0.06996288895606995,
0.9385653734207153,
-1.3402894735336304,
-0.33072084188461304,
-0.32538026571273804,
0.8156375288963318,
0.1443118155002594,
-1.5924893617630005,
-0.6122100353240967... |
def _ _ repl _ _ ( self ) : s = " matrix of dimension " + str ( self. m ) + " by " \ + str ( self. n ) +'\ n's = s + " with data " +'\ n's = s +'\ n '. join ( [''. join ( [ str ( elem ) for elem in row ] ) for row in self. data ] ) return s +'\ n ' | [
0.4212460517883301,
-0.7711802124977112,
0.6892383098602295,
-1.398892879486084,
-1.5427278280258179,
-0.04024462029337883,
0.015231207013130188,
0.1575956791639328,
-0.1521719992160797,
-0.293043851852417,
0.6739495992660522,
0.7973586916923523,
0.08216781914234161,
-0.24782785773277283,
... |
def test _ place _ buy _ order _ not _ enough _ balance ( self ) : stock _ name = self. test _ stock _ a order _ quantity = 100 order _ type ='buy'trader = self. login _ user ( username = userb. get ('username') ). profile d = self. place _ order ( stock _ name, order _ quantity, order _ type, trader ) resp = d. get ('... | [
-0.14220239222049713,
0.1338796466588974,
0.5556443929672241,
0.4752996861934662,
0.7759747505187988,
0.4010147154331207,
-0.3946514129638672,
-1.094973087310791,
0.6614295244216919,
-0.7197496294975281,
-0.6935102939605713,
-0.1451045721769333,
-0.06047691032290459,
0.2883705794811249,
... |
def addtoserver ( cls, servicer, server, * args, * * kwargs ) : return add _ applicationmanagerservicer _ to _ server ( cls. wrapper ( servicer, * args, * * kwargs ), server ) | [
-1.4246411323547363,
-0.5916498899459839,
0.4838809669017792,
0.043355792760849,
-0.41505569219589233,
0.13395103812217712,
-0.9297417998313904,
-0.9125853776931763,
-0.5382497906684875,
-0.9730160236358643,
-0.05114945396780968,
0.7052702903747559,
-0.5722516775131226,
2.1105496883392334,... |
def test _ non _ rotor ( self ) : self. sched1. species _ dict ['ctripco']. rotors _ dict = { 0 : {'torsion': [ 1, 2, 3, 4 ],'top': [ 3, 5 ],'scan': [ 1, 2, 3, 5 ],'number _ of _ running _ jobs': 0,'success': none,'invalidation _ reason':'','times _ dihedral _ set': 0,'trsh _ methods': [ ],'scan _ path':'','directed _ ... | [
-0.09314413368701935,
0.3529413938522339,
0.5146228671073914,
-0.19918189942836761,
-0.37397444248199463,
1.20405113697052,
0.1537305861711502,
0.0928022637963295,
-0.5091948509216309,
-0.5166199803352356,
-0.41631385684013367,
-0.25057148933410645,
-0.9798237681388855,
-0.0714274719357490... |
def index _ mongo ( ) : db = api. common. get _ conn ( ) log. debug ( " ensuring mongo is indexed. " ) db. users. ensure _ index ( " uid ", unique = true, name = " unique uid " ) db. users. ensure _ index ( " username ", unique = true, name = " unique username " ) db. groups. ensure _ index ( " gid ", unique = true, na... | [
-0.4135190546512604,
0.5364940166473389,
0.40068721771240234,
-0.21731682121753693,
0.7595317959785461,
0.4676297903060913,
0.48965775966644287,
0.040159087628126144,
-0.0013881936902180314,
0.2690354287624359,
-0.6006284952163696,
0.4086344838142395,
-0.7772437930107117,
0.044887889176607... |
def findtotaltime ( self, dataframe ) : starttime = dataframe. iloc [ 1 ]. time endtime = dataframe. iloc [ - 1 ]. time totaltime = round ( ( endtime - starttime ). total _ seconds ( ) / 60, 2 ) return totaltime | [
-0.4972912669181824,
-0.23073269426822662,
0.7927214503288269,
-0.28902631998062134,
0.8153393864631653,
-0.48429208993911743,
0.3192835748195648,
-0.27996543049812317,
-0.7345430254936218,
1.5787570476531982,
-0.37463614344596863,
0.07861276715993881,
-0.3611794710159302,
-0.3624554872512... |
def add _ intersection _ with _ interval ( self, b _ c _ typ, branch _ or _ cusp, interval, with _ sign = 1 ) : x = self. get _ intersections _ with _ interval ( interval ) idx = self. _ path _ idx ( b _ c _ typ, branch _ or _ cusp ) x [ idx ] + = with _ sign | [
-0.23886461555957794,
-0.28746864199638367,
0.6042949557304382,
1.0840404033660889,
0.48996463418006897,
0.38568058609962463,
0.18332810699939728,
0.42794808745384216,
-0.4423016607761383,
0.30403080582618713,
-0.43299636244773865,
-0.22476573288440704,
-0.949345052242279,
-0.3577625155448... |
def ransom _ note ( magazine, ransom ) : return not ( counter ( ransom ) - counter ( magazine ) ) | [
0.347324937582016,
-0.2942539155483246,
0.1834697127342224,
-0.2494591772556305,
-0.10006920993328094,
0.8644852638244629,
-0.38883063197135925,
-0.931556761264801,
0.13721607625484467,
-0.07858844846487045,
0.29668137431144714,
-0.8043972253799438,
-1.2450096607208252,
-0.9590617418289185... |
def get _ error ( self, data, f ) : # transpose and split data into the two point data = data. t x1 = data [ : 3 ] x2 = data [ 3 : ] # sampson distance as error measure fx1 = np. dot ( f, x1 ) fx2 = np. dot ( f, x2 ) denom = fx1 [ 0 ] * * 2 + fx1 [ 1 ] * * 2 + fx2 [ 0 ] * * 2 + fx2 [ 1 ] * * 2 err = ( np. diag ( np. do... | [
0.2166549116373062,
0.35092437267303467,
0.5976938605308533,
-0.25317561626434326,
-0.30520665645599365,
0.3854435086250305,
-0.14724698662757874,
0.3204527497291565,
-0.6112675666809082,
0.1501045525074005,
0.5786606073379517,
-0.19900429248809814,
0.6257290840148926,
-0.6922580599784851,... |
def yesno ( istrue ) : return'yes'if istrue else'no ' | [
0.10181722044944763,
0.3777884244918823,
0.49029627442359924,
0.6609588861465454,
-0.4676770269870758,
-0.19355544447898865,
-0.25977015495300293,
0.6606669425964355,
-0.6119811534881592,
-0.6799135804176331,
-0.5972099304199219,
0.11216717958450317,
0.12724873423576355,
-0.361381769180297... |
def windowsequence ( self, questionnumber ) : self. inputbox. delete ( 0, " end " ) # clearing the input box of any previous inputs self. questioncaller ( ) # generating a question self. questionscreen ( self. question, questionnumber ) # display questionscreen while 1 : self. inputbutton. wait _ variable ( self. input... | [
-0.777169942855835,
-0.5454401969909668,
0.765094518661499,
0.3454202711582184,
-0.5476894974708557,
0.9986264705657959,
1.153625249862671,
-0.3033508360385895,
0.40346571803092957,
-0.4346372187137604,
-0.07560216635465622,
0.041016895323991776,
-0.7546485066413879,
1.0718019008636475,
... |
def resort ( l ) : d _ t = dict ( ) for i in range ( len ( l ) ) : d _ t [ int ( l [ i ]. split ( " : " ) [ - 1 ] ) ] = l [ i ] l _ res = list ( ) for k, v in d _ t. items ( ) : l _ res. append ( [ k, v ] ) l _ res. sort ( key = lambda l : l [ 0 ] ) l _ new = list ( ) for j in range ( len ( l _ res ) ) : l _ new. appen... | [
-0.6242263913154602,
-0.5511347055435181,
0.8469973206520081,
-0.7193870544433594,
-0.6525295376777649,
0.2627392113208771,
-0.10601982474327087,
-0.1544225662946701,
0.030463337898254395,
0.8225448727607727,
-0.8510481715202332,
-0.43432751297950745,
-0.08598753064870834,
-0.0278794653713... |
def play ( self, offset = 0 ) : self. _ snd _ count = offset self. _ osc. play ( ) self. _ raw _ stream. play ( ) self. _ analyzed _ stream. play ( ) self. _ trig _ func. play ( ) self. _ loadnextsnd ( ) | [
0.021043887361884117,
0.2260170429944992,
0.5741615295410156,
-0.3178994953632355,
0.6237295866012573,
0.3119170665740967,
0.8438565135002136,
-0.3403806984424591,
-0.3276646137237549,
-1.1408157348632812,
-0.06874385476112366,
0.8522011637687683,
0.29290518164634705,
-0.25704288482666016,... |
def bleu _ sim ( self, t1, t2 ) : return 0 | [
-0.8853545784950256,
0.7661240100860596,
0.32313698530197144,
0.42417898774147034,
-0.18844947218894958,
0.7063080668449402,
-0.6186845302581787,
-0.13103392720222473,
-0.8173467516899109,
0.8245168328285217,
-0.834244966506958,
-0.11936582624912262,
-0.23403385281562805,
-0.91174858808517... |
def _ find _ matching _ ttyacm _ from _ usb _ path ( self, ref _ path ) : # find the matching tty port from the usb _ path port = none match _ len = 0 context = pyudev. context ( ) for device in context. list _ devices ( subsystem ='tty') : _ node = str ( device. device _ node ) if " ttyacm " in _ node : device _ path ... | [
0.6100146174430847,
-0.4870448112487793,
0.7116959095001221,
-0.3349893093109131,
0.9053706526756287,
-0.9439154267311096,
1.2626047134399414,
-0.62702476978302,
-0.025503039360046387,
-0.261496365070343,
0.599656343460083,
-0.16635632514953613,
-0.30981218814849854,
0.020588194951415062,
... |
def generate _ example _ image ( ) : x = y = np. linspace ( 0, 3 * np. pi, 100 ) x, y = np. meshgrid ( x, y ) image = x * y * np. sin ( x ) * * 2 * np. sin ( y ) * * 2 return image | [
0.4832729399204254,
0.2853740453720093,
0.5203589797019958,
-0.44465041160583496,
-0.02288242056965828,
0.4598948061466217,
-0.9035090804100037,
0.47613924741744995,
0.6931979060173035,
0.3240007758140564,
-0.2660749554634094,
0.6616590023040771,
0.4433853030204773,
0.40358811616897583,
... |
def getnumbers ( self ) : if self. die1 _ num = = self. die2 _ num : numlist = [ self. die1 _ num ] * 4 return sorted ( numlist ) return sorted ( [ self. die1 _ num, self. die2 _ num ] ) | [
-0.7811062335968018,
-0.26777520775794983,
0.8500126004219055,
1.7037967443466187,
0.6136493682861328,
-0.34017008543014526,
0.1925709992647171,
-0.07760316133499146,
-0.10074850171804428,
-0.18320386111736298,
-1.0812804698944092,
0.2812483310699463,
0.13988104462623596,
0.459171324968338... |
def run ( self, inventory, comment ='', create _ cycle = true ) : if create _ cycle : # fetch the deletion cycle number cycle _ tag = self. history. new _ cycle ( self. policy. partition _ name, self. policy. policy _ text, comment = comment, test = self. test _ run ) log. info ('detox cycle % d for % s starting ', cyc... | [
-0.5471273064613342,
0.18670505285263062,
0.6033812165260315,
-0.1034860759973526,
0.8256173133850098,
-0.08913832157850266,
1.0686380863189697,
0.5028506517410278,
0.5701101422309875,
0.5172827839851379,
0.07129179686307907,
0.26379460096359253,
0.10245368629693985,
-0.4213923513889313,
... |
def _ get _ sklearn _ scores ( filename, watched _ dir, label _ name ) : step = int ( filename. split ('/') [ - 1 ] ) logging. info ('found step for sklearn eval : % i ', step ) def _ glob ( split ) : return os. path. join ( watched _ dir, str ( step ), f'{ split } *') eval _ score, test _ score = _ train _ and _ get _... | [
0.12220371514558792,
-0.5034172534942627,
0.4907962381839752,
0.8560936450958252,
0.7588720917701721,
0.22986763715744019,
0.23009082674980164,
0.2532639801502228,
-1.1980640888214111,
0.36875540018081665,
0.02441517263650894,
-0.183481827378273,
0.2458713799715042,
0.5559192299842834,
0... |
def get _ classifications ( programs _ path = ".. / parsed _ data / programsnames _ 941. txt " ) : # load program names programs = np. loadtxt ( programs _ path, dtype = str ) classif = [ ] for program in programs : if'calibration'in program : classif. append ( 1 ) elif'flush'in program : classif. append ( 1 ) elif'mel... | [
-0.861601710319519,
0.16479958593845367,
0.40920835733413696,
-0.07900488376617432,
-0.15565040707588196,
0.7587310671806335,
-0.01412128284573555,
0.4324024021625519,
-0.15261736512184143,
0.004356812220066786,
0.042703259736299515,
0.9268828630447388,
-0.17726542055606842,
-0.03594562783... |
def test _ get ( self ) : v = self. ep. get ( " volumes ", 1 ) self. assertequal ( v. id, 1, msg = " got bogus response instead of volume with id = 1 " ) | [
-0.1716347485780716,
-0.5897491574287415,
0.33109575510025024,
0.0063984813168644905,
1.5247845649719238,
-0.17591483891010284,
-1.3114097118377686,
-0.6563642621040344,
0.8548942804336548,
-1.0463154315948486,
0.5002188086509705,
0.2738298773765564,
-0.49694618582725525,
-0.67469900846481... |
def increment _ login _ attempts ( self ) : self. login _ attempts + = 1 | [
-1.300078272819519,
-0.38356295228004456,
0.3958669900894165,
-0.1577599048614502,
0.0747363492846489,
0.6722456216812134,
-0.3426564037799835,
0.04718868434429169,
0.15331722795963287,
-1.0565062761306763,
-0.1484280675649643,
0.7642114758491516,
-0.34477096796035767,
-0.3523634374141693,... |
def add ( self, par, * * kwargs ) : if par in self. pars ( ) : self. warning ( " parameter \ " % s \ " already present " % ( par ) ) return self. _ _ parameters. append ( par ) self. _ _ parhandle [ par ] = parameter ( par, * * kwargs ) | [
-0.3428562879562378,
-0.080134317278862,
0.5566047430038452,
-0.2880214750766754,
0.38960057497024536,
1.4708482027053833,
-0.5361124873161316,
-0.66180020570755,
0.5115872621536255,
-0.5340849757194519,
0.2292715609073639,
0.4486139118671417,
-1.4388538599014282,
0.16327513754367828,
0.... |
def _ basic _ tokenizer ( line, normalize _ digits = false ) : _ digit _ re = re. compile ( r " \ d + " ) # # find digits words = [ ] tokens = list ( jieba. cut ( line. strip ( ). lower ( ) ) ) if normalize _ digits : for token in tokens : m = _ digit _ re. search ( token ) if m is none : words. append ( token ) else :... | [
-0.2072463482618332,
0.25100985169410706,
0.7347753643989563,
0.38029953837394714,
-0.741935133934021,
-0.8796885013580322,
-0.1780119687318802,
0.5727163553237915,
-0.1820797622203827,
0.3143051266670227,
-0.4523453116416931,
-0.4793855547904968,
-0.39017289876937866,
0.33979174494743347,... |
def frame _ ch3 _ raw _ change ( self ) : self. frame _ ch3 _ sgm. setcurrentindex ( self. frame _ ch3 _ raw. currentindex ) self. frame _ ch3 _ flt. setcurrentindex ( self. frame _ ch3 _ raw. currentindex ) | [
-0.819480836391449,
-0.6159190535545349,
0.4187053442001343,
-0.8419642448425293,
-0.21142356097698212,
0.47549471259117126,
0.6776873469352722,
0.1607818454504013,
0.1522936373949051,
0.3478432297706604,
-1.259429693222046,
1.283846139907837,
0.6825457811355591,
-0.8073099255561829,
0.3... |
def get _ import _ licence _ reference ( lock _ manager : " lockmanager ", application : " importapplication ", licence : " importapplicationlicence ", ) - > str : if not application. licence _ reference : application. licence _ reference = _ get _ next _ reference ( lock _ manager, prefix = prefix. import _ licence _ ... | [
1.0730921030044556,
-0.8359493613243103,
0.7276498079299927,
-0.266922265291214,
-0.1361779123544693,
0.4545345902442932,
-0.6331556439399719,
-0.4893253445625305,
0.6802082657814026,
1.5270278453826904,
0.9277752041816711,
0.38082537055015564,
-0.9176217913627625,
-0.21322736144065857,
... |
def test _ atomic _ any _ uri _ length _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 5. xsd ", instance = " nistdata / atomic / any... | [
0.004817488137632608,
-0.04484094679355621,
0.3774200677871704,
0.528596818447113,
-0.400155246257782,
-0.24810431897640228,
-0.08513664454221725,
-0.49921563267707825,
-0.0697062686085701,
0.12905755639076233,
-0.179069384932518,
-0.5862036347389221,
-0.7334541082382202,
0.199109524488449... |
def _ init _ attrs ( self ) : self. mail = none self. email = none self. password = none self. domain = none self. port = none self. address _ name = none self. address _ domain = none | [
-0.6459459066390991,
-0.5731595158576965,
0.3266739845275879,
-1.1893023252487183,
0.2510979175567627,
-0.5459986925125122,
-0.1656644493341446,
-0.13204696774482727,
-0.08800190687179565,
-0.24635064601898193,
-1.3919963836669922,
0.7223645448684692,
-0.6532350182533264,
0.314650595188140... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.