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 argparse | |
import inspect | |
import eyed3 | |
import eyed3.id3 | |
def convertID3Encoding(audiofile, backup = False): | |
tag = audiofile.tag | |
if not tag: | |
return | |
for prop, value in inspect.getmembers(tag): |
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 amazon.paapi import AmazonAPI | |
import sys | |
if __name__ == "__main__": | |
amazon = AmazonAPI("ACCESS_KEY", "SECRET_KEY", "AFF_TAG","JP") | |
try: | |
products = amazon.get_items(item_ids=["4971633002005"], item_id_type="EAN") | |
except Exception as e: | |
print(e) |
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 datetime import datetime, timedelta | |
import subprocess | |
BUCKET = "" | |
TABLES = [ | |
{ "dest_table": "project:dataset.table", "start": "2019/03/01", "end": "2019/03/02" }, | |
] | |
def daterange(_start, _end): | |
for n in range((_end - _start).days): |
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 boto3 | |
import json | |
import os | |
from botocore.credentials import Credentials | |
from google.oauth2 import id_token | |
from google.oauth2 import service_account | |
import google.auth | |
import google.auth.transport.requests |
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
require "logger" | |
require 'pry-byebug' | |
require "google/cloud/dlp/v2" | |
include Google::Cloud::Dlp::V2 | |
ROW_SCAN_LIMIT = 10000 | |
# Doc: https://googleapis.dev/ruby/google-cloud-dlp-v2/latest/Google/Cloud/Dlp/V2.html | |
client = DlpService::Client.new |
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
require 'pry-byebug' | |
require 'app_store_connect' | |
private_key_str = ENV['PRIVATE_KEY'] | |
private_key = private_key_str.gsub('\n', "\n") | |
AppStoreConnect.config = { | |
issuer_id: ENV['ISSUER_ID'], | |
key_id: ENV['KEY_ID'], | |
private_key: private_key |
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
require "gnuplot" | |
# require 'gnuplot/multiplot' | |
require "csv" | |
require 'pry-byebug' | |
data = CSV.read('./data.csv', headers: true, return_headers: false) | |
all_data = [] |
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
# TODO: | |
# 1. gem install td-client | |
# 2. Set TD_API_KEY, TD_DATABASE | |
# 3. Prepare table_list.txt including table name list | |
# 4. Execute like this: ruby generate-schema.rb table_list.txt | |
require 'td-client' | |
DB = ENV["TD_DATABASE"] | |
TYPE_TABLE = { | |
"boolean" => "BOOLEAN", |
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
require 'aws-sdk-kinesis' | |
require 'pry-byebug' | |
class GetRecords | |
def initialize | |
@client = Aws::Kinesis::Client.new | |
end | |
def stream_name |
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
for d in ./*/; do ( cd "$d" && mogrify -resize 'x1200>' *.jpg ) done |
NewerOlder