Skip to content

Instantly share code, notes, and snippets.

View wwj718's full-sized avatar

wwj718

View GitHub Profile
@wwj718
wwj718 / edx_my_sandbox_all.yml
Last active January 8, 2016 07:21
edx note
---
# Example sandbox configuration
# for single server community
# installs
- name: Configure instance(s)
hosts: all
sudo: True
gather_facts: True
@wwj718
wwj718 / cx_oracle.md
Created July 11, 2016 09:02 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@wwj718
wwj718 / 词性标记.md
Created August 5, 2016 09:50 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词

nr 人名

@wwj718
wwj718 / github.com.css
Last active August 20, 2016 13:30
github浏览器主题 (配合stylebot使用)
#commit-activity-detail path.path, .traffic-graph g.x.axis g.tick:first-child line {
stroke: #1DB34F ;
}
#contributions-calendar .contrib-details div, .mini-icon-remove-close:hover, .tabnav-tabs a, .time, .gist-item .metadata .datetime, .list-group-item-meta, a.keyboard-shortcuts, button.keyboard-shortcuts, .simple-conversation-list, .simple-conversation-list > li .title .num, .drag-and-drop, .starred-repo .sort-info, .org-stats, .commandbar .choice, .commandbar .loading, .commandbar .description, ul.summary-stats li a, .authorship, .sha-block, .gh-header-meta, #last-edit, .setup-header .lead a, .repository-meta .edit-link a, .api-status a, .meta li, .who_when a, .numbers-summary a, .numbers-summary .octicon:before, .section-heading-title .separator, .blog-aside .rss, .hook-list a, .github-jobs-promotion a.jobs-logo, .org-teams-list .team-meta, .repo-list-item .repo-description, .branch-infobar .lightweight-actions > li a, .repo-leaderboard-list .repo-leaderboard-meta-item a, .changed .moved-up:before, .
@wwj718
wwj718 / aiohttp_test.py
Created March 16, 2017 06:48
python3.5 async http requets
#!/usr/bin/env python
# encoding: utf-8
import aiohttp
import asyncio
'''
最简 异步 http请求
'''
@wwj718
wwj718 / aiohttp_test.py
Created March 16, 2017 06:48
python3.5 async http requets
#!/usr/bin/env python
# encoding: utf-8
import aiohttp
import asyncio
'''
最简 异步 http请求
'''
#!/usr/bin/env python
# encoding: utf-8
# 或者用这个 http://debugo.com/apscheduler/
import threading
import time
import schedule
class Task(threading.Thread):
# 作为整个类 类本身是线程
# 时间
@wwj718
wwj718 / client.py
Created March 24, 2017 11:37 — forked from marvin/client.py
simple python client/server socket binary stream
import socket
HOST = 'localhost'
PORT = 9876
ADDR = (HOST,PORT)
BUFSIZE = 4096
videofile = "videos/royalty-free_footage_wien_18_640x360.mp4"
bytes = open(videofile).read()
/*
http "http://pwnote.paperweekly.site/api/search?_separate_replies=true&limit=200&offset=0&order=asc&sort=created&uri=https://arxiv.org/pdf/1703.00573.pdf" "Authorization:Bearer 6879-XqkNxdWgJ_HQ1AN9OjiA_c7WWmgUvfnhtWIROKFYCZk"
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 2854
Content-Type: application/json; charset=UTF-8
Date: Wed, 29 Mar 2017 13:49:34 GMT
ETag: "UMUfVM/pkH5Ct3NYwKwXIA"
Referrer-Policy: origin-when-cross-origin
@wwj718
wwj718 / websocketd_test.html
Last active March 30, 2017 03:34
信息管道,把任何本地程序映射为websocket
<!DOCTYPE html>
<head></head>
<body>
<pre id="log"></pre>
<script>
// helper function: log message to screen
function log(msg) {
document.getElementById('log').textContent += msg + '\n';
}
// setup websocket with callbacks