View gaussianBlu.go
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" | |
) |
View make_data.py
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"] | |
View matrux.sh
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) |
View create-couchbas-pods.sh
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 |
View manual-classification.py
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) |
View train.py
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 |
View Info
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
Based on https://gist.github.com/tadast/8827699: | |
- remove duplicates | |
- striped and no unecessary double quotes | |
- floating point values instead of strings |
View make editable vars in html.html
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 |
View sun_set.py
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" |
View videoframegenerator.py
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
# DEPRECATED - please go to my complete package: | |
# pipy package https://pypi.org/project/keras-video-generators/ | |
# github sources https://github.com/metal3d/keras-video-generators | |
import keras | |
import cv2 as cv | |
import glob | |
import numpy as np | |
import os | |
import random |
NewerOlder