text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def call _ phys _ space _ run ( cube1 _ file, cube2 _ file ) : # define the 1d spectral bins # nbins = 40 # bins = np. logspace ( math. log10 ( 0. 00702349679605685 ), # math. log10 ( 2. 81187396154818 ), # num = ( nbins + 1 ), endpoint = true ) bins = np. logspace ( math. log10 ( 0. 00765314 ), math. log10 ( 2. 499771... | [
0.3230084776878357,
-0.11295504122972488,
0.8676914572715759,
0.07898250222206116,
-0.349853515625,
0.6961678266525269,
-0.4832409620285034,
-0.3347603976726532,
-1.1118581295013428,
0.23335210978984833,
0.4005712568759918,
1.0732312202453613,
-0.575688898563385,
0.37171292304992676,
0.8... |
def play _ black _ card ( self ) : engine = db. create _ engine ('sqlite : / / / database / card. db') connection = engine. connect ( ) metadata = db. metadata ( ) prompts = db. table ('prompts ', metadata, autoload = true, autoload _ with = engine ) # limiting to cards with only one blank query = db. select ( [ prompt... | [
-0.44545260071754456,
-0.07952592521905899,
0.6907309293746948,
-0.3846227824687958,
0.8622860908508301,
-0.3514910340309143,
0.2945322096347809,
0.31499239802360535,
0.4799152910709381,
0.5021170377731323,
0.08390791714191437,
0.7927953004837036,
-0.37510916590690613,
0.05370854213833809,... |
def load _ feedbacks _ csv ( csv _ path ) : result = ordereddict ( ) if os. path. isfile ( csv _ path ) : last _ time = none for idx, row in pandas. read _ csv ( csv _ path ). iterrows ( ) : entry = ordereddict ( ) entry [ " id " ] = row [ " id " ] entry [ " label " ] = row [ " feedback _ label " ] cur _ time = int ( r... | [
-0.18110501766204834,
-0.18582870066165924,
0.574120819568634,
0.04771678149700165,
-0.40927520394325256,
-0.3515571355819702,
0.34687626361846924,
-1.1972726583480835,
0.28897738456726074,
-0.07860119640827179,
-0.6127542853355408,
-0.08660934865474701,
-0.316222220659256,
0.1155475303530... |
def addcomposite ( self, compfilter ) : self. _ checkuniquename ( self. _ compositefilters, compfilter. getname ( ) ) self. _ compositefilters. append ( compfilter ) self. subconfigadded. emit ( compfilter ) self. setdirty ( true ) | [
-0.7909323573112488,
-0.01702338084578514,
0.5813524127006531,
0.5131628513336182,
0.17345063388347626,
0.648002564907074,
0.3390713632106781,
-0.01631724275648594,
0.22279074788093567,
-0.40327343344688416,
-1.1085469722747803,
0.1739354431629181,
-1.1506744623184204,
0.6530994772911072,
... |
def print _ host _ node _ properties ( node ) : print ( " os : % s % s " % ( node. os _ type, node. os _ version ) ) print ( " discovered node id : % s " % node. discovered _ node _ id ) print ( " compute manager : % s " % node. managed _ by _ server ) | [
-0.0007875448791310191,
-0.596591055393219,
0.8561647534370422,
-0.48502740263938904,
0.020812824368476868,
0.8121211528778076,
-0.37668123841285706,
-0.14976999163627625,
-1.3447325229644775,
-0.30622124671936035,
0.1491980403661728,
1.4899613857269287,
0.049511563032865524,
0.54238563776... |
def get _ data _ path ( self, filename ) : current _ file _ dir = os. path. dirname ( _ _ file _ _ ) return os. path. join ( current _ file _ dir, ".. ", " data ", filename ) | [
-0.4195069968700409,
-0.17376936972141266,
0.3207910656929016,
0.17159807682037354,
0.2633907198905945,
1.3326373100280762,
0.9297425150871277,
0.19037996232509613,
-1.068843126296997,
-0.4947877824306488,
0.3699771761894226,
0.8490877747535706,
-0.19436047971248627,
0.8960707187652588,
... |
def opt _ merge _ max _ mappings ( dict1, dict2 ) : # we will iterate over ` other ` to populate ` merged ` merged, other = ( dict1, dcit2 ) if len ( dict1 ) > len ( dict2 ) else ( dict2, dict1 ) merged = dict ( merged ) for key in other : if key not in merged or other [ key ] > merged [ key ] : merged [ key ] = other ... | [
-0.9885426163673401,
0.46639004349708557,
0.7962115406990051,
-0.07979924231767654,
-0.7890278100967407,
0.07502789795398712,
-1.435052514076233,
-0.25152140855789185,
0.2694174349308014,
-0.4789153039455414,
-0.04571769759058952,
-0.13230328261852264,
0.06228748708963394,
0.50104981660842... |
def test _ list _ decimal _ min _ length _ 4 _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 5. xsd ", instance = " nistdata / list / ... | [
-0.18134328722953796,
-0.2242969423532486,
0.4145496189594269,
-0.00854936521500349,
-0.4269977807998657,
-0.182771235704422,
-0.34960034489631653,
-0.5166188478469849,
1.026286244392395,
-0.14481176435947418,
-1.299789547920227,
-0.46714046597480774,
-0.7398284077644348,
0.220682039856910... |
def created _ by ( self, created _ by ) : self. _ created _ by = created _ by | [
0.655271589756012,
-0.4578160345554352,
-0.22594381868839264,
1.1109287738800049,
0.8380870819091797,
0.6309686303138733,
1.270036220550537,
0.5159853100776672,
-1.3117762804031372,
-0.6973844766616821,
-0.8008920550346375,
-0.6482872366905212,
1.2569276094436646,
0.6665292382240295,
0.0... |
def cmo _ from _ targz ( targz ) : tempdir = unpack _ file _ in _ tempdir ( targz,'sirius. rst') sirius _ rst = siriusrestart ( os. path. join ( tempdir,'sirius. rst') ) cmo = sirius _ rst. cmo os. remove ( sirius _ rst. name ) os. rmdir ( tempdir ) return cmo | [
1.1317583322525024,
-1.550066351890564,
0.21876583993434906,
-0.5338115096092224,
-1.0693413019180298,
0.05752510577440262,
0.6347222924232483,
0.8954614400863647,
0.30133605003356934,
0.06537488847970963,
-0.3239239752292633,
0.16131407022476196,
-0.19596439599990845,
-0.03081364929676056... |
def conquer ( left, right ) : array = [ ] while left and right : if left [ 0 ] < = right [ 0 ] : array. append ( left. pop ( 0 ) ) else : array. append ( right. pop ( 0 ) ) return array + left + right | [
0.39073699712753296,
-0.31471434235572815,
0.8353872895240784,
0.8554355502128601,
0.21882657706737518,
-0.022001735866069794,
-1.4702026844024658,
-0.942274272441864,
-0.41656386852264404,
0.8507218360900879,
-0.7437314987182617,
0.419050008058548,
-0.4039251506328583,
0.42699843645095825... |
def list _ products _ as _ end _ user _ with _ options ( self, request : servicecatalog _ 20210901 _ models. listproductsasenduserrequest, runtime : util _ models. runtimeoptions, ) - > servicecatalog _ 20210901 _ models. listproductsasenduserresponse : utilclient. validate _ model ( request ) query = { } if not utilcl... | [
-1.9458988904953003,
0.18645085394382477,
0.8042439222335815,
-0.0185991358011961,
0.06992160528898239,
-0.03548269718885422,
-0.10174930840730667,
-1.4363682270050049,
0.3288857638835907,
0.9105628132820129,
-0.22064711153507233,
0.8362494707107544,
-0.19633638858795166,
0.489822000265121... |
def sense ( self, snake ) : vision _ array = np. zeros ( 3 * len ( self. directions ) ) # three values for each direction for i, direction in enumerate ( self. directions ) : vision _ array [ 3 * i : 3 * i + 3 ] = distancesensor. look _ in _ direction ( snake, direction ) return vision _ array | [
-1.118833303451538,
-0.31107795238494873,
0.45018938183784485,
-0.7066095471382141,
0.4823327362537384,
-0.21322743594646454,
-0.3305756151676178,
-0.07028906792402267,
1.0960532426834106,
0.7146795988082886,
-0.8765305876731873,
0.6356642246246338,
-0.41477397084236145,
0.0839792191982269... |
def featurescale ( x, xref = none ) : if xref is none : xref = x xprime = ( x - xref. min ( ) ) / ( xref. max ( ) - xref. min ( ) ) # if an entire column is nan, zero it out. if len ( xprime. shape ) > 1 : # pandas dataframe ( multi - dimensional ) nanseries = xprime. isnull ( ). all ( ) elif len ( xprime. shape ) = = ... | [
-0.09979163110256195,
0.6939125657081604,
0.5099339485168457,
0.34445658326148987,
-0.22342832386493683,
-0.5266212224960327,
-0.5666666030883789,
-0.1760660856962204,
-0.0584307499229908,
0.4060726463794708,
0.1827123612165451,
0.22150763869285583,
-0.2919979393482208,
0.00498401373624801... |
def disable _ root _ login ( ) : configuration _ file ='/ etc / ssh / sshd _ config'if not contains ( configuration _ file,'^ permitrootlogin no ', escape = false ) : # patterns before ='^ #? permitrootlogin. * $'after ='permitrootlogin no'sed ( configuration _ file, before, after, use _ sudo = true ) print ( green ('r... | [
0.4015105068683624,
-0.6555421352386475,
0.6711862683296204,
0.9630506038665771,
-0.7418188452720642,
0.9764201045036316,
0.2013421207666397,
1.415560245513916,
-0.1745859533548355,
-0.34521573781967163,
0.20995058119297028,
1.475563406944275,
-0.5786888599395752,
0.297781765460968,
1.07... |
def addtoplay ( self, music ) : if self. playing = = 1 or self. playing = = 2 : pygame. mixer. music. stop ( ) self. music. insert ( self. currentindex + 1, music ) self. updateinterface ( ) self. play _ over ( ) # self. letsplay ( ) else : self. music. insert ( 0, music ) self. updateinterface ( ) self. currentindex =... | [
-0.7922130823135376,
0.527323842048645,
0.8447264432907104,
0.1456897109746933,
0.39436227083206177,
1.713417649269104,
0.6055995225906372,
-0.6540452241897583,
0.32663851976394653,
0.05955038219690323,
-0.018808163702487946,
-0.27935874462127686,
-1.4336034059524536,
-0.27891212701797485,... |
def _ get _ encircled _ energy _ image ( im, center, frac = 0. 5 ) : yx _ centered = np. array ( ( np. indices ( im. shape ). t - center ). t ) # convert to radii rad _ coord = np. linalg. norm ( yx _ centered, axis = 0 ) radpix = pd. dataframe ( zip ( np. ravel ( rad _ coord ), np. ravel ( im ) ), columns = ['rad ','p... | [
0.1791238933801651,
-0.3258392810821533,
0.7386016249656677,
-0.9106813669204712,
-0.537032425403595,
-0.5917423367500305,
0.9535741209983826,
0.5246925950050354,
0.01574244163930416,
0.36700528860092163,
0.46140915155410767,
1.046398401260376,
0.11970572173595428,
0.5932327508926392,
1.... |
def xlabel ( self, v ='' ) : return str ( v ) | [
-0.21737374365329742,
-0.5323941111564636,
0.4095262885093689,
-0.647642195224762,
-0.5102310180664062,
1.289263129234314,
-1.1751216650009155,
-0.6136959195137024,
1.0194376707077026,
0.6869983077049255,
-0.17648828029632568,
0.5923108458518982,
-0.5465883016586304,
-1.4294319152832031,
... |
def assume _ role ( account _ id, role _ name = " organizationaccountaccessrole ", source _ role = none ) : role _ arn = f " arn : aws : iam : : { account _ id } : role / { role _ name } " if source _ role is none : sts _ client = boto3. client ( " sts " ) else : sts _ client = boto3. client ( " sts ", aws _ access _ k... | [
0.3783915340900421,
-0.685248076915741,
0.7655444741249084,
-0.7078497409820557,
-0.2891487181186676,
-0.14698076248168945,
0.10354504734277725,
0.31829699873924255,
0.7004544138908386,
0.8371368646621704,
-0.2035142332315445,
1.0767658948898315,
0.2629273235797882,
-0.06647472828626633,
... |
def count _ watch ( self ) : self. root. ids. watch _ count. text ='to watch : { }. watched : { } '. format ( self. my _ collection. count _ unwatch ( ), self. my _ collection. count _ watch ( ) ) | [
0.5860715508460999,
-0.902239203453064,
0.5126956105232239,
-0.6414145827293396,
0.7808859348297119,
0.3616481125354767,
0.6739316582679749,
0.4935726225376129,
-0.6816266179084778,
-0.017025919631123543,
-0.9734140038490295,
1.1436190605163574,
0.91400545835495,
0.7274593710899353,
0.33... |
def _ canonical _ dataset _ description ( cls, dataset _ description : typing. dict, *, set _ no _ value : bool = false ) - > typing. dict : # making a copy. dataset _ description = dict ( dataset _ description ) utils. filter _ local _ location _ uris ( dataset _ description, empty _ value = metadata _ base. no _ valu... | [
-0.5564735531806946,
0.5330491662025452,
0.35156914591789246,
-0.6591492295265198,
-0.8106973767280579,
-0.4558683931827545,
-0.3627300560474396,
0.7149704694747925,
-0.6784386038780212,
0.176573246717453,
1.2685492038726807,
1.0060347318649292,
0.8690492510795593,
0.4158712923526764,
0.... |
def magic _ cookie ( self ) : return stunmsg _ c. get _ magic ( self. _ buf ) | [
-0.11438962072134018,
0.13340388238430023,
0.44091400504112244,
-0.07182945311069489,
-0.39220625162124634,
-0.778120756149292,
0.8658447861671448,
-1.1176745891571045,
-0.35412847995758057,
-0.07057997584342957,
0.933294415473938,
0.9950583577156067,
0.02875896543264389,
-0.28038737177848... |
def payment _ method _ id ( self, payment _ method _ id ) : self. _ payment _ method _ id = payment _ method _ id | [
-0.06845008581876755,
-0.42762094736099243,
-0.522169828414917,
0.14402224123477936,
-0.1479603797197342,
0.20702514052391052,
-0.2298097461462021,
0.5607836842536926,
0.12673358619213104,
0.0359332300722599,
0.49140802025794983,
0.06248842552304268,
-0.025511180981993675,
0.57833284139633... |
def merge _ include _ coords ( self, rule ) : for cls in self. classes : if not hasattr ( rule, cls ) : continue for include in getattr ( rule, cls ) [ " includes " ] : if include not in self. mask _ coords. keys ( ) : continue self. mask _ coords [ cls ]. extend ( self. mask _ coords [ include ] ) | [
-0.10335472226142883,
-0.09589548408985138,
0.9186939597129822,
0.16592168807983398,
0.9659653306007385,
1.430126667022705,
0.7934861183166504,
0.09941231459379196,
0.8655440211296082,
0.07006778568029404,
0.0875481441617012,
0.0010669018374755979,
-0.1947682797908783,
0.5061624050140381,
... |
def deposit ( account : str, request : request ) - > response : asset _ code = request. post. get ( " asset _ code " ) stellar _ account = request. post. get ( " account " ) # verify that the request is valid. if not all ( [ asset _ code, stellar _ account ] ) : return render _ error _ response ( " ` asset _ code ` and... | [
0.4486086368560791,
0.3624662160873413,
0.6476830840110779,
-0.15181535482406616,
-0.4456257224082947,
-0.3003302216529846,
1.1424895524978638,
-0.05901963263750076,
-0.3879299461841583,
0.169448122382164,
0.020179089158773422,
-0.1821291148662567,
-0.1164296567440033,
-0.2651342451572418,... |
def format _ data ( observations, temp _ data, for _ prediction = false, verbose = true ) : doy _ series = temp _ data. doy. dropna ( ). unique ( ) doy _ series. sort ( ) temp _ data = temp _ data. pivot _ table ( index = ['site _ id ','year'], columns ='doy ', values ='temperature'). reset _ index ( ) # this first day... | [
-0.40615519881248474,
-0.14662973582744598,
0.5880972146987915,
-0.46669113636016846,
0.11598200350999832,
0.11913309246301651,
0.2958630323410034,
-0.09331689029932022,
-0.04540098085999489,
0.918756902217865,
0.4385294020175934,
0.19375234842300415,
0.9973233342170715,
0.9896689653396606... |
def sne _ hds _ similarities ( dsm _ hds, perp, compute _ log = true, start _ bs = np. ones ( shape = 1, dtype = np. float64 ) ) : if perp < = 1 : raise valueerror ( " " " error in function sne _ hds _ similarities of module leonardo _ dr. py : the perplexity should be > 1. " " " ) n = dsm _ hds. shape [ 0 ] if start _... | [
0.07053253054618835,
0.028428761288523674,
0.9842717051506042,
0.521898090839386,
-0.14905084669589996,
-0.46958792209625244,
-0.10309934616088867,
-0.13169746100902557,
-0.37237370014190674,
0.41013357043266296,
-0.26009276509284973,
0.38320618867874146,
0.225285604596138,
-0.172831833362... |
def sparse _ mx _ to _ torch _ sparse _ tensor ( sparse _ mx ) : sparse _ mx = sparse _ mx. tocoo ( ). astype ( np. float32 ) indices = torch. from _ numpy ( np. vstack ( ( sparse _ mx. row, sparse _ mx. col ) ). astype ( np. int64 ) ) values = torch. from _ numpy ( sparse _ mx. data ) shape = torch. size ( sparse _ mx... | [
1.0623819828033447,
-0.18085050582885742,
0.23998771607875824,
0.24106824398040771,
-0.7231690287590027,
0.3070794641971588,
-0.2917417287826538,
0.5074766874313354,
-0.20442324876785278,
0.4357130527496338,
-0.4854988753795624,
0.15789993107318878,
0.3254174292087555,
-1.4368306398391724,... |
def on _ key _ press ( self, key, modifiers ) : if key = = arcade. key. up or key = = arcade. key. w : if self. physics _ engine. is _ on _ ladder ( ) : self. player _ sprite. change _ y = player _ movement _ speed elif self. physics _ engine. can _ jump ( ) : self. player _ sprite. change _ y = player _ jump _ speed a... | [
-0.1101563423871994,
-0.0020408877171576023,
1.0122992992401123,
-0.06721954792737961,
0.029271360486745834,
-0.020774221047759056,
0.17869696021080017,
0.11972086876630783,
0.0815926119685173,
0.7492826581001282,
0.022493015974760056,
-0.24517346918582916,
-0.1784265786409378,
0.650128185... |
def list _ ( this, path : str, ancestors : bool = false, self : bool = true ) - > dict : return this. _ http. get ( path, ancestors = ancestors, self = self ) | [
-1.0007835626602173,
-0.02473072148859501,
0.5207183957099915,
-0.8465285301208496,
-0.707919180393219,
-0.5645015835762024,
-1.2026244401931763,
0.04510809853672981,
-0.5718815326690674,
0.363023042678833,
-0.40353313088417053,
0.49139371514320374,
0.5323399305343628,
0.3557521104812622,
... |
def sendall ( self ) : for node in self. nodes : if self. nodes [ node ]. tosend is not none : self. nodes [ node ]. send ( ) self. nodes [ node ]. hasliked = false self. nodes [ node ]. hasconsulted = false # to animate graph | [
-0.3106594383716583,
0.3758239150047302,
0.4182110130786896,
-0.28485459089279175,
0.05048535019159317,
0.047259870916604996,
0.396546334028244,
-0.16958889365196228,
-0.43188902735710144,
0.6114689707756042,
-0.34113505482673645,
1.043050765991211,
-0.48422759771347046,
1.3559784889221191... |
def monkey _ patch _ is _ volume _ backed _ instance ( ) : base _ api. api. powervc _ mod _ is _ volume _ backed _ instance = \ base _ api. api. is _ volume _ backed _ instance def powervc _ mod _ is _ volume _ backed _ instance ( self, context, instance, bdms = none ) : service = service _ obj. service. get _ by _ com... | [
-0.5030315518379211,
-0.7021529674530029,
0.8573110103607178,
0.10296399891376495,
0.20920363068580627,
0.5045299530029297,
-0.27142566442489624,
0.4862723648548126,
0.3080783188343048,
0.5704492330551147,
0.5470605492591858,
1.110082745552063,
-0.7464143633842468,
0.2191019356250763,
-0... |
def test _ trim _ 2 ( self ) : # test no points are above 10 h = 10 self. amp. planartrim ( h, plane = 2 ) self. assertlessequal ( self. amp. vert [ :, 2 ]. max ( ), h ) # test no points are above 0 h = 0 self. amp. planartrim ( h, plane = 2 ) self. assertlessequal ( self. amp. vert [ :, 2 ]. max ( ), h ) | [
0.6931698322296143,
0.03940410166978836,
0.5378820300102234,
0.7745251655578613,
0.21113431453704834,
1.3816723823547363,
-0.0631827786564827,
-0.6482049226760864,
-0.018602028489112854,
-0.4076109230518341,
-0.8024483323097229,
-0.1693115234375,
0.08116919547319412,
0.061798762530088425,
... |
def to _ protobuf ( self ) : opts = dict ( variance = self. variance. to _ protobuf ( ), compact _ theta = self. theta _ sketch. serialize ( ), histogram = self. histogram. serialize ( ), frequent _ numbers = self. frequent _ numbers. to _ protobuf ( ), ) if self. floats. count > 0 : opts [ " doubles " ] = self. floats... | [
-0.6302816271781921,
0.6568049192428589,
0.3379380702972412,
-0.5342715382575989,
0.5707867741584778,
-0.018922291696071625,
0.2197445034980774,
-1.1827507019042969,
0.43938037753105164,
-0.7017322182655334,
-0.9720668792724609,
-0.24582143127918243,
-0.49171167612075806,
0.950992822647094... |
def mavlink _ packet ( m ) : global g _ module _ context state = g _ module _ context. mmap _ state if m. get _ type ( ) = ='gps _ raw': ( state. lat, state. lon ) = ( m. lat, m. lon ) elif m. get _ type ( ) = ='gps _ raw _ int': ( state. lat, state. lon ) = ( m. lat / 1. 0e7, m. lon / 1. 0e7 ) elif m. get _ type ( ) =... | [
-0.6743916869163513,
-1.12772798538208,
0.7375935912132263,
-1.0196765661239624,
-0.21558256447315216,
0.16531667113304138,
-0.9525868892669678,
0.21083968877792358,
1.6718661785125732,
-0.27236178517341614,
0.6738190054893494,
0.4423185884952545,
0.015754947438836098,
0.032052770256996155... |
def _ _ init _ _ ( self ) : data _ access _ dict = mswms _ settings. data for key in data _ access _ dict : data _ access _ dict [ key ]. setup ( ) self. hsec _ drivers = { } for key in data _ access _ dict : self. hsec _ drivers [ key ] = mss _ plot _ driver. horizontalsectiondriver ( data _ access _ dict [ key ] ) se... | [
0.4800967872142792,
0.023231713101267815,
0.7163147926330566,
-0.2900162637233734,
0.21674327552318573,
-0.4235507845878601,
0.45400604605674744,
-0.4881344437599182,
-0.002062273910269141,
-0.4627002775669098,
-0.6243263483047485,
-0.038539983332157135,
0.061743367463350296,
0.85676509141... |
def build _ leaderboad ( self, calculated _ scores ) : max _ size = min ( self. max _ leaderboard _ length, len ( calculated _ scores ) ) leaderboard _ scored = sorted ( calculated _ scores, key = lambda x : ( - x [ 0 ], x [ 1 ] ) ) self. leaderboard = [ i [ 1 ] for i in leaderboard _ scored [ 0 : max _ size ] ] | [
-0.10265490412712097,
0.27995410561561584,
0.5679009556770325,
0.6869447231292725,
0.5777944922447205,
0.6095705032348633,
0.02313823625445366,
-0.4376082420349121,
-0.05084778368473053,
-0.05548098310828209,
-0.7182358503341675,
0.21708449721336365,
-0.7415480017662048,
-0.297975540161132... |
def float _ div ( num, denom ) : if int ( denom ) = = 0 : return 0. 0 return float ( num ) / float ( denom ) | [
0.5738780498504639,
0.582133948802948,
0.46590447425842285,
0.7828243970870972,
0.8608001470565796,
-0.46608811616897583,
-0.10883254557847977,
-0.27940741181373596,
-0.4983784556388855,
-1.3670114278793335,
1.0169368982315063,
-0.20073826611042023,
-0.41986602544784546,
0.1034568622708320... |
def set _ stream _ class _ lists _ url ( self, session _ id ) : url = self. api _ url +'/ v2 / project /'+ self. api _ key +'/ session /'+ session _ id +'/ stream'return url | [
-1.0684967041015625,
-0.462178498506546,
0.46217766404151917,
-0.10152244567871094,
0.6980640888214111,
0.48057809472084045,
-0.22920702397823334,
0.07122557610273361,
0.6666439771652222,
0.2828502357006073,
-0.7010414004325867,
1.5066560506820679,
-0.10094885528087616,
1.236660361289978,
... |
def _ factory ( partial _ module _ string, url _ prefix ) : name = partial _ module _ string import _ name ='api. { }. { }. resources '. format ( api _ version, partial _ module _ string ) blueprint = blueprint ( name, import _ name, url _ prefix = url _ prefix ) return blueprint | [
0.5202850699424744,
-2.0165369510650635,
0.33533892035484314,
-0.752243161201477,
-0.31616154313087463,
0.18047767877578735,
-0.5553774833679199,
-0.0625552162528038,
-0.11400149762630463,
-0.09771756827831268,
-0.5228147506713867,
0.5531404614448547,
-0.728137195110321,
-0.710081577301025... |
def sequence _ mask ( seq _ len, max _ len = none, dtype = torch. bytetensor, device = none ) : if max _ len is none : max _ len = torch. max ( seq _ len ). item ( ) if device is none : device = infer _ device ( seq _ len ) range = torch. arange ( max _ len ). type ( seq _ len. dtype ). to ( device ) mask = range [ non... | [
-0.09950141608715057,
0.1232280284166336,
0.49251818656921387,
0.9066231846809387,
-0.24542388319969177,
-0.6972267627716064,
0.31104686856269836,
0.2538198232650757,
0.647669792175293,
0.41473349928855896,
-0.6584392786026001,
0.2988153100013733,
-0.13973385095596313,
-0.5807473659515381,... |
def test _ atomic _ qname _ length _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 2. xsd ", instance = " nistdata / atomic / qname / schem... | [
0.08875343203544617,
-0.7947084307670593,
0.37651389837265015,
0.06334030628204346,
-0.4860699474811554,
0.08169243484735489,
-0.39169666171073914,
-0.520024836063385,
-0.32211825251579285,
0.26979660987854004,
-0.7827904224395752,
0.0954502671957016,
0.5271952748298645,
0.2628121078014374... |
def add _ option ( self, key, value = none, sep = none, fixed = true ) : # previous values are not used, but checks are required self. _ get _ option _ for _ editing ( key, singleton = false ) self. _ options. append ( { " key " : key, " value " : value, " sep " : sep, " fixed " : fixed, " singleton " : false } ) | [
-0.7023459672927856,
0.7257423996925354,
0.5570780038833618,
0.42736247181892395,
0.20644274353981018,
0.6566801071166992,
0.24094128608703613,
0.109609454870224,
-0.0877847969532013,
-0.08304135501384735,
-0.23546405136585236,
-0.5623608231544495,
-0.19873559474945068,
0.15016429126262665... |
def quadratic _ grad ( x1, x2 ) : raise exception ( " implement me! " ) | [
-0.48255762457847595,
-0.19986580312252045,
0.5529966354370117,
0.9230071306228638,
-0.5116969347000122,
-0.03134552761912346,
-0.8348579406738281,
-0.6755616068840027,
-2.0111727714538574,
0.30144202709198,
-0.6047565340995789,
0.797666609287262,
0.054222222417593,
-0.6622281670570374,
... |
def symlink ( dir _ name ) : if os. path. lexists ( current _ name ) : os. unlink ( current _ name ) os. symlink ( str ( dir _ name ), current _ name ) | [
0.403977632522583,
-0.3338092863559723,
0.4508904218673706,
-0.4148314297199249,
0.13488027453422546,
-0.537919819355011,
0.7152478694915771,
0.9412866234779358,
0.6403413414955139,
0.20027032494544983,
0.07780811190605164,
0.6305928230285645,
-0.31495773792266846,
0.8164778351783752,
-0... |
def _ rdns _ lookup ( self, ip ) : hostname = " " try : hostname = socket. gethostbyaddr ( ip ) [ 0 ] except socket. herror as e : if self. opt _ verbose = = true : hostname = e return hostname | [
0.018067508935928345,
0.9398678541183472,
0.7362315058708191,
-0.09520655870437622,
-0.08038037270307541,
-0.1474563181400299,
0.09000428766012192,
-0.6379123330116272,
0.23846450448036194,
0.8024693131446838,
1.4134249687194824,
-0.03302469477057457,
-0.501080334186554,
-0.990927457809448... |
def send ( self, data ) : message = self. srv _ class. deserialize ( data ) attempt = 0 while attempt < 3 : try : service _ response = self. srv ( message ) return service _ response except serviceexception : attempt + = 1 print ( " service exception raised. attempt : { } ". format ( attempt ) ) except exception as e :... | [
-0.6545931696891785,
0.28488823771476746,
0.6176128387451172,
-0.07021953165531158,
-0.2532564103603363,
-0.3755825459957123,
-0.19933581352233887,
-1.5833128690719604,
0.20592853426933289,
-0.47420960664749146,
-0.05747942626476288,
0.22696183621883392,
-2.2411770820617676,
-0.50309395790... |
def generate _ pooled _ snv _ summary _ table ( dstdb, name2snptable, name2scaffs ) : # def generate _ pooled _ snv _ summary _ table ( ddst, snptables, names ) : if len ( dstdb ) = = 0 : return pd. dataframe ( ) mdbs = [ ] order = [ ] pbar = tqdm ( desc ='generating pooled snv summary table ', total = len ( pd. unique... | [
-0.6672750115394592,
0.47428974509239197,
0.8405243754386902,
-0.32697001099586487,
-0.5984472036361694,
0.7174282670021057,
0.7252660989761353,
-0.2597796320915222,
0.46904826164245605,
0.28968361020088196,
-0.5235422253608704,
0.457475870847702,
0.8801987767219543,
0.28521549701690674,
... |
def test _ atomic _ language _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 4. xsd ", instance = " nistda... | [
0.4306803345680237,
0.07173070311546326,
0.1874629259109497,
0.3884502947330475,
-0.45502009987831116,
0.17779408395290375,
-0.5272366404533386,
-0.03714388981461525,
0.25241562724113464,
0.576287031173706,
-0.4138220250606537,
-0.6551532745361328,
-0.18855296075344086,
-0.3981755673885345... |
def test _ list _ integer _ length _ 1 _ nistxml _ sv _ iv _ list _ integer _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 2. xsd ", instance = " nistdata / list / integer / schem... | [
-0.636461079120636,
-0.5218161344528198,
0.42769718170166016,
0.6208314895629883,
-0.2991875410079956,
-0.1886088252067566,
-0.30045780539512634,
0.3828759491443634,
0.4511098265647888,
0.5243480801582336,
-1.1070359945297241,
0.022716298699378967,
0.0188235342502594,
1.0897084474563599,
... |
def system _ data ( self ) - >'outputs. systemdataresponse': return pulumi. get ( self, " system _ data " ) | [
0.06706345081329346,
-0.12112482637166977,
0.34469303488731384,
0.1590990573167801,
0.6984342336654663,
1.2914212942123413,
0.15478742122650146,
-0.5786231160163879,
0.8056307435035706,
-0.9927590489387512,
-0.24934858083724976,
0.9900002479553223,
0.4434458613395691,
-0.15114222466945648,... |
def get _ time ( self ) : return self. get _ request ('/ api / v1 / timestamp') | [
-1.1296162605285645,
0.9694756269454956,
0.5707579255104065,
0.9243935346603394,
1.3541319370269775,
-0.7045261263847351,
-1.1845189332962036,
-0.5257576107978821,
-0.02210182696580887,
0.7246836423873901,
-0.6998494267463684,
0.41759851574897766,
-0.6546523571014404,
-0.10339118540287018,... |
def _ api _ call ( self, endpoint, data ) : endpoint _ url = " / ". join ( [ self. _ rest _ api _ url ] + endpoint ) return self. req. post ( endpoint _ url, data = data ) | [
-0.8891777396202087,
-0.39438390731811523,
0.5824727416038513,
-0.15597623586654663,
0.5605075359344482,
0.2973484992980957,
-1.996464490890503,
0.07323145121335983,
-0.2909148633480072,
0.008371803909540176,
0.23957161605358124,
0.3267998695373535,
-0.8369590640068054,
-0.467319130897522,... |
def passenger _ temp _ setting ( self ) - > float : return self. _ vehicle _ data. get ( " climate _ state ", { } ). get ( " passenger _ temp _ setting " ) | [
-0.8720992207527161,
0.2901882529258728,
0.20349723100662231,
0.043271929025650024,
-0.3366572856903076,
0.4497065246105194,
0.038632623851299286,
0.0355825275182724,
-0.6230802536010742,
1.042264699935913,
-0.27586156129837036,
-0.7982852458953857,
-0.7353155612945557,
-0.3774076700210571... |
def _ register _ elt ( elt ) : _ _ lookup _ cache [ _ id ] = elt return elt | [
-1.1323332786560059,
0.4413398802280426,
0.30159544944763184,
-1.1962814331054688,
-0.19567912817001343,
0.6263064742088318,
-1.261734127998352,
-0.004742238204926252,
0.8555922508239746,
-0.19463998079299927,
-1.1899586915969849,
-0.23714464902877808,
0.4869215190410614,
-0.40750214457511... |
def _ _ init _ _ ( self, t, trajectory, ats, molno, typelist, atype = u'ls') : self. timestep = t self. ats = ats snapshot = trajectory [ t ] self. box = snapshot. configuration. box # self. pos = self. getcoms ( compairs, atype, trajectory [ t ], molno ) tind = snapshot. particles. types. index ( atype ) types = snaps... | [
-0.496324747800827,
-0.24604202806949615,
0.6290895342826843,
-0.8380073308944702,
0.03504175320267677,
-0.1583925187587738,
-0.12806111574172974,
0.013812188059091568,
0.44438520073890686,
0.5223888754844666,
-0.5678661465644836,
-0.1986696571111679,
0.045958615839481354,
0.10500127077102... |
def rotation ( self ) : return self. _ rotation | [
-0.4617636501789093,
0.5386806130409241,
0.11944935470819473,
-0.19626738131046295,
0.21500039100646973,
0.11656112223863602,
1.5558936595916748,
-1.0606458187103271,
0.23829588294029236,
-0.6517436504364014,
0.12600073218345642,
-0.4892188310623169,
-0.848395586013794,
-1.486562728881836,... |
def merge ( merge _ steps : iterable [ any ], name : str = none ) - > transformmeta : merge _ steps = [ coerce _ to _ transform ( step ) for step in merge _ steps ] merge _ input _ tags = set. union ( * [ step. input _ tags for step in merge _ steps ] ) merge _ output _ tags = set. union ( * [ step. output _ tags for s... | [
-0.5521032810211182,
0.061539288610219955,
0.6734176874160767,
1.2184948921203613,
0.21504215896129608,
-0.575648844242096,
-0.6735442280769348,
-0.42468589544296265,
-0.31857290863990784,
-0.46965935826301575,
-0.40164390206336975,
-0.7066090106964111,
-0.3145778179168701,
0.6785727739334... |
def _ construct _ stream ( res : linearresults, exit _ when : timedelta = timedelta ( hours = 6 ) ) - > results : # uses the [ application, window _ title ] tuple as the key recent _ cache : dict [ tuple [ str, str ], durinfo ] = { } fset : set [ str ] = set ( config. force _ individual or [ ] ) exit _ secs = int ( exi... | [
-0.7026987671852112,
0.4414103627204895,
0.8126190304756165,
-0.11146139353513718,
-0.636594295501709,
0.036328453570604324,
-0.14076167345046997,
-0.6821102499961853,
-0.181613951921463,
0.7228465676307678,
0.12605689465999603,
-0.3093734383583069,
0.23051361739635468,
0.7041078805923462,... |
async def change _ presence ( self ) : await self. bot. change _ presence ( activity = random. choice ( self. activities ) ) | [
-1.3256758451461792,
-0.7331715822219849,
0.38113853335380554,
0.7898986339569092,
0.7009631991386414,
0.9219030737876892,
0.26419129967689514,
0.8812253475189209,
0.5885117650032043,
0.8011122941970825,
-0.14989930391311646,
1.0942168235778809,
-0.7045408487319946,
0.14835470914840698,
... |
def find _ stf ( self, iteration : str ) - > pathlib. path : long _ iter = self. lasif _ comm. iterations. get _ long _ iteration _ name ( iteration ) stfs = pathlib. path ( self. lasif _ comm. project. paths [ " salvus _ files " ] ) stf = str ( stfs / long _ iter / " stf. h5 " ) return stf | [
-0.03573773428797722,
0.5263840556144714,
0.47107091546058655,
-0.8728574514389038,
-0.7562914490699768,
-0.17404350638389587,
1.2290769815444946,
-0.6653926968574524,
-0.5766923427581787,
0.1667984127998352,
-0.07639922201633453,
-0.7887963056564331,
-0.25968146324157715,
0.21500782668590... |
def solvesparselstsq ( a, b, w = none ) : if none = = w : w = ss. identity ( a. shape [ 0 ] ) g = ( a. t * ( w * a ) ). todense ( ) return g * * - 1 * ( a. t * ( w * b ) ) | [
1.4020500183105469,
-0.053222913295030594,
0.4929722547531128,
0.19641803205013275,
-0.6954184770584106,
-0.6343860626220703,
-0.1342405527830124,
0.04002837836742401,
0.6677660346031189,
0.5244956016540527,
-0.09872731566429138,
0.1928595006465912,
-0.31459105014801025,
-0.191417202353477... |
def test _ create _ cve _ mismatch ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / cve - 2000 - 0008 _ published. json') as json _ file : data = json. load ( json _ file ) res = requests. post ( f'{ env. awg _ base _ url } { cve _ url } / { curr _ cve _ id } ', headers = utils. base _ header... | [
0.2728758454322815,
-0.8462194800376892,
0.4362194240093231,
0.43055352568626404,
1.1121042966842651,
0.8635014295578003,
-0.4459279775619507,
-0.1540273278951645,
-0.193304643034935,
0.34616002440452576,
-0.5725690126419067,
0.34343209862709045,
-0.12063093483448029,
0.48408547043800354,
... |
def connect _ to _ server ( self ) : try : print ( " tratando de conectar al servidor " ) self. socket _ cliente. connect ( ( self. host, self. port ) ) # revisa si se logro conectar respuesta = self. recive _ message ( ) print ( respuesta ) if respuesta = = " aceptado " : print ( " cliente conectado exitosamente al se... | [
-0.5066892504692078,
-0.15662334859371185,
0.9361764788627625,
0.2671152949333191,
-0.3356943726539612,
0.7334770560264587,
-0.2869153916835785,
-0.8113003969192505,
-0.8695467710494995,
-0.20837067067623138,
0.1927802562713623,
0.05671681836247444,
-0.44229134917259216,
-0.276196092367172... |
def test _ mo _ admin _ registration ( self ) : credentials = self. users _ credentials ['moadmin'] post _ data = {'username': credentials ['username'],'password1': credentials ['password'],'password2': credentials ['password'],'registration _ type': self. model _ instances ['mo1']. pk, } # create a mo admin user with ... | [
-0.09765186905860901,
0.5844398140907288,
0.5506224632263184,
0.5264461040496826,
0.2092156857252121,
0.7401513457298279,
0.3137814998626709,
0.04650638997554779,
0.3311510384082794,
0.19501614570617676,
-0.43041545152664185,
0.6034716367721558,
-0.11716155707836151,
0.35727691650390625,
... |
def reply ( self, ticket _ id, attrs, attachments = none ) : if " contenttype " not in attrs : attrs [ " contenttype " ] = " text / plain " if attachments : files = [ ( " json ", ( none, json. dumps ( attrs ), " application / json " ) ) ] files + = self. _ prep _ attachments ( attachments ) return self. client. post _ ... | [
-0.025564298033714294,
-0.2376127541065216,
0.5614637136459351,
-0.3856685161590576,
-0.4878450632095337,
-0.341079980134964,
-0.4220784604549408,
-0.22174474596977234,
0.11133675277233124,
-0.030714884400367737,
-0.2087877243757248,
-0.28516149520874023,
-0.7426227331161499,
-0.1241850480... |
def update ( self ) : self. x + = ( self. settings. alien _ speed _ factor * self. settings. fleet _ direction ) self. rect. x = self. x | [
-0.5840492844581604,
-0.018728408962488174,
0.39758092164993286,
-0.6812428832054138,
0.7091530561447144,
0.18169862031936646,
-0.2660256028175354,
0.04608336091041565,
-0.37480872869491577,
-0.5325995087623596,
-0.1864108145236969,
-0.4791368544101715,
0.6868951320648193,
0.24753375351428... |
def bib ( self ) : #, bib _ file = default _ bib ) : article _ key = self. bib _ key ( ) url = " https : / / arxiv. org / abs / { } ". format ( self. ax _ id ) title = bib _ title ( self. title ) bib _ entry = " @ article { { { 0 }, \ n \ tauthor = { { { 1 } } }, \ n \ ttitle = { { { 2 } } }, \ n \ tyear = { { { 3 } } ... | [
0.6824528574943542,
-1.3092159032821655,
0.56891268491745,
-0.35692402720451355,
0.7275669574737549,
0.5858344435691833,
-0.35789427161216736,
0.39086392521858215,
-1.145350456237793,
0.12981979548931122,
0.7241368293762207,
0.8675659894943237,
-0.2987270653247833,
-0.5129613280296326,
0... |
def read _ file _ as _ seqfeature _ dict ( fname : str, delim : str = " - " ) - > dict [ seqfeature, str ] : naive _ dict = read _ file _ as _ sequence _ dict ( fname ) retval = { } for identifier, sequence in naive _ dict. items ( ) : refdb, start, stop = identifier. split ( delim ) seqfeature = seqfeature ( featurelo... | [
-0.7672461867332458,
-0.8088831305503845,
0.5760374069213867,
0.0943891853094101,
-1.4535459280014038,
-0.5720040202140808,
0.24554434418678284,
0.7485510110855103,
-0.4634935259819031,
0.5162937641143799,
-0.8406708836555481,
-0.3493681252002716,
0.38065198063850403,
-0.43171951174736023,... |
def reconstruct ( f, t, top = none ) : freq, mag, ph = topk ( f, t, top ) n = f. shape [ 0 ] top _ signals = [ get _ cos ( fi, t, n, scale = mi, phase = pi ) for mi, fi, pi in zip ( mag, freq, ph ) ] reconstructed = sum ( top _ signals ) return reconstructed, top _ signals | [
-1.2358895540237427,
-0.17825838923454285,
0.5206109881401062,
0.1134181097149849,
-0.4533300995826721,
-1.0123814344406128,
-0.37254902720451355,
0.8648573160171509,
-0.9258998036384583,
0.5533808469772339,
-0.7295898199081421,
-0.818061888217926,
0.8954639434814453,
-0.18494877219200134,... |
def recursive _ ids _ to _ string ( ids, vocab ) : assert ( isinstance ( ids, list ) ) if isinstance ( ids [ 0 ], list ) : return [ recursive _ ids _ to _ string ( x, vocab ) for x in ids ] return list _ of _ ids _ to _ string ( ids, vocab ) | [
-0.968162477016449,
-0.6216179132461548,
0.09221404045820236,
0.26839378476142883,
0.15648245811462402,
-1.3078645467758179,
-0.763714075088501,
-0.45617613196372986,
1.1741329431533813,
0.6909648180007935,
-0.5780543684959412,
0.3258821964263916,
-0.7190366387367249,
0.3515763282775879,
... |
def troty ( angle ) : t = np. eye ( 4 ) ca = np. cos ( angle ) ; sa = np. sin ( angle ) r = np. array ( [ [ ca, 0., sa ], [ 0., 1., 0. ], [ - sa, 0., ca ] ] ) t [ 0 : 3, 0 : 3 ] = r return t | [
-0.0711367055773735,
0.6705847978591919,
0.6968914270401001,
-1.575456976890564,
0.6490700244903564,
-1.0622340440750122,
0.23715034127235413,
-0.8081610202789307,
0.14350485801696777,
1.2932658195495605,
-1.0443979501724243,
-0.5421082973480225,
0.3270740807056427,
-0.9613521695137024,
... |
def get _ child ( self, id ) : try : # if the data is numerical int ( id ) for k in sorted ( self. children. keys ( ), reverse = true ) : if id > = k : return self. children [ k ] return self. children [ sorted ( self. children. keys ( ) ) [ 0 ] ] except valueerror : # if the data is categorical return self. children [... | [
0.0275721438229084,
0.047488149255514145,
0.5224481225013733,
0.09737882763147354,
-0.6369310617446899,
0.3850003480911255,
-0.9163196086883545,
-0.8824669122695923,
-0.8526157140731812,
-0.6624869108200073,
0.46213555335998535,
1.1103293895721436,
0.013941353186964989,
-0.2690974175930023... |
def image _ to _ event _ weights ( xs, ys, img ) : clipx, clipy = img. shape [ 1 ] - 1, img. shape [ 0 ] - 1 mask = np. where ( xs > = clipx, 0, 1 ) * np. where ( ys > = clipy, 0, 1 ) pxs = np. floor ( xs * mask ). astype ( int ) pys = np. floor ( ys * mask ). astype ( int ) dxs = xs - pxs dys = ys - pys wxs, wys = 1. ... | [
0.13731999695301056,
-0.4570211172103882,
0.9799181222915649,
-0.48523756861686707,
-0.5055229067802429,
-0.7233744263648987,
0.6374183893203735,
-0.14593568444252014,
0.7234451770782471,
0.6519421339035034,
0.31441590189933777,
0.4593668580055237,
0.8736038208007812,
0.303157240152359,
... |
def test _ load _ config _ defaults ( ) - > none : config = load _ config ( ) defaults = { " constants " : { " c " : 5e - 8, " porosity _ min " : 0. 0, " porosity _ max " : 0. 5, " rho _ grain " : 2650. 0, " rho _ void " : 1000. 0, } } assert config = = defaults config = load _ config ( stringio ( " " ) ) assert config... | [
0.3514447808265686,
0.09332573413848877,
0.35855790972709656,
0.10457755625247955,
0.7602160573005676,
-0.6344722509384155,
-0.7187275886535645,
0.12068436294794083,
-0.8793518543243408,
0.2641814053058624,
-1.1761000156402588,
-0.6451363563537598,
-0.22056792676448822,
0.3701207935810089,... |
def test _ find _ migrating _ animals _ callable ( self ) : self. cell. find _ migrating _ animals ( ) | [
-0.06060604378581047,
0.821692705154419,
0.43306589126586914,
0.18571625649929047,
1.1166411638259888,
0.18334096670150757,
0.08740046620368958,
-1.2540817260742188,
-0.6899325847625732,
0.015613778494298458,
-0.6995198130607605,
0.059789180755615234,
0.5579027533531189,
0.6618613004684448... |
def all ( self ) : key = self. _ key ( " servers " ) queue = finiteasyncqueue ( loop = self. _ loop ) cursor = yield from self. _ connection. sscan ( key ) asyncio. task ( self. _ _ fetch _ addresses _ from _ cursor ( cursor, queue ) ) return queue | [
-0.27494463324546814,
0.25229430198669434,
0.5581998825073242,
0.436015784740448,
0.22110655903816223,
-0.6959371566772461,
-0.4143654406070709,
-0.21871043741703033,
0.18666426837444305,
0.022038955241441727,
0.023092102259397507,
0.4473256766796112,
0.14839491248130798,
1.062299489974975... |
def main ( ) : global verbose verbose = true if len ( sys. argv ) = = 1 : print'usage : % s < download - file >'% sys. argv [ 0 ] print'this will download all files in < download - file > ', print'to. / mt _ downloads / < basename >'sys. exit ( 1 ) local _ dir = '. / mt _ downloads'if not os. path. exists ( local _ dir... | [
0.5109153985977173,
-0.2056732177734375,
0.9602477550506592,
0.6790420413017273,
0.8458828926086426,
0.6542841196060181,
0.02035977505147457,
0.603226900100708,
-0.4716068506240845,
0.028042813763022423,
-0.00899538490921259,
-0.21864256262779236,
0.21763060986995697,
1.011104941368103,
... |
def update ( self, z _ t ) : # your code here dh = np. eye ( 3 ) # jacobian of measurement model wrt states # print " p _ t ( pre - update ) = ", self. p _ t # print " num _ meas = ", z _ t. shape [ 0 ] for i in range ( z _ t. shape [ 0 ] ) : # print " meas _ idx = ", i # print " p _ t ( pre - update ) = ", self. p _ t... | [
-0.09276457875967026,
-0.7504062652587891,
0.8225947618484497,
-0.05535871535539627,
-0.0849171057343483,
0.260402649641037,
0.534623920917511,
0.35071590542793274,
-0.362330824136734,
0.5818707346916199,
-0.7679752707481384,
-0.6292096972465515,
-0.08190073817968369,
0.4905751645565033,
... |
def _ generate _ stage _ code ( broadcast _ loads, loop _ loads, loop _ stores, op _ statements, loop _ axis, warp _ reductions, reduction _ stores ) : code = " " # add broadcast loads for load in broadcast _ loads : code = code + " \ n " + indent _ str + load # add op statements if len ( loop _ loads ) = = 0 and len (... | [
-0.2481117695569992,
-0.9351863265037537,
0.9251005053520203,
-0.15120580792427063,
-0.712618887424469,
0.12212039530277252,
0.43240922689437866,
0.016106395050883293,
-0.4245808720588684,
0.4141160547733307,
0.6059697866439819,
-0.4128051698207855,
-0.008034012280404568,
-0.25726309418678... |
def is _ off _ peak _ charging _ enabled ( self ) - > bool : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " off _ peak _ charging _ enabled " ) | [
-0.4550733268260956,
0.12650665640830994,
0.311209499835968,
0.7489103674888611,
0.060818012803792953,
0.24083565175533295,
-1.174986720085144,
0.3015294671058655,
0.2988179922103882,
0.5459033250808716,
-0.3989139497280121,
0.10686967521905899,
-0.8386595249176025,
0.7395114302635193,
-... |
def get _ torch _ datagens ( data _ dir, feature _ len = 300, num _ video _ per _ person = 1e4, num _ audio _ per _ video = 1e4, split _ by ='audio ', split _ size = 0. 2, txt _ dirs = none, ratios = [ 1. 0, 1. 0 ] ) : tr _ paths, val _ paths = get _ pkl _ paths ( data _ dir, num _ video _ per _ person, num _ audio _ p... | [
0.017955970019102097,
0.5100526809692383,
0.5168137550354004,
0.8980247378349304,
-0.03570020943880081,
-0.3854381740093231,
0.23769211769104004,
0.517433762550354,
-0.5798360705375671,
-0.17950715124607086,
-0.17832286655902863,
-0.13632991909980774,
0.6383417248725891,
-0.200876459479331... |
def all ( mtx, datecol, astcol, bmkcol, risk _ free _ rate ) : results = { " total " : treynor ( mtx, datecol, astcol, bmkcol, risk _ free _ rate ), " rolling " : { " year " : rolling ( mtx, datecol, astcol, bmkcol, risk _ free _ rate, utl. date. year ) }, " recent " : { " year " : recent ( mtx, datecol, astcol, bmkcol... | [
0.4073752164840698,
1.2640576362609863,
0.5778388977050781,
-1.0296837091445923,
-0.44946229457855225,
-0.6436435580253601,
-0.4690261483192444,
-0.3300691246986389,
-1.155430555343628,
0.5283656716346741,
-0.08083594590425491,
-0.5645846724510193,
0.9064891934394836,
-0.1482309103012085,
... |
def test _ uc _ to _ assignment ( self ) : expected = {'q1': ( ['a ','b ','c'], 1. 0, 2 ),'q2': ( ['a ','h ','i ','j'], 2. / 3., 3 ),'q3': ( ['unassigned'], 1. 0, 1 ),'q4': ( ['unassigned'], 1. 0, 1 ),'q5': ( ['unassigned'], 1. 0, 1 ) } params = {'id _ to _ taxonomy _ fp': self. id _ to _ tax1 _ fp,'reference _ sequenc... | [
-0.4641752541065216,
-1.055709958076477,
0.6748964190483093,
-0.5030546188354492,
0.06425956636667252,
0.30423614382743835,
0.9253538846969604,
0.20842935144901276,
-0.8683581352233887,
0.1720127910375595,
0.13507398962974548,
-0.11881636828184128,
0.3762851655483246,
-0.3889388144016266,
... |
def builder ( db, num _ neighbors, distance _ measure ) : def builder _ lambda ( db, config, training _ threads, * * kwargs ) : return scann _ ops _ pybind. create _ searcher ( db, config, training _ threads, * * kwargs ) return ondevicescannbuilder ( db, num _ neighbors, distance _ measure ). set _ builder _ lambda ( ... | [
-0.3939620852470398,
0.778368353843689,
0.3986453115940094,
0.9221980571746826,
-0.9200257658958435,
0.058983467519283295,
0.053081024438142776,
-0.14300967752933502,
0.3232841491699219,
-0.7404894828796387,
-0.22751976549625397,
-0.33304470777511597,
0.2700040340423584,
0.5364663600921631... |
def maintenance _ policy ( self ) - >'outputs. googlecloudmemcachev1maintenancepolicyresponse': return pulumi. get ( self, " maintenance _ policy " ) | [
0.8051759600639343,
0.08449044078588486,
0.23844791948795319,
-0.19588200747966766,
0.638975203037262,
1.315182089805603,
-0.054505810141563416,
-0.7085274457931519,
1.064796805381775,
0.07490291446447372,
0.5622037649154663,
0.2708030343055725,
-0.6952394843101501,
-0.2053866982460022,
... |
def route _ loads ( self, vdd _ offset ) : self. add _ via ( layers = ( " metal1 ", " via1 ", " metal2 " ), offset = vdd _ offset, mirror = " mx " ) gnd _ offset = ( self. delay _ chain _ offset + vector ( [ drc [ " minwidth _ metal1 " ] ] * 2 ). scale ( -. 5,. 5 ) ) for i in range ( self. rows ) : wl _ offset = ( self... | [
-0.1949995458126068,
0.2657325565814972,
0.8044236302375793,
-1.0272676944732666,
0.15699175000190735,
0.5652573108673096,
0.08646316826343536,
-0.29399821162223816,
0.027421806007623672,
0.8834991455078125,
0.27666646242141724,
0.9501869678497314,
-0.01179273147135973,
0.2635512351989746,... |
def array ( self ) : return self. data | [
-0.3701972961425781,
-1.5291035175323486,
0.2730840742588043,
-0.6344144940376282,
0.29856544733047485,
1.2122576236724854,
-0.6656755805015564,
-0.8055553436279297,
0.2736409306526184,
-0.7732269763946533,
-0.2975868284702301,
1.945787787437439,
-0.45986407995224,
0.07308004796504974,
0... |
def test _ sla _ post _ exclusion _ period ( self ) : pass | [
0.9068396091461182,
0.03682321682572365,
0.1821552962064743,
0.6395522356033325,
-1.1554014682769775,
1.8751100301742554,
0.9065807461738586,
0.36954906582832336,
1.668806552886963,
-0.376880407333374,
-0.6624323129653931,
0.39322495460510254,
-1.213012933731079,
-0.11877983808517456,
0.... |
def get _ data _ loader ( data _ dir : str, params, training = false, testing = false, eval = false ) : data _ loader = none if training : path = os. path. join ( data _ dir, " train _ signs " ) data _ loader = dataloader ( signdataset ( path, training _ transform ), batch _ size = params. batch _ size, shuffle = true,... | [
-0.025815622881054878,
0.1880113184452057,
0.6398802399635315,
-0.4840904176235199,
0.09504429250955582,
0.06621161103248596,
-0.3430914282798767,
0.4999755322933197,
-0.056772664189338684,
-0.8810303211212158,
0.14880132675170898,
0.9479484558105469,
-0.10930314660072327,
0.55919802188873... |
def get _ bin _ range ( self, q _ min = none, q _ max = none ) : q = self. resolution. q first = np. searchsorted ( q, q _ min ) last = np. searchsorted ( q, q _ max ) return first, min ( last, len ( q ) - 1 ) | [
-0.4536166191101074,
-0.8928276300430298,
0.5157060027122498,
0.1159302219748497,
0.4449848532676697,
0.09300025552511215,
-0.7190896272659302,
-0.8445877432823181,
-0.3087083399295807,
-0.5578191876411438,
-0.8519728779792786,
0.5362072587013245,
-0.748025119304657,
-0.10243669897317886,
... |
def throw _ 404 _ unless _ allowed ( blogger ) : if blogger. is _ staff and settings. feature _ site _ blog : # staff members are allowed to blog when there is a site blog. return if blogger. get _ profile ( ). is _ volunteer and settings. feature _ volunteer _ blogs : # volunteers are allowed to blog when volunteer bl... | [
-0.3375665247440338,
0.6263789534568787,
0.6102834343910217,
1.2484877109527588,
-0.4799792170524597,
1.0948630571365356,
0.7448522448539734,
-0.5860923528671265,
-0.5557680726051331,
0.1530037671327591,
-0.08281775563955307,
0.45626288652420044,
-0.9073299765586853,
0.7252846360206604,
... |
def test _ inputs _ delete _ enabled _ input ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) self. assert _ util ( input _ page. table. delete _ row, r " can't delete enabled input "... | [
0.3450707495212555,
0.9637846350669861,
0.4693956673145294,
1.2153778076171875,
0.44214144349098206,
0.6598039865493774,
0.18893404304981232,
0.47364237904548645,
1.2398781776428223,
0.11269918084144592,
0.38384756445884705,
-0.25774669647216797,
-0.8437297940254211,
0.5367732048034668,
... |
def test _ atomic _ language _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 3. xsd ", instance = " nistda... | [
0.5738773941993713,
-0.48915812373161316,
0.4305296242237091,
0.1026391088962555,
-0.6396840214729309,
0.3684844970703125,
-0.3447762429714203,
-0.37293052673339844,
0.3374652862548828,
0.760353684425354,
-0.7306743860244751,
0.26012104749679565,
-0.3427003026008606,
-0.21250109374523163,
... |
def setup ( self ) : print ( " testcase00 : setup _ : begin " ) # # do something... print ( " testcase00 : setup _ : end " ) | [
0.5250461101531982,
-0.6578155159950256,
0.43598753213882446,
0.7138925194740295,
0.7249180674552917,
0.4493563771247864,
1.4469283819198608,
-0.002281655091792345,
0.4320230782032013,
0.5292709469795227,
0.04365773871541023,
0.7469515800476074,
-0.33725038170814514,
0.11746115237474442,
... |
def test _ atomic _ language _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 2. xsd ", instance = " nistda... | [
0.07384005934000015,
-0.5059076547622681,
0.346256822347641,
1.1118570566177368,
-0.6349947452545166,
0.18860575556755066,
-0.44229868054389954,
0.25855469703674316,
0.003004910424351692,
0.6389002799987793,
-0.5463621616363525,
0.29201027750968933,
0.4927524924278259,
0.26291680335998535,... |
def updatedevicetype ( self, typeid, description, deviceinfo, metadata = none ) : devicetypeurl = apiclient. devicetypeurl % ( self. host, typeid ) devicetypeupdate = {'description': description,'deviceinfo': deviceinfo,'metadata': metadata } r = requests. put ( devicetypeurl, auth = self. credentials, data = json. dum... | [
-1.8212554454803467,
-0.5762578845024109,
0.6862431168556213,
0.26458409428596497,
-0.35297414660453796,
-0.3801087737083435,
-0.0881403386592865,
-0.3172958791255951,
-0.2521511912345886,
0.927661657333374,
-0.21649503707885742,
0.8520926833152771,
-1.5557444095611572,
0.14827613532543182... |
def communicatesol ( self, sol ) : self. logger. debug ( " communicating a solution to comm " ) if len ( sol ) < = 1 : self. logger. warning ( " solution only has " + str ( len ( sol ) ) + " step ( s ) - likely within tolerance, not running again. " ) return errors [ " warning _ short _ sol " ] cur _ step = 0 # iterate... | [
-0.45451828837394714,
-0.22000469267368317,
0.7225338220596313,
-0.01027075294405222,
0.38521942496299744,
-0.17612101137638092,
0.6986396312713623,
-0.884263813495636,
0.0047828261740505695,
0.06678912043571472,
0.055676065385341644,
0.28860199451446533,
-0.009167042560875416,
0.153175562... |
def get _ action ( self, state, instruction ) : # todo : simplify this self. eval ( ) images _ np _ pure = state. image state _ np = state. state # print ( " act : " + debug _ untokenize _ instruction ( instruction ) ) images _ np = standardize _ image ( images _ np _ pure ) image _ fpv = variable ( none _ padded _ seq... | [
-1.0931081771850586,
-0.5459902882575989,
0.5783545970916748,
0.20664489269256592,
-0.09590072929859161,
-1.147667646408081,
0.8980740308761597,
0.07849065214395523,
-0.10771069675683975,
0.7516414523124695,
0.28632158041000366,
0.6975052356719971,
0.09602171182632446,
0.029705911874771118... |
def find _ include _ path ( ) : curr _ path = os. path. dirname ( os. path. abspath ( os. path. expanduser ( _ _ file _ _ ) ) ) # include path in pip package pip _ incl _ path = os. path. join ( curr _ path, " include / " ) if os. path. isdir ( pip _ incl _ path ) : return pip _ incl _ path else : # include path if bui... | [
0.028978856280446053,
-0.05125437304377556,
1.0638338327407837,
0.4529235363006592,
-0.24564482271671295,
0.2061772346496582,
1.2118114233016968,
0.8861836791038513,
-0.22549523413181305,
0.24534884095191956,
1.046552062034607,
-0.25842320919036865,
-0.8409860730171204,
0.4846931993961334,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.