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
#!/usr/bin/python3 | |
import os | |
import tweepy | |
from traceback import print_exc, format_exc | |
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) | |
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET) | |
api = tweepy.API(auth) | |
me = api.me().screen_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
import tweepy | |
import requests | |
token = "" | |
slackURL = "https://slack.com/api/" | |
params = {'token': token, 'channel': '#random', 'text': '', 'as_user': 'true'} | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
ACCESS_TOKEN = "" | |
ACCESS_TOKEN_SECRET = "" |
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" | |
func main() { | |
var c int = 10 | |
hoge := func (a, b int) int { | |
return a + b + c | |
} | |
fmt.Println(hoge(2,3)) // 15 |
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
#!/usr/bin/env python | |
from PIL import Image, ImageDraw | |
import sys | |
import re | |
sourcefilename = sys.argv[1] | |
if len(sys.argv) > 2: | |
codelsize = int(sys.argv[2]) | |
else: | |
codelsize = 1 |
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
YOUR_ACCESS_TOKEN = 'INSERT YOUR ACCESS TOKEN' | |
import requests | |
import sys | |
if len(sys.argv) == 1: | |
print('ファイル名を指定してください') | |
sys.exit() | |
url = "https://upload.gyazo.com/api/upload" |
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
# coding: utf-8 | |
from html.parser import HTMLParser | |
import sys | |
text = sys.stdin.read() | |
output = '' | |
class TableToTSV(HTMLParser): | |
def initialize(self): | |
self.cols = [] |
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
#include <cstdio> | |
#include <vector> | |
#include <algorithm> | |
#include <random> | |
#include <string> | |
#define FOR(i,m,n) for(int i=m;i<(int)(n);i++) | |
#define REP(i,n) FOR(i,0,n) | |
#define ALL(v) (v).begin(),(v).end() | |
using namespace std; |
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 os | |
import random | |
import time | |
t = random.randint(200,500) | |
dur = 0 | |
bang = """ | |
____ | |
| | | |
| | |
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 PIL import Image | |
cols, rows = 2, 4 | |
linewidth = 10 | |
img = Image.open("input.png") | |
width, height = img.size | |
size = width*cols+linewidth, height*rows+(rows-1)*linewidth | |
output = Image.new("RGB", size, (0, 0, 0)) | |
for y in range(rows): | |
h = (height+linewidth)*y |
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
; refer the nth element of list) | |
(define (list-ref lst n) | |
(cond | |
((null? lst) "Out of range") | |
((= 0 n) (car lst)) | |
(else (list-ref (cdr lst) (- n 1))) | |
) | |
) | |
; Read string from input-port |