Convert RMarkdown (.Rmd) to JDF PDF Files with a VSCode devcontainer
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
import requests, json | |
#Notion's token and databaseId | |
token = 'XXX' | |
databaseId = 'XXX' | |
#Notion's headers | |
headers = { | |
"Authorization": "Bearer " + token, | |
"Content-Type": "application/json", |
If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.
This should fit most setups (not mine though 😉)
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
import json | |
import sys | |
# 도도 파이터에 참가하기 위해서는 에이전트를 만들어서 제출해 주셔야 합니다. | |
# 에이전트는 사용자가 작성하는 인공지능 코드로서, 주어지는 현재 게임 상태를 바탕으로 | |
# 어떤 액션을 취할지를 결정하는 역할을 합니다. | |
# | |
# 액션 설명 | |
# - idle - 아무것도 하지 않습니다. | |
# - forward - 앞으로 움직입니다. 상대가 바로 앞에 있을 경우 더 움직이지 않습니다. |
This is a sample script for copying values from JSON to a struct using reflect package.
package main
import (
"encoding/json"
"fmt"
See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.json
file in/etc/docker
:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.
- TCP port 2377 for cluster management & raft sync communications
- TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
- UDP port 4789 for "data plane" VXLAN overlay network traffic
- IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option
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 e(){if(typeof clocks!='undefined')return;var sokcuri="Sokcuri ServerTime";var url="https://gist.github.com/";var div=document.createElement('div');div.id="clocks";div.style.position='fixed';div.style.width='100%';div.style.top='0';div.style.height='150';div.style.pointerEvents='none';div.style.backgroundColor='rgba(200, 200, 200, 0.4)';div.innerHTML='서버시간을 얻어오는 중..';div.style.zIndex='99999';div.style.fontSize='40px';if(document.getElementsByTagName('body').length){document.body.appendChild(div);}else{document.head.outerHTML+=div.outerHTML;} function leadingZeros(n,digits){var zero='';n=n.toString();if(n.length<digits){for(i=0;i<digits-n.length;i++)zero+='0';} return zero+n;} var sec;var curr;var curr_sys;var cont=true;var nget=0;function getsrvTime(){delay=0;if(nget>=200) {clocks.innerHTML="서버시간을 얻어오는데 실패했습니다";return 0;} if(window.XMLHttpRequest){var req=new XMLHttpRequest();req.open('HEAD',window.location.href.toString()+'?&_='+new Date().getTime(),true);req.setRequestHeader("Content-Type","text/htm |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
NewerOlder