How to import folder from gdrive to Google colab - python-import

I have .py extension files in folder and that folder i putted in google drive and now I want to import that folder Google collab then how to do because I am getting module found error.
First I tried to mount google drive and then I tried import the folder then it giving me no module found error.

Mount the folder first (new folder will be created in content directiory, named drive):
from google.colab import drive
drive.mount('content/drive')
Move to file to current collab directory:
!cp ./drive/PATH_TO_YOUR_FILE ./
Your import should work now!

Related

macOS - How can I install a new MacTex (LaTeX) package (a folder containing .sty or .bib files) and use it?

I have been struggling to install a new package and use it for TexShop.
What I have tried is searching for the folder path: /texmf/tex/latex
However, even when enabling to see hidden folders, such a folder does not exist on my system. I therefore went ahead and created the three folder manually. I then placed my folders containing the .sty or .bib files inside. This does not seem to be working because I still receive the error that LaTeX could not find the .sty file.
Another folder that I can find within my Library is not the texmf folder but a TeX folder (see screenshot below)
Do I maybe have to place the packages inside one of these folders instead?

Xcode subproject cannot find its own header files

I have an sdk that is added to my project as a subproject in xcode. My main project's classes can import all the header files successfully into the code by using
#import "Filename.h"
because I added the sdk directory to my Header Search paths in the build settings of my main project.
However, the problem is that the classes of my sdk can't successfully import each other unless they are in the same directory. In my case, this is a problem because my sdk has folders within it with header files that the files in the main sdk folder want to import. As a result, I receive the error:
'Filename.h' cannot be found
when files in the main sdk folder try to import header files nested in deeper folders in the sdk. When I tried to move all the files into the main directory (I'm fine with sacrificing organization for functionality), the original error remained and I got two more errors:
clang: error: no such file or directory: '/Users/.../MainProjectFolder/SDKFolder/NestedFolder/Filename.m'
clang: error: no input files
It seems to know where to look for the files but the other files still can't access it.
Does anyone have any ideas to help?
Thanks, any help is appreciated!

How do I import a library from the lib folder in my web app?

My folder structure looks like this:
lib\
my_library.dart
web\
index.html
main.dart
pubspec.yaml
In main.dart, I'm currently importing my_library.dart (which has library my_library at the top) by doing:
import '../lib/my_library.dart';
This works fine. However, it feels a bit fragile to have this relative path. I read in the Pub Package Layout Conventions that I can probably use import 'package:blah'; it says:
When you use libraries from within your own package, even code in src, you can (and should) still use "package:" to import them
So, I tried changing my code to this:
import 'package:my_library.dart';
However, in Chrome Dev Editor I get:
Target or URI does not exist: 'package:grid_data.dart'
and in Dartium I get:
GET http:// 127.0.0.1:51792/MyProject/web/packages/my_library.dart 404 (Not Found)
What's the correct way to import something from my lib folder from other dart files in my project?
You are missing the package name
import 'package:my_project/my_library.dart';
The package: part in your import statement references the packages folder in your my_project package (the folder that contains the pubspec.yaml. The remainder of the import statement is the path to the file you want to import.
You can browse through the folders and files in this packages folder in DartEditor or a file manager to see exactly how the files are organized.
This folder also contains a symlink named my_project which points to your my_project/lib folder.

Dart pub get command is not working properly when i try to pull my dependencies

I have my project in github. I already created it like a library (Dart). Now I am trying to use my library in one of my project.
After i add all the necessary comments to get it from my git source, pub get is giving the following error,
Warning: Package <library_name> does not have a "lib" directory so you will not be able to import any libraries from it.
Got dependencies!
Any clue???
Thanks,
Tham
When importing libraries, the files you import come from the lib folder.
Eg:
import 'package:danny/danny.dart';
will import the file lib/danny.dart from the danny package.
If the package doesn't have a lib folder; this means you can't possibly import it. If you're importing directly from a Git repo; you need to ensure the lib folder is a top-level folder.

trigger IO : not able to import the existing project

I am just started with the trigger IO . I have downloaded the toolkit on my mac machine . I can create new project from UI .But when I am importing the existing project it is giving me the error : Failed to import app: Already have an app imported from /foler path . My folder containing src folder also valid config file . can anybody help me ?

Resources