Cannot assign to function call when looping through and converting excel files [closed]

With this code:

 xls = pd.ExcelFile('test.xlsx') sn = xls.sheet_names for i,snlist in list(zip(range(1,13),sn)):     'df{}'.format(str(i)) =  pd.read_excel('test.xlsx',sheet_name=snlist, skiprows=range(6))  

I get this error:

‘df{}’.format(str(i)) = pd.read_excel(‘test.xlsx’,sheet_name=snlist, skiprows=range(6)) ^ SyntaxError: cannot assign to function call

df+str(i) also return error

i want to make result as: df1 = pd.read_excel.. list1… df2 = pd.read_excel… list2….

Modern methods for protecting direct access to plugin files?

Is the following even still necessary, and if so, is it still the standard? Or does WordPress automatically protect plugins files from abuse nowadays?

if ( ! defined( 'ABSPATH' ) ) {     exit; } 

But, if we do still need to use it, I’m of the mind that the more secure solution is to not give the bad guys any hints at all if they’re sniffing around. That is, rather than showing an error message or white screen of death, which only verifies for them that the plugin they’re sniffing out vulnerabilities for does in fact exist on the installation, how about throwing a 404 as though it doesn’t exist at all?

The following is the closest I’ve gotten to so far:

if ( ! defined( 'ABSPATH' ) ) {     header( 'Location: 404' );     die(); } 

This is pretty good, but not completely ideal, in that even tagging a 404 onto the attempted URL like this is an irregular pattern, that gives away a clue. Otherwise, it does exactly what I want it to.

But my other attempts with combinations of:

http_response_code( 404 );

or status_header( 404 );

and

get_404_template();

or wp_safe_redirect( get_stylesheet_directory_uri() . '/404.php', 404 );

or header( get_stylesheet_directory() . '/404.php' );

had no effect.

Finally, in this context, die(); vs exit;, are either of them better than the other or do they work exactly the same way here?

Is there a way to find .obj files of the twisted ones? [closed]

Let me explain, you can go away if you don’t know about FNaF (although you could try to help), basically I am making a game about the twisted animatronics, but I cant put them in because I couldn’t find the .obj files anywhere on the internet, I did find one of them, but it wasn’t colored.

the files I need are .obj files of the following animatronics: Twisted Freddy, Twisted Bonnie, Twisted Foxy and Twisted wolf. you can search for these files for the internet, I will be thankful, or you can choose the hard way and make the models themselves. You can search up how they look like on the internet

$40 HOLIDAY DEAL – Entire Share Files Business with Mobile App + WordPress Plugin

$ 40 HOLIDAY DEAL – Entire Share Files Business with Mobile App + WordPress Plugin

Become The New Owner Of Entire Share Files Business With WordPress Plugin and Official Mobile App.

Introducing File Upload:
File Upload is the simplest way to send your files around the world. Share large files up to 10GB for free.

Key Selling Points:
1. Hot Niche
2. No type of marketing activity has ever been performed.
3. Opportunity to capitalize on this business
4. The time…

$ 40 HOLIDAY DEAL – Entire Share Files Business with Mobile App + WordPress Plugin

Generate JSON files for language translation from po file without wp-cli i18n make-json

My plugin uses wp_set_script_translations() to load translations for JS as mentioned here https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/.

I understand that when translations for a locale is added translate.wordpress.org it will create the JSON files.

But, we have a lot of site owners wants to translate a few words and start using the plugin. They can create .po and .mo files, but how they can create the JSON files without setting up wp-cli to use (wp i18n make-json).

Loco Translate plugin is not supporting JSON file generation.

I couldn’t find any online sites supporting .po to .json(with below mentioned format) conversion.

Out put file should in $ {domain}-$ {locale}-$ {handle}.json or $ {domain}-$ {locale}-$ {md5}.json JED 1.x ( .json ) file format for each JS file that called with wp_set_script_translations().

how to create endpoint for downloading pdf files?

I would like the logged-in user to be able to download the PDF file, but not to see the real path to the file. Additionally, in this PDF file, I enter information about the user name and date of download.

I created a new endpoint "download" to make the download address look like this: my-website.com/post-name/download/attached-id

function my_custom_endpoint() {     add_rewrite_endpoint( 'download', EP_PERMALINK | EP_PAGES ); }   add_action( 'init', 'my_custom_endpoint' ); 

but I don’t know what the hook is to not load the page after calling this endpoint but to call my function and return the PDF file to the user.

Upload Gravity Form files to OneDrive [closed]

I’ve been looking for an away of upload files from Gravity Form direct to the cloud on OneDrive. And so far, I found some codes that could be useful:

 add_filter( 'gform_upload_path', function ( $  path_info, $  form_id ) {         GFCommon::log_debug( "log_upload_path(): path_info for form #{$  form_id} => " . print_r( $  path_info, true ) );               return $  path_info;     }, 1, 2 );       add_filter( 'gform_upload_path', 'change_upload_path', 10, 2 ); function change_upload_path( $  path_info, $  form_id ) {    $  path_info['path'] = '/home/public_html/yourdomainfolder/new/path/';    $  path_info['url'] = 'http://yourdomainhere.com/new/path/';    return $  path_info; }    <?php require_once 'functions.inc.php'; $  token = skydrive_tokenstore::acquire_token(); // Call this function to grab a current access_token, or false if none is available.  if (!$  token) { // If no token, prompt to login. Call skydrive_auth::build_oauth_url() to get the redirect URL.        echo "<div>";        echo "<img src='statics/key-icon.png'>&nbsp";        echo "<a href='" . skydrive_auth::build_oauth_url() . "'>Login with SkyDrive</a></span>";        echo "</div>"; } else {        $  sd = new skydrive($  token);        try {            $  response = $  sd->put_file($  _GET['folderid'], '/file/to/put');            // File was uploaded, return metadata.            print_r($  response);        } catch (Exception $  e) {            // An error occured, print HTTP status code and description.            echo "Error: ".$  e->getMessage();            exit;        } } 

Source: https://docs.gravityforms.com/gform_upload_path/
https://stackoverrun.com/fr/q/8253794

Instead of my domain path I would like to point it to one folder on Onedrive and if possible, generate a new folder for each upload containing the current WooCommerce order number. I don’t have much experience with PHP so any useful help will be great!