Lemma 23. The following statements about divisibility hold.
- If
$a\mid b$ , then$a\mid bc$ for all$c$ .- If
$a\mid b$ and$b\mid c$ , then$a\mid c$ .
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
{-# OPTIONS_GHC -O2 -optc-O2 #-} | |
import Control.Monad | |
import Text.ParserCombinators.Parsec | |
import Control.Monad.State | |
import Data.Array.IO | |
import Data.Char | |
import Debug.Trace | |
data Stmt = INCPNT | DECPNT | INC | DEC | OUTPUT | READ | |
| Loop [Stmt] |
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
ref: http://www'iwriteiam'nl/Ha_bf_intro'html | |
>++++++++++[<++++++++++>-] (#0=100) | |
>+++++++[<+++++++>-]+++++++++++<--< (#1=47 #2=11) | |
[ (loop #0) | |
>+ (inc #1) | |
>- (dec #2) | |
(test if #2 is 0 using #3 #4) | |
[>+>+<<-] >[<+>-] (move #2 to #3 #4; move #3 to #2) |
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/bash | |
MAC="00:"`echo $RANDOM | md5 | sed 's/\(..\)/&:/g' | cut -c1-14` | |
MAC2="00:"`echo $RANDOM | md5 | sed 's/\(..\)/&:/g' | cut -c1-20` | |
echo $MAC | |
ifconfig en0 ether $MAC | |
ifconfig en1 ether $MAC | |
ifconfig fw0 lladdr $MAC2 |
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, urllib2 | |
import random | |
import re | |
from xml.dom import minidom | |
# Levenshtein Distance | |
def lev(first, second): | |
"""Find the Levenshtein distance between two strings.""" | |
if len(first) > len(second): |
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
{"\u8000": "5069", "\u6d89": "3195", "\u8c08": "6151", "\u4f0a": "0122", "\u4e9f": "0069", "\u6d1e": "3159", "\u7322": "3724", "\u60ab": "1952", "\uff2a": "9883", "\u6cb3": "3109", "\u4e34": "5259", "\u72b7": "3755", "\u5438": "0705", "\u5a3c": "1233", "\u7ebf": "4848", "\u53cd": "0646", "\u724c": "3654", "\u96cf": "7176", "\u59d1": "1196", "\u7850": "8943", "\u9cd3": "5016", "\u5362": "4151", "\u77e5": "4249", "\u9664": "7110", "\u5f6a": "1753", "\u95f9": "7593", "\u5eff": "9824", "\u8986": "6010", "\u8f8a": "6547", "\u5e94": "2019", "\u881b": "5864", "\u8e1f": "6442", "\u5121": "8079", "\u76a4": "4115", "\u5d29": "1514", "\u82ac": "5358", "\u51b6": "0396", "\u9abc": "7547", "\u8d49": "6336", "\u6e5f": "3207", "\u8dde": "6491", "\u56e4": "0937", "\u5ce8": "1494", "\u62ec": "2161", "\u68f0": "2774", "\u8c73": "6279", "\u6ef4": "3336", "\u987b": "7312", "\u5b7d": "5642", "\u9e7f": "7773", "\u7f2a": "4924", "\u6c89": "3089", "\u4e0a": "0006", "\u728d": "3682", "\u540e": "0683", "\u7891": "4301", "\u9910": "7404 |
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 scalas | |
!# | |
/*** | |
libraryDependencies ++= Seq( | |
"org.apache.commons" % "commons-lang3" % "3.1", | |
"com.github.scopt" %% "scopt" % "2.1.0" | |
) | |
resolvers += "sonatype-public" at "https://oss.sonatype.org/content/groups/public" |
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 | |
# coding: utf-8 | |
import json | |
import urllib2 | |
from os import system, popen | |
# generate speech audio file with 'say' in osx and ffmpeg | |
words = 'Hello world.' | |
system('say "{}" -o say.aiff'.format(words)) | |
system('ffmpeg -i say.aiff say.flac -loglevel quiet -y') |
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 | |
# ref: https://github.com/FanfouAPI/FanFouAPIDoc/wiki/Oauth | |
# http://open.weibo.com/wiki/OAuth | |
import os | |
import json | |
import random | |
import requests | |
import webbrowser | |
from time import time | |
from urllib import quote_plus |
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 | |
from __future__ import unicode_literals | |
import re | |
import sys | |
import requests | |
import HTMLParser | |
cookie_t = '' | |
uid = '' | |
filename = '' |
OlderNewer