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
#/bin/bash | |
# Set Params | |
k=YOUR_AWS_KEYS | |
s=YOU_AWS_SECRETE | |
r=YOUR_REGION | |
# Assign EIP ID | |
eip_id=eipalloc-XXXXXXX | |
# Install awscli |
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
#!/usr/bin/env bash | |
set -x -e | |
JUPYTER_PASSWORD=${1:-"myJupyterPassword"} | |
NOTEBOOK_DIR=${2:-"s3://myS3Bucket/notebooks/"} | |
# home backup | |
if [ ! -d /mnt/home_backup ]; then | |
sudo mkdir /mnt/home_backup | |
sudo cp -a /home/* /mnt/home_backup |
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
########## data proprocessing! | |
## download the file set from here: http://image.ntua.gr/iva/datasets/flickr_logos/ | |
## extract image to a folder flickrData | |
### copy files in the right directories | |
options(stringsAsFactors = F) | |
df <- read.csv("flickrData/flickr_logos_27_dataset_query_set_annotation.txt", sep="\t") |
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
git checkout --orphan onetime | |
git add -A | |
git commit -m "Initial commit" | |
git branch -D main | |
git branch -m main | |
git gc --aggressive --prune=all | |
git push -f origin main |
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
# pip install icrawler | |
from icrawler.builtin import GoogleImageCrawler | |
import argparse | |
if __name__=='__main__': | |
parser = argparse.ArgumentParser(description='Scrape some images.') | |
parser.add_argument('keywords', metavar = 'KEYWORDS', nargs = '+', | |
help='keywords to download images for') | |
parser.add_argument('-n', '--max-num', type = int, default = 10, |
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
[package] | |
name = "clap_prompt_example" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
clap = { version = "3.1", features = ["derive"] } | |
dialoguer = "0.10" |
OlderNewer