Skip to content

Instantly share code, notes, and snippets.

@zweite
zweite / impression
Created November 2, 2020 12:06
hawkeye
CREATE TABLE impression_attribution (
clickId varchar PRIMARY KEY,
timestamp timestamp,
date int,
time int,
advertiserId int,
appId int,
platform varchar,
packageName varchar,
bundleId varchar,
name: "mtg-trade-network"
description: "The network that has all the configuration parameters"
version: 1
client:
organization: org1
logging:
level: info
server:
http:
listen_addr: ":9090"
allowed_networks: ["10.0.0.0/8", "172.0.0.0/8"]
users:
- name: "default"
to_cluster: "default"
to_user: "default"
<?xml version="1.0"?>
<!--
NOTE: User and query level settings are set up in "users.xml" file.
-->
<yandex>
<logger>
<!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
<level>trace</level>
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
adb shell
//电源键
adb shell input keyevent 26
//菜单键
adb shell input keyevent 82
//home键
adb shell input keyevent 3
//返回键
adb shell input keyevent 4
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# 百度翻译
import requests
import json
import random
import md5
import httplib
package main
import (
"bytes"
"crypto/cipher"
"crypto/des"
"encoding/base64"
)
type Decrypter struct {
@zweite
zweite / gist:e7618cfc039b19ba161d5e32ca2a16ca
Created May 27, 2017 02:25 — forked from andresbott/gist:b5586fadc36ba46fdac1
Solve mppe_compress[0]: osize too small! (have: 1408 need: 1412)
taken from: http://danielsokolowski.blogspot.com.es/2013_04_01_archive.html
This due to the way MPPE Microsoft point-to-point Encryption encodes data which results in the packet size being bigger then what was agreed in the VPN handshake - is my guess. There is a reported bug from 2005 which sadly hast not yet been addressed.
Fixing the issue by increasing the MTU
You can't fix this issue by modifying the MTU/MRU settings in '/etc/ppp/options' directly, you have to adjust the MTU after the PPP connection is up and this can be accomplished by adding a custom 'ip-up' script.
Below is my workaround script, place it into file '/etc/ppp/ip-up.d/mppefixmtu' and ensure that it is executable ('chmod +x mppefixmtu'):
#!/bin/sh
CURRENT_MTU="`ifconfig $1 | grep -Po '(?<=MTU:)([0-9]+)'`"
"""
web.py - specify address and port
"""
import web
class MyApplication(web.application):
def run(self, port=8080, *middleware):
func = self.wsgifunc(*middleware)
return web.httpserver.runsimple(func, ('0.0.0.0', port))
@zweite
zweite / 词性标记.md
Created April 18, 2017 01:40 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

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

ICTPOS3.0词性标记集

n 名词

nr 人名