I'm sharing a colaboratory file with my colleagues and we are having fun with it. But it's getting bigger and bigger, so we want to offload some of the functions to another colaboratory file. How can we load one colaboratory file into another?
There's no way to do this right now, unfortunately: you'll need to move the code into a .py file that you load (say by cloning from github).
Related
I trying to figure out how to make a Spectrum Distribution (+3dB/oct) graph from my music files.
Currently there are a free online mastering service which outputs this graph when you master a music. It's this free service. But you need to upload and master a song every time to get it.
I know there are free vst plugins which can do this, but you need to manually record the sound, and it does not analyze whole files.
Are there any linux programs which can do this, preferably +3dB/oct or 4.5dB/oct ?
I tried free vst plugins but you can't process whole folders with that.
EDIT: Okay now i think i found the source code of this graph, but i have no idea how to use this code. Could someone help with that? I am very new to programming.
SOLVED! You need to use the audio analyzer file in the github link i linked. It's working. Then you can write a script to batch process folders. You can find the build on the github page. You need to use the -spectrum_distribution_output "PATH.png" to output the image to a folder.
Source code
I am doing some work on the Covid-19 and I had to access .csv files on Github. (to be honest, the URL is https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data/csse_covid_19_time_series).
So, I went to this page and downloaded the .csv files that interested me directly on my hard drive: C: \ Users \ ... .csv
Then, what I do is that I import these files as pandas dataframes into a Jupyter notebook to work with Python, by coding for example: dataD = pd.read_csv ('C: / Users / path_of_my_file_on_my_computer ...').
It all works very well.
To make it easier to chat with other people, I was told that I should import the .csv files not on my C but on Google drive (https://drive.google.com/drive/my-drive), and then put there also the .ipynb files that I created in Jupyter notebook and then allow access to the people concerned.
So I created a folder on my drive (say, Covid-19) to put these .csv files there, but I don't understand what kind of Python code I am supposed to write at the beginning of my Python file to replace the simple previous instruction dataD = pd .read_csv ('C: / Users / path_of_my_file_on_my_computer ...'), so that the program reads the data directly from my Google drive and no longer from my C?
I have looked at various posts that seem to speak more or less about this issue, but I don't really understand what to do.
I hope my question is clear enough (I am attaching a picture of the situation in my Google drive, assuming that it provides interesting information ... It's in French)
Given that your files are already hosted in the cloud and you are planning a collaborative scenario I think the idea proposed by #Eric is actually smarter.
Approach 1:
Otherwise, if you can't rely on that data source, you will have to build an authorization flow for your script to access Google Drive resources. You can see here a complete documentation on how to build your Python script and interact with the Google Drive API.
Approach 2:
Although, the Google Drive API requires authorization to access files URLs, you can build a workaround. Google Drive will generate some export links that, if your file is publicly available, will be accessible without authorization. In this Stack Overflow answer you can find more details about it.
In your Python script you will be able to parse the URL request directly without accessing the file system nor google drive authorization flow.
Whenever i specify them path like "C:\Users\Admin\Desktop\tumor", I get the "file not found" error,using cv2.imread(). Can anyone explain the correct way to read them?
You'll need to transfer files to the backend VM. Recipes are in the I/O example notebook:
https://colab.research.google.com/notebooks/io.ipynb
Or, you can use a local runtime as described here:
http://research.google.com/colaboratory/local-runtimes.html
I'm creating an app which has various default icons. These are stored in the 'drawables' folder, as png files. I want to be able to copy these across to internal storage when the user installs the app. I have the names of the drawables stored in the database (see my question from yesterday, here).
I'm not sure how to actually read the drawable in as a file, though. So, let's say I have a drawable called 'icon.png'. I need to open that and copy it across to the internal storage - but I'm not sure what the file path should be or how to go about it. I've been going round in circles in the documentation and got myself really confused!
Can anyone point me in the right direction?
I would like to develop an app that targets everything from Gingerbread(version 2.3 API 9) to JellyBean(version 4.3 API 18).
The problem:
I need to transfer large images(40 to 50 at a time) either independently or in a zip file without the user having to click on each file being transferred. As far as I can tell I need to use the HttpClient(org.apache) that was deprecated after JellyBean.
Right now the application takes the images and zips them to a zip file prior to uploading. I can create additional zip files, for example if I have 50MB to transfer I can make each zip file about 10MB and have 5 files to be transferred if I have to. I need to transfer these files to a web server. I cant seem to find anything about transferring files after Jellybean. All the searching I've done uses the deprecated commands and the posts are 2-5 years old. I have installed andftp and transferred a 16MB zip file last night that was created by my app, but I really don't want to use that as it will require additional steps from the user. I will try andftp today and setup an intent to transfer the files to see how that works out. Supposedly andftp works until Lollipop(5.0). If there is an easier way please let me know, hopefully I've missed something about transferring files. Is there another way to do this after JellyBean?