const nodersa = require('node-rsa')
const axios = require('axios')
const express = require('express')
const server = express()
const PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----YOUR KEY HERE-----END PRIVATE KEY-----"
const key = new nodersa(PRIVATE_KEY, 'pkcs8-private-pem', { encryptionScheme: 'pkcs1' })
This file contains 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
const parser = str => { | |
let ops = [] | |
let method, arg | |
let isMethod = true | |
let open = [] | |
for (const char of str) { | |
// skip whitespace | |
if (char === ' ') continue |
This file contains 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
wait && mongo --host mongo1 --port 27017 --eval "rs.initiate({ _id: 'rs0', members: [{ _id: 0, host: 'mongo1:27017' }, { _id: 1, host: 'mongo2:27017' }, { _id: 2, host: 'mongo3:27017' } ] })" |
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!
This file contains 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
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) |
This file contains 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
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) |
This file contains 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
决议 | |
决定 | |
命令(令) | |
公报 | |
公告 | |
通告 | |
意见 | |
通知 | |
通报 | |
报告 |
This file contains 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
中华人民共和国专利法 nz 1000 | |
中华人民共和国专属经济区和大陆架法 nz 1000 | |
中华人民共和国个人所得税法 nz 1000 | |
中华人民共和国个人独资企业法 nz 1000 | |
中华人民共和国中国人民银行法 nz 1000 | |
中华人民共和国中外合作经营企业法 nz 1000 | |
中华人民共和国中外合资经营企业所得税法 nz 1000 | |
中华人民共和国中外合资经营企业法 nz 1000 | |
中华人民共和国中小企业促进法 nz 1000 | |
中华人民共和国义务教育法 nz 1000 |
This file contains 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
https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169 |