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 BaseHTTPServer | |
import SimpleHTTPServer | |
class DownloadHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def send_head(self): | |
"""Common code for GET and HEAD commands. |
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
package com.example | |
import android.content.BroadcastReceiver | |
import android.content.Context | |
import android.content.Intent | |
import android.telephony.PhoneStateListener | |
import android.telephony.ServiceState | |
import android.telephony.TelephonyManager | |
import kotlin.properties.Delegates | |
import kotlinLib.* |
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
package com.example | |
import android.app.Activity | |
import android.os.Bundle | |
import android.widget.MediaController | |
import android.widget.VideoView | |
class VideoViewActivity(): Activity() { | |
class object { | |
val TAG = javaClass<VideoViewActivity>().getSimpleName() |
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 random | |
MAP = { | |
('가위', '가위'): 0, | |
('가위', '바위'): -1, | |
('가위', '보'): 1, | |
('바위', '가위'): 1, | |
('바위', '바위'): 0, | |
('바위', '보'): -1, | |
('보', '가위'): -1, |
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
# coding: utf-8 | |
def parse(bin): | |
raw_blocks = [] | |
block = [] | |
for line in bin.splitlines(): | |
line = line.strip() | |
if line.startswith('*'): |
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
# coding: utf-8 | |
import re | |
from sqlalchemy import cast, literal | |
from sqlalchemy.dialects.postgresql import array | |
from sqlalchemy.types import SchemaType, TypeDecorator, Enum | |
from sqlalchemy.util import set_creation_order, OrderedDict | |
from psycopg2._psycopg import new_type, new_array_type, register_type | |
class DeclarativeEnum(object): |
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
#!/bin/sh | |
INTERPRETERS=( python2.5 python2.7 python3.4 ) | |
if [ 1 -eq $# ]; then | |
script_path=$1 | |
tempfiles=() | |
for interpreter in ${INTERPRETERS[@]}; do | |
tempfile=`mktemp -t ""` |
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
# coding: utf-8 | |
import urllib | |
from BeautifulSoup import BeautifulSoup, NavigableString | |
class AssemblyParser(object): | |
def __init__(self, url): | |
self.url = url | |
html = urllib.urlopen(url).read() | |
self.soup = BeautifulSoup(html) |
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
package com.example; | |
import android.content.Context; | |
import android.graphics.Typeface; | |
import android.util.AttributeSet; | |
import android.widget.TextView; | |
public class AxisjTextView extends TextView { | |
public AxisjTextView(Context context) { | |
super(context); |
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 unittest | |
class SampleTestCase(unittest.TestCase): | |
def setUp(self): | |
pass | |
def setDriver(self, driver): | |
self.driver = driver | |
def test_default_size(self): |
OlderNewer