I want to cluster the preparation steps on cooking recipes websites in one cluster so I can distinguish them from the rest of the website. To achieve this I extracted for each text node of the website the DOM path (e.g. body->div->div->table->tr ....) and did a One-Hot-Encoding before I executed the DBSCAN clustering algorithm. My hope was, that the DBSCAN algorithm recognizes also not only 100% identical DOM-paths as 1 common cluster, because sometimes one preparation step is e.g. in …
i recently installed wordpress manually on a linux cloud machine via DigitalOcean which I migrated from a previous hosting service. But now there is a warning up top of my Settings page that says "An automated WordPress update has failed to complete - please attempt the update again now." I have been looking for a solution but the only ones i can find is to delete the wp-content/upgrade/ folder and .maintenance file. The former I have deleted and the latter …
I have sets of data describing sets of levels of requirements needed for certain sets of tasks. The following is a tabulated example: Note that the data values are on a scale from 0 to 10. My problem here is that I have a set of employees whose skills (analysis, patience, comprehension ...) have been analyzed, like the following employee: Analysis --> 8.5 Patience --> 5 Comprehension --> 7 Communication --> 7.5 Creativity --> 8 How to match this employee …
I am trying to get a php file to input content into the wordpress database under a specific table. I have set up the table and have verified that the information is passed into the insert.php file. THe issue is that I can not include the global $wpdb and when i call for a required once on the wp_config file or the other required files it gives me this error in the php logs: [22-Aug-2015 18:07:03 Europe/Berlin] PHP Fatal error: …
I don`t know coding. I recently my website stop to work properly. I get this error on the top of on every page loaded. Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in /home/nortoniq/public_html/mywebsiteaddress.com/wp-content/themes/porto/functions.php on line 60 Anybody can help me with this error? much appreciate
I'm fairly new to machine learning and for that matter, neural networks, but for the past couple of days I decided to take a stab at a fairly classical and practical problem of neural networks/machine learning which is recommendation systems. Apologies if this is an unnecessarily broad question, but I found it hard to read up on resources answering this particular question. My main question is, how do you even model the problem (or what directions/advice is there on how …
I recently migrated my mutlisite to a new host and I run into a strange issue, that prevents me from setting custom permalinks. Currently, my multisite (and subsites) have all been switch to to the "Plain" option https://example.test/?p=123 However, whenever I switch to my desired custom permalink: https://example.com/%postname%/ I can still access each multisite/subsite homepage, but the secondary links are all broken. \But if I use: https://example.com/index.php/%postname%/ all of the links will work. I mention this because I have recently …
I am stuck on an issue here. I have this one theme which has the post type called 'listing' and I have this new theme with the post type 'iwp_property' When I use the Wordpress Exporter/Importer tool and goto import the data, I get this error 'Invalid post type listing' My question is what would be the most efficient way to export and import with mapping...I am completely open to suggestions...
I have a pandas data frame with about Million rows and 3 columns. The columns are of 3 different datatypes. NumberOfFollowers is of a numerical datatype, UserName is of a categorical data type, Embeddings is of categorical-set type. df: Index NumberOfFollowers UserName Embeddings Target Variable 0 15 name1 [0.5 0.3 0.2] 0 1 4 name2 [0.4 0.2 0.4] 1 2 8 name3 [0.5 0.5 0.0] 0 3 10 name1 [0.1 0.0 0.9] 0 ... ... .... ... .. I would …
I have a codepen that I would like to import into my WP setup. It is an expanding column layout, which includes custom CSS and JS. Link here: https://codepen.io/thedonquixotic/pen/WGYXyd Now, I have tried a few different ways, latest being that I used the plugin WP Coder: https://wordpress.org/plugins/wp-coder/ I followed instructions, whish is to upload the JS and CSS file through admin panel, and then using the plugin to include the uploaded files, as well as uploaded the html. When I …
The difference between machine leaning models and rule based model is that you feed input and output to machine learning models to get rules where you feed input and rules to rule based models to get output. Say you have a dataset with 10k records. You might use 8k of them to build a machine learning model and the rest to validate your model. On the other hand, you would probably use all the 10k records to create a rule …
I am finding an way to store single.php file in a variable in wordpress file, I want to use preg_match_all to this file. $regex = "~(<h([2-6]))(.*?>(.*)<\/h[2-6]>)~"; $singlefile= single.php preg_match_all($regex, $singlefile, $heading_results); Can anyone tell me proper way to do this?
Is it possible to specify the supports of each specific InnerBlock when using nested components?, In the following example I want to disable the color background feature added in the theme.json to the paragraph only in my custom block. // MyCustomBlock.ts const BLOCKS_TEMPLATE = [ ['core/image'], [ 'core/heading', { placeholder: __('Your title in here', 'test-blocks'), level: 6 }, ], ['core/paragraph', { placeholder: __('Your text in here', 'test-blocks'), supports: { color: { background: false } } }], ]; const INNER_BLOCKS_PROPS = …
I have a Deep Neural Network that takes $n$ inputs $X = [X_1, \ldots, X_n]^T$ and gives $n$ ouputs $Y = [Y_1, \ldots, Y_n]^T$. Normally, I can just do a standard deep neural network with a few fully connected hidden layers. However, I want to build into the network the fact that there should be permutational symmetry. That is to say, if $\pi(\cdot)$ is a particular permutation, then $\pi(X)$ should output $\pi(Y)$. So each input should be treated symmetrically in …
We have been searching high an low for a plugin, code sample or example of how to remove all external links at the theme filter level but can't seem to find anything online. We want to keep the external links in the actual post database entry but simply remove them using add_filter() inside the theme's functions.php file so we can add them again when we need to. We would also need to filter out links for the domain the site …
Situation: My dataset is 70k images of people wearing clothes. Images are labelled: bbox position and class. There are 10 classes. I did 80:20 split. Categories are balanced with exception of one category, but I can accept poor performance on one category. The goal is cloth recognition in images. When I feed an image of a person wearing pants and a t-shirt, I want to see two bboxes of these clothes. My problems: I already trained a few models from …
Im looking for a relatively simple NLP algo that would help me rate the similarity between two sentences. These sentences usually range between 1-5 words approximately. Context: A user can create as many categories as he wishes to group his photos. I noticed that a lot of these categories are empty and when diving a bit deeper I see that a lot of the categories created by a user have almost identical names E.g. FRANCE VS FRANC | SUMMER VS …
I am trying to understand how GCNs work. For example, the well known GraphSAGE algorithm considers a graph $G$ with node features $x_i$ of dimension $n$. Then it propagates the node features over the graph by message passing. In a basic implementation of GraphSAGE, message passing is implemented by first averaging over the neighbour features, which is then passed through a linear transformation $W_2$. Finally, the original node features are added multiplied by another linear transformation $W_1$: $$ x_i' = …
I am creating something for a client and I have a Class that I created with a Custom Post Type called 'PuSH Feeds' and when the user adds a new post and publishes it they can then click on one of two buttons that I have in the Custom Meta Box. One button is for 'Subscribe' and the other for 'Unsubscribe'. I am using the save_post action hook and testing if the $_POST global has that 'pushfeed-subscribe' or 'pushfeed-unsubscribe' and …
I have some training data which I am using to build a Spark MLLib model which is in a Hive database. I am using simple linear regression models and the PySpark API. I have a code set up to train this model every day to get the most up-to-date model. (the real-world use case is that I am predicting vehicle unloading times, and my model must always be recently trained since the characteristics of the vehicles and locations change over …
I'm trying to debug a 301 redirect that is causing me lots of trouble. I renamed a page from /blog to /old-blog and created a new page with the /blog slug. Now I'm getting 301 redirects from /blog to /old-blog. I already tried to look for the value in the wp_postmeta table with the meta_key *_wp_old_slug* but it isn't showing up. I did found 2 entries with the blog meta_value under the *_wp_desired_post_slug* meta_key. What are these values supposed to …
For the same Binary Image Classification task, if in the final layer I use 1 node with Sigmoid activation function and binary_crossentropy loss function, then the training process goes through pretty smoothly (92% accuracy after 3 epochs on validation data). However, if I change the final layer to 2 nodes and use the Softmax activation function with sparse_categorical_crossentropy loss function, then the model doesn't seem to learn at all and stuck at 55% accuracy (the ratio of the negative class). …
I am trying to create a Search Filter within WordPress to filter through all the custom taxonomies within a Custom Post Type. I have created a function that generates the dropdown so I can output each option value as a slug for my filter which is working already. My only issue is that the "Select All" option is not working. The results come back with nothing found when Selecting All. The filter can be here. The code I have used …
New to MAMP, but had no issues with installation and viewing the WordPress site I pulled down from my server. However, can’t figure out to log into the admin side of my site. Here’s what I’ve tried, and the results: Setting: Web Server > Document Root > Sites localhost:8888 = displays website with no issues http://localhost:8888/wp-admin/ = Not Found page Both localhost:8888/mysitename/wp-admin/ and http://localhost:8888/mysitename/wp-admin redirects to https://localhost:8888/mysitename/wp-admin/ then Secure Connection Failed An error occurred during a connection to localhost:8888. SSL …
I have millions of lat long points that have been grouped into squares. Some squares have thousands of points, others have a couple of points. The idea is that we have one set of lat long for the square with a weighting related to the square based on the number of items it has instead of having millions of rows of data to the cluster. I was originally using the leadercluster algorithim which allowed me to specify the distance each …
I am working on a wordpress post in which I want the date/time in frech format as shown below: ENGLISH By FJ Published April 9, 2019 at 4:05 p.m. Last updated April 9, 2019 at 4:14 p.m. FRENCH Un texte de FJ Publié le 9 avril 2019 à 16 h 05 Mis à jour le 9 avril 2019 à 16 h 14 I have used the following code to pull the date/time in english/french for wordpress post: <strong><?php if(ICL_LANGUAGE_CODE=='en'){ ?> …
I have a question, related to parallel work on python How I can use Processers =1,2,3... on k nearest neighbor algorithm when K=1, 2, 3,.. to find the change in time spent, speedup, and efficiency. What is the appropriate code for that?
I have a data.table that contains many timing variables. Date: it gives the date of Sales Promo2(week, year): It describes the calendar week and the year when the store has started to participate in the Promo2 (reduction of prices). CompetitionOpenSince(Month, Year): Gives the approximate year and the month of the moment when the nearest competitor was opened. PromoInterval: Describes the consecutive intervals Promo2 is launched, naming the months when the promotion was launched again. For example. "Feb, May, Aug, Nov" …
Any idea what is wrong with this? It "works" but it runs the error_log bananas. It should be noted that this code excerpt is from the "404.php" file Here's the code: <div class="col-md-12 mb-3"> <h3 class="heading">Service Areas</h3> <?php $allCities_args = array( 'post_type' => 'local', 'posts_per_page' => -1, 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC' ); $all_cities = new WP_Query($allCities_args); ?> <div class="nearby_cities "> <?php if ($all_cities->have_posts()) { while ($all_cities->have_posts()) { $all_cities->the_post(); $city_id = get_the_ID(); $state_check = get_post_ancestors($post_id); $parent_id …
I have a custom post type functionality defined on my website for a certain action. In order to achieve a specific type of url structure. I removed the constant slug from it and replaced it with category and brand name. The previous url was www.website.com/product/name The new url is www.website.com/category/brand/name You see, I have totally removed the slug. Here is the code for that. Now the issue is that these urls are not working and I am geting a 404 …
After performing some sentiment analysis, I have a dataset that looks like this: For different products, using online reviews, I have obtained some values for positive/negative sentiments. However, now I am unable to figure out how to draw conclusions for this. I had the idea of using correlation but need ideas on what features could be created & what comparisons could be made? The dataset includes different "Features" like webcam, screen, mousepad for different products (product name). id Date Website …
I have question. I would like to load post content, custom post, depends on category. So first of all I would like to have drop down menu which will list all my categories then once user will select category list of post title will appear in second drop down (post from that particular category) then once that title selected post content will load. All that needs to be done on one page and without reloading so using Ajax. I stacked …
I am presently using an LSTM model to classify high dimensional tabular data which is not text/images (dimensions 21392x1970). I also tried XGBoost (Gradient boosting) in Python separately for the same classification task (classify into one of 14 categories of different categorical values). I have come across the provision of using feature_selection_ method in XGBoost, which can provide me the F1 scores of the most relevant features in prediction. I would like to create a hybrid model that combines the …
I have already seen this, this and this question, but none of the suggestions seemed to fix my problem (so I have reverted them). I have the following code: nlp = spacy.load('en_core_web_sm') parser = English() class CleanTextTransformer(TransformerMixin): def transform(self, X, **transform_params): return [cleanText(text) for text in X] def fit(self, X, y=None, **fit_params): return self def get_params(self, deep=True): return {} def cleanText(text): text = text.strip().replace("\n", " ").replace("\r", " ") text = text.lower() return text def tokenizeText(sample): tokens = parser(sample) lemmas = …