text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def processstatechange ( self, reason ) : # if ( reason & state _ change _ init ) > 0 : # self. _ loaddatamodel ( ) # reason | = state _ change _ datamodelmgr # # if ( reason & state _ change _ datamodelmgr ) > 0 : # self. updatemenu ( ) load _ mask = state _ change _ init | state _ change _ datamodelmgr if ( reason & ... | [
-0.7909514307975769,
-0.7059831023216248,
0.6446810364723206,
-0.112044557929039,
-0.11798170208930969,
-0.17512239515781403,
0.4483635127544403,
0.24876709282398224,
0.82915198802948,
-0.3503548204898834,
-0.03379387781023979,
0.4510663151741028,
0.18990373611450195,
0.962928056716919,
... |
def to _ rgb ( img ) : # if image does not have alha channel if len ( img. split ( ) )! = 4 : # return it without doing anything return img # create new image object with white bg im = image. new ('rgb ', img. size, ( 255, 255, 255 ) ) im. paste ( img, mask = img. split ( ) [ 3 ] ) return im | [
-0.6244234442710876,
0.4903663694858551,
0.716514527797699,
-0.13621781766414642,
0.44120144844055176,
0.3990798890590668,
0.46868887543678284,
-0.3974611461162567,
0.5768091082572937,
1.625311017036438,
0.3280888497829437,
0.030033372342586517,
-0.18172265589237213,
0.5747618079185486,
... |
def delattrdatn ( self, * args ) : return _ snap. tneanet _ delattrdatn ( self, * args ) | [
-0.7880215644836426,
0.11559052765369415,
0.2248949110507965,
-0.8746234774589539,
-0.10908415913581848,
0.00896374974399805,
0.23278264701366425,
0.3001593053340912,
-0.3023339807987213,
-1.2035017013549805,
-0.45066478848457336,
-0.05177949368953705,
1.0307016372680664,
1.127654075622558... |
def group _ end ( self ) : return'< / fieldset > ' | [
0.09579894691705704,
0.4342970550060272,
0.4161764681339264,
-0.9664596319198608,
-0.3122197985649109,
0.5222014784812927,
0.08866138011217117,
-0.8900452256202698,
-0.7367541790008545,
-0.8526730537414551,
0.5092867612838745,
0.30545783042907715,
-0.5384140610694885,
0.3927389979362488,
... |
def bin _ rixs _ slope ( x, y, y _ edges, adus, elpix = 300, slope = 0 ) : y _ cens = ( y _ edges [ 0 : - 1 ] + y _ edges [ 0 : - 1 ] ) / 2 e = ( y _ cens - elpix ) * ev _ per _ pix i, _ = np. histogram ( y - x * slope, bins = y _ edges, weights = adus ) return e, i | [
0.5226382613182068,
0.24007989466190338,
0.5617662072181702,
-0.1437719762325287,
0.3073238730430603,
-0.015685144811868668,
0.13872751593589783,
0.1752009093761444,
0.13548986613750458,
-0.3562745749950409,
-0.2184489518404007,
0.40006792545318604,
0.6636931896209717,
0.08382279425859451,... |
def test _ duration _ format ( dur, fmt, exp ) : pytest. debug _ func ( ) # payload assert dur ( fmt ) = = exp | [
-0.052632320672273636,
-0.22988970577716827,
0.35140886902809143,
-0.0715617835521698,
0.4755990207195282,
0.49102938175201416,
-0.13920526206493378,
-0.5766997933387756,
0.9265292882919312,
-0.5362704396247864,
0.06752970069646835,
-0.0245375856757164,
0.9400998950004578,
0.53406876325607... |
def start _ requests ( self ) : if self. student : url = self. url _ provider. get _ institute _ login _ url ( self. student. get ( formkeys. std ( ), " " ) ) yield scrapy. request ( url = url, callback = self. get _ district, dont _ filter = true, errback = self. errback _ next ) | [
-1.3581918478012085,
0.5860373973846436,
0.4965226650238037,
-0.010777291841804981,
0.6607229113578796,
-0.47501519322395325,
-0.4723665714263916,
0.06956309825181961,
0.7655220031738281,
-0.6563579440116882,
0.4762599468231201,
0.9047526717185974,
0.5599462389945984,
0.09614185988903046,
... |
def fixmisplacedarom ( gsdfile, gsdout, idmiss, idpartner, idnotmiss, idnotpartner, molno, ats, ts ) : traj = gsd. hoomd. open ( gsdfile ) trajnew = gsd. hoomd. open ( gsdout,'wb') offset = molno idmisses = offset + idmiss + np. arange ( 0, molno * ( ats - 1 ), ats - 1 ) idpartners = offset + idpartner + np. arange ( 0... | [
0.2706418037414551,
-0.8983803391456604,
0.6827976107597351,
-0.9963059425354004,
0.09936841577291489,
0.5504370331764221,
-0.46002888679504395,
0.5536856651306152,
-0.022647101432085037,
-0.24947085976600647,
0.1635345220565796,
0.23961493372917175,
0.697085976600647,
-0.17227476835250854... |
def status ( self ) : self. create _ log _ table ( ) applied = self. _ _ applied _ status ( ) available = self. _ _ available _ status ( ) statics = self. _ _ get _ static _ status ( ) applied _ statics = self. _ _ get _ statics ( ) messages = [ ] messages. append ( " the database is at revision " + str ( applied ) + "... | [
-0.19015054404735565,
-0.3521011769771576,
0.6901146769523621,
-0.4118923246860504,
0.15391547977924347,
0.19504301249980927,
0.06364299356937408,
0.3319765031337738,
0.02669598162174225,
0.12689927220344543,
-0.10015137493610382,
0.4496687948703766,
0.19549019634723663,
1.0121581554412842... |
def ready ( self ) : if self. _ debug : print ( self. _ debug _ info,'turn to " ready " position') self. left _ wheel. offset = self. forward _ a self. right _ wheel. offset = self. forward _ b self. stop ( ) | [
-0.05693729966878891,
-0.5087866187095642,
0.22844171524047852,
-1.555141806602478,
0.6759987473487854,
0.5680068731307983,
0.6267766952514648,
0.8869898319244385,
-0.910680890083313,
0.21525289118289948,
-0.3426865339279175,
0.0337199904024601,
1.0437229871749878,
0.06738816201686859,
0... |
def get ( self ) : if self. node is none : return self. attrs plug = self. plug ( ) if plug is not none : if isinstance ( plug, ( list, tuple ) ) : return _ value = [ ] for elem in plug : return _ value. append ( self. _ get _ maya _ attr ( elem ) ) return return _ value else : return self. _ get _ maya _ attr ( plug )... | [
-1.2121344804763794,
-0.5654297471046448,
0.6710315942764282,
0.22074507176876068,
-0.30228137969970703,
-1.2185509204864502,
-0.5505020618438721,
0.7474536895751953,
0.18715700507164001,
-0.16534323990345,
0.24882574379444122,
0.30856671929359436,
-0.8306320309638977,
-0.04865549132227897... |
def abs ( * args ) : return _ snap. tint _ abs ( * args ) | [
-1.2660131454467773,
-0.8202189207077026,
0.298417329788208,
0.8116507530212402,
0.046304136514663696,
0.7658613920211792,
-0.5825507044792175,
-0.3325952887535095,
-0.9372251629829407,
0.13370072841644287,
0.13314902782440186,
0.4486859142780304,
-0.43719783425331116,
0.5114482641220093,
... |
def delsattrdate ( self, * args ) : return _ snap. tundirnet _ delsattrdate ( self, * args ) | [
-0.21286432445049286,
-0.4903978705406189,
0.11854714155197144,
-1.1100127696990967,
-0.6914623975753784,
0.5631087422370911,
0.29424741864204407,
-0.3816111087799072,
-0.4915938377380371,
-0.2861136794090271,
0.45639580488204956,
0.6584323644638062,
-0.4802800416946411,
1.1086045503616333... |
def count _ matrices ( self ) : return sum ( self ) - int ( self. do _ linear _ layer ) | [
0.5902557373046875,
-0.7812394499778748,
0.5290725827217102,
-0.11496017128229141,
0.6249999403953552,
1.0814074277877808,
1.9106017351150513,
-0.017307817935943604,
0.49837613105773926,
-0.524696409702301,
-1.6225022077560425,
-0.10815886408090591,
-0.4392465651035309,
0.4547141492366791,... |
def addstr ( self, * args ) : return _ snap. tstrpool64 _ addstr ( self, * args ) | [
-1.1579338312149048,
0.33704644441604614,
-0.061335112899541855,
0.30631229281425476,
0.11674254387617111,
0.004407995846122503,
0.46730417013168335,
0.044814206659793854,
-0.8994311690330505,
-0.8547055721282959,
-0.29160231351852417,
-0.24600748717784882,
-0.3987852931022644,
0.587240993... |
def warning ( msg ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # print > > sys. stderr, " warning : ", msg | [
0.8741332292556763,
-0.41931501030921936,
1.1994872093200684,
-0.008709358982741833,
-0.24196143448352814,
0.4185341000556946,
0.19859202206134796,
-0.6752929091453552,
-0.22729027271270752,
0.7920538783073425,
0.00556850666180253,
1.2375245094299316,
0.3516141176223755,
0.1887713372707367... |
def delfromintvattrdatn ( self, * args ) : return _ snap. tneanet _ delfromintvattrdatn ( self, * args ) | [
-0.7652244567871094,
-0.7216375470161438,
0.289541095495224,
-0.9392238855361938,
-0.06944368779659271,
0.03691332787275314,
0.609720766544342,
-0.24158646166324615,
-0.5201805830001831,
-0.6893820762634277,
0.06419398635625839,
-0.41499409079551697,
0.05320724844932556,
-0.214246660470962... |
def putstrfmtln ( self, * args ) : return _ snap. tsout _ putstrfmtln ( self, * args ) | [
0.1602487564086914,
-0.5260652303695679,
0.34069839119911194,
0.4520247280597687,
-0.6203263401985168,
-1.0328056812286377,
0.8487303853034973,
0.7143669128417969,
-0.5085868239402771,
-0.4182834327220917,
-1.2041584253311157,
-0.4357060492038727,
0.26590582728385925,
0.7164679765701294,
... |
def default _ paths ( self ) : return none | [
0.09935484081506729,
0.17704059183597565,
0.3031340539455414,
1.6526381969451904,
1.0464247465133667,
0.8471519351005554,
0.7537996172904968,
0.19483375549316406,
0.3413645923137665,
-1.6370378732681274,
-1.083871841430664,
-1.3542057275772095,
-0.8355701565742493,
0.6041300892829895,
-1... |
def optimize ( self, niter = 100 ) : def optimized _ marginal _ likelihood ( cov _ args ) : " " " negative log marginal likelihood to be minimized. if cov _ args is out of bounds specified by kernel return inf " " " in _ bounds = true for i in xrange ( len ( cov _ args ) ) : lower = self. kernel. cov _ bounds [ i ] [ 0... | [
-0.22948060929775238,
0.1486690640449524,
0.9009620547294617,
0.5404899716377258,
-0.006179991643875837,
-0.17795111238956451,
0.4030475318431854,
-0.3052836060523987,
-0.09849477559328079,
0.18271368741989136,
0.9829020500183105,
0.47359809279441833,
-0.8712973594665527,
0.612664818763732... |
def _ _ repr _ _ ( self ) - > str : if self. transaction _ id : return f " < webhookevent { self. type } : webhook _ id ='{ self. webhook _ id }'transaction _ id ='{ self. transaction _ id }'> " return f " < webhookevent { self. type } : webhook _ id ='{ self. webhook _ id }'> " | [
0.9711021780967712,
-1.080368161201477,
0.6729274988174438,
-0.30206575989723206,
0.30882275104522705,
-0.016720615327358246,
-0.4811685383319855,
0.31701502203941345,
0.5794662237167358,
0.6508740782737732,
0.321050763130188,
1.1238340139389038,
-0.15771952271461487,
0.6394718289375305,
... |
def _ _ getdesktopbindings ( self ) : import orca. desktop _ keyboardmap as desktop _ keyboardmap keybindings = keybindings. keybindings ( ) keybindings. load ( desktop _ keyboardmap. keymap, self. inputeventhandlers ) return keybindings | [
-0.8021434545516968,
-0.09145200252532959,
0.41106605529785156,
1.1890891790390015,
-1.1871616840362549,
0.04349587485194206,
0.18475529551506042,
-0.5179299712181091,
0.7802954316139221,
-0.18538528680801392,
-1.3488510847091675,
-0.42964351177215576,
-0.6836273074150085,
0.13217364251613... |
def _ loop _ for _ observer ( self ) : logging. getlogger ( " moler _ threads " ). debug ( " enter { } ". format ( self. _ observer ) ) heartbeat = tracked _ thread. report _ alive ( ) while self. _ request _ end is false : if next ( heartbeat ) : logging. getlogger ( " moler _ threads " ). debug ( " alive " ) try : da... | [
-0.3120831549167633,
-0.6413451433181763,
0.765316903591156,
-0.6550246477127075,
-0.04120432212948799,
-0.11025049537420273,
-0.4565694034099579,
-0.5230275392532349,
-0.5532355308532715,
-0.2399698793888092,
0.32895758748054504,
-0.1261991262435913,
-0.3405787944793701,
0.219081625342369... |
def borgattieverettmeasure ( * args ) : return _ snap. borgattieverettmeasure ( * args ) | [
-0.7525237798690796,
0.03386363014578819,
0.11011935770511627,
-0.6999668478965759,
1.2260782718658447,
0.10579093545675278,
0.5828526020050049,
-0.23843395709991455,
-0.3293178677558899,
-0.5245897769927979,
-0.8032090067863464,
-1.3887691497802734,
-1.168888807296753,
0.29230111837387085... |
def add _ selector _ id _ to _ ticks _ table ( storage : schedulestorage, print _ fn : optional [ printfn ] = none ) - > none : if print _ fn : print _ fn ( " querying storage. " ) instigator _ states = storage. all _ instigator _ state ( ) states = tqdm ( instigator _ states ) if print _ fn else instigator _ states fo... | [
-0.3978825509548187,
-0.16191208362579346,
0.5741771459579468,
0.049205437302589417,
0.8425753712654114,
-0.6900649666786194,
0.6669156551361084,
0.13367196917533875,
-0.35774412751197815,
-0.3625066876411438,
0.21897554397583008,
-0.042897555977106094,
0.2971324920654297,
-0.1131596043705... |
def parse _ key ( block, file ) : lines = [ linecache. getline ( file, i + 1 ) for i in range ( block. start, block. end ) ] item _ count = [ len ( l [ 1 : ]. split ( ) ) for l in lines [ 1 : ] ] if len ( np. unique ( item _ count ) ) = = 1 : # if there are no keys that count for several below return list ( zip ( * [ [... | [
-0.31169000267982483,
-0.43479156494140625,
0.6715291738510132,
0.36501479148864746,
-0.1574077606201172,
-0.7234371900558472,
-0.1857176274061203,
0.757492184638977,
-0.9386439323425293,
0.9918290972709656,
-0.4386109411716461,
-0.7845668792724609,
-0.314212828874588,
0.42306074500083923,... |
def csv _ to _ data ( self, csv _ files _ path ) : sentence _ feature = [ ] tag _ label = [ ] for df _ file in tqdm ( os. listdir ( csv _ files _ path ), desc = " csv _ to _ data " ) : df _ file = os. path. join ( csv _ files _ path, df _ file ) if df _ file. endswith ( ". csv " ) : df = pd. read _ csv ( df _ file ) el... | [
-0.5507148504257202,
-0.22060687839984894,
0.661861002445221,
-0.22497819364070892,
0.4737838804721832,
-0.5210810899734497,
-0.05356987565755844,
0.6764668822288513,
-0.5589932203292847,
0.4748157560825348,
-0.4482145309448242,
-0.1512981355190277,
0.38662880659103394,
0.39848703145980835... |
def zip _ shp _ to _ gdf ( zip _ file _ name ) : zipfile = zipfile ( stringio ( urlopen ( zip _ file _ name ). read ( ) ) ) filenames = [ y for y in sorted ( zipfile. namelist ( ) ) for ending in ['dbf ','prj ','shp ','shx'] \ if y. endswith ( ending ) ] dbf, prj, shp, shx = [ stringio ( zipfile. read ( filename ) ) fo... | [
0.8537929654121399,
-0.16185589134693146,
0.5440574884414673,
-0.9066554307937622,
0.041026968508958817,
0.31144192814826965,
0.1900152862071991,
0.04874517023563385,
0.1443282961845398,
0.013562792912125587,
-0.2063843458890915,
0.34802231192588806,
-0.6112882494926453,
-0.369635194540023... |
def inform ( * args, * * kwargs ) : suppress = kwargs. get ('suppress ', 1 ) file = kwargs. get ('file ', sys. stderr ) if parms. quiet < suppress : print > > file,''. join ( args ) | [
0.9870744347572327,
0.07479262351989746,
0.5638805627822876,
-0.9310586452484131,
0.9345008730888367,
0.4966239333152771,
-0.4594431519508362,
-0.34973764419555664,
-1.0217951536178589,
0.06821352988481522,
0.678272545337677,
1.0580930709838867,
-0.28891950845718384,
0.847849428653717,
-... |
def eval ( expression, vm = none, out _ flavor = none, user _ dict = { }, * * kwargs ) : if vm is none : vm = bcolz. defaults. eval _ vm if vm not in ( " numexpr ", " python " ) : raise valueerror ( " ` vm ` must be either'numexpr'or'python'" ) if out _ flavor is none : out _ flavor = bcolz. defaults. eval _ out _ flav... | [
0.07365188747644424,
-0.26118895411491394,
0.9539533853530884,
0.00841518398374319,
-0.9626011252403259,
-0.6513164043426514,
0.6512625217437744,
0.45022517442703247,
0.028094960376620293,
0.45731937885284424,
-0.44657596945762634,
0.9960037469863892,
-0.15843237936496735,
-0.1066050007939... |
def get _ field _ change ( field : fields. field, object _ before _ change :'moderatedmodel ', object _ after _ change :'moderatedmodel ', resolve _ foreignkeys : bool = true, ) - > fieldchange : try : value _ before = getattr ( object _ before _ change, f'get _ { field. name } _ display') ( ) value _ after = getattr (... | [
-0.3611947000026703,
-0.1284646987915039,
0.6164896488189697,
-0.5001412630081177,
-0.37714558839797974,
-0.5338094830513,
-0.43433815240859985,
-0.3339276611804962,
-0.6194369196891785,
-0.042836207896471024,
-0.13415363430976868,
0.6122078895568848,
0.6097394227981567,
0.5914806723594666... |
def get _ donation _ prize _ info ( donation ) : prizelist = [ ] for ticket in donation. tickets. all ( ) : contribamount = get _ donation _ prize _ contribution ( ticket. prize, donation, ticket. amount ) if contribamount! = none : prizelist. append ( {'prize': ticket. prize,'amount': contribamount } ) for timeprize i... | [
-0.29995250701904297,
-0.589519739151001,
0.68536776304245,
-0.9340760111808777,
-0.8166837096214294,
-0.01883748173713684,
0.6895772814750671,
-0.3291301131248474,
-0.022206546738743782,
0.8217697739601135,
-0.30772915482521057,
-1.0722694396972656,
0.9148430824279785,
1.2433422803878784,... |
def vertex _ color ( adjacency : np. ndarray, n _ colors : int = 4, all _ solutions = false ) : # graph coloring g _ ij where i is node and edge is color # two types of contraints : # a bunch of atmost1s for each of g _ i1 gi2 gi3 # a bunch of not ( g _ i1 and g _ j1 ) and not ( gi2 and gj2 ) and not ( gi3 and gj3 ) # ... | [
0.07279954850673676,
0.8352259397506714,
0.8754953145980835,
0.5866736173629761,
0.2998340129852295,
-0.694503128528595,
0.04659578576683998,
-0.2912646234035492,
0.2739165425300598,
0.9720166921615601,
-0.15790991485118866,
-0.012384247966110706,
0.07360246777534485,
0.13623908162117004,
... |
def sparse _ segment _ mean ( data, indices, segment _ ids, name = none, num _ segments = none ) : if num _ segments is not none : return gen _ math _ ops. sparse _ segment _ mean _ with _ num _ segments ( data = data, indices = indices, segment _ ids = segment _ ids, num _ segments = num _ segments, name = name ) else... | [
-0.5191808938980103,
0.08760599792003632,
0.48486512899398804,
-0.16823454201221466,
0.16854910552501678,
-0.1718350648880005,
0.03560355305671692,
0.07998812198638916,
0.9465965628623962,
1.3227715492248535,
0.1141914501786232,
0.07948782294988632,
-0.1652761697769165,
-1.2864915132522583... |
def splitstring ( self, text, doc, encoding ='utf - 8') : asciireadable = self. _ asciireadable try : state = self. state [ doc ] except keyerror : state = self. state [ doc ] = ttfont. state ( asciireadable, self ) curset = - 1 cur = [ ] results = [ ] if not isunicode ( text ) : text = text. decode ('utf - 8') # encod... | [
-0.7738388180732727,
-0.11480005085468292,
0.6432520151138306,
-0.04152921214699745,
-1.0030194520950317,
-0.5262903571128845,
0.0007770256488583982,
-0.0732218474149704,
0.5261369347572327,
0.36552193760871887,
-0.07986835390329361,
-0.05549526587128639,
-0.7222364544868469,
0.04388064518... |
def load _ v1 ( * args ) : return _ snap. tdirnet _ load _ v1 ( * args ) | [
-1.2623881101608276,
1.1965675354003906,
0.4485234320163727,
0.22429092228412628,
-0.2295326441526413,
0.6021462678909302,
0.24445928633213043,
-0.36134248971939087,
-0.35395529866218567,
1.039537787437439,
0.04431942105293274,
-0.3378341794013977,
-0.04006402567028999,
-0.1608684211969375... |
def bot _ rot13 ( self, mess, args ) : return args. encode ('rot13') | [
-0.32689225673675537,
0.24190352857112885,
0.11489525437355042,
0.09740801900625229,
1.0669970512390137,
0.47575533390045166,
-0.4028962254524231,
-1.0352342128753662,
0.931189775466919,
0.27803748846054077,
0.13224664330482483,
0.4845293164253235,
-1.779848337173462,
-0.3043653666973114,
... |
def generate _ tree ( label _ range, height ) : if height = = 0 : return none return [ randint ( * label _ range ), generate _ tree ( label _ range, height - 1 ), generate _ tree ( label _ range, height - 1 ) ] | [
-1.3039793968200684,
-0.47089800238609314,
0.5531680583953857,
-0.2121589034795761,
0.31034544110298157,
0.16996005177497864,
-0.6170044541358948,
-0.010404766537249088,
-0.271851122379303,
0.5088252425193787,
-0.7658020853996277,
0.07685358822345734,
-0.8633748292922974,
0.616199493408203... |
def get _ plan ( self, sql, types ) : t = ( sql, tuple ( types ) ) if t in self. plan _ map : pc = self. plan _ map [ t ] # put to the end self. plan _ list. remove ( pc ) self. plan _ list. append ( pc ) return pc. plan # prepare new plan plan = plpy. prepare ( sql, types ) # add to cache pc = cachedplan ( t, plan ) s... | [
-0.40603262186050415,
0.6328029036521912,
0.4457471966743469,
0.20222532749176025,
-0.2880078852176666,
0.5906599760055542,
-0.9140368700027466,
-0.7438381314277649,
0.41997581720352173,
0.3947974145412445,
-0.10953907668590546,
0.49824315309524536,
-0.597626268863678,
-0.6388691663742065,... |
def _ resolve _ arm _ id _ for _ automl _ job ( # pylint : disable = no - self - use self, job : job, resolver : callable, inside _ pipeline : bool ) - > job : # automl does not have dependency uploads. only need to resolve reference to arm id. # automl node in pipeline has optional compute if inside _ pipeline and job... | [
0.258208692073822,
0.1133149042725563,
0.4051065742969513,
-0.278465211391449,
0.032026007771492004,
-0.168243408203125,
-0.5410228967666626,
0.07142746448516846,
-0.9613577723503113,
-0.41999322175979614,
0.552925169467926,
0.08603770285844803,
-0.13517150282859802,
0.5021337866783142,
... |
def _ setupdatabase ( self ) : self. logger. debug ( " entering _ setupdatabase " ) # determine if the database schema is already in place cursor = self. conn. cursor ( ) cursor. execute ( " " " select count ( name ) as table _ count from sqlite _ master where type ='table'and name ='config'; " " " ) row = cursor. fetc... | [
-0.24020914733409882,
0.8520767688751221,
0.4874144494533539,
0.01695602387189865,
1.0172847509384155,
-0.003515370190143585,
0.5491043329238892,
0.6175761222839355,
-0.96412193775177,
0.4634901285171509,
-0.1281776875257492,
-1.4924161434173584,
-0.6933298707008362,
0.5705893635749817,
... |
def insstr ( self, * args ) : return _ snap. tstr _ insstr ( self, * args ) | [
-0.5863919854164124,
0.132285937666893,
0.024188242852687836,
-0.1474882811307907,
0.15086661279201508,
0.7964614629745483,
0.7597147226333618,
0.33726921677589417,
-1.2219263315200806,
-0.40511953830718994,
0.21774104237556458,
-0.6512523293495178,
-1.197044014930725,
-0.20186683535575867... |
def tag _ word ( self, word, index _ in _ sent ) : if ( word [ 0 ]. isupper ( ) ) : return " initcap " if word [ 0 ]. isdigit ( ) : return " digitandletters " if index _ in _ sent = = 0 : return " firstword " return " other " | [
-0.4173927307128906,
-0.45832112431526184,
0.5789337158203125,
-0.14072856307029724,
0.18670468032360077,
0.008888635784387589,
-0.012464436702430248,
-0.43204307556152344,
0.24334101378917694,
0.46130216121673584,
0.10013437271118164,
0.3762625753879547,
-0.8428739905357361,
0.95348966121... |
def forward _ pass ( encoder, decoder, x, label, criterion, att _ mask ) : # reinitialize the state to zero since we have a new sample now. ( hidden _ enc, cell _ state _ enc ) = encoder. inithidden ( train = true ) # run encoder and get last hidden state ( and output ). output _ enc, ( hidden _ enc, cell _ state _ enc... | [
-0.313701331615448,
-0.29414692521095276,
0.7211031913757324,
0.10310611873865128,
-0.8423490524291992,
-0.308082640171051,
0.3558807671070099,
-0.3223806619644165,
-0.552433431148529,
0.21191804111003876,
-0.3147404193878174,
0.5115429162979126,
1.2383688688278198,
-0.11155037581920624,
... |
def _ _ str _ _ ( self ) : return " { } ". format ( self. jobid ) | [
0.5044358372688293,
-1.8149980306625366,
0.4937810003757477,
-1.221913456916809,
-0.903831422328949,
1.021814227104187,
-0.9863874316215515,
-0.1161065325140953,
0.287116140127182,
-0.34155917167663574,
0.9641914367675781,
1.1542927026748657,
-0.08932206779718399,
0.17728830873966217,
-0... |
def getsubstr ( self, * args ) : return _ snap. tcha _ getsubstr ( self, * args ) | [
0.4752036929130554,
0.48844441771507263,
0.4643375277519226,
-0.06763741374015808,
0.5153589844703674,
0.7224674820899963,
0.4175676703453064,
-0.05068858712911606,
-0.8410497903823853,
-0.44291040301322937,
-0.16986136138439178,
-0.32221224904060364,
-0.8871922492980957,
0.492258816957473... |
def parameters _ to _ x ( parameters ) : x = ( parameters ['animal _ position'] [ 1 ], parameters ['animal _ position'] [ 2 ], parameters ['dome _ center'] [ 1 ], parameters ['dome _ center'] [ 2 ], parameters ['dome _ radius'], parameters ['mirror _ radius'], parameters ['projector _ focal _ point'] [ 1 ], parameters ... | [
-0.6794207096099854,
0.028555912896990776,
0.4978185296058655,
-1.3473329544067383,
0.1309107542037964,
0.26166316866874695,
-1.1789424419403076,
0.19083982706069946,
-0.2787434458732605,
1.3539334535598755,
-0.6718666553497314,
0.5283195376396179,
0.2291971743106842,
-0.46571749448776245,... |
def add _ task ( self, time, func, * args, task _ name = none, delete _ on = float ('inf'), * * kwargs ) : if task _ name is none : task _ name = func. _ _ name _ _ if task _ name in self. tasks : raise keyerror ( " task already scheduled " ) job = self. cron. new ( command = f'python3 { self. file } - - crontab - - po... | [
0.49800142645835876,
-0.25505372881889343,
0.6895827054977417,
0.8064984083175659,
0.6183511018753052,
-0.46090036630630493,
-0.6483229994773865,
1.0059574842453003,
-0.39946410059928894,
0.011995978653430939,
-0.9733959436416626,
0.6868465542793274,
0.5621058344841003,
0.6089453101158142,... |
def get _ line ( self, buffer, cursor _ iter ) : # grab the first character in the line. line _ iter = cursor _ iter. copy ( ) line _ iter. set _ line _ offset ( 0 ) # grab the text from the start of the line to the cursor. line = buffer. get _ text ( line _ iter, cursor _ iter ) return line | [
1.137873888015747,
-1.0120271444320679,
0.22956706583499908,
0.25656411051750183,
0.16984426975250244,
-0.13871344923973083,
-0.6051300168037415,
-0.2715711295604706,
-0.4798853099346161,
-0.42170658707618713,
-0.12058500945568085,
0.3132459819316864,
-0.5920482277870178,
-0.37640655040740... |
def adjust _ range ( self, adjustment ) : temp = self. range if temp + adjustment > 0 : self. range + = adjustment else : self. range = 0 | [
-0.7384067177772522,
-0.5437025427818298,
0.4708298444747925,
0.150337815284729,
-0.031981829553842545,
0.6658178567886353,
0.2723764479160309,
0.48815298080444336,
0.4475838840007782,
-0.39208662509918213,
0.4036034345626831,
0.3749225437641144,
-0.5317302346229553,
0.7513556480407715,
... |
def describe _ user _ import _ job ( userpoolid = none, jobid = none ) : pass | [
0.35615241527557373,
0.26443803310394287,
0.38260602951049805,
0.5325053930282593,
-0.5336437821388245,
0.17910350859165192,
0.15768946707248688,
-0.4780689477920532,
0.3366346061229706,
0.4223908483982086,
-0.5138450860977173,
1.1549928188323975,
-0.6816597580909729,
-0.12490656226873398,... |
def send ( self, data ) : sbyte = len ( self. buffer _ write ) len _ = len ( data ) ebyte = sbyte + len _ self. buffer _ write + = data return sbyte, ebyte, len _ | [
-0.14919807016849518,
0.6778862476348877,
0.5214164853096008,
-0.403675377368927,
1.1208268404006958,
-0.3100492060184479,
-0.11682917922735214,
-0.590082585811615,
-0.09005317091941833,
0.2604655921459198,
-1.825008749961853,
-0.18869414925575256,
-0.893461287021637,
0.5389474034309387,
... |
def add _ extra _ flags ( parser ) : parser. add _ argument ('- - download - cache - path ', default ='cache ', metavar ='path ', help ='specifies the path to a download cache to use for downloads.') parser. add _ argument ('- - download - cache - size ', default = 3, type = int, help = ('specifies the number of versio... | [
-0.01282062754034996,
0.5433975458145142,
0.8433027267456055,
-0.19808544218540192,
0.6270608305931091,
0.7218825221061707,
-0.2756030857563019,
0.2663995921611786,
-0.12770454585552216,
-0.331787645816803,
-0.779488742351532,
0.057993803173303604,
0.2413741797208786,
1.218220591545105,
... |
def mean ( self ) : return self. data. mean ( ) | [
-1.1189134120941162,
0.2324042171239853,
0.1568058878183365,
-0.8581995368003845,
0.07048242539167404,
0.5153465867042542,
-0.4351142346858978,
-0.21005985140800476,
-0.09436275064945221,
-0.5266546607017517,
0.03255213424563408,
0.8216420412063599,
-0.6310375928878784,
-0.5441808104515076... |
def randradinv ( ind, randomize, b ) : b2r = 1. / b ans = ind * 0 res = ind while b2r > = 1e - 16 : dig = res % b if randomize : perm = random. permutation ( b ) pdig = perm [ dig. astype ( int ) ] ans = ans + pdig * b2r else : ans = ans + dig * b2r b2r = b2r / b res = ( res - dig ) / b return ans | [
-0.6246103048324585,
0.8274693489074707,
0.4750179052352905,
-0.4286714196205139,
-0.22202332317829132,
-0.14046531915664673,
0.24248892068862915,
-0.1681549996137619,
0.8762794137001038,
0.27081939578056335,
0.13914287090301514,
0.030774667859077454,
-1.930008888244629,
-0.900375485420227... |
def getrndlnid ( self, * args ) : return _ snap. tbpgraph _ getrndlnid ( self, * args ) | [
1.2066757678985596,
0.8761016130447388,
0.25670126080513,
-0.1897595375776291,
0.6150254011154175,
0.3261120617389679,
-0.3199004828929901,
-0.21444150805473328,
-0.8464736938476562,
0.22170981764793396,
-0.6116906404495239,
0.6771374940872192,
-1.021007776260376,
0.6373519897460938,
0.5... |
def deledge ( self, * args ) : return _ snap. tngraph _ deledge ( self, * args ) | [
-0.33204570412635803,
1.5584787130355835,
0.4426291286945343,
0.542324960231781,
0.6377851963043213,
0.3069210648536682,
0.17068156599998474,
0.9021878838539124,
-0.7429207563400269,
-0.3512059450149536,
-0.176001638174057,
-1.3121507167816162,
-1.1938433647155762,
0.10445322096347809,
0... |
def test _ atomic _ qname _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ max _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - maxlength - 2. xsd ", instance = " nistdata / atomic ... | [
0.13297317922115326,
-0.8119378685951233,
0.32022178173065186,
0.47228705883026123,
-0.7020220756530762,
0.17840982973575592,
-0.6098304390907288,
-0.45952412486076355,
-0.04902127757668495,
0.27696216106414795,
-0.6716235876083374,
0.19463182985782623,
0.5288516283035278,
0.22513520717620... |
def list _ input ( ) - > [ int ] : lst = [ int ( x ) for x in input ( " introduceti numerele listei separate cu un spatiu : " ). split ( " " ) ] return lst | [
-0.5378333926200867,
0.11322182416915894,
0.4637916386127472,
0.2551696300506592,
-0.4588703513145447,
0.989105224609375,
0.4218566119670868,
0.6355999708175659,
0.23613454401493073,
-0.38430488109588623,
-1.579843282699585,
0.18225598335266113,
-1.0193952322006226,
0.35615015029907227,
... |
def show _ ip _ route ( cls, client _ obj, * * kwargs ) : endpoint = " show ip route " expect _ prompt = ['bytes * ','>'] if'cidr'in kwargs : if kwargs ['cidr'] : endpoint = endpoint + " " + kwargs ['cidr'] else : raise valueerror ( " received empty cidr " ) raw _ payload = client _ obj. connection. request ( endpoint,... | [
-0.17975617945194244,
0.35401859879493713,
0.7427191138267517,
-0.3662222921848297,
-0.9019119143486023,
-0.2733819782733917,
-0.9172251224517822,
0.180804044008255,
-0.21935629844665527,
0.16704607009887695,
0.2024635225534439,
0.38016408681869507,
-0.6840600967407227,
-0.6293171644210815... |
def test _ that _ articles _ show _ ratings ( self ) : one _ article _ url = reverse ( " articles : article _ detail ", kwargs = { " slug " : self. slug } ) self. assertdictcontainssubset ( { " averagerating " : none, " ratingscount " : 0 }, self. client. get ( one _ article _ url ). data ) | [
0.3713589608669281,
1.4644088745117188,
0.18052677810192108,
-1.3357765674591064,
0.5734735727310181,
0.7077234983444214,
-0.18071021139621735,
0.5159753561019897,
-0.27106592059135437,
0.2579154670238495,
0.10949520766735077,
0.037561412900686264,
-0.34115397930145264,
0.28945496678352356... |
def reduce _ min _ v1 ( input _ tensor, axis = none, keepdims = none, name = none, reduction _ indices = none, keep _ dims = none ) : axis = deprecation. deprecated _ argument _ lookup ( " axis ", axis, " reduction _ indices ", reduction _ indices ) keepdims = deprecation. deprecated _ argument _ lookup ( " keepdims ",... | [
0.19107013940811157,
-0.29183298349380493,
0.9543531537055969,
0.6740487813949585,
-0.6004586219787598,
-0.16409818828105927,
-0.665993869304657,
-0.32390329241752625,
0.19525793194770813,
0.5371339917182922,
-0.3008846640586853,
0.5493976473808289,
0.006081175524741411,
-0.741152524948120... |
def get ( cls, obj ) : analyzer = getattr ( obj,'_'+ cls. _ _ name _ _, none ) if analyzer is none : analyzer = cls ( obj ) return analyzer | [
-0.46297144889831543,
-0.4247146248817444,
0.4693687856197357,
0.00032970591564662755,
-0.5929888486862183,
-0.29566076397895813,
0.14424382150173187,
-1.7060697078704834,
0.5698233842849731,
-0.23233044147491455,
-0.31917569041252136,
0.283149778842926,
0.4783138334751129,
0.3628990650177... |
def addintvattrn ( self, * args ) : return _ snap. tneanet _ addintvattrn ( self, * args ) | [
-1.3791946172714233,
0.23182989656925201,
0.4657607972621918,
0.13240589201450348,
0.5163370370864868,
-0.009259078651666641,
0.7876407504081726,
-0.5613714456558228,
-0.37862056493759155,
-0.015526612289249897,
0.7494139075279236,
-1.784228801727295,
-0.28891876339912415,
0.15495091676712... |
def isnode ( self, * args ) : return _ snap. tneanetmp _ isnode ( self, * args ) | [
-0.5837821960449219,
-0.1239142194390297,
0.17556072771549225,
0.01933930069208145,
1.731080412864685,
0.05537201464176178,
-0.14691786468029022,
0.1425865888595581,
0.22337451577186584,
1.2399736642837524,
-0.1862856149673462,
-1.051662802696228,
-0.696020245552063,
0.652066707611084,
-... |
def simulate _ tournament ( ) : players = list ( range ( nb _ players ) ) # list containing all players = [ 0, 1,..., 31 ] random. shuffle ( players ) # shuffle to generate random bracket nb _ players = nb _ players # number of players not yet eliminated # this loop simulates all games of a given round until semi - fin... | [
0.08311799168586731,
0.5825569033622742,
1.014050006866455,
-0.4658515453338623,
0.255111962556839,
-0.5454021692276001,
0.363394558429718,
0.05481128767132759,
-0.14248508214950562,
0.6646634936332703,
-0.8695015907287598,
-0.5319260358810425,
-0.8423942923545837,
-0.6567074656486511,
0... |
def find _ nearest ( address, address _ url, url _ list ) : shortest _ distance = 10000 fuel _ station ='' fuel _ list = visit _ alt _ fuel _ pages ( url _ list ) coords = coords _ to _ block. addr _ to _ coords ( address _ url, address ) for station in fuel _ list : check _ distance = distance ( float ( coords [ 0 ] )... | [
-0.19527022540569305,
-0.6773970723152161,
0.5935713052749634,
0.21515803039073944,
-0.29592806100845337,
-0.9091910123825073,
-0.7015511393547058,
0.2059982717037201,
-0.2895961105823517,
0.43012264370918274,
-0.37610775232315063,
0.1542893350124359,
-0.13952851295471191,
0.79598361253738... |
def test _ ranking _ engine ( ) : engine = _ get _ test _ db _ conn ( ) db _ conn = engine. connect ( ) db = postgresdatabase ( db _ conn ) ranking _ engine = hcprankingengine ( db ) return ranking _ engine | [
0.8637740612030029,
0.5156936049461365,
0.3712151348590851,
0.30966079235076904,
0.7305541634559631,
0.07594762742519379,
-0.08216241002082825,
0.505476176738739,
-1.2814483642578125,
-0.7236936092376709,
0.1568284034729004,
0.06245831400156021,
-0.3984396457672119,
-0.0832933634519577,
... |
async def field _ inline ( self, ctx : context, id : int, inline _ status : bool ) - > none : if id > = 0 and id < = self. embed _ fields [ ctx. author ] : embed = self. embeds [ ctx. author ]. embed embed. set _ field _ at ( id, name = embed. fields [ id ]. name, value = embed. fields [ id ]. value, inline = inline _ ... | [
-0.23928460478782654,
-0.26037511229515076,
0.6770851016044617,
-0.5551710724830627,
0.21096552908420563,
1.0122783184051514,
-0.6196820139884949,
0.7472801804542542,
0.23292356729507446,
0.1132042184472084,
-1.4928088188171387,
0.6262924075126648,
-0.5001955628395081,
-0.6192716956138611,... |
def query _ yes _ no ( question, default = " yes " ) : valid = { " yes " : true, " y " : true, " ye " : true, " no " : false, " n " : false } if default is none : prompt = " [ y / n ] " elif default = = " yes " : prompt = " [ y / n ] " elif default = = " no " : prompt = " [ y / n ] " else : raise valueerror ( " invalid... | [
0.46073848009109497,
-0.013573400676250458,
0.6037774682044983,
0.3214637041091919,
-0.5098105669021606,
-0.08617309480905533,
-0.43284693360328674,
-0.8445765376091003,
0.2573447823524475,
-0.5799950361251831,
0.051999401301145554,
0.010743026621639729,
-0.7116829752922058,
-0.82169967889... |
def _ _ tolist ( self, string ) : return np. array ( [ c for c in string ] ) | [
-0.470554918050766,
-1.8751792907714844,
0.2940506637096405,
-1.5605477094650269,
0.9066898822784424,
0.08032935112714767,
-0.7942085266113281,
0.28998225927352905,
0.5184424519538879,
1.000548243522644,
-1.0506905317306519,
0.9756326675415039,
-0.5823574066162109,
-0.6169497966766357,
-... |
def ishexint ( self, * args ) : return _ snap. tstr _ ishexint ( self, * args ) | [
-0.4655430018901825,
0.4642381966114044,
0.49717652797698975,
-0.6686795353889465,
0.9703956842422485,
0.11424629390239716,
0.003942930139601231,
-0.10989444702863693,
-1.108712911605835,
0.07302886992692947,
-0.7965700626373291,
-1.4192646741867065,
-0.4970758557319641,
-0.095137581229209... |
def _ _ lt _ _ ( self, * args ) : return _ snap. tfltprv _ _ _ lt _ _ ( self, * args ) | [
-0.4433993101119995,
-0.30039525032043457,
0.18675102293491364,
-1.4420009851455688,
0.6713331937789917,
-0.46003055572509766,
-0.36501961946487427,
-0.3017852008342743,
-1.3412448167800903,
-0.54069983959198,
-0.4164002239704132,
-1.8549957275390625,
-0.7150040864944458,
1.067015290260315... |
def _ mul _ dispatch ( x, y, name = none ) : if isinstance ( y, sparse _ tensor. sparsetensor ) : # case : dense * sparse. new _ vals = gen _ sparse _ ops. sparse _ dense _ cwise _ mul ( y. indices, y. values, y. dense _ shape, x, name ) return sparse _ tensor. sparsetensor ( y. indices, new _ vals, y. dense _ shape ) ... | [
-0.10378257185220718,
0.13868814706802368,
0.8151827454566956,
0.4195435047149658,
-0.5407395958900452,
0.1391276866197586,
-0.28762733936309814,
-0.25993603467941284,
0.8812783360481262,
0.5865389704704285,
-0.13471972942352295,
-0.16411760449409485,
0.9427875876426697,
-0.463878929615020... |
def new ( self, repo ) : # todo : subclass commit, pass parent as init param try : # create new commit instance and set metadata commit = commit ( ) author = os. environ. get ('user') commit. author = commit. committer = author commit. commit _ time = commit. author _ time = int ( time ( ) ) tz = parse _ timezone ('- 0... | [
0.4965839385986328,
-0.7341369986534119,
0.7414147853851318,
0.19935856759548187,
-0.19727827608585358,
0.19841310381889343,
0.01887599192559719,
-0.22218407690525055,
-0.9946826100349426,
0.9677332639694214,
-0.1780322939157486,
-0.16366428136825562,
-0.22648341953754425,
0.33722048997879... |
def test _ atomic _ language _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 3. xsd ", instance = " nistdata / atomic / l... | [
0.24578820168972015,
0.0002940339327324182,
0.4883066415786743,
0.6729172468185425,
-0.20526516437530518,
0.6973336935043335,
-0.4951302707195282,
0.3761921525001526,
0.5359034538269043,
1.2059051990509033,
-0.3691875636577606,
-0.07894820719957352,
0.26003697514533997,
-0.2701105773448944... |
def create _ product _ version _ with _ options ( self, request : servicecatalog _ 20210901 _ models. createproductversionrequest, runtime : util _ models. runtimeoptions, ) - > servicecatalog _ 20210901 _ models. createproductversionresponse : utilclient. validate _ model ( request ) body = { } if not utilclient. is _... | [
-1.297013759613037,
-0.40135011076927185,
0.7776599526405334,
0.02354361303150654,
-0.1530359834432602,
0.5923587083816528,
0.3888418674468994,
-1.49290931224823,
0.30446261167526245,
0.7556037306785583,
-0.670930027961731,
0.6777662038803101,
-0.4311272203922272,
0.24892295897006989,
0.... |
def get _ file ( software, segment ) : if software = = " parsnp " : return " parsnp _ output / % s / parsnp. tree " % segment # note we store parsnp output of segment trees and concatenated # trees under two different directories if software = = " raxml " : if segment! = " concatenated " : # we use the bootstrapped bes... | [
0.7364834547042847,
-0.711030125617981,
0.505440354347229,
0.4064033329486847,
-0.03535008057951927,
-0.10175301134586334,
-0.35070711374282837,
0.21816475689411163,
-0.7239632606506348,
-0.5441582202911377,
1.0391327142715454,
-0.36868682503700256,
0.6086816787719727,
0.3641858696937561,
... |
def readradarinstances ( instance _ dir, frame _ id, data _ format ) : filename = checkoutformat ( data _ format, frame _ id ) pickle _ file = os. path. join ( instance _ dir, filename ) if os. path. exists ( pickle _ file ) : with open ( pickle _ file, " rb " ) as f : radar _ instances = pickle. load ( f ) if len ( ra... | [
-0.016892436891794205,
-0.036116231232881546,
0.6089919805526733,
-1.5768144130706787,
0.1813836693763733,
0.008678507059812546,
-0.9625072479248047,
0.20768775045871735,
-0.05326899141073227,
0.37805041670799255,
0.009213129058480263,
0.11995918303728104,
-0.7591202855110168,
0.0329713858... |
def begnastri ( self, * args ) : return _ snap. tneanetmp _ begnastri ( self, * args ) | [
0.7438231706619263,
-0.23151563107967377,
0.008349991403520107,
-0.4602512717247009,
1.8364851474761963,
-0.11119623482227325,
-0.06349918991327286,
-0.6285032629966736,
-0.43291857838630676,
0.1403496414422989,
-0.1550256907939911,
-0.48129913210868835,
-0.22973410785198212,
0.90993994474... |
def calculate _ phi _ constant ( branches, index _ set _ branch, index _ set _ bus, approximation _ type = approximationtype. ptdf ) : _ len _ bus = len ( index _ set _ bus ) _ mapping _ bus = { i : index _ set _ bus [ i ] for i in list ( range ( 0, _ len _ bus ) ) } _ len _ branch = len ( index _ set _ branch ) _ mapp... | [
-0.6745629906654358,
-0.18725231289863586,
0.7622885704040527,
-0.4133617877960205,
-0.48930594325065613,
0.3570025861263275,
0.12596175074577332,
0.7793096303939819,
-0.5744479298591614,
0.7948532104492188,
0.1130950003862381,
0.9491873383522034,
-0.4230286180973053,
0.15435291826725006,
... |
async def connect ( self ) : # are they logged in? if self. scope. get ('user'). is _ anonymous : # reject the connection await self. close ( ) else : # accept the connection await self. accept ( ) print ( " successfully authenticate user : ", self. scope [ " user " ] ) # store which groups the user has joined on this ... | [
-1.0042309761047363,
0.2356005758047104,
0.5151926279067993,
1.0579137802124023,
-0.37520498037338257,
0.20372195541858673,
-0.39297130703926086,
-0.12719759345054626,
-0.9943571090698242,
0.09651139378547668,
0.38539043068885803,
-0.07937206327915192,
-0.7685117721557617,
-0.0271643828600... |
def bfgs _ optimize ( self, num _ iterations = 1000, learning _ rate = 0. 01, tolerance = none ) : num _ variables = len ( self. variable _ initialization ) cur _ variable _ values = self. variable _ initialization cur _ inv _ hessian = np. eye ( num _ variables ) val, der = differentiate ( self. objective _ function, ... | [
0.9131770730018616,
0.36109718680381775,
0.8155396580696106,
0.598529577255249,
-0.18554599583148956,
-0.7898848652839661,
0.04826602339744568,
-0.20131242275238037,
-0.8358497023582458,
0.3003161549568176,
0.37302544713020325,
0.44195693731307983,
-0.5461155772209167,
0.1799069494009018,
... |
def to _ complex64 ( x, name = " tocomplex64 " ) : return cast ( x, dtypes. complex64, name = name ) | [
-1.0609947443008423,
-0.019255056977272034,
0.502496600151062,
1.572829246520996,
-0.3072833716869354,
-0.6419227719306946,
0.3824096620082855,
-0.9241483807563782,
1.5622814893722534,
0.22465012967586517,
-1.2190335988998413,
0.13404306769371033,
0.8710352182388306,
-1.1233893632888794,
... |
def ibm _ hmc _ clusters _ create ( context, hmc _ uuid, host _ name ) : return impl. ibm _ hmc _ clusters _ create ( context, hmc _ uuid, host _ name ) | [
-0.32921814918518066,
-0.007272804621607065,
0.40774860978126526,
0.2936646640300751,
0.5122745633125305,
0.20027188956737518,
0.390277236700058,
0.06327667087316513,
-0.36967769265174866,
0.09158849716186523,
-0.6700723171234131,
0.7426403164863586,
-1.308162808418274,
-0.5847766995429993... |
def print _ first _ and _ last _ sorted ( sentence ) : words = break _ words ( sentence ) sort _ words ( words ) print _ first _ word ( words ) print _ last _ word ( words ) | [
0.4868781268596649,
-0.5825808048248291,
0.5093796253204346,
-0.47420862317085266,
0.7782253623008728,
-0.8194713592529297,
-0.039935026317834854,
-1.0222901105880737,
-0.6557145118713379,
0.5020352005958557,
-0.054309193044900894,
0.2922039031982422,
-0.2991514503955841,
1.018507122993469... |
def find _ backlink _ handles ( self, handle, include _ classes = none ) : for ( objclass, handle ) in self. db. find _ backlink _ handles ( handle, include _ classes ) : if handle in self. referenced [ objclass ] : yield ( objclass, handle ) | [
0.4629037380218506,
-0.8158149719238281,
0.721335232257843,
0.2958363890647888,
0.3943973183631897,
0.5184836983680725,
1.1067482233047485,
-0.5450348258018494,
-0.0733640119433403,
-0.661815881729126,
0.21176040172576904,
0.772762656211853,
-1.0547658205032349,
0.6835162043571472,
-0.32... |
def display _ name ( self ) - > str : return pulumi. get ( self, " display _ name " ) | [
0.9221236705780029,
-0.1667342334985733,
0.620207667350769,
0.466852068901062,
-0.409553587436676,
1.3052228689193726,
-0.15674535930156708,
-0.4707861542701721,
0.13429176807403564,
0.760124146938324,
0.5716885924339294,
0.7941307425498962,
0.7740156650543213,
-0.8873516917228699,
-0.60... |
def port ( self ) : return self. _ port | [
0.8442933559417725,
-0.1702185422182083,
0.09358552098274231,
0.16615118086338043,
0.7592723965644836,
1.0288063287734985,
1.7659363746643066,
-0.2500022053718567,
0.08431407809257507,
-1.229373574256897,
0.1417333036661148,
0.17012830078601837,
-0.7172808051109314,
-0.6022881269454956,
... |
def testtruncate ( self ) : self. sf. addconsumer ('a') self. assertequal ( self. sf. buffer _ file. first _ seq, 1 ) self. assertequal ( self. sf. buffer _ file. last _ seq, 0 ) self. sf. produce ( [ self. e1, self. e2 ] ) self. assertequal ( self. sf. buffer _ file. first _ seq, 1 ) self. assertequal ( self. sf. buff... | [
0.8200769424438477,
0.2814011573791504,
0.9461578726768494,
-0.008983852341771126,
1.4073753356933594,
-0.6343923211097717,
0.9302859902381897,
0.1783214956521988,
-0.20775070786476135,
0.07380065321922302,
-0.686859130859375,
0.05960456654429436,
-0.6693536043167114,
0.10404928028583527,
... |
def create _ hgrid ( self ) : g = self. require _ group ('/ grd / hgrid') d = g. require _ dataset ('grd _ x ', shape = ( 3, self. nrgn, self. gall1d, self. gall1d ), chunks = ( 1, 1, self. gall1d, self. gall1d ), compression ='gzip ', shuffle = true, dtype ='> f8') d = g. require _ dataset ('grd _ xt ', shape = ( 3, 2... | [
0.5491868853569031,
0.3550848364830017,
0.6264392733573914,
-0.3376062214374542,
0.3368980586528778,
0.4455522298812866,
0.31384551525115967,
-0.5334605574607849,
-1.2852131128311157,
-0.06154504790902138,
-0.3616538345813751,
0.4696406424045563,
-0.4913199841976166,
0.2382717877626419,
... |
def getpowerdev ( self, * args ) : return _ snap. trnd _ getpowerdev ( self, * args ) | [
0.3891947567462921,
0.5712356567382812,
0.5947738289833069,
0.8409572839736938,
0.6176861524581909,
-0.23197202384471893,
0.0007526319823227823,
0.20639465749263763,
-1.5059666633605957,
-1.6147820949554443,
0.3374377191066742,
-0.5836087465286255,
-0.4382433593273163,
0.7769055366516113,
... |
def test _ encode ( self ) : keyword ='train'plaintext ='encodedinpython'cipher = vigenerecipher ( keyword ) actual = cipher. encode ( plaintext ) expected ='xecwqxuivcrkhwa'self. assertequal ( actual, expected ) | [
0.3852785527706146,
0.0876302570104599,
0.01115544606000185,
0.7734882235527039,
0.26943421363830566,
0.5205700993537903,
-0.2900708019733429,
-0.015384850092232227,
0.7457645535469055,
-0.013964137993752956,
-1.1587226390838623,
0.690937876701355,
-1.5355314016342163,
-0.577870786190033,
... |
def test _ atomic _ qname _ pattern _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 1. xsd ", instance = " nistdata / atomic / qname / schema... | [
-0.07081957161426544,
-0.08966860920190811,
0.517859935760498,
0.1864316761493683,
-0.2941712439060211,
0.7313590049743652,
-0.2200479507446289,
-0.4200754463672638,
0.7689425945281982,
0.6552225351333618,
-0.17111724615097046,
-0.33800995349884033,
-0.24094721674919128,
-0.543139517307281... |
def _ get _ top _ n _ accuracy ( self, preds _ vec ) : accuracy _ top _ n _ list = [ ] for top _ n in self. cfg. top _ n _ list : accuracy _ top _ n = [ ] for pred _ vec, y _ true in zip ( preds _ vec, self. y _ test ) : y _ pred _ idx _ top _ n = np. argsort ( pred _ vec ) [ - top _ n : ] y _ true _ idx = np. argmax (... | [
-1.1335231065750122,
-0.23615838587284088,
0.5324943661689758,
0.11894698441028595,
-0.09976138919591904,
-0.2241109311580658,
1.1208374500274658,
0.31296929717063904,
-0.16535593569278717,
0.36063352227211,
0.06520994752645493,
0.9744622111320496,
0.7801064848899841,
1.199278473854065,
... |
def scope _ to _ list ( scope ) : if isinstance ( scope, list ) : return [ unicode _ type ( s ) for s in scope ] elif scope is none : return none else : return scope. split ( " " ) | [
-0.9371673464775085,
-0.3524441719055176,
0.46954718232154846,
-0.4738510847091675,
0.7401978969573975,
-1.2661967277526855,
-0.823945939540863,
0.29571419954299927,
1.6605201959609985,
1.8215676546096802,
-1.1897584199905396,
0.8685775399208069,
-0.7786929607391357,
0.387886643409729,
0... |
def get _ integers ( number ) : while true : yield number number + = 1 | [
-0.9401118159294128,
0.918972373008728,
0.5366323590278625,
0.40492090582847595,
-0.08956018090248108,
0.2882542014122009,
0.04341714084148407,
-0.5716906189918518,
0.0615316778421402,
-1.3511552810668945,
-1.0320624113082886,
0.26976799964904785,
-0.6890225410461426,
-0.471088171005249,
... |
def adjust _ expect _ band ( df _ int, df _ profile, df _ std, dt _ index = none ) : if dt _ index is none : dt _ index = pd. date _ range ( df _ int. index [ 0 ], df _ int. index [ 0 ] + pd. timedelta ('23 h 45 m'), freq ='15t') df _ interpolate = pd. dataframe ( index = dt _ index ) df _ int _ profile = pd. concat ( ... | [
0.04836103320121765,
0.30385568737983704,
0.9450187087059021,
-0.31638485193252563,
-0.3867296576499939,
0.8338791728019714,
0.7971059679985046,
0.527299702167511,
-0.14086347818374634,
-0.10452903062105179,
0.672637939453125,
1.054242730140686,
-0.44780635833740234,
0.28425827622413635,
... |
def quit ( self ) : res = self. docmd ( " quit " ) # a new ehlo is required after reconnecting with connect ( ) self. ehlo _ resp = self. helo _ resp = none self. esmtp _ features = { } self. does _ esmtp = false self. close ( ) return res | [
-0.5182843208312988,
-0.3180420994758606,
0.4432365894317627,
0.13453498482704163,
0.014407672919332981,
0.656838059425354,
0.32561975717544556,
-0.5827314853668213,
-0.06273126602172852,
0.18793396651744843,
-0.5214582681655884,
-0.28223586082458496,
-0.688435971736908,
0.0342275127768516... |
def addsorted ( self, * args ) : return _ snap. tintprv _ addsorted ( self, * args ) | [
-1.1637996435165405,
0.031442854553461075,
0.5618234872817993,
0.3155871033668518,
-0.17789782583713531,
0.2740081548690796,
0.15276412665843964,
-0.5265910625457764,
-0.2309090793132782,
-1.4890742301940918,
-0.8190389275550842,
0.009040554985404015,
-1.9653375148773193,
0.942784488201141... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.