I want to detect weather the car is moving forward or backward in the video, i am able to detect the bounding box on the car, now i want to do the post processing and tell that this car is moving forward or backward ( backward here means that car is reversing )
I'm wondering if there is a way to remove the typography and custom color panels from the sidebar for just the paragraph block. I've currently written a function that I've added add_theme_support to for the typography panel and custom color picker but it's affecting every block that can utilize those things. Here is said function: public function typography_custom_color_theme_support() { // Disable Custom Color Picker add_theme_support( 'editor-color-palette' ); add_theme_support( 'disable-custom-colors' ); // Disable Font Size and Custom Font Size Dropdowns add_theme_support( …
My goal is to predict the most appropriate answer from an utterance, in a group of 21 potential answers. (I'm not sure the "question" is called utterance though. ) Example: Utterance: How are you today? Answers: Answer1, 2, ..., 21. I have a training file with this format: Utterance: Answers: Good answer, wrong answer1, wrong answer2,..., wrong answer20. My problem For the first time, we have to make a prediction from a group of possible answers, and, thus, this is …
I am having hard time for importing to user-meta and post-meta from my non-wp-tables. I am trying to do db migration from user table and post table to WordPress tables. So it might be user table to wp-users and wp-usermeta post table to wp-posts and wp-postmeta I have been trying to find good plugins but it's all limited. (only basic information) My old user table has all of users information on only 1 row (1 line) such as phone number, …
I am using get_pages to pull the children pages from a parent and listing them in a similar way to the standard WP loop for pages. This works well using the code referenced below - however.. what I would like to be able to do is to list a page I know the ID for at the top irrespective of its publish date (I am listing the pages in date order). Is this possible? Page ID of the page I …
I've been researching this and had no luck so far. I have a WooCommerce store with a main menu showing product categories (product_cat) and brands (yith_product_brand) which is a custom taxonomy. I want to hide categories and brands if they are empty. Do you know a way to achieve this, either by using a plugin or adding a function/filter to the functions.php file? If so any help would be much appreciated. Thanks in advance.
I have a yolov3 model for object detection on 9 classes. What is the difference in computing metrics (such as mAP) on validation set and on a test set (unseen data)? What is usually done in literature and why?
I have a custom loop based on these arguments (below), and for some reason when it's run, the SQL returned has this fragment: ... AND wp_posts.ID = -1 ... And I get no results from the db. If I run the query against the db without this fragment, I get the results I need. Could someone, please, point out what's wrong with argument list that causes this behavior? $args = array ( 'post_status' => 'draft', 'posts_per_page' => 10, 'category_name' => …
I am new to Orange and it seems very useful for conducting exploratory data analysis. One question I have is - can we use a widget to modify some values in the dataset? For example, several numerical columns have some values of 0 which does not make sense and should be a "missing data". I do not want to ignore the line as some other column data are important. Also not all 0 should be replaced with "missing data" as …
I'm using the pre-trained Inceptionv3 to build out features from proprietary documents. Some of these documents contain sensitive PII data. I use the 2K output from the second last layer as the feature vector. My question is if a set (say 2000) of these 2K generated features are available to someone, can they be used to reverse engineer the sensitive data like SSN, date of birth, etc. My thinking is since the Inceptionv3 was never trained with these proprietary documents, …
I would like to add /blog in front of the url for a single post: e.g. website.com/blog/news-article -> single article website.com/blog -> blog archive (showing a list of all blogs etc.) Ive tried adding /blog/%postname% as the permalink structure, however it adds it in front of everything, including some custom post types: e.g. website.com/blog/shops/single-shop-page How do I go about adding it in front of posts but nothing else? Thanks in Advance! M
A few days ago, having made some CSS changes in my additional css box, I got this error. Looks like something's gone wrong. Wait a few seconds and try again. I waited a few seconds and pressed publish again. This time I got another error message: The previous set of changes has already been published. Please try saving your current set of changes again. I tried again and got the first error message again. Not sure what's caused this because …
I'm wondering if the approach I'm thinking of could even work. I want to use dictionary learning for image classification. The first step would be to learn the dictionary from a set of similar yet different images to be able to extract background from an image. For example, I have a set (e.g. 500 photos) of images of the same object, but the scenes differ (light, the angle the photo was taken at etc.) Basically, the main object is the …
I'm creating a Meta Box in my custom Plugin where the Administrator can select which users can view a certain post based on their roles. When I select the role and save the meta box content by clicking on the Update button, nothing gets saved because both $_POST['metabox_nonce'] and $_POST['membership_level'] are empty. Why is the form not sending any data? Thank you so much for your help. This is my code: add_action( 'add_meta_boxes', array($this, 'add_italianglot_membership_box' )); add_action( 'save_post', array( $this, …
Excuse me if something like this has been asked before. So, I'm trying to alter the query which displays the posts of a custom post type, but on the admin side, more precisely, the edit.php page. This is my code: function my_function() { global $pagenow, $typenow; if( 'edit.php' == $pagenow && 'certain-post-type' === $typenow ) { // do something } } add_action( 'admin_init', 'my_function' ); The main problem is not altering the query itself (yet!), but targeting only the edit.php …
I Use a custom walker from my menu in WordPress and my menu doesn't show all levels. https://soulofcroatia.com/ ->One Day menu item. This is my code in header.php <?php wp_nav_menu( array( 'theme_location' => 'mainmenu', 'menu' => 'mainmenu', 'container' => 'ul', 'container_class' => 'collapse navbar-collapse', 'container_id' => 'navbarCollapse', 'menu_class' => 'nav-list', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'items_wrap' => '<ul class="%2$s">%3$s</ul>', 'depth' => 3, 'walker' => new Primary_navigation_walker(), ) ); ?> this is my code in custom-walkers.php class Primary_navigation_walker extends Walker_Nav_Menu …
I know this is not the way u should go, but my customers want it so im looking for ways. Requirement: WP with one DB (3 Domains sale the same stuff) 3 Domains which use this DB (can be more later), this should work with on fly rewriting over hooks user registered should be only able to login in the domain where he is registered, but should be able to register on the other 2 domains with same data. My …
I want to export the Yoast meta title & description from a custom taxonomy with the WP All Export. Unfortunately there is no direct way with the plugin to do that. There is an extra WP All Export addon for Yoast but it doesn't work for custom taxonomies. I tried to use a custom function in the export to get the title and description. But my function doesn't work either. Im not sure why. Here's my current function: function yoast_wpseo_title($value) …
I came across different approaches to creating a test set. Theoretically, it's quite simple, just pick some instances randomly, typically 20% of the dataset and set them aside. Below are the approaches The naive way of creating the test set is def split_train_test(data,test_set_ratio): #create indices shuffled_indices = np.random.permutation(len(data)) test_set_size = int(len(data) * test_set_ratio) test_set_indices = shuffled_indices[:test_set_size] train_set_indices = shuffled_indices[test_set_size:] return data.iloc[train_set_indices],data.iloc[test_set_indices] The above splitting mechanism works, but if the program is run, again and again, it will generate a different …
I have a network with multi site and I need that there's a "main" site where I can add posts, taxonomies, pages (and also translations about them) and I want the possibility to share the different post type to different sites along my network. For example: My network has: Main Site Site 1 Site 2 Site 3 In the Main Site I have these posts: Post 1 Post 2 Post 3 Each post could have a lot of data related …
I am creating a post within gform_after_submission action, which sets a post ID variable when the post is successfully created. https://docs.gravityforms.com/gform_after_submission/ add_action('gform_after_submission_1', [ $this, 'create_order' ], 10, 2 ); public function create_order( $entry, $form ) { // get the current cart data array $data = self::data(); // user id $user_id = get_current_user_id(); // create an order array $order = [ 'post_author' => $user_id, 'post_content' => json_encode($data,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES), 'post_type' => 'purchase-order', 'post_status' => 'publish' ]; // create order post using an array …
I am new to machine learning, I want to extract event triple from news headlines. But there are many news headlines without event triples, only containing subject and predicate. How shall I deal with these kind of sentences?
Is there a list of WordPress CSS id/classes that I can use to build plugin option screens that look and feel more like a normal WordPress option page? I have found some through serendipity but it would have been nice to have a list. An example is this class: button-primary That makes a button look like this:
Is there a way in Wordpress that I can embed an image to a post when I want to include it like this: <img src="....." /> So I want to add this manually. Is this possible? Now, I get the URL, without the image. So the embedding process isn't done. PS: I am using a front-end editor.
I am using Python and I have a sample dataset of this kind: columns = ['product_id', 'market_value2015', 'market_value2016', 'market_value2017', 'market_value2018', 'market_value2019', 'market_value2020', 'market_value2021', 'retired'], where market_value2015...2021 are floats and retired is a Boolean. The objective is to train a neural network that predicts if a product will be retired or not. Initially, my idea was to use floats variables from 2015 to 2020 in order to predict retirement in 2021 by considering these variables as time series, but I got …
I would like to know if it is possible to have a custom feed based on a page template and how? This is my custom query: $my_custom_query = new WP_Query( array('cat' => array (4335, 12488), 'posts_type' => 'post', 'showposts' => 35, 'paged' => $paged, 'meta_key' => 'views', 'orderby'=> 'meta_value', 'order' => 'desc', //'orderby' => 'desc', // BOF EXCLUDES POSTS YOUNGER THEN TODAY -30 DAYS * 'date_query' => array( 'column' => 'post_date', //'after' => '2010-01-01', //'before' => date('Y-m-d', strtotime('-30 days')) ), …
I'm trying to use this code to display related posts by the same category as the current post but if the post is in a child category, i need to show related posts by that child category, not the parent unless there's no more posts in the same child category. $categories = get_the_category( get_the_ID() ); $args = array ( 'child_of' => $categories[0], 'title_li' => '' ); $terms = wp_get_post_terms( get_the_ID(), 'category', $args ); $terms_ids = []; foreach ( $terms as …
I'm working on a large corpus of french daily newspapers from the 19th century that have been digitized and where the data are in the form of raw OCR text files (one text file per day). In terms of size, one year of issues is around 350 000 words long. What I'm trying to achieve is to detect the different articles that form a newspaper issue. Knowing that an article can be two or thee lines long or very much …
I've got a custom post type / taxonomy. I've created a list that shows all the categories and the posts in them. I have set up a top level category (taxonomy) that has two sub categories. I want my list to show only the second level categories and the posts in them. Currently it outputs both the sub categories and their posts correctly but it then also shows the top level category and all the posts within that too even …
How can I (easily) determine which of my wordpress sites are using a given plugin, on a Wordpress Multisite install? Let's say I have 1,000 wordpress sites on a Wordpress Multisite install. I have 100 plugins. For each plugin, I want to list all of the sites that are using that plugin. In the GUI, I can only see how this can be done in about 1 million clicks. Is there a query I can run against the DB (and …
I've pretrained the RoBERTa model with new data using a 'simpletransformers' library: from simpletransformers.classification import ClassificationModel OUTPUT_DIR = 'roberta_output/' model = ClassificationModel('roberta', 'roberta-base',use_cuda=False, num_labels=22, args={'overwrite_output_dir':True, 'output_dir':OUTPUT_DIR}) model.train_model(train_df) result, model_outputs, wrong_predictions = model.eval_model(test_df) # model evaluation on test data where 'train_df' is a pandas dataframe that consists of many samples (=rows) with two columns: the 1st column is a text data - input; the 2nd column is a category (=label) - output. I need to create the same model and pretrain …
I am exploring using CNNs for multi-class classification. My model details are: and the training/testing accuracy/loss: As you can see from the image, the accuracy jumped from 0.08 to 0.39 to 0.77 to 0.96 in few epochs. I have tried changing the details of the model (number of filters, kernel size) but I still note the same behavior and I am not experienced in deep learning. Is this behavior acceptable? Am I doing something wrong? To give some context. My …
I have two custom post types colors shapes I have a post called "red" under the custom post type "colors". The default URL for this post would be example.com/colors/red Now I want to make it accessible from the following URL as well example.com/shapes/red The closest I came with is to add a filter to change_404_template (as I receive a 404 for above url) and forcefully inject the single.php file with some hacky code. Is there a way more standard method …
i have script.js file for html to wordpress conversion. In html it works, but in wordpress it does not work. This file contains slider, menus etc, I enable to convert html to wordpress without this file, the file has following contents function include(scriptUrl) { document.write('<script src="' + scriptUrl + '"></script>'); } function isIE() { var myNav = navigator.userAgent.toLowerCase(); return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false; }; /* cookie.JS ========================================================*/ include('js/jquery.cookie.js'); /* Easing library ========================================================*/ include('js/jquery.easing.1.3.js'); /* Stick up menus …
My case is the following: I want to train a sequential classifier to recognize what action is being performed given sensors observations.My data consists of 10 executions of an assembling task for 10 different people. So, basically each person performed the same task and I have the sensor measurements for each millisecond. That means that for each person I have a really big data set with the corresponding measurements and the labels (which action is being performed) for each millisecond. …