original source: https://medium.com/statuscode/dockercheatsheet-9730ce03630d
curl -sSL https://get.docker.com/ | sh
//Amazonの注文履歴をCSV形式にして出力するスクリプト | |
// | |
//以下のスクリプトを参考に作成されました。 | |
//http://moroya.hatenablog.jp/entry/2013/06/03/225935 | |
// | |
//CSVに成型しているのは14行目から定義されているformatEntryという関数なので、これを書き換えれば自由な書式で出力できます。 | |
(function(){ | |
// 各注文履歴をCSVフォーマットにして返す | |
var datePattern = new RegExp("(\\d{4})年(\\d{1,2})月(\\d{1,2})日"); |
#! | |
# Using aws s3 cp will require the --recursive parameter to copy multiple files. | |
aws s3 cp s3://myBucket/dir localdir --recursive | |
#The aws s3 sync command will, by default, copy a whole directory. It will only copy new/modified files. | |
aws s3 sync s3://mybucket/dir localdir | |
#Just experiment to get the result you want. | |
#You can combine --exclude and --include options to copy only objects that match a pattern, excluding all others. | |
aws s3 cp s3://mybucket/logs/ s3://mybucket2/logs/ --recursive --exclude "*" --include "*.log" |
original source: https://medium.com/statuscode/dockercheatsheet-9730ce03630d
curl -sSL https://get.docker.com/ | sh
# List unique values in a DataFrame column | |
# h/t @makmanalp for the updated syntax! | |
df['Column Name'].unique() | |
# Convert Series datatype to numeric (will error if column has non-numeric values) | |
# h/t @makmanalp | |
pd.to_numeric(df['Column Name']) | |
# Convert Series datatype to numeric, changing non-numeric values to NaN | |
# h/t @makmanalp for the updated syntax! |
# | |
# Original solution via StackOverflow: | |
# http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t | |
# | |
# | |
# Install via `conda` directly. | |
# This will fail to install all | |
# dependencies. If one fails, | |
# all dependencies will fail to install. |
#One workaround is to create clone environment, and then remove original one: | |
#(remember about deactivating current environment with deactivate on Windows and source deactivate on macOS/Linux) | |
conda create --name new_name --clone old_name --offline #use --offline flag to disable the redownload of all your packages | |
conda remove --name old_name --all # or its alias: `conda env remove --name old_name` | |
#There are several drawbacks of this method: | |
# time consumed on copying environment's files, | |
# temporary double disk usage. |
# To access kaggle datasets | |
!pip install kaggle | |
# Import data from Kaggle | |
# Colab's file access feature | |
from google.colab import files | |
# Retrieve uploaded file | |
uploaded = files.upload() |
#source https://www.kaggle.com/general/64962 | |
!pip install kaggle | |
#Authenticating with Kaggle API | |
from googleapiclient.discovery import build | |
import io, os | |
from googleapiclient.http import MediaIoBaseDownload | |
from google.colab import auth | |
auth.authenticateuser() driveservice = build('drive', 'v3') |