How can import data into kaggle kernel if the folder is zipped? - import

I facing problem importing data into kaggle kernel from "../input/train/filename". it's throwing an error saying directory doesn't exist. I guess this is happening because the 'train' is a zipped folder. Any solution?

To see what's in your ../input/ directory (where datasets you attach to your kernel are located), run !find ../input/ in a code cell. This will print all paths to dataset files. You should see that the uncompressed directories and files are accessible.
If this doesn't help, perhaps you can share more details to help reproduce your issue (e.g., a link to the dataset and/or your kernel).

Related

.py files start giving import error out of nowhere

I'm importing some python files in my colab using from 'xxx ' import 'xxx' , but sometimes it stop being recognized even if I don't do any change in the code
Example of the error message:
enter image description here
It may be that you have two different installations of python installed. There may have been an issue deleting an old version of the Python environment when you updated, or you downloaded the Microsoft Store installation and have both at the same time which could cause issues.
I've had this issue before, and it was mainly because I was running the file wrong. When you run a file, it adds the file directory to sys.path, which is where it stores package directories. If you are not running the main file, and instead you are running the file individually, that might be the issue. This can be solved by using sys.path.append() or just running the program from the main file. (I might have misunderstood the question so I apologize if this doesn't help)

How to include/find the source and header files for LL-Drivers?

I have been using STM32G474, but if I look into the HAL driver folder structure I cannot find the files for LL-Drivers. I want to use LL functions in my code.
Looking forward to your quick suggestions.
BRs,
Waled
Folder Structure
STM32G4 Hal and Low layer drivers, UM2570
I found the file in the official STM32CubeG4 repo on github.
Either you have an older version of the code on your local copy, or the file got deleted somehow. You should be all good by getting the current version of the whole repo.

where are the sources downloaded for a yocto

New to Yocto. Written a simple recipe for a libray. Trying to understand the directory structure. Can't figure out where the files are downloaded and where they are compiled. Can someone help me out?
In your local.conf, you should have DL_DIR variable set, it's where recipes are downloaded. Then they are extracted in
<build>/tmp/work/<arch>/<recipe>/<version>/[git|recipe-version]
and compiled in
<build>/tmp/work/<arch>/<recipe>/<version>/build
They are some exceptions, kernel source for example is in
<build>/tmp/work-shared/<arch>/kernel-source

Has anybody ever successfully downloaded the Cities project in netlogo

As shown in the following link, the developer says that the whole project codes are included in the zip archive, but after I downloaded and decompressed it, I can't find the file of Cities.nlogo which is the main procedure for the entire simulation project. I don't know if there are someone else encounter the same problem as mine, how do you solve it ?
http://ccl.northwestern.edu/cities/citiesmodel.shtml#download
I tried this just now:
% curl -OsS 'http://ccl.northwestern.edu/cities/cities.zip'
% unzip -l cities.zip | grep Cities.nlogo
error [cities.zip]: missing 2 bytes in zipfile
(attempting to process anyway)
36365 09-26-07 15:21 cities/Cities.nlogo
as you can see there is definitely a Cities.nlogo file in there, but is also appears that the zip file is slightly corrupted ("missing 2 bytes in zipfile"). You might try extracting the archive with a different program? It extracted successfully for me using Archive Utility on Mac OS X.

Unable to read package metadata. This may be due to missing repodata directory. Please ensure that your install tree has been correctly generated

I am new for centos installation. I downloaded a minimul version of centos 6.5, around 339.7mb of size. I am trying to install this with GUI interface but I got an error after selecting the drive option, which comes after selecting the country.
This is complete message,
Unable to read package metadata. This may be due to missing repodata directory. Please ensure that your install tree has been correctly generated.
Failare:
repodata/743fec56b2af0ce8d6ec82c47a4efafc2a4d18cddfa9683f29611cb18d1a33de-primary.sqlite.bz2 from anaconda-CentOS-201311271240.i386: [Ermo 256] No more mirrors to try.
Sorry but I am new here, so I can't put the exact image here.
I believe that i had this same issue and was able to solve it.
The files under the /repodata folder are missing their file extensions and are not matching their full names in the "TRANS.TBL" file, under this same dir.
Rename all the files to match what is in the "TRANS.TBL" file, then try the install over again.
Please let everyone know if this works for you.
In the past i would just put a URL in that pointed to the correct files on a server, i feel that most people take this workaround and that's why it's not as hot of an item as it should be. I hope this gets fixed in the .ISO.
Thank you,
YourFriend
It worked for me.
I renamed all 8 files.
i.e. 0e371b19e547b9d7a7e8acc4b8c0c7c074509d33653cfaef9e8f4fd1d62d95de
0e371b19e547b9d7a7e8acc4b8c0c7c074509d33653cfaef9e8f4fd1d62d95de-primary.sqlite.bz2
The correct file name is given in file "repomd" under folder repodata
example - location href="repodata/b124f0ec5323cfee56b420906a3103f0daef656dde3f7ac8220120aa7504e57a-primary.xml.gz"
I had exactly the same issue ;
under "repodata" directory opened "repmod" xml file
Searched file name within repmond xml file
Found matching strings
Renamed 8 files as specified in .xml file
and it worked like a charm
Thanks to "Your Friend"
I had the same problem. Even if you manage to get past this step, you will encounter at a later point other errors related to filenames.
The root cause was using Unetbootin to create the bootable media. I switched to Rufus and everything works fine now.