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 pathlib import Path | |
| from pypdf import PdfWriter | |
| pdfs = sorted(str(x) for x in Path(".").glob("*.pdf") if str(x) != "full.pdf") | |
| merger = PdfWriter() | |
| for pdf in pdfs: | |
| print(pdf) | |
| merger.append(pdf) | |
| merger.write("full.pdf") |
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
| tensorboard_slurm() { | |
| local port="$1" | |
| local exp_path="$2" | |
| local session_tag="tensorboard_$(date +%s)" | |
| if [[ -z "$port" || -z "$exp_path" ]]; then | |
| echo "Usage: tensorboard_slurm <port> <path_to_experiment>" | |
| return 1 | |
| fi |
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 collections import defaultdict | |
| import pkgutil | |
| import os | |
| import matplotlib as mpl | |
| import matplotlib.pyplot as plt | |
| from cycler import cycler | |
| mpl.rcParams["axes.prop_cycle"] = cycler(color=["#648fff", "#785ef0", "#dc267f", "#fe6100", "#FFB000", "#648fff", "#dc267f", "#000000"]) | |
| def _size_count(fname): |
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 matplotlib.pyplot as plt | |
| import numpy as np | |
| fig = plt.figure(figsize=(5, 5)) | |
| ax = fig.add_subplot(projection='3d') | |
| k = 500 | |
| z = np.arange(0, k) | |
| ax.scatter( |
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
| requests | |
| beautifulsoup4 |
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
| # ~/.config/systemd/user/arxiv_bot.service | |
| [Unit] | |
| Description=Slack Arxiv Bot | |
| [Service] | |
| ExecStart=VENV_PATH RUN_PY_PATH | |
| WorkingDirectory=DIR_PATH | |
| Restart=always |
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 requests | |
| quiz_id = '1' | |
| score = 18 | |
| name = 'test name 11' | |
| headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'} | |
| r = requests.get('https://grandedesafio.com/ko/quiz/' + quiz_id, headers=headers) | |
| idx = r.text.find('<input id="key"') | |
| key = r.text[idx+23:] |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> | |
| <script src="https://unpkg.com/vue/dist/vue.js"></script> | |
| <script src="https://unpkg.com/axios/dist/axios.min.js"></script> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> |
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
| asgi-redis==1.0.0 | |
| asgiref==1.0.0 | |
| attrs==15.2.0 | |
| autobahn==0.17.1 | |
| blinker==1.3 | |
| channels==1.0.2 | |
| chardet==2.3.0 | |
| cloud-init==0.7.8 | |
| command-not-found==0.3 | |
| configobj==5.0.6 |
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
| for i in * | |
| do | |
| if $( file -i "${i}"|grep -q iso-8859-1 ); then | |
| iconv -f euc-kr -t utf-8 "$i" -o "out/${i}" | |
| fi | |
| done |
NewerOlder