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 as cv | |
import os | |
import glob | |
import numpy as np | |
import random | |
from tensorflow import keras | |
import keras.preprocessing.image | |
from tensorflow.python.keras.utils.data_utils import Sequence | |
class VideoFrameGenerator(Sequence): |
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
package blur | |
import ( | |
"image" | |
"image/color" | |
"image/png" | |
_ "image/png" | |
"math" | |
) |
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
""" Create dataset """ | |
import os | |
import uuid | |
import cv2 as cv | |
DATA_DIR = "data" | |
DIRECTIONS = ["up", "down", "right", "left", "neutral"] | |
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
lines=$(tput lines) | |
cols=$(tput cols) | |
awkscript=' | |
{ | |
lines=$1 | |
random_col=$3 | |
letter=$4 | |
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()" | |
letter=substr(letters,letter,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
# Configuration | |
count=4 | |
clustername=mycluster | |
admin=admin | |
password=password | |
networkname=couchbase | |
volumename=couchbase | |
# inside the pods, do not change it |
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
""" UI to manually class bad/good images """ | |
import os | |
import sys | |
from glob import glob | |
import cv2 as cv | |
directory = sys.argv[1] | |
if not directory: | |
sys.exit(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
""" Train model and find bad image from a directory """ | |
import argparse | |
import os | |
import time | |
from glob import glob | |
from typing import Any | |
import numpy as np | |
from tensorflow.python.keras.layers.pooling import MaxPool2D |
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
<html> | |
<meta charset="utf-8" /> | |
<body> | |
<pre> | |
<code> | |
# All you have to do is to prefix variables with "_change_" | |
# and let the script to manage the editable values | |
FOO="_change_thisvariable" | |
this is a command with _change_argument here |
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
/* | |
NAT traversal system to let 2 computers behind firewall to communicate. | |
Example: | |
Client A (your machine) has public ip 1.1.1.1 | |
Client B (distant machine) has public ip 2.2.2.2 | |
You want to bind port 5556 on your machine | |
Distant Client want to bind port 5557 |
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 bpy | |
import mathutils | |
# Author: Patrice Ferlet <metal3d@gmail.com> | |
# License: GPL | |
# Works with Blender 2.80-2.90 | |
# To use this script: | |
# - paste this script in a "text editor" *inside* blender | |
# - name it "sun_set.py" |