text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ oven _ temperature ( ) : past _ temp = get _ latest _ temperatures ( ) latest _ temp = past _ temp ['temp _ list'] [ 0 ] return latest _ temp
[ -0.8260024785995483, -0.7907198071479797, 0.2948269248008728, 0.6689571738243103, 0.17907477915287018, -0.7703651785850525, -0.21215592324733734, 1.4331640005111694, -0.0906735211610794, 0.7567174434661865, -0.6731770634651184, 0.2533799111843109, 0.010027680546045303, 0.3355546295642853, ...
def createmask ( self, z, threshold ) : with np. errstate ( invalid ='ignore') : # catches invalid value errors mask = np. abs ( z ) < threshold return mask
[ -0.5000062584877014, -0.9007980227470398, 0.3530401587486267, 0.7245774269104004, -0.14491048455238342, 0.5972408652305603, -0.18682025372982025, -0.47864407300949097, -0.09694907814264297, -0.6390861868858337, 0.2721897065639496, 0.2187558114528656, -0.29167795181274414, -0.05159273371100...
def from _ dictionary ( cls, dictionary ) : if dictionary is none : return none # extract variables from the dictionary harsh _ event _ type = dictionary. get ('harsheventtype') incident _ report _ url = dictionary. get ('incidentreporturl') download _ forward _ video _ url = dictionary. get ('downloadforwardvideourl')...
[ 0.17848581075668335, -0.4920409321784973, 0.5117707848548889, -0.3596036434173584, 0.19513869285583496, 0.0966104045510292, -0.23890723288059235, 0.3917388319969177, 0.7367231249809265, 0.012102748267352581, -0.029401058331131935, -0.7905400395393372, 0.6070903539657593, 0.2376722842454910...
def test _ group _ all _ devices ( self ) : dev _ id ='test _ entity'entity _ id = device _ tracker. entity _ id _ format. format ( dev _ id ) device = device _ tracker. device ( self. hass, timedelta ( seconds = 180 ), true, dev _ id, none, hide _ if _ away = true ) device _ tracker. update _ config ( self. yaml _ dev...
[ -0.3306578993797302, 0.2220560610294342, 0.5176696181297302, 0.11519298702478409, 0.8928747177124023, 0.11207994818687439, 1.0593587160110474, 0.3011697828769684, 0.42320728302001953, -0.584518551826477, 0.280931681394577, -0.18622393906116486, 0.8387357592582703, 1.146559715270996, 0.76...
def measure _ od ( self, channel = 0, repeats = 1 ) : msg = self. device. send ( " measure - od ", channel, repeats ) if msg. iserror ( ) : raise exception ( msg. geterror ( ) ) # get photon intensity for measuring light and background light pi = msg. getdoubleparam ( 0 ), msg. getdoubleparam ( 1 ) # check for dense cu...
[ -0.4320872128009796, 0.562035322189331, 0.6786255836486816, -0.5614498853683472, -0.23257024586200714, -0.1561080664396286, 0.4675483703613281, -0.46327435970306396, 0.5554210543632507, 0.051752861589193344, 0.17831090092658997, 0.3105379343032837, -0.7782291173934937, 0.3489736318588257, ...
async def get _ all _ responses _ for _ task ( self, task : union [ task, dict ] ) - > mythicresponse : url = " { } { } : { } / api / v { } / tasks / { } ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version, task. id if isinstance ( task, task ) else task [ " id " ], ) resp...
[ -0.3503071367740631, -0.09262336790561676, 0.5870867967605591, -0.10055257380008698, 0.3504537045955658, -1.0887888669967651, -0.0370153933763504, 0.14049503207206726, 0.6085968613624573, -0.17212863266468048, -0.826900064945221, -0.20174984633922577, 0.607649028301239, 0.43793660402297974...
def to _ first ( self ) : form = self. findchild ( qtgui. qwidget,'form') if form : form. submit ( ) form. to _ first ( )
[ 0.6128860712051392, 0.6605179309844971, 0.8315500617027283, -0.3254856467247009, 1.1169648170471191, -0.5034196972846985, -0.04329393431544304, -0.5809460282325745, -0.5344080328941345, -0.6417329907417297, -0.5139769315719604, 0.24200516939163208, 0.17155277729034424, 1.3097156286239624, ...
def create _ players ( players _ json ) : players = [ ] first _ player _ color = players _ json [ 0 ] ['color'] for player in players _ json : penguins = [ ] for penguin in player ['places'] : penguins. append ( coordinate ( row = penguin [ 0 ], col = penguin [ 1 ] ) ) new _ player = player ( color = player ['color'], ...
[ -1.2547855377197266, -0.9818433523178101, 0.6758900284767151, -0.8413413166999817, 1.3258028030395508, 0.7953748106956482, -0.47901710867881775, 0.038953207433223724, 0.1373891681432724, 1.2806074619293213, -0.40739619731903076, -0.5157065987586975, -0.008732803165912628, 0.458082586526870...
def get _ goal _ type ( action ) : msg _ type = rostopic. get _ topic _ type ( " { } / goal ". format ( action ) ) [ 0 ] # replace'actiongoal'with'goal '. return msg _ type [ : - 10 ] + " goal "
[ -0.27168455719947815, 0.4683803915977478, 0.43923550844192505, 0.32197365164756775, 1.146403193473816, -0.0889073833823204, -0.09373815357685089, -0.8539220094680786, -0.25863638520240784, 0.4849868416786194, 0.3596728444099426, 0.9989531636238098, 0.23636996746063232, 0.10137000679969788,...
def bond _ spot _ rate ( self, bond : bond ) - > float : if bond. coupon = = 0 : # get rate of a zero coupon bond spot _ rate = log ( bond. par / bond. price ) / bond. maturity _ term else : # calculate spot rate of a bond number _ of _ periods = \ int ( bond. maturity _ term * bond. compounding _ frequency ) value = b...
[ 0.4016894996166229, 0.4987364113330841, 0.46525123715400696, -0.9638581871986389, -0.08826766908168793, -0.06863289326429367, -0.5732860565185547, -0.16547293961048126, 0.180576890707016, 0.39440110325813293, 0.7603011727333069, 0.18909309804439545, -1.1132535934448242, -0.2857721149921417...
def terminate _ transform _ job ( job _ name, region _ name = " us - west - 2 ", assume _ role _ arn = none, archive = false, synchronous = true, timeout _ seconds = 300, ) : import boto3 if ( not archive ) and ( not synchronous ) : raise mlflowexception ( message = ( " resources must be archived when ` terminate _ tra...
[ 0.5023036003112793, -0.38241350650787354, 0.631416916847229, -0.44379737973213196, 0.43486708402633667, -0.5381893515586853, -0.49192219972610474, 0.1070084273815155, 0.26977550983428955, 0.27228960394859314, -1.072011947631836, 0.9181897044181824, 0.32400986552238464, -0.07663113623857498...
def evaluate ( self, problem ) : self. _ _ score = problem. evaluate _ fitness ( self )
[ -0.2893179655075073, -0.9359657764434814, 0.33195874094963074, 0.2356400489807129, 0.8045059442520142, 0.5513344407081604, -0.8354676961898804, 0.40656912326812744, -0.7332032918930054, -0.5030834674835205, -0.1483360379934311, -0.20715384185314178, -0.48383572697639465, -0.002332325791940...
def _ get _ lib _ name ( lib, add _ extension _ suffix ) : # our custom defined part of the extension file name libname = " lib % s _ % s _ % s _ py % s " % ( lib, platform. system ( ), platform. architecture ( ) [ 0 ],''. join ( [ str ( i ) for i in platform. python _ version _ tuple ( ) [ : 2 ] ] ) ) libname = cleans...
[ 0.4389205276966095, -0.47434839606285095, 0.809089720249176, 0.35922566056251526, -0.6662497520446777, 0.3361950218677521, 0.3540830910205841, 0.42293110489845276, 0.12885981798171997, 0.44298413395881653, 0.12808333337306976, -0.16370970010757446, 0.9615822434425354, 0.5510916113853455, ...
def test _ valid _ data ( self ) : # send all valid form data form = self. form _ data ( note = " this is a test note ", client = self. client. pk, operator = self. staff _ user. pk, ) self. asserttrue ( form. is _ valid ( ) )
[ 0.5372146964073181, 0.4795030653476715, 0.4193483889102936, 0.15395663678646088, 0.3300163447856903, 1.5211395025253296, -0.36132028698921204, 0.47958827018737793, -0.4460468888282776, -1.3177158832550049, -0.7964386343955994, -0.15596666932106018, -0.1670914590358734, -0.292306125164032, ...
def get _ error ( self ) : return self. error
[ -0.43791890144348145, -0.10801538079977036, 0.0473933108150959, 0.523801326751709, 0.5751165151596069, 0.6369550824165344, 0.6697921752929688, 0.012535284273326397, 0.061929911375045776, -1.2550393342971802, 0.11458251625299454, 0.8985894322395325, -0.4603557586669922, -0.6842221617698669,...
def batch _ normalization ( input _ tensor, variance _ epsilon, name ) : return tf. keras. layers. batchnormalization ( epsilon = variance _ epsilon, name = name, trainable = false ) ( input _ tensor )
[ 0.4187209904193878, -0.6498957872390747, 0.5377491116523743, 1.301121473312378, -0.46992865204811096, 0.06637389957904816, -0.43350037932395935, 0.686005711555481, -0.6377173066139221, 0.7395946979522705, -1.3274729251861572, -0.35422179102897644, -0.7098475694656372, -1.0696407556533813, ...
def errpt ( self, ax, coord, xerr = none, yerr = none ) : inv = ax. transdata. inverted ( ) pt = inv. transform ( ax. transaxes. transform ( coord ) ) ax. errorbar ( pt [ 0 ], pt [ 1 ], xerr = xerr, yerr = yerr, capsize = 0, color ='red ', elinewidth = 2 ) return ax
[ -0.4373107850551605, 0.42943572998046875, 0.6736632585525513, -1.104448914527893, -0.469377726316452, 0.6450752019882202, -0.02574343979358673, 0.2964053452014923, -0.1606294959783554, 0.38151654601097107, 0.04596196115016937, 0.4187042713165283, -0.37167975306510925, -0.4407220780849457, ...
def euclidean _ distance ( vector _ 1, vector _ 2 ) - > float : before _ square _ root = 0 for i in range ( len ( vector _ 1 ) ) : before _ square _ root + = ( vector _ 1 [ i ] - vector _ 2 [ i ] ) * * 2 d = math. sqrt ( before _ square _ root ) print ( d ) return ( d )
[ 0.1655632108449936, -0.577096700668335, 0.622856616973877, 0.09973199665546417, 0.19622115790843964, 0.4926999509334564, -0.08809592574834824, 0.31337612867355347, -0.28400877118110657, 0.7793005704879761, -0.29340389370918274, 1.3169296979904175, -0.22559598088264465, 1.0048247575759888, ...
def from _ file ( cls, filename : str, info : optional [ datasetinfo ] = none, split : optional [ namedsplit ] = none, indices _ filename : optional [ str ] = none, in _ memory : bool = false, ) - > " dataset " : table = arrowreader. read _ table ( filename, in _ memory = in _ memory ) if indices _ filename is not none...
[ 0.28182339668273926, -0.10564938187599182, 0.4992051422595978, 0.29371681809425354, -1.2083908319473267, 0.3098076283931732, 0.32632941007614136, 0.7096260190010071, 0.060332491993904114, -0.22926335036754608, 0.6092755198478699, 0.29301443696022034, 0.31018295884132385, -0.923703432083129...
def drop ( self ) - > none : # drop all throttles with this process's pid, regardless of site self. checktime = 0 now = time. time ( ) processes = [ p for p in self. _ read _ file ( ) if now - p. time < = self. expiry and p. pid! = pid ] self. _ write _ file ( processes )
[ 0.2818535268306732, -1.1537437438964844, 0.5677495002746582, -0.08731283992528915, 0.46265608072280884, 0.901204526424408, -0.13621769845485687, -0.06651660799980164, -1.170001745223999, 0.5498770475387573, 0.31841668486595154, 0.07702553272247314, -0.8742539286613464, 0.39587581157684326,...
def insertwidget ( self, index, assembly, title ) : editor = assembly. geteditor ( ) newindex = super ( tabwidget, self ). inserttab ( index, assembly, ui. pixmapcache. geticon ( " empty. png " ), title ) self. settabsclosable ( true ) self. navigationbutton. setenabled ( true ) if editor not in self. editors : self. e...
[ -0.8044336438179016, 0.06287135183811188, 0.6292007565498352, -0.5285473465919495, 0.12151358276605606, 0.3906727731227875, 0.19886653125286102, 0.1905127316713333, -0.29562506079673767, 0.04726153984665871, -0.5800982117652893, -1.062300682067871, -0.8174812197685242, -0.10225627571344376...
def right _ mouse _ menu ( self, pos ) : active = self. view. currentindex ( ) # index under mouse active = active. sibling ( active. row ( ), 0 ) # get first column globalpos = self. view. viewport ( ). maptoglobal ( pos ) if not active. isvalid ( ) : return menu = qtwidgets. qmenu ( self. view ) # direct assignment a...
[ -0.41667813062667847, -0.4293569028377533, 0.7466033101081848, 0.35758981108665466, -0.8227565288543701, 0.15219911932945251, 0.7683586478233337, -0.3341037333011627, -0.04050441458821297, 0.29415151476860046, -0.3692372739315033, 0.7887272238731384, 0.09092960506677628, 0.3685004711151123...
def test _ match _ not _ found ( self, basic _ logfile ) : matcher = logmatcher ( log _ path = basic _ logfile ) regex _ exp = re. compile ( r " bob " ) with pytest. raises ( timing. timeoutexception ) : matcher. match ( regex = regex _ exp, timeout = 0. 5 )
[ 0.5253189206123352, 0.2359107881784439, 0.5519894957542419, 0.12073647230863571, 0.16279760003089905, 0.9232866764068604, -0.1246156245470047, 0.6774866580963135, -0.6562367081642151, -0.2753297984600067, -0.5026864409446716, -0.6826765537261963, -0.19454044103622437, 0.37124475836753845, ...
def getextremefluxes ( self ) : s = self. getstoichiometricmatrix ( ) fvarange, fvamin, fvamax = fva ( s, v _ lb = self. getlowerbounds ( ), v _ ub = self. getupperbounds ( ) ) return {'fvarange': np. asarray ( fvarange ),'fvamin': np. asarray ( fvamin ),'fvamax': np. asarray ( fvamax ) }
[ -0.10445775091648102, -0.2229636013507843, 0.4549441337585449, 0.08945607393980026, -0.8306044340133667, -0.818256676197052, -0.3011073172092438, -0.39277034997940063, -0.0004808582889381796, -0.06950882822275162, -0.8625660538673401, 0.21253938972949982, -0.12706121802330017, 0.3215800523...
def blur _ motion _ v ( im : np. ndarray, fac : float ) - > np. ndarray : w, h = im. shape [ : 2 ] [ : : - 1 ] k = max ( 1, int ( ( fac * 0. 01125 ) * max ( w, h ) ) ) # 0. 01, 0. 016 # k = max ( 1, int ( ( fac * 0. 05 ) * max ( w, h ) ) ) # 0. 01, 0. 016 k = k + 1 if k % 2 else k kernel _ v = np. zeros ( ( k, k ) ) ke...
[ 0.6153139472007751, 0.21056485176086426, 0.8201013803482056, 1.3140132427215576, -0.617192804813385, -0.718403697013855, 0.531466007232666, -0.5079567432403564, 0.5280359983444214, 0.7059647440910339, 0.84525066614151, 0.6497625708580017, 0.48856276273727417, 0.5956802368164062, 0.101976...
def test _ concurrent _ commands ( case, c8ydevice : device ) : clients = case. get ( " clients " ) delay = case. get ( " delay ", 0. 1 ) command = case. get ( " command ", " sleep 10 " ) threads : list [ threading. thread ] = [ ] results : list [ subprocess. completedprocess ] = [ none ] * clients durations : list [ f...
[ 0.6907588839530945, 0.644050121307373, 0.6359352469444275, -0.4643459916114807, 1.5120131969451904, -0.3178125321865082, 1.1303263902664185, -0.13765813410282135, -0.21764841675758362, -0.668880820274353, 0.25897929072380066, -0.019815556704998016, -0.8108892440795898, 0.4372231364250183, ...
def path _ to _ class ( path ) : module _ path, cls _ name = path. split (':') module = _ _ import _ _ ( module _ path, fromlist = [ cls _ name ] ) cls = getattr ( module, cls _ name ) return cls
[ -0.2825866639614105, -1.1275177001953125, 0.4125475585460663, -0.2244882434606552, -0.20074212551116943, 0.7066763639450073, 0.3175809383392334, -0.47356924414634705, 0.2972557246685028, 0.7265503406524658, -0.08133133500814438, 0.47327136993408203, -0.25090456008911133, -1.255676507949829...
def is _ dir ( dir _ name ) : if not os. path. isdir ( dir _ name ) : msg = " { 0 } is not a directory ". format ( dir _ name ) raise argumenttypeerror ( msg ) else : return dir _ name
[ -0.532619297504425, 0.14395558834075928, 0.5563123226165771, 0.5662813186645508, 0.024670161306858063, 0.636915922164917, 0.6635937094688416, 0.21579867601394653, 1.2104188203811646, 0.1312142014503479, 1.0803544521331787, 0.7037801146507263, -0.28775304555892944, 0.7983744144439697, -0....
def _ brightness _ one _ fire ( df _ firms, tree _ centr, ev _ id, res _ centr, num _ centr ) : logger. debug ('brightness corresponding to firms event % s. ', str ( ev _ id ) ) temp _ firms = df _ firms. reindex ( index = ( np. argwhere ( df _ firms ['event _ id']. values = = ev _ id ). reshape ( - 1, ) ), columns = [...
[ 0.28004610538482666, -0.5663183927536011, 0.4579765498638153, -0.005081348121166229, 0.041812147945165634, -0.7264528870582581, 0.26478585600852966, 0.6449602842330933, -0.1485542505979538, -0.4097723662853241, 0.5831725001335144, 0.502894937992096, 0.5262966752052307, 0.536614716053009, ...
def _ translate _ _ interfaces _ interface _ dampening ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. half _ life. _ changed ( ) : input _ yang _ obj. half _ life = input _ yang _ obj. half _ life if input _ yang _ obj. reuse. _ changed ( ) : input _ yang _ obj. reuse = input _ yang _ o...
[ 0.03966649994254112, -0.203913152217865, 0.5688458681106567, -0.5305189490318298, -0.45514920353889465, 0.4448660612106323, 0.9711118936538696, -0.9475657939910889, 0.7220624089241028, 0.17272789776325226, -0.5241706967353821, 0.0017296213191002607, -0.34980273246765137, 0.2228822559118271...
def setup _ codes ( ) : conn = sqlite3. connect ('source. db') curs = conn. cursor ( ) curs. execute ('drop table if exists icd9 ;') create _ string = " " " create table icd9 ( id integer primary key, code text, short _ desc text, long _ desc text ) ; " " " curs. execute ( create _ string ) reader = csv. reader ( open ...
[ 0.43856140971183777, 0.5967326164245605, 0.6276146769523621, -0.6906611323356628, 0.6128741502761841, 0.11148332804441452, 0.4192638099193573, 0.2499285638332367, -0.3935253322124481, 0.4895033538341522, -0.2361803650856018, -0.7929231524467468, -0.6676228642463684, 0.2409301996231079, 0...
def load _ module ( name ) : mod = _ _ import _ _ ( name ) for sub in name. split ( '.') [ 1 : ] : mod = getattr ( mod, sub ) return mod
[ -0.8585514426231384, -0.030324844643473625, 0.6371452212333679, -0.2251843959093094, -0.9489248394966125, -0.19976042211055756, 0.19974654912948608, -1.2967500686645508, 0.13685964047908783, 0.7730301022529602, -0.8835686445236206, 0.3603504002094269, -0.3602384030818939, -0.55957984924316...
def _ update _ opf ( self ) : epub _ opf = os. path. join ( self. epub _ dir,'book. opf') epub _ opf _ doc = minidom. parse ( epub _ opf ) item _ xml = ('< item href = " description. html " id = " description "'' media - type = " application / xhtml + xml " / >') item = minidom. parsestring ( item _ xml ). documentelem...
[ -0.053814224898815155, -0.3858542740345001, 0.5943930149078369, -0.3391847610473633, 0.07922031730413437, 0.7735333442687988, -0.14865802228450775, 0.8186215758323669, -0.3644108176231384, 0.3219551742076874, -0.013876662589609623, -0.21087616682052612, -0.5783188939094543, -0.488215565681...
def main _ screen ( self ) : text _ from _ xml, ids, eng _ list = self. util. get _ text _ from _ xml ( self. string _ xml, " mainscreen ", " trans - unit ", config. selected _ language. strip ( ) ) xpath _ main = self. util. read _ xpath _ list _ from _ xml ( self. object _ repo, " mainscreen ", self. my _ object ) le...
[ -0.6315643191337585, -0.19426940381526947, 0.6367010474205017, 0.11009486764669418, -0.5445176959037781, -0.02267313189804554, 0.027182087302207947, -0.8006108403205872, 0.561490535736084, 0.35551682114601135, 0.13453060388565063, -0.2936916947364807, -0.7996925711631775, 0.887754380702972...
def _ drop _ unusual _ classes ( self ) : self. rm _ df = self. rm _ df [ self. rm _ df ['marital _ status']! ='absurd'] self. rm _ df = self. rm _ df [ self. rm _ df ['marital _ status']! ='yolo']
[ -0.8067023754119873, -0.2988876402378082, 0.5101872682571411, -0.10279073566198349, -0.10021865367889404, 1.1677439212799072, -0.1433490663766861, 0.5972592234611511, -0.06705415993928909, -0.45540177822113037, 0.3321481943130493, 0.3726162910461426, 0.40253353118896484, 0.4862427711486816...
def assert _ plot ( plt _ type, data, context = none, special _ comparison = none, * * kwargs ) : report = kwargs. get ( " report ", main _ report ) # allow instructor to use " plot " instead of " line " as type if plt _ type = ='plot': plt _ type ='line'# check the plots to see if there is a plot with the data type _ ...
[ 0.6870984435081482, 0.15549777448177338, 0.7552945613861084, 0.08216359466314316, 0.7791380286216736, 0.6363439559936523, 0.22475548088550568, -0.580912172794342, -0.012632296420633793, -0.641096293926239, 1.2042899131774902, 1.0241498947143555, -0.6369498372077942, 0.25762614607810974, ...
def getgradients ( self, batch ) : y = batch w = np. random. exponential ( size = self. m ) u = np. random. uniform ( - np. pi / 2, np. pi / 2, self. m ) v = np. random. normal ( 0, 1 ) gradients = self. gradientfunction ( y = y, w = w, u = u, v = v ) # print " gradients " # print gradients if math. isnan ( gradients [...
[ -0.4763299822807312, -0.4217533767223358, 0.7044369578361511, 0.5521920323371887, 0.20960372686386108, 0.32897815108299255, -0.0018868702463805676, -0.3729466199874878, -0.8465942144393921, 0.25336840748786926, -0.2416808009147644, 1.0413329601287842, -0.787600040435791, 0.2868396639823913...
def selection _ sort ( items, reverse = false ) : # instantiate last _ i to hold the value for the last index last _ i = len ( items ) - 1 # sorts in ascending order if false, # descending if false if reverse = = false : # iterate through the list for i in range ( len ( items ) ) : # instatiate variables to be reset ev...
[ -1.0653992891311646, -0.5476835370063782, 0.8241775631904602, 0.1617080122232437, -0.3344968855381012, -0.017237568274140358, 0.7538278102874756, 0.42800337076187134, 0.16216206550598145, -0.021456532180309296, -0.32491567730903625, -0.08174923062324524, -0.856317400932312, -0.570418059825...
def _ _ init _ _ ( self, columns, format _ func, fh ) : self. columns = columns self. format _ func = format _ func self. fh = fh
[ 1.0902888774871826, -0.7921178936958313, 0.46351975202560425, 0.5191608667373657, 0.4165261387825012, -0.10500931739807129, -0.13584885001182556, 0.8351720571517944, -1.2177563905715942, -0.8670890927314758, 0.3272170126438141, 0.7497063279151917, 1.1214122772216797, 0.9533462524414062, ...
def get _ triangles ( self, me : bool = true ) - > union [ triangle64, triangle32 ] : if self. albedos is none : albedos = 1. 0 else : albedos = self. albedos indices = np. arange ( self. vertices. shape [ 0 ] ) icq _ indices = indices. reshape ( ( 6, self. grid _ size, self. grid _ size ) ) triangulated _ icq _ indice...
[ -0.2767972946166992, 0.7132383584976196, 0.6665345430374146, -0.07418649643659592, 0.0011091880733147264, 0.5606382489204407, 0.3946319818496704, -0.30981022119522095, 0.45957282185554504, 0.11032300442457199, 0.35111892223358154, 0.5183732509613037, 0.2652745842933655, -0.4966211318969726...
def genregioncsv ( options, fp _ bbv, fp _ simp, fp _ weight ) : # read data from weights, simpoints and bbv files. # error check the regions. # weight _ dict = getweights ( fp _ weight ) simp _ dict = getsimpoints ( fp _ simp ) cumulative _ icount, all _ bb, bb _ freq, bb _ num _ instr, region _ bbv = getregionbbv ( f...
[ 0.8477195501327515, 0.229092076420784, 0.9093614816665649, -0.36671769618988037, 0.45846012234687805, -0.10384370386600494, 1.2011268138885498, 0.044349297881126404, -0.6654500365257263, 0.09720298647880554, 0.5023037195205688, 0.31894177198410034, 0.0875229611992836, 0.25421711802482605, ...
def veff ( r ) : vext = - z / r return vh ( r ) + vext
[ 0.9652679562568665, 0.3242012858390808, -0.05420749634504318, 0.6378383040428162, -0.5771552920341492, 0.08041776716709137, 0.6050376892089844, -0.5069207549095154, 0.4982719421386719, 0.25821417570114136, -0.30525025725364685, -0.4701685607433319, -1.0449150800704956, 0.27534952759742737,...
def get _ region ( ) : try : uri ='http : / / 169. 254. 169. 254 / latest / meta - data / public - hostname'http = httplib2. http ( timeout = 5 ) response, hostname = http. request ( uri ) except ( socket. timeout, socket. error ) : hostname = socket. gethostname ( ) if'west'in hostname : return'west'else : return'east...
[ -0.2607633173465729, 0.6606751084327698, 0.6595571041107178, -0.0011286040535196662, 0.1195010170340538, 0.032433319836854935, -0.1685381829738617, -0.15819042921066284, -0.7055217027664185, -0.27815234661102295, 0.6668387651443481, 0.9755005836486816, -0.47502338886260986, -0.276932150125...
def is _ compatible ( cmd ) : return cmd in [ info. command for info in compilerinfo. all ( ) ]
[ 0.3731342852115631, -0.626448929309845, 0.3913092613220215, 1.061752200126648, -0.06098641827702522, 0.4081850051879883, -0.4080891013145447, 0.46059703826904297, -0.2769477367401123, -0.7821387052536011, 0.17521177232265472, -0.08536645025014877, -0.17412948608398438, 1.943052887916565, ...
def symbolic _ double _ conditional _ probabilities ( symx, symy, symz ) : if ( len ( symx )! = len ( symy ) ) or ( len ( symy )! = len ( symz ) ) : raise valueerror ('all arrays must have same length') symx = np. array ( symx ) symy = np. array ( symy ) symz = np. array ( symz ) # initialize cp = { } n = { } for x, y,...
[ 0.6156187057495117, -0.20473609864711761, 0.7802553176879883, -0.051331933587789536, -0.284830242395401, -0.006552484352141619, 0.9508625268936157, -0.09671750664710999, -0.17847776412963867, 0.839545488357544, -0.6630904674530029, -0.3059547245502472, -0.29248857498168945, 1.0966922044754...
def prepare _ event _ list _ csv ( file _ directory, save _ filename = none, delimiter _ comma = false ) : columns _ to _ use = [ " companyname ", " additionalinformationtype ", " documentid ", " reasonforinformation ", " dateofcorrection ", " dateofinformation ", " classified ", " classificationtime ", " filedirectory...
[ 0.27294519543647766, -0.2864477038383484, 0.7912428379058838, 0.4737764298915863, 0.06123986095190048, -0.4913797974586487, 0.052194345742464066, 0.8374000787734985, 0.08370255678892136, 0.335935115814209, 0.22898192703723907, 0.8129647970199585, 0.6271697282791138, 0.3041958510875702, 0...
def load ( source = none, map _ code = none, date _ min = none, date _ max = none, ) : if source = = global _ var. data _ source _ load _ eco2mix : df = eco2mix. load ( map _ code = map _ code, date _ min = date _ min, date _ max = date _ max, ) elif source = = global _ var. data _ source _ load _ entsoe : df = entsoe....
[ -1.1250250339508057, 0.8428818583488464, 0.6970911622047424, -0.15898071229457855, -0.5567341446876526, 0.19149963557720184, -0.17911237478256226, -0.23484911024570465, -0.49470508098602295, -0.6269627213478088, 0.41683804988861084, 1.4839428663253784, 0.7988526821136475, -0.55123049020767...
def test _ add _ artifact _ dep ( self ) : pass
[ 0.4845446050167084, -0.0854252427816391, 0.42754459381103516, 0.6365432143211365, 0.4647105634212494, 1.1633758544921875, 1.5809805393218994, -0.4069264233112335, 0.6890949606895447, -0.8594399690628052, -0.7969806790351868, -0.36660051345825195, 0.5630232691764832, -0.31581854820251465, ...
def next _ op ( self, dataset, preprocessing _ fn = none, multiple _ examples = 1, data _ types = none, return _ key = true, cache _ preprocessed = false ) : if data _ types is none : data _ types = [ tf. int32, tf. float32, tf. int32, tf. int32, tf. int32, tf. int32 ] if return _ key : data _ types + = [ tf. int32 ] r...
[ -0.7732085585594177, 1.1688545942306519, 0.5981895327568054, -0.2225513607263565, -0.4415340721607208, -1.036193609237671, 0.5195804834365845, 0.9081434011459351, 0.3215460777282715, 0.5193269848823547, -0.916777491569519, 0.028538953512907028, 0.2831510603427887, -0.13087454438209534, 0...
def do _ install _ dir ( self, action ) : template = string. template ( action [ " install _ dir " ] ) self. installdir = template. substitute ( * * self. symbols ) self. symbols ['install _ dir'] = self. installdir logger. info ( f " overriding install dir to { self. installdir } " )
[ -0.5906810760498047, -0.5590365529060364, 0.292400598526001, -0.3849794864654541, 0.7184977531433105, -0.5940425992012024, 1.4679169654846191, 0.7160682678222656, -0.020242061465978622, -0.05632049962878227, -0.1091042309999466, 0.32226115465164185, 0.5770236253738403, 0.6277028918266296, ...
def handler ( event, context ) : response = event [ " records " ] [ 0 ] [ " cf " ] [ " response " ] request = event [ " records " ] [ 0 ] [ " cf " ] [ " request " ] headers = response [ " headers " ] # if s3 returns a 404 sets custom origin properties # custom origin is tile cache app. url is passed via custom header s...
[ -0.33287182450294495, -0.5952496528625488, 0.8619946241378784, -0.7407865524291992, -0.17103366553783417, -0.02934623882174492, 0.6208640336990356, -0.09256803244352341, 0.49524202942848206, 0.7529178857803345, 0.15028706192970276, 0.22364592552185059, 1.1290860176086426, -0.35494884848594...
def closed ( self, * args ) : return _ topods. topods _ shape _ closed ( self, * args )
[ -0.6685931086540222, -0.36297258734703064, 0.41077640652656555, -0.2965068817138672, 0.03569122031331062, 1.4094151258468628, 0.662266194820404, -1.2080813646316528, -0.5589942932128906, -0.7889060974121094, -0.4054318070411682, -0.29764026403427124, -0.06163650006055832, 0.191252127289772...
async def guild ( ctx ) : prefix = await bot. get _ prefix ( ctx. message ) owner _ id = ctx. message. author. guild. owner _ id author _ id = ctx. message. author. id guild _ id = ctx. message. author. guild. id all _ channels = [ x. name for x in ctx. guild. text _ channels ] messages _ split = ctx. message. content....
[ -0.27926844358444214, 0.6244555711746216, 0.9493550658226013, 0.5949136018753052, 0.4070635437965393, -0.5571776032447815, 0.07654061168432236, -0.378322035074234, -0.02627504989504814, 0.5864232778549194, -0.21393020451068878, 1.6968380212783813, -0.2744658291339874, 1.0187703371047974, ...
def partition _ grid ( self, cpus = 1 ) : # tree = spatial. kdtree ( data = self. atom _ sites _ grid ) # self. nn _ dists, self. nn _ groups = tree. query ( self. grid _ sites ( ) ) # self. nn _ atom _ labels = [ self. atom _ labels [ i ] for i in self. nn _ groups ] def find _ sites ( sites _ dict ) : ref _ sites = s...
[ -0.20496472716331482, 0.8548632860183716, 0.431964635848999, -0.5165408253669739, -0.3648138642311096, 0.06508287787437439, 0.8222048878669739, -0.28923049569129944, 0.091761015355587, 0.22690723836421967, 0.3486078679561615, 0.5473547577857971, -0.4432794451713562, 0.8086791038513184, -...
def merge _ acronyms ( s ) : r = re. compile ( r'(? : (? < = \. | \ s ) [ a - z ] \. ) +') acronyms = r. findall ( s ) for a in acronyms : s = s. replace ( a, a. replace ( '. ','' ) ) return s
[ -0.15149787068367004, -0.34884336590766907, 0.6991378664970398, -0.01808483526110649, -0.3599487543106079, 0.07368841022253036, -0.03561324626207352, 0.05364013835787773, 1.2856152057647705, 0.657923698425293, 0.14844536781311035, 0.10828325897455215, 0.36293721199035645, -0.42544203996658...
def _ _ call _ _ ( self, environ, start _ response ) : path = environ ['path _ info'] or'/'for p, app in self. apps : # the apps list should be sorted by length, descending. if path. startswith ('{ path! s } / '. format ( path = p ) ) or path = = p : environ = environ. copy ( ) environ ['script _ name'] = environ. get ...
[ -0.5090104937553406, -0.9129787683486938, 0.83359694480896, 0.643737256526947, 0.3890303075313568, 0.010076924227178097, 0.4004244804382324, -0.4040072560310364, -0.07895483821630478, 0.90867018699646, 0.06160683184862137, -0.4267556369304657, 0.004262370057404041, 0.34412115812301636, -...
def test _ reading _ yaml _ config ( self ) : dev _ id ='test'device = device _ tracker. device ( self. hass, timedelta ( seconds = 180 ), true, dev _ id,'ab : cd : ef : gh : ij ','test name ', picture ='http : / / test. picture ', hide _ if _ away = true, icon ='mdi : kettle') device _ tracker. update _ config ( self....
[ -0.24079100787639618, 0.06910587847232819, 0.4918954372406006, -0.2355024665594101, -0.08633018285036087, -0.286782443523407, 0.4842587113380432, 0.6538196206092834, 0.08028567582368851, -0.06895112246274948, -0.7269520163536072, -0.09927361458539963, 0.6428508758544922, 0.3144212961196899...
def on _ session _ started ( session _ started _ request, session ) : print ( " on _ session _ started requestid = " + session _ started _ request ['requestid'] + ", sessionid = " + session ['sessionid'] )
[ 0.34308189153671265, -2.3350560665130615, 0.40348246693611145, 0.2765103876590729, 0.013997546397149563, -0.4538533389568329, -0.04224245622754097, -0.6005154252052307, 1.8101667165756226, 0.5341928601264954, -0.11101683229207993, 1.5081357955932617, 0.7292655110359192, 0.1916714757680893,...
def parse _ config ( path : str = none, data : str = none, env _ tag : str = '! env ', arg _ tag : str = '! arg ', arg _ replacements : dict = { } ) - > dict : # pattern for global vars : look for $ { word } pattern = re. compile ( '. *? \ $ { ( \ w + ) }. *?') loader = yaml. safeloader # the tag will be used to mark w...
[ 0.5686360001564026, -0.40932321548461914, 0.8414953947067261, -0.7697911262512207, -0.511445164680481, -0.501778244972229, 0.383960485458374, 1.3371502161026, -1.0690629482269287, 0.13153456151485443, -0.29286110401153564, 0.34144771099090576, 0.3130374550819397, 0.8624029159545898, 0.42...
def encode _ multipart ( fields, files, boundary = none ) : import mimetypes import random import string _ boundary _ chars = string. digits + string. ascii _ letters def escape _ quote ( s ) : return s. replace ('" ','\ \ "') if boundary is none : boundary =''. join ( random. choice ( _ boundary _ chars ) for i in ran...
[ -0.1257508248090744, -0.6465215086936951, 0.7881677746772766, -0.7844507694244385, -0.6195275783538818, 0.16575996577739716, -0.8253623247146606, 0.12253941595554352, -0.575291633605957, 0.5164940357208252, -0.5798472166061401, 0.034781720489263535, -0.41045624017715454, 0.3348275721073150...
def get _ log _ probs ( self, tokens : list [ str ] ) - > torch. tensor : assert len ( tokens ) < = self. model. hparams. n _ ctx # todo ids = [ self. token _ to _ id ( t ) for t in tokens ] ctx = torch. longtensor ( ids ). unsqueeze ( 0 ) with torch. no _ grad ( ) : ctx = ctx. to ( device = self. device ) logits = sel...
[ -0.0848054364323616, 0.07701212912797928, 0.513985812664032, 0.22959348559379578, -0.2031613141298294, -0.24423155188560486, -1.631207823753357, -0.15833474695682526, 0.0902850404381752, 0.1679246723651886, -0.34167611598968506, 0.313632071018219, -0.2608211040496826, -0.7444582581520081, ...
def test _ access ( code, spark ) : if code not in ['sic ','soc'] : raise valueerror ( f " code { code } is not recognised. please use either'sic'or'soc '. " ) else : for dataset _ type in ['validation ','training ','full'] : try : file _ path = get _ file _ path ( code, dataset _ type, balanced = false ) df = spark. r...
[ -0.10296498984098434, 0.2913852632045746, 0.7333641648292542, 0.6331464648246765, 0.5826875567436218, -0.18945865333080292, 0.501751184463501, 0.40983346104621887, -0.18878650665283203, -0.9633329510688782, 1.360599160194397, 0.3085896670818329, 0.26685139536857605, 0.4952574074268341, 1...
def get _ unhealthy _ instances ( self ) :
[ -0.9124245047569275, -0.8439607620239258, 0.5472748875617981, 0.07916821539402008, 0.5075546503067017, 0.9251461029052734, -0.5579102039337158, -0.10166508704423904, -0.8553177714347839, -0.3611612021923065, -0.10368488729000092, 0.43825894594192505, -0.7245118021965027, 0.4760488271713257...
def init _ states ( self, * args : any, * * kwargs : any ) - > nestedmap : return nestedmap ( x _ layers = [ layer. init _ states ( * args, * * kwargs ) for layer in self. x _ layers ] )
[ -0.40180861949920654, -0.09261534363031387, 0.36099743843078613, 0.16899017989635468, 0.6908670663833618, -0.10102023184299469, 0.25509294867515564, -0.5924220085144043, -0.18208563327789307, -0.9643087983131409, -0.6608597040176392, -0.35254961252212524, 0.42378321290016174, 0.18869493901...
def loglikelihood ( self ) : log _ likelihood = 0 for i in range ( self. n _ docs ) : words = self. reviews [ i ] topics = self. z [ i ] # loglikelihood = np. log ( self. theta [ ( [ i ] * len ( topics ), topics ) ] ) + np. log ( self. phi [ ( topics, words ) ] ) log _ likelihood + = np. sum ( np. log ( self. theta [ i...
[ 0.44111767411231995, -0.8600223064422607, 0.32467544078826904, -1.2702003717422485, -0.1383473426103592, 0.8030145764350891, -0.8729610443115234, 0.33115777373313904, 0.5405781269073486, 0.17020204663276672, 0.39136335253715515, 0.2452322542667389, -1.5490652322769165, 0.48699331283569336,...
def file _ handles ( self ) : log. debug ( " executing volatility handles plugin on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] self. config. object _ type = " file " command = self. plugins [ " handles " ] ( self. config ) for pid, handle, object _ type, name in command. calculate ( ) : new ...
[ -0.16645561158657074, -1.2482084035873413, 0.4544200599193573, -0.5408288836479187, 1.2656145095825195, -0.44669458270072937, -0.17635038495063782, -0.22586077451705933, -0.8381385207176208, -0.04218573123216629, -0.312374472618103, 0.18003186583518982, -0.36410605907440186, 0.348174870014...
def get _ radius ( self ) : return self. _ _ radius
[ 0.038989800959825516, -0.5663362145423889, 0.4025323987007141, -0.06247437745332718, 0.30958887934684753, 0.5710777044296265, 0.6260589957237244, -0.12840470671653748, -0.26929253339767456, -0.766605794429779, 0.0487024299800396, 1.404345154762268, -0.9684077501296997, -0.09009355306625366...
async def say ( self, text : str, voice _ id : str, * * kwargs ) - > bytes : return bytes ( )
[ 0.07634413987398148, 0.20240934193134308, 0.42360153794288635, 0.4200674593448639, -0.3754331171512604, -0.26344528794288635, -2.2083535194396973, -0.6165347099304199, 0.19465036690235138, -0.030905410647392273, -0.18085496127605438, 0.8571128249168396, -1.8008891344070435, 0.1019781902432...
def firstsentence _ semantic _ heuristics ( doc ) : # these two semantic class cannot corefer exclude _ list = ( " state ", " country " ) if len ( doc. sentences ) < 2 : return sentence1 = doc. sentences [ 0 ] sentence2 = doc. sentences [ 1 ] sundance _ nes = reconcile. getsundancenes ( doc. getname ( ) ) first _ sente...
[ 0.0964699387550354, 0.19433584809303284, 0.9913269281387329, -0.28503379225730896, -0.32226210832595825, 0.35041847825050354, 0.14630961418151855, 0.6275386214256287, 0.4094877243041992, 0.27679312229156494, 0.012111744843423367, 0.16354411840438843, 0.802024781703949, 0.894166111946106, ...
def to _ dhms ( p _ seconds ) : l _ ret = datetime. datetime ( 1970, 1, 1, 0, tzinfo = none ) l _ ret = l _ ret. fromtimestamp ( p _ seconds ) return l _ ret
[ -0.27949365973472595, 0.2830699682235718, 0.437524676322937, -0.15152320265769958, 0.07518158107995987, 0.11858059465885162, -0.9595686197280884, -0.6653240919113159, 0.7517530918121338, -0.3396274447441101, -0.5148435831069946, -0.1387241929769516, 0.34407106041908264, -0.0433240160346031...
def resolve _ variables ( self, context, provider ) : resolve _ variables ( self. variables, context, provider ) self. blueprint. resolve _ variables ( self. variables )
[ -1.1986733675003052, 0.2103561908006668, 0.17505986988544464, -0.26528796553611755, 1.4101715087890625, -0.8727090954780579, -0.8219227194786072, 0.2800110876560211, -0.3733828663825989, -0.22872288525104523, -0.6382547616958618, 0.5829058289527893, -0.41262462735176086, -0.143705219030380...
def _ getitem ( self, key : union [ int, slice, str ], format _ type = none, format _ columns = none, output _ all _ columns = false, format _ kwargs = none, ) - > union [ dict, list ] : format _ kwargs = format _ kwargs if format _ kwargs is not none else { } formatter = get _ formatter ( format _ type, * * format _ k...
[ -0.6385327577590942, 0.05394671484827995, 0.6798050403594971, 0.59085613489151, -0.7976604104042053, -0.836633563041687, -0.6482633948326111, -0.35771942138671875, -0.21041984856128693, 0.3453926146030426, 0.9146912693977356, 0.303857684135437, 0.4994930326938629, 0.16729140281677246, 0....
def synth _ coeffs _ gsm ( self, time, *, nmax = none, source = none ) : if self. coeffs _ gsm is none : raise valueerror ( " external gsm field coefficients are missing. " ) # handle optional argument : nmax if nmax is none : nmax = self. n _ gsm elif nmax > self. n _ gsm : warnings. warn ('supplied nmax = { 0 } is in...
[ -0.8318520784378052, 0.43228602409362793, 0.6596389412879944, -0.39544862508773804, 0.29944902658462524, -0.11880800127983093, -0.224620521068573, -0.5956069231033325, -0.3949739634990692, -0.3242572844028473, -0.46949848532676697, 0.07698081433773041, 0.1312798708677292, 0.193858370184898...
def time _ offset _ rolling _ sum _ df _ ser ( data _ df _ ser, window _ i _ s, min _ periods _ i = 1, center _ b = false ) : def calculate _ sum _ at _ ts ( ts ) : if center _ b = = false : dslice _ df _ ser = data _ df _ ser [ ts - pd. datetools. to _ offset ( window _ i _ s ). delta + timedelta ( 0, 0, 1 ) : ts ] # ...
[ -0.7975414991378784, 0.23589760065078735, 0.9803845882415771, -0.11713624000549316, -0.735485851764679, -0.006673743482679129, 0.4545346796512604, 0.20337113738059998, 0.9183052778244019, 0.38235023617744446, -0.11057204008102417, 1.4332444667816162, 0.06107932701706886, -0.726165592670440...
def gaussianblur ( self, kernel _ size = 9 ) : return ( cv2. gaussianblur ( self. im, ( kernel _ size, kernel _ size ), 0 ) )
[ 0.029865426942706108, -0.169528067111969, 0.5291340351104736, 0.6670423746109009, 0.05254368484020233, 0.408785343170166, -0.5547385811805725, -0.3812643885612488, 0.30396366119384766, -0.2005206048488617, 0.11255273967981339, 0.7291938662528992, -0.5659655928611755, 0.34210240840911865, ...
def lookup ( self, hostname ) : matches = [ config for config in self. _ config if self. _ allowed ( hostname, config ['host'] ) ] ret = { } for match in matches : for key, value in match ['config']. iteritems ( ) : if key not in ret : # create a copy of the original value, # else it will reference the original list # ...
[ -0.9543955326080322, 0.41199520230293274, 0.7291803359985352, -0.029628602787852287, -1.0040558576583862, -0.2770301401615143, -0.5130034685134888, 0.48009324073791504, -0.3880070149898529, 0.38390806317329407, -0.32779330015182495, -0.5247039198875427, -0.7675617337226868, 0.2365158796310...
def apply _ move ( self, move ) : # basic obstacle check if move = = self. left : if self. obstacle _ map [ self. player _ y ] [ self. player _ x - 1 ] = = self. obstacle _ symbol : return false else : new _ x = self. player _ x - 1 new _ y = self. player _ y elif move = = self. right : if self. obstacle _ map [ self. ...
[ -1.0154286623001099, -1.1917999982833862, 1.379470944404602, -0.5390170216560364, -0.5146484375, 0.27998441457748413, 0.32090848684310913, -0.4849107265472412, -0.09296760708093643, 0.06201215833425522, -0.25729793310165405, -0.5708116292953491, -0.6315255165100098, -0.013248062692582607, ...
async def delete _ teacher _ app ( self, message _ id : int ) - > none : mycursor, db = await the _ database ( ) await mycursor. execute ( " delete from teacherapplication where message _ id = % s ", ( message _ id, ) ) await db. commit ( ) await mycursor. close ( )
[ -0.0616174079477787, -0.051058560609817505, 0.3203982710838318, 0.3921249508857727, 0.14574618637561798, 0.5670403838157654, 0.3032767176628113, -0.25231605768203735, -0.3187473714351654, 1.2882877588272095, 0.448216050863266, 0.15159305930137634, -0.8929875493049622, 1.1989043951034546, ...
def updateindexdense ( self, index, resolution ) : for key, value in index. iteritems ( ) : cubelist = list ( value ) cubeindex = np. array ( cubelist ) curindex = self. getindex ( key, resolution, true ) if curindex = = [ ] : sql = " insert into " + self. proj. getidxtable ( resolution ) + " ( annid, cube ) values ( %...
[ -1.2337675094604492, -0.13638009130954742, 0.772930920124054, -0.24751506745815277, 0.01648295857012272, 0.31285348534584045, 0.2560313045978546, 0.4714999794960022, -0.028851749375462532, 0.9720478057861328, -0.04856681451201439, -0.5446795225143433, -1.3259477615356445, -0.04692755267024...
def get _ lodging _ id ( lodging _ info _ dict ) : # search if lodging is already saved in database search _ lodging _ in _ db = lodging. query. filter ( lodging. airbnb _ id = = lodging _ info _ dict [ " airbnb _ id " ], lodging. address = = lodging _ info _ dict [ " address " ], lodging. picture _ url = = lodging _ i...
[ -0.10886651277542114, -0.1830870360136032, 1.0087807178497314, 0.2556581497192383, 0.35387125611305237, 0.9265850186347961, 0.20844100415706635, 0.49649521708488464, 0.32354113459587097, -0.05695362389087677, 0.21481458842754364, -0.6966574192047119, -1.0129096508026123, 1.069634199142456,...
def compute _ conv2d ( attrs, inputs, output _ type, target ) : padding = topi. util. get _ const _ tuple ( attrs. padding ) strides = topi. util. get _ const _ tuple ( attrs. strides ) dilation = tuple ( [ int ( d ) for d in attrs. dilation ] ) groups = attrs. groups layout = attrs. data _ layout out _ dtype = attrs. ...
[ -0.9306051731109619, -0.33686190843582153, 0.5309350490570068, 0.8229684233665466, -0.27904224395751953, -0.18790245056152344, 0.1699487417936325, -0.31004470586776733, 0.3348199129104614, 0.4182201623916626, 1.1378451585769653, 0.7451684474945068, 0.49695828557014465, 0.316371887922287, ...
def _ predict ( self, input _ : np. array ) - > np. array : # calculate the first ( input ) layer with identity function, bias and its weights input _ = np. append ( input _, self. bias _ activation ) output = np. dot ( input _, self. _ weights [ 0 ] ) self. _ net _ inputs [ 0 ] = output # calculate outputs for each hi...
[ -0.7138293385505676, -0.05440155789256096, 0.7088972330093384, 0.1333015114068985, -0.41792482137680054, -0.5551741719245911, 1.0333425998687744, -0.2706952691078186, -0.28018471598625183, 0.05699808895587921, -0.36584752798080444, 0.2931448221206665, -0.33738264441490173, 0.12818731367588...
def test _ importdoesnothing ( self ) : # we shouldn't suddenly drop into a script when we import this! _ _ import _ _ ('twisted. trial. _ _ main _ _')
[ 0.057317428290843964, -0.12009849399328232, 0.36313730478286743, 0.3783814013004303, 1.1451212167739868, 1.0919674634933472, 0.3284449577331543, -0.483109712600708, 0.2820403575897217, -0.3436853289604187, -1.0175844430923462, 0.2008533924818039, -0.3188585638999939, -0.04132259264588356, ...
def delete _ item ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': item = iteminbill. objects. get ( pk = request. post. get ('item _ pk') ) item. delete ( ) appointment = appointment. objects. get ( pk = request. session ['appointment _ for _ bill'] ) billlogic. update _ price ( app...
[ 0.24156513810157776, -0.028509672731161118, 0.7152099013328552, 1.2377829551696777, -0.190131276845932, 1.8225995302200317, -0.03630189225077629, 0.7457914352416992, 0.29962900280952454, 0.6446120142936707, 0.23730157315731049, -0.09911306947469711, -0.17065683007240295, 0.9417508840560913...
def mean _ ensemble _ distance ( ensembles ) : try : return sum ( ensembles ) / len ( ensembles ) except zerodivisionerror : pass return none
[ -0.9322240352630615, 0.24742454290390015, 0.40534335374832153, 0.28226932883262634, -0.2228192687034607, 0.6803083419799805, 0.75437331199646, -0.20109665393829346, 1.2143499851226807, 0.8561578989028931, 0.44755664467811584, 0.15370287001132965, -1.0134851932525635, 0.5333713889122009, ...
def _ _ init _ _ ( self, batch _ dims ) : if batch _ dims < 0 : raise valueerror ('batch dims must be non - negative.') self. _ batch _ dims = batch _ dims self. _ original _ tensor _ shape = none
[ 0.5736088752746582, 0.2136908918619156, 0.24044360220432281, 0.8599472641944885, -0.3915393650531769, 0.25500577688217163, 0.07090464979410172, 0.9692301750183105, -0.5348279476165771, -0.34981289505958557, -0.4408656656742096, 0.569104790687561, 0.7877051830291748, 0.1569550782442093, 0...
def test _ rosenbrock ( self ) : myfunc = simul. rosenbrock nvar = 2 vbounds = np. zeros ( ( nvar, 2 ) ) vbounds [ 0, 0 ] = - 5. vbounds [ 0, 1 ] = 5. vbounds [ 1, 0 ] = - 5. vbounds [ 1, 1 ] = 5. mypb = genop. genop ( ) mypb. verbose = true self. assertequal ( mypb. popsize, 100 ) self. assertequal ( mypb. pbcross, 0....
[ 0.08332371711730957, 0.5917125344276428, 0.6447189450263977, 0.9730933308601379, 0.6285086870193481, 0.3705567419528961, 0.5079812407493591, -0.13405771553516388, 0.20010524988174438, -0.40569448471069336, -0.7711727023124695, -0.41608577966690063, -1.25565505027771, 0.30766114592552185, ...
def line _ lap ( self, s, gtype ='vor') : # take the directional derivative of s : gs = self. grad ( s, gtype = gtype ) # map s to vertices of the lattice : sv = self. mids _ to _ verts ( gs, gtype = gtype ) # take the directional derivative a second time : laps = self. grad ( sv, gtype = gtype ) return laps
[ -0.3806425631046295, -0.33371278643608093, 0.4811868965625763, -0.7152457237243652, -0.53517085313797, 0.32549136877059937, -0.36702510714530945, -0.4252510070800781, 0.5678638815879822, -0.11436862498521805, -0.2831685543060303, 0.07924845069646835, 0.05672003701329231, 0.0319238156080246...
def forward ( self, input ) : # make sure that any constraints are enforced. h = self. layerh ( input ) h = self. layerhactivation ( h ) mean, std = self. layermean ( h ), self. layerstdactivation ( self. layerstd ( h ) ) # raise notimplementederror ( ) return mean, std
[ -0.3929733633995056, 0.09139003604650497, 0.49822288751602173, 0.025713318958878517, -0.4683537185192108, 0.9028934240341187, 1.0817222595214844, 0.16374105215072632, -0.20474420487880707, 0.22793978452682495, -0.2563264071941376, 0.5871398448944092, 0.2829933166503906, 0.8701449632644653,...
def _ create _ pseudo _ search _ region _ in _ two _ dimension ( self, frontier ) : if frontier. point ( ) : return edges = frontier. edges ( ) if len ( edges ) = = 1 : return left _ most _ edge = edges [ 0 ] right _ most _ edge = edges [ - 1 ] left _ extreme _ ray = searchutilities. create _ ray _ in _ two _ dimension...
[ -0.41262832283973694, -0.19666290283203125, 1.1757471561431885, 0.0015633078292012215, -0.7325858473777771, -0.25154346227645874, -0.7823641896247864, -0.8974686861038208, -0.2327878326177597, -0.056847985833883286, 0.06095799431204796, -0.40568238496780396, 0.11453613638877869, -0.1631426...
def updatescore ( self ) : for pipe in self. pipes : if self. ship. x _ pos > pipe. x _ pos and not pipe. passed : self. ship. score + = 1 sounds [ " score " ]. play ( ) if pipe. velocity < 13 : for pipe _ 2 in self. pipes : pipe _ 2. velocity + = 0. 5 self. hourglass. x _ velocity + = 0. 5 if self. bg. velocity < 4 : ...
[ -0.5555357933044434, -1.0941294431686401, 0.7070910334587097, -0.09353506565093994, 0.4406411945819855, 0.04323020204901695, 0.11915592849254608, -0.33083605766296387, -0.39454877376556396, 0.7204973101615906, 0.026609310880303383, -0.055884990841150284, -0.19372959434986115, 0.40115803480...
def run _ script ( self, script, * args ) : remote _ script _ path = self. copy _ file ( os. path. join ( self. local _ scripts _ dir, script ) ) silence _ output ( self. check _ call, [ " chmod ", " + x ", remote _ script _ path ], stdout = " null " ) silence _ output ( self. check _ call, [ remote _ script _ path ] +...
[ 0.06025143340229988, -0.16874244809150696, 0.7760959267616272, 0.2630426287651062, 0.30452725291252136, 0.840631902217865, 0.5490195155143738, 0.17390502989292145, -0.05318344756960869, 1.3788468837738037, 0.043527401983737946, 1.3890552520751953, -0.526295006275177, -0.038732025772333145,...
def get _ historical _ data ( fsym, tsym, freq, info ='full ', e ='all ', try _ conversion = true, aggregate = 1, limit = 1440, to _ ts = false ) : # load data url = build _ url ( freq, fsym = fsym, tsym = tsym, freq = freq, e = e, try _ conversion = try _ conversion, aggregate = aggregate, limit = limit, to _ ts = to ...
[ -0.336355060338974, 0.46958035230636597, 0.6947879195213318, -0.28523489832878113, 0.1572697013616562, -0.786493718624115, -0.8239383697509766, 0.6153166890144348, -0.28784286975860596, -0.0397665910422802, 0.06409429758787155, 0.3882061541080475, 0.662601113319397, -0.04080701991915703, ...
def validate _ annotation _ deleted _ on _ node ( client, node, annotation _ key ) : # check via api node = client. reload ( node ) node _ annotations = node. annotations. data _ dict ( ) assert annotation _ key not in node _ annotations # check via kubectl node _ name = node. nodename command = " get nodes " + node _ ...
[ 0.34154707193374634, -0.3666346073150635, 0.40311694145202637, -0.255819171667099, 0.40297991037368774, 0.9713032245635986, -0.6301349401473999, -0.22559261322021484, -0.019098225980997086, 0.5682265758514404, 0.4799846112728119, 1.2897590398788452, 0.17070123553276062, 0.4672529995441437,...
async def wait _ for _ payload _ status _ change ( self, payload _ uuid, status, timeout = none ) : if timeout is none : timeout = self. global _ timeout url = " { } { } : { } / ws / payloads / { } ". format ( self. _ ws, self. _ server _ ip, self. _ server _ port, str ( payload _ uuid ) ) headers = self. get _ headers...
[ -0.475629061460495, -0.3055287003517151, 0.6771026849746704, -0.8006001710891724, -1.3050881624221802, -0.033229440450668335, -0.9390628337860107, -0.48320162296295166, 0.1799388974905014, 0.3786631226539612, 0.28097254037857056, 1.1440612077713013, -0.29532819986343384, 0.0143831670284271...
def _ _ init _ _ ( self, path, * * kwargs ) : self. path = path self. extra = kwargs
[ 0.2037331759929657, -0.23168106377124786, 0.40607696771621704, -0.04260370507836342, -1.0047396421432495, 0.6772975325584412, -0.3021013140678406, 0.6962824463844299, 0.11822697520256042, -0.6417568922042847, -0.7115402221679688, 0.10664672404527664, -0.269794762134552, 0.34020644426345825...
def _ _ init _ _ ( self, sequences, counts = none, threshold = 1, kmer = none ) : if counts is none : sequences, counts = np. unique ( sequences, return _ counts = true ) self. counts, self. sequences = zip ( * sorted ( zip ( counts, sequences ) ) [ : : - 1 ] ) self. kmer = kmer self. threshold = threshold if kmer : # ...
[ 0.516819953918457, -0.4867418110370636, 0.8678719401359558, 0.2866095006465912, -0.7664903998374939, -0.13331422209739685, 0.09372864663600922, 0.6749623417854309, 0.7780618071556091, 0.07703213393688202, -0.16489394009113312, -0.35112911462783813, 0.2620837986469269, 0.4411953389644623, ...
async def test _ process _ no _ respond _ to _ read ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", value _ type = " temperature ", group _ address = " 1 / 2 / 3 ", respond _ to _ read = false, ) expose _ sensor. sensor _ value. value = 21. 0 telegram = telegram ( groupaddress ( " 1 / ...
[ 0.1600523293018341, 0.7464331388473511, 0.46212998032569885, -0.890566349029541, -0.2644544839859009, 0.816953182220459, 0.35437509417533875, -0.9653701782226562, 0.25803351402282715, -0.9695441126823425, 0.8326941132545471, -0.07339569926261902, -0.4641355276107788, -0.4094284474849701, ...
def session _ end ( online, jrf _ targets ) : _ method _ name ='session _ end'_ logger. entering ( online, jrf _ targets, class _ name = _ class _ name, method _ name = _ method _ name ) if online : _ _ online _ session _ end ( jrf _ targets ) else : _ _ offline _ session _ end ( jrf _ targets ) _ logger. exiting ( cla...
[ -1.034047245979309, -0.793839693069458, 0.5380240082740784, 0.6602441668510437, 0.3605496287345886, -0.3842235207557678, 0.38033732771873474, -0.06406693905591965, 0.01850925199687481, 0.9812899231910706, -0.23617786169052124, 0.6271107792854309, -0.4931028187274933, 0.36691686511039734, ...
def add _ drawn _ object ( self, index ='', mode ='n ', delete = false, y _ pos = none, x _ pos = none, schema = none ) : # # if not index. startswith ('%') : # # return false if index in self. object _ dict : if'c'in self. object _ dict [ index ] : if y _ pos and x _ pos : self. object _ dict [ index ] ['c']. position...
[ -0.7027810215950012, -0.3054327964782715, 0.954678475856781, -1.0205496549606323, -0.19391809403896332, 0.8399415612220764, 0.006536333356052637, -0.14772550761699677, 0.39971449971199036, 0.23088990151882172, -0.7596083879470825, -0.2628600299358368, -0.4268289804458618, -0.87798273563385...