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
# -*- coding: utf-8 -*- | |
import sys | |
from benchmarker import Benchmarker | |
import main | |
from rchk.utils.simple_crypto import encrypt, decrypt | |
from rchk.utils import scrumble_uint32 |
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 | |
### | |
### pydiet.sh -- remove unnecessary files from Python directory interactively | |
### | |
### Feature: | |
### * remove test script files (ex: python2.7/test/*) | |
### * remove *.pyo files (ex: python2.7/**/*.pyo) | |
### * remove *.opt-[12].pyc files (Python 3.5 or later) | |
### |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# -*- coding: utf-8 -*- | |
""" | |
SQLAlchemy example code. | |
Requirements: | |
* Python3 | |
* PostgreSQL | |
* SQLAlchemy |
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
# -*- coding: utf-8 -*- | |
import sys | |
import numpy as np | |
class Perceptron(object): | |
"""Perceptron classifier. | |
Parameters |
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
# -*- coding: utf-8 -*- | |
#from ch02_1 import Perceptron | |
from perceptron import Perceptron, Perceptron2 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
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
# -*- coding: utf-8 -*- | |
## | |
## 参考: 「Python機械学習プログラミング」 | |
## | |
## 注: 事前にCSVファイルをダウンロードしておくこと | |
## $ wget https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data | |
## | |
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
# -*- coding: utf-8 -*- | |
## license: public domain | |
import re | |
URLPATH_PARAM_PATTERN = r'<(\w+)(?::(.*?))?>' | |
re_escape = lambda s: re.escape(s).replace(r'\/', '/') |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ah</key> | |
<string>ニョ</string> | |
<key>ai</key> | |
<string>ヌ</string> | |
<key>aj</key> | |
<string>ナ</string> |
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
# -*- coding: utf-8 -*- | |
from datetime import date, timedelta | |
class Calendar(object): | |
def __init__(self, year, month): | |
self.year = year | |
self.month = month |