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 | |
import argparse | |
from ftplib import FTP | |
host = 'HOSTNAME' | |
user = 'USERNAME' | |
passwd = 'PASSWORD' | |
parser = argparse.ArgumentParser( | |
description='Put a file to the FTP server.') |
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
#!/bin/python3 | |
from termcolor import colored | |
import os | |
import random | |
import sys | |
import time | |
def black_or_white(cell): | |
if cell > 0: |
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 sys import argv | |
from math import sqrt, pi, tan, atan2 | |
def mandelbrot(r, i): | |
limit = 256 | |
threshold = 1e10 | |
zr = 0.0 | |
zi = 0.0 | |
for n in range(limit): |
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
// Configurations of Visual Studio Code. | |
{ | |
//-------- Editor configuration -------- | |
// Controls the font family. | |
"editor.fontFamily": "源ノ角ゴシック Code JP", | |
// Controls the font size. | |
"editor.fontSize": 12, |
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
""" | |
A simple Paxos implementation for study. | |
""" | |
from collections import Counter | |
class Proposer: | |
def __init__(self, acceptors): | |
self.acceptors = acceptors |
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
#!/bin/sh | |
# | |
# Create a rootfs environment for chroot building. | |
# | |
# Requires | |
# - OS installing CDROM at the current directory, | |
# - the root authority. | |
# | |
# mount install cd |
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 python3 | |
""" | |
KdV equation solver | |
""" | |
from numpy import pi, cos, linspace, arange | |
from numpy.fft import rfft, irfft | |
# Constant in Zabusky & Kruskal (1965) |
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 python3 | |
from copy import deepcopy | |
from enum import Enum | |
from random import shuffle | |
class Simbol(Enum): | |
empty = 0 | |
maru = 1 | |
batu = 2 |
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 python3 | |
""" | |
Git interface to difflib.py | |
""" | |
import sys | |
import os | |
import time | |
import difflib | |
import re |
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
class SshClient { | |
SshClient(String user, String host, int port, int timeout) { | |
// ... | |
} | |
SshClient(String user, String host) { | |
this(user, host, 22, 60); | |
} | |
SshClient(String user, String host, int port) { |
OlderNewer