I hereby claim:
- I am wellls on github.
- I am bitstring (https://keybase.io/bitstring) on keybase.
- I have a public key ASBIqe0885hz69YQsP_sf-VJH3h1LfYCUSXBtqGF3v5r5Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
""" | |
Python implementation of text-mode version of the Tetris game | |
Quick play instructions: | |
- a (return): move piece left | |
- d (return): move piece right | |
- w (return): rotate piece counter clockwise |
sudo apt install build-essential checkinstall | |
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev | |
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz | |
tar -xzvf Python-3.6.4.tgz | |
cd Python-3.6.4/ | |
./configure --enable-optimizations | |
sudo make altinstall |
#! /usr/bin/env ruby | |
# encoding: utf-8 | |
require 'rack' | |
class MyMiddleware | |
def initialize(app) | |
@app = app | |
end |
import re | |
from asyncio import get_event_loop, ensure_future, sleep | |
from collections import deque | |
from concurrent.futures import ThreadPoolExecutor | |
import requests | |
from bs4 import BeautifulSoup | |
HEADERS = {'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) ' | |
'Chrome/55.0.2883.95 Safari/537.36'} |
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new
project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs
:
#define NALLOC 1024 /* minimum #units to request */ | |
typedef long Align; /* for alignment to long boundarg. 假定 long 类型为最受限的类型。*/ | |
/* 空闲块包含的内容: | |
* 一个指向链表中下一个块的指针 | |
* 一个块大小的记录 | |
* 一个指向空闲空间本身的指针 |
# -*- coding=utf-8 -*- | |
# -*- author: wellls -*- | |
from __future__ import division | |
from bs4 import BeautifulSoup | |
from bs4.element import ( | |
CharsetMetaAttributeValue, | |
Comment, | |
ContentMetaAttributeValue, | |
Doctype, |
# -*- author:wellls -*- | |
import re, os, glob, sys | |
rxcountpages = re.compile(r"/Type\s*/Page([^s]|$)", re.MULTILINE|re.DOTALL) | |
def count_pages(filename): | |
data = file(filename,"rb").read() | |
return len(rxcountpages.findall(data)) |
<!DOCTYPE html> | |
<!-- saved from url=(0028)https://hacpai.com/halt.html --> | |
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>发现一个问题</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="icon" type="image/png" href="https://hacpai.com/$%7BstaticServePath%7D/images/favicon.png"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<style> | |
html { |