Skip to content

Instantly share code, notes, and snippets.

@ndubey
ndubey / dataCollectionFilter.py
Created December 25, 2019 16:07
download and clean
import numpy as np
import tensorflow as tf
import cv2 as cv
from pathlib import Path
from send2trash import send2trash
from google_images_download import google_images_download
def downloadImages(keyword):
@ndubey
ndubey / dataCollection.py
Created December 25, 2019 14:53
Data Collection from Google
from pathlib import Path
from send2trash import send2trash
from google_images_download import google_images_download
def downloadImages(keyword):
response = google_images_download.googleimagesdownload()
arguments = { "keywords":keyword, "limit":50, "format":'jpg', "size":"medium", "print_urls": False,
"image_directory":'./'+keyword.lower()+'/'}
response.download(arguments)
#also download png format images
@ndubey
ndubey / .bash_profile
Created July 8, 2018 09:10 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ndubey
ndubey / AdbCommands
Last active August 11, 2021 21:55 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
# count number of bits set in binary representation doesn't work on negative numbers
print("Enter a positive integer in decimal form:")
num = int(input())
cnt = 0
while num != 0:
cnt += num&1
num = num>>1
print(num)