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 sys | |
import random | |
ZUN = 'ズン' | |
DOKO = 'ドコ' | |
KIYOSHI = 'キヨシ!' | |
class ZunDoko(object): | |
def __init__(self): | |
self.words = list() |
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
# Add the following line to /etc/aliases | |
slack: |"/usr/bin/python /path/to/post-to-slack.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
import socket | |
import commands | |
import urllib | |
import urllib2 as urlrequest | |
import json | |
from datetime import datetime | |
SLACK_POST_URL = "https://hooks.slack.com/services/[TOKEN]" | |
def build_attachment(): |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName aho.baka.com | |
DocumentRoot /home/aho/public_html | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> | |
<Directory /home/aho/app/> |
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
description "Minecraft SemiAuto-Startup" | |
start on socket PROTO=inet PORT=25565 | |
stop on runlevel [06] | |
console log | |
chdir /home/minecraft/whatever | |
setuid minecraft | |
setgid minecraft | |
respawn |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdEfXyAQME2SXo7kUpUNq+pMpAm60fSNct0WKiRRXv1Z2HBT3VUKVH9aq2CYH+7wDQG8xrZmSu+gSSTy909nkEYJz8682ujdHLUwpnxKC3ADJZrmI5vWDqxlb8lv/Q7f3Kru6D4Z00qRQ5I/V8ycESyjfEd+X2SCsPwAvbINXfipSX2+8rwExDQ+Dy8C0ierOwqSZVDA34tBSFLD5Jnk337C2vLjPaSuVbxbhjjwRDwOwwqLh0eLGzquxOSI4aoZZksyvXH4CFU9+cinD+7MkFkkCumVTHjYDffIFNwb1I3uaWy2+w0Lew18niJhpjvxTDzKEgvqnOEWyDKen+etkT chris@lambo |
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 os | |
import sys | |
import json | |
from optparse import OptionParser | |
from PIL import Image | |
from pyocr import pyocr | |
from pyocr.builders import TextBuilder | |
def get_opt(): | |
parser = OptionParser() |
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
Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use. |
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 flask import Flask | |
from datetime import date | |
app = Flask(__name__) | |
app.config.update( | |
DEBUG=False, | |
) | |
@app.route('/') | |
def usage(): |
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
#!/usr/bin/env python | |
wavelength = input("Input the wavelength within 0.2~0.55um in um: ") | |
x = 0.389*wavelength + 0.09426/wavelength -0.3228 | |
sigma = 4.02 * 10**(-28) / wavelength**(4 + x) | |
lnAB = input("Input the value of lnAB : ") | |
N = lnAB/sigma | |
print "cross section sigma/cm^-2 is : ", sigma | |
print "density N/(number/cm^-2) is : ", N |
NewerOlder