text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def lstm _ model3 ( ) : n _ epochs = 3 n _ batch _ size = 64 lstm _ size = 32 learining _ rate = 0. 0001 decay _ rate = 0. 2 activation _ func ='softmax'loss _ func ='categorical _ crossentropy'val _ split = 0. 1 print ('\ n \ n'+'training lstm 3...') train _ x _ pickles = [ name for name in os. listdir ( os. path. abs... | [
-0.2481013834476471,
0.47598734498023987,
0.801324725151062,
-0.05444706231355667,
0.5190716981887817,
0.4748663902282715,
0.005480742081999779,
0.1339789479970932,
-0.10602030903100967,
0.44585323333740234,
-0.6430822014808655,
-0.17308813333511353,
0.5744239687919617,
-0.7798686623573303... |
def pack _ features _ vector ( features, labels ) : features = tf. stack ( list ( features. values ( ) ), axis = 1 ) return features, labels | [
-1.1070829629898071,
0.22669145464897156,
0.3306783437728882,
0.11989781260490417,
0.4756031632423401,
-0.05738241225481033,
-0.1967800259590149,
0.29283028841018677,
-0.5255231857299805,
0.2926470935344696,
-0.498012900352478,
0.6417705416679382,
0.3623470067977905,
-0.30973532795906067,
... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, restpcrjobcreate ) : return false return self. to _ dict ( ) = = other. to _ dict ( ) | [
-0.2937769293785095,
0.06752515584230423,
0.5533838868141174,
0.0005261623882688582,
-0.1694662868976593,
0.6143847703933716,
-0.9817308783531189,
-0.9007556438446045,
-0.3056669533252716,
-0.808347761631012,
-1.1553784608840942,
-0.46584662795066833,
-1.2847439050674438,
-0.34464478492736... |
def _ check _ syringe _ number ( self, n ) : if n not in ( 1, 2 ) : raise pumperror ( " % s : invalid syringe number'% s '. must be 1 or 2. " % ( self. name, n ) ) | [
-0.8863486051559448,
0.717553973197937,
0.2575855255126953,
0.35536226630210876,
-0.2600404918193817,
0.4370191693305969,
0.5002976655960083,
0.24623821675777435,
-0.43791037797927856,
0.03483642637729645,
-0.4233841300010681,
0.18732503056526184,
-0.17275768518447876,
0.793747067451477,
... |
async def test _ sign _ endorse _ recursive ( image _ config : imageconfig ) : # stack representation of a binary tree stack = [ { " name " : "? - unsigned ", " image _ config " : deepcopy ( image _ config ) } ] logger. debug ( " unsigned canonical digest : % s ", image _ config. get _ digest _ canonical ( ) ) async de... | [
0.16761183738708496,
0.8785606026649475,
0.8495463132858276,
0.1564064770936966,
-0.13795727491378784,
-0.5823796391487122,
0.3596561849117279,
0.224965438246727,
-0.031712520867586136,
0.4073944091796875,
-0.1987719088792801,
0.08531926572322845,
-0.5121434926986694,
1.3851534128189087,
... |
def test _ write _ offset _ ascii ( ) : path = tempfile. mkstemp ( ) [ - 1 ] try : writer. write _ file ( path,'abc ','w') writer. write _ file ( path,'def ','a ', offset = 1 ) writer. write _ file ( path,'\ u00a9hi ','w ', offset = 2 ) writer. write _ file ( path,'\ u0113kl ','a ', offset = 4 ) with open ( path,'rb') ... | [
0.14648409187793732,
-0.21503357589244843,
0.5554413199424744,
-0.8618242144584656,
0.10810009390115738,
0.7179849147796631,
0.7362890839576721,
0.16853801906108856,
-0.5139253735542297,
0.22446438670158386,
-0.20335082709789276,
-0.48387396335601807,
0.18617504835128784,
0.017021249979734... |
def skip _ test ( ) : return _ grpc _ unavailable | [
-0.14131179451942444,
0.23632028698921204,
0.33493784070014954,
-0.20388716459274292,
0.12314888089895248,
1.2248485088348389,
1.6666133403778076,
-0.5728838443756104,
-0.12304031103849411,
0.35599854588508606,
0.0782724916934967,
0.41787198185920715,
-2.130720615386963,
-1.668617248535156... |
def step ( self, key ) : edge = self. current. to _ edge ( key ) self. current = self [ edge ] print ( " step : " + str ( edge ) ) | [
-1.0267137289047241,
0.000017660420780885033,
0.30201786756515503,
-0.28777411580085754,
-0.2702127695083618,
0.3444201648235321,
0.43908169865608215,
0.36304762959480286,
-0.6477869153022766,
0.7536516785621643,
-0.582042396068573,
0.710085391998291,
-0.487998902797699,
0.4289501905441284... |
def get _ gcode _ rectangle ( ll, w, h, border, pendown, penup, s0 = 3000, s1 = 1000 ) : # goto point ll first : gcode ='\ n ; draw bounding box rectangle \ n'gcode + = " g0 f { } x { } y { } \ n ". format ( s0, ll [ 0 ] - border, ll [ 1 ] - border ) # now start drawing ( ccw ) : gcode + = pendown gcode + = " g1 f { } ... | [
0.34898319840431213,
-0.333086222410202,
0.9191058278083801,
-0.5135822296142578,
-0.4636126756668091,
0.04853423684835434,
0.014110630378127098,
-0.6144299507141113,
-0.2602357566356659,
-0.43257811665534973,
-0.09755989164113998,
0.7567176222801208,
-0.5346398949623108,
0.136972129344940... |
def get _ team _ matchups ( self, team _ id, format ='json') : response = self. get ( self. base _ url + " team / " + str ( self. game ) + ". l. " + str ( self. league ) + ". t. " + str ( team _ id ) + " / matchups / ", format ='json') raw _ matchup _ data = response ['fantasy _ content'] ['team'] [ 1 ] ['matchups'] ma... | [
-0.5695940256118774,
-0.3003953695297241,
1.0044697523117065,
-0.7139442563056946,
0.6943263411521912,
-0.729873776435852,
-0.7700374722480774,
-0.75105220079422,
0.30553191900253296,
0.11922071874141693,
0.12271146476268768,
-0.09910823404788971,
0.6291621923446655,
0.5620968341827393,
... |
def test _ multiple _ timezones ( self ) : def mock _ get _ history _ db _ config ( db ) : return { " bar _ size " : " 5 mins ", " universes " : [ " aapl - arb " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ", " low " : " float ", " volume " : " float " } } de... | [
-0.09779809415340424,
0.27834826707839966,
1.0416611433029175,
0.6134824752807617,
0.8539770841598511,
0.1718013435602188,
0.8158608675003052,
-0.3813480734825134,
-0.38162949681282043,
-0.05401143804192543,
-0.6534173488616943,
-0.5005634427070618,
-0.04544849321246147,
0.2245836406946182... |
def setseriesformat ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterirgbus3irgbus2 _ setseriesformat ( self, * args ) | [
-0.8460210561752319,
-0.2848772704601288,
0.22206147015094757,
0.22075380384922028,
-0.030193964019417763,
-0.19136270880699158,
-0.16868005692958832,
-0.21260198950767517,
0.09476126730442047,
-0.02977038361132145,
-0.43314918875694275,
1.6630971431732178,
-0.7406531572341919,
-0.21222138... |
def bigsmall _ partfrac ( eigenvec, masses, thresh = 1 ) : numpart = len ( eigenvec [ :, 0 ] ) / 2 amp = eigenvec [ 0 : numpart, : ] * * 2 + eigenvec [ numpart : 2 * numpart, : ] * * 2 big = masses > thresh small = masses < = thresh bpf = np. sum ( amp [ big, : ], axis = 0 ) spf = np. sum ( amp [ small, : ], axis = 0 )... | [
0.612346351146698,
0.23786237835884094,
0.6191021203994751,
-0.1447162628173828,
0.28929999470710754,
-0.20818360149860382,
0.680148184299469,
-0.6324409246444702,
-0.2685632109642029,
-0.39045026898384094,
-0.30096307396888733,
0.28902995586395264,
-0.19860242307186127,
0.2098931223154068... |
def _ translate _ _ interfaces _ state _ interface _ ipv4 _ address ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. prefix _ length. _ changed ( ) : input _ yang _ obj. prefix _ length = input _ yang _ obj. prefix _ length if input _ yang _ obj. netmask. _ changed ( ) : input _ yang _ ob... | [
-0.7251428365707397,
-0.44968336820602417,
0.33563631772994995,
-0.8877754211425781,
-0.4387798011302948,
-0.158269003033638,
1.4066416025161743,
-0.11531573534011841,
1.4049922227859497,
0.35852599143981934,
-0.40642568469047546,
0.13575656712055206,
0.13250544667243958,
-0.39650347828865... |
def _ _ neg _ _ ( self ) : o = self. pub. group. order ( ) new _ a = - self. a new _ b = - self. b if self. k is not none and self. m is not none : new _ k = ( o - self. k ) % o new _ m = - self. m else : new _ k = none new _ m = none return ct ( self. pub, new _ a, new _ b, new _ k, new _ m ) | [
-0.247287780046463,
-0.4024716317653656,
0.6454119086265564,
0.23708651959896088,
-0.22973793745040894,
-0.23596180975437164,
-0.29406625032424927,
0.054949644953012466,
-0.32104751467704773,
-0.35330915451049805,
0.9929328560829163,
-0.6721519231796265,
-0.7272972464561462,
0.098149217665... |
def combine ( * args ) : largs = len ( args ) arrays = args [ : largs / 2 ] ants = args [ largs / 2 : ] # calculate the new shape d = { } for arr, ant in zip ( arrays, ants ) : shape = arr. shape for nodeid, depth in zip ( ant, shape ) : if nodeid in d : continue else : d [ nodeid ] = depth new _ shape = tuple ( [ d [ ... | [
0.3103240728378296,
-0.34223294258117676,
0.723829448223114,
-0.5178645849227905,
0.26615089178085327,
0.4260842204093933,
-0.02797325886785984,
0.06034674867987633,
-0.19720178842544556,
0.053123656660318375,
0.1049625426530838,
0.2863374948501587,
0.5899205207824707,
0.1446755975484848,
... |
def update _ image ( ) : # todo : get feed as video stream instead of image sequence global updating _ image global image image _ str = urlopen ( " http : / / via. placeholder. com / 640x480 / " + rand _ colour ( ) ). read ( ) # http : / / robot. sr / static / image. jpg image _ file = io. bytesio ( image _ str ) image... | [
-1.2409467697143555,
-0.03306308388710022,
0.3867914080619812,
-0.6372972726821899,
-0.47319793701171875,
0.032982151955366135,
-0.23095132410526276,
-0.0419764369726181,
-0.389702707529068,
0.3703062832355499,
-0.036057256162166595,
0.8631480932235718,
-0.4399057924747467,
0.6721203327178... |
def eight ( ) : return [ [ 0, 1, 1, 0 ], [ 1, 0, 0, 1 ], [ 1, 0, 0, 1 ], [ 0, 1, 1, 0 ], [ 1, 0, 0, 1 ], [ 1, 0, 0, 1 ], [ 0, 1, 1, 0 ], ] | [
-0.6530632376670837,
-0.294905424118042,
0.680615246295929,
-0.2202070653438568,
0.6516162753105164,
0.00013868242967873812,
0.45915961265563965,
-0.44043517112731934,
0.6676953434944153,
0.1750141829252243,
-1.2143982648849487,
-0.12387946993112564,
0.00948023796081543,
-0.268617272377014... |
def toggles _ enabled _ for _ email _ domain ( email ) : return { toggle _ name for toggle _ name, toggle in all _ toggles _ by _ name ( ). items ( ) if toggle. enabled ( email, namespace _ email _ domain ) } | [
-0.3720909655094147,
0.30479052662849426,
0.43936893343925476,
0.050709716975688934,
-0.7445324659347534,
-0.35992366075515747,
-0.49350425601005554,
0.5756723284721375,
0.5748298764228821,
0.9274494051933289,
-0.9201666712760925,
0.33380258083343506,
-0.25759875774383545,
0.70983660221099... |
def printpaginatedfeed ( self, feed, print _ method ) : ctr = 0 while feed : # print contents of current feed ctr = print _ method ( feed = feed, ctr = ctr ) # prepare for next feed iteration next = feed. getnextlink ( ) feed = none if next : if self. promptoperationshouldcontinue ( ) : # another feed is available, and... | [
-0.0008046591538004577,
-0.8754909634590149,
0.5626407861709595,
0.05026775971055031,
0.05463268607854843,
-0.42359498143196106,
-0.3414064645767212,
-1.323717474937439,
-0.22271785140037537,
-0.7496027946472168,
0.9334751963615417,
0.4790077209472656,
-1.0603914260864258,
0.25892290472984... |
def orderbook _ generator ( last _ update _ id : int, symbol : str, block _ size : optional [ int ] = 5 _ 000, return _ copy : bool = true, ) - > generator [ fullbook, none, none ] : database = config. db _ name db = database ( config. db _ name, db _ url = f " http : / / { config. host _ name } : 8123 / " ) client = c... | [
-0.8285403251647949,
-0.23560848832130432,
0.984181821346283,
0.5431697368621826,
-0.4990227222442627,
-0.17510893940925598,
0.3436335623264313,
-0.2682138979434967,
-0.12227317690849304,
0.18540266156196594,
0.08195316046476364,
0.09054577350616455,
-0.37668561935424805,
0.346589982509613... |
def enclosed _ mass ( pos, mass ) : r = ( pos [ :, 0 ] * * 2 + pos [ :, 1 ] * * 2 + pos [ :, 2 ] * * 2 ) * * 0. 5 dr = np. linspace ( 0, 300, 20 ) cm = np. zeros ( len ( dr ) ) for i in range ( len ( dr ) ) : index = np. where ( r < dr [ i ] ) cm [ i ] = np. sum ( mass [ index ] ) return dr, cm | [
0.2257726639509201,
-0.7606611251831055,
0.739624559879303,
-0.9106023907661438,
-0.5678704380989075,
0.4343728721141815,
0.7871292233467102,
-0.13373218476772308,
-0.021721117198467255,
-0.18733663856983185,
-0.14513029158115387,
0.1310674101114273,
-0.39131516218185425,
0.423414021730423... |
def intercept ( x, y, a ) : # todo : check that the docstring is correct return y - a * x | [
0.5648637413978577,
-0.3491908609867096,
0.3683912456035614,
-0.6266525983810425,
-0.48411163687705994,
0.20467278361320496,
0.7160501480102539,
0.31736689805984497,
0.4544922411441803,
0.012647786177694798,
0.7991238832473755,
1.0257844924926758,
0.26069870591163635,
-0.7186240553855896,
... |
def has _ item ( self, text = none, * * kwargs ) : if text : # check if an item exists based on the text of that item xpath = self. text _ matching. format ( txt = quote ( text ) ) elif self. valid _ attrs & set ( kwargs. keys ( ) ) : # check if an item exists based on an attribute, if it is one of the valid _ attrs at... | [
-0.5450018644332886,
0.27459511160850525,
0.637798011302948,
0.3740991950035095,
-0.4300622344017029,
0.7316980361938477,
-0.4090633988380432,
0.7867631316184998,
0.07941721379756927,
-0.4356502890586853,
0.4705626666545868,
-0.4781382083892822,
-0.30194956064224243,
0.3227594494819641,
... |
def new _ game ( board, players, victory ) : for civ in players : print ( civ. start ) for home in civ. start : for ter in board : if home = = ter : ter. owner = civ turn = 1 return take _ turn ( board, players, turn, victory, orders = [ ] ) | [
0.487809956073761,
-0.48427093029022217,
0.5016278028488159,
1.3921375274658203,
0.8258417844772339,
-0.30069205164909363,
-0.045657627284526825,
0.6940852403640747,
-0.35285845398902893,
1.0421583652496338,
0.36990290880203247,
0.13555733859539032,
-0.3676300048828125,
-0.1257156282663345... |
def set _ autologin ( self, username, do _ autologin, default _ desktop _ environment ) : | [
-1.5593892335891724,
0.0890924260020256,
0.12451339513063431,
2.195624351501465,
-0.08429301530122757,
0.06193666532635689,
1.2254600524902344,
0.12698405981063843,
-0.18763890862464905,
-0.40489256381988525,
-1.2330535650253296,
0.7069262862205505,
-0.0762888491153717,
0.07168515771627426... |
def _ printpostorder ( self, node = none, traversal = [ ] ) : if node : traversal = self. _ printpostorder ( node. left, traversal ) traversal = self. _ printpostorder ( node. right, traversal ) traversal. append ( str ( node. data ) ) return traversal | [
-0.5597203969955444,
0.015555955469608307,
0.6248119473457336,
-0.3146194517612457,
-1.009887933731079,
-0.149791419506073,
-1.5437365770339966,
-0.33580416440963745,
-0.1350294053554535,
0.13102416694164276,
-0.4882178008556366,
-0.29967379570007324,
-0.5163512229919434,
1.115125179290771... |
def resource _ filter _ rules ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input ['integrationresourcefilterruleargs'] ] ] ] : return pulumi. get ( self, " resource _ filter _ rules " ) | [
0.077006496489048,
0.3457414507865906,
0.34877240657806396,
-0.13593265414237976,
0.7697554230690002,
1.3865357637405396,
0.773766279220581,
-0.03072323277592659,
0.1214691698551178,
0.7321328520774841,
0.0782153457403183,
0.6752066016197205,
-0.38428792357444763,
-0.43633371591567993,
-... |
def getbuffer ( self ) : return bytearray ( ) | [
-0.1337895542383194,
-0.6177829504013062,
0.6384801268577576,
0.5203725695610046,
0.049009058624506,
0.2643437087535858,
0.09987960755825043,
-0.5939731001853943,
0.4290059506893158,
-1.9533034563064575,
-0.5953901410102844,
0.8523749113082886,
-1.6879042387008667,
0.9927560091018677,
-0... |
def owner ( self ) : answer = self. _ call ('owner') return answer. owner | [
0.2933897376060486,
0.282196581363678,
0.20269596576690674,
2.250600576400757,
0.21348579227924347,
-0.0763261467218399,
0.7659929990768433,
-1.2052769660949707,
0.5533188581466675,
-1.6304206848144531,
0.25195828080177307,
0.9155823588371277,
-0.8560411334037781,
-1.5426908731460571,
0.... |
def enablekeepcleans ( mode ) : return none | [
0.589118242263794,
-0.2127740979194641,
0.3668610155582428,
0.0785551369190216,
0.0070420256815850735,
1.5183135271072388,
0.046197015792131424,
0.04811723902821541,
0.5089185833930969,
-1.1567561626434326,
-1.389617919921875,
-0.8710920214653015,
-0.7246406078338623,
-0.38194504380226135,... |
def test _ user _ consent _ skipped ( self ) : data = {'client _ id': self. client _ with _ no _ consent. client _ id,'redirect _ uri': self. client _ with _ no _ consent. default _ redirect _ uri,'response _ type':'code ','scope':'openid email ','state': self. state,'allow':'accept ', } request = self. factory. post (... | [
-0.03966434672474861,
0.515256941318512,
0.7159748077392578,
0.7292081713676453,
-0.024104196578264236,
0.24049946665763855,
0.4092060625553131,
-0.5822113752365112,
0.5371738076210022,
-0.10572299361228943,
0.16288374364376068,
0.19952495396137238,
-0.14464189112186432,
-0.530050396919250... |
def _ _ init _ _ ( self ) : # each entry is going to be a dictionary with the keys'statement'and'activity'self. statements = [ { " statement " : " ", " activity " : false } ] # index 0 that is automatically added self. length = 1 | [
-0.11941805481910706,
-0.4955737590789795,
0.2985920310020447,
-0.40151160955429077,
0.001865185098722577,
0.007763804867863655,
0.501593291759491,
0.629006564617157,
0.49710747599601746,
0.32090580463409424,
-0.3015994131565094,
-0.7218640446662903,
-1.3030304908752441,
0.9267023205757141... |
def _ _ init _ _ ( self, dao ) : ramstkdatamodel. _ _ init _ _ ( self, dao ) # initialize private dictionary attributes. # initialize private list attributes. # initialize private scalar attributes. # initialize public dictionary attributes. # initialize public list attributes. # initialize public scalar attributes. | [
0.3722361922264099,
1.0546834468841553,
0.29684266448020935,
0.5539317727088928,
-0.4482816457748413,
0.03158815577626228,
0.5501273274421692,
0.7113972902297974,
0.06017693504691124,
-0.31318628787994385,
-1.4681899547576904,
-0.2643171548843384,
1.0946868658065796,
0.41355806589126587,
... |
def stop ( self ) : self. logger. info ( " stopping % s... " % self. name ) self. stopped = true | [
-0.8235660195350647,
-0.7117444276809692,
0.1508571058511734,
-0.6688057780265808,
0.2003084123134613,
0.8892049193382263,
-0.019807981327176094,
1.0547075271606445,
-1.0562947988510132,
-0.0776640772819519,
-1.077565312385559,
0.5098702907562256,
-0.27469363808631897,
-0.05134150758385658... |
def compare _ residuals ( y _ pred, y _ axis, subtitles, title ) : fig, axes = plt. subplots ( 1, len ( subtitles ), figsize = ( 15, 5 ) ) fig. suptitle ( title ) for i in range ( 3 ) : axes [ i ]. scatter ( y _ pred [ subtitles [ i ] ], y _ axis [ subtitles [ i ] ] ) axes [ i ]. title. set _ text ( subtitles [ i ] ) e... | [
0.5966280698776245,
-0.25412285327911377,
0.9058445692062378,
-0.4684975743293762,
-0.4814946949481964,
1.17585289478302,
0.1361856311559677,
0.7280675768852234,
-0.4931209087371826,
0.08899286389350891,
-0.011925037950277328,
1.3003942966461182,
-0.48259222507476807,
-0.2736363410949707,
... |
def group _ score ( ns ) : score = 0 objs = preference. objects for n1 in ns : for n2 in ns : if n1! = n2 : filt = objs. filter ( user = n1, choice = n2 ) if len ( filt ) > 0 : score + = filt [ 0 ]. weight return score | [
-0.6565190553665161,
0.35265055298805237,
0.5453366637229919,
0.21915455162525177,
-0.1372695416212082,
0.03228813782334328,
0.35011792182922363,
-1.7374608516693115,
0.014593350701034069,
1.0031442642211914,
0.31661853194236755,
0.39909377694129944,
-0.2415314018726349,
0.7870786786079407... |
def write _ data ( data _ set ) : with open ( distinct _ list, " w " ) as f : for i in data _ set. collect ( ) : f. write ( str ( i ) + " \ n " ) with open ( count, " w " ) as f : f. write ( f " count : \ n { str ( data _ set. count ( ) ) } " ) print ( " two files written successfully " ) | [
-0.023654237389564514,
-0.7896623611450195,
0.3656076192855835,
-0.8672507405281067,
1.0785502195358276,
1.0543068647384644,
0.2823467552661896,
0.9986758232116699,
-0.3908778131008148,
-0.6169140338897705,
-0.5233733057975769,
0.1569049209356308,
1.014426827430725,
0.5488875508308411,
0... |
def enlarge _ image ( image : np. ndarray, ratio : int ) - > np. ndarray : return np. kron ( image, np. ones ( ( ratio, ratio ), dtype = " uint8 " ) ) | [
-0.042308878153562546,
1.1891279220581055,
0.5738568305969238,
0.3821423053741455,
-0.3051883578300476,
-0.09956540167331696,
-0.8804320096969604,
-0.009939536452293396,
0.8123611211776733,
0.6765992641448975,
0.9071282148361206,
0.09369363635778427,
0.18422119319438934,
0.3260726034641266... |
def to _ matrix ( self ) : cos = math. cos ( self. params [ 0 ] / 2 ) sin = math. sin ( self. params [ 0 ] / 2 ) return numpy. array ( [ [ cos, - 1j * sin ], [ - 1j * sin, cos ] ], dtype = complex ) | [
-1.180809736251831,
-1.0600640773773193,
0.5398499369621277,
-0.10536608099937439,
1.1173136234283447,
-0.14977668225765228,
0.6561373472213745,
0.11146573722362518,
0.2389141470193863,
0.2096797078847885,
-0.28160980343818665,
0.2707879841327667,
-0.26253148913383484,
-0.16274113953113556... |
def draw _ scalebar ( self, canvas ) : scale _ bar _ width = 50 # pixels scale _ bar _ x = 150 # x location scale _ bar _ y = 20 # y location scale _ value = scale _ bar _ width * self. meters _ per _ px if scale _ value > 1000 : scale _ text = u " %. 1f km " % ( scale _ value / 1000. 0 ) else : scale _ text = u " % d ... | [
-0.04019942879676819,
0.07586999237537384,
1.0222525596618652,
-1.1495912075042725,
-0.5084121823310852,
1.0650947093963623,
-0.3663225769996643,
-0.8807658553123474,
-0.43876349925994873,
-0.16638624668121338,
0.4282706677913666,
0.0784844309091568,
-0.155616894364357,
0.6633173823356628,... |
def path ( self, path ) : if self. local _ vars _ configuration. client _ side _ validation and path is none : # noqa : e501 raise valueerror ( " invalid value for ` path `, must not be ` none ` " ) # noqa : e501 self. _ path = path | [
0.3039078116416931,
-0.10987067967653275,
-0.1761980652809143,
-0.08014217764139175,
-0.19588124752044678,
0.7946354746818542,
0.8898139595985413,
-0.2895370125770569,
-0.4426019787788391,
-0.0263481717556715,
-0.3961973190307617,
-0.19358935952186584,
-0.6130257248878479,
0.37173533439636... |
def is _ timestamp ( timestamp ) : try : return isinstance ( read _ timestamp ( timestamp ), datetime ) except valueerror : return false | [
-0.6953741312026978,
0.8199127316474915,
0.4144101142883301,
0.8582863807678223,
0.14481136202812195,
-0.4071645140647888,
-1.104225516319275,
-0.44665130972862244,
1.6606428623199463,
0.6406691670417786,
0.574797511100769,
-0.6172137260437012,
-0.4259791970252991,
-1.1971584558486938,
-... |
def validate _ and _ parse _ external _ labels ( raw _ labels ) : error _ message = " external - labels malformed json " if not raw _ labels : # empty string return { } try : parsed _ labels = json. loads ( raw _ labels ) except ( valueerror, typeerror ) : raise externallabelparseerror ( " { 0 } : { 1 } ". format ( err... | [
-1.0926223993301392,
-0.6127642393112183,
0.9092344641685486,
-1.3304698467254639,
-1.2349879741668701,
0.30839991569519043,
-1.1204392910003662,
-0.2819991409778595,
-0.02416643500328064,
0.7668466567993164,
0.36204585433006287,
0.28376176953315735,
-0.24723412096500397,
0.556346595287323... |
def region _ around _ line ( lamda, flux, continuum ) : # create wavelength mask to isolate the areas of the continuum # this is where we will fit a polynomial cont _ mask1 = ( lamda > continuum [ 0 ] [ 0 ] ) & ( lamda < continuum [ 0 ] [ 1 ] ) cont _ mask2 = ( lamda > continuum [ 1 ] [ 0 ] ) & ( lamda < continuum [ 1 ... | [
0.9646812081336975,
-0.44822970032691956,
0.8258695602416992,
-0.06394540518522263,
0.24921578168869019,
0.14492876827716827,
0.185770645737648,
-0.06017092242836952,
-0.509211540222168,
-0.5658066868782043,
-0.3112552762031555,
0.8702817559242249,
-0.7861190438270569,
0.15832947194576263,... |
def viscosity _ dilute ( fluid, t, e _ k, sigma ) : tstar = t / e _ k molemass = props ( fluid,'molemass') if fluid = ='propane'or fluid = ='refprop - propane': a = [ 0. 25104574, - 0. 47271238, 0, 0. 060836515, 0 ] theta _ star = exp ( a [ 0 ] * pow ( log ( tstar ), 0 ) + a [ 1 ] * pow ( log ( tstar ), 1 ) + a [ 3 ] *... | [
0.07761746644973755,
-0.8262557983398438,
1.0186516046524048,
-0.9797145128250122,
-0.23797133564949036,
-0.4127863049507141,
0.09156978875398636,
0.41638827323913574,
0.07808099687099457,
0.6533421277999878,
0.4988614618778229,
-0.0988510474562645,
0.19256028532981873,
0.4849085211753845,... |
def log _ response _ text ( self, format, * args ) : self. globals. _ logger. debug ( format, * args ) | [
-0.1910208910703659,
-0.8094139099121094,
0.509898841381073,
-0.5800450444221497,
0.37087592482566833,
0.051214396953582764,
-0.578058660030365,
-0.3957970440387726,
-0.08324648439884186,
-0.6116911172866821,
-0.3462194800376892,
-0.05034938454627991,
-0.2136966437101364,
0.565882325172424... |
def id ( self ) : return self. _ data _ id | [
0.9065467119216919,
-0.5989954471588135,
0.13313840329647064,
-0.021050233393907547,
0.6735943555831909,
1.9147794246673584,
0.06728187948465347,
0.5429116487503052,
1.1624077558517456,
-1.1245408058166504,
-0.4134848713874817,
1.3916523456573486,
-0.3054090738296509,
0.09606577455997467,
... |
def jaccard _ distance _ loss ( y _ true, y _ pred, smooth = 100 ) : intersection = k. sum ( k. abs ( y _ true * y _ pred ), axis = - 1 ) sum _ = k. sum ( k. abs ( y _ true ) + k. abs ( y _ pred ), axis = - 1 ) jac = ( intersection + smooth ) / ( sum _ - intersection + smooth ) return ( 1 - jac ) * smooth | [
0.9939579367637634,
-0.2794235348701477,
0.8451364636421204,
-0.12436674535274506,
-1.1414310932159424,
0.5760838985443115,
0.6620890498161316,
0.22901353240013123,
-0.1632489562034607,
1.0995478630065918,
0.21474625170230865,
0.6585870385169983,
0.7301459908485413,
0.3934745490550995,
0... |
def reset ( self ) : logging. debug ('resetting the environment') self. handeye. set _ random _ positions ( ) return tuple ( self. _ observe ( ) ) | [
-0.8442884087562561,
0.5316489338874817,
0.27221569418907166,
-0.35263684391975403,
1.089312195777893,
0.3550850749015808,
0.554328978061676,
-0.8376835584640503,
-0.7824875116348267,
0.6085689663887024,
-0.25914064049720764,
-0.1623246967792511,
-0.7147469520568848,
-0.16757017374038696,
... |
def showtoptendomains ( ) : labels, sizes = pie _ chart. _ _ gettoptendomains ( ) pie _ chart. _ _ show ( labels, sizes ) | [
-0.3342522084712982,
0.41719651222229004,
0.27282199263572693,
-1.3228144645690918,
-0.5670351982116699,
-0.13318710029125214,
0.7023158669471741,
-0.11194570362567902,
0.8996182680130005,
-0.22947204113006592,
-0.4972395598888397,
1.67469322681427,
0.5427367687225342,
-0.05048376694321632... |
def _ display _ compiled _ sql ( self ) : database _ name = self. evolver. database _ name with sqlexecutor ( database = database _ name ) as executor : for i, task in enumerate ( self. evolver. tasks ) : if task. sql : if i > 0 : self. stdout. write ('\ n') self. stdout. write ('- - % s \ n'% task ) for statement in e... | [
0.8752155303955078,
0.0816378965973854,
0.9128226637840271,
0.4714718163013458,
-0.1083880215883255,
0.0275579821318388,
0.0665309876203537,
0.11252442002296448,
-0.7550343871116638,
0.546790361404419,
0.29745805263519287,
0.5462159514427185,
0.9166291356086731,
1.8256968259811401,
-0.94... |
def create _ article ( filename = " sample. rst ", title = " sample title ", summary = " sample summary ", body _ rst = " ", body _ html = " ", * * kwargs ) : return article. objects. create ( filename = filename, title = title, summary = summary, body _ rst = body _ rst, body _ html = body _ html, * * kwargs ) | [
0.472347617149353,
-0.5884304642677307,
0.5219669342041016,
0.41840609908103943,
-0.04052792862057686,
0.6882753372192383,
-0.4689160883426666,
0.2644822597503662,
-1.1001590490341187,
0.18195457756519318,
-0.24936141073703766,
0.19145210087299347,
-0.6296003460884094,
-0.30250784754753113... |
def main _ allstars _ mixup ( ) : _ python, _ cmd, wisdomfile, timingfile = sys. argv what ='580'# what ='295'assert what in wisdomfile # otw fix save mechanism _ wdb, results, _ rng = cpickle. load ( open ( wisdomfile ) ) timings = cpickle. load ( open ( timingfile ) ) print " len timings ", len ( timings ) print " n ... | [
0.1178198978304863,
0.5977103114128113,
0.9569514393806458,
0.11232585459947586,
-0.6586913466453552,
0.6410181522369385,
1.471300721168518,
0.13973364233970642,
-0.06426738947629929,
0.43297943472862244,
0.42024093866348267,
0.6827197670936584,
-0.2967638671398163,
1.0986071825027466,
0... |
def yearly _ totals ( station, year : str ) : sensor _ l, change = get _ sensorlist ( station, year, get _ filename ) if not change : print ('no _ sc') return yearly _ total _ nosc ( station, year, 1 ) else : print ('sc') return sensor _ change _ totals ( station, year, sensor _ l ) | [
-0.296847939491272,
-0.12222211062908173,
0.6550449728965759,
0.11496848613023758,
-0.469466894865036,
-0.563140869140625,
-0.1986611783504486,
-0.2700883448123932,
0.45678654313087463,
0.48213231563568115,
-0.4221448302268982,
0.18806634843349457,
0.5559080839157104,
0.5188044905662537,
... |
def test _ _ sticker _ _ sort ( ) : sticker _ 0 = sticker. precreate ( 202201070038, sort _ value = 0 ) sticker _ 1 = sticker. precreate ( 202201070039, sort _ value = 4 ) sticker _ 2 = sticker. precreate ( 202201070040, sort _ value = 0 ) vampytest. assert _ eq ( sorted ( [ sticker _ 0, sticker _ 1, sticker _ 2 ] ), [... | [
0.2922897934913635,
0.3141886591911316,
0.5278914570808411,
0.8241824507713318,
-0.2699225842952728,
-0.006362420506775379,
0.8889602422714233,
-1.0237189531326294,
-0.6573597192764282,
-0.7503496408462524,
-0.6624269485473633,
-0.7358055114746094,
-0.898358941078186,
0.5994499921798706,
... |
def transcode _ type ( typ ) : if issubclass ( typ, miyagienum ) : # custom defined enumes return sqltypes. enum ( typ ) if issubclass ( typ, basedbobject ) : # objects classes transposed to object ids return sqltypes. integer for p _ type, sql _ type in typ _ map : if issubclass ( typ, p _ type ) : return sql _ type #... | [
-0.34735536575317383,
-0.40814903378486633,
0.5994483232498169,
-0.1676267385482788,
-0.30829542875289917,
-0.3565029799938202,
0.1037391871213913,
-0.9137060046195984,
0.9563429355621338,
0.9481192231178284,
-0.6341479420661926,
0.27160799503326416,
-1.1291598081588745,
0.4883337318897247... |
def getcondensedgame ( self, id ) : return self. getgame ( id, self. game _ type _ condensed ) | [
0.08029360324144363,
-0.537993311882019,
0.4896550178527832,
-0.1509152352809906,
0.34399059414863586,
0.2042631357908249,
-0.8880546689033508,
-1.2906439304351807,
0.4457736611366272,
0.4040873944759369,
0.261729896068573,
-0.007026676554232836,
-1.3706910610198975,
0.36612653732299805,
... |
def bio _ tagging _ sentence ( dataentry ) : # get text of entry text _ entry = dataentry [ 0 ] # get opinion entries entry = next ( iter ( dataentry [ 1 ]. values ( ) ) ) # catch aspect + polarity asp _ pol = [ entry [ t ] [ 3 ] +':'+ entry [ t ] [ 4 ] for t in range ( 0, len ( entry ) ) ] # split text in several part... | [
0.10002166032791138,
-0.6993818283081055,
0.9218239188194275,
-0.7924423813819885,
-0.32788950204849243,
-0.3318150043487549,
0.012027936987578869,
0.12692691385746002,
-0.10341526567935944,
1.7150853872299194,
-0.040607720613479614,
-0.533822774887085,
-0.1330929696559906,
0.1599592864513... |
def get _ osprofile ( self ) : return volatilityapi ( self. memfile ). imageinfo ( ) [ " data " ] [ 0 ] [ " osprofile " ] | [
0.7669807076454163,
0.4999522864818573,
0.5628101825714111,
0.388933390378952,
-0.24572528898715973,
-0.35780951380729675,
-0.053516194224357605,
-1.113508701324463,
-0.14486217498779297,
0.5104448795318604,
0.021828673779964447,
-0.0622318796813488,
-1.2056927680969238,
0.1364150643348693... |
def _ _ iter _ _ ( self ) : return self | [
-0.055189017206430435,
-1.4576222896575928,
0.3461218476295471,
-0.4219405949115753,
0.17060209810733795,
0.9722643494606018,
0.8084100484848022,
-0.9788270592689514,
0.1594383716583252,
-0.9698985815048218,
0.4417203664779663,
0.44769418239593506,
-0.2483890950679779,
-0.6105359196662903,... |
def _ _ init _ _ ( self, evmananger ) : self. evmananger = evmananger self. evmananger. registerlistener ( self ) self. sector = none | [
0.3760792016983032,
-0.7754953503608704,
0.5746725797653198,
-0.1952226161956787,
0.05545327812433243,
0.2708514630794525,
-0.1052396222949028,
-0.10658442974090576,
0.7639554738998413,
-0.7545243501663208,
-0.3539392948150635,
-0.6142460703849792,
0.17408214509487152,
1.8645423650741577,
... |
def get _ nsr ( self, nsid ) : osm _ url = f " https : / / { self. ip } : 9999 / osm / nslcm / v1 / ns _ instances / { nsid } " # get the nsr from ns id in json format while true : headers = {'content - type':'application / json ','accept':'application / json ','authorization': f'bearer { self. token } ', } response = ... | [
-0.547349750995636,
0.274277925491333,
0.5144307017326355,
-0.7415959239006042,
-0.243628591299057,
-0.8413879871368408,
-1.6869394779205322,
-1.5712016820907593,
0.3132120668888092,
0.06944688409566879,
-0.4266851544380188,
1.0369175672531128,
-0.9094841480255127,
0.23158033192157745,
0... |
def genmultinames ( num _ names ) : middle _ init = list ( string. ascii _ uppercase ) surnames = " surnames " christ _ names = " christian names " surname _ range = 161 christ _ range = 37 for idx in range ( num _ names ) : gen _ name = " " sur _ idx = random. randint ( 1, surname _ range ) christ _ idx = random. rand... | [
-0.5209964513778687,
-0.017877858132123947,
0.8307642340660095,
-0.3226180076599121,
0.27980995178222656,
0.374375581741333,
-0.16577111184597015,
-0.13410133123397827,
0.2582615613937378,
-0.10130127519369125,
-0.8849362134933472,
0.04194561019539833,
0.09341711550951004,
0.28094637393951... |
def _ _ init _ _ ( self, data ) : self. data = data | [
0.05404865741729736,
-0.6508681178092957,
0.2699657678604126,
-0.4160911738872528,
-0.411212295293808,
0.9590455293655396,
-0.5436856746673584,
0.15768329799175262,
0.6140961050987244,
-1.0196408033370972,
-0.6171919107437134,
0.45450109243392944,
0.028715869411826134,
0.5290269255638123,
... |
def rmse ( true _ data, pred _ data, t _ column = " tmsp ", coordinate _ columns = ( " x ", " y " ) ) : if type ( true _ data )! = type ( pred _ data ) : raise typeerror ( " true and pred data should have the same type. " ) if isinstance ( true _ data, pd. dataframe ) : true _ data, pred _ data = synchronize _ trajecto... | [
-0.011222983710467815,
0.19763164222240448,
0.6185035109519958,
-0.6414859294891357,
-0.030366359278559685,
-0.04491354152560234,
-0.1688399463891983,
0.5886696577072144,
-1.2094544172286987,
1.2700144052505493,
-0.08722328394651413,
1.182008981704712,
-0.11140702664852142,
-0.439402192831... |
def prune _ a _ loads ( tlrfiles ) : outs = [ ] last _ monddyy = none for tlrfile in reversed ( tlrfiles ) : monddyy, oflsv = tlrfile. split ( " / " ) [ - 3 : - 1 ] if monddyy = = last _ monddyy and oflsv = = " oflsa " : continue else : outs. append ( tlrfile ) last _ monddyy = monddyy return list ( reversed ( outs ) ) | [
0.1537821888923645,
-0.9084567427635193,
0.7189668416976929,
-0.606765866279602,
0.033434316515922546,
-0.32351621985435486,
0.25032392144203186,
-0.5939582586288452,
0.4565216600894928,
0.8211373686790466,
1.1496036052703857,
-0.8554937839508057,
-0.14359624683856964,
0.4717039465904236,
... |
def update _ session ( self, ip, date _ time ) : curr _ session = self. ip _ session _ data [ ip ] self. session _ queue. remove ( ip ) curr _ session. set _ last _ session _ time ( date _ time ) curr _ session. increment _ doc ( ) self. ip _ session _ data [ ip ] = curr _ session self. session _ queue. append ( ip ) p... | [
-1.378526210784912,
-0.5469413995742798,
0.5233641266822815,
0.36675670742988586,
-0.8180559873580933,
-0.20902414619922638,
-0.5556098818778992,
-0.24770963191986084,
0.6915748715400696,
0.9131104350090027,
-0.35186463594436646,
-0.24530284106731415,
0.19095484912395477,
-0.65596491098403... |
def get _ changelog _ url ( ver : str ) - > str : ver _ ref = ver. replace ( '. ','' ) return f'{ changelog _ url } # { ver _ ref } ' | [
0.16722527146339417,
-0.4031067490577698,
0.3533066511154175,
-0.5328806042671204,
-0.8041859269142151,
0.2234712541103363,
0.20058511197566986,
0.283035546541214,
-0.5596768260002136,
0.9004139304161072,
-0.5090382099151611,
0.865014910697937,
-0.05317593365907669,
0.42109981179237366,
... |
def inverse ( self ) : return rxgate ( - self. params [ 0 ] ) | [
0.6531680226325989,
-0.2312728464603424,
0.5222957730293274,
-0.26082736253738403,
0.19982263445854187,
0.14971962571144104,
-0.7632824182510376,
0.03380010649561882,
-0.7719101905822754,
0.04214635118842125,
0.43736401200294495,
1.0995153188705444,
-2.0771050453186035,
-0.1660176813602447... |
def train _ test ( ) : semcor = semcor ( 2 ) _ train ( semcor, sc _ token _ ft _ small,'002') | [
0.4870879650115967,
0.6481649279594421,
0.17051470279693604,
-0.06909220665693283,
0.07152445614337921,
-1.3398995399475098,
0.2930088937282562,
0.29622021317481995,
-0.04319962114095688,
-0.6018896102905273,
-0.972553551197052,
0.16429534554481506,
0.2032327651977539,
-0.9271848797798157,... |
def send _ thank _ you ( self ) : alt _ choices = { # dict of functions to show donor list or to quit'' : {'function': self. exit _ screen },'quit': {'function': self. exit _ screen },'list': {'function': self. collection. print _ donors } } print ( " \ n " ) # get the donor name, show all donors, or quit response = se... | [
0.25064677000045776,
0.22938692569732666,
0.7276012897491455,
0.5130610466003418,
-0.03200424835085869,
-0.3858201503753662,
0.28138989210128784,
-0.41215652227401733,
0.3554523289203644,
-0.17764456570148468,
-0.20514452457427979,
0.6420135498046875,
0.3756070137023926,
1.0415351390838623... |
def from _ pickle ( cls, filename = none ) : with open ( filename, " rb " ) as file : res = pickle. load ( file ) if res. _ _ class _ _! = cls : raise typeerror ( " the loaded object is not a datadump " ) return res | [
0.012719128280878067,
0.20766273140907288,
0.47352391481399536,
-0.5205261707305908,
-0.06811841577291489,
0.037242840975522995,
0.17180533707141876,
0.09756994992494583,
0.5533967018127441,
-0.8342313170433044,
-0.6595054268836975,
-0.35389503836631775,
0.20393741130828857,
-0.89311999082... |
def _ get _ double _ key _ value ( key : str, value : float ) - > model _ pb2. keyvalue : return model _ pb2. keyvalue ( key = key, v _ float64 = value, v _ type = model _ pb2. valuetype. float64 ) | [
-0.0386359877884388,
0.27938270568847656,
0.645521879196167,
0.7279648184776306,
-0.27488192915916443,
0.254876047372818,
-0.5730628371238708,
-0.9380149245262146,
-1.6531165838241577,
0.7297550439834595,
0.09199706465005875,
0.47483736276626587,
0.5845017433166504,
0.4019066393375397,
0... |
def status ( self ) - > str : return self. _ get _ detail ( " status " ) | [
0.0800790786743164,
-0.4544222056865692,
0.1331281065940857,
0.8787639141082764,
0.7081161737442017,
0.6650233864784241,
-0.4722258448600769,
0.3367869555950165,
0.662962019443512,
-0.20724348723888397,
-0.45419737696647644,
0.9552636742591858,
0.4009443521499634,
-0.32938724756240845,
0... |
def test _ subparsers _ dest ( self ) : self. assertequal ( subparsers. dest, " action " ) | [
0.3998046815395355,
-0.81984543800354,
0.3438733220100403,
-0.39264044165611267,
0.12758854031562805,
1.4629111289978027,
-0.6401368379592896,
-0.14365684986114502,
0.014525994658470154,
-0.09330488741397858,
-0.6330403089523315,
0.4728679358959198,
-0.11692772060632706,
-0.045115061104297... |
def test _ conjecture _ on _ type ( cartan _ type ) : a = cartantype ( cartan _ type ). cartan _ matrix ( ) n = a. ncols ( ) # hack : type d is not well understood by quivermutationtype so we pass it along if we can try : qm = quivermutationtype ( cartan _ type ) except : qm = none # list all matrices to test to _ chec... | [
-0.7410323023796082,
-0.01142689399421215,
0.6203044652938843,
0.26580917835235596,
0.37765347957611084,
-0.05352587625384331,
0.4656088054180145,
-0.5188180804252625,
0.2765226364135742,
-0.43553754687309265,
-0.458464115858078,
0.18454091250896454,
-0.5265198349952698,
0.6604734659194946... |
def _ to _ voxel _ coordinates _ notint ( streamline, lin _ t, offset ) : inds = np. dot ( streamline, lin _ t ) inds + = offset if inds. min ( ). round ( decimals = 6 ) < 0 : raise indexerror ('streamline has points that map to negative voxel'' indices') return inds | [
-0.37288588285446167,
-0.6070343255996704,
0.5057564377784729,
-0.5859856009483337,
-0.33824673295021057,
0.7948838472366333,
-0.4786096215248108,
-0.418626993894577,
0.08580558001995087,
0.6194268465042114,
0.21281786262989044,
-0.4441489577293396,
-0.2195436805486679,
-0.5809471607208252... |
def numeral ( number ) : remainder = number converted = " " special _ snowflakes = { " i ", " x ", " c " } for i, value in enumerate ( values ) : number _ of _ this _ char, remainder = remainder / / value, remainder % value if romans [ i ] in special _ snowflakes and number _ of _ this _ char = = 4 : previous _ char _ ... | [
-0.2304011881351471,
0.1626294106245041,
0.7061149477958679,
-0.3734813630580902,
-0.5360323190689087,
-0.40549910068511963,
0.5256104469299316,
-0.4187459945678711,
1.1746808290481567,
0.11532537639141083,
-0.5823419094085693,
-0.31547877192497253,
-0.6922569870948792,
-0.1344977915287017... |
def _ generate _ app _ access _ token ( self, app _ id, app _ secret ) : # access tokens default _ access _ token = facepy. get _ application _ access _ token ( application _ id = app _ id, application _ secret _ key = app _ secret ) graph = facepy. graphapi ( default _ access _ token ) response = graph. get ( path ='o... | [
0.3767736852169037,
-0.278805673122406,
0.3517386317253113,
0.012423958629369736,
0.11763905733823776,
-0.0387255884706974,
-0.4623025059700012,
0.2542937695980072,
-0.17171448469161987,
0.25415685772895813,
1.1520702838897705,
0.919944167137146,
0.8647826910018921,
-0.10691533237695694,
... |
def _ _ str _ hr _ log ( log2 _ x : int ) - > str : measuresnames = [ " bytes ", " kb ", " mb ", " gb ", " tb ", " pb " ] for i in range ( len ( measuresnames ) ) : if ( log2 _ x < = ( i + 1 ) * 10 ) : return str ( 2 * * ( log2 _ x - i * 10 ) ) + " " + measuresnames [ i ] return str ( 2 * * ( log2 _ x - len ( measuresn... | [
0.3098457157611847,
-0.32355478405952454,
0.9326735734939575,
-0.4790683388710022,
-0.8808519840240479,
0.7075716853141785,
-0.7743170261383057,
-0.901463508605957,
-1.0645517110824585,
0.2352171242237091,
-0.12612850964069366,
0.17522665858268738,
0.29189714789390564,
-0.24988368153572083... |
def _ pass _ list ( self ) - > list [ dict [ str, any ] ] : stops : list [ dict [ str, any ] ] = [ ] for stop in self. journey. passlist. basicstop : index = stop. get ( " index " ) station = stop. location. station. hafasname. text. text station _ id = stop. location. station. externalid. text stops. append ( { " inde... | [
-2.0596728324890137,
-0.484247624874115,
0.424106240272522,
-0.34779608249664307,
-0.10724218934774399,
0.5670609474182129,
-1.1645015478134155,
0.6298356056213379,
-0.7092919945716858,
0.7610210180282593,
-0.5230796933174133,
-1.4406085014343262,
0.7598401308059692,
-0.08161094039678574,
... |
def fix _ coordinates ( user _ input : dict ) - > dict : # ensure coordinates have acceptable length for the netatmo api for coordinate in ( conf _ lat _ ne, conf _ lat _ sw, conf _ lon _ ne, conf _ lon _ sw ) : if len ( str ( user _ input [ coordinate ] ). split ( ". " ) [ 1 ] ) < 7 : user _ input [ coordinate ] = use... | [
-0.5748944282531738,
-0.1598823368549347,
0.6807894110679626,
-0.7368173599243164,
-0.7308780550956726,
0.4967154264450073,
0.12438065558671951,
0.06931907683610916,
-0.21023114025592804,
0.08791908621788025,
-0.09070093929767609,
-0.2740211486816406,
0.35178202390670776,
0.348670125007629... |
def number _ vs _ eta ( h, generator, survey, eta _ earth, n = 30, average = true, * * kwargs ) : categories = ['all ','eec ','hot ','warm ','cold'] n _ pl = { key : np. zeros ( ( len ( eta _ earth ), n ), dtype = int ) for key in categories } for j in util. bar ( range ( n ) ) : for i, e in enumerate ( eta _ earth ) :... | [
-1.0672687292099,
0.18668076395988464,
0.6555360555648804,
-0.5214009881019592,
0.1918700933456421,
0.4980515241622925,
0.7851753234863281,
-0.23739150166511536,
-0.8326619267463684,
0.376384437084198,
-0.7493700385093689,
-0.12880267202854156,
1.1607871055603027,
1.614898443222046,
0.17... |
def get _ url ( self, method ) : return f " { self. telegram _ api } " \ f " / bot " \ f " { self. bot _ token } " \ f " / { method } " | [
-0.5670225024223328,
0.09022755175828934,
0.5106478929519653,
-0.42356881499290466,
0.3875615894794464,
0.24795520305633545,
-0.9528284072875977,
-0.0831950381398201,
-1.3333381414413452,
-0.13809600472450256,
0.18566520512104034,
0.688182532787323,
-0.04043342545628548,
0.3099308311939239... |
def evalwrt ( self, u, p ) : if not isinstance ( u, list ) : u = [ u ] b = self. bfunsops ( u ) x = self. _ mat _ dot _ multi _ sp ( p, b ) return x | [
-0.4329395890235901,
0.18719114363193512,
0.5050791501998901,
-0.10395875573158264,
-0.25636178255081177,
0.03502393141388893,
-0.12690788507461548,
0.8293396830558777,
0.9316768050193787,
-0.18049757182598114,
-0.08484409004449844,
0.924904465675354,
-1.1133931875228882,
-0.26969179511070... |
def main ( self ) : while self. run : if self. mainscreen : pygame. display. set _ caption ( " presiona una tecla! " ) self. menu ( ) elif self. startgame : for event in pygame. event. get ( ) : if event. type = = pygame. quit : self. run = false self. exit _ game ( ) pygame. display. set _ caption ( caption ) pygame. ... | [
-0.403477281332016,
-0.6679592728614807,
0.8281314373016357,
0.5259318351745605,
0.3181969225406647,
0.34491169452667236,
-0.5736187100410461,
-0.6575160026550293,
0.14426815509796143,
0.15970590710639954,
0.32501134276390076,
-0.492863267660141,
-0.679625391960144,
0.6592168807983398,
0... |
def empty _ value ( self ) : return self. queryset. model. objects. none ( ) | [
-0.3174920678138733,
-0.1114688366651535,
0.35825076699256897,
-0.37470299005508423,
0.7651136517524719,
1.0166765451431274,
-0.43543651700019836,
-0.4745999276638031,
-0.6810101866722107,
-0.4469453692436218,
-0.55608731508255,
0.2649613916873932,
0.29369935393333435,
-0.04033084586262703... |
def get _ exons ( transcript ) : transcript _ strand = transcript. tx _ position. is _ forward _ strand if hasattr ( transcript. exons,'select _ related') : exons = list ( transcript. exons. select _ related ('tx _ position') ) else : exons = list ( transcript. exons ) exons. sort ( key = lambda exon : exon. tx _ posit... | [
0.7911447286605835,
-0.49552518129348755,
0.580156147480011,
0.527421236038208,
-0.6538099646568298,
-0.15203002095222473,
-0.3782842755317688,
0.15130937099456787,
0.7110187411308289,
0.5371021628379822,
-0.8397337198257446,
0.034564319998025894,
0.06282232701778412,
-0.4318005442619324,
... |
def precess _ b1950 _ to _ j2000 ( ra, decl, input = " sexigesimal ", output = " sexigesimal " ) : # convert equatorial coords to radians if input = = " sexigesimal " : ra = protractor. convert ( ra, " hmsstr ", " rad " ) decl = protractor. convert ( decl, " dmsstr ", " rad " ) else : ra = protractor. convert ( ra, inp... | [
-0.23786787688732147,
-1.1921625137329102,
1.0031538009643555,
-1.4444719552993774,
-0.15532322227954865,
-0.412465900182724,
0.0200898889452219,
0.645891547203064,
-0.04641055315732956,
0.27702346444129944,
-0.47710081934928894,
0.9608359932899475,
0.3284439444541931,
0.5876423716545105,
... |
async def xkcd ( self, ctx ) - > none : response = get ( " https : / / c. xkcd. com / random / comic / " ) soup = beautifulsoup ( response. content, " html. parser " ) img = soup. find _ all ( " div ", id = " comic " ) [ 0 ]. find _ all ( " img " ) [ 0 ] message = embed ( title = img [ " title " ] ) message. set _ imag... | [
0.20546573400497437,
0.7077559232711792,
0.813720703125,
-0.38393673300743103,
0.22412161529064178,
0.08926486223936081,
-0.9351081848144531,
0.028845736756920815,
-0.31785035133361816,
-0.16584008932113647,
0.1262427270412445,
0.575459361076355,
-0.44279319047927856,
0.38315778970718384,
... |
def _ generate _ quizpass ( self, session : session, user _ id : int ) - > quizpass : questions = random. sample ( self. questions, self. config. questions _ per _ quiz, ) return create _ quizpass ( session, user _ id, questions, self. config. correct _ answers _ required, ) | [
-0.503411054611206,
-0.8496010303497314,
0.2944757044315338,
0.6227772831916809,
-0.37677162885665894,
0.5456396341323853,
-0.066170834004879,
-1.0649687051773071,
1.0123568773269653,
-0.44945716857910156,
-0.3330516219139099,
-0.2201365977525711,
0.036565542221069336,
-0.2132411152124405,... |
def find _ nodes ( self, * * kwargs ) : found = [ ] for k in kwargs : s = set ( ) r = re. compile ( kwargs [ k ] ) nodes = self. redis. smembers ('{ } : i : n : { } '. format ( self. name, k ) ) for n in nodes : if r. search ( self. redis. hget ('{ } : n : { } : p '. format ( self. name, n ), k ) ) : s. add ( n ) found... | [
-0.7391249537467957,
0.5534496903419495,
0.5569584965705872,
0.13366404175758362,
0.7872253060340881,
-0.10343194007873535,
-0.5724822878837585,
0.060972511768341064,
-0.6723664999008179,
0.7913547158241272,
-0.2570653557777405,
-0.3231426775455475,
-1.0856919288635254,
0.2549964487552643,... |
def get _ voronoi _ generators ( self, g _ gauls, generators, gencode, snrcut, snrtop, snrbot, snrcutstack ) : from math import sqrt num = len ( g _ gauls [ 0 ] ) snr = n. asarray ( g _ gauls [ 1 ] ) / n. asarray ( g _ gauls [ 8 ] ) index = snr. argsort ( ) snr _ incr = snr [ index ] snr = snr _ incr [ : : - 1 ] x = n.... | [
-0.6236259937286377,
-0.2330288589000702,
0.6375487446784973,
-0.022578364238142967,
-0.5526458621025085,
-0.3234404921531677,
-0.25584545731544495,
-0.14140434563159943,
-0.4350447654724121,
0.6274514198303223,
0.14599253237247467,
0.27039870619773865,
-0.28532153367996216,
0.356506556272... |
def mod _ sigmoid _ beta ( z, scope ='', reuse = none ) : with tf. variable _ scope ('mod _ sigmoid _ beta _'+ scope, reuse = reuse ) : alpha = tf. get _ variable ('alpha ', [ ], dtype = tf. float32, initializer = tf. constant _ initializer ( 0. 0 ) ) beta = tf. get _ variable ('beta ', [ ], dtype = tf. float32, initia... | [
-0.6730210781097412,
-1.3504855632781982,
0.4409117102622986,
-0.2795172929763794,
-0.11782895773649216,
-0.5212318897247314,
1.5570181608200073,
0.031130297109484673,
0.3450978398323059,
-0.03383543714880943,
-0.15419259667396545,
0.18040885031223297,
-0.681129515171051,
-0.04629878327250... |
def static _ analysis ( self ) : results = [ ] is _ temp _ dir = false if not self. results. has _ key ( " procexedump " ) : dump _ dir = tempfile. mkdtemp ( ) res = self. procexedump ( dump _ dir = dump _ dir ) is _ temp _ dir = true else : dump _ dir = self. results [ " procexedump " ] [ " config " ] [ " dump _ dir "... | [
-1.0828496217727661,
0.3588345944881439,
0.6822195649147034,
-0.010696345008909702,
0.29922205209732056,
0.00749953743070364,
0.748993992805481,
0.02675331011414528,
0.057392437011003494,
0.03731945902109146,
0.029946962371468544,
-0.3545026183128357,
-0.1453825682401657,
1.008631110191345... |
def type ( self, type ) : self. _ type = type | [
-0.32935619354248047,
0.10083340108394623,
-0.26466044783592224,
0.12795951962471008,
0.665567934513092,
0.5896559953689575,
0.621394157409668,
-0.2589966058731079,
-0.23707804083824158,
-0.0581749863922596,
-0.7010132074356079,
0.19177821278572083,
-0.5846775770187378,
0.6979304552078247,... |
def _ _ init _ _ ( self, device _ name ='vvb011 ', host ='192. 168. 50. 238 ', port = 3, logger = none, dummy = false ) : # device name self. dev = device _ name # log self. log = loghandler ( logger = logger ) self. dummy = dummy self. ip ='http : / /'+ host self. port = str ( port ) body = { " code " : " request ", "... | [
0.11200927942991257,
0.37583136558532715,
0.8655224442481995,
-0.32948628067970276,
0.5011436939239502,
-0.06277970969676971,
0.006473015062510967,
-0.49433526396751404,
-0.3491949439048767,
-0.5610749125480652,
-0.2445802539587021,
1.1049038171768188,
-0.8533458113670349,
-0.2624182701110... |
def write ( self, std ) : if self. datatype = = " nil " : std. write ( " " ) elif self. datatype = = " float " : std. write ( self. value. hex ( ) ) else : std. write ( str ( self. value ) ) | [
0.10695946216583252,
-0.16028684377670288,
0.735488772392273,
-0.22368022799491882,
0.08992993086576462,
0.6614781022071838,
-0.3059205710887909,
0.32499200105667114,
-0.07037778943777084,
-0.5302835702896118,
-0.265167772769928,
0.5839108228683472,
0.047214627265930176,
1.4329853057861328... |
def ovo _ sklearn ( x _ train, y _ train, x _ val, y _ val, x _ test ) : clf = svm. svc ( c = 1. 0, kernel ='linear') clf. fit ( x _ train, y _ train ) y _ test = clf. predict ( x _ test ) y _ val _ hat = clf. predict ( x _ val ) misclassification _ error = np. mean ( y _ val _ hat! = y _ val ) print ('sklearn misclass... | [
0.11557766050100327,
-0.44724684953689575,
0.6357534527778625,
0.6889341473579407,
0.4520915150642395,
0.5477360486984253,
-0.053383421152830124,
0.3822520077228546,
0.20118755102157593,
-0.05893838778138161,
-0.3140256106853485,
1.2411162853240967,
0.9183073043823242,
0.31619080901145935,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.