text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ wups _ score ( true _ a, pred _ a ) : wups = print _ metrics. select ['wups'] ( gt _ list = true _ a, pred _ list = pred _ a, verbose = 0, extra _ vars = none ) return wups | [
-0.6798582673072815,
0.14294463396072388,
0.34935325384140015,
-0.29920074343681335,
-0.23958918452262878,
-0.3446001708507538,
0.07943949848413467,
0.43637165427207947,
-0.3805350065231323,
0.7037385106086731,
1.160208821296692,
0.6762207746505737,
0.33970797061920166,
-0.2034590542316436... |
def xgboost _ gridsearch _ regressor ( numeric _ features, categoric _ features, learning _ rate = 0. 08, use _ dask = false, n _ iter = 100, scoring ='roc _ auc ', ) : return _ xgboost _ gridsearch _ model ('regression ', numeric _ features, categoric _ features, learning _ rate, use _ dask, n _ iter, scoring, ) | [
0.0457964763045311,
1.128358244895935,
0.3731226623058319,
0.48512253165245056,
1.1663057804107666,
-0.5499367117881775,
-0.31524065136909485,
-0.17544522881507874,
-1.3465380668640137,
0.1122230812907219,
0.3953177034854889,
0.28678545355796814,
0.008728229440748692,
-0.9686084389686584,
... |
def max _ episode _ steps ( self ) : return self. env. spec. max _ episode _ steps | [
0.3033466637134552,
-0.30201756954193115,
0.35265401005744934,
0.6333048343658447,
0.6859174370765686,
1.3088650703430176,
-0.9426857233047485,
0.22981157898902893,
-0.03589066118001938,
0.3491964638233185,
-0.2881036400794983,
0.13473621010780334,
0.39942657947540283,
0.5970784425735474,
... |
def load _ data _ from _ bam ( self, fendfilename, filelist, maxinsert ) : self. history + = " hicdata. load _ data _ from _ bam ( fendfilename ='% s ', filelist = % s, maxinsert = % i ) - " % ( fendfilename, str ( filelist ), maxinsert ) if'pysam'not in sys. modules. keys ( ) : if not self. silent : print > > sys. std... | [
0.04876242205500603,
-0.29988905787467957,
0.8706653714179993,
0.1426168978214264,
-0.07441973686218262,
0.08477745205163956,
0.13859327137470245,
0.08071821182966232,
-0.39215484261512756,
-0.7715293765068054,
-0.4551873207092285,
-0.004564458969980478,
-0.6644219160079956,
1.103094339370... |
def shop _ bag ( request ) : return render ( request,'shop _ bag / shop - bag. html') | [
-0.8059359788894653,
-0.16486871242523193,
0.18214084208011627,
1.2746752500534058,
0.4824288487434387,
0.7092976570129395,
0.6442267894744873,
0.05192362144589424,
0.054012373089790344,
-0.4492901563644409,
-0.12415508925914764,
0.3026939332485199,
0.7311728000640869,
0.47522202134132385,... |
def format _ bytes ( size ) : size = float ( size ) kb = float ( 1024 ) mb = float ( kb * * 2 ) # 1, 048, 576 gb = float ( kb * * 3 ) # 1, 073, 741, 824 if size < kb : return'{ 0 } { 1 } '. format ( size,'b'if 0 = = size > 1 else'b') elif kb < = size < mb : return'{ 0 :. 2f } kib '. format ( size / kb ) elif mb < = siz... | [
0.26708605885505676,
-0.5606836080551147,
0.8038887977600098,
-0.21149620413780212,
-0.5487444400787354,
0.02626892551779747,
0.17306938767433167,
-0.5113707184791565,
0.47040119767189026,
0.3913540840148926,
0.5701656341552734,
0.47775787115097046,
-0.8498725295066833,
0.7382125854492188,... |
def process ( ) : print ( " enter the marks filename : " ) filename = input ( " " ) f = open ( filename, " r " ) for line in f : x = line. split ( ", " ) student = x [ 0 ] grade = x [ 1 ] if " \ n " in grade : n = len ( grade ) - 1 grade = grade [ : n ] data [ student ] = grade grades = [ ] for student, grade in data. ... | [
-0.1289689987897873,
-0.3584808111190796,
0.6750493049621582,
-0.9096382856369019,
-0.26738405227661133,
0.7609599828720093,
0.6137121915817261,
0.2472814917564392,
-0.9260740280151367,
0.6944114565849304,
0.30490729212760925,
0.8209003210067749,
0.21597450971603394,
0.3733389675617218,
... |
def can _ vote ( self, object, user ) : anonymous _ approval _ enabled = getattr ( config,'anonymous _ approval _ enabled ', false ) if ( user. is _ authenticated ( ) or anonymous _ approval _ enabled ) and \ ( has _ permission ( user,'access _ moderation _ queue') or \ has _ permission ( user,'moderate _ % s'% ( objec... | [
-0.21205458045005798,
-0.17412996292114258,
0.8408637046813965,
0.8679656982421875,
-0.8481467366218567,
0.8269970417022705,
-0.665526807308197,
-0.002111432608217001,
0.14870816469192505,
0.8403732180595398,
0.012260215356945992,
0.9486546516418457,
-0.6117448806762695,
1.095332384109497,... |
def verifyyarasignaturereference ( self, blob _ id : rdf _ objects. blobid, cursor : mysqldb. cursors. cursor, ) - > bool : query = " " " select 1 from yara _ signature _ references where blob _ id = % ( blob _ id ) s " " " cursor. execute ( query, { " blob _ id " : blob _ id. asbytes ( ) } ) return len ( cursor. fetch... | [
0.5727179646492004,
-0.851850152015686,
0.6355201601982117,
0.24098199605941772,
1.0307790040969849,
-0.6547856330871582,
0.33572104573249817,
-0.049970533698797226,
0.4413849711418152,
0.353965163230896,
-0.7072407007217407,
-0.23799729347229004,
-0.6022254228591919,
1.3768658638000488,
... |
def veze ( self ) : self. lineeditlabel. textchanged. connect ( self. promjeni _ label ) self. combomarkerstil. currentindexchanged. connect ( self. promjeni _ marker _ stil ) self. spinmarker. valuechanged. connect ( self. promjeni _ marker _ size ) self. combolinestil. currentindexchanged. connect ( self. promjeni _ ... | [
-0.6395860314369202,
-0.4666304588317871,
0.4559878408908844,
-0.05833999067544937,
0.2557421624660492,
0.42019203305244446,
1.1619634628295898,
0.011945837177336216,
-0.9401776790618896,
0.38531017303466797,
-0.6637399196624756,
-0.06457378715276718,
-0.22215476632118225,
0.70101845264434... |
def run _ dt _ full ( x _ train, y _ train, x _ test, y _ test, randseed, i, param _ grid, n _ trials, timeout, do _ plot, full _ path, use _ uniform _ fi, primary _ metric ) : # check whether hyperparameters are fixed ( i. e. no hyperparameter sweep required ) or whether a set / range of values were specified for any ... | [
-0.02986757643520832,
0.9436790347099304,
1.1727426052093506,
0.9128659963607788,
-0.028157979249954224,
0.4719456434249878,
0.6783437728881836,
0.35841310024261475,
-0.6837193369865417,
0.3157763183116913,
0.24842426180839539,
0.7109361886978149,
0.7146751880645752,
0.292232871055603,
-... |
def prefix _ count ( self, prefix _ count ) : self. _ prefix _ count = prefix _ count | [
0.7898536920547485,
-0.22709788382053375,
0.2127518504858017,
0.03730200231075287,
0.01933394744992256,
0.6830141544342041,
0.2526759207248688,
0.6335672736167908,
-0.6360488533973694,
-0.2357662171125412,
-1.099202275276184,
-0.1713637411594391,
0.2974764108657837,
0.5147647261619568,
0... |
def top _ dir ( ) : return os. getcwd ( ) | [
-1.1709407567977905,
-0.5840879678726196,
0.8290510773658752,
-0.06768596917390823,
-0.4566292464733124,
0.3936002552509308,
1.4267686605453491,
-0.45120322704315186,
0.2362697720527649,
-0.7183406352996826,
1.0847195386886597,
0.3112299144268036,
0.13928557932376862,
-0.6813182234764099,
... |
def _ _ init _ _ ( self, index ) : # create a catalogue with all the entities and components self. _ groups = dict ( ) self. _ items = dict ( ) self. _ index = index # create the datafram to map the entity - components self. _ dataframe = pd. dataframe ( ) | [
-0.42128339409828186,
-0.051512736827135086,
0.4395322799682617,
-1.2075977325439453,
0.4179497957229614,
-0.1351994276046753,
0.38731658458709717,
0.34505006670951843,
-0.1884756237268448,
-1.6111619472503662,
0.379070907831192,
-0.48173269629478455,
0.1364395022392273,
0.1636784374713897... |
def iscsi _ target _ count _ by _ host ( context, host ) : return impl. iscsi _ target _ count _ by _ host ( context, host ) | [
-0.417224645614624,
0.07622665166854858,
0.6344552636146545,
0.23540811240673065,
0.4281729757785797,
-0.34907984733581543,
-0.38331785798072815,
0.12723270058631897,
-0.49008551239967346,
0.06896371394395828,
-0.525871753692627,
0.6365835070610046,
0.11867626011371613,
-0.9625419974327087... |
def plot _ auto _ corr ( v, vname ) : # set up the figure fig = plt. figure ( figsize = ( 8, 6 ) ) ax = fig. add _ axes ( [ 0. 10, 0. 10, 0. 85, 0. 85 ] ) l1 = plt. plot ( v, label = vname ) ax. set _ xlabel ( " lag " ) ax. set _ ylabel ( " autocorrelation " ) plt. ylim ( [ - 0. 1, 1 ] ) plt. legend ( ) plt. savefig ( ... | [
0.7636896967887878,
-0.2883581519126892,
0.6115252375602722,
-0.8486952185630798,
0.10133454948663712,
0.2524571120738983,
1.340484380722046,
0.9825282692909241,
-0.41874927282333374,
0.08599075675010681,
0.17593242228031158,
1.7852038145065308,
-0.15206360816955566,
-0.4483463764190674,
... |
def define _ message ( self ) : pass | [
-0.09661151468753815,
-0.12304244935512543,
0.3017048239707947,
0.8434348702430725,
1.3395012617111206,
0.2383197695016861,
-0.3604181408882141,
-0.18053841590881348,
-0.7455998063087463,
-1.2756916284561157,
-0.15015368163585663,
0.5119540095329285,
-0.574688196182251,
1.4233193397521973,... |
def find _ all _ table _ parsing _ warnings ( self ) : warnings = [ ] for table in self. tables. values ( ) : if hasattr ( table,'parsing _ warnings') : warnings. extend ( table. parsing _ warnings ) return warnings | [
0.4117039442062378,
0.09063639491796494,
0.5969429612159729,
1.3585118055343628,
0.17632736265659332,
0.3159959018230438,
-0.8650571703910828,
-0.526299774646759,
-0.8795491456985474,
0.3090806305408478,
-0.5347983837127686,
0.4580762982368469,
0.4648253321647644,
1.3656466007232666,
-1.... |
def test _ md006 _ bad _ indentation _ unordered ( ) : # arrange scanner = markdownscanner ( ) supplied _ arguments = [ " - - enable - rules ", " md006 ", " scan ", " test / resources / rules / md006 / bad _ indentation _ unordered. md ", ] expected _ return _ code = 0 expected _ output = " " expected _ error = " " # a... | [
0.2927796244621277,
-0.24531923234462738,
0.6091398000717163,
0.6809463500976562,
0.2847175896167755,
0.24035027623176575,
0.36612218618392944,
0.8594882488250732,
-0.3326367437839508,
-0.46050816774368286,
0.6990691423416138,
-0.5506397485733032,
-0.4259156584739685,
0.08497937768697739,
... |
def vpnvserver _ authenticationsamlpolicy _ bindings ( self ) : try : return self. _ vpnvserver _ authenticationsamlpolicy _ binding except exception as e : raise e | [
-0.3193621039390564,
-0.4829281270503998,
0.3037067949771881,
1.491616129875183,
-1.0337284803390503,
1.8013603687286377,
-0.03399471566081047,
0.10980360209941864,
2.0407094955444336,
0.8425180912017822,
-0.6919800043106079,
0.72258061170578,
-0.9667743444442749,
0.07521208375692368,
0.... |
def export _ results ( self ) : problemids = list ( set ( [ result. problemid for result in self. results ] ) ) configids = list ( set ( [ result. configid for result in self. results ] ) ) labels = [ ] labels. extend ( testresults. _ fields ) labels. extend ( sizemetrics. _ fields ) # remove unused columns labels. rem... | [
0.05148674547672272,
0.9402642250061035,
0.49051278829574585,
0.043490175157785416,
0.32574307918548584,
-0.7340660691261292,
1.1099562644958496,
-0.45164984464645386,
-0.2456480860710144,
0.06057051569223404,
0.33938488364219666,
-0.353254109621048,
-0.26135575771331787,
0.495742499828338... |
def test _ member _ function ( self ) : self. found _ lines _ eq ('+ member : memberfunction ', [ ( u'class < b > memberfunction < / b > { ', 2 ), ( u'void memberfunction : : < b > member _ function < / b > ( ) { ', 7 ) ] ) | [
0.983566164970398,
-0.2822064757347107,
0.3297884166240692,
0.6725582480430603,
0.7020896673202515,
-0.38477006554603577,
0.01716449111700058,
0.30869972705841064,
0.7743431925773621,
-0.9212450385093689,
-0.6878933310508728,
0.47734445333480835,
-0.0037784886080771685,
-0.1260125339031219... |
def removestudent ( self, studentid ) : self. students = [ x for x in self. students if x. studentid! = studentid ] | [
-1.155774474143982,
-0.986003041267395,
0.11037803441286087,
-0.1680743247270584,
-0.6779504418373108,
0.48501062393188477,
-0.5982241034507751,
0.8811559081077576,
0.49032360315322876,
1.436139464378357,
-1.0585490465164185,
0.595582902431488,
-0.695634126663208,
0.8370949625968933,
-1.... |
def get _ flowcell ( self ) : return int ( self. _ entry [ 0 ] ) | [
0.6327738761901855,
0.2081977277994156,
0.5761064291000366,
0.24744510650634766,
0.6486456990242004,
0.6053450703620911,
1.5068855285644531,
-0.8913043141365051,
0.22986285388469696,
-0.9215372800827026,
0.096332848072052,
0.4563634991645813,
-0.26069921255111694,
0.05831673741340637,
0.... |
def set _ mlflow _ warnings _ disablement _ state _ globally ( self, disabled = true ) : with self. _ state _ lock : self. _ mlflow _ warnings _ disabled _ globally = disabled self. _ modify _ patch _ state _ if _ necessary ( ) | [
0.2199050635099411,
-0.12458629161119461,
0.44063153862953186,
0.6301430463790894,
0.16708441078662872,
1.5840709209442139,
1.0813210010528564,
0.9583479166030884,
-0.19116836786270142,
-0.11329303681850433,
-0.25847128033638,
1.2833731174468994,
-1.4022467136383057,
0.2695786654949188,
... |
def main ( ) : if len ( sys. argv ) > 1 and sys. argv [ 1 ] = = " spam " : ex6 _ spam ( ) else : ex6 ( ) | [
1.1668988466262817,
0.8252871632575989,
0.5252670049667358,
1.3116543292999268,
0.16209495067596436,
-0.28084656596183777,
0.2416485995054245,
1.4255262613296509,
1.14995539188385,
0.08524297177791595,
-0.22672124207019806,
0.7031005024909973,
-0.35493096709251404,
0.27668553590774536,
0... |
def compare _ expressions ( x1, x2 ) : # first sort by expression type if x1. type is not x2. type : return x1. type. id - x2. type. id # check object type tx1 = type ( x1 ) tx2 = type ( x2 ) if tx1 is not tx2 : # alias always loss if tx1 is cpoalias : return 1 if tx2 is cpoalias : return - 1 # compare by name in natur... | [
-0.42738255858421326,
-0.8998086452484131,
0.7659552693367004,
-0.05407075583934784,
-0.364332914352417,
-0.15199688076972961,
0.213810533285141,
-0.7257614731788635,
-0.7762738466262817,
1.375860571861267,
-0.5349260568618774,
0.6473215818405151,
-0.10019605606794357,
-0.44943326711654663... |
async def upload _ paste ( self, paste : paste ) : pass | [
-1.3259271383285522,
0.7508547902107239,
0.606127917766571,
0.042331065982580185,
0.12173976749181747,
0.20678865909576416,
-0.15553823113441467,
0.489097535610199,
-0.1954471617937088,
1.2842702865600586,
-1.093500018119812,
0.6586406230926514,
-1.3747985363006592,
0.2639375627040863,
-... |
def counttotalrepeatlength ( infile, outfile ) : dbhandle = sqlite3. connect ( params [ " database _ name " ] ) cc = dbhandle. cursor ( ) statement = " " " drop table if exists repeat _ length " " " database. executewait ( dbhandle, statement ) statement = " " " create table repeat _ length as select sum ( stop - start... | [
0.2637840211391449,
-0.02127617783844471,
0.8223938941955566,
0.042045820504426956,
-0.1317954659461975,
0.7681332230567932,
1.3391718864440918,
0.8789277672767639,
-0.760434627532959,
1.3065330982208252,
-1.0832070112228394,
-0.14658920466899872,
-0.19120527803897858,
-0.30437514185905457... |
def test _ 07 _ 6 _ days ( self ) : self. m _ schedule _ obj. dayofweek = dayofweek _ tuesday l _ days = schedtime. _ extract _ days ( self. m _ schedule _ obj, t _ wednesday ) # print ( prettyformatany. form ( l _ days,'b1 - 07 - a - days') ) self. assertequal ( l _ days, 6 ) | [
-0.29720303416252136,
0.41699695587158203,
0.34601274132728577,
-1.181835412979126,
0.5201485753059387,
-0.5232523083686829,
-0.1695536971092224,
-0.689949095249176,
0.761410117149353,
-0.3855011761188507,
-0.04166813939809799,
-0.8153516054153442,
0.3656158447265625,
-0.01998431794345379,... |
def version ( self ) : return self ['version'] | [
-0.20846496522426605,
-1.2389471530914307,
-0.13532902300357819,
0.2675560712814331,
0.47665292024612427,
1.0042154788970947,
0.22778385877609253,
0.16409088671207428,
0.30749189853668213,
0.4639045298099518,
-0.8447291254997253,
-0.15705949068069458,
0.08055306226015091,
-0.69785779714584... |
def find _ charged _ pairs _ center ( coord, coords _ loc = [ 3, 6 ] ) : distances = { } dist _ vec = { } for key in coord : current _ timestep = coord [ key ] type2 = current _ timestep [ current _ timestep ['type'] = = 2 ]. iloc [ :, coords _ loc [ 0 ] : coords _ loc [ 1 ] ]. values # change depending on columns in d... | [
0.33783969283103943,
-0.9715458750724792,
0.8565862774848938,
0.18635335564613342,
-0.33007508516311646,
0.06888426840305328,
-0.2405419945716858,
-0.2748452425003052,
-0.32723596692085266,
0.8414113521575928,
-0.13868866860866547,
-0.023676976561546326,
-0.35695040225982666,
0.48972791433... |
def queryset ( self, request ) : if request. _ pennyblack _ job _ obj. mails. count ( ) > settings. job _ mail _ inline _ count : return super ( mailinline, self ). queryset ( request ). filter ( pk = 0 ) return super ( mailinline, self ). queryset ( request ) | [
-0.3979724049568176,
0.19990025460720062,
0.6907490491867065,
-0.35113635659217834,
-0.5879496335983276,
0.2957073152065277,
0.1874891221523285,
0.23824167251586914,
-0.09031762927770615,
-0.77094566822052,
-0.2898238003253937,
0.5223690271377563,
-0.22399473190307617,
-0.2961731255054474,... |
def on _ progress ( self ) : pass | [
0.8564398884773254,
-1.3092427253723145,
0.30940115451812744,
0.6951739192008972,
0.6035380959510803,
0.28618165850639343,
0.3823928236961365,
-0.2517452836036682,
-0.5910055637359619,
-0.4804868698120117,
-0.6240561008453369,
-0.8737489581108093,
-0.43241527676582336,
0.5056902766227722,
... |
def instance _ test _ and _ set ( context, instance _ uuid, attr, ok _ states, new _ state ) : return impl. instance _ test _ and _ set ( context, instance _ uuid, attr, ok _ states, new _ state ) | [
-0.6825605630874634,
-0.4925253093242645,
0.2132987082004547,
-1.0938154458999634,
-0.5295372605323792,
-0.11994670331478119,
0.4252738654613495,
-0.02955317310988903,
0.6630096435546875,
0.8490296602249146,
0.054284319281578064,
0.3628740906715393,
-0.12833216786384583,
-1.169320821762085... |
def get _ coordinate _ 2d ( self, index : int ) - > tuple [ int, int ] : return index / / self. size, index % self. size | [
-1.6433756351470947,
-0.44187524914741516,
0.5055944919586182,
-0.2713228762149811,
-0.33988872170448303,
-0.12126636505126953,
0.20743173360824585,
-1.1066621541976929,
-0.0936499536037445,
-0.5423891544342041,
-0.290646493434906,
-0.0477861613035202,
-0.4303678274154663,
-0.2583073377609... |
def _ read _ annotations ( csv _ reader, classes ) : result = { } for line, row in enumerate ( csv _ reader ) : line + = 1 try : img _ file, x1, y1, x2, y2, class _ name, layout _ id, _, _, grid _ location = row [ : 10 ] except : try : img _ file, x1, y1, x2, y2, class _ name, layout _ id = row [ : 7 ] grid _ location ... | [
-0.44481128454208374,
-0.0838804841041565,
0.7399579286575317,
0.11455466598272324,
-0.763420581817627,
-1.07034432888031,
0.7782096862792969,
-0.3565445840358734,
-0.6279821991920471,
-0.06847289949655533,
0.48161762952804565,
-0.16439254581928253,
0.5963209867477417,
0.568711519241333,
... |
def setupmodule ( ) : log. info ( " begin chassis inventory tests " ) chassisinventorytest. initialize _ data ( host _ override, data _ override, depth _ override ) | [
-0.19460582733154297,
0.5940757989883423,
0.21177737414836884,
0.09759312868118286,
1.831496000289917,
0.5055989623069763,
0.9252055883407593,
0.06804288923740387,
-0.07328085601329803,
-0.793611466884613,
-0.9455467462539673,
0.7182615399360657,
-0.1373537927865982,
-0.03730638325214386,
... |
def _ _ init _ _ ( self ) : self. name ='program quit event ' | [
0.8836919665336609,
-0.7852081656455994,
0.5299068689346313,
0.012953820638358593,
-0.41801613569259644,
0.8172885775566101,
0.12076667696237564,
-0.10605679452419281,
-0.22842201590538025,
0.49618130922317505,
-0.6008651256561279,
0.11421827971935272,
0.40905624628067017,
0.11769286543130... |
def stretch ( a ) : hist = histogram ( a ) im = arraytoimage ( a ) lut = [ ] for b in range ( 0, len ( hist ), 256 ) : # step size step = reduce ( operator. add, hist [ b : b + 256 ] ) / 255 # create equalization lookup table n = 0 for i in range ( 256 ) : lut. append ( n / step ) n = n + hist [ i + b ] im = im. point ... | [
0.02911573275923729,
0.5048640966415405,
0.5604201555252075,
-0.2778303623199463,
-0.06435592472553253,
-0.532062292098999,
0.8904553055763245,
0.06518395990133286,
1.5116338729858398,
0.6466645002365112,
-0.10663909465074539,
0.011224106885492802,
-0.22343438863754272,
0.6868416666984558,... |
def get _ dnq ( self ) : return self. dnq | [
-1.5023114681243896,
-0.35716500878334045,
0.35079219937324524,
0.5179927945137024,
-1.0122185945510864,
-0.45091512799263,
-0.6149413585662842,
-0.8983765840530396,
0.09133893996477127,
-0.7742059230804443,
-0.834298312664032,
0.11467377841472626,
0.08348860591650009,
-0.2816125452518463,... |
def lag ( self, lagtime : optional [ float ] = none ) - > none : started = time. time ( ) with self. lock : waittime = lagtime or config. retry _ wait if self. retry _ after : waittime = max ( self. retry _ after, waittime / 5 ) # wait not more than retry _ max seconds delay = min ( waittime, config. retry _ max ) # ac... | [
0.7762658596038818,
0.3112126588821411,
0.39575958251953125,
0.32494744658470154,
0.3936220705509186,
0.5480204820632935,
-0.001695332583039999,
0.3267284631729126,
-0.6294100284576416,
-0.35756003856658936,
0.2907087802886963,
0.9968554973602295,
-0.22060342133045197,
0.5754316449165344,
... |
def not _ equal ( * values ) : return impl. not _ equal ( * values ) | [
-1.3645257949829102,
0.7498461008071899,
0.2893490195274353,
0.6804412603378296,
0.9764162302017212,
-0.0027678399346768856,
0.0880826860666275,
-0.9126127362251282,
-0.7991465926170349,
-0.20976491272449493,
-0.7652770280838013,
-0.4068983197212219,
-0.46001386642456055,
0.842928111553192... |
def instance _ data _ get _ for _ project ( context, project _ id, session = none ) : return impl. instance _ data _ get _ for _ project ( context, project _ id, session = session ) | [
-0.7996264696121216,
0.7602759599685669,
0.2613756060600281,
-0.6620849967002869,
0.14780665934085846,
0.4955020248889923,
-0.38694944977760315,
-0.4411771595478058,
-0.40257325768470764,
-0.025018326938152313,
0.10318976640701294,
0.7839391827583313,
0.000966559920925647,
-0.0403769910335... |
def partition _ dataset ( conll _ file, percentage ) : basedir = os. path. dirname ( conll _ file ) train _ txt = basedir +'/ train. txt'valid _ txt = basedir +'/ valid. txt'test _ txt = basedir +'/ test. txt'train _ per = percentage [ 0 ] valid _ per = percentage [ 1 ] + train _ per test _ per = percentage [ 2 ] + val... | [
0.5195269584655762,
-0.09331881254911423,
0.7053092122077942,
-0.8043025135993958,
-0.1628536731004715,
0.2519274652004242,
0.5928099155426025,
0.9148072004318237,
-0.3311443030834198,
-0.12377605587244034,
0.18151919543743134,
-0.11540642380714417,
-0.15095382928848267,
-0.649500191211700... |
def putdefaultvalueintoconfig ( self, config, option ) : for varname, option in self. options. items ( ) : try : self. putvalueintoconfig ( option = option, config = config, value = option. defaultvalue. parametervalue ) except configformaterror as error : raise configformaterror ( \ _ ( " whilst assigning default valu... | [
-0.46247100830078125,
0.20057719945907593,
0.3127594590187073,
0.2643485367298126,
1.8534232378005981,
-0.005624793004244566,
0.11899501085281372,
0.3916908800601959,
-0.9025115966796875,
0.5822928547859192,
-0.15318308770656586,
-0.4146232008934021,
-0.6589732766151428,
1.6140424013137817... |
def test _ calculate _ angle _ radians ( ) : r1 = np. array ( [ 1, 0, 0 ] ) r2 = np. array ( [ 0, 0, 0 ] ) r3 = np. array ( [ 0, 1, 0 ] ) expected _ value = 90 * ( np. pi / 180 ) calculated _ value = molecool. calculate _ angle ( r1, r2, r3 ) assert expected _ value = = calculated _ value | [
-0.17804332077503204,
0.29378852248191833,
0.4614329934120178,
-0.00010398119047749788,
0.5867900252342224,
0.25461792945861816,
-0.23983821272850037,
0.367715448141098,
-0.31935447454452515,
-0.0038037511985749006,
-0.48780831694602966,
-0.5662661790847778,
-0.7409861087799072,
-0.4552233... |
def test _ firm _ correction _ notification ( app, session, status, legal _ type ) : # setup filing + business for email legal _ name ='test business'filing = prep _ firm _ correction _ filing ( session,'fm1234567 ','1 ', legal _ type, legal _ name,'staff') token ='token'# test processor with patch. object ( correction... | [
0.6390071511268616,
-0.2526383101940155,
0.6701648831367493,
-0.4529162049293518,
0.8854694962501526,
-0.08457176387310028,
0.3510708212852478,
0.1818566918373108,
-0.3690221607685089,
-0.27350372076034546,
0.004924863576889038,
0.49773308634757996,
0.38167551159858704,
0.6743370294570923,... |
def isterminal ( self, state ) : if self. thebackingmachine = = none : return false try : return self. thebackingmachine. isterminal ( state ) except exception as e : self. failgracefully ( e, none ) except threaddeath as d : raise d except outofmemoryerror as e : raise e except error as e : self. failgracefully ( none... | [
0.003156455932185054,
0.22757203876972198,
0.7897116541862488,
-0.09623400121927261,
0.26122769713401794,
0.029527008533477783,
-0.8635832667350769,
-0.15635369718074799,
1.0253949165344238,
0.4835456311702728,
0.6695969700813293,
0.4640722870826721,
-0.7960953116416931,
-0.346752643585205... |
def test _ correct _ boolean _ argument ( assert _ errors, parse _ ast _ tree, argument, default _ options, ) : tree = parse _ ast _ tree ( correct _ argument. format ( argument ) ) visitor = wrongfunctioncallvisitor ( default _ options, tree = tree ) visitor. run ( ) assert _ errors ( visitor, [ ] ) | [
-0.40461617708206177,
0.5274431109428406,
0.37695279717445374,
0.165316641330719,
0.7891356348991394,
0.5015038251876831,
0.5887868404388428,
0.6717820763587952,
-0.34552448987960815,
0.556672990322113,
-0.0163164921104908,
0.23960384726524353,
0.32917386293411255,
0.8498026132583618,
0.... |
def adddocumentsubcategoryaggregates ( self, doclist, collectionname, styletype = " rowwise _ by _ name ", removesubcategoryprefix = true ) : if styletype not in [ " rowwise _ by _ name ", " rowwise _ by _ name _ with _ cardinality " ] : logger. error ( " unsupported document style % s ", styletype ) return doclist try... | [
-0.3694339990615845,
0.5713952779769897,
0.865982711315155,
-0.5539959073066711,
-1.0548497438430786,
-0.0470786914229393,
0.1681441366672516,
-0.13952015340328217,
-0.06884724646806717,
0.09098333865404129,
-0.21096274256706238,
0.2457306832075119,
0.05406565219163895,
1.4881978034973145,... |
def out _ node ( self ) : return node ( self. graph, self. graph. redis. get ('{ } : on '. format ( self. name ) ) ) | [
0.05956830829381943,
0.08224760740995407,
0.38459259271621704,
-0.28582918643951416,
-0.7006806135177612,
-0.3753291070461273,
-1.1581653356552124,
0.4527459740638733,
0.19245660305023193,
0.7828382253646851,
-0.06665250658988953,
0.76312655210495,
-0.5720403790473938,
-0.6849677562713623,... |
def validate _ isomorphisms ( tmplt, world, candidates, unspec _ cover ) : global n _ iterations n _ iterations + = 1 if len ( unspec _ cover ) = = 0 : return validate _ alldiff _ solns ( tmplt, world, candidates ) unspec _ idx = unspec _ cover [ 0 ] unspec _ cands = np. argwhere ( candidates [ unspec _ idx ] ). flat f... | [
-1.2621296644210815,
-0.07605696469545364,
0.790313184261322,
0.3387148678302765,
-0.8596054315567017,
0.572533905506134,
1.232638955116272,
0.0780268982052803,
-0.07979755103588104,
0.33465391397476196,
0.7968729734420776,
0.08392983675003052,
-0.18889880180358887,
0.7571924924850464,
-... |
def save _ dict ( dic, outfile ) : savez ( outfile + '. dict. npz ', dict = dic ) | [
-0.08467371016740799,
-0.06832606345415115,
0.30088192224502563,
-0.1857454627752304,
-0.7707421779632568,
0.5966641306877136,
0.7943484783172607,
0.44843414425849915,
-0.5550975799560547,
0.6021552681922913,
-0.9959827065467834,
-0.38369452953338623,
0.43551069498062134,
1.033097147941589... |
def display _ event ( activity _ id, event _ id ) : with db _ session ( ) as db : activity = db. query ( models. activity ) \. filter _ by ( id = activity _ id ) \. one ( ) event = db. query ( models. event, models. event. id, models. event. name, models. event. description, models. event. start _ date, models. event. ... | [
-0.12875567376613617,
-1.0098668336868286,
0.9941323399543762,
-0.6040214896202087,
0.11494535952806473,
0.003671949962154031,
-0.1164996400475502,
-0.10471723973751068,
-0.46428391337394714,
0.6886647939682007,
0.864513099193573,
0.5330147743225098,
0.8456593155860901,
0.29677829146385193... |
def _ parse _ blocks ( self ) : handle = self. handle blendblockheader = namedstruct. from _ namedtuple ( blenderfile. blendblockheader, self. _ fmt _ strct ('4sipii') ) header _ block _ size = blendblockheader. format. size # get the blend file size end = handle. seek ( 0, 2 ) handle. seek ( 12, 0 ) blend _ index = no... | [
-0.1747661978006363,
-0.5686230659484863,
0.898898720741272,
0.06510861217975616,
0.4912193715572357,
-0.031969405710697174,
0.7096472382545471,
-0.5535913109779358,
-0.9225579500198364,
0.22437576949596405,
-0.78282630443573,
0.06127670034766197,
-0.9671444892883301,
-0.006837582681328058... |
def to _ dense _ design _ matrix ( self, num _ examples = none, ne _ raw = true ) : return self. to _ dense _ design _ matrix ( num _ examples, ne _ raw ) [ 0 ] | [
-0.5648338198661804,
0.7630260586738586,
0.406718373298645,
0.3440697491168976,
0.638820230960846,
-0.2963812053203583,
0.12582848966121674,
0.030345097184181213,
0.7497885227203369,
-1.0777682065963745,
0.21761567890644073,
0.2134404182434082,
0.8750538229942322,
-0.3420918881893158,
-0... |
def _ _ rsub _ _ ( self, other ) : if isinstance ( other, ( float, int ) ) : other = complex ( other ) return other. _ _ sub _ _ ( self ) | [
-0.49643459916114807,
0.1928126960992813,
0.645229697227478,
0.7456813454627991,
-0.6648461818695068,
0.11178448051214218,
0.6570817232131958,
-0.7509449124336243,
0.1268569529056549,
-0.6944798827171326,
-0.7834606766700745,
-0.23334212601184845,
-1.0044254064559937,
-0.4178068935871124,
... |
def get _ installer _ file ( self ) : return self. installer _ file | [
-0.041989974677562714,
-1.146409511566162,
0.20089490711688995,
0.4693654477596283,
0.038917526602745056,
0.12024299055337906,
1.1696187257766724,
0.9810395836830139,
-1.5028882026672363,
-0.41362395882606506,
0.7325055599212646,
-0.7489254474639893,
-0.42251503467559814,
0.681899070739746... |
async def say ( self, text : str, voice _ id : str, * * kwargs ) - > bytes : vocoder : typing. optional [ str ] = kwargs. get ( " vocoder " ) denoiser _ strength : typing. optional [ float ] = kwargs. get ( " denoiser _ strength " ) voice = self. larynx _ voices [ voice _ id ] # load lexicon, etc. for voice language ( ... | [
-0.34919384121894836,
0.09148479998111725,
0.6302284002304077,
-0.20428253710269928,
0.47826436161994934,
-0.3523860573768616,
-1.458093523979187,
0.2704654932022095,
-0.03398929536342621,
0.6765375137329102,
-0.40485116839408875,
0.383355051279068,
0.2198764830827713,
0.5900270938873291,
... |
def get _ iridium _ time ( ) : [ iridium _ time, stderr ] = call _ subprocess ('cat / proc / iridium _ time') if iridium _ time = ='- msstm : no network service': # in the event of an error getting iridium network time return 9999 else : # we have a good time response epoch _ counter = int ( iridium _ time. lstrip ('- ... | [
0.0005415598279796541,
0.23470424115657806,
0.952831506729126,
-0.3997211158275604,
-0.05486954003572464,
-0.1619051992893219,
0.40814629197120667,
-0.43781301379203796,
-0.34452858567237854,
0.14758673310279846,
0.048876915127038956,
0.5549391508102417,
-0.4947661757469177,
0.939664185047... |
def _ _ call _ _ ( self, request ) : action _ args = self. get _ action _ args ( request. environ ) action = action _ args. pop ('action ', none ) content _ type = request. params. get ( " contenttype " ) try : deserialized _ request = self. dispatch ( self. deserializer, action, request ) action _ args. update ( deser... | [
-0.33894163370132446,
-0.8460074663162231,
1.0045942068099976,
0.20890744030475616,
-0.4473450779914856,
-0.4796658456325531,
0.05640976130962372,
-0.24772638082504272,
0.5726457238197327,
-0.10962403565645218,
0.3578937351703644,
-0.13855832815170288,
-0.4490578770637512,
0.21064247190952... |
def faintmessage ( self ) : self. trap. turns = 3 self. pkmn. setcurrhp ( self. trap. getdamage ( self. pkmn ) ) self. pkmn. secondaryeffects. append ( self. trap ) messages = self. trap. afterturn ( self. pkmn ) assert len ( messages ) = = 2, " should have two messages " assert messages [ 1 ] = = self. pkmn. getheader... | [
0.7751546502113342,
-0.2892901301383972,
0.3900974988937378,
-0.1440708041191101,
1.1224457025527954,
0.007970677688717842,
-0.43019139766693115,
-0.7048755884170532,
-0.26995086669921875,
-0.59858638048172,
-0.5229149460792542,
0.4640369713306427,
0.1420433074235916,
0.4230853319168091,
... |
def leggtilfilm ( dic, tittel, sjanger, regissor, aar ) : hylleplassering = none # hylleplasseringen blir bestemt paa linje 13. dic [ tittel ] = [ regissor, sjanger, aar, hylleplassering ] leggtilhylleplassering ( dic ) # oppdaterer hylleplassering | [
0.2147754281759262,
-0.16603432595729828,
0.3234703838825226,
-0.9926152229309082,
-0.6882929801940918,
0.9343337416648865,
0.01865825243294239,
0.6893754005432129,
0.24635104835033417,
0.40255677700042725,
-0.5478744506835938,
0.16074909269809723,
-0.007816177792847157,
0.1083540394902229... |
def vpnvserver _ authenticationcertpolicy _ bindings ( self ) : try : return self. _ vpnvserver _ authenticationcertpolicy _ binding except exception as e : raise e | [
-0.38651683926582336,
-0.3508596420288086,
0.30618613958358765,
1.5241888761520386,
-0.6796168684959412,
1.7453484535217285,
0.11457473039627075,
-0.4450400173664093,
0.9507085084915161,
0.6852785348892212,
-0.5301209688186646,
0.05613551288843155,
-1.2877840995788574,
-0.2930370569229126,... |
def compute _ kernel ( x, y ) : x _ size = x. size ( 0 ) y _ size = y. size ( 0 ) dim = x. size ( 1 ) x = x. unsqueeze ( 1 ) # ( x _ size, 1, dim ) y = y. unsqueeze ( 0 ) # ( 1, y _ size, dim ) tiled _ x = x. expand ( x _ size, y _ size, dim ) tiled _ y = y. expand ( x _ size, y _ size, dim ) kernel _ input = ( tiled _... | [
-0.09635473042726517,
0.2678806185722351,
0.7042206525802612,
0.7678449153900146,
-0.9249693155288696,
-0.1718176156282425,
-0.057632237672805786,
0.13683494925498962,
-0.29160964488983154,
0.7325790524482727,
0.301282674074173,
0.6173230409622192,
0.26883044838905334,
0.17050187289714813,... |
def set _ optional ( self ) : self. presence = _ pres _ optional | [
-0.0398193821310997,
-1.5586520433425903,
0.4716517925262451,
0.21550214290618896,
0.28914594650268555,
0.7014899849891663,
0.10702455043792725,
0.9267728924751282,
0.753291130065918,
0.5436974763870239,
0.1430070549249649,
0.2215448021888733,
-0.26032644510269165,
0.924246609210968,
0.5... |
def getpath _ this ( ) : path = os. path. realpath ( _ _ file _ _ ) return'{ : s } / '. format ('/ '. join ( path. split ('/') [ : - 1 ] ) ) | [
0.03333237022161484,
-1.2794164419174194,
0.708553671836853,
0.32872912287712097,
0.15299730002880096,
0.26924988627433777,
1.2434293031692505,
-0.11625955998897552,
-0.8978092670440674,
0.08522578328847885,
0.17260034382343292,
-0.6629807353019714,
-0.15495461225509644,
-0.175523832440376... |
def station _ stats ( df ) : print _ pause ('\ ncalculating the most popular stations and trip... \ n ', 1 ) start _ time = time. time ( ) start _ stations = df ['start station']. value _ counts ( ) end _ stations = df ['end station']. value _ counts ( ) station _ combo = df [ ['start station ','end station'] ]. values... | [
-0.060847602784633636,
0.09142183512449265,
0.805210530757904,
-0.1384398192167282,
-0.2658334970474243,
0.16678553819656372,
1.0837260484695435,
-0.4798804223537445,
-0.6382359862327576,
0.10835517197847366,
0.20562133193016052,
0.45368802547454834,
0.8893435001373291,
0.5696631669998169,... |
def print _ dict _ elements ( results ) : for key, value in results. items ( ) : print ('{ } { } : { } '. format ('\ t ', key. capitalize ( ), value ) ) | [
-0.5367767214775085,
-0.5289547443389893,
0.5161550641059875,
-0.49682629108428955,
0.0015855185920372605,
0.8380050659179688,
-0.7907711863517761,
-0.2546103000640869,
-0.7164760828018188,
0.06977511197328568,
0.28991398215293884,
-0.012765384279191494,
0.847673773765564,
0.75395971536636... |
def _ _ init _ _ ( self, sizes : list [ int ] ) : self. num _ layers = len ( sizes ) self. sizes = sizes self. biases = [ np. random. randn ( y, 1 ) for y in sizes [ 1 : ] ] self. weights = [ np. random. randn ( y, x ) for x, y in zip ( sizes [ : - 1 ], sizes [ 1 : ] ) ] | [
-0.3543033003807068,
0.24732114374637604,
0.4125572144985199,
-0.0096482178196311,
0.5660072565078735,
-0.1782553344964981,
0.19380618631839752,
-0.8566205501556396,
0.5515637993812561,
0.14297576248645782,
-0.8703077435493469,
0.19449986517429352,
-0.45598819851875305,
1.196406602859497,
... |
def flatten _ bow ( bow _ review ) : indices = np. flatnonzero ( bow _ review ) words = [ ] for j in indices : words + = [ j ] * int ( bow _ review [ j ] ) return np. array ( words ) | [
-0.693953812122345,
-0.5212498903274536,
0.4289727210998535,
-0.27781620621681213,
0.21827398240566254,
-0.16435320675373077,
0.21538102626800537,
0.06971196830272675,
1.028978943824768,
0.6295394897460938,
0.2055131047964096,
0.04405535012483597,
-1.7603403329849243,
0.2263382524251938,
... |
def cosine _ sim ( self, im, s ) : return im. mm ( s. t ( ) ) | [
-0.10570068657398224,
-0.15199504792690277,
-0.11416595429182053,
-0.4133222699165344,
-0.43703436851501465,
-0.7077448964118958,
-0.6992548108100891,
-0.21209995448589325,
0.6101213693618774,
1.0453765392303467,
0.49613431096076965,
-0.3317190110683441,
0.0074036456644535065,
-1.221245527... |
def _ haversine ( self, lon1, lat1, lon2, lat2 ) : # convert decimal degrees to radians lon1, lat1, lon2, lat2 = map ( math. radians, [ lon1, lat1, lon2, lat2 ] ) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 a = sin ( dlat / 2 ) * * 2 + cos ( lat1 ) * cos ( lat2 ) * sin ( dlon / 2 ) * * 2 c = 2 * asin ( sq... | [
0.6203365921974182,
-0.4241308271884918,
0.766453742980957,
-0.706760585308075,
-0.49466344714164734,
-0.18796664476394653,
-1.3180909156799316,
0.15911966562271118,
-0.984035074710846,
-0.13162733614444733,
-0.22267018258571625,
-0.05831879377365112,
-0.006686612963676453,
-0.701765000820... |
def group _ name ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " group _ name " ) | [
0.42421063780784607,
0.8663010597229004,
0.2567538619041443,
0.13779596984386444,
0.26329508423805237,
0.740220844745636,
0.13052792847156525,
-0.1712317317724228,
0.06828401982784271,
0.15620550513267517,
0.5571608543395996,
0.7421223521232605,
0.2140991985797882,
-0.38942790031433105,
... |
def _ indentation ( text ) : return'\ n '. join ( [ escape _ indentation ( line ) for line in text. split ('\ n') ] ) | [
0.5246152281761169,
-0.07415352761745453,
0.2905995845794678,
0.24036388099193573,
-0.7292211055755615,
-0.9653487205505371,
-0.77191162109375,
0.6210518479347229,
-0.3581799864768982,
0.9673237204551697,
0.048811525106430054,
-0.9775627255439758,
-0.3342196047306061,
-0.3297947943210602,
... |
def _ _ init _ _ ( self, list _ root ='list ', stage ='train ', fixed _ length = 64, compress = 100 ) : super ( paneldataset, self ). _ _ init _ _ ( ) self. list _ root = path ( list _ root ) self. stage = stage self. fixed _ length = fixed _ length self. compress = compress self. video _ paths = list ( ( self. list _ ... | [
0.1859414428472519,
0.5601240992546082,
0.45330217480659485,
0.5721253752708435,
-0.7547588348388672,
-0.16907744109630585,
0.1661294549703598,
0.7902337908744812,
0.20590010285377502,
-0.7325310111045837,
-0.7375618815422058,
0.8350591659545898,
-0.15473058819770813,
1.5561362504959106,
... |
def _ check _ arg _ intensity ( intensity, granularity ) : if _ _ debug _ _ and ( intensity is not none ) : assert isinstance ( intensity, cpoexpr ) and ( intensity. is _ type ( type _ stepfunction ) ), " interval variable'intensity'should be none or a cpostepfunction " if granularity is none : granularity = 100 for ( ... | [
-1.015600323677063,
-0.45400699973106384,
0.3883697986602783,
0.4180587828159332,
0.5821691751480103,
0.15572664141654968,
0.30588242411613464,
0.5811875462532043,
-0.9782117009162903,
1.3763676881790161,
0.5874057412147522,
0.03253920003771782,
-0.9155067801475525,
0.6375041007995605,
0... |
def categories ( processed _ titles : dict [ str, set [ datnode ] ], config : config, input _ dat : dat ) - > dict [ str, set [ datnode ] ] : if input _ dat. clone _ list. categories : eprint ('* applying clone list categories... ', sep ='', end ='', flush = true ) report _ on _ match : bool = false warning _ given : b... | [
-0.38422438502311707,
0.695107638835907,
0.6362879276275635,
-0.394156813621521,
-0.8487991690635681,
0.17204096913337708,
-0.4502413868904114,
-0.9169748425483704,
-0.34311947226524353,
-0.19386157393455505,
0.31336742639541626,
0.5110175609588623,
0.1243598610162735,
0.3874298632144928,
... |
def _ collapse ( self, text : str ) - > list [ str ] : return re. sub ( r'\ s + ','', text ) | [
-0.5334873199462891,
0.10971236228942871,
0.49493736028671265,
-0.8630954623222351,
-0.5147736072540283,
-0.2829725742340088,
-0.7856747508049011,
1.5388166904449463,
-0.0086473124101758,
1.054013967514038,
-0.49519702792167664,
-0.7695235013961792,
-0.2945748567581177,
0.6029894948005676,... |
def update _ from ( self, other ) : self. routine = other. routine self. _ touched = set ( other. _ touched ) self. _ range = dict ( other. _ range ) self. _ writeable = set ( other. _ writeable ) self. _ terminated = other. _ terminated self. _ pointer _ assoc = dict ( other. _ pointer _ assoc ) | [
-0.6846074461936951,
-0.8800582885742188,
0.537239134311676,
-0.834516704082489,
-1.0951154232025146,
0.056837048381567,
0.2165410816669464,
-0.7547541260719299,
-0.24796438217163086,
0.06292156875133514,
-0.9487873315811157,
0.3731338083744049,
0.09560620039701462,
-0.09861040115356445,
... |
def reading ( self ) : # the adc can only read from one port at a time ( in a hardware sense ) so some # logic has to be performed to read the voltage of the intended port # keep repeating until the correct output port is read # it will cycle through all ports so eventually the voltage from the appropriate port will be... | [
-0.3105444014072418,
-0.6520746350288391,
0.507641613483429,
-0.3513401746749878,
0.19727446138858795,
-0.8320301175117493,
-0.2884085476398468,
-1.0582289695739746,
-0.17782199382781982,
-0.3941473662853241,
1.447669267654419,
0.3945450782775879,
-0.8663700819015503,
-0.4100317060947418,
... |
def deny ( s ) : log ( s ) sys. exit ( 1 ) | [
1.0025874376296997,
0.1296241134405136,
0.64633709192276,
0.7530308961868286,
-0.5886397361755371,
0.6334668397903442,
0.9251359701156616,
-0.6521008610725403,
0.2263680100440979,
-0.20192067325115204,
0.0654107853770256,
0.8366971015930176,
-0.004550436045974493,
-0.6923762559890747,
0.... |
def recurrent ( inner, reverse = false ) : def forward ( input, hidden, weight, batch _ sizes ) : output = [ ] steps = range ( input. size ( 0 ) - 1, - 1, - 1 ) if reverse else range ( input. size ( 0 ) ) for i in steps : hidden = inner ( input [ i ], hidden, * weight ) # hack to handle lstm output. append ( hidden [ 0... | [
-0.5847694277763367,
0.7036945819854736,
0.7054492831230164,
0.2944212853908539,
-1.3884574174880981,
-0.3530305027961731,
0.02245931327342987,
0.14857757091522217,
-0.5433083772659302,
-0.29466819763183594,
-0.3931099772453308,
0.6191821694374084,
0.034483782947063446,
-0.1568973958492279... |
def set _ heartbeat ( self, lastbeat = none ) : self. lastbeat = lastbeat if not lastbeat : self. lastbeat = datetime. now ( ) | [
0.5573660731315613,
0.6980772018432617,
0.7517319917678833,
0.6000600457191467,
0.8252742886543274,
0.6382852792739868,
-0.9690890908241272,
0.6451302766799927,
0.06772997975349426,
-0.4663359224796295,
-0.08876252174377441,
0.01685441844165325,
-1.0749764442443848,
1.2179436683654785,
-... |
def _ attributes _ t _ call _ lister ( self ) : # make sure interface is ready to use. d = self. _ attributes _ t _ init ( ) # avoid recursion if d ['recursion'] : return lister = d ['lister'] if lister : # the lister is simply called, and it is expected that it internally # adds / removes attributes as needed. # # alw... | [
-0.3613680601119995,
0.24272751808166504,
0.4751560091972351,
-0.6080518960952759,
-0.14356547594070435,
-0.5486266613006592,
-0.04013463482260704,
0.06270775198936462,
0.7678670287132263,
-0.31085431575775146,
0.17887738347053528,
-0.11845609545707703,
0.27745455503463745,
1.1480077505111... |
def _ message _ in _ range ( self, message ) : # no entity means message ids between chats may vary if self. entity : if self. reverse : if message. id < = self. last _ id or message. id > = self. max _ id : return false else : if message. id > = self. last _ id or message. id < = self. min _ id : return false return t... | [
-0.8824015259742737,
-0.8603900671005249,
0.8410061597824097,
-0.4539714455604553,
0.143576979637146,
0.7437059879302979,
-0.3273397386074066,
-0.7870693206787109,
-0.7168064117431641,
-0.16941168904304504,
0.12261860072612762,
1.086729884147644,
-1.439957857131958,
0.43441635370254517,
... |
def start ( self ) : if not self. _ listening : self. _ listening = true self. listen ( ) | [
1.3411178588867188,
-0.6166847348213196,
0.3611789643764496,
-0.0013330826768651605,
0.6965200304985046,
0.47736606001853943,
-0.02432822249829769,
0.8351443409919739,
-0.1534924954175949,
-0.9984514713287354,
-0.2136811465024948,
0.5489659309387207,
-0.19245116412639618,
0.199289321899414... |
def linearize _ segment _ contents ( part, start, end, state ) : notes = part. iter _ all ( score. genericnote, start = start, end = end, include _ subclasses = true ) notes _ by _ voice = partition ( lambda n : n. voice or 0, notes ) if len ( notes _ by _ voice ) = = 0 : # if there are no notes in this segment, we add... | [
0.29383671283721924,
-0.6468857526779175,
0.9348036050796509,
-0.33398330211639404,
0.42283356189727783,
-0.17518936097621918,
0.2599913775920868,
-0.4956914782524109,
-0.21753859519958496,
0.550615668296814,
-0.2718939781188965,
-0.3386698365211487,
-0.08148176968097687,
-0.15892471373081... |
def join ( item ) : df = createdataframe ( item ) if df : grid. merge ( df ) return true return false | [
-0.26580896973609924,
1.2049918174743652,
0.5013915300369263,
1.003798007965088,
0.39134344458580017,
0.3267837464809418,
-0.5197580456733704,
-0.09295643866062164,
-0.08047091215848923,
-0.5353618860244751,
-0.22183838486671448,
-0.8987590670585632,
-1.298441767692566,
-0.759151816368103,... |
def duration _ list ( filename ) : durations = [ ] with open ( filename,'r') as f _ in : # set up csv reader object reader = csv. dictreader ( f _ in ) for row in reader : durations. append ( round ( float ( row ['duration'] ), 0 ) ) return durations | [
-0.4784962236881256,
-0.2509959936141968,
0.3609246015548706,
-0.2050616592168808,
0.44471174478530884,
0.445050448179245,
-0.2985386848449707,
1.14311683177948,
-0.13045156002044678,
1.4695589542388916,
-0.7373071312904358,
-0.5015939474105835,
0.7058353424072266,
1.3596835136413574,
-0... |
def _ check _ meta ( self, meta ) : is _ meta _ right = true if " title " not in meta : is _ meta _ right = false return is _ meta _ right | [
-0.6321662664413452,
0.5936816334724426,
0.6724642515182495,
1.208284616470337,
-0.6569061279296875,
1.0059223175048828,
-1.6638619899749756,
-0.4214943051338196,
-0.3504425883293152,
0.5494493246078491,
1.4633065462112427,
0.050881437957286835,
-0.4127011299133301,
0.4465901255607605,
-... |
def to _ db ( self, *, include : typing. union [ " pydantic. typing. abstractsetintstr ", " pydantic. typing. mappingintstrany " ] = none, exclude : typing. union [ " pydantic. typing. abstractsetintstr ", " pydantic. typing. mappingintstrany " ] = none, skip _ defaults : bool = none, exclude _ unset : bool = false, ex... | [
-1.102186679840088,
0.4062756597995758,
0.6855930685997009,
-0.77118319272995,
-0.5722452998161316,
-0.08555390685796738,
-0.19976840913295746,
-0.5323054194450378,
0.2003253549337387,
1.0752880573272705,
-0.6913197040557861,
-0.30118218064308167,
-0.0016634102212265134,
-0.016044266521930... |
def _ _ init _ _ ( self, mean, variance ) : super ( ). _ _ init _ _ ( ) self. mean = mean self. variance = variance | [
0.5174000859260559,
-0.12167374044656754,
0.7734007835388184,
0.49344396591186523,
-0.0665607675909996,
0.39655444025993347,
-0.47009679675102234,
0.13522106409072876,
-0.39972811937332153,
0.1613846868276596,
-0.12963517010211945,
1.1555511951446533,
-0.10747577250003815,
0.57488155364990... |
def apply _ teaser _ parameters ( self, teaser _ project ) : thermal _ zone = teaser _ project. buildings [ 0 ]. thermal _ zones [ 0 ] self. records. append ( maphierarchy. maprecord ( parent = self, record _ location = " aixlib. database. buildings. zonebaserecord ", name = " zoneparam " ) ) rec = self. records [ - 1 ... | [
-0.09441886097192764,
-0.3466207981109619,
0.8231936097145081,
-0.5332566499710083,
-0.14216949045658112,
0.6904264688491821,
0.8060479760169983,
0.7737361788749695,
-0.19767995178699493,
0.4450613558292389,
0.11586013436317444,
0.18138697743415833,
-0.01725952699780464,
1.0244503021240234... |
def is _ nucl ( c : str ) - > bool : return c in " acgtnacgtn " | [
0.7477359771728516,
0.4071756601333618,
0.10242276638746262,
-0.4399251341819763,
-0.5208615064620972,
0.33195760846138,
-0.5789574384689331,
-0.5624129772186279,
0.6278172135353088,
-0.5346327424049377,
-0.4599679708480835,
0.6629809141159058,
0.8893334269523621,
-0.40670666098594666,
-... |
def train ( model, data, target, loss _ func, optimizer ) : model. train ( ) # initial optimizer optimizer. zero _ grad ( ) # net work will do forward computation defined in net's [ forward ] function output = model ( data ) # get predictions from outputs, the highest score's index in a vector is predict class predicti... | [
-0.09468170255422592,
-0.49871644377708435,
0.7161200046539307,
-0.2880336344242096,
-0.21135644614696503,
-0.3165678083896637,
0.831384539604187,
0.46843647956848145,
-0.5594655275344849,
-0.07398898154497147,
-0.10169564187526703,
0.8049044013023376,
1.2142940759658813,
0.235759928822517... |
def resolve _ query ( self, query _ obj, path, idx ) : result = false if self. timed _ out or self. is _ timed _ out ( ) : return false if not query _ obj or not query _ obj. predicates : return true resolution _ sentences = [ ] if idx > 0 : path _ len = len ( path [ : idx - 1 ] ) if path _ len > 0 : for i in range ( p... | [
-0.5298421382904053,
-0.2252124398946762,
0.9921749234199524,
0.42974957823753357,
-0.39922669529914856,
-0.5759936571121216,
-0.27791017293930054,
-0.21354793012142181,
-0.34070611000061035,
0.2688668668270111,
0.1261841356754303,
-0.8454439640045166,
-1.4226175546646118,
-0.0062383366748... |
def _ _ get _ scale _ set _ parameters ( self, session, name ) : # pylint : disable = no - self - use ssh _ public _ key = session. config ['ssh _ key _ value'] storage _ profile = {'os _ disk': {'os _ type':'linux ','caching':'readwrite ','create _ option':'fromimage ', } } if session. config ['use _ managed _ disks']... | [
-0.3380674123764038,
0.03900568559765816,
0.7389488220214844,
0.07171819359064102,
-0.05545375868678093,
-0.3201540410518646,
-0.5160927176475525,
-0.482791006565094,
-0.6339417695999146,
1.670822024345398,
-0.3582598567008972,
0.14853054285049438,
-0.2584919035434723,
0.37030330300331116,... |
def save _ result ( self, line ) : from.. db import database import time if line [ 5 ] [ " browser " ]! = " [ heuristic test ] " : target = line [ 6 ] poc = line [ 0 ]. replace ( "'", "'' " ) browsers = line [ 1 ] heuristic = self. heuris _ test. replace ( "'", "'' " ) t = time. strftime ('% y - % m - % d % h : % m : %... | [
-0.4399694502353668,
0.1903136819601059,
0.6694223284721375,
0.4213584363460541,
0.5612357258796692,
-0.11555338650941849,
-0.1006108969449997,
0.21088290214538574,
-0.3923669755458832,
0.4452073872089386,
-0.9642624258995056,
-1.1080297231674194,
-0.8028817772865295,
0.6145921945571899,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.