286 questions
0
votes
2
answers
75
views
Should I include build and dist folders in github, or just spec file? [closed]
I am using PyQt and Install Forge for an internal tool I am building for my current job, I cannot find any internal guides on whether I should be including my dist and build folders as generated by ...
0
votes
1
answer
48
views
Scss @use with consistent `with` parameters across multiple files
I'm still new to the @use and @forward rules in scss, so I may be misunderstanding a bit and would appreciate some help.
I have a file that sets up a configuration for a vendor library: uswds-theme....
0
votes
1
answer
50
views
How do I decrease the length of imports for my custom package?
I have a package called "library". The directory structure looks like this:
-library
+src
*pkg1.py
*pkg2.py
-pyproject.toml
-__init__.py
Currently, the import looks ...
1
vote
1
answer
153
views
Why do I get an exception when attempting automatic processing by the Hugging Face parquet-converter?
What file structure should I use on the Hugging Face Hub, if I have a /train.zip archive with PNG image files and an /metadata.csv file with annotations for them, so that the parquet-converter bot can ...
0
votes
1
answer
57
views
Running Bash in Google Colab with three parameters (python, training)
I'm trying to run the below code to train a model. For some reason, it doesn't seem to be able to locate "my_file" (the second parameter).
I think it has to do with the file structure.
!bash ...
0
votes
2
answers
448
views
How to import images properly into an array in React
I have some images in my project folder and want to either use their relative links to show them in each respective array item.
I want to eventually use the image in a react component to show the ...
1
vote
1
answer
299
views
Having Python Files in an R package- Where do I put it?
I am working on a R package and for various reasons I need to write some code in Python.
For my current workflow I have the various scripts sitting in the root directory which I run in my various R ...
0
votes
1
answer
832
views
Different file-structure is created in my project than my tutor's , is that fine?
I have just begun to learn Next.js and the video I was learning from shows a different file structure after creating a Next.js project from mine.
In my tutor's video, in src folder there are separate ...
0
votes
2
answers
42
views
Import of another python function does not work
I have the following directory structure:
GNS
gns_export.py
new_structure
DB_Manager.py
and other Files that are not important.
When I now try to import a function from DB_manager.py in gns_export....
0
votes
1
answer
43
views
How can I get my Python script to work correctly with both normal execution and pytest?
I'm stuck on import issues while using pytest. My file structure looks like:
src/
| __init__.py
| main.py
| util.py
tests/
| __init__.py
| test_main.py
tox.ini
If I want to run main.py with something ...
0
votes
0
answers
70
views
Python local imports still not working: ModuleNotFoundError or ImportError
How can I import src/constants.py from within src/data/compute_embeddings.py?
Project structure
I have the following project structure:
.
├── data
│ └── raw
│ └── sample.xlsx
├── __init__.py
├─...
0
votes
2
answers
94
views
How to use source() in a .Rmd file when accessing code from multiple folders?
I've started to explore calling and reusing code snippets in various .Rmd projects. I'm running into issues though with the working directory not being able to access the correct files.
Take this file ...
1
vote
1
answer
97
views
GitHub API not creating directories correctly using Python
I'm using the Github API and Python to attempt to generate a file structure in a repository, but the directories aren't forming correctly. To authenticate and create the repository, I'm using the ...
0
votes
2
answers
4k
views
Accessing a folder outside the current folder for a file path in JS
I am a new JS programmer and am working on a game in HTML/JS. There is an inventory, and I need to have access to all the possible item assets in the root/inventoryAssets folder. I am wondering how to ...
2
votes
1
answer
1k
views
PDF file with two trailers?
If I analyse multiple PDF files with a hex editor, I see that all of them have two trailers.
That's possible if an object has changed or renewed (https://blog.idrsolutions.com/multiple-trailers-in-a-...
4
votes
1
answer
3k
views
Sass 7-1 Pattern using @use and @forward
What's the correct way of setting up a Sass 7-1 Pattern using @use and @forward?
Example:
Sass 7-1 Pattern
Files:
./scss/abstracts/_variables.scss
$main-color: #222222;
./scss/abstracts/_index.scss
@...
0
votes
1
answer
187
views
Iterate through subfolders in a specific order
At work we sometimes need to set up project folders with many subfolders, we try to keep them all consistent and so I'm trying to automate it. I want to be able to specify a folder structure and how ...
1
vote
2
answers
5k
views
How to list files inside folder using fetch?
I'm running live server extension as a mock backend for my project. So part of my program involves checking the database for all files inside a certain folder.
main folder
|
___ subfolder1
| ...
0
votes
1
answer
10k
views
ModuleNotFoundError: No module named 'src' (Python)
I know this question has been asked multiple times before although, even after using absolute paths I can't get past this import error
I want to import extensions from functions.py
functions.py
from ...
1
vote
2
answers
5k
views
How should BMP header look like?
I am trying to write a code to read a BMP file so I am trying to read BMP header(s). I am using a test image from some code library but it looks, like the structure doesn't correspond with the ...
0
votes
1
answer
741
views
Create folder structure based on a datetime list
I have a list of date in datetime format. This list has a range date between datetime(2018, 1, 1) to datetime(2020, 12, 31).
I iterate through this list using the following code:
for day in days:
...
1
vote
0
answers
798
views
How do I call a module from another module in Python?
I'm trying to organize my python files to keep everything neat and I'm trying to figure out how best to call one file from one module by another file in another module. I've seen various path ...
4
votes
2
answers
9k
views
ModuleNotFoundError even with __init__.py [duplicate]
I have a project with the following structure:
.
└── project
├── assignment01
| ├── __init__.py
| └── old_file.py
|
├── assignment02
| ├── __init__.py
...
-2
votes
2
answers
64
views
I cant access a class I defined from the main loop?
I have an extremely simple piece of code where I am calling a method that I defined, and it wont run because it says I haven't defined the method?
class Main {
public static void main(String[] args) ...
11
votes
1
answer
733
views
Icon is specified both as .xml file and as a bitmap
I recently set my Min SDK version to 26. I ran the code inspector to check for warnings and it asked me to move files in the mipmap-anydpi-v26 to a folder called just mipmap-anydpi, which I did.
...