A Pen by Shivam Chawla on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This code finds the md5 sum of all files present in a folder. | |
It assumes the path is valid. | |
''' | |
import os | |
import hashlib | |
path=r"I:\shivam\big_dataset" | |
def md5(fname): | |
hash_md5 = hashlib.md5() | |
with open(fname, "rb") as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
ImageDir: all the images to bre resized are in this directory | |
SaveDir: resized images to be saved in this directory | |
TargetSize: New size of the images | |
''' | |
from PIL import Image | |
def resize(ImageDir,SaveDir,TargetSize): | |
p=os.getcwd() | |
os.chdir(ImageDir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convert all the images in a given folder in a numpy folder. | |
Additionally a stats dict is given out where keys are the the image shape and the values are the number of images belonging to that image | |
""" | |
import numpy as np | |
import os | |
from PIL import Image | |
def ConvertImagesToNumpyArray(Path): | |
folder=[] | |
stats={} |
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
- Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any
*nix
based command prompt (but not the default Windows Command Prompt!) - Type
cd ~/.ssh
. This will take you to the root directory for Git (LikelyC:\Users\[YOUR-USER-NAME]\.ssh\
on Windows) - Within the
.ssh
folder, there should be these two files:id_rsa
andid_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Typels
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be namedid_rsa
andid_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default. - To create the SSH keys, type
ssh-keygen -t rsa -C "[email protected]"
. Th
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tasks": [ | |
{ | |
"type": "cppbuild", | |
"label": "C/C++: g++.exe build active file", | |
"command": "C:\\msys64\\mingw64\\bin\\g++.exe", | |
"args": [ | |
"-static-libstdc++", | |
"-fdiagnostics-color=always", | |
"-g", |
- Open Command Prompt.
- Run
g++ --version
. - If the output contains g++ version number then GCC should be set up properly to run from command line and you can continue.
- open MSYS2 MINGW32
- install boost by using the command
pacman -S mingw-w64-x86_64-boost