sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev -y
sudo apt-get update
sudo apt install shadowsocks-libev
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:utf8 | |
import logging | |
from sqlalchemy import func | |
from collections import defaultdict | |
from itertools import combinations | |
from time import time | |
from datetime import datetime | |
from text_detector import check_similary_cos, remove_punctuation |
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
db.task_log.aggregate( | |
[ | |
{ | |
$match: { | |
"status": "1009", | |
} | |
}, | |
{ | |
$group: { | |
_id: "$source_id", |
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 csv | |
import requests | |
def save_pic(filename, content): | |
with open(filename, 'wb') as f: | |
f.write(content) |
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
{% extends "admin/change_list.html" %} | |
{% block object-tools-items %} | |
<script> | |
function export_file() { | |
var export_url = '/export'; | |
var url = window.location.href; | |
var params = url.split('?')[1]; | |
if (typeof(params) == undefined) { | |
export_url += '?' + params; | |
}; |
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
''' | |
functool中的total_ordring的练习 | |
total_ordring是用来补全比较方法的 | |
wraps是用来改变函数的显示 | |
partial是可以生成一个新的函数,这个函数的某个参数可以提前指定 | |
唉,不知道该怎么描述 | |
''' | |
import random | |
from functools import total_ordering, wraps, partial, partialmethod |
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
<html> | |
<body onload="guess_game();"> | |
<script> | |
var count = 0; | |
function guess_game() { | |
var colors = ['black', 'red','maroom', 'yellow','olive','lime','green']; | |
colors.sort() | |
var should_choose = Math.floor(Math.random() * colors.length); | |
var answer = ''; | |
while (true) { |
unzip instantclient-basic-linux-x86-64-11.2.0.2.0.zip
libclntsh.so -> libclntsh.so.11.1
libocci.so -> libocci.so.11.1
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
sudo mv /var/lib/dpkg/info/{packagename}.* /tmp/ | |
sudo dpkg --remove --force-remove-reinstreq {packagename} | |
sudo apt-get remove {packagename} | |
sudo apt-get autoremove && sudo apt-get autoclean |
NewerOlder