pip install PySimpleGUI
pip install Pillow
python image_manager.py
This file contains 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 icalendar import Calendar, Event, vDatetime | |
from datetime import datetime | |
FIN_OF_YEAR = '20220208T084500' | |
START_OF_SEMESTER = 10 #10月 | |
START_DAY = 4 #10月4日(月曜)からスタートの場合 | |
YEAR = 2021 | |
def addEvent(obj,cal): | |
event = Event() |
This file contains 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
function Getnow() { | |
var d = new Date(); | |
var y = d.getFullYear(); | |
var mon = d.getMonth() + 1; | |
var d2 = d.getDate(); | |
var h = d.getHours(); | |
var min = d.getMinutes(); | |
var s = d.getSeconds(); | |
var now = y+"/"+mon+"/"+d2+" "+h+":"+min+":"+s; | |
return now; |
This file contains 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
javascript:(function() { var arr = [ "a", "b" ] ; | |
var chr = arr[ Math.floor( Math.random() * arr.length ) ] ; | |
var min = 1 ; | |
var max = 230 ; | |
var ran = Math.floor( Math.random() * (max + 1 - min) ) + min ; | |
var num = ('0' + ran).slice(-3); | |
var newurl="https://atcoder.jp/contests/abc" + num + "/tasks/abc" + num + "_" + chr ; | |
var codetest_url="https://atcoder.jp/contests/abc" + num + "/custom_test"; | |
var urls=[newurl,codetest_url]; | |
for (var i = 0; |
This file contains 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
#!/bin/zsh | |
export LANG=C | |
while read row; do | |
column1=`echo ${row} | cut -d , -f 2` | |
echo "${column1}..." | |
say -v Yuri "${column1}" -o "${column1}.aiff" | |
ffmpeg -loglevel 0 -i "${column1}.aiff" "${column1}.mp3" | |
rm -f "${column1}.aiff" | |
# 環境設定>アクセシビリティ>読み上げコンテンツ>システムの声から好きなやつを選んでね | |
done < test.csv |
This file contains 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
#!/bin/bash | |
echo 問題番号を入力して実行: | |
read line | |
gcc q$line.c -o ./out/q$line && ./out/q$line |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css"> | |
<!-- npm install jqueryする場合はコメントアウトはずしてね --> | |
<!-- <script type="text/javascript" src="./node_modules/jquery/dist/jquery.min.js"></script> --> | |
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> |
This file contains 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 pdfminer.high_level import extract_text | |
import re | |
import requests | |
import datetime | |
import os | |
import time | |
def get_pdf(): | |
# pdfを保存するディレクトリを指定 | |
PDF_DIR ="./pdf/" |
This file contains 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, ImageDraw, ImageFont | |
import webcolors | |
def generate_img(height, width, text="sample", text_color="black", bg_color="gray"): | |
bg_color_hex = webcolors.name_to_hex(bg_color) | |
text_color_hex = webcolors.name_to_hex(text_color) | |
image = Image.new("RGB", (height, width), bg_color_hex) | |
# 画像に文字を入れる |
I hereby claim:
- I am nac-39 on github.
- I am nac_39 (https://keybase.io/nac_39) on keybase.
- I have a public key ASAvqHeqhmO44rK3nLMpXtRjOozZG3cuOpt81KkczU3e6Qo
To claim this, I am signing this object: