Skip to content

Instantly share code, notes, and snippets.

View motoy3d's full-sized avatar

Motoi Kataoka motoy3d

View GitHub Profile
@motoy3d
motoy3d / sql2sf.py
Created April 12, 2022 17:42 — forked from tamiroze/sql2sf.py
Converts Oracle, SQL-Server, and other DDL to Snowflake DDL
#!/usr/bin/python
# $Id: $
# Converts Oracle, SQL-Server, and other DDL to Snowflake DDL
def usage():
print """\
# Usage: sql2sf.py input-file [output-file]
"""
name: Cypress Tests
on:
push:
branches-ignore:
- "renovate/**"
jobs:
install:
runs-on: ubuntu-latest
@motoy3d
motoy3d / search_tweets.py
Last active June 27, 2021 12:26
Twitter API v2をPythonで使ってみる
# Twitter API v2のTweets countsで指定キーワードを含むツイートのリストを取得
# https://developer.twitter.com/en/docs/twitter-api/tweets/search/introduction
import json
import requests
import urllib.parse
import settings
# 検索条件
query = '一番搾り'
url = f'https://api.twitter.com/2/tweets/search/recent?query={urllib.parse.quote(query)}'
@motoy3d
motoy3d / test1.py
Last active November 17, 2021 09:48
pandasの処理速度検証
"""DataFrameでdatetime変換する時の速度比較. date formatなし vs date formatあり"""
import pandas as pd
import timeit
def read_csv_with_no_dateformat():
# 2列8760行のCSV
df = pd.read_csv('testdata.csv')
df['date_time'] = pd.to_datetime(df['date_time'])
def read_csv_with_dateformat():
FROM jrottenberg/ffmpeg
RUN apt-get update && apt-get install -y \
curl \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# aws cli v2 install
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install
@motoy3d
motoy3d / Dockerfile
Last active May 17, 2020 09:21
ffmpegイメージ
FROM jrottenberg/ffmpeg:4.1-ubuntu
RUN apt-get update
RUN apt-get install python3 python3-pip -y
# test
RUN pip3 install boto3
ADD getfile_s3.py /opt/getfile_s3.py
# transcoding by ffmpeg script
ADD transcode_job.sh /usr/local/bin/transcode_job.sh