Skip to content

Instantly share code, notes, and snippets.

View sakakendo's full-sized avatar
🌴
On vacation

sakakendo

🌴
On vacation
View GitHub Profile
# coding: utf-8
# Your code here!
# coding: utf-8
# Your code here!
gval=20
class hello:
val=10
global gval
import Tkinter
w=h=50
root=Tkinter.Tk()
root.geometry('500x500')
def color2hex(rgb):
ih=list('0123456789abcdef')
#print(ih)
color='#'
@sakakendo
sakakendo / in2str2int.py
Created February 18, 2018 04:55
int to strings to str converter for 2017.meister
>>> pwm=[0,90,0,90,0,90,0]
>>> pwm_str=map(str,pwm)
>>> mes=','.join(pwm_str)
# '0,90,0,90,0,90,0'
send(mes)
#receive-side program
>>> pwm=map(int,mes.split(','))
>>> for i in map(int,received_pwm_list):

pr2 recrusive downloader

this program not support recrusive mkdir,so you should mkdir Downloads/Documents manually.
not support css installer ,so you should download Downloads/Assignment/b01.css manually.

thanks to reference sources :github.com/sun-yryr/bot

import requests,os,shutil
from bs4 import BeautifulSoup
url = {
"pass": "https://nittc.tokyo-ct.ac.jp/xythoswfs/webui/_xy-e4168359_7-t_C5zhSCja",
"pr2_base":"https://nittc.tokyo-ct.ac.jp/usr/kitakosi/LEE/PracProgII/",
"pr2":"https://nittc.tokyo-ct.ac.jp/usr/kitakosi/LEE/PracProgII/PracProgII_TOP.html"
}
req = requests.session()
@sakakendo
sakakendo / README.md
Last active February 2, 2018 13:01
auto uploader for pracprog

how to use

Identify some valiables

make public your repository,and you should make list.txt . please refer to the following repository https://github.com/sakakendo0321/pr

set execution frequency of the uploader.sh in crontab

server-side settings

export FLASK_DEBUG=1

client-side settings

upload file

show uploaded file lists

show uploaded file

@sakakendo
sakakendo / .vimrc
Last active June 21, 2017 15:17
light vimrc for Bash on Windows
"Bash on Windows
"swap fileを作らない
set noswapfiles
set nobackup
"行数の表示
set number
set cursorline
" 基本コンセプト
"
" * mac/win/linux環境依存しない
" * 自分以外の人が触っても混乱しないようにする(rootで複数人が使う場合などに配慮)
" * プラグインは極力使わない(プロダクションサーバーに入れたくない)
" * プラグイン強化するくらいならその分vimの標準操作を速くできるように指を鍛えるw
" * tips混じってるけど気にしない
"
"-------基本設定--------
"タイトルをバッファ名に変更しない
#Bash on Windows
set noswapfiles
set number