This file contains hidden or 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 | |
| PROJECT_ID=xxx | |
| DATASET=xxx | |
| KEEP_TABLES=("table0" "table1") | |
| bq ls -n 1000 --project_id "$PROJECT_ID" "$DATASET" | awk 'NR>2 {print $1}' | while read TABLE; do | |
| KEEP=false | |
| for KEEP_TABLE in "${KEEP_TABLES[@]}"; do |
This file contains hidden or 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 main | |
| import ( | |
| "fmt" | |
| "go/types" | |
| "log" | |
| "golang.org/x/tools/go/loader" | |
| ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 numpy as np | |
| # Periodic boundary conditions 2D | |
| a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) | |
| print(a) | |
| # 5: 2, 8, 4, 6 | |
| i, j = 1, 1 | |
| print(f"{a[i, j]}'s nearest neighbor" ) | |
| print(a[i-1, j], a[i+1, j], a[i, j-1], a[i, j+1]) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| from dataclasses import dataclass | |
| import tensorflow as tf | |
| # https://www.tensorflow.org/tutorials/quickstart/advanced | |
| @dataclass | |
| class NeuMF: | |
| n_user: int | |
| n_item: int | |
| params: dict |
This file contains hidden or 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
| FROM google/cloud-sdk:latest | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PYTHONHASHSEED=14 | |
| WORKDIR /app/src | |
| # python3 | |
| RUN apt-get update \ | |
| && apt-get install -y python3-pip python3-dev python3-venv python3-wheel \ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| # codinf: utf-8 | |
| import boto3 | |
| from boto3.session import Session | |
| BUCKET = 'bucket' | |
| PATHS = ['data/test.csv'] | |
| session = Session( | |
| aws_access_key_id='', | |
| aws_secret_access_key='', |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder