Skip to content

Instantly share code, notes, and snippets.

Yuiki Yuiki

Block or report user

Report or block Yuiki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .vimrc
set clipboard&
set smartindent
set shiftwidth=2
set tabstop=2
set expandtab
syntax on
View keybase.md

Keybase proof

I hereby claim:

  • I am yuiki on github.
  • I am yuiki (https://keybase.io/yuiki) on keybase.
  • I have a public key ASBcalVwx7aMThT5Pk3UhLEd1B9_23pe5DrLPDDU0mB_ago

To claim this, I am signing this object:

@Yuiki
Yuiki / core.py
Created Aug 26, 2018
Play YouTube on Chrome Cast
View core.py
import pychromecast
from pychromecast.controllers.youtube import YouTubeController
CAST_NAME = ""
VIDEO_ID = ""
chromecasts = pychromecast.get_chromecasts()
cast = next(cc for cc in chromecasts if cc.device.friendly_name == CAST_NAME)
cast.wait()
@Yuiki
Yuiki / gpa2.py
Last active Mar 3, 2018
授業料免除用成績平均値算出 https://gist.github.com/Yuiki/d2394e18a424f17f26b3124a3f4ff8ba の改変なのでGPAと表記していますがあしからず
View gpa2.py
import csv
import sys
argv = sys.argv
if (len(argv) != 2):
print("Usage: python3 {} gpa.csv".format(argv[0]))
quit()
total_amount = 0
@Yuiki
Yuiki / gpa.py
Last active Mar 3, 2018
筑波大のGPA計算
View gpa.py
import csv
import sys
argv = sys.argv
if (len(argv) != 2):
print("Usage: python3 {} gpa.csv".format(argv[0]))
quit()
total_amount = 0
@Yuiki
Yuiki / tsukuba_rent_checker.py
Last active Dec 7, 2017
使い捨てコードのため、殴り書き
View tsukuba_rent_checker.py
from bs4 import BeautifulSoup
import requests
import unicodedata
url = "https://tsukuba-daigaku.com/?bukken=jsearch&shu=2&kalc=0&kahc=0&mad%5B%5D=110&mad%5B%5D=120&tik=0&cor=0"
districts = {}
count = 0
for i in range(0, 40):
request = requests.get(url)
soup = BeautifulSoup(request.text, "html.parser")
@Yuiki
Yuiki / twiacc.sh
Created Nov 19, 2017
空きアカウントを探す
View twiacc.sh
#!/bin/bash
for i in {a..z}
do
for j in {a..z}
do
command="curl -I https://twitter.com/yuiki${i}${j} -o /dev/null -w '%{http_code}\n' -s"
code=$(eval $command)
if [ $code = "404" ]; then
echo yuiki${i}${j}
@Yuiki
Yuiki / tweet.py
Created Oct 23, 2017
#コンテンツ応用論2017 で30ツイートつぶやくやつ
View tweet.py
import tweepy
from datetime import datetime, timezone
# ここらへん入れてね
auth = tweepy.OAuthHandler('', '')
auth.set_access_token('', '')
api = tweepy.API(auth)
tag = '#コンテンツ応用論2017'
@Yuiki
Yuiki / search.py
Created Oct 23, 2017
#コンテンツ応用論2017 のTweetを追う
View search.py
import tweepy
# ここらへん入れてね
auth = tweepy.OAuthHandler('', '')
auth.set_access_token('', '')
api = tweepy.API(auth)
tag = '#コンテンツ応用論2017'
class SearchStreamListener(tweepy.StreamListener):
def on_status(self, status):
@Yuiki
Yuiki / gen_java_class_by_json.py
Last active Sep 26, 2017
JSON形式のAPIレスポンスからJavaクラスを生成(書き殴り)
View gen_java_class_by_json.py
import json
class JavaClass:
def __init__(self, name):
self.name = name
self.fields = dict()
def add_field(self, java_type, name):
self.fields[name] = java_type
You can’t perform that action at this time.