Skip to content

Instantly share code, notes, and snippets.

import cv2
import numpy as np
import matplotlib.pyplot as plt
a = []
cap = cv2.VideoCapture('clip.mp4')
ok, frame = cap.read()
parameters_shitomasi = dict(maxCorners=100, qualityLevel=0.3, minDistance=7)
@eeddaann
eeddaann / kassandra.py
Created April 13, 2023 10:37
generate random data for zincobserve
import base64, json
import requests
from requests.exceptions import HTTPError
import random
import time
user = "root@example.com"
password = "Complexpass#123"
bas64encoded_creds = base64.b64encode(bytes(user + ":" + password, "utf-8")).decode("utf-8")
name: guild
channels:
- defaults
dependencies:
- backcall=0.2.0
- ca-certificates=2021.10.26
- certifi=2021.10.8
- colorama=0.4.4
- decorator=5.1.0
- ipython=7.29.0
@eeddaann
eeddaann / dict-test.js
Last active February 4, 2021 11:35
ODH dictionary
class meow {
constructor(options) {
this.maxexample = 2;
this.word = '';
}
async displayName() {
return "אנגלית טכנית"
}
async findTerm(word) {
<!doctype html>
<html>
<head>
<title>Hello Webpack</title>
</head>
<body>
<textarea name="" id="input" cols="130" rows="10">a AND b OR c</textarea>
<div>
<button type="button" id="submit">Submit</button>
</div>
import pandas as pd
# Create dummy Data Frame
df = pd.DataFrame({
'A': [1,2,-3],
'B': [2,-4,6],
'C': [3,5,-7]
})
print(df.corr().unstack().sort_values().drop_duplicates())
@eeddaann
eeddaann / calsium.js
Last active January 16, 2019 06:40
calsium wip
var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProviderViewModels : [], //Disable terrain changing
infoBox : false, //Disable InfoBox widget
selectionIndicator : false //Disable selection indicator
});
//Enable lighting based on sun/moon positions
viewer.scene.globe.enableLighting = true;
//Use STK World Terrain
@eeddaann
eeddaann / find_pid_by_port.md
Last active January 3, 2019 22:02
find pid by port

find pid by port

lsof -wni tcp:3000

hellinger-distance-criterion

virtualenv

Assumes that python3.5 installed on the machine

git clone https://github.com/EvgeniDubov/hellinger-distance-criterion.git
cd hellinger-distance-criterion/
virtualenv dev  -p /usr/bin/python3.5 --no-site-packages
from Crypto.Cipher import AES
import random
MIN_CIPHER = 1000000000000000
MAX_CIPHER = 1000000000010000
PLAIN_TEXT = 'test some plain text here'.rjust(32)
### encrypt ###
def generate_ciphers(ciphers_len):