How to download all the files from a folder in Firebase Storage?
I want to download all the files from my Firebase project's folder.I've tried the following things:Using NPM:npm install -g firebase-toolsfirebase loginfirebase storage:download...
View ArticleReal size of directory with subdirectories and files on disk
I need to create img container for archive some directories and files.For that I need to create it with dd. It's no problem but I can't create it 'cause I don't know real size of the some directories...
View ArticleHow to detect rectangles and rotate them in the correct direction in image
I have block code like this.def crop_image(self,img): cnts,gray_img = self.pre_processing_img(img) ans_blocks = [] x_old, y_old, w_old, h_old = 0, 0, 0, 0 if len(cnts) > 0: cnts = sorted(cnts,...
View ArticleHow to pass javascript array to python flask
I'm not really expert at javascript, but i have a school project where i need to use python flask to make a website.the problem is that when i input on html, i put the value on javascript array, and...
View Article'pyodbc.Cursor' object has no attribute 'fast_executemany'
I have a problem, I have a web app that is using fast_executemanyin order to insert into the database. When running it on localhost it works with no problem, but when deploying it to Azure, I...
View ArticlePut comments in between multi-line statement (with line continuation)...
When i write a following pyspark command:# comment 1df = df.withColumn('explosion', explode(col('col1'))).filter(col('explosion')['sub_col1'] == 'some_string') \ # comment 2 .withColumn('sub_col2',...
View ArticleHow to speed up `pandas.where`?
I have two dataframes: df1 with shape (34, 1151649), df2 with shape (76, 3467). I would like to perform pandas.where.groupby operation on them. They are quite slow. I'm wondering is there's any way to...
View ArticlePytorch Clustering of Model Parameters with high dimensional data
I am trying to cluster the model parameters to separate benign and malicious ones into 2 clusters using kmeans. However, as it is a high dimensional data(approx 3 lakh parameters), I am getting an...
View Articletime limit exceed in the code that sums the numbers
in the question there will be a number taken from user. Up to that number, I want to find the sum of all numbers if the sum of that number's digits is odd.For example if the input is 13 then...
View Articlepercentileofscore groupby expanding
I'm trying to calculate the following:Compute the percentile rank of a value relative to a list of valuesin a different series.By group.And in an expanding dataframe window.I've tried the following...
View ArticleCan't print out a list of files in a folder using os.listdir ("...") error...
I'm trying to get a list of all the files in this folder then print them but I keep getting an error (using python).import osfiles = os.listdir("C:\Users\Alex\Desktop\Channel")Error - File...
View ArticleWindow after minimize from windows taskbar get bigger and bigger (pywebview)
I'm trying to make a window which wants to be frameless (Is option in pywebview too but I can't minimize from windows taskbar) with custom menu like Spotify (for example) the idea is working...
View ArticleHow do I cut a Pandas dataframe at a certain value in a certain column?
I have data from an experiment from t=0 to t=500s, but I would like to only plot the first 100s of data. How do I "slice" or cut the dataframe so I can plot my interval in matplotlib? Thank you!used...
View ArticleHow to put formatted text into the clipboard?
I wanted to create some formatted text like this:𝐇𝐞𝐥𝐥𝐨𝐖𝐨𝐫𝐥𝐝!And then put it onto the clipboard using Python, so when I paste it will show my text in formatted version in Windows.I have tried to copy...
View ArticleWhy doesn't message.content.startswith work? [closed]
I've been trying to get this code to work but it just wont work. I'm stumped on how to get this to work.The entirety of my code:import discordintents = discord.Intents.default()client =...
View ArticleMultiple CSS Providers in Python GTK3
I've read lots of posts about using CSS in GTK3 in Python, but I never really seemed to find anything about changing styles programmatically. Usually there is one big triple-quoted string that has all...
View ArticleI need to find a model that can tell if it's a list page based on the source...
I'm currently doing an intelligent crawler project, now I need to process the collection to the page, for the list page, I will continue to collect the links inside, for the detail page, I will...
View Articlewhy is the multiprocessing method is slower than single mehod
I need to pull data from a web API for a series of SN, I implement it in a for-loop function, each loop will spend about 1.5s (due to the query is complex), so I'm trying to use multiple processes to...
View ArticleImproving quick sort to work with lots of duplicates in the array, using...
If the array of size n contains just one unique number (an array with all duplicates), then the traditional quick sort algorithm will create very uneven partitions of sizes 1 and n-1. This will be the...
View ArticlePyTorch: load weights from another model without saving
Assume that I have two models in PyTorch, how can I load the weights of model 1 by weights of model 2 without saving the weights?Like this:model1.weights = model2.weightsIn TensorFlow I can do...
View Article