Posts

Google App Enging keep constant name per instance on auto scale service -

i have google app engine auto scale flexible service can scale 1 x instances cpu utilization threshold. every instance send metrics global graphite server. know if there's way set\get instance consistent name every new deployed instance. for moment, every instance has it's own unique id change every deployed. set x names attached 1 of app engine service. without using service manage that. does familiar google service\api purpose ? wiki

python - Specify Multi-Level columns using pd.read_clipboard? -

here's data question: main meas1 meas2 meas3 meas4 meas5 sublvl value value value value value count 7.000000 1.0 1.0 582.00 97.000000 mean 30 37.0 26.0 33.03 16.635350 i read in data in such way first column index, , first 2 rows treated multi-level columns measx first level, , value second level. how can using pd.read_clipboard ? my pd.read_clipboard series: how handle column names having spaces in them when using pd.read_clipboard? how handle custom named index when copying dataframe using pd.read_clipboard? copying multiindex dataframes pd.read_clipboard? in [17]: pd.read_clipboard(sep='\s+', index_col=[0], header=[0,1]) out[17]: main meas1 meas2 meas3 meas4 meas5 sublvl value value value value value count 7.0 1.0 1.0 582.00 97.00000 mean 30.0 37.0 26.0 33.03 16.63535 wiki

R equation for svm regression from e1071 (eps-regression, radial kernel) to reproduce prediction results manually -

i trying reproduce prediction result svm regression package e1071 in r. this post asked similar question answer not question. this post explained how reproduce prediction mannually svm classification. this post answered question i'm not sure how modify multivariate situations. method in post applies when have 1 variate/feature. needs set scale false. so example: library(e1071) library(plyr) data(iris) iris$species <- mapvalues(iris$species, c("setosa", "versicolor", "virginica"), c(0, 50, 100)) iris$species <- as.numeric(as.character(iris$species)) # convert class (species) numeric numbers regression. set.seed(1) fit <- svm(species ~., iris[,c(1,2,5)]) pred <- predict(fit, irisiris[,c(1,2)]) pred[1:4] # 1 2 3 4 #-3.874870 6.890615 -4.082644 -2.774084 how calculate predictions mannually stored in pred ? thanks! wiki

php - Cannot declare class \Content, because the name is already in use -

i've setup server yii2 , humhub ext, what i'm trying set rest api , 500 internal server error : "message": "cannot declare class humhub\modules\content\models\content, because name in use", "file": "***\content\models\content.php", the first class : <?php namespace app\models; use yii; include '../humhub/modules/content/models/content.php'; class content extends \humhub\modules\content\models\content { public function getposts() { return $this->hasmany(post::classname(), ['id' => 'object_id']); } } the second class (pretty big): <?php /** * @link https://www.humhub.org/ * @copyright copyright (c) 2017 humhub gmbh & co. kg * @license https://www.humhub.com/licences */ namespace humhub\modules\content\models; include __dir__ .'/../../../modules\content\models\contentdeprecated.php'; use yii; use humhub\modules\user\components\permissionmanager; use...

javascript - str.replace stripping ng-click in custom filter -

i'm using filter replace urls in string clickable links. .filter('parseurl', function() { var urls = /(\b(https?|ftp):\/\/[a-z0-9+&@#\/%?=~_|!:,.;-]*[-a-z0-9+&@#\/%=~_|])/gim; var emails = /(\w+@[a-za-z_]+?\.[a-za-z]{2,6})/gim; return function(text) { if(text.match(urls)) { text = text.replace(urls, "<a href=\"$1\" ng-click=\"\$event.stoppropagation()\" target=\"_blank\">$1</a>") } return text } }) i'm trying insert stoppropagation event on ng-click ng-click of parent doesn't take precedent on href, reason ng-click gets stripped everytime. ideas why? wiki

python - how to find different parts of speech for same word using nltk? -

i have created list of words given text using nltk. according english text, word can of different parts of speech example: heavens above. (adverb) the moral code of conduct above civil code of conduct. (preposition) read sentence given above. (adjective) our blessings come above. (noun) when give above input program give adverb, preposition adjective , noun want find differnet pos tagging same word. wiki

redirect - Wordpress wp-login and wp-admin in redirectloop to themself -

i have wordpress website, can't login anymore. when go wp-login page many redirects. when track redirects, see 302 redirected itself, exact same url. this have tried far: removed plug-ins changed theme database removed wp-admin , wp-includes , uploaded them fresh wp download triple checked htaccess, usual wp htaccess any idea how can in wordpress? , if not, how export content (posts, pages, media, prettylink redirects, users...) thx! wiki