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
docker run --gpus=all -p 127.0.0.1:9000:8080 us-docker.pkg.dev/colab-images/public/runtime |
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
docker run -d --gpus all -v $(realpath ~/notebooks):/tf/notebooks -p 8888:8888 tensorflow/tensorflow:latest-gpu-jupyter |
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 python | |
# Code modified from https://cloud.google.com/dataflow/docs/samples/join-streaming-data-with-sql#expandable-3 | |
import datetime, json, os, random, time | |
# Set the `project` variable to a Google Cloud project ID. | |
project = 'GCP-PROJECT-ID' | |
BRANCH = ['LIM', 'BOG', 'SFO', 'LAX', 'PEK', 'ATL', 'CDG', 'AMS', | |
'HKG', 'ICN', 'FRA', 'MAD', 'SEA', 'LAS', 'SIN', 'BKK', 'DFW', |
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 config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
git config --global alias.sweep '!git branch --merged $([[ $1 != "-f" ]] \ | |
&& git rev-parse master) | egrep -v "(^\*|^\s*(master|develop)$)" \ | |
| xargs git branch -d' |
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
# สร้าง bucket | |
gsutil mb gs://[BUCKET] | |
# ลิสต์ files ใน bucket | |
gsutil ls gs://[BUCKET] | |
# ดูว่า bucket ขนาดเท่าไร (du: disk usage) | |
gsutil du -sh gs://[BUCKET] |
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
import json | |
import requests | |
from airflow.models import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.utils.dates import days_ago | |
URL = "https://api.coindesk.com/v1/bpi/currentprice/SGD.json" | |
DATASET_ID = "demo" |
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 python3 | |
""" | |
Development Version: Python 3.5.1 | |
Author: Benjamin Cordier | |
Description: Module For Performance | |
Assessment of Classification Task | |
License: BSD 3 Clause | |
-- |
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
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D BUILD_NEW_PYTHON_SUPPORT=ON \ | |
-D WITH_CUDA=ON \ | |
-D ENABLE_FAST_MATH=1 \ | |
-D WITH_FFMPEG=ON \ | |
-D CUDA_FAST_MATH=1 \ | |
-D WITH_CUBLAS=1 \ | |
-D WITH_MKL=ON \ | |
-D MKL_USE_MULTITHREAD=ON \ |
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
# Create a new Bucket | |
gsutil mb gs://[BUCKET] | |
# List files in bucket | |
gsutil ls gs://[BUCKET] | |
# Check bucket usage (du: disk usage) | |
gsutil du -sh gs://[BUCKET] | |
# Copy (upload) file to bucket |
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 | |
sudo whoami | |
sudo apt update | |
sudo apt -y upgrade | |
sudo apt install -y openssh-server neovim net-tools nfs-common cifs-utils | |
sudo apt install -y curl git python3-pip gcc cmake nmap |
NewerOlder