text
stringlengths
25
2.19k
embedding
listlengths
768
768
def submit _ review ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': review = review. objects. get ( pk = request. post. get ('review _ pk') ) review. customer _ rating = int ( request. post. get ('rating') ) review. save ( ) userlogic. update _ average ( review ) return redirect ('s...
[ -0.6651017069816589, 0.3281228244304657, 0.5157652497291565, 0.5220409631729126, -0.5059973001480103, 1.1815553903579712, -0.49078628420829773, 0.2907848656177521, -0.5309855937957764, 1.1409294605255127, 0.1663840413093567, -0.37409743666648865, -0.4718398451805115, 0.47882261872291565, ...
def getdependencevariancefeaturevalue ( self ) : jvector = self. coefficients ['jvector'] nz = self. coefficients ['nz'] pd = self. coefficients ['pd'] / nz [ :, none ] # divide by nz to get the normalized matrix u _ j = numpy. sum ( pd * jvector [ none, : ], 1, keepdims = true ) dv = numpy. sum ( pd * ( jvector [ none...
[ -0.4610739052295685, -0.5234765410423279, 0.8262458443641663, 0.18546250462532043, 0.054282546043395996, -0.09674454480409622, 1.627337098121643, 0.11890146881341934, -0.17000038921833038, -0.4021868407726288, -0.47131815552711487, 1.043777346611023, -0.2052958756685257, 0.2022841572761535...
def edit _ table _ pii _ flag ( self, table _ uuid, pii _ flag ) : q = db. session. query ( tableinfo ). filter _ by ( uuid = table _ uuid ) table = q. first ( ) table. pii _ flag = pii _ flag db. session. commit ( ) return table
[ -0.5242599248886108, -0.30875590443611145, 0.38296452164649963, 0.46019765734672546, -0.0020183459855616093, 0.48483267426490784, 0.036981310695409775, 1.285729169845581, -1.316707730293274, 1.1151524782180786, -0.07842117547988892, -0.4378287196159363, -1.0155208110809326, -0.800003170967...
def story _ info _ v1 ( self, story _ pk : int ) - > story : story _ id = self. media _ id ( story _ pk ) story _ pk, user _ id = story _ id. split ( " _ " ) stories = self. user _ stories _ v1 ( user _ id ) story _ pk = int ( story _ pk ) for story in stories : self. _ stories _ cache [ story. pk ] = story if story _ ...
[ -0.3032521605491638, 0.11858247965574265, 0.30292895436286926, 0.8497674465179443, -0.17398269474506378, 0.0035746556241065264, 0.14857608079910278, -1.1108607053756714, -0.17650440335273743, 0.04317042604088783, 0.12478376179933548, -0.36938947439193726, 0.6028857231140137, -0.34777918457...
def build _ command ( commands ) : return'| '. join ( [''. join ( [ sh _ escape ( x ) for x in a ] ) for a in commands ] )
[ -0.8427312970161438, -0.24351708590984344, 0.6206395626068115, 0.5736392140388489, 0.14021456241607666, -0.10700730979442596, -1.6382185220718384, -0.051246315240859985, -0.2746315598487854, -0.5685883164405823, 0.14654137194156647, -0.23276035487651825, 0.7657812833786011, 0.6572462320327...
def win _ statistics ( ) : data = getdata. load _ preprocessed _ data ( ) results = [ 0, 0, 0 ] matches = 0 for index, row in data. iterrows ( ) : matches = matches + 1 results [ int ( row ['match _ result'] ) ] = results [ int ( row ['match _ result'] ) ] + 1 return results [ 0 ] / matches, results [ 1 ] / matches, re...
[ -0.19070085883140564, 0.26744380593299866, 0.6575753688812256, 0.06538186222314835, 0.29861170053482056, -0.16170641779899597, 1.0312484502792358, -0.017256775870919228, -0.44439399242401123, -0.10947519540786743, -0.633809506893158, -0.42392784357070923, 0.6078266501426697, -0.16895306110...
def get _ detns ( self ) : return np. argmin ( np. abs ( self. _ detns - self. specx [ self. _ end ] ) )
[ 0.2618180811405182, -0.3235054612159729, 0.4592463970184326, 0.2900697588920593, 0.4893527328968048, 0.44700777530670166, 0.06721978634595871, -0.5384861826896667, -0.013033431023359299, -1.357946515083313, 0.15439443290233612, 0.6214452981948853, 0.13960614800453186, -0.14307749271392822,...
def test _ reflow _ _ sequence _ rebreak _ root ( raw _ sql _ in, raw _ sql _ out, default _ config, caplog ) : root = parse _ ansi _ string ( raw _ sql _ in, default _ config ) print ( root. stringify ( ) ) seq = reflowsequence. from _ root ( root, config = default _ config ) for idx, elem in enumerate ( seq. elements...
[ 0.19469508528709412, -0.004174548201262951, 0.484041303396225, 1.1610784530639648, -0.18132969737052917, -0.09760604053735733, 0.24509671330451965, 0.1420152485370636, 0.4093676805496216, -0.21034421026706696, -0.5679929256439209, 0.6913222670555115, -0.03495979681611061, 0.830162823200225...
def setnexttoken ( self, nexttoken ) : self. nexttoken = nexttoken
[ -0.6520220041275024, -0.4152258038520813, 0.14947453141212463, -0.11145662516355515, -0.5264078378677368, 0.302622526884079, -0.7601804137229919, 0.5687171816825867, 0.17322120070457458, -1.1118993759155273, -1.5421189069747925, 1.1282711029052734, -0.11874791979789734, 0.40696296095848083...
def remove _ pkcs _ pad ( padded _ msg, block _ size ) : padded _ msg _ len = len ( padded _ msg ) # check the input length if padded _ msg _ len = = 0 : return none # last byte has the value pad _ len = padded _ msg [ - 1 ] # checks if the input is not a multiple of the block length if ( padded _ msg _ len % block _ s...
[ 1.0693413019180298, 0.4464243948459625, 0.7598778605461121, -0.4333426058292389, -1.0529160499572754, -0.13110597431659698, -0.12282074242830276, -0.2506425082683563, 0.24218684434890747, 0.33186766505241394, 0.4781102240085602, 0.03218083083629608, -1.6108485460281372, 0.16176511347293854...
def prove _ sound _ inference ( rule : inferencerule ) - > proof : assert is _ sound _ inference ( rule ) for formula in rule. assumptions + ( rule. conclusion, ) : assert formula. operators ( ). issubset ( {'- > ','~'} ) # task 6. 4b # rules axiomatic _ system statement = rule encoded _ formula = encode _ as _ formula...
[ 1.173499345779419, -0.2137857973575592, 0.7796894311904907, -0.10732387751340866, 0.13693559169769287, -0.1468123495578766, 0.42986592650413513, -0.6684430837631226, 0.22570987045764923, 0.03026380017399788, -0.34316888451576233, -0.10579334199428558, -0.06870386004447937, 0.62959402799606...
def mis _ step _ sequential ( self, last _ sample, last _ sample _ len, last _ sample _ tar, log _ p _ prob, log _ q _ prob, batch _ size, ) : # generate proposals and calculate log probs accept _ rate = 0 accept _ count = 0 new _ samples, new _ lens, new _ targets = self. getnoise ( noise _ num = batch _ size * self. ...
[ 0.16432049870491028, 0.053413085639476776, 0.8818280100822449, -0.02134816162288189, -0.21085888147354126, -0.3398885726928711, -0.09503922611474991, -0.2533777356147766, -0.151574969291687, 0.2068627029657364, 0.21655906736850739, 0.12896734476089478, 0.0382784828543663, 0.189469099044799...
def cols ( ss ) : cols = { " names " : ss, " all " : [ ], " x " : [ ], " y " : [ ] } for n, s in enumerate ( ss ) : col = col ( n, s ) cols [ " all " ]. append ( col ) if not col [ " isignored " ] : if col [ " isklass " ] : cols [ " klass " ] = col if col [ " isgoal " ] : cols [ " y " ]. append ( col ) else : cols [ " ...
[ -1.0349416732788086, -0.14672024548053741, 0.40247654914855957, -0.7745951414108276, -0.40495556592941284, -0.1960330605506897, -0.27666446566581726, -0.9866313934326172, -0.21842750906944275, 0.4597799777984619, -1.3675873279571533, -0.4556591212749481, 1.3466644287109375, 0.4493948221206...
def _ _ init _ _ ( self, level = 1, tokenization = tokenization. none ) : self. level = level self. tokenization = tokenization self. model = graph. markovchaingraph ( )
[ 0.23817722499370575, -0.11453322321176529, 0.39910373091697693, 0.6630441546440125, -0.5123656988143921, -0.5949583649635315, -0.2615777850151062, 0.7006164193153381, -0.9512207508087158, -0.21142669022083282, -0.5969194769859314, -0.01426377147436142, -0.10091166943311691, 0.5130780935287...
def _ is _ routine ( self, obj ) : maybe _ routine = obj try : maybe _ routine = inspect. unwrap ( maybe _ routine ) except valueerror : pass return inspect. isroutine ( maybe _ routine )
[ -0.6169501543045044, 0.10350532829761505, 0.3939884305000305, 0.03869350254535675, 0.27174103260040283, -0.7593014240264893, 0.2974678575992584, -0.8524409532546997, 1.2331128120422363, -0.025120176374912262, -0.3632020354270935, 0.563951849937439, -0.5801676511764526, 0.6220967769622803, ...
async def leave _ chat ( self, chat _ id ) : json _ result = await self. api _ call ( " leavechat ", chat _ id = chat _ id ) return json _ result [ " result " ]
[ -0.7238012552261353, -0.004530452191829681, 0.44224920868873596, -0.2504917085170746, -0.12599019706249237, -0.26663070917129517, -0.9351531267166138, -1.0820512771606445, -0.15640310943126678, 0.20245574414730072, -0.7474348545074463, -0.18744570016860962, -1.373728632926941, 0.8846198916...
def get _ id ( _, name, * ids ) : return row _ ids. get _ id ( name, * ids )
[ -0.2910816967487335, 0.14667105674743652, 0.1789248138666153, 0.44095274806022644, 0.19972391426563263, -0.9492784142494202, -0.9295325875282288, -0.3147027790546417, 0.12041289359331131, 0.7493747472763062, -0.13610051572322845, 0.3618447482585907, -0.06570662558078766, -0.531347215175628...
def compute _ idfs ( documents ) : # successfully implemented word _ bank = list ( ) word _ idfs = list ( ) unique _ word _ bank = list ( ) totaldocuments = len ( documents ) for document in documents : word _ bank. extend ( documents [ document ] ) for word in word _ bank : if word in unique _ word _ bank : continue u...
[ 0.1307905912399292, -0.041968945413827896, 0.6259041428565979, -0.1993398219347, -0.2860703468322754, 0.26684680581092834, 0.8110427260398865, 0.4771036207675934, 0.1387939453125, 1.029644250869751, -0.29779595136642456, -0.4007122218608856, -1.1304001808166504, 1.0232806205749512, -0.39...
def contribute _ to _ class ( self, process, fields, name ) : self. name = name self. process = process fields [ name ] = self
[ -0.4576494097709656, -1.1671615839004517, 0.484022855758667, -1.1981264352798462, 0.40965592861175537, 0.5621671676635742, -0.12842120230197906, 0.1805567890405655, 0.03192523866891861, 0.013446380384266376, -1.6707706451416016, -0.051811639219522476, 0.16013070940971375, 0.796700954437255...
def run ( model, quantized ) : the _ vocab = checkpoint. load _ vocab ( ) if quantized : ckpt = checkpoint. quantizedcheckpoint params = weights. quantizedweights if model = ='8b': cs = checkpoint. checkpointspec. palm _ 8b _ quantized elif model = ='62b': cs = checkpoint. checkpointspec. palm _ 62b _ quantized elif mo...
[ 0.320307195186615, 0.3485257625579834, 0.8125602006912231, 0.12007404118776321, -0.010347316041588783, -0.04439244046807289, 0.5192969441413879, -0.1769505888223648, -0.054617803543806076, 0.13084842264652252, -0.36822789907455444, -0.10697328299283981, 0.19172297418117523, 0.1315547674894...
async def _ run _ trigger _ observation _ queue _ task ( self ) - > none : dynamic _ sidecar _ settings : dynamicsidecarsettings = ( self. app. state. settings. dynamic _ services. dynamic _ sidecar ) dynamic _ scheduler : dynamicservicesschedulersettings = ( self. app. state. settings. dynamic _ services. dynamic _ sc...
[ -1.038881778717041, 0.30557480454444885, 0.755765438079834, 0.07886089384555817, 0.17554226517677307, -0.5199663043022156, 0.6690715551376343, -0.26529815793037415, -0.5036603212356567, -0.05157513543963432, -0.10332491993904114, 0.3811112940311432, 0.4160117208957672, 0.2625342309474945, ...
def device _ resizable ( self, device _ name ) : blivet _ device = self. storage. devicetree. getdevicebyname ( device _ name ) if blivet _ device. resizable : return ( true, blivet _ device. minsize, blivet _ device. maxsize, blivet _ device. size ) else : return ( false, blivet _ device. size, blivet _ device. size, ...
[ -0.41208720207214355, 0.44474348425865173, 0.9046038389205933, 0.3712688088417053, -0.10525748878717422, -0.17800571024417877, -0.3410855829715729, -0.039125531911849976, 0.019310180097818375, 0.38090285658836365, -1.4487556219100952, -0.4099700450897217, -0.906721830368042, 0.013843523338...
def _ save _ displays ( self, build _ dir ='' ) : # iterate through displays for lay, display in self. subdisplays : # set window as main designer layout self. app. window. setlayout ( lay, resize = true ) # create filename fname = os. path. join ( build _ dir, self. group. alias + display. name ) # write to disk with ...
[ 0.48969051241874695, -0.5285159945487976, 0.5260392427444458, 0.5569630861282349, 0.026295224204659462, 1.325313925743103, 1.7677632570266724, -0.12520039081573486, -0.11823955178260803, -0.5536937713623047, -0.22489526867866516, -0.22793126106262207, 0.3478526771068573, 0.7147649526596069...
def evaluate ( self, n _ trajectories, print _ reward = false ) : self. policy. eval ( ) self. v. eval ( ) cumulative _ reward = 0 trajectory = 0 traj _ rewards = [ ] traj _ reward = 0 step = 0 state = self. env. reset ( ) actions = [ ] states = [ ] print ('evaluating the deterministic policy...') while len ( traj _ re...
[ -0.2139248102903366, 0.3514968752861023, 0.6116208434104919, -0.391936719417572, 0.11892534047365189, 0.4992618262767792, -0.33206894993782043, -0.011134935542941093, 0.44899341464042664, 0.6235536336898804, 0.15056994557380676, -0.05472603440284729, -0.23810069262981415, 0.808722972869873...
def plot _ data _ lines ( lidar, results = none, offset = none, cells = none, intensity = none ) : fig = plt. figure ( ) plt. set _ cmap ('rainbow') plt. title ( " final product " ) ax = fig. add _ subplot ( 111, projection ='3d') #, axisbg ='black') # colors = ( lidar [ ele ] / lidar [ ele ]. max ( ) ) * 255 colors = ...
[ 0.23200848698616028, 0.3305579423904419, 1.0056092739105225, 0.2137422412633896, -0.0924835056066513, 0.7916739583015442, 0.30828413367271423, 0.09758699685335159, 0.05201514810323715, -0.504452645778656, 0.6263344883918762, 0.32870519161224365, 0.2337823361158371, -0.6830693483352661, 0...
def _ check _ product _ qty ( self, cr, uid, ids, context = none ) : for order in self. browse ( cr, uid, ids, context = context ) : valid = self. validate _ product _ pack ( cr, uid, order. bom _ id. id, order. product _ qty, context ) return valid
[ -1.060952067375183, -1.114080786705017, 0.4698742926120758, 1.0905368328094482, 0.28706443309783936, -0.7625748515129089, 0.22147534787654877, -1.4899383783340454, 0.8390883207321167, 0.21188613772392273, -0.40803244709968567, 0.08490072935819626, -0.06824885308742523, 0.034712210297584534...
def load _ pickle _ dataset ( data _ path ) : with open ( data _ path,'rb') as f : data = pickle. load ( f ) return data
[ -0.09739208221435547, -0.2164968103170395, 0.04230168089270592, -1.4934916496276855, -0.38711845874786377, 0.3145609200000763, -0.8097519278526306, 0.21154960989952087, -0.09729523211717606, -0.1454034447669983, -0.015218975022435188, 0.01148491632193327, -0.2548082172870636, -1.7105157375...
def test ( self ) : if " + mpi " not in self. spec : print ( " skipping : hypre must be installed with + mpi to run tests " ) return # build copied and cached test examples self. run _ test ( " make ", [ " hypre _ dir = { 0 } ". format ( self. prefix ), " bigint " ], purpose = " test : building selected examples ", wor...
[ 0.22291961312294006, 0.4765671491622925, 0.5615395307540894, 0.6561224460601807, 0.6776452660560608, 0.5271823406219482, 1.5000687837600708, 0.3739062547683716, 0.31016072630882263, -0.28687745332717896, -0.49667197465896606, 0.8922337889671326, -0.6678475737571716, 0.13465246558189392, ...
def check _ input ( ) : global prg, scr, bsh if not prg : print ( " " " compulsory keywords prg not found in input file " " " ) show _ usage ( ) if not job : print ( " " " compulsory keywords job not found in input file " " " ) show _ usage ( ) if not scr : scr = scr scr ='{ } / { } '. format ( scr, job ) if not bsh : ...
[ 0.7071591019630432, -0.11917909979820251, 0.628406822681427, 0.1537754386663437, 0.04151972755789757, 1.118388295173645, -0.352021723985672, 0.04817773029208183, -0.5479840636253357, 0.2748372554779053, 1.0190908908843994, 1.3050590753555298, -0.8307064175605774, 1.3917748928070068, 0.36...
def _ exec _ remote _ cmd ( self ) : " " " not to be used by the external system " " " try : with hide ('warnings'), settings ( warn _ only = true, parallel = self. parallel, capture = true ) : if env. hosts [ 0 ] = = hostname and env. user = = getpass. getuser ( ) and len ( env. hosts ) = = 1 : result = local ( self. ...
[ -0.5122781991958618, -0.24677683413028717, 0.8209728598594666, 1.139801263809204, 0.03340167552232742, 0.7879140377044678, 0.006293185520917177, -0.01647121272981167, -0.5801522135734558, 0.024580540135502815, -0.16257528960704803, 0.565282940864563, -0.3828248977661133, 0.8549047708511353...
def pls1 ( x, y, l ) : [ n, p ] = x. shape list _ w _ k = [ ] list _ p _ k = [ ] list _ q _ k = [ ] x _ k = x. copy ( ) v _ k = np. dot ( x _ k. transpose ( ), y ) w _ k = v _ k / np. linalg. norm ( v _ k ) for k in range ( l ) : # compute the projections and loadings tau _ k = np. dot ( x _ k, w _ k ) t _ k = tau _ k ...
[ 0.480749249458313, 0.1936984807252884, 0.9663323163986206, -0.6326207518577576, -0.4434151351451874, 0.3307863771915436, -0.48375168442726135, 0.3062492609024048, 0.09129026532173157, 0.9488615393638611, -0.053664430975914, -0.013571384362876415, -0.2580571174621582, 0.3568110466003418, ...
def load _ global _ covid _ data ( ) : # login to arcgis arcconnection = basehook. get _ connection ( " arcgis " ) arcuser = arcconnection. login arcpassword = arcconnection. password gis = gis ( " http : / / lahub. maps. arcgis. com ", username = arcuser, password = arcpassword ) historical _ df = load _ jhu _ global ...
[ 0.17062769830226898, -0.2748287320137024, 0.7998270988464355, -0.03110283426940441, 0.48987436294555664, 0.1064329743385315, 0.00560667272657156, 0.009311775676906109, -0.22347582876682281, -0.16595441102981567, 0.19415555894374847, 1.1344465017318726, 0.6210523247718811, 0.061293289065361...
def nextpow2 ( value ) : exponent = 0 avalue = np. abs ( value ) while avalue > np. power ( 2, exponent ) : exponent + = 1 return exponent
[ -0.5624240636825562, -0.2676219940185547, 0.8561857342720032, 0.20495568215847015, -1.4801045656204224, 0.1339064985513687, -0.13036420941352844, 0.29863879084587097, -0.2833968997001648, -0.7848595380783081, -0.12091244012117386, 0.06276440620422363, 0.46257704496383667, 0.774521350860595...
def _ _ remove _ ax _ ticks ( ax ) : plt. setp ( ax. get _ xticklabels ( ), visible = false ) plt. setp ( ax. get _ yticklabels ( ), visible = false ) ax. tick _ params ( axis ='both ', which ='both ', length = 0 )
[ 0.2038688361644745, -0.22316302359104156, 0.8120701313018799, -0.8391729593276978, -0.9884986877441406, 1.1500598192214966, 1.2356942892074585, 0.3635708689689636, -0.21004676818847656, 0.551105797290802, -0.05461026355624199, 0.4914183020591736, 0.4909307062625885, -0.38999664783477783, ...
def list _ operations ( self, * * kwargs : any ) - > iterable [ " _ models. operation " ] : api _ version = self. _ get _ api _ version ('list _ operations') if api _ version = ='2020 - 12 - 01 - preview': from. v2020 _ 12 _ 01 _ preview. operations import edgeordermanagementclientoperationsmixin as operationclass elif...
[ -1.6489185094833374, 0.05751994252204895, 0.9588462114334106, -0.27623113989830017, -0.13055986166000366, -0.7107844948768616, -0.2827490568161011, -0.29429495334625244, 1.1545207500457764, 0.42829257249832153, -0.7109174132347107, -0.32614269852638245, 0.008379657752811909, 0.100399702787...
def task _ record ( recorder ) : files = list ( recorder. run ( ) ) print ('-'* 50 ) return files
[ -0.05793230980634689, 0.18977166712284088, 0.4517538547515869, 1.115635871887207, -0.22524234652519226, -0.05177073925733566, 0.6218318939208984, 0.06334059685468674, -0.7389602065086365, 0.693389356136322, -0.9425626397132874, 0.2325104922056198, 0.35898226499557495, 1.1043598651885986, ...
def get _ airflow _ git _ version ( ) : git _ version = none try : git _ version = str ( pkgutil. get _ data ( " airflow ", " git _ version " ), encoding = " utf - 8 " ) except exception as e : log. debug ( e ) return git _ version
[ 0.69381183385849, -0.6071922779083252, 0.07761947810649872, -0.31482529640197754, 0.29436028003692627, 0.7207821011543274, -0.701280951499939, -0.3367636203765869, -0.8143914341926575, 0.26572197675704956, 0.599063515663147, 0.8978111147880554, -0.5401373505592346, -0.16053251922130585, ...
def payments _ fees _ charge ( ) : fee = { } mandatory _ fields = ['memberid ','amount ','name ','description ','group'] for f in mandatory _ fields : fee [ f ] ='' if f in request. form : fee [ f ] = safestr ( request. form [ f ] ) print ( fee [ f ] ) if fee [ f ] = ='' : flash ( " error : one or more mandatory fields...
[ 0.6376188397407532, 0.48534220457077026, 0.5338163375854492, -0.10992124676704407, -0.07480017095804214, -0.2678498327732086, -0.7497459053993225, -0.31146806478500366, -0.6971535086631775, -0.45073142647743225, 0.37517037987709045, -0.2227778285741806, -0.1656128466129303, 1.4033185243606...
def _ _ init _ _ ( self, credentials, target _ user ) : if not type ( credentials ) is credentials : raise daexplorerexception ( " argument'credentials'must be type credentials. " ) if not type ( target _ user ) is str : raise daexplorerexception ( " argument'target _ user'must be type str. " ) # define all class membe...
[ -0.23864364624023438, 0.5344491600990295, 0.7164307236671448, 0.47945520281791687, -0.5748679041862488, -0.5194526314735413, -0.7916584610939026, -0.18008334934711456, 0.3093242049217224, -0.803405225276947, 0.8766807913780212, 0.8146594166755676, 0.9003705382347107, 0.1138499453663826, ...
def inv _ observe ( r, y ) : p _ local, j _ y = inv _ scan ( y ) p, j _ r, j _ p = transform _ global ( r, p _ local ) j _ y = j _ p. dot ( j _ y ) # chain rule return p, j _ r, j _ y,
[ -0.05335663631558418, -0.17080272734165192, 0.5285845994949341, -0.6248369216918945, 0.15231499075889587, -0.1320665329694748, 0.028746459633111954, -0.07402379810810089, -1.3959271907806396, 1.3383865356445312, -0.6748456358909607, 0.6245614886283875, -0.37475091218948364, 0.0317793935537...
def linked _ space _ id ( self ) : return self. _ linked _ space _ id
[ 1.3631954193115234, -1.227173089981079, 0.3635256290435791, 0.11927317082881927, 0.3472583293914795, 1.984597086906433, 0.6199647188186646, -0.1930515319108963, 2.032195568084717, -1.5193442106246948, 0.2939908802509308, 1.0295644998550415, -0.7729025483131409, 0.8368214964866638, -0.342...
def sync ( rpr _ context, obj : bpy. types. object, * * kwargs ) : from rprblender. engine. render _ engine import renderengine log ( " sync ", obj, obj. type ) if obj. type = ='mesh': if obj. mode = ='object': # if in edit mode use to _ mesh mesh. sync ( rpr _ context, obj, * * kwargs ) else : to _ mesh. sync ( rpr _ ...
[ -0.24318674206733704, -0.6571364998817444, 1.056303858757019, 0.4235941171646118, -0.11079315096139908, 0.690597414970398, 0.06510759890079498, -1.407677173614502, 0.34182611107826233, 0.5783581733703613, -0.9920437335968018, 0.8872582316398621, -0.33860301971435547, 0.43023669719696045, ...
def _ add _ right ( self, p, e ) : node = self. _ validate ( p ) if node. _ right is not none : raise valueerror ('right child already exists') node. _ right = self. _ node ( e, node ) self. _ size + = 1 return self. _ make _ position ( node. _ right )
[ -0.5283743739128113, 0.9235466122627258, 0.9761456251144409, -0.29053664207458496, -0.37056267261505127, 0.3479939103126526, -0.7937574982643127, -0.15944388508796692, -0.356507807970047, 0.5537413358688354, -0.10071936994791031, -0.9256715178489685, -0.6654871702194214, -0.459499746561050...
def _ _ init _ _ ( self, filename ) : f = open ( filename,'r') rows = [ ] for line in f : if len ( line. strip ( ) ) > 0 : rows. append ( list ( line. strip ( ) ) ) f. close ( ) row _ len = len ( rows [ 0 ] ) for row in rows : assert len ( row ) = = row _ len, " mismatch in row length " num _ rows = len ( rows ) box _ ...
[ -0.628161609172821, -0.5933461785316467, 0.9989575147628784, -0.8263939023017883, -0.19472895562648773, -0.31395310163497925, 0.5492427945137024, 0.2501368224620819, 0.03899635747075081, 0.2964492440223694, -0.002620214596390724, -0.7929531335830688, 0.8414104580879211, -0.1625627726316452...
def allow _ credentials ( self ) - > optional [ bool ] : return pulumi. get ( self, " allow _ credentials " )
[ 0.8897898197174072, 0.7539034485816956, 0.5588247179985046, 0.5568973422050476, -0.1472664177417755, 1.568542242050171, -0.36509647965431213, 0.04702913388609886, -0.08366505056619644, 0.2820642590522766, 0.8485539555549622, 0.8114327788352966, -0.8165951371192932, -0.8604235053062439, -...
def embed ( request, guid ) : account = request. account preferences = request. preferences msprotocol ='https'if account. get _ preference ('account. microsite. https') else'http'base _ uri = msprotocol +': / /'+ preferences ['account _ domain'] try : visualization _ revision = visualizationdbdao ( ). get ( request. u...
[ 0.6107635498046875, 0.6886230111122131, 0.7889631986618042, -0.16217660903930664, -0.575623631477356, 0.06907966732978821, 0.39744284749031067, 0.17725269496440887, 1.0623085498809814, 0.01201630663126707, 0.5549671053886414, 0.9742798209190369, -0.7011721730232239, -0.17458190023899078, ...
def priority ( self ) - > optional [ pulumi. input [ float ] ] : return pulumi. get ( self, " priority " )
[ 1.144634485244751, 0.8254284262657166, 0.3622158169746399, 0.8542981743812561, 1.482041597366333, 0.5256062150001526, -0.24137890338897705, -0.09118321537971497, 0.9042271971702576, -0.7560954093933105, 0.09894461929798126, 0.21796947717666626, -0.24925151467323303, -0.5037373304367065, ...
async def fetch _ html ( client, url : str ) : async with client. get ( url ) as resp : return await resp. text ( )
[ 0.224887877702713, 0.9442453384399414, 0.2462860643863678, 0.3508071303367615, -1.009186029434204, 0.2601322531700134, -1.327100396156311, -0.2701078951358795, -0.4801739752292633, 0.6354106664657593, 0.09343104809522629, 0.6938033103942871, -0.056056417524814606, -0.3442665934562683, -0...
def target _ slot ( self ) : pass # pragma : no cover
[ -0.2091410756111145, -0.5043909549713135, 0.3567817807197571, -0.2597233057022095, 0.32105204463005066, 0.7455235123634338, 1.2304339408874512, -0.2258741408586502, -0.5556098818778992, -0.527015209197998, 1.1808382272720337, 0.9092453122138977, 0.5934357643127441, 0.1528085172176361, -1...
def post ( self, request, slug ) : try : article = article. objects. get ( slug = slug ) except exception : response = { " message " : " the article was not found ", } return response ( response, status = status. http _ 404 _ not _ found ) user = request. user if user in article. favorited. all ( ) : # remove the user ...
[ 0.17207802832126617, 0.09246445447206497, 0.671901285648346, 0.6893525719642639, -0.5256136655807495, -0.20373648405075073, -0.12734071910381317, 0.9946555495262146, -0.2456168681383133, 0.6305800676345825, -0.153863325715065, 0.7979111671447754, -0.22069847583770752, 0.09928367286920547, ...
def add _ cli _ args ( cls, parser : argparse. argumentparser ) - > none : super ( ). add _ cli _ args ( parser = parser ) # required arguments. group = parser. add _ argument _ group ('top - k inference method arguments') group. add _ argument ('- - k ', default = 5, help ='''number of token ids to be sampled. default...
[ -0.48955386877059937, 0.8385166525840759, 0.544162392616272, -0.30210554599761963, 0.24816828966140747, -0.027318529784679413, 0.14756014943122864, -0.06826898455619812, -0.6912922859191895, 0.26762092113494873, -0.276629775762558, 0.11626750230789185, 0.26274892687797546, 1.29790425300598...
def gene _ name _ pos ( df _ in ) : if df _ in. organism = ='hcv': return h77 _ map [ df _ in. pos ] elif df _ in. organism = ='hiv': return consensus _ b _ map [ df _ in. pos ]
[ -0.7898384928703308, -0.3520599901676178, 0.7272887825965881, -0.03608931973576546, -0.03679712489247322, 0.06911662220954895, -0.8697438836097717, 0.2653723359107971, -1.2967499494552612, 0.5163981914520264, 0.22921006381511688, -0.13482755422592163, 0.48793861269950867, -0.59183907508850...
def populate _ wcs ( self, gwcs _ file = none ) : self. wcs = { } if gwcs _ file : import asdf self. tree = asdf. open ( gwcs _ file ). tree for band, exps in self. headers. items ( ) : self. wcs [ band ] = { } for expid, hdr in exps. items ( ) : if gwcs _ file : w = self. tree [ band ] [ expid ] else : w = wcs ( hdr )...
[ -0.04570524021983147, -0.058042995631694794, 0.35984188318252563, -1.188739538192749, -0.018129199743270874, 0.5816097259521484, 0.06989477574825287, -0.5913788080215454, -0.25511714816093445, 0.12229160964488983, 0.5759626030921936, 0.27149510383605957, -0.19624702632427216, 0.86996316909...
def test _ calculates _ correct _ values ( self ) : pol = backoffpolicy ( 1. 0, 60. 0, 1. 5, jitter = lambda : 1 ) self. assertalmostequal ( pol ( 0 ), 2 ) self. assertalmostequal ( pol ( 1 ), 2. 5 ) self. assertalmostequal ( pol ( 10 ), 58. 6650390625 ) self. assertequal ( pol ( 20 ), 61 ) self. assertequal ( pol ( 10...
[ 0.6966477632522583, 0.005369494203478098, 0.6336573958396912, -0.5517523884773254, 0.8363843560218811, 0.986871063709259, 0.24333232641220093, 0.2853143811225891, -0.06616147607564926, -0.0720178410410881, -0.811767578125, -0.8349628448486328, -0.19362489879131317, 0.06718720495700836, 0...
def _ train ( self ) : self. model. train ( ) runningloss = 0 for batch in self. trainloader : self. optim. zero _ grad ( ) loss = self. calc _ loss ( batch. to ( self. device ) ) / self. batch _ size loss. backward ( ) runningloss + = loss. detach ( ). item ( ) self. optim. step ( ) self. sched. step ( ) return runnin...
[ -0.920636773109436, 0.4741927683353424, 0.5372829437255859, -0.3716810345649719, -0.1971341073513031, -0.09991057217121124, 0.30818724632263184, 0.4925059676170349, -1.0038210153579712, -0.522031843662262, -0.7492488622665405, -0.3820323348045349, -0.27664169669151306, 0.3129684031009674, ...
def claim ( self, schema : optional [ type [ basemodel ] ] = none ) - > " scopedauth " : clone = self. _ clone ( ) clone. user _ info = schema return clone
[ 0.21050262451171875, -0.0013387183425948024, 0.3262978494167328, 0.6672664880752563, -0.762490451335907, 0.6378813982009888, -0.3979725241661072, 0.23084117472171783, 1.937950849533081, -0.512031614780426, -0.09100174903869629, 1.232049584388733, -0.08804471790790558, -0.5916343927383423, ...
def transit _ gateway _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " transit _ gateway _ id " )
[ 0.9909543395042419, 0.3126679062843323, 0.3157610595226288, -0.09153541177511215, -0.039577748626470566, 0.7024595141410828, 0.07423154264688492, 0.36513736844062805, 0.14429739117622375, 1.1445319652557373, 0.01273426041007042, 0.6965162754058838, -0.6234350204467773, 0.38580960035324097,...
def bloom _ filter _ set ( ) : with open ('proper. txt ','r') as f : for line in f : yield line. strip ( )
[ 0.6491069793701172, -0.574436366558075, 0.6223478317260742, -0.09471376985311508, -0.6146000623703003, 0.6556930541992188, 0.2512887120246887, 0.1413801610469818, -0.8956358432769775, 0.34375622868537903, -0.47266387939453125, 0.9575105905532837, 0.4071449041366577, -0.48160773515701294, ...
def swap ( self, i, j ) : self. _ _ array [ i ], self. _ _ array [ j ] = self. _ _ array [ j ], self. _ _ array [ i ]
[ -1.260827660560608, -0.8457033038139343, 0.26434218883514404, -0.572932243347168, 0.25662583112716675, 0.5752362608909607, 0.057956546545028687, 0.023190481588244438, -0.6122323274612427, 0.2234569936990738, -0.7031369805335999, 1.420691967010498, -0.501955509185791, -0.42614758014678955, ...
def compute _ partition ( self ) : w, v = eigh ( self. l, self. deg ) idx = np. argpartition ( w, 2 ) [ 1 ] self. partition = ( v [ :, idx ] < 0 )
[ -0.10301338136196136, 0.12634828686714172, 0.22237949073314667, -0.6260259747505188, -0.07350675016641617, -0.23823018372058868, 0.04981084540486336, 0.9756412506103516, 0.11248989403247833, 0.28782325983047485, 0.3185313045978546, -0.12845398485660553, -0.7297335863113403, 0.2403566837310...
def model _ id ( self ) : return self. _ model _ id
[ 0.6845377683639526, -0.7413836121559143, 0.029363876208662987, 0.5876379609107971, 1.988204836845398, 1.7588471174240112, 0.5748043060302734, 0.7332602143287659, 1.0381592512130737, 0.11289193481206894, -0.30407243967056274, 0.409615695476532, 0.2598058879375458, 0.140969380736351, 0.159...
def _ register _ map ( self, m, p, x ) : v = self. map _ config [ " size " ] s = self. map _ config [ " scale " ] m = m. shape [ 2 ] vby2 = ( v - 1 ) / / 2 if v % 2 = = 1 else v / / 2 mby2 = ( m - 1 ) / / 2 if m % 2 = = 1 else m / / 2 # the agent stands at the bottom - center of the egomap and looks upward left _ h _ p...
[ -0.43614426255226135, -0.11595937609672546, 0.7215799689292908, -0.7931813597679138, 0.07757850736379623, 0.2606663405895233, -0.31648725271224976, 0.6573071479797363, 0.27311837673187256, 0.7202552556991577, -0.3978891372680664, 0.30572956800460815, -0.2986010015010834, 0.1467883139848709...
def get _ height ( self ) : cmd = { " method " : " getheight " } r = utils. curl ( cmd ) self. height = r [ " height " ]
[ 0.0663742870092392, 0.6245681047439575, 0.45557036995887756, 1.3353323936462402, 0.28578221797943115, 0.4116804897785187, 0.1498071849346161, 0.2055450677871704, -0.8441952466964722, -0.1772800236940384, -1.0260511636734009, 0.9902535676956177, -0.6757470965385437, -0.6206114888191223, 1...
def test ( verbosity = 1 ) : print _ versions ( ) # for some reason, numpy issues all kinds of warnings when using python3. # ignoring them in tests should be ok, as all results are checked out. # see https : / / github. com / pydata / numexpr / issues / 183 for details. np. seterr ( divide ='ignore ', invalid ='ignore...
[ 0.5809563398361206, 0.1719493865966797, 0.6107981204986572, 0.08797373622655869, 0.3936409652233124, 0.6206343173980713, -0.014601628296077251, 0.15738160908222198, 0.45828717947006226, 0.15312941372394562, -0.08379504829645157, 0.15283672511577606, -0.3892573416233063, -0.796095609664917,...
def _ random _ error _ generator ( n = 75 ) : r = false if random. randint ( 1, 100 ) < int ( n ) : sleep ( 1 ) r = true return r
[ -1.3470978736877441, 0.996958315372467, 0.49072960019111633, -0.45916739106178284, -1.0187557935714722, 0.9312795400619507, -0.3651221990585327, -0.8069348931312561, 0.02710595913231373, -0.5933671593666077, -0.018157249316573143, -0.31653764843940735, -0.15238578617572784, -0.064317524433...
def _ _ init _ _ ( self, songname = " ", artistname = " ", albumname = " " ) : self. songname = songname self. artistname = artistname self. albumname = albumname
[ 0.7083094120025635, -1.143877387046814, 0.7056131958961487, 0.3636871576309204, 0.08661896735429764, 0.8374366164207458, -0.6128261089324951, 0.562508225440979, -0.8980545997619629, -0.23563364148139954, -0.9862370491027832, 0.1357842981815338, -0.6972358226776123, -0.017582431435585022, ...
def subtract ( vec _ 1, vec _ 2 ) : # subtract two vectors vec _ 3 = [ float ( vec _ 2 [ 0 ] ) - float ( vec _ 1 [ 0 ] ), float ( vec _ 2 [ 1 ] ) - float ( vec _ 1 [ 1 ] ), float ( vec _ 2 [ 2 ] ) - float ( vec _ 1 [ 2 ] ) ] return vec _ 3
[ 0.2443712055683136, -0.8354792594909668, 0.7774413824081421, -0.3108745813369751, 0.6535180807113647, 1.1745977401733398, -0.2880745232105255, 0.32417404651641846, -0.8609227538108826, 0.46516063809394836, -1.1164964437484741, 0.6540526747703552, -0.32196125388145447, -0.5827933549880981, ...
def test _ get _ _ with _ no _ followed _ subjects ( self ) - > none : self. client. force _ login ( self. user ) response = self. client. get ( self. path ) assert httpstatus. ok = = response. status _ code self. asserttemplateused ('buza / my _ subjects _ list. html') self. assertcontains ( response,'followed subject...
[ 0.2751675844192505, 0.2216678261756897, 0.44703054428100586, -0.25098296999931335, -0.14624999463558197, 1.1463669538497925, 0.13452956080436707, -1.1209551095962524, 0.00014168303459882736, -1.4557045698165894, -0.18137821555137634, 0.7209643125534058, -0.4865031838417053, 0.2026262581348...
def testgetthermodatagaussian ( self ) : outputdirectory = os. path. join ( self. mop1. settings. filestore, '.. ', '..') self. gauss1. setdefaultoutputdirectory ( outputdirectory ) self. gauss2. setdefaultoutputdirectory ( outputdirectory ) mol = molecule ( ). fromsmiles ('c1 = cc = c2c = cc = cc2 = c1') try : filelis...
[ 0.38355565071105957, -0.5726686120033264, 0.6775414943695068, 0.011615889146924019, 0.4123418927192688, 0.6835912466049194, 0.28383150696754456, -0.055262137204408646, -0.3574542701244354, -0.495903879404068, -0.5928724408149719, 0.26702025532722473, 0.07544945180416107, 0.0851769670844078...
def solution ( n, a ) : # initialise variables to keep track of the counters counters = [ 0 ] * n counter _ x, max _ counter = 0, 0 for val in a : # increase ( x ) if 1 < = val < = n : # increase counter x by 1 counters [ val - 1 ] = max ( counters [ val - 1 ], counter _ x ) + 1 # update max counter max _ counter = max...
[ 0.21150900423526764, 0.27179622650146484, 0.45779868960380554, 0.8503386974334717, 0.3019488751888275, -0.6878080368041992, -0.1407635658979416, -0.17657849192619324, 0.779060423374176, 0.142769917845726, -0.4270758032798767, -0.3861199915409088, 0.6543796062469482, 0.8440166115760803, 0...
def getldvweights ( ) : # maximum weight which should be applied. # max _ weight = 200. 0 # list of weights. # wt _ list = [ ] for val in range ( 0, max _ dist ) : weight = math. pow ( 2, val ) if weight > max _ weight : weight = max _ weight wt _ list. append ( int ( weight ) ) return wt _ list
[ -0.45975151658058167, -0.11580551415681839, 0.62263423204422, -0.11957761645317078, 0.08574386686086655, -0.13195116817951202, -0.9029625654220581, 0.5131728053092957, -0.17677029967308044, 0.028306039050221443, -0.8631808757781982, 0.5353537201881409, 0.35000577569007874, 1.17760920524597...
async def take ( self, ctx, user : discord. member, amount ) : if amount! = int ( float ( amount ) ) : return await ctx. send ( " uh oh, amount has to be an integer. " ) if amount < = 0 : return await ctx. send ( " uh oh, amount has to be more than 0. " ) user _ points = int ( await self. config. member ( user ). chars...
[ 0.9776058197021484, 0.21528340876102448, 0.5839529633522034, 0.3344714045524597, -0.938679575920105, 1.0226435661315918, 0.19795337319374084, -0.00042429432505741715, 0.3819200396537781, 0.24822591245174408, -0.5533308386802673, 0.7693601250648499, -0.8223768472671509, -0.3648889660835266,...
def get _ file _ list ( wildcard ) : files = glob. glob ( os. path. expanduser ( wildcard ) ) return files
[ -0.6048642992973328, 0.05470874160528183, 0.6061030626296997, 0.5303788185119629, -0.1939435452222824, 0.4539632797241211, -0.07060860842466354, 0.8578962087631226, -0.2790250778198242, 0.08264707028865814, -0.2827862501144409, 0.41864338517189026, -0.2483433037996292, 0.16101761162281036,...
def get _ soup ( url, headers = none, verbose = true ) : result = requests. get ( url, headers = headers ) if result. status _ code! = 200 : if verbose : print ( " failed to connect to { } with error code : { } ". format ( url, result. status _ code ) ) return none else : soup = bs ( result. content,'html5lib') return ...
[ 0.03339800983667374, 0.3400684595108032, 0.5145766735076904, 0.5788166522979736, -0.5018264651298523, -0.8582600355148315, -0.6269609332084656, -0.9220202565193176, 0.26478877663612366, -0.007718924432992935, 0.1912582665681839, 0.27493050694465637, 0.17289942502975464, -1.0310145616531372...
def _ _ contains _ _ ( self, data ) : return self. _ search ( data ) is not none
[ -0.028759583830833435, -0.06776711344718933, 0.3982873260974884, -0.24479998648166656, -0.2978239059448242, 0.14324407279491425, -0.9830232858657837, -0.24725404381752014, 0.0759846419095993, -1.075844645500183, -0.3589116930961609, -0.17808771133422852, -0.6185018420219421, -0.24038793146...
def get _ selected _ items ( self ) : selection _ model = self. view. selectionmodel ( ) items = [ row. data ( noderole ) for row in selection _ model. selectedrows ( 0 ) ] return items
[ -0.9551805853843689, -0.22542554140090942, 0.21631395816802979, 0.2157057225704193, 0.34546607732772827, -0.4439162313938141, -0.37739455699920654, -0.6762484908103943, -0.03915562853217125, 0.2498704493045807, -0.5834689736366272, 0.49765628576278687, 0.8727722764015198, 0.178455427289009...
def get _ xmlstring ( element ) : return etree. tostring ( element, pretty _ print = true ). decode ( )
[ -0.2812051773071289, 0.4002605080604553, 0.2493649423122406, -0.5421304106712341, -0.9034428596496582, -0.1270752251148224, -1.4286408424377441, -0.7882235050201416, 0.7137600183486938, -0.1779269278049469, 0.5848410725593567, -0.03997138887643814, 0.3861248791217804, -0.9447498917579651, ...
def show _ similar ( self, id _ show ) : params = urllib. urlencode ( {'id': id _ show } ) url = self. build. url ( " / shows / similars ", params ) # print url return self. build. data ( url )
[ -0.8966947197914124, 0.5301734209060669, 0.20053397119045258, -0.14763513207435608, -1.0420875549316406, 0.07308394461870193, -0.4102833569049835, -0.1754734218120575, 0.946611762046814, -0.03889496996998787, -0.8110818862915039, 1.3740086555480957, -1.202570915222168, -0.08063247054815292...
def get _ service _ permissions _ view ( request ) : service = ar. get _ service _ matchdict _ checked ( request ) svc _ content = sf. format _ service ( service, show _ private _ url = true ) svc _ perms = ax. evaluate _ call ( lambda : [ p. value for p in service _ type _ dict [ service. type ]. permissions ], fallba...
[ -0.812508761882782, 0.08388908207416534, 0.5521977543830872, -0.48006731271743774, -0.7891777753829956, -0.4856809377670288, -0.20188120007514954, -0.21259169280529022, -0.04883629083633423, 0.03819987177848816, 1.5084465742111206, 0.7967587113380432, -0.1581486463546753, 0.031924944370985...
def _ _ bool _ _ ( self ) : raise cpoexception ( " cpo expression can not be used as boolean. " )
[ 0.9494510889053345, -0.1585475504398346, 0.5009162425994873, 1.282731056213379, -0.53728848695755, 0.5073449611663818, 0.646562933921814, 1.4968665838241577, -0.7937106490135193, 0.5695946216583252, -0.6838678121566772, -0.18758420646190643, -0.3616357743740082, -0.7299179434776306, -0.2...
def upgrade ( self, upgrade, ship, player ) : if upgrade = = " repair " : ship. health = ship. max _ health elif upgrade = = " speed " and self. shop _ progress [ 1 ] < 3 : ship. speed _ factor + = 3 self. shop _ progress [ 1 ] + = 1 elif upgrade = = " health " and self. shop _ progress [ 2 ] < 3 : ship. max _ health +...
[ -1.4373971223831177, -0.44132161140441895, 0.9215615391731262, 0.05656043067574501, -0.07115630060434341, -0.5319359302520752, -0.05646717920899391, -0.3645559549331665, 0.8315390348434448, 0.5085196495056152, -0.7374043464660645, 0.05379028990864754, 0.17488627135753632, -0.32960286736488...
def move ( self, key, index ) : try : cur = self. _ keys. index ( key ) except valueerror : raise keyerror ( key ) self. _ keys. insert ( index, key ) # this may have shifted the position of cur, if it is after index if cur > = index : cur = cur + 1 del self. _ keys [ cur ]
[ -0.3335362672805786, 0.3669753968715668, 0.4411078989505768, -0.18583239614963531, 0.12636415660381317, 0.27682533860206604, 0.06288508325815201, -0.29771289229393005, -0.2590058743953705, 0.636654794216156, -0.08407649397850037, 0.23909032344818115, -0.9156854152679443, -0.709045708179473...
def _ on _ click _ add ( self ) : options = self. view. selected _ options # weed out options already in session options = [ i for i in options if i not in self. _ session _ targets ] for item in options : if item = ='distance'or item = ='width': prompt = promptdimlabels ( item, self. _ session _ labels ) if prompt. ex...
[ -0.9154072999954224, -0.44348254799842834, 0.506630003452301, -0.0313735157251358, 0.7331341505050659, -0.15196625888347626, -0.2722969651222229, -0.9362850189208984, 1.3547775745391846, 0.43476057052612305, 0.4417821168899536, -0.18997086584568024, 0.2651016116142273, -0.4797835052013397,...
def _ dummy _ get _ item ( self, text, depth = 2 ) : from random import randint idx = randint ( 10000, 20000 ) completed = ( 0 < randint ( 1, 10 ) < 6 ) if depth > 0 : children = tuple ( [ self. _ dummy _ get _ item ( " % s : % s " % ( text, d ), depth - 1 ) for d in range ( 2 ) ] ) else : children = [ ] return ( text,...
[ -1.269941806793213, 0.39316949248313904, 0.5610120892524719, -0.2462107092142105, -0.4793510138988495, -0.4311129152774811, 0.1078982949256897, -0.6448773145675659, -0.2232985645532608, -0.008661558851599693, -0.9083994030952454, -0.12194724380970001, -0.5392223000526428, -0.22290454804897...
def _ wgs84 _ utm ( self, lat, lon, longorigin = none ) : if self. longorigin : longorigin = self. longorigin return latlongutmconversion. lltoutm ( 23, # wgs84 lat, lon, longorigin )
[ -0.25557786226272583, -0.453955739736557, 0.3756631016731262, -1.0488500595092773, -0.28075966238975525, -0.002635576296597719, -1.0807088613510132, 0.9752005934715271, -0.1857476383447647, -0.626865565776825, 0.303891658782959, -0.19224722683429718, 0.4806602895259857, -0.8661856055259705...
def create _ member ( self, certificate _ string, certificate _ type ) : return self. _ create _ member ( dict ( certificatestring = certificate _ string, certificatetype = cert _ cons. certificatetype ( certificate _ type ). value, ) )
[ 0.6754541397094727, -0.6522396802902222, 0.36834219098091125, 0.4797866940498352, -0.44220027327537537, 0.3502240478992462, -1.3119392395019531, -0.03884902223944664, -0.27134400606155396, -0.12201561778783798, -0.34397152066230774, 0.33133363723754883, -1.2225492000579834, -0.718773365020...
def make _ object ( self, repstr ) : return eval ('df.'+ repstr )
[ -0.865929901599884, -0.5359178781509399, 0.41095271706581116, -0.8509752750396729, -0.9261674880981445, -0.3366224467754364, 0.5437704920768738, 0.18434569239616394, -0.49442628026008606, -0.8702107071876526, 0.09316623210906982, 0.21228593587875366, 0.3333072066307068, -2.29189133644104, ...
def get _ lower _ to _ upper _ dict ( ) : key = ['a ','b ','c ','d ','e ','f ','g ','h ','i ','j ','k ','l ','m ','n ','o ','p ','q ','r ','s ','t ','u ','v ','w ','x ','y ','z'] value = ['a ','b ','c ','d ','e ','f ','g ','h ','i ','j ','k ','l ','m ','n ','o ','p ','q ','r ','s ','t ','u ','v ','w ','x ','y ','z'] re...
[ -0.9736688733100891, -0.8992154002189636, 0.9675259590148926, -1.3390164375305176, -1.4347143173217773, 0.26056748628616333, 0.12963080406188965, 0.18601548671722412, -0.4514751136302948, 0.8276914358139038, -1.3505361080169678, 0.26693448424339294, 0.47886762022972107, 0.06430438160896301...
def duplicate _ example ( number _ of _ duplicates : int, example : example ) : examples = [ ] label : str = example. get _ label ( ) image = example. get _ image ( ) for i in range ( 0, number _ of _ duplicates ) : examples. append ( ( label, image ) ) return examples
[ -1.2121235132217407, 0.03385770693421364, 0.3067401349544525, -0.1951829493045807, -0.12327761203050613, -0.04713057726621628, -0.068186454474926, 0.07382246851921082, 0.7509399056434631, 1.0138980150222778, -1.2471798658370972, 0.2633598744869232, 0.825120210647583, 0.797835111618042, 0...
def call ( self, inputs, y _ true, y _ pred, training = none ) : raise notimplementederror
[ -0.29710808396339417, 0.069218210875988, 0.4916799068450928, 0.7289963960647583, -0.12175577133893967, 1.0598808526992798, -0.785783052444458, 0.3096255660057068, -0.5683490037918091, -0.20754341781139374, 0.31621867418289185, 0.7139006853103638, 0.33625471591949463, 0.5539584755897522, ...
def place _ orders ( self, board, actions ) : return actions
[ -0.6199396848678589, -0.06862790882587433, 0.22028326988220215, 1.0113900899887085, 0.904114305973053, -0.21627818048000336, 0.3541657626628876, 0.2414695918560028, 0.6146520376205444, 0.46530240774154663, 0.14381542801856995, -0.6518542170524597, -0.29407384991645813, -0.13174493610858917...
def testupdateorder ( self ) : if not self. _ _ class _ _. order1 : self. testcreateorders ( ) notes ='spoke to advertiser. all is well.'self. _ _ class _ _. order1 ['notes'] = notes order = self. _ _ class _ _. service. updateorder ( self. _ _ class _ _. order1 ) self. assert _ ( isinstance ( order, tuple ) ) self. as...
[ -1.183894157409668, 0.24375736713409424, 0.43096068501472473, 0.1315957009792328, 0.5093131065368652, 0.03729023411870003, -0.7995062470436096, -0.6554970741271973, 0.2907651364803314, 0.4121972322463989, -1.1154803037643433, 0.038899775594472885, -0.9654537439346313, 0.08399583399295807, ...
def plot _ controls ( self, title : str ) - > none : t = range ( len ( self. house _ temps ) ) fig, ( ax1, ax3 ) = plt. subplots ( nrows = 2, sharex ='all ', figsize = ( 15, 8 ) ) color ='black'ax1. set _ ylabel ('house temperature ', color = color ) ax1. plot ( t, self. house _ temps, color = color ) ax1. tick _ param...
[ 0.5680065751075745, 0.4323940575122833, 0.7043905258178711, -0.4476366937160492, 0.3177449107170105, 0.24277335405349731, 0.11148349195718765, -0.014979123137891293, -0.5453950762748718, -0.05264689773321152, -0.5325405597686768, -0.04266795516014099, 0.6744908690452576, 0.1160290315747261...
async def test _ entity _ id _ update _ subscriptions ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 1 # 1 channel light ( dimmer ) topics = [ get _ topic _ stat _ result ( config ), g...
[ 0.5055479407310486, 0.08505761623382568, 0.4017300307750702, 0.144750714302063, 0.5823614001274109, -0.07447701692581177, -0.15640078485012054, -0.5129724144935608, 0.43333113193511963, -0.2037375569343567, -0.3579440414905548, -0.30342552065849304, 0.7007656097412109, 0.8866668939590454, ...
def test _ detect _ peak _ sequence _ cwt _ uneven _ length _ results ( rugr _ wav _ str ) : rugr _ audio = audio. from _ file ( rugr _ wav _ str ). trim ( 1, 8 ). loop ( length = 20 ) detections = sp. detect _ peak _ sequence _ cwt ( rugr _ audio, sample _ rate = 400, window _ len = 3, center _ frequency = 50, wavelet...
[ 0.31436458230018616, -0.2751990556716919, 0.6093469858169556, 0.1859632432460785, 0.6503118872642517, 0.6432183384895325, 0.8778238296508789, -0.33239519596099854, 0.03124556690454483, -0.030793042853474617, -1.0859119892120361, 0.08781401813030243, -0.08125873655080795, 0.8392576575279236...
def up _ b _ inclusive ( ages, target ) : l, r = 0, len ( ages ) - 1 while l < = r : mid = ( l + r ) / / 2 if ages [ mid ] < = target : l = mid + 1 elif ages [ mid ] > target : r = mid - 1 return r
[ -0.9750276803970337, -0.3162715435028076, 0.7477834224700928, -0.1656467169523239, -0.7067899703979492, 0.05378943681716919, 0.6717103123664856, 0.6694003343582153, 0.6461766958236694, 1.1750459671020508, 0.3390424847602844, 0.8935251235961914, -0.4064248204231262, -0.6599069237709045, -...
def submit ( self ) : jobmanager ( ). submit ( self ) # we just submit again and again. the jobmanager takes care that duplicate submissions are ignored
[ -0.4743832051753998, -0.3357156217098236, 0.378481388092041, 0.38374894857406616, 0.05202173441648483, 0.2888142764568329, -0.2288791388273239, -0.5548490285873413, -0.4879548251628876, -1.48638916015625, -0.7552720308303833, 0.1819300353527069, -0.6521565914154053, 1.2972816228866577, -...
def boost ( cls, state : bool ) - > none : cls. is _ boosted = state
[ 0.48576024174690247, 0.8164380788803101, 0.3199943006038666, 1.3178657293319702, 0.7888384461402893, 1.008225440979004, -0.06985634565353394, 0.1280127614736557, 0.45249876379966736, -0.32609450817108154, -1.3841416835784912, 0.8271633386611938, 0.5879851579666138, 0.7376468777656555, -0...
def count ( self, shape, surface _ point, bound ) : key = shape. surface _ identifier ( surface _ point ) if not self. store. has _ key ( key ) : return 0. 0 counts = none entries = self. store [ key ] counts = 0 for entry in entries : if entry [ 2 ] = = bound : counts = counts + 1 if counts = = none : return 0 return ...
[ 0.9296237826347351, -0.5906286835670471, 0.4343068301677704, 0.30449944734573364, 0.4418289065361023, 0.8934726715087891, 0.207685187458992, -0.3528638482093811, -0.0880403220653534, -0.05724536255002022, -0.6157523989677429, 0.09263620525598526, -0.07976624369621277, 0.6080412268638611, ...
def get _ pkghash ( target ) : pkghash = { } fetch _ url ( target. url, target. tmpdir ) unpack ( target. tmpdir, target. filename ) pkglist _ file = open ( target. pkglist _ filename, " r " ) for line in pkglist _ file : words = line. split ( ) if not len ( words ) > 3 : continue pkghash [ words [ 1 ] ] = words [ 2 ] ...
[ 0.18102136254310608, 0.20942547917366028, 0.4956637918949127, -0.18566149473190308, -0.8223890066146851, 0.035127151757478714, -0.21629668772220612, 0.5295148491859436, -0.46881482005119324, 0.49673062562942505, -0.974605917930603, -0.4606129229068756, 0.1941319853067398, 0.254192858934402...