text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ build _ caption _ processing _ net ( embedded _ input, reuse = true, keep _ ph = none ) : with tf. variable _ scope ('caption / reading ', reuse = reuse ) : if keep _ ph is not none : cell = lambda : tf. contrib. rnn. dropoutwrapper ( tf. contrib. rnn. basiclstmcell ( config ['hidden _ size'] ), output _ keep _ p... | [
-0.006081594154238701,
-0.03976396843791008,
0.7674586176872253,
0.3404557704925537,
0.014186999760568142,
0.009258851408958435,
0.4425000548362732,
0.2862842082977295,
-0.2588958740234375,
0.420385479927063,
-0.03146287053823471,
-0.2408384382724762,
0.42033007740974426,
-0.00271955039352... |
def _ obtain _ skus ( ) : skus = [ ] for product in shopify. product. find ( ) : for variant in product. variants : variant _ dict = json. loads ( variant. to _ json ( ). decode ('ascii') ) ['variant'] if variant _ dict ['inventory _ management'] = ='shopify': skus. append ( variant _ dict ['sku'] ) return skus | [
-0.7658271193504333,
-0.056043338030576706,
0.16523432731628418,
1.0373414754867554,
0.6755587458610535,
-0.4697425067424774,
-0.6123431324958801,
-0.10594947636127472,
0.42355942726135254,
1.0780363082885742,
-0.37788262963294983,
0.0260495413094759,
0.5630959272384644,
0.0709536150097847... |
def lock _ status ( self ) : self. _ lock _ status = true | [
0.5948106050491333,
-0.179631769657135,
0.40911704301834106,
0.1084095686674118,
0.26617252826690674,
1.2006430625915527,
-0.3223685026168823,
1.0346088409423828,
-0.25563567876815796,
-0.7206056118011475,
-1.0404216051101685,
1.056072473526001,
0.12626177072525024,
-0.12725158035755157,
... |
def _ openskymotebridge ( self, device ) : d = skymote. bridge ( autoopen = false ) d. loadgenericdevice ( device ) self. devicecountsbytype [ 0x501 ] + = 1 print " opened d = ", d d. modbusportnum = self. nextmodbusport d. spontportnum = self. nextspontport self. devices [ d. serialnumber ] = d se = skymoteexchanger (... | [
-0.5092914700508118,
0.6637555360794067,
0.4524954557418823,
-0.17010505497455597,
-0.2344452291727066,
0.6096194982528687,
0.7750905156135559,
-0.14378507435321808,
1.3738112449645996,
-0.48335206508636475,
-0.4417957663536072,
0.6351044178009033,
-1.0010359287261963,
0.6367649435997009,
... |
def wait _ for _ strs ( ser, strs, timeout = 0 ) : started = int ( time. time ( ) ) _ buffer ='' while true : res = ser. readall ( ) _ buffer + = res for s in strs : if s in res : return _ buffer if timeout : elapsed = int ( time. time ( ) ) - started if elapsed > = timeout : return'cme error : timeout ' | [
0.026866069063544273,
-0.7231295704841614,
0.34992915391921997,
-0.549186110496521,
-0.9215134382247925,
0.06513707339763641,
-0.9217770099639893,
-0.2056911140680313,
-0.0729643926024437,
0.13300199806690216,
0.621371865272522,
0.29296407103538513,
-0.8858031630516052,
-0.3769259750843048... |
def write ( filename, solutions, dt ) : nr = len ( solutions ) f = open ( filename,'w') nt = len ( solutions [ 0 ] ) f. write ('# % d % g % d \ n'% ( nt, dt, nr ) ) for i in range ( nr ) : f. write ('\ n '. join ( ['% e'% si for si in solutions [ i ] ] ) ) f. write ('\ n \ n \ n') | [
-0.20254652202129364,
-0.19897927343845367,
0.6226859092712402,
0.1291872262954712,
0.9716473817825317,
0.9820981621742249,
0.5465613007545471,
-0.35932937264442444,
-0.7578452825546265,
0.13628198206424713,
-0.3949945867061615,
-0.8414327502250671,
0.7477079629898071,
0.28532877564430237,... |
def _ mgui _ get _ orientation ( self ) - > str : if isinstance ( self, qtw. qhboxlayout ) : return " horizontal " else : return " vertical " | [
0.004722828045487404,
0.02292649820446968,
0.47462475299835205,
0.37643861770629883,
-0.7432710528373718,
0.5465020537376404,
-0.33695462346076965,
-0.8060120940208435,
-0.510355532169342,
-0.006448735017329454,
0.12755617499351501,
-1.099524974822998,
-0.3071422576904297,
-0.3000692725181... |
def mtlobjective ( theta, r, y, alpha ) : n _ samples, n _ tasks = r. t. shape n _ features = theta. shape [ 0 ] obj = 0. for t in range ( n _ tasks ) : for n in range ( n _ samples ) : obj + = r [ t, n ] * * 2 obj * = 0. 5 for j in range ( n _ features ) : obj + = alpha * np. linalg. norm ( theta [ j ] ) return obj | [
0.422088086605072,
-0.9262229800224304,
0.802717387676239,
-0.20294256508350372,
-1.1733835935592651,
-0.05593080073595047,
0.4027000367641449,
-0.3081599175930023,
-0.7486991882324219,
1.1647084951400757,
-0.012997109442949295,
-0.2428617775440216,
0.6067146062850952,
-0.12947294116020203... |
def _ _ call _ _ ( self, parser, namespace, values, option _ string = none ) : setattr ( namespace, self. dest,''. join ( values ) ) | [
-0.1855168491601944,
-0.4725123345851898,
0.33053988218307495,
-0.7198041677474976,
0.01914655603468418,
0.42917969822883606,
-1.3508636951446533,
-0.3140956163406372,
0.11860061436891556,
-0.01404526922851801,
-0.30598947405815125,
0.12926194071769714,
0.7003455758094788,
0.46496725082397... |
def test _ game _ live ( self ) : mock _ board = [ [ 0, 0 ], [ 1, 0 ] ] game = conway. game ( mock _ board ) game. live ( 1 ) self. asserttrue ( true ) | [
0.73211669921875,
-0.034983277320861816,
0.8094238638877869,
0.9986668229103088,
0.889864444732666,
1.4195308685302734,
-0.44260188937187195,
0.592225193977356,
-0.15061679482460022,
0.1438113898038864,
-1.2686513662338257,
-1.570708155632019,
-0.8544663190841675,
-0.139990895986557,
-0.... |
def test _ get _ aliases ( self ) : pass | [
0.5834029316902161,
0.6038749814033508,
0.1842816323041916,
1.5589977502822876,
0.5185173153877258,
1.0425580739974976,
0.8124694228172302,
0.5288252234458923,
-0.5819699764251709,
-1.0008634328842163,
-0.7155300974845886,
0.3230402171611786,
-0.6649413108825684,
0.02703714370727539,
-0.... |
def nine ( ) : return [ [ 0, 1, 1, 0 ], [ 1, 0, 0, 1 ], [ 1, 0, 0, 1 ], [ 0, 1, 1, 1 ], [ 0, 0, 0, 1 ], [ 1, 0, 0, 1 ], [ 0, 1, 1, 0 ], ] | [
-0.018865756690502167,
0.24038013815879822,
0.8368880152702332,
-0.12849120795726776,
1.2531335353851318,
-0.6622198820114136,
0.42618370056152344,
-0.5354970097541809,
0.6834102272987366,
-0.3810325562953949,
-1.4498347043991089,
-0.7939301133155823,
0.19757956266403198,
-0.57416808605194... |
def sha256 ( content : bytes ) - > str : m = hashlib. sha256 ( ) m. update ( content ) return m. hexdigest ( ) | [
0.38896459341049194,
-1.1708351373672485,
-0.06256096065044403,
-1.0742216110229492,
-0.3682622015476227,
-0.5412765741348267,
-1.208593726158142,
-0.1616171896457672,
-0.2821998596191406,
0.8525859713554382,
-0.6434568166732788,
-0.6002932786941528,
-0.5611039996147156,
-0.815871059894561... |
def set _ tooltips _ to _ column ( self, tooltips _ col, target _ col ) : # hide tooltips try : self. datatable _ columns [ tooltips _ col ] ['visible'] ='false'except keyerror : logger. warning ( " keyerror : column name'{ 0 }'does not exist. ". format ( target _ col ) ) # function to add tooltips fct = " " " function... | [
-0.6987075805664062,
0.01645023375749588,
0.4552907347679138,
-0.8062117695808411,
0.49390995502471924,
-0.2563948333263397,
0.05363107845187187,
0.10016615688800812,
-0.7227421998977661,
0.9171323180198669,
-0.24138739705085754,
0.416301965713501,
1.2807518243789673,
-0.7710643410682678,
... |
def model _ fn ( features, labels, mode, params ) : # pylint : disable = unused - argument unique _ ids = features [ " unique _ ids " ] input _ ids = features [ " input _ ids " ] input _ mask = features [ " input _ mask " ] input _ type _ ids = features [ " input _ type _ ids " ] model = modeling. bertmodel ( config = ... | [
-0.1521565318107605,
-0.5246875286102295,
0.701475977897644,
0.6860304474830627,
-0.1557265669107437,
-0.2342635542154312,
0.5452598333358765,
0.2234078347682953,
-1.0377498865127563,
0.5138866901397705,
-0.2428242564201355,
-0.01684458926320076,
1.0013467073440552,
-0.016190797090530396,
... |
def json ( self ) : try : return pb2json ( self. _ pb ) except attributeerror : raise attributeerror ('no json representation available.') | [
-0.33875253796577454,
-0.9725408554077148,
0.3350898325443268,
-0.04770243540406227,
-0.17989076673984528,
0.26709121465682983,
0.2661379277706146,
-0.7278337478637695,
0.4811597764492035,
-0.08250606060028076,
-0.23798733949661255,
0.3911108672618866,
-0.2806147038936615,
-0.0442060418426... |
def from _ json ( self, s ) : return none | [
-0.7828733921051025,
-1.3385668992996216,
0.10911094397306442,
-0.7829780578613281,
-0.6435779929161072,
-0.9760617613792419,
-0.7982437610626221,
-0.7052412629127502,
1.31227707862854,
-0.4520317614078522,
-1.1003628969192505,
0.6590222716331482,
0.6365844011306763,
-0.878411054611206,
... |
def prep _ im _ for _ blob ( im, pixel _ means, target _ size, max _ size ) : im = im. astype ( np. float32, copy = false ) # im - = pixel _ means im = preprocess _ input ( im ) im _ shape = im. shape im _ size _ min = np. min ( im _ shape [ 0 : 2 ] ) im _ size _ max = np. max ( im _ shape [ 0 : 2 ] ) im _ scale = floa... | [
-0.31096145510673523,
-0.03700835257768631,
0.9197781085968018,
0.08455653488636017,
-0.3585195541381836,
0.27751851081848145,
-0.6308715343475342,
-0.5157086849212646,
-0.09025221318006516,
1.0758411884307861,
0.43539154529571533,
0.21276742219924927,
0.6725367307662964,
-0.15092584490776... |
def added _ json _ serializer ( obj ) : obj _ type = obj. _ _ class _ _ if hasattr ( obj _ type,'_ _ iter _ _') : return list ( obj ) raise typeerror ( f'object of type { obj _ type. _ _ name _ _! r } is not json serializable. ', ) | [
-0.9289124608039856,
-0.43688517808914185,
0.7284676432609558,
0.5196985006332397,
-0.6011380553245544,
-0.04662714898586273,
-0.10765599459409714,
-1.2304357290267944,
1.0494023561477661,
0.40387076139450073,
-1.0104225873947144,
0.6713530421257019,
0.020374152809381485,
0.854740440845489... |
def _ set _ model _ params ( self, obj _ n _ abs _ tol = 0 ) : model = self. _ model for index in range ( 2 ) : model. setparam ( " objnumber ", index ) model. setattr ( " objnabstol ", obj _ n _ abs _ tol ) model. update ( ) | [
-1.5708082914352417,
-0.3078063130378723,
0.4258957803249359,
0.21243521571159363,
0.04288451373577118,
0.991088330745697,
0.42832863330841064,
-0.31842389702796936,
-0.8524503111839294,
0.6412369608879089,
-0.9441945552825928,
-0.6726025938987732,
1.516860008239746,
0.6242312788963318,
... |
def _ _ init _ _ ( self, algorithm : str, key : bytearray, data : bytearray ) - > none : super ( ). _ _ init _ _ ( algorithm, key ) value _ r = self. _ cipher _ obj. encrypt ( self. _ cipher _ obj. block _ size * b'\ x00') self. _ key _ 1, self. _ key _ 2 = self. _ get _ mac _ key ( value _ r ) self. _ buff = bytearray... | [
0.42810916900634766,
0.40121400356292725,
0.6752473711967468,
0.08582855761051178,
-0.6384097337722778,
-0.295245885848999,
0.2805873155593872,
-0.22603510320186615,
-0.24241527915000916,
0.3531096577644348,
-0.4087268114089966,
0.47729846835136414,
-0.44772568345069885,
0.8216419219970703... |
def create _ user ( self, email _ id, first _ name, last _ name, password = none ) : if not email _ id : raise valueerror ('users must have an email address') user = self. model ( email = mycustomusermanager. normalize _ email ( email _ id ), first _ name = first _ name, last _ name = last _ name, ) user. set _ passwor... | [
0.4517885148525238,
-0.23273015022277832,
0.316567599773407,
-0.20898613333702087,
0.5037577748298645,
0.10782880336046219,
-0.8358750343322754,
0.5618498921394348,
0.110962875187397,
-0.26678019762039185,
-0.7962132096290588,
-0.37081634998321533,
-0.22064001858234406,
0.33030036091804504... |
def updatestate ( self ) : if self. state = = gamestate. setup : self. state = gamestate. new _ round return if self. state = = gamestate. new _ round : self. state = gamestate. playing return i = 0 for _ in range ( len ( self. order ) ) : self. currplayerindex + = 1 self. currplayerindex % = len ( self. order ) if len... | [
-1.1398544311523438,
-0.4839126169681549,
0.7798805236816406,
0.16321389377117157,
-0.13876774907112122,
-0.07703643292188644,
0.6164849400520325,
-0.6254472732543945,
-0.03941519185900688,
0.6907511949539185,
0.5164298415184021,
-0.09900728613138199,
-0.5725676417350769,
-0.20502237975597... |
def plot _ extragalactic _ dust _ obs ( axis, property1, property2, goodsnr = true, aggregate _ data = false, show _ raw _ data = true ) : data _ to _ use ='' log = false if axis. get _ yaxis ( ). get _ scale ( ) = ='log': log = true if property1 = ='d / z': if property2 in ['fh2 ','r ','r25 ','sigma _ gas ','sigma _ h... | [
0.2872244417667389,
0.051207318902015686,
0.9916059970855713,
0.5037122368812561,
-0.6775251626968384,
0.5898627638816833,
-0.019813109189271927,
-0.19954463839530945,
-0.430533230304718,
-0.30236661434173584,
0.4863850772380829,
1.933401107788086,
0.40345242619514465,
0.26082098484039307,... |
def recvtill ( s, target, count = 1 ) : done = false buf ='' while not done : r = s. recv ( 1000 ) if not r : return buf buf + = r done = buf. count ( target ) = = count return buf | [
0.25502684712409973,
-0.33448806405067444,
0.34381940960884094,
-0.3192327618598938,
-0.27808114886283875,
-0.4683241546154022,
-0.6651598215103149,
-0.6347656846046448,
-0.2633044421672821,
-0.05480287969112396,
-0.08652019500732422,
0.6167126297950745,
-0.6658018231391907,
-0.99378633499... |
def test _ missing _ date ( self ) : # validate a form with a missing ` ` deadline ` ` value form = self. form _ data ( deadline _ 1 = " ", objective _ 1 = " objective 1 ", ) errors = form. errors [ 0 ] [ " deadline " ]. as _ data ( ) self. assertequal ( len ( errors ), 1 ) self. assertequal ( errors [ 0 ]. code, " inc... | [
0.22229355573654175,
0.31724661588668823,
0.5786921977996826,
-0.3684781491756439,
0.09416286647319794,
1.196208119392395,
-0.5558956861495972,
0.5534429550170898,
-0.5700942873954773,
-0.4540332853794098,
-0.6001312732696533,
-0.5301022529602051,
0.9040349721908569,
0.6917482614517212,
... |
def retrieve ( ) : print ( f " attempting to retrieve notification email address for { hw _ id }... " ) reply = send _ request ( json. dumps ( {'type':'retrieve ','device _ id': hw _ id } ) ) address = reply ['email'] if len ( address ) > 0 : print ( address ) else : print ( " this device does not see, to be registered... | [
0.1998991221189499,
0.7404698729515076,
0.4694511890411377,
0.3808349072933197,
0.8538410663604736,
-0.743272066116333,
0.2506241798400879,
-0.24596157670021057,
-0.23602385818958282,
-0.5562711358070374,
-0.055880919098854065,
1.5523844957351685,
-0.7235329151153564,
0.08126223087310791,
... |
def freeze _ ffmpeg ( preset _ path ='~ / ffmpegbin. tar') : preset _ path = os. path. expanduser ( preset _ path ) if os. path. exists ( preset _ path ) : yield preset _ path return try : tmpdir, tar = main ( ) yield tar finally : shutil. rmtree ( tmpdir ) | [
-0.1166720986366272,
0.2418351173400879,
0.5109695792198181,
0.7176650166511536,
-0.637153685092926,
0.24658262729644775,
0.5300909280776978,
-0.8124410510063171,
0.10060083121061325,
-0.27696359157562256,
0.3372148871421814,
0.18826386332511902,
-0.4247407615184784,
0.9701412916183472,
... |
def get ( self, request, * args, * * kwargs ) : # pylint : disable = unused - argument with translate _ praw _ exceptions ( request. user ) : children = request. query _ params. getlist ( " children " ) sort = request. query _ params. get ( " sort ", comments _ sort _ best ) # validate the request parameters : each are... | [
-0.7656176686286926,
-0.1215980052947998,
0.7461973428726196,
0.054944779723882675,
1.0662676095962524,
-0.626876950263977,
-0.7362006902694702,
-1.280766487121582,
-0.6755281686782837,
0.23531153798103333,
-0.3930093050003052,
0.34678274393081665,
0.40725335478782654,
0.13774564862251282,... |
def getmostrecentimage ( shape ) : andor _ solis. getmostrecentimage. restype = ctypes. c _ uint arr = ( ctypes. c _ long * shape [ 1 ] * shape [ 0 ] ) ( ) size = shape [ 0 ] * shape [ 1 ] result = andor _ solis. getmostrecentimage ( ctypes. pointer ( arr [ 0 ] ), ctypes. c _ ulong ( size ) ) check _ status ( result ) ... | [
-0.9756215810775757,
0.19677233695983887,
0.8178851008415222,
-0.03532024845480919,
-0.3828551769256592,
-0.587689220905304,
0.07812163233757019,
-0.407929390668869,
0.25702011585235596,
0.2799619734287262,
0.29225659370422363,
0.45393168926239014,
0.024468382820487022,
0.528609573841095,
... |
def print _ menu ( ) : print ( " " " menu of options 1 ) add a new product 2 ) remove an existing product 3 ) save products list to file 4 ) reload products list from file 5 ) exit program " " " ) print ( ) # add an extra line for looks | [
-0.11661435663700104,
-0.637959897518158,
0.5121452212333679,
0.74742192029953,
1.3586176633834839,
0.4682840406894684,
0.3191290497779846,
-0.16792848706245422,
0.10226105153560638,
0.4492355287075043,
-0.10119595378637314,
0.5491326451301575,
-0.09373723715543747,
-0.0717301294207573,
... |
def get _ current _ waypoint ( self, x _ m, y _ m ) : if self. _ current _ waypoint = = 0 : return self. _ waypoints [ self. _ current _ waypoint ] elif len ( self. _ waypoints ) = = 1 : return self. _ waypoints [ self. _ current _ waypoint ] else : current = self. _ waypoints [ self. _ current _ waypoint ] previous = ... | [
0.8530447483062744,
-0.6774927377700806,
0.736049473285675,
0.21859154105186462,
-0.3052810728549957,
-0.08473919332027435,
0.03364009037613869,
-1.3032983541488647,
-0.10361938178539276,
0.2751191556453705,
0.6292819380760193,
0.642356812953949,
-0.9538024663925171,
-0.5191547274589539,
... |
def check _ view _ permissions ( self ) : if self. action in ( " create ", " partial _ update ", " update ", " destroy " ) : result = has _ perm ( self. request. user, " core. can _ manage _ tags " ) else : result = false return result | [
-0.2858913838863373,
0.8028993606567383,
0.6439861059188843,
0.6270551681518555,
-0.4527041018009186,
-0.2598792016506195,
0.1133437305688858,
-0.6058219075202942,
-0.3251040577888489,
-0.47324880957603455,
0.21410806477069855,
0.0052743032574653625,
-0.8815311193466187,
1.0335325002670288... |
def gat ( nheads : list [ int ], nhid : list [ int ], nclass : int, dropout : float, residual : bool = false ) : init _ funs = [ ] attn _ funs = [ ] nhid + = [ nclass ] for layer _ i in range ( len ( nhid ) ) : last = layer _ i = = len ( nhid ) - 1 layer _ init, layer _ fun = multiheadlayer ( nheads [ layer _ i ], nhid... | [
-0.15841874480247498,
0.11488202959299088,
0.9822844862937927,
0.0038061789236962795,
-0.11734119802713394,
-0.6128540635108948,
-0.030731461942195892,
-0.30141425132751465,
0.3287718594074249,
0.17686370015144348,
-0.6907572746276855,
0.48966360092163086,
0.20453594624996185,
0.4357298314... |
def stop ( self ) : if self. _ job : self. _ job. cancel ( ) super ( ). stop ( ) | [
0.5418944954872131,
-0.7416715025901794,
0.23171383142471313,
0.27293869853019714,
-0.6043056845664978,
0.09651368111371994,
0.005673461593687534,
0.9145657420158386,
-0.7289458513259888,
-0.24493657052516937,
0.13943934440612793,
-0.2124323695898056,
-0.22812706232070923,
0.46633380651474... |
def matrix _ multiply ( mat1, mat2 ) : mat _ space = mat1. matrix _ space ( ) dim = mat _ space. nrows ( ) l = list ( ) for row in range ( dim ) : l. append ( _ product _ row ( mat1, mat2, row ) ) return mat _ space ( l ) | [
-0.39303073287010193,
0.3139761984348297,
0.46385595202445984,
0.9329198002815247,
-0.8380299210548401,
-0.09827233105897903,
-0.8257542252540588,
-0.33627891540527344,
0.5346605181694031,
0.4902346730232239,
0.23550347983837128,
-0.1288423240184784,
0.29403191804885864,
0.0054904804565012... |
def detach _ ip ( self ) : result = self. manager. api. query ( ). ips ( self. ip ( ). id ). patch ( { " server " : none } ) | [
-0.7864254117012024,
-0.24092425405979156,
0.293675035238266,
-0.609271764755249,
-0.4335664212703705,
-0.04928482323884964,
-0.16574813425540924,
-0.10836825519800186,
0.7408910989761353,
-0.016172215342521667,
0.18431209027767181,
0.18515506386756897,
-1.2935659885406494,
-1.225799679756... |
def load _ state _ dict _ from _ url ( url : str, path : str, md5 : str = none ) - > os. pathlike : if not os. path. isdir ( path ) : os. makedirs ( path ) download. get _ path _ from _ url ( url, path, md5 ) return load ( os. path. join ( path, os. path. basename ( url ) ) ) | [
-0.0005500901024788618,
-0.2891102135181427,
0.6733325123786926,
-0.45805633068084717,
-1.7052443027496338,
-0.002491677412763238,
0.24051715433597565,
0.36599409580230713,
0.2752644121646881,
0.20413163304328918,
-0.11474055796861649,
-0.8782771825790405,
0.09745019674301147,
-0.734836339... |
def label _ to _ color _ image ( label ) : if label. ndim! = 2 : raise valueerror ('expect 2 - d input label') colormap = create _ road _ label _ colormap ( ) if np. max ( label ) > = len ( colormap ) : raise valueerror ('label value too large.') return colormap [ label ] | [
-1.02913498878479,
0.02372010424733162,
0.5189782977104187,
-0.31354618072509766,
0.06306051462888718,
0.6575488448143005,
-0.27758651971817017,
-0.8814764022827148,
-0.03200312703847885,
0.46523064374923706,
0.5207352042198181,
0.8521941304206848,
-0.08499807864427567,
-0.1513548493385315... |
def invitee _ id ( self ) : return self. _ invitee _ id | [
1.622545599937439,
-0.7998495101928711,
0.2377905249595642,
0.9228670597076416,
0.9287043213844299,
1.3038105964660645,
0.40245193243026733,
1.649022102355957,
-0.17087237536907196,
0.40624651312828064,
-0.03385966643691063,
1.0132246017456055,
-1.3089114427566528,
-0.2629033625125885,
0... |
def target _ image _ folder _ member _ id ( self ) : return self. _ target _ image _ folder _ member _ id | [
-0.250203937292099,
-1.3912549018859863,
0.23364073038101196,
0.2395659238100052,
0.5421031713485718,
0.48319879174232483,
0.23865148425102234,
0.25068536400794983,
0.19842307269573212,
-0.6161267161369324,
0.26855361461639404,
0.9454678297042847,
-0.33737796545028687,
0.06003393232822418,... |
def getuserid ( user _ email ) : try : user = session. query ( user ). filter _ by ( email = user _ email ). one ( ) return user. id except : return none | [
0.6496164798736572,
0.312284916639328,
0.28242912888526917,
0.6048330068588257,
0.9281298518180847,
0.21593013405799866,
0.7968183159828186,
-0.20161990821361542,
0.7227641940116882,
0.7122049331665039,
0.22588562965393066,
-0.5028047561645508,
-0.5058847665786743,
-0.10726097971200943,
... |
def get _ revenue ( date ) : with open ('products. csv ', newline ='' ) as csv _ file : revenue = 0 product _ reader = csv. dictreader ( csv _ file ) sold _ products = [ product for product in product _ reader if product ['sell _ date'] ] for sold _ product in sold _ products : if sold _ product ['sell _ date'] = = dat... | [
-0.6920471787452698,
-0.10183807462453842,
0.5861833691596985,
0.20129022002220154,
0.3305147588253021,
-0.13951700925827026,
0.37267059087753296,
-0.19540396332740784,
0.04693816602230072,
0.6043004393577576,
-0.17154255509376526,
0.16897056996822357,
0.6741065382957458,
0.036294776946306... |
def oncontactdpchanged ( self, papyon _ contact ) : # request the dp... c = self. getcontact ( papyon _ contact. id, papyon _ contact ) if ( " theme ", " dp _ nopic " ) in c. dp. imgs : c. dp. load ( " theme ", " dp _ loading " ) elif papyon _ contact. msn _ object is none : c. dp. load ( " theme ", " dp _ nopic " ) se... | [
0.1512131541967392,
-0.4430820047855377,
0.6030393242835999,
-0.06695424765348434,
-1.1774029731750488,
0.02307571843266487,
0.00263125984929502,
-0.6500800251960754,
1.6781340837478638,
-0.22407351434230804,
0.27814236283302307,
-0.3797105550765991,
0.27802059054374695,
-0.257786691188812... |
def locallyconnecteddense ( n _ modules, n _ units, kernel _ size = 1, kernel _ initializer = init. glorotuniforminitializer ( ), bias _ initializer = init. randomnormalinitializer ( 1e - 6 ), use _ bias = true ) : if n _ modules = = 1 : return tl. dense ( n _ units, kernel _ initializer = kernel _ initializer, bias _ ... | [
0.6222018599510193,
-0.16126686334609985,
0.611285388469696,
-0.12270475178956985,
0.3792803883552551,
0.09320970624685287,
0.41645076870918274,
-0.4730260372161865,
0.7430362701416016,
-0.11201890558004379,
0.12211670726537704,
-0.639970600605011,
-0.4729904234409332,
-0.1366819441318512,... |
def key _ pair _ name ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " key _ pair _ name " ) | [
0.31745976209640503,
-0.23297658562660217,
0.36894887685775757,
0.42225024104118347,
-1.1526198387145996,
0.9718052744865417,
-0.4087871313095093,
-0.16109392046928406,
-0.1230480819940567,
0.5519238114356995,
0.4898517429828644,
0.343037873506546,
-0.3931882083415985,
-0.5681310296058655,... |
def format _ ( self ) - > optional [ str ] : return self. _ _ format | [
0.6836287379264832,
-0.39411047101020813,
0.21425294876098633,
-0.2548030614852905,
0.20113298296928406,
0.17877322435379028,
-0.4785889983177185,
-1.0601930618286133,
1.0510950088500977,
-0.6865474581718445,
1.5653060674667358,
0.3215198516845703,
0.387594997882843,
0.39076709747314453,
... |
def test _ proper _ employee _ update ( self ) : emp = employee ( ) emp. name ='emp'emp. email ='emp @ mail. com'emp. department ='emp _ department'emp. save ( ) resp = self. client. put ('/ employee / emp @ mail. com / update / ', data ='{ " name " : " new _ name " }') # update name updated _ emp = employee. objects. ... | [
-0.6581708192825317,
-0.8936542868614197,
0.742815375328064,
-0.6581999063491821,
-0.43403634428977966,
1.0472772121429443,
-0.49460160732269287,
0.23499824106693268,
0.08566082268953323,
0.6010845899581909,
-1.2452646493911743,
-0.1579655557870865,
-0.4489040970802307,
-0.6470574736595154... |
def decode _ string ( self ) : def replace ( match ) : return chr ( int ( match. group ( ) [ 1 : ] ) ) regex = re. compile ( r " \ \ [ 0 - 9 ] [ 0 - 9 ] [ 0 - 9 ] " ) return re. sub ( regex, replace, self. value ) | [
-0.2774493992328644,
-0.790706217288971,
0.6639832854270935,
-0.3818298876285553,
-0.3993839919567108,
-0.47450628876686096,
-0.0017789077246561646,
0.7443222999572754,
0.03823129087686539,
-0.6148287057876587,
-0.37164071202278137,
0.07545582950115204,
-0.5080251097679138,
-1.261892676353... |
def current _ direction ( self ) - > str | none : return self. _ direction | [
-0.4225965738296509,
-1.4103256464004517,
0.3976242244243622,
0.5398335456848145,
0.5346379280090332,
0.8152582049369812,
0.6864957213401794,
-0.6750954985618591,
0.02717309258878231,
-0.8539198040962219,
0.8321180939674377,
0.34438619017601013,
-0.27514582872390747,
-0.26545384526252747,
... |
def _ translate _ _ interfaces _ interface _ ipv4 ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. ipv4. enabled. _ changed ( ) : input _ yang _ obj. ipv4. enabled = input _ yang _ obj. ipv4. enabled if input _ yang _ obj. ipv4. forwarding. _ changed ( ) : input _ yang _ obj. ipv4. forwar... | [
-0.7858401536941528,
-0.03935381770133972,
0.3264211118221283,
-0.8472097516059875,
-0.6043258905410767,
-0.251475989818573,
1.0142033100128174,
-0.42839741706848145,
0.5540618300437927,
0.4891603887081146,
-0.5918840765953064,
-0.5498749613761902,
-1.0713022947311401,
-0.3524133563041687,... |
def transactions _ archive ( self, market _ id : str ) : return self. _ transactions ( market _ id, " transactions _ archive " ) | [
0.6905474662780762,
0.8959579467773438,
0.2650999128818512,
-0.27732032537460327,
-0.03622998297214508,
-2.0106093883514404,
-0.4430023431777954,
-0.045147404074668884,
0.03808015212416649,
0.4633101224899292,
0.502286434173584,
0.4521670937538147,
0.03561973571777344,
-0.6677265763282776,... |
def change _ item ( self ) : for item in self. db _ key _ db : if item = = self. key _ attr : main _ obj = self. db _ key _ db [ item ] # print ( main _ obj ) # test print break main _ obj [ self. index ] = self. tmp self. db _ key _ db [ item ] = main _ obj # print ( self. db _ key _ db. _ _ dict _ _ [ item ] ) # test... | [
-1.3643462657928467,
-0.2632450759410858,
0.5029121041297913,
-0.3677421808242798,
-0.474368691444397,
0.39651185274124146,
0.971981942653656,
0.6805889010429382,
-0.055235616862773895,
0.930191695690155,
-0.5769888758659363,
0.07869482785463333,
-0.8650463819503784,
0.6872509717941284,
... |
def mutantscan ( self ) : log. debug ( " executing volatility mutantscan module on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " mutantscan " ] ( self. config ) for object _ obj, mutant in command. calculate ( ) : tid = 0 pid = 0 if mutant. ownerthread > 0x80000000 :... | [
-0.41011980175971985,
-1.093959093093872,
0.6479519605636597,
-0.3697359561920166,
-0.22972378134727478,
-0.4734956920146942,
-0.7585932016372681,
-0.6798386573791504,
0.2422897219657898,
0.27256497740745544,
-0.6665527820587158,
0.3278549015522003,
-0.14763151109218597,
0.7573695182800293... |
def getweights ( fp ) : weight _ dict = { } for line in ensure _ string ( fp. readlines ( ) ) : field = re. match ('( 0 \. \ d + ). * ( \ d + ) ', line ) if field : weight = float ( field. group ( 1 ) ) region = int ( field. group ( 2 ) ) weight _ dict [ region ] = weight return weight _ dict | [
0.7439602017402649,
-0.8400625586509705,
0.6070027947425842,
-0.6844376921653748,
-0.6643747687339783,
0.08163126558065414,
0.4675988256931305,
0.2288053184747696,
-1.4555079936981201,
0.22225864231586456,
-0.72190922498703,
-0.46675390005111694,
-0.04512794688344002,
0.4465976059436798,
... |
def convert _ to _ dataset ( self, sentences ) : dataset = tf. data. dataset. from _ tensor _ slices ( self. tokenizer _ fn ( sentences ) ) dataset = dataset. batch ( self. batch _ size ) return dataset | [
-0.13613823056221008,
-0.07340917736291885,
0.20915871858596802,
-0.5831619501113892,
-0.6664223670959473,
-0.4871969521045685,
-0.5818976163864136,
0.2863907217979431,
-0.3586895167827606,
-0.630902886390686,
0.09243588894605637,
0.04942425340414047,
-0.060982778668403625,
-0.336911022663... |
def eval ( self, test _ dataset ) : loss = 0. batch _ size = config [ " batch _ size " ] num _ batches = len ( test _ dataset ) / / batch _ size for i in range ( num _ batches ) : examples = [ test _ dataset [ j ] for j in range ( i * batch _ size, ( i + 1 ) * batch _ size ) ] loss + = np. sum ( self. run _ test _ exam... | [
-0.25055694580078125,
0.21756643056869507,
0.34641602635383606,
-0.7031800746917725,
-0.2815280258655548,
0.09949994087219238,
0.708877682685852,
0.2099902331829071,
0.4387637972831726,
0.4176359176635742,
-0.019458487629890442,
0.44853657484054565,
-0.18380028009414673,
0.5571095943450928... |
def float _ strictly _ positive ( string ) : try : floating _ point = float ( string ) except valueerror : raise argparse. argumenttypeerror ('{ } cannot be converted into a float. '. format ( string ) ) if floating _ point < = 0. : raise argparse. argumenttypeerror ('{ } is not strictly positive. '. format ( floating ... | [
0.910841166973114,
-0.7523746490478516,
0.6691045761108398,
0.533515214920044,
0.06451194733381271,
1.0677781105041504,
-0.019895149394869804,
0.3353142738342285,
-1.0352039337158203,
-0.6244720816612244,
0.8357685208320618,
0.13833117485046387,
-0.48156675696372986,
0.15387143194675446,
... |
def _ _ call _ _ ( self, out, datadict ) : # if outkeys is a list, pass the value of that list extracted from the output if self. outkeys is not none and isinstance ( out, dict ) : olist = [ out [ ok ] for ok in self. outkeys ] if len ( olist = = 1 ) : out = olist [ 0 ] else : out = olist if isinstance ( self. targkeys... | [
-0.4026031196117401,
0.6690571308135986,
0.7777019143104553,
0.05198539048433304,
-0.5904536843299866,
-0.31928643584251404,
0.3596512973308563,
-0.31294628977775574,
-0.2819455862045288,
0.6319209337234497,
1.2222071886062622,
0.23014876246452332,
0.20284108817577362,
0.42018580436706543,... |
def create _ data _ field _ index ( self, header ) : all _ header _ names = header. split ( ", " ) for one _ header in self. header _ names : try : self. data _ field _ index [ one _ header ] = all _ header _ names. index ( one _ header ) except valueerror : print ( " value not present ", one _ header ) exit ( ) pass | [
-0.8379125595092773,
-0.34078580141067505,
0.4381827414035797,
-0.6325997710227966,
0.5655298829078674,
0.4607468843460083,
-0.255441278219223,
0.18460077047348022,
-1.014642357826233,
0.013588950969278812,
-1.2684482336044312,
-0.08700138330459595,
-0.805381178855896,
-0.4992295503616333,... |
def hgprod ( h0, g, s, y ) : q = np. array ( g ) r = np. dot ( h0, q ) if len ( s ) = = 0 : return r s = np. array ( s ) y = np. array ( y ) s = s. reshape ( ( - 1, 1 ) ) if s. ndim = = 1 else s y = y. reshape ( ( - 1, 1 ) ) if y. ndim = = 1 else y n = s. shape [ 1 ] # number of saved vector pairs ( x, y ) alpha = np. ... | [
-0.21988700330257416,
0.2131267935037613,
0.9268062114715576,
-0.5009787678718567,
-0.22184108197689056,
-0.4885857105255127,
0.37573644518852234,
-0.7069556713104248,
-0.3668338656425476,
0.8806905150413513,
-0.05383387953042984,
0.08572541922330856,
-0.37242019176483154,
0.24936363101005... |
def _ draw _ images ( self ) : w = 640. 0 h = 480. 0 aspectratio = w / float ( h ) glclear ( gl _ color _ buffer _ bit | gl _ depth _ buffer _ bit ) # background color gldisable ( gl _ texture _ rectangle _ arb ) glcolor3f ( * self. options. bgcolor ) glpushmatrix ( ) glbegin ( gl _ quads ) glvertex2f ( - 4. 0, - 3. 0 ... | [
0.06480689346790314,
0.3593713343143463,
0.8728874325752258,
-0.6526556015014648,
0.3007625341415405,
0.19754551351070404,
0.34460312128067017,
-0.3102612793445587,
0.013540459796786308,
0.12189549207687378,
0.192103311419487,
-0.3180737793445587,
0.15905867516994476,
0.7263441681861877,
... |
def get _ logger ( outdir ) : # create out dir if not present if not os. path. exists ( outdir ) : os. makedirs ( outdir ) timestamp = ut. get _ time _ stamp ( ) logfile = os. path. join ( outdir,'orfipy _'+ timestamp + '. log') handler = logging. filehandler ( logfile ) formatter = logging. formatter ( fmt ='% ( ascti... | [
-0.24375978112220764,
-0.6766597032546997,
0.6720786690711975,
-0.7082110047340393,
-0.29746973514556885,
-0.37544605135917664,
0.12359838932752609,
-0.2018844336271286,
0.014516212977468967,
-0.7385537624359131,
0.15856260061264038,
-0.222905233502388,
0.062377605587244034,
0.403512895107... |
def init _ db ( ) : conn = get _ db ( ) with blu. open _ resource ('schema. sql ', mode ='r') as f : cursor = conn. cursor ( ) cursor. executescript ( f. read ( ) ) return conn, cursor | [
-0.1807519942522049,
-0.8153754472732544,
0.7202553749084473,
0.46451419591903687,
0.2292431890964508,
-0.6917189955711365,
-0.4963931143283844,
1.233289361000061,
-0.5679221153259277,
0.6283878087997437,
-0.6869411468505859,
0.5261394381523132,
0.1040918305516243,
0.5243642330169678,
1.... |
def get _ ordered _ ckpts ( sess, imdb, net _ name, save _ epoch = true ) : # find previous snapshots if there is any to restore from ckpts _ dir = cfg. get _ ckpts _ dir ( net _ name, imdb. name ) if save _ epoch : save _ interval ='epoch'else : save _ interval ='iter'sfiles = os. path. join ( ckpts _ dir, cfg. train ... | [
0.10584070533514023,
0.5863054394721985,
0.8212328553199768,
0.7521853446960449,
0.02909518964588642,
-0.46758395433425903,
0.15829288959503174,
0.03524090349674225,
-0.0392310731112957,
1.107028603553772,
-0.04723954200744629,
-0.49278101325035095,
0.31965869665145874,
0.3850121796131134,... |
def remove _ special _ characters ( value : str ) - > str : normalized _ parts = [ ] for part in value. split ( " _ _ " ) : part = re. sub ( r " [ ^ a - za - z0 - 9 _ ] ", " _ ", part ) # remove special characters. part = re. sub ( r " _ + ", " _ ", part ) # remove duplicate " _ ". part = part. strip ( " _ " ) # don't ... | [
-0.6818222403526306,
-0.21127170324325562,
0.5033746957778931,
-0.7017807364463806,
-1.5228489637374878,
-0.3175142705440521,
0.028042908757925034,
0.27055636048316956,
0.3949142396450043,
0.41807839274406433,
-0.838891327381134,
0.39926081895828247,
0.5726181864738464,
-0.9323609471321106... |
def _ store _ transition ( self, last _ observation, action, reward, is _ terminal, priority = none ) : if priority is none : priority = ( 1. if self. _ replay _ scheme = ='uniform'else self. _ replay. memory. sum _ tree. max _ recorded _ priority ) if not self. eval _ mode : self. _ replay. add ( last _ observation, a... | [
-0.3436039984226227,
0.6006491184234619,
0.5164738893508911,
-0.7135642766952515,
0.8273181915283203,
-0.25203171372413635,
-0.678507924079895,
0.4325599670410156,
0.7719265818595886,
0.5914742946624756,
-0.6697162389755249,
0.13561639189720154,
0.2668415904045105,
-0.3166896104812622,
0... |
def set _ created _ time ( self, created _ time ) : from datetime import datetime if created _ time is not none and not isinstance ( created _ time, datetime ) : raise sdkexception ( constants. data _ type _ error,'key : created _ time expected type : datetime ', none, none ) self. _ _ created _ time = created _ time s... | [
-0.782174289226532,
0.48302337527275085,
0.2375091165304184,
0.37333184480667114,
0.912172794342041,
0.40805408358573914,
-0.47966355085372925,
0.1206200048327446,
-0.4195716083049774,
0.5958494544029236,
-0.902604341506958,
0.34334319829940796,
0.12557828426361084,
0.9736121892929077,
-... |
def connectionmade ( self ) : self. conn _ id = ( self. factory. last _ conn _ id + 1 ) & 0xffffffff self. factory. last _ conn _ id = self. conn _ id self. factory. ccp _ client. srcconnected ( self ) if self. factory. conn _ type = = ccpmessage. open _ socks5 _ conn : setup _ msg = ccpmessage. open _ socks _ msg ( se... | [
-0.6295328736305237,
-0.15272200107574463,
0.5663814544677734,
-0.25093838572502136,
0.9165628552436829,
-0.10963664948940277,
0.6151461601257324,
-0.48216062784194946,
0.04668121039867401,
-0.5410415530204773,
-0.3578135073184967,
0.42500197887420654,
0.16610845923423767,
0.27804672718048... |
def srcconnected ( self, protocol ) : self. connections [ protocol. conn _ id ] = protocol | [
-0.5361831784248352,
-0.5523349046707153,
0.10607977956533432,
-1.161263346672058,
0.3444103002548218,
0.3529182970523834,
-0.34489545226097107,
-0.14199592173099518,
-0.07648159563541412,
-0.05534859374165535,
-1.981266975402832,
0.2018747180700302,
-1.1127161979675293,
-0.363367319107055... |
def test _ solver _ without _ secrete _ constraints ( self ) : parameters = [ 3, 3, 3 ] constraints = { ( pair ( 0, 0 ), pair ( 2, 0 ) ), ( pair ( 0, 1 ), pair ( 1, 1 ) ), ( pair ( 1, 0 ), pair ( 2, 0 ) ) } solver = solver ( parameters, constraints ) self. assertequal ( solver. constraints, constraints, " solver change... | [
-0.6654614806175232,
-0.3703804910182953,
0.2991864085197449,
0.2942158579826355,
-0.11650620400905609,
-0.08708368986845016,
0.22248056530952454,
0.0682130977511406,
-0.3974206745624542,
0.2719775438308716,
-1.3443021774291992,
-0.6281840205192566,
-0.8380143046379089,
0.08954735845327377... |
def display _ name ( self ) : return self. _ call ('display _ name'). display _ name | [
0.43912315368652344,
-0.08971967548131943,
0.457942396402359,
0.9087514281272888,
-1.0698579549789429,
0.41671156883239746,
-0.018377572298049927,
-0.7989926338195801,
-0.03183187544345856,
0.6587235331535339,
0.19003017246723175,
0.45633041858673096,
0.028201699256896973,
-0.0795876905322... |
def environment ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " environment " ) | [
1.1079539060592651,
-0.17156054079532623,
0.4346059262752533,
0.5096416473388672,
0.30029401183128357,
0.9534444808959961,
0.5804082751274109,
-0.46871933341026306,
0.23732860386371613,
0.2018682360649109,
0.7738540768623352,
0.5280404686927795,
-0.03860694169998169,
-0.8068680167198181,
... |
def least _ squares _ sgd ( y, tx, initial _ w, max _ iters, gamma ) : losses = [ ] w = initial _ w threshold = 1e - 8 batch _ size = 1 for n _ iter in range ( max _ iters ) : # randomly select sample and compute stochastic gradient random _ num = np. random. randint ( 0, len ( y ), size = batch _ size ) r _ y = y [ ra... | [
0.33459487557411194,
-0.42723792791366577,
0.7045124769210815,
-0.016856776550412178,
-0.9375194907188416,
-0.18539460003376007,
-0.3951004445552826,
-0.36050862073898315,
-0.19468501210212708,
1.1967586278915405,
0.568991482257843,
0.6530812382698059,
0.07152831554412842,
0.92387932538986... |
def test _ rec _ large _ import ( self ) : log. info ( " = = = = = = = = = start qual test recovered large import = = = = = = = = = = = = " ) # the recovered data file referenced in the idd has 1 data record # which contains 14124 instrument records and 1 metadata record. self. create _ sample _ data _ set _ dir ('a000... | [
1.2002924680709839,
0.46102479100227356,
0.634132444858551,
-1.0815073251724243,
0.3934096693992615,
0.14204148948192596,
0.15850390493869781,
0.2796410620212555,
0.10078886151313782,
-0.08088068664073944,
-0.8080711960792542,
0.4204874336719513,
-0.37578314542770386,
-0.5428777933120728,
... |
def get _ votes ( self ) : # return reduce ( lambda x, y : x + y. get _ votes _ for ( self. delegate ), self. _ _ blocks, [ ] ) return vote. get _ votes _ for _ delegate _ before _ block ( self. delegate, self. end ) | [
0.3980572521686554,
0.27030253410339355,
0.773804783821106,
0.4161006212234497,
0.9155997633934021,
0.12224388122558594,
-0.4185900390148163,
0.0005372092127799988,
0.2504952549934387,
-0.2402905523777008,
-0.2941952347755432,
0.6683388948440552,
-0.5364651679992676,
0.8109962940216064,
... |
def load ( self, data, options = { } ) : soup = beautifulsoup ( data ) # read the number of pages match _ list = soup. find _ all ( " span ", { " class " : " current - page " } ) # if not fond, it means this went directly to the product detail page or there is no entries if len ( match _ list )! = 2 : # if there is no ... | [
-0.7071087956428528,
-0.018646808341145515,
0.9927766919136047,
-0.5706494450569153,
0.3610524535179138,
-0.4696878492832184,
0.7021087408065796,
-0.04664585739374161,
0.5185480117797852,
-0.10177537798881531,
-0.0868544802069664,
-0.5712175965309143,
-0.31813108921051025,
-0.1974646300077... |
def instance _ pre _ init ( self, signal, sender, args, kwargs, * * _ kwargs ) : if self. name in kwargs : value = kwargs. pop ( self. name ) entity _ label, entity _ id = entity _ ref ( value ) kwargs [ self. entity _ field ] = entity _ label kwargs [ self. fk _ field ] = entity _ id | [
0.017442459240555763,
-0.22123269736766815,
0.4859604239463806,
-1.0676623582839966,
0.4266159236431122,
0.5600172281265259,
-0.013239557854831219,
-0.33964499831199646,
-0.09208408743143082,
0.3982020914554596,
-0.40850478410720825,
0.14254939556121826,
-0.019294818863272667,
1.4819880723... |
def set _ initial _ state ( scenario _ number, engine ) : state _ dict = { 0 : ( tuple ( ), ( ( " alice springs ", 1000 ), ) ), 1 : ( tuple ( ), ( ( " rockhampton ", 1000 ), ( " brisbane ", 10000 ), ( " gold coast ", 1000 ) ) ), 2 : ( ( " sydney ", " melbourne ", " adelaide " ), ( ( " rockhampton ", 1000 ), ( " brisban... | [
0.09763877093791962,
-0.37734663486480713,
0.738373339176178,
-1.4673629999160767,
0.5074076652526855,
-0.4724649488925934,
0.8556239604949951,
0.7731216549873352,
0.30860722064971924,
0.5241492390632629,
-0.40590620040893555,
-0.053516291081905365,
0.2729504108428955,
0.023853395134210587... |
def get _ recommendation _ group ( self, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : kwargs ['_ return _ http _ data _ only'] = true if kwargs. get ('callback') : return self. get _ recommendation _ group _ with _ http _ info ( start, end, logged _ in _ user _ id, access _ token,... | [
-0.46106457710266113,
0.821394681930542,
0.6294994950294495,
0.37636685371398926,
-0.41582268476486206,
0.087481290102005,
-0.6932999491691589,
-0.9526246190071106,
-0.7122454643249512,
0.04059618338942528,
0.4778035879135132,
1.984967589378357,
-0.7368106245994568,
0.18085810542106628,
... |
def _ init _ bias ( self ) : if self. use _ bias = = true : self. bias = [ np. random. rand ( i, 1 ) for i in self. hidden _ dims ] else : self. bias = [ np. zeros ( ( i, 1 ) ) for i in self. hidden _ dims ] | [
-0.29336100816726685,
0.7004787921905518,
0.51987624168396,
0.3840523064136505,
0.9884804487228394,
0.18596939742565155,
0.610553503036499,
0.7907598614692688,
0.28388574719429016,
0.8501107096672058,
-0.911365270614624,
1.029931902885437,
-0.42729929089546204,
0.6227974891662598,
-0.068... |
def _ get _ post _ process _ props ( self, array ) : if'pavg'not in array. properties or \'pavg'not in array. output _ property _ arrays : self. _ add _ extra _ props ( array ) sph _ eval = self. _ get _ sph _ evaluator ( array ) sph _ eval. update _ particle _ arrays ( [ array ] ) sph _ eval. evaluate ( ) x, y, m, u, ... | [
-0.0926092118024826,
-1.0346623659133911,
0.5853925347328186,
-0.6816533803939819,
-1.0538707971572876,
0.26049986481666565,
0.08970943838357925,
-0.15426334738731384,
0.3682079315185547,
0.10564778745174408,
-0.06370187550783157,
0.037343986332416534,
-0.2532530426979065,
0.31373110413551... |
def grad _ xy ( self, sv, gtype ='tri') : if gtype = ='tri': assert ( len ( sv ) = = self. n _ tverts ), " length of array passed to grad is not tri _ verts length " sd = self. verts _ to _ verts ( sv, gtype ='tri') # interpolate to verts of dual mesh gs _ tri = ( 1 / self. tri _ edge _ len ) * np. dot ( self. delta _ ... | [
-0.18890704214572906,
-0.11931309849023819,
0.8116533756256104,
-0.4363686740398407,
-0.7455227971076965,
0.475040465593338,
0.5974246859550476,
-0.40764880180358887,
-0.053901556879282,
0.5647228956222534,
-0.022178448736667633,
0.43689674139022827,
-0.19753113389015198,
0.814655125141143... |
def addchatwidget ( self, chat _ widget ) : raise notimplementederror | [
-0.1875951588153839,
-0.24567517638206482,
0.5619253516197205,
0.1589590609073639,
-0.05461464077234268,
1.4372812509536743,
-0.5508812069892883,
0.25314995646476746,
0.0705261304974556,
-0.569669783115387,
-0.19145728647708893,
0.00051709363469854,
-0.06988731771707535,
0.8907530307769775... |
def test _ valid _ read ( self ) : valid1 ='f00000001'message = read _ message ( valid1, _ proto _ version ) self. assertisinstance ( message, protocolerrormessage ) self. assertequal ( message. code, 1 ) | [
-0.14918600022792816,
0.32414767146110535,
0.5080891847610474,
0.4387578070163727,
-0.0877780020236969,
0.5938409566879272,
-0.3533133864402771,
0.011970432475209236,
0.14722292125225067,
-1.0119153261184692,
0.5358012914657593,
0.0317579060792923,
-1.0944174528121948,
-0.83284592628479,
... |
def getinput ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ getinput ( self, * args ) | [
-0.055031947791576385,
0.6739383935928345,
0.7353130578994751,
0.3170766234397888,
-0.06896408647298813,
1.249297022819519,
0.02809273637831211,
0.06622827053070068,
0.05616431683301926,
-0.32038846611976624,
-0.2921864688396454,
0.6959693431854248,
-0.6212314963340759,
-1.4594184160232544... |
def d2logpdf _ dlink2 ( self, link _ f, y, y _ metadata = none ) : return - y / ( link _ f * * 2 ) | [
-0.14037470519542694,
-1.0066006183624268,
0.5798602104187012,
-0.05288184806704521,
0.40441977977752686,
-0.388763427734375,
-0.2519655227661133,
0.21266530454158783,
-0.8296787142753601,
-1.4221330881118774,
0.7472960948944092,
1.1369205713272095,
0.7312341928482056,
-0.271065890789032,
... |
def organisation _ id ( self, organisation _ id ) : if organisation _ id is none : raise valueerror ( " invalid value for ` organisation _ id `, must not be ` none ` " ) # noqa : e501 self. _ organisation _ id = organisation _ id | [
1.0024075508117676,
0.012016098015010357,
-0.40270790457725525,
0.5673794150352478,
0.7233907580375671,
0.2883569002151489,
-0.15454831719398499,
1.4748611450195312,
0.26757681369781494,
0.5343917012214661,
-0.13746437430381775,
0.3086598515510559,
-0.2368926703929901,
0.5737705826759338,
... |
def parse ( scanner, error _ logger ) : try : return parse _ program ( scanner ) except parseerror as error : got = scanner. peek ( ) expected = " or ". join ( str ( t ) for t in error. expected ) message = f " got { got } but expected { expected }. " error _ logger. log ( bmc. errors. reportableerror ( message, got ) ... | [
0.6427658796310425,
-0.09761718660593033,
0.44207119941711426,
-0.03779444098472595,
-0.636521577835083,
-0.30345889925956726,
0.15998882055282593,
0.34079188108444214,
0.5666967034339905,
-0.7341569662094116,
0.46245089173316956,
-0.6380834579467773,
-0.019746625795960426,
-0.266974776983... |
def process _ set _ speed _ cmd ( self, t, dt ) : assert ( type ( self. speed _ cmd ). _ _ name _ _ = ='setspeedcmd') v _ c = self. speed _ cmd. v _ c self. platform. speed _ cmd ( v _ c ) | [
0.5458474159240723,
-0.438518762588501,
0.3831406235694885,
0.3156385123729706,
1.3657236099243164,
0.28858354687690735,
0.965543270111084,
-0.6794178485870361,
-0.863983690738678,
0.3216155469417572,
-0.18248265981674194,
0.7498282194137573,
0.34645798802375793,
1.2449783086776733,
0.77... |
def insulin _ decay _ concentration ( self, c0, timedelta, insulin _ type ) : ct = c0 * np. exp ( - self. gamma [ insulin _ type ] * tohour ( timedelta ) ) if ct < 0. 001 : ct = 0 return ct | [
-0.08736090362071991,
-0.8479113578796387,
0.33525365591049194,
-0.056961219757795334,
0.5579273700714111,
0.1857370138168335,
0.16539640724658966,
0.09320839494466782,
-0.8057906627655029,
0.042327139526605606,
0.5322552919387817,
0.15629884600639343,
-0.7423000931739807,
0.42411464452743... |
def _ _ init _ _ ( self, nfeat, nhid, noutput, dropout, alpha, nheads ) : super ( spgat, self ). _ _ init _ _ ( ) # print ( " init spgat........ " ) self. dropout = dropout self. attentions = nn. modulelist ( [ spgraphattentionlayer ( nfeat, nhid, dropout = dropout, alpha = alpha, concat = true ) for _ in range ( nhead... | [
0.34714773297309875,
-0.06950247287750244,
0.5749948620796204,
0.24494846165180206,
-0.47857749462127686,
0.05735735595226288,
0.666697084903717,
-0.3344592750072479,
0.38926151394844055,
-0.18806028366088867,
0.11770596355199814,
0.10566350817680359,
0.12638799846172333,
0.799747765064239... |
def execute ( self, context ) : while true : if self. timetorun ( ) : result = self. run ( ) self. ioc. getlogger ( ). debug ( " scheduled command result of [ { 0 } ] was [ { 1 } ] ". format ( self. _ _ class _ _. _ _ name _ _, result ), verbose = true ) self. ioc. getlogger ( ). info ( " scheduled command [ { 0 } ] ha... | [
-0.742997944355011,
-0.38739240169525146,
0.9174515008926392,
-0.5304661393165588,
0.5670520663261414,
-0.21313950419425964,
0.032615531235933304,
0.11940443515777588,
-0.4659874141216278,
-0.2925589680671692,
-0.9397845268249512,
0.2560776174068451,
-0.45961707830429077,
-0.08970229327678... |
def diff _ of _ means ( data _ 1, data _ 2 ) : # the difference of means of data _ 1, data _ 2 : diff diff = np. mean ( data _ 1 ) - np. mean ( data _ 2 ) return diff | [
-0.34651920199394226,
-0.20667943358421326,
0.6604019403457642,
-0.5189605355262756,
0.12539228796958923,
0.5275063514709473,
-0.678596019744873,
-0.3230303227901459,
0.14152589440345764,
0.0438927486538887,
-0.07477329671382904,
1.737323522567749,
0.15013787150382996,
0.2624951899051666,
... |
def _ prepare _ update ( self, name : str, resource : str ) - > str : renamed _ resource = none if os. path. exists ( resource ) : # we're updating so we need to rename the current file to allow restore on errs renamed _ resource = resource + str ( time. time ( ) ) os. rename ( resource, renamed _ resource ) self. log.... | [
-0.16115865111351013,
-1.7945654392242432,
0.5160331130027771,
-0.8973076939582825,
-1.1633336544036865,
0.17960181832313538,
-0.8904781937599182,
-0.1875135451555252,
0.2917841970920563,
1.3501261472702026,
0.8705200552940369,
-0.05541681870818138,
0.6037706732749939,
-0.01123273652046918... |
def test _ length ( self ) : arr = array ( 10 ) arr [ 0 ] = 10 arr [ 1 ] = 20 arr [ 2 ] = 30 arr [ 3 ] = 40 res = length ( arr ) self. assertequal ( res, 4 ) | [
0.6172574162483215,
-0.3122543394565582,
0.2677091062068939,
-0.41813647747039795,
0.6519171595573425,
0.7575157284736633,
0.38593167066574097,
0.25129711627960205,
1.1585594415664673,
0.06090591102838516,
-0.9456443786621094,
-0.8023694157600403,
-0.06944846361875534,
0.7335399985313416,
... |
def _ _ gt _ _ ( self, other ) : if type ( other ) is type ( self ) : if self. type! = other. type : return notimplemented elif isinstance ( other, discordentity ) : if self. type not in other. _ _ class _ _. _ _ name _ _ : return notimplemented else : return notimplemented return ( self. id > other. id ) | [
-1.1646705865859985,
-0.046930018812417984,
0.96925950050354,
-0.38667359948158264,
0.02919439971446991,
0.5052801966667175,
-0.3374798595905304,
-1.0115306377410889,
-0.09840701520442963,
0.024611789733171463,
-0.4900089502334595,
0.05511075258255005,
0.23057524859905243,
1.15099155902862... |
def get _ current _ domain ( ) : return getattr ( _ thread _ locals,'domain ', none ) | [
-0.4462887644767761,
-0.5983123183250427,
0.41424721479415894,
0.16013076901435852,
0.6342558860778809,
-0.25850972533226013,
0.6727563738822937,
-1.0392743349075317,
-0.5586309432983398,
-0.9908668398857117,
0.09360538423061371,
1.5842273235321045,
-0.643626868724823,
-0.17754004895687103... |
async def accept _ invite ( self, ctx : ctx, game _ id : int ) : game = ctx. bot. client. get _ game ( game _ id ) ctx. session. accept _ inivitation ( game ) await ctx. send ('accepted invitation.') | [
0.11137430369853973,
0.22894179821014404,
0.5820325016975403,
-0.11646747589111328,
-0.1679096817970276,
0.8263778686523438,
-0.8744446039199829,
0.3595855236053467,
-0.17007321119308472,
1.1886286735534668,
-0.5337575674057007,
1.7894004583358765,
-1.1807153224945068,
-0.02787428349256515... |
def list _ to _ tuple ( maybe _ list ) : if isinstance ( maybe _ list, list ) : return tuple ( maybe _ list ) return maybe _ list | [
-1.1143471002578735,
0.7374299168586731,
0.23402951657772064,
0.4668591618537903,
0.3667847514152527,
-0.3239039480686188,
-0.615990400314331,
0.5709317326545715,
0.9039459228515625,
0.27262821793556213,
-0.8240106105804443,
-0.4143546223640442,
-0.8420242071151733,
0.9989426136016846,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.