Skip to content

Instantly share code, notes, and snippets.

View crapthings's full-sized avatar
😎
🇰🇵我们晚上去

crapthings crapthings

😎
🇰🇵我们晚上去
View GitHub Profile

基础

查看所有三元组

SELECT * WHERE {
  ?subject ?predict ?object .
}

'?' 代表 变量

@crapthings
crapthings / gist:9654f57baade63f3ec200a0ab7358073
Created August 14, 2018 02:16
How do I change the Docker image installation directory
https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169
中华人民共和国专利法
中华人民共和国专属经济区和大陆架法
中华人民共和国个人所得税法
中华人民共和国个人独资企业法
中华人民共和国中国人民银行法
中华人民共和国中外合作经营企业法
中华人民共和国中外合资经营企业所得税法
中华人民共和国中外合资经营企业法
中华人民共和国中小企业促进法
中华人民共和国义务教育法
@crapthings
crapthings / gist:d60536b69357e2108ce93144338f8d30
Created October 16, 2018 06:28
法律相关词条 hanlp
中华人民共和国专利法 nz 1000
中华人民共和国专属经济区和大陆架法 nz 1000
中华人民共和国个人所得税法 nz 1000
中华人民共和国个人独资企业法 nz 1000
中华人民共和国中国人民银行法 nz 1000
中华人民共和国中外合作经营企业法 nz 1000
中华人民共和国中外合资经营企业所得税法 nz 1000
中华人民共和国中外合资经营企业法 nz 1000
中华人民共和国中小企业促进法 nz 1000
中华人民共和国义务教育法 nz 1000
决议
决定
命令(令)
公报
公告
通告
意见
通知
通报
报告
This file has been truncated, but you can view the full file.
#define
#endif
#if
#ifdef
#ifndef
#import
#include
#pragma
%d
++i

1 - Get an Ubuntu machine up and running (make sure ports 11011 and 4000 are open)

2 - Install docker + docker-compose (full_install_docker_compose.sh)

3 - Get a docker-compose.yml with mongodb, kadira-ui, kadira-engine and kadira-rma (docker-compose.yml)

3 - Run "sudo docker-compose up" (-d if you want it running on background)

4 - Access http://machineIp:4000 and login as "admin@gmail.com" and "admin" password

5 - Create your APP, get the ID and Secret

6 - Setup kadira in your app by code or settings.json (Config)

7 - Update your app from "free" plan to "paid" to get full access at Kadira ([Update App Plan](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-changepl

import cv2
import numpy as np
def rectify(h, l):
h = h.reshape((l, 2))
hnew = np.zeros((4, 2), dtype = np.float32)
add = h.sum(1)
hnew[0] = h[np.argmin(add)]
hnew[2] = h[np.argmax(add)]
diff = np.diff(h, axis = 1)
import cv2
import numpy as np
def rectify(h, l):
h = h.reshape((l, 2))
hnew = np.zeros((4, 2), dtype = np.float32)
add = h.sum(1)
hnew[0] = h[np.argmin(add)]
hnew[2] = h[np.argmax(add)]
diff = np.diff(h, axis = 1)
@crapthings
crapthings / a-mongodb-replica-set-docker-compose-readme.md
Created July 5, 2019 01:28 — forked from harveyconnor/a-mongodb-replica-set-docker-compose-readme.md
MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume

This will guide you through setting up a replica set in a docker environment using.

  • Docker Compose
  • MongoDB Replica Sets
  • Mongoose
  • Mongoose Transactions

Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!