text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ unlabelled _ iterator ( self ) : unlabelled _ iterator = customiterator ( self. unlabelled _ dataset. dataset, batch _ size = self. hyper ['batch _ size'], shuffle = true, train = false, sort _ within _ batch = false, sort = false, device = self. device ) return unlabelled _ iterator | [
-0.12010718882083893,
-1.0441089868545532,
0.36225661635398865,
-0.8004578948020935,
-0.7056925296783447,
0.522796094417572,
0.21378441154956818,
0.5352972745895386,
0.20671647787094116,
-0.5542522668838501,
0.739757776260376,
1.4144923686981201,
-0.12726105749607086,
-0.1882530301809311,
... |
def p ( self, i = none ) : if ( i = = none ) : # no indices defined, return a numpy array return self. pbt [ :, 0 ] else : return self. pbt [ i, 0 ] | [
-0.5621539354324341,
-0.21854424476623535,
0.6474213004112244,
0.5727219581604004,
0.7583909630775452,
0.5982975959777832,
0.13216441869735718,
-0.3485281467437744,
0.5590857863426208,
0.11417771130800247,
0.4765186607837677,
-0.36608296632766724,
-1.727958083152771,
-0.43009957671165466,
... |
def order _ bfs ( adj _ list : list [ list [ int ] ], start : int ) - > list [ int ] : | [
-0.3004235327243805,
0.1037045568227768,
0.4567963778972626,
1.101793885231018,
0.619270920753479,
-0.3052886724472046,
-0.29169902205467224,
0.1490054577589035,
0.226376473903656,
0.9800945520401001,
-1.2269073724746704,
1.3477643728256226,
-0.2776639759540558,
0.20336732268333435,
-0.5... |
def get _ train _ instances ( train _ r, neg _ sample _ rate ) : # randomly sample negative samples mask = neg _ sampling ( train _ r, range ( train _ r. shape [ 0 ] ), neg _ sample _ rate ) user _ input, item _ input, labels = [ ], [ ], [ ] idx = np. array ( np. where ( mask = = 1 ) ) for i in range ( idx. shape [ 1 ]... | [
-1.3349528312683105,
-0.11876018345355988,
0.5914286971092224,
0.28116822242736816,
-0.3016223609447479,
0.8187885880470276,
-0.089177705347538,
0.05827242508530617,
-0.35676759481430054,
0.5553058385848999,
0.03771015629172325,
-0.46879851818084717,
0.06019885838031769,
-0.825593411922454... |
def _ initialize _ state ( self, var ) : vectorized _ shape = var. get _ shape ( ). num _ elements ( ), 1 return { key : tf. zeros ( vectorized _ shape ) for key in self. state _ keys } | [
-1.080628514289856,
0.33220672607421875,
0.3498513400554657,
-0.820794403553009,
-0.21462614834308624,
-0.9558519124984741,
0.010403350926935673,
-0.15364301204681396,
-0.061210405081510544,
0.6572331190109253,
-1.0292725563049316,
-0.4667111337184906,
0.45227184891700745,
0.39872431755065... |
def putfext ( * args ) : return _ snap. tstr _ putfext ( * args ) | [
-0.5470641255378723,
1.1113061904907227,
0.33037203550338745,
-0.21467605233192444,
0.17771916091442108,
-0.07760687172412872,
-0.5755820274353027,
-0.43522366881370544,
-0.8844041228294373,
-0.4445563554763794,
-1.1229100227355957,
-0.14072029292583466,
-0.7060296535491943,
0.771016776561... |
def parse _ from _ receipt _ dictionary ( self, unparsed _ list ) : receipts _ list = [ ] for each _ receipt in unparsed _ list ['results'] : receipts _ list. append ( each _ receipt ) buyer _ email _ list = [ ] for each _ entry in receipts _ list : buyer _ email _ list. append ( each _ entry ['buyer _ email'] ) return... | [
-0.4366624653339386,
-0.5557632446289062,
0.37727031111717224,
-0.6172397136688232,
0.15029378235340118,
0.17886698246002197,
-0.31564825773239136,
1.7665414810180664,
0.6521165370941162,
-0.17096075415611267,
-0.32308605313301086,
0.05856969207525253,
0.5534890294075012,
0.400949418544769... |
def can _ move _ r ( self, right _ m = none ) : if not right _ m : right _ m = self. get _ right ( ) pos = right _ m * self. gridsize + self. center _ pos [ 0 ] if self. x2 - pos > self. gridsize : pass else : return false for object in self. tetris _ o : posx, posy = object. xy _ to _ n ( self. xy _ to _ n ( ) ) if se... | [
-0.06626728922128677,
-0.35511288046836853,
0.8268903493881226,
0.9729350209236145,
-0.8313148021697998,
-0.002604342997074127,
0.16155624389648438,
-0.1451355218887329,
-0.5780707001686096,
0.42606645822525024,
-0.07697249203920364,
-0.4870544672012329,
-0.44859254360198975,
0.13446268439... |
def race ( self ) : while not self. started : self. _ wait _ and _ draw ( ) self. sim _ start = time. time ( ) while not self. finished : self. _ race _ and _ draw ( ) pygame. quit ( ) | [
0.06104680150747299,
0.2997353971004486,
0.6663584113121033,
0.1179315447807312,
0.5414350032806396,
0.43498626351356506,
0.4151284098625183,
-0.9293829202651978,
-0.3478829860687256,
-0.01132099237293005,
-0.1317964643239975,
0.2975999414920807,
-0.43532195687294006,
0.5004045963287354,
... |
def predict _ depth ( self, images _ path, batch _ size = default _ batch _ size ) : logger. debug ( " predict depth " ) if os. path. isfile ( images _ path ) : images _ path = [ images _ path ] else : # extract the whole content from the directory images _ path = glob. glob ( images _ path + " / * " ) # retain only fi... | [
-0.9630604386329651,
-0.004937753081321716,
0.6162988543510437,
0.10970718413591385,
0.5238875150680542,
-0.2508063018321991,
0.4669848084449768,
0.26574063301086426,
-0.2431536465883255,
-0.27302175760269165,
0.05010142922401428,
0.021632792428135872,
0.224720299243927,
0.6736631989479065... |
def get _ credentials ( ) : home _ dir = os. path. expanduser ('~') credential _ dir = os. path. join ( home _ dir, '. credentials') if not os. path. exists ( credential _ dir ) : os. makedirs ( credential _ dir ) credential _ path = os. path. join ( credential _ dir,'sheets. googleapis. com - python - quickstart. json... | [
0.42445138096809387,
-0.6439924240112305,
0.5135408639907837,
0.7424414753913879,
0.18779440224170685,
0.45132213830947876,
0.21762928366661072,
-0.2876844108104706,
0.37252184748649597,
-0.4920056462287903,
-0.5050439238548279,
0.3399544060230255,
-0.13978877663612366,
-0.0614616647362709... |
def simple _ text ( pval, pvalue _ format, pvalue _ thresholds, test _ short _ name = none ) : # sort thresholds thresholds = sorted ( pvalue _ thresholds, key = lambda x : x [ 0 ] ) # test name if passed text = test _ short _ name and test _ short _ name + " " or " " for threshold in thresholds : if pval < threshold [... | [
0.348761647939682,
-1.0529065132141113,
0.5941729545593262,
-0.15781541168689728,
-1.2993708848953247,
0.5900760293006897,
-1.2020361423492432,
-0.2712208032608032,
0.22607223689556122,
0.7655743360519409,
0.5043340921401978,
-0.09176672995090485,
-0.0075189718045294285,
-0.229536443948745... |
def show _ fact _ sheet _ c ( responses, derived ) : with _ you = 0 with _ spouse = 0 with _ both = 0 for child in derived ['children'] : if child ['child _ live _ with'] = ='lives with you': with _ you + = 1 elif child ['child _ live _ with'] = ='lives with spouse': with _ spouse + = 1 elif child ['child _ live _ with... | [
0.7545077800750732,
-0.7645612955093384,
0.6617823839187622,
-0.01729193888604641,
-0.3289228081703186,
0.8351281881332397,
0.4824008345603943,
0.46686312556266785,
-0.47752320766448975,
-0.6572462916374207,
-0.36671286821365356,
-0.20719003677368164,
0.6423900723457336,
0.8255071043968201... |
def targets ( self ) : return self. trainset. targets | [
-1.0616037845611572,
-0.7180926203727722,
0.44163036346435547,
0.077904611825943,
0.6821581125259399,
-0.19287030398845673,
-0.12449336796998978,
-0.3000771403312683,
-0.14484640955924988,
-0.9921226501464844,
0.566373884677887,
0.6685718894004822,
0.3559419512748718,
-0.7156779766082764,
... |
def _ _ init _ _ ( self, xaxis, yaxis, dmesh ) : self. fmesh = interp2d ( xaxis, yaxis, dmesh. t, kind ='cubic') self. xaxis = xaxis self. yaxis = yaxis | [
0.563191831111908,
0.6101972460746765,
0.5603301525115967,
-0.1322966068983078,
-0.015310661867260933,
0.1680935025215149,
-0.6513314843177795,
-0.35922762751579285,
-0.6533282399177551,
-1.624037265777588,
-0.3724987506866455,
0.3662770092487335,
0.578599750995636,
-0.26619502902030945,
... |
def tbpgraph _ load ( * args ) : return _ snap. tbpgraph _ load ( * args ) | [
-0.5750272274017334,
1.1671428680419922,
0.4201119542121887,
-0.611576497554779,
-0.15183612704277039,
0.12969616055488586,
0.47691330313682556,
-0.815221905708313,
-1.0278207063674927,
1.5279062986373901,
-0.8552280068397522,
-0.18973785638809204,
-1.2065157890319824,
-0.9128705263137817,... |
def l _ ux ( self, x, u, i, terminal = false ) : if terminal : return 0 self. quxs [ i ] = self. lagrange * self. u _ diffs [ i ]. dot ( self. u _ diffs [ i ]. t. dot ( self. pixs [ i ]. t ) ) * self. b0 / 4. return self. quxs [ i ] * 2. | [
0.13260024785995483,
-0.19338753819465637,
0.43695130944252014,
-0.9698541164398193,
-1.0177022218704224,
0.40482762455940247,
-0.5412922501564026,
0.4380691349506378,
0.6781133413314819,
-0.5155600905418396,
-0.5105090737342834,
0.3056908845901489,
-0.1774122714996338,
-0.5626452565193176... |
def doesnt _ raise ( function, message ='' ) : if not callable ( function ) : raise valueerror ( " doesnt _ raise should take a lambda " ) try : return function ( ) except exception as e : if message : raise assertionerror ( f " unexpected exception { e! r } : { message } " ) raise assertionerror ( f " unexpected excep... | [
0.6956925988197327,
0.7458341121673584,
0.4814687967300415,
0.17031711339950562,
-0.07368022203445435,
0.3692367672920227,
-0.18860210478305817,
0.4399420917034149,
0.17808681726455688,
-0.2483314573764801,
0.6393780708312988,
-0.1991480439901352,
-1.0034050941467285,
-0.37463271617889404,... |
def updated _ node ( node, data, template ) : db. begin ( ) result = updated _ node _ aux ( node, data, template [ list ( template. keys ( ) ) [ 0 ] ] ) if result is none : db. rollback ( ) return none else : db. commit ( ) return true | [
-0.6617578268051147,
0.2827254831790924,
0.57802814245224,
-0.9971932172775269,
-1.165334701538086,
-0.6203084588050842,
-0.8800983428955078,
0.5329923629760742,
-0.09480142593383789,
0.7593491077423096,
-0.6095563769340515,
-0.12942752242088318,
-0.7196898460388184,
-0.546224057674408,
... |
def test _ normal _ conditions _ shrink ( self, graph ) : adj = ( ( 0, 1, 0, 0, 0 ), ( 1, 0, 1, 1, 0 ), ( 0, 1, 0, 1, 0 ), ( 0, 1, 1, 0, 1 ), ( 0, 0, 0, 1, 0 ) ) graph = nx. graph ( 0. 5 * np. array ( adj ) ) # multiply by 0. 5 to follow weightings of adj fixture subgraph = strawberryfields. gbs. dense. greedy _ densit... | [
0.111362025141716,
0.5357734560966492,
0.7079164981842041,
0.39500319957733154,
-0.15391962230205536,
1.005101203918457,
0.6507408022880554,
-0.5212664604187012,
0.11715821921825409,
-0.025058405473828316,
0.7660700678825378,
-0.3652379512786865,
-0.8294399380683899,
-0.5241315364837646,
... |
def _ _ init _ _ ( self, * args, * * kwargs ) : super ( draft, self ). _ _ init _ _ ( * args, * * kwargs ) self. kivy _ state = kivy _ state _ variables ( ) if self. kivy _ state. selected _ address = ='' : if app. get _ running _ app ( ). identity _ list : self. kivy _ state. selected _ address = app. get _ running _ ... | [
-0.5306870341300964,
0.4104134440422058,
0.5067493915557861,
0.3142528533935547,
0.41971471905708313,
-0.6940473914146423,
-0.3694303333759308,
0.78789883852005,
0.5395102500915527,
0.07596094906330109,
0.2257162481546402,
0.3752171993255615,
-0.47329312562942505,
0.7265868186950684,
-0.... |
def test _ atomic _ qname _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 3. xsd ", instance = " nistdata / atomic ... | [
0.5487347841262817,
-0.5961250066757202,
0.4615616500377655,
-0.2821836471557617,
-0.6217641234397888,
0.476944237947464,
-0.506416916847229,
-0.8639125227928162,
0.5387230515480042,
0.5221205353736877,
-0.7325932383537292,
0.20736898481845856,
-0.29713740944862366,
-0.37043341994285583,
... |
def generate _ table ( data, columns ) : discharges = [ " 1 разр. ", " 2 разр. ", " 3 разр. " ] df = pd. dataframe ( data = data. t, index = range ( 1, 11 ), columns = pd. multiindex. from _ product ( [ columns, discharges ] ) ) df _ est = pd. dataframe ( data = [ [ round ( norm. fit ( col ) [ 1 ], 2 ) for col in data ... | [
-0.13215386867523193,
0.6279258728027344,
0.7188103795051575,
-0.31383705139160156,
0.33945173025131226,
-0.03515341505408287,
0.3329019248485565,
0.608410656452179,
-0.942391574382782,
-0.24925881624221802,
-0.1712687760591507,
0.31604790687561035,
0.43376386165618896,
0.1277635097503662,... |
def annual _ health _ related _ expenses ( responses, derived ) : try : return float ( responses. get ('annual _ health _ related _ expenses ', 0 ) ) except valueerror : return 0 | [
1.0426783561706543,
-0.7896902561187744,
0.41025570034980774,
-0.09544536471366882,
0.5018776059150696,
0.8536213040351868,
0.312747061252594,
0.23034635186195374,
1.2772270441055298,
-0.8364090919494629,
1.2432767152786255,
-0.27516117691993713,
0.4451378285884857,
-0.1768217235803604,
... |
def load _ img ( file _ name ) : full _ name = os. path. join ('resources ', file _ name ) try : image = pygame. image. load ( full _ name ) if image. get _ alpha ( ) is none : image = image. convert ( ) else : image = image. convert _ alpha ( ) except pygame. error as message : print ('cannot load image : ', full _ na... | [
-0.09025847911834717,
-0.09381085634231567,
0.7376479506492615,
-0.4860874116420746,
-0.4331608712673187,
0.537119448184967,
-0.25011879205703735,
0.14449678361415863,
-0.4319794774055481,
0.8147841691970825,
0.9950544238090515,
-0.8405147194862366,
-0.2503148019313812,
0.733913004398346,
... |
def adjust _ learning _ rate ( optimizer, lr ) : # lr = args. lr * ( 0. 1 * * ( epoch / / 30 ) ) for param _ group in optimizer. param _ groups : param _ group ['lr'] = lr | [
0.05953375622630119,
-0.2745895981788635,
0.4073795974254608,
-0.4166501462459564,
-0.005385196767747402,
0.5671223998069763,
-0.6559651494026184,
0.521377444267273,
-0.2751794159412384,
0.4532577097415924,
0.6616422533988953,
0.7199372053146362,
-0.16135534644126892,
1.059037208557129,
... |
def characters ( self, content ) : if self. _ collect _ characters : self. _ cur _ content. append ( content ) | [
-0.45567551255226135,
-0.9628365635871887,
0.3499968349933624,
-0.8637338876724243,
-0.42179423570632935,
0.7450035214424133,
-0.5177654027938843,
-0.8232720494270325,
-0.1372789740562439,
0.06438903510570526,
-0.19478338956832886,
0.2741442620754242,
-0.72557532787323,
-0.0086502535268664... |
def calculate _ injury _ multiplier ( json _ object ) : print ('# calculate _ injury _ multiplier ( { }... ) '. format ( json. dumps ( json _ object ) [ : 100 ] ) ) next _ round _ chance = json _ object [ " chance _ of _ playing _ next _ round " ] / 100 if json _ object [ " chance _ of _ playing _ next _ round " ] is n... | [
-1.2766233682632446,
-0.27022960782051086,
0.5573743581771851,
-0.6114000082015991,
-0.7388401627540588,
-0.8049535751342773,
0.7054955363273621,
-0.6951755285263062,
0.21502014994621277,
0.8077890872955322,
-0.24144579470157623,
-0.4483213424682617,
-0.3399707078933716,
-0.021905008703470... |
def makereading ( self ) : self. time = time # get distance from lidar sensor if not sim : self. distance = self. sensor. get _ distance ( ) # self. distance = random. uniform ( 0, 1200 ) # temporary for testing if ( self. adc = = 99 ) : self. direction = 99 else : self. direction = adc. read _ adc ( self. adc, gain = ... | [
-0.2795696258544922,
0.09179584681987762,
0.5683009028434753,
-1.1656337976455688,
-0.30354735255241394,
0.47492271661758423,
-0.12975665926933289,
0.08470774441957474,
0.7339648604393005,
0.08465021103620529,
0.6856476664543152,
-0.0262844767421484,
0.07052943110466003,
-0.548587739467620... |
def rlcsecdef _ download ( self, download = true ) : if download : self. download _ data ('rlcsecdef') | [
1.7462608814239502,
-0.4911303222179413,
0.2268369346857071,
1.2184034585952759,
0.11888957768678665,
-0.16376616060733795,
0.10135338455438614,
-0.1722557693719864,
0.1841718554496765,
-0.15942148864269257,
-0.6458721160888672,
0.0223547276109457,
-0.151690274477005,
0.8597390651702881,
... |
def rip _ to _ json ( freqdist, scores, limit = 20 ) : # initialize structure data = { " name " : " wordscores ", " children " : [ { " name " : " positive ", " children " : [ ] }, { " name " : " neutral ", " children " : [ ] }, { " name " : " negative ", " children " : [ ] } ] } scores = scores. head ( limit ) for row ... | [
-0.7081384062767029,
-0.40191465616226196,
1.1073654890060425,
-1.0133895874023438,
0.09586422890424728,
0.10373496264219284,
0.4175836443901062,
0.24216647446155548,
-0.31562837958335876,
0.7797108292579651,
-1.0026007890701294,
-0.019986992701888084,
0.3243712782859802,
-0.49805200099945... |
def test _ add _ to _ deleted _ not _ shared ( self ) : item = shareditem ( ) entry = {'feed _ link':'atom - deleted. xml'} item. assign _ feeds ( * * entry ) self. assertequal ( len ( item. feed _ type ), 0 ) self. asserttrue ('deleted'not in item. feed _ type ) | [
0.388749361038208,
0.09966310858726501,
0.45737984776496887,
0.4552634060382843,
1.7184743881225586,
1.1711106300354004,
-0.04460650309920311,
0.2489466369152069,
0.4031338393688202,
-0.6390483379364014,
-0.3974427580833435,
0.5682648420333862,
-0.875027596950531,
0.19855645298957825,
0.... |
def roll _ die ( num ) : freq = [ 0 ] * 6 # hexagonal die # empty list for roll in range ( num ) : n = random. randrange ( 1, 7 ) freq [ n - 1 ] + = 1 return freq | [
-0.7631054520606995,
0.7242470383644104,
0.5168259143829346,
0.33726757764816284,
0.0888495147228241,
-0.2283550351858139,
0.15593251585960388,
0.7771091461181641,
0.711920440196991,
-0.4297946095466614,
-0.6047481894493103,
-0.6299222111701965,
0.6543877720832825,
0.36071428656578064,
-... |
def predict _ proba ( self, x, * * kwargs ) : raise notimplementederror | [
-0.22666987776756287,
-0.07716641575098038,
0.6347892880439758,
1.3260290622711182,
-0.6533534526824951,
0.6699976325035095,
-0.9558691382408142,
-0.01107945665717125,
-0.26533934473991394,
-0.06380946934223175,
-0.45504292845726013,
0.293508917093277,
-0.04734887182712555,
0.1505480408668... |
def test _ size _ match ( ) : x = np. random. randn ( 100, 5 ) y = np. random. randint ( 0, 10, 50 ) summariser = protoselect ( eps = 0. 5, kernel _ distance = euclideandistance ( ) ) with pytest. raises ( valueerror ) : summariser. fit ( x = x, y = y ) | [
0.7052061557769775,
0.9998573064804077,
0.5221682190895081,
-0.22228144109249115,
0.13091214001178741,
0.6302258968353271,
0.0704418495297432,
-0.3824123442173004,
0.5399301648139954,
-0.08669514209032059,
-0.29907068610191345,
0.024835841730237007,
-0.41197773814201355,
-0.164738535881042... |
def assert _ allclose ( actual, desired, rtol = 1e - 7, atol = 1e - 7 ) : actual = np. asanyarray ( actual ) desired = np. asanyarray ( desired ) np. testing. assert _ allclose ( actual. shape, desired. shape ) np. testing. assert _ allclose ( actual, desired, rtol = rtol, atol = atol, verbose = true ) | [
0.028656089678406715,
-0.6059077978134155,
0.7265248894691467,
0.28227880597114563,
0.6631932854652405,
0.5626122355461121,
-0.529399037361145,
-0.7663193345069885,
-0.3841163218021393,
-0.2074790745973587,
0.989813506603241,
0.7955315113067627,
0.11622543632984161,
0.5029488801956177,
0... |
def array ( * args ) : tarray = ( ) for arg in args : tarray + = ( arg, ) return tarray | [
-0.7347416877746582,
-0.3908781409263611,
0.6866449117660522,
-0.4587858319282532,
1.7536929845809937,
0.5374439358711243,
-0.9720439314842224,
-0.14983002841472626,
-1.3181253671646118,
0.10532012581825256,
-0.07913710176944733,
0.3843906819820404,
-0.20645536482334137,
0.9860724210739136... |
def test _ factors ( self ) : # a dummy class, since the weakref dict required an object to index. class foo : pass # check a couple of different factory functions. for factory in [ list, set, dict ] : dset = weakref _ utilities. defaultweakkeydictionary ( factory ) obj = foo ( ) self. assertisinstance ( dset [ obj ], ... | [
-0.6866576671600342,
0.6386984586715698,
0.36205270886421204,
-0.6078979969024658,
0.5947790741920471,
-0.32505229115486145,
0.4580177962779999,
-0.5532754063606262,
0.47442466020584106,
-0.7061252593994141,
-0.36074382066726685,
0.8697492480278015,
0.1548854410648346,
0.483567476272583,
... |
def itksubtractconstantfromimagefilteriul2diul2 _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilteriul2diul2 _ cast ( * args ) | [
-0.07298162579536438,
-0.38427525758743286,
0.41069233417510986,
-0.9324451684951782,
-1.4043300151824951,
0.7582516074180603,
0.25183773040771484,
0.9696158766746521,
-0.02262713573873043,
-0.27474290132522583,
-0.6099157929420471,
1.073279619216919,
0.9308561682701111,
-0.577781021595001... |
def initialize ( self ) : batch _ size = self. encoder _ outputs. size ( 0 ) src _ len = self. encoder _ outputs. size ( 1 ) self. attention _ hidden = variable ( torch. zeros ( batch _ size, self. attention _ units ) ). to ( self. device ) self. decoder _ hiddens = [ variable ( torch. zeros ( batch _ size, self. decod... | [
0.03451065719127655,
0.2312970608472824,
0.5085617899894714,
-0.33419784903526306,
-0.00808833260089159,
-0.2974059283733368,
1.1266758441925049,
-0.5611960887908936,
-0.1761842668056488,
-0.3179020881652832,
-0.4749327301979065,
0.586277961730957,
0.19999733567237854,
1.084985613822937,
... |
def execute _ sample ( global _ config : configparser, sample _ config : configparser ) : # set up the configuration batch _ account _ key = global _ config. get ('batch ','batchaccountkey') batch _ account _ name = global _ config. get ('batch ','batchaccountname') batch _ service _ url = global _ config. get ('batch ... | [
0.9665108323097229,
-0.2106800526380539,
0.8644898533821106,
0.8886968493461609,
0.47457754611968994,
-0.08255884796380997,
-0.0033676568418741226,
-0.02717849239706993,
-0.9282571077346802,
0.7379392385482788,
-0.43610939383506775,
0.7061238288879395,
-0.9423081874847412,
-0.1205343827605... |
def cmtytest ( * args ) : return _ snap. cmtytest ( * args ) | [
0.1016998216509819,
-0.03174516186118126,
0.40459173917770386,
-0.3562678098678589,
0.23257051408290863,
0.10595707595348358,
0.6894042491912842,
-0.9008596539497375,
-0.16097933053970337,
-0.29902639985084534,
-1.19815194606781,
-0.7723901867866516,
-1.0955992937088013,
-0.162512868642807... |
def view _ workspace _ info ( request ) : # look for a workspace matching the session key session _ key = get _ session _ key ( request ) current _ workspace = savedworkspace. objects. filter ( session _ key = session _ key \ ). order _ by ('- modified'\ ). first ( ) # pull some session info, if there are any # if requ... | [
0.1915094554424286,
-0.5810086131095886,
0.5142909288406372,
-0.4492146670818329,
-0.895710825920105,
-0.3219332993030548,
0.9192618131637573,
-0.9390193819999695,
0.9840399622917175,
-0.1767839789390564,
0.3289909362792969,
0.14702847599983215,
0.0517311729490757,
0.2612377405166626,
-0... |
def build _ ins _ query ( table, columns, returns = none ) : qry ='insert into { table } { columns _ str } values { values _ str }'qry _ strs = {'columns _ str':'('+ ', '. join ( columns ) +') ','values _ str':'('+ ', '. join ( ('% ('+ col +') s'for col in columns ) ) +')'} if returns : qry + ='returning { returns _ st... | [
-0.3951781690120697,
0.06327687948942184,
0.5572417378425598,
-0.27086368203163147,
-0.25837719440460205,
-0.26111647486686707,
-0.6825740933418274,
-0.34407636523246765,
-0.5319969058036804,
-0.23284806311130524,
0.8421191573143005,
0.13589388132095337,
-0.7498059868812561,
-0.46585783362... |
def refresh ( ) : if choice _ button ['state'] = = disabled : choice _ button. config ( state = normal ) | [
0.1565239131450653,
-0.5059434175491333,
0.3871219754219055,
1.200001835823059,
-0.11990048736333847,
0.8940134644508362,
-0.5416954755783081,
0.7910311222076416,
0.8858461976051331,
1.3394758701324463,
-0.2996809184551239,
0.42895907163619995,
-0.15243691205978394,
-0.25898870825767517,
... |
def get _ logits ( self, batch _ samples ) : batch _ samples = torch. tensor ( batch _ samples, dtype = torch. long ) batch _ labels = batch _ samples. clone ( ) with torch. no _ grad ( ) : outputs = self. model _ obj ( batch _ samples, labels = batch _ labels ) return outputs. get ( " logits " ) | [
-0.33981794118881226,
-0.6759917736053467,
0.4226849377155304,
0.30375951528549194,
0.27669817209243774,
0.19925324618816376,
-0.5451122522354126,
-0.48611244559288025,
-0.05816083401441574,
0.24026422202587128,
-0.23923827707767487,
0.4239695072174072,
-0.49904516339302063,
-0.49343109130... |
def daqresult ( self ) : return self. _ daqresult | [
-1.0508219003677368,
0.45849722623825073,
0.2933267056941986,
-0.09163275361061096,
-0.26874756813049316,
-0.45694178342819214,
0.9329571723937988,
-0.7835336327552795,
0.29538312554359436,
-1.9097676277160645,
-0.4680836498737335,
-0.3724210262298584,
0.1482149362564087,
-0.92080831527709... |
def _ find _ all _ projects ( ) : zephyr _ projects = dict ( _ find _ zephyr _ ec _ projects ( ) ) legacy _ projects = dict ( _ find _ legacy _ ec _ projects ( ) ) # rename duplicate projects in zephyr as $ { project } _ zephyr. all _ projects = dict ( legacy _ projects ) for name, args in zephyr _ projects. items ( ) ... | [
-0.3525359034538269,
0.18441665172576904,
0.4836871325969696,
-0.26296892762184143,
-0.09828569740056992,
0.28476813435554504,
-0.39211446046829224,
0.2065889686346054,
-0.28915145993232727,
0.5500012636184692,
-0.4560392498970032,
-0.5912197232246399,
0.310016006231308,
1.0355324745178223... |
def auto _ delete _ file _ on _ delete ( sender, instance, * * kwargs ) : if instance. file : if os. path. isfile ( instance. file. path ) : if os. path. isfile ( instance. file. path ) : os. remove ( instance. file. path ) | [
1.2995412349700928,
-1.480284333229065,
0.6280843019485474,
0.4172120690345764,
0.5836496949195862,
0.1682717204093933,
1.0263547897338867,
0.619779109954834,
-0.2541698217391968,
-0.33533400297164917,
0.152147114276886,
-0.2561645209789276,
0.5633183121681213,
0.6317481994628906,
-0.902... |
def endei ( self, * args ) : return _ snap. tneanet _ endei ( self, * args ) | [
-0.6803051829338074,
1.1483819484710693,
0.17308831214904785,
0.3665285110473633,
1.1041011810302734,
0.3073606491088867,
0.7004269361495972,
-0.48464518785476685,
-1.420196294784546,
0.04080871865153313,
-0.16759072244167328,
-1.4047969579696655,
-0.9374092817306519,
0.27551597356796265,
... |
def getpositionasstring ( x, y ) : return str ( x ) +'n'+ str ( y ) +'e ' | [
-0.9701249003410339,
-1.184609055519104,
0.6147456169128418,
-1.1392830610275269,
-0.2997666001319885,
0.5550851821899414,
-1.7272827625274658,
-1.5608785152435303,
-0.18069900572299957,
0.770041823387146,
0.5393423438072205,
-0.9602629542350769,
0.42067089676856995,
-0.7067337036132812,
... |
def get ( self, request ) : form = cardamageform return render ( request, " add _ damage. html ", { " form " : form } ) | [
-0.18077223002910614,
-0.025965649634599686,
0.5968161225318909,
-0.9436177015304565,
0.4543355405330658,
-0.38386693596839905,
-1.407008171081543,
0.38943126797676086,
-0.4222680628299713,
-1.1637991666793823,
0.6087679266929626,
-0.35690638422966003,
0.028059305623173714,
-0.048262793570... |
def latextransformer ( ) - > transformerfunc : return partial ( traverse, transformation _ table = latex _ ast _ transformation _ table. copy ( ) ) | [
-0.053983259946107864,
-0.7466872930526733,
0.4943685233592987,
-0.22048991918563843,
-1.2410345077514648,
-0.7050674557685852,
-0.3881276249885559,
0.13247333467006683,
-0.4254390001296997,
-0.25254014134407043,
-0.4020778238773346,
-0.4240978956222534,
0.4499620199203491,
-0.431421279907... |
def prettify _ xml _ string ( xml _ string ) : # pylint : disable = e1123 return etree. tostring ( etree. fromstring ( xml _ string ), encoding = " unicode ", pretty _ print = true ) | [
1.110857605934143,
-0.7525487542152405,
0.0869360938668251,
-0.9379820823669434,
-1.290158748626709,
-0.4198366701602936,
-0.6014791131019592,
-0.20595112442970276,
0.5586308836936951,
-0.028315244242548943,
1.021331787109375,
0.2601361572742462,
0.11882194876670837,
-0.9268710613250732,
... |
def calibrate _ electrical _ delay ( init _ delay ) : d1 = init _ delay nwa. set _ electrical _ delay ( d1 ) fpts, mags, phases = nwa. take _ one ( ) slope1 = np. mean ( phases [ - 10 : ] ) - np. mean ( phases [ : 10 ] ) d2 = d1 + 1e - 9 nwa. set _ electrical _ delay ( d2 ) fpts, mags, phases = nwa. take _ one ( ) slop... | [
0.062209855765104294,
-0.24901652336120605,
0.6350114345550537,
-0.881595253944397,
-0.34714561700820923,
0.7501926422119141,
0.3657453656196594,
-0.04650489240884781,
-0.18971729278564453,
-0.13200496137142181,
0.294398695230484,
0.22041037678718567,
0.38771921396255493,
0.415253311395645... |
def searchvforw ( self, * args ) : return _ snap. tintfltkdv _ searchvforw ( self, * args ) | [
0.026491163298487663,
0.7668922543525696,
0.3393497169017792,
0.28259921073913574,
-0.13693132996559143,
-0.42506155371665955,
-0.10881106555461884,
-0.7834880352020264,
-0.8512082695960999,
-0.45380860567092896,
0.5362959504127502,
-0.38545840978622437,
0.09569398313760757,
1.495037198066... |
def build _ hooks ( train _ dir, property _ map ) : hook _ objects = [ ] hook _ objects + = build _ logging _ hooks ( train _ dir, property _ map ) hook _ objects + = build _ schedule _ hook ( ) hook _ objects + = build _ stopping _ hooks ( ) return hook _ objects | [
-1.242023229598999,
-0.638013482093811,
0.5992639064788818,
1.240408182144165,
0.9801152944564819,
0.7238550186157227,
0.4097537100315094,
-0.024692948907613754,
-0.7527655959129333,
-0.13087141513824463,
0.3740738332271576,
0.36624476313591003,
0.33149173855781555,
-0.9880783557891846,
... |
def make _ det _ data ( reference, ratios ) : assert ( len ( reference ) = = len ( ratios ) ) num _ pos = reference. count ( 1 ) num _ neg = reference. count ( 0 ) assert ( num _ pos + num _ neg = = len ( reference ) ) full _ result = [ ] # find the list of interesting threshholds, which is any value in # the list of r... | [
0.5940415263175964,
0.17197665572166443,
0.8928496837615967,
-0.35320430994033813,
0.13669033348560333,
-0.08911692351102829,
-0.1449851393699646,
-0.4131072759628296,
0.21447259187698364,
0.31840574741363525,
-0.06115320697426796,
-0.19112777709960938,
-0.1638965904712677,
0.0354565009474... |
def updateallmenus ( self, dmgr = none ) : self. _ clearmenu ( self ) self. modelsubmenus = { } if dmgr is none : # dmgr = state. finddatamodelmgr ( self. state ) dmgr = self. state. datamodelmgr if dmgr is not none : if dmgr. getdatamodelcount ( ) = = 1 : self. modelsubmenus ['self'] = self self. datamodel = dmgr. get... | [
-0.84173983335495,
0.09298180788755417,
0.7669225335121155,
-0.09898601472377777,
-0.8861237168312073,
0.40483522415161133,
0.13902035355567932,
0.48480522632598877,
-0.32257235050201416,
-0.0913371592760086,
-0.9146122932434082,
-0.23863734304904938,
0.47559675574302673,
1.548564314842224... |
def tstrpool64 _ load ( * args ) : return _ snap. tstrpool64 _ load ( * args ) | [
-1.1040674448013306,
-0.0802108570933342,
0.14696885645389557,
-0.7017831206321716,
-0.425914466381073,
-0.0984158143401146,
0.5299185514450073,
0.584461510181427,
-1.0282989740371704,
0.5910263061523438,
-0.37627872824668884,
-0.8056874871253967,
-0.24370186030864716,
-0.26139160990715027... |
def test _ compiles _ regexstr _ that _ was _ already _ compile ( ) : rule _ obj = rule ( " 1 ", re. compile ( " now " ), " a. txt ", " a. txt ", " 0 " ) actual = rule _ obj. _ coerce _ source _ matchpattern _ as _ compiled _ regex ( ) expected = rule ( " 1 ", re. compile ( " now " ), " a. txt ", " a. txt ", " 0 " ) as... | [
-0.011951644904911518,
-0.9566168785095215,
0.48100969195365906,
0.3466080129146576,
1.1182489395141602,
0.19497860968112946,
0.444703608751297,
0.13280561566352844,
0.5768269896507263,
-0.9121755957603455,
-0.9279042482376099,
0.8164339661598206,
0.0960562527179718,
0.4224168062210083,
... |
def receive _ msg ( self, socket ) : msg = socket. recv ( 1024 ). decode ('ascii') print ( f " received message : { msg } " ) return msg | [
0.21474766731262207,
0.2865580916404724,
0.37771251797676086,
-0.8923495411872864,
-0.1855916529893875,
-0.2825900614261627,
-0.8190523982048035,
-0.1716049760580063,
-0.4204850494861603,
-0.4625500738620758,
-0.24039636552333832,
1.0826106071472168,
-0.30352601408958435,
0.112852275371551... |
def scan _ csv ( file : union [ str, path ], has _ headers : bool = true, ignore _ errors : bool = false, sep : str = ", ", skip _ rows : int = 0, stop _ after _ n _ rows : " optional [ int ] " = none, cache : bool = true, dtype : " optional [ dict [ str, datatype ] ] " = none, ) - > " lazyframe " : if isinstance ( fil... | [
-0.0012738804798573256,
1.0534796714782715,
0.5498954653739929,
0.3934677541255951,
-1.2400761842727661,
-1.079460859298706,
-0.002096550539135933,
-0.45384183526039124,
0.6056097745895386,
-1.0074492692947388,
0.11500097811222076,
0.4307502508163452,
0.1852034479379654,
-0.139301165938377... |
def getdat ( self, * args ) : return _ snap. tstrvstrvhi _ getdat ( self, * args ) | [
0.4472227096557617,
-0.045310128480196,
0.3813396692276001,
-0.69362872838974,
0.8217629194259644,
0.25995466113090515,
0.6864144206047058,
-0.05854173004627228,
-0.7171049118041992,
-0.1273994743824005,
-0.3601545989513397,
-0.1212039440870285,
-0.034148938953876495,
-0.16152551770210266,... |
def loss ( self, outputs, targets, loss _ weights = none ) : assert len ( outputs ) = = 1 and len ( targets ) = = 1 return f. mean ( f. softmax _ cross _ entropy ( outputs [ 0 ], targets [ 0 ] ) ) | [
-0.5448458194732666,
-0.1500859409570694,
0.5780897736549377,
1.274218201637268,
-0.12036848068237305,
-0.8656454086303711,
-0.13818049430847168,
-0.13719472289085388,
-0.3043202757835388,
0.5678409934043884,
1.0195099115371704,
-0.045445576310157776,
0.08617886155843735,
0.023340947926044... |
def free _ port ( ) : # this method is copied from espnet v2's utility below. # https : / / github. com / espnet / espnet / blob / 43ce0c69fb32961235534b348700dc6c74ad5792 / espnet2 / train / distributed _ utils. py # l187 - l198 with socket. socket ( socket. af _ inet, socket. sock _ stream ) as sock : sock. bind ( ( ... | [
0.7964003086090088,
0.36376333236694336,
0.794498085975647,
-1.2051072120666504,
-0.912234902381897,
-0.518621563911438,
0.6236953735351562,
-0.9232338666915894,
-0.3589227795600891,
-0.22116178274154663,
0.5699712038040161,
0.524539589881897,
-1.0503021478652954,
-0.4334700107574463,
-0... |
def button _ reg _ cancel ( self, cr, uid, ids, * args ) : registrations = self. browse ( cr, uid, ids ) self. history ( cr, uid, registrations, _ ('cancel') ) return self. write ( cr, uid, ids, {'state':'cancel'} ) | [
-0.6672136187553406,
0.07530077546834946,
0.28582534193992615,
0.3955446183681488,
0.4836973249912262,
-0.23051384091377258,
0.9401992559432983,
1.375641942024231,
0.6577192544937134,
0.7493647933006287,
-0.3773387372493744,
0.21878919005393982,
0.2992163300514221,
-0.1756153702735901,
-... |
def itksubtractconstantfromimagefilterif3dif3 _ superclass _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterif3dif3 _ superclass _ cast ( * args ) | [
1.1829520463943481,
1.1088438034057617,
0.46044668555259705,
-0.38098785281181335,
-0.5523277521133423,
0.7521780133247375,
-0.1851867437362671,
0.8334102034568787,
0.4476132094860077,
-0.18818144500255585,
-0.7357158660888672,
-0.23932281136512756,
-0.4484753906726837,
-0.3273546397686004... |
def match ( # type : ignore [ override, unused - ignore ] self, patterns : str | sequence [ str ], *, flags : int = 0, limit : int = _ wcparse. pattern _ limit, exclude : str | sequence [ str ] | none = none ) - > bool : return self. globmatch ( patterns, flags = flags | _ rtl, limit = limit, exclude = exclude ) | [
0.26632219552993774,
0.49626731872558594,
0.8207808136940002,
-0.09389273077249527,
-0.5314170122146606,
1.1675604581832886,
0.49789080023765564,
0.07832459360361099,
0.6439499258995056,
-0.345139741897583,
-0.007088483776897192,
0.020665859803557396,
-1.3595843315124512,
-0.22096711397171... |
def genthermaldiff ( k, p, c, t ) : return k ( t ) / ( p ( t ) * c ( t ) ) | [
0.35993319749832153,
-0.5425373911857605,
0.466644823551178,
-0.61279296875,
0.1467033177614212,
1.670172095298767,
-0.6229661703109741,
0.7039141058921814,
-1.9131443500518799,
0.5241071581840515,
-0.0721302330493927,
-0.7404768466949463,
-0.0002284310758113861,
-0.14911095798015594,
-0... |
def vgg13 ( num _ classes = 10 ) : model = vgg ( cfg ['vgg13'], num _ classes ) return model | [
-0.08857394754886627,
1.326810598373413,
-0.025158971548080444,
0.7362009882926941,
0.42267876863479614,
0.22521661221981049,
-0.5149107575416565,
0.379448801279068,
0.5049388408660889,
0.2433270663022995,
-0.452993780374527,
-0.2370901107788086,
-0.5707864165306091,
-0.2257395088672638,
... |
def _ move _ piece ( self, position, piece ) : cpiece = self. _ board [ position. x ] [ position. y ] if cpiece and cpiece. is _ alife ( ) : raise boarderror ( " can't move piece on square containing an active piece " ) self. _ board [ piece. x ] [ piece. y ] = none self. _ board [ position. x ] [ position. y ] = piece... | [
0.20850449800491333,
-0.7280664443969727,
0.5074602365493774,
-0.2132311910390854,
-1.0294004678726196,
-0.4633716642856598,
0.2179044932126999,
-0.3820549249649048,
-0.32797467708587646,
1.0297058820724487,
0.17988890409469604,
-0.34126561880111694,
-0.9842326641082764,
-1.065375447273254... |
def construct _ base _ string ( http _ method, base _ string _ uri, normalized _ encoded _ request _ parameters ) : # the signature base string is constructed by concatenating together, # in order, the following http request elements : # 1. the http request method in uppercase. for example : " head ", # " get ", " post... | [
-0.26435601711273193,
-0.8758598566055298,
0.758145272731781,
-0.17012962698936462,
-0.6502382755279541,
-0.24418455362319946,
-0.09315228462219238,
-0.7475640773773193,
-0.3344862461090088,
0.7518370747566223,
0.5296228528022766,
0.26484835147857666,
-0.7112922072410583,
-0.68502265214920... |
def colmul ( self, * args ) : return _ snap. ttable _ colmul ( self, * args ) | [
-1.0033832788467407,
0.9422157406806946,
0.455971360206604,
0.6548476219177246,
0.4175315797328949,
0.4246622920036316,
0.5571682453155518,
0.07172821462154388,
-0.7251834273338318,
0.8302712440490723,
-0.6054202318191528,
-0.8869537115097046,
0.1093391552567482,
0.03808707371354103,
0.0... |
def die _ with _ usage ( self, msg = none, exit _ code = 2 ) : if msg! = none : print > > sys. stderr, msg self. print _ help ( sys. stderr ) sys. exit ( exit _ code ) | [
0.3052884340286255,
0.08934829384088516,
0.6217628121376038,
0.5137580037117004,
0.9482020139694214,
-0.27339640259742737,
0.03645686060190201,
0.14515726268291473,
-0.11721314489841461,
0.22848843038082123,
1.0453170537948608,
0.11873327940702438,
0.5399881601333618,
1.1330448389053345,
... |
def vote _ classify ( train, train _ label ) : # create the sub models estimators = [ ] model1 = classifier _ init ( " svm " ) estimators. append ( ('svm ', model1 ) ) model2 = classifier _ init ( " gb " ) estimators. append ( ('gb ', model2 ) ) model3 = classifier _ init ( " tree " ) estimators. append ( ('tree ', mod... | [
0.260416179895401,
0.1861989051103592,
0.3752360939979553,
0.44369956851005554,
0.6452968716621399,
0.6151579022407532,
-1.0512011051177979,
0.618882417678833,
-0.7956709861755371,
1.056320071220398,
-0.18183253705501556,
1.0617121458053589,
-0.12011408805847168,
-0.3588881492614746,
0.0... |
def _ _ init _ _ ( self, * args ) : _ snap. tintprstrhi _ swiginit ( self, _ snap. new _ tintprstrhi ( * args ) ) | [
-0.34813642501831055,
0.18249966204166412,
0.2341485470533371,
-0.2641160786151886,
-0.38008296489715576,
0.027533000335097313,
-0.08635389804840088,
-0.8580459952354431,
-0.5570909380912781,
0.3141025900840759,
-1.133175015449524,
0.15428103506565094,
-1.2564218044281006,
0.99408024549484... |
def practice ( request ) : if subcription _ status ( request ) = = true : submessage = " you have premimum access. you can always head towards my folders section to store unlimited amount of files " else : submessage = " " return render ( request,'codes / practice. html ', { " code _ display " : " your code here ", " s... | [
0.38078171014785767,
0.8543155193328857,
0.7315373420715332,
0.4625262916088104,
0.24841488897800446,
-0.18737724423408508,
0.52584308385849,
0.6904605031013489,
0.7901734113693237,
-0.43099984526634216,
1.3509678840637207,
0.06230040267109871,
-0.28801229596138,
0.46101832389831543,
-0.... |
def items ( self ) : ts = filestoragemanagersingleton. get ( self. _ id ) return ts. items ( ) | [
-0.4101543128490448,
-0.3084046542644501,
0.34948214888572693,
-0.1748594343662262,
0.7153074145317078,
-0.9307916164398193,
-1.027241826057434,
-0.02892949990928173,
-0.14202216267585754,
-0.5112285614013672,
-0.6737059354782104,
-0.10198941081762314,
0.6100254058837891,
-0.13596090674400... |
def test _ would _ schedule _ init _ raise _ missing ( self, app _ setup _ to _ add _ job ) : with pytest. raises ( typeerror ) : schedule = models. schedule ( * * self. active _ schedule _ skeleton ) with pytest. raises ( typeerror ) : schedule = models. schedule ( schedule _ type = constants. schedule _ monthly, star... | [
0.6227294206619263,
-0.08571834862232208,
0.40456995368003845,
1.0466599464416504,
0.4278373718261719,
0.6026037335395813,
-0.14247280359268188,
-0.4850481152534485,
-0.16988152265548706,
-0.12435290217399597,
-0.2143281102180481,
0.2549688220024109,
-0.5163226127624512,
0.731972336769104,... |
def state _ attributes ( self ) : attr = { attr _ known _ faces : self. known _ faces, attr _ total _ faces : self. total _ faces, } return attr | [
-0.7532256245613098,
-0.7351363301277161,
0.4447547495365143,
-0.9171721935272217,
-0.8476617932319641,
-0.5114974975585938,
1.0834707021713257,
0.005449666175991297,
0.30478158593177795,
0.4562850296497345,
-0.947177529335022,
-0.4401973485946655,
1.2731691598892212,
0.41691461205482483,
... |
def addbacksorted ( self, * args ) : return _ snap. tintintvv _ addbacksorted ( self, * args ) | [
-0.9761672616004944,
0.47932490706443787,
0.6993381381034851,
0.5674623250961304,
0.636206328868866,
-0.43151259422302246,
0.3085137605667114,
-0.9159122109413147,
-0.18403972685337067,
-0.5776880383491516,
-0.5386219620704651,
0.6852641105651855,
-2.3375208377838135,
0.027772068977355957,... |
def header _ source _ parse ( self, sourcelines ) : raise notimplementederror | [
-0.43829041719436646,
-0.5949135422706604,
0.4468734860420227,
0.017666811123490334,
-0.19023962318897247,
0.4806961715221405,
-0.3507276177406311,
0.04137697070837021,
0.5164348483085632,
0.07509223371744156,
-0.3650597631931305,
-0.799299955368042,
0.10923346877098083,
0.235260009765625,... |
def get _ transactions ( self, user, shop _ id, number _ of _ transactions ) : endpoint ='/ shops / % s / transactions'% shop _ id params = {'shop _ id': shop _ id,'limit': number _ of _ transactions } if user = ='_ _ self _ _': auth = {'oauth': self. full _ oauth } response = self. execute ( endpoint, params = params,... | [
-0.5965274572372437,
0.817024827003479,
0.5239333510398865,
0.8273981809616089,
-0.06955917924642563,
-1.4038275480270386,
-0.4432031214237213,
-1.1897536516189575,
0.9341267347335815,
-0.02132827416062355,
-0.5766587853431702,
0.743012547492981,
0.321462482213974,
-0.39989200234413147,
... |
def get _ meta _ args ( self ) : args = [ ] if self. meta _ pgp _ 5 _ compatible : args. extend ( ['- - compress - algo ','1 ','- - force - v3 - sigs'] ) if self. meta _ pgp _ 2 _ compatible : args. append ('- - rfc1991') if not self. meta _ interactive : args. extend ( ['- - batch ','- - no - tty'] ) return args | [
-0.561730146408081,
0.320100873708725,
0.6568947434425354,
0.5317444801330566,
0.6485669016838074,
0.7197012305259705,
-0.9485252499580383,
-0.13558481633663177,
-1.0118732452392578,
1.1856268644332886,
-0.02930510602891445,
0.6154475808143616,
-0.046625617891550064,
0.375642329454422,
-... |
def train _ knn _ model ( best _ nodes, x _ train _ scaled, y _ train ) : clf = kneighborsclassifier ( n _ neighbors = best _ nodes [ " n _ neighbors " ], weights = best _ nodes [ " weights " ], algorithm = best _ nodes [ " algorithm " ], p = best _ nodes [ " p " ] ) clf. fit ( x _ train _ scaled, y _ train ) print ( c... | [
0.2108982801437378,
0.002365019405260682,
0.4789332449436188,
0.2284042239189148,
0.9185534715652466,
0.12114576250314713,
-1.0584936141967773,
0.29865363240242004,
-1.3638269901275635,
0.4799516499042511,
-0.47440099716186523,
0.5425794720649719,
0.48058047890663147,
-0.43669459223747253,... |
def concatenate ( self, handler : " handler " ) : self. message. concatenate ( handler. message ) self. chat _ message. concatenate ( handler. chat _ message ) self. message _ handler. concatenate ( handler. message _ handler ) self. event. rules + = handler. event. rules if not self. _ pre _ p : self. _ pre _ p = hand... | [
-0.04467782750725746,
-0.012859034352004528,
0.6176162958145142,
0.28909406065940857,
0.21320097148418427,
1.3348972797393799,
0.3251396417617798,
0.13980695605278015,
-0.6705064177513123,
-0.7755239605903625,
-0.5859448313713074,
0.367622971534729,
0.425746351480484,
1.3824069499969482,
... |
def test _ initial ( self ) : field = omnidatefield. _ meta. get _ field ('initial _ data') self. assertisinstance ( field, models. datefield ) self. asserttrue ( field. blank ) self. asserttrue ( field. null ) | [
0.6102955937385559,
0.2890254557132721,
0.4923833906650543,
0.04238208383321762,
0.4396674633026123,
1.3485960960388184,
-0.42126139998435974,
0.4705958962440491,
0.7308620810508728,
-0.797889232635498,
-0.7326438426971436,
0.20129671692848206,
-0.059276267886161804,
0.3754235804080963,
... |
def update ( self, * args ) - > none : pass | [
-0.7994635701179504,
-1.146889090538025,
0.08379273861646652,
0.6016094088554382,
0.8899831771850586,
0.7604681253433228,
0.6293858289718628,
0.030306203290820122,
-0.9000898003578186,
-0.33364248275756836,
-0.30612972378730774,
0.136720210313797,
-1.1026369333267212,
0.06215359643101692,
... |
def get _ addons _ for _ list ( event, users ) : addons = addon. objects. none ( ) for user in users : addons = addons | get _ available _ addons ( event, user ) addons = addons | get _ available _ addons ( event, anonymoususer ( ) ) # return the queryset return addons | [
-0.11516638845205307,
-0.35104215145111084,
0.5490656495094299,
1.668868899345398,
0.2503682076931,
0.3140648901462555,
-0.7802841067314148,
0.008552737534046173,
0.7049490213394165,
0.6296980381011963,
-0.9527074098587036,
0.5819634795188904,
-0.33610907196998596,
0.5206168293952942,
-0... |
def get ( self, request ) : res _ inq _ all = clientask. objects. all ( ) return render ( request, " res _ inq _ all. html ", { " res _ inq _ all " : res _ inq _ all } ) | [
0.5396250486373901,
-0.4631889760494232,
0.38599884510040283,
-0.13435634970664978,
-0.670944333076477,
0.3022283613681793,
-0.2777425944805145,
0.4059078097343445,
-1.1873823404312134,
-0.07351677119731903,
0.35998982191085815,
-0.46366506814956665,
0.16793334484100342,
0.1698649376630783... |
def weighted _ astar _ search ( problem, h = none, weight = 1. 4 ) : h = h or problem. h return best _ first _ search ( problem, f = lambda n : g ( n ) + weight * h ( n ) ) | [
0.40084749460220337,
-0.12629267573356628,
0.30096912384033203,
1.3324058055877686,
-0.4969014823436737,
0.09238682687282562,
-0.17591308057308197,
-0.2910864055156708,
-0.4441826641559601,
0.04479840770363808,
1.1698822975158691,
-0.7663108110427856,
-0.431906521320343,
1.4700744152069092... |
def getidvsattre ( self, * args ) : return _ snap. tneanet _ getidvsattre ( self, * args ) | [
-0.8444032669067383,
0.677811861038208,
0.30178186297416687,
-0.48125872015953064,
0.8589117527008057,
-1.348179817199707,
-0.25638216733932495,
-1.1827096939086914,
0.2564297914505005,
-0.35372188687324524,
0.8189347386360168,
-0.4691593050956726,
-1.4430067539215088,
-0.3380647897720337,... |
def get _ score ( self ) : if self. max _ score = = - 1 : highest _ score = self. histogram. most _ common ( 1 ) if len ( highest _ score ) > 0 : self. max _ score = highest _ score [ 0 ] [ 1 ] return self. max _ score else : return - 1 else : return self. max _ score | [
0.030357828363776207,
0.3270614743232727,
0.6679865717887878,
1.205264925956726,
1.1341029405593872,
-0.24651671946048737,
-0.05278414860367775,
0.8395171165466309,
-0.08150089532136917,
0.29971376061439514,
0.6346970796585083,
-0.2660822868347168,
-0.8918701410293579,
0.32176363468170166,... |
def _ get _ networking _ facts ( self, cfg, device ) : # get networking facts puppetdb _ url = " / ". join ( [ cfg [ " puppetdb " ] [ " url " ], " v1 / facts ", " { } ", device. name ] ) response = requests. get ( puppetdb _ url. format ( " networking " ), verify = cfg [ " puppetdb " ] [ " ca _ cert " ] ) if response. ... | [
-0.3885761499404907,
0.21498766541481018,
0.3490668535232544,
-0.4417175054550171,
0.6382315158843994,
0.16181622445583344,
-0.4344176948070526,
-0.6361312866210938,
-0.9670812487602234,
-0.4389573931694031,
-0.5829411149024963,
-0.13563856482505798,
-0.4040129482746124,
0.627441942691803,... |
def test _ add _ offspring _ callable ( self ) : self. cell. add _ offspring ( carnivore ( ) ) | [
-0.29069310426712036,
0.6006869077682495,
0.3739311695098877,
1.1057569980621338,
0.18238531053066254,
0.22187539935112,
-0.5317803621292114,
0.06014126539230347,
-0.3089165985584259,
-0.7663658261299133,
-0.7896751761436462,
0.0732845738530159,
0.24757608771324158,
0.08165853470563889,
... |
def getusfromyuascii ( * args ) : return _ snap. tch _ getusfromyuascii ( * args ) | [
0.3762015104293823,
0.7562474608421326,
0.39404958486557007,
0.3068431317806244,
0.24610744416713715,
0.23072098195552826,
0.7228381633758545,
-0.12583062052726746,
-0.6549435257911682,
-0.2201496809720993,
-0.7507131695747375,
0.5133928060531616,
0.24639667570590973,
-0.22762227058410645,... |
def _ action _ enqueuedao ( self ) : assert not self. mote. dagroot assert self. mote. dodagid! = none # abort if not ready yet if self. mote. clear _ to _ send _ ebs _ data ( ) = = false : return # create newdao = {'type': d. pkt _ type _ dao,'app': {'child _ id': self. mote. id,'parent _ id': self. of. get _ preferre... | [
0.2809869349002838,
0.4955887496471405,
0.7354531288146973,
-0.5765449404716492,
0.25948455929756165,
-0.42105382680892944,
-0.16312064230442047,
-0.2058703750371933,
0.8988417983055115,
-0.02683604508638382,
-0.787388026714325,
0.3282454013824463,
0.968684732913971,
0.5744794607162476,
... |
def reservenidoutdeg ( self, * args ) : return _ snap. tngraphmp _ reservenidoutdeg ( self, * args ) | [
-0.08039211481809616,
0.27355650067329407,
0.21021871268749237,
-0.9141721725463867,
0.893487811088562,
0.103951096534729,
0.49456924200057983,
-0.7908110022544861,
-0.8249960541725159,
-0.372861385345459,
-0.5866219997406006,
-0.7724021077156067,
-0.7684882879257202,
0.12803667783737183,
... |
def getrndnid ( self, * args ) : return _ snap. tneanet _ getrndnid ( self, * args ) | [
0.2766633927822113,
0.44628170132637024,
0.33480727672576904,
0.27747300267219543,
0.33234137296676636,
0.6092067956924438,
-0.2784472703933716,
-0.39078783988952637,
-0.6476461291313171,
-0.3877311944961548,
-0.29613402485847473,
-0.2267419993877411,
-0.386207640171051,
1.1112655401229858... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.