Skip to content

Instantly share code, notes, and snippets.

@xenogenesi
xenogenesi / .dockerignore
Last active December 13, 2023 14:44
Docker file for Wav2Lip
# Ignore everything
**
# Allow files and directories
!/audio.py
!/Dockerfile
!/hparams.py
!/preprocess.py
!/checkpoints/
!/evaluation/
# tested with blender 2.83.5
# some dependency is required: dlib imutils opencv numpy
import bpy
import os
# hack to get imutils to work
import sys; sys.path.insert(0, os.getenv('HOME') + "/.local/lib/python3.8/site-packages")
from imutils import face_utils
@xenogenesi
xenogenesi / Makefile
Last active February 23, 2023 16:16
Simple QOpenGLWidget (Qt6/Qt5) test, draw an rgb triangle, handle mouse events (press, move and wheel)
all: main
USE_QT = 5
ifeq ($(USE_QT), 6)
QT6_CXXFLAGS = -I/usr/include/x86_64-linux-gnu/qt6
QT_CXXFLAGS = $(QT6_CXXFLAGS)
@xenogenesi
xenogenesi / Makefile
Last active November 19, 2021 03:28
create self signed certificates
DOMAIN ?= mydomain.com
COUNTRY := IT
STATE := IT
COMPANY := Evil Corp.
# credits to: https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309
# usage:
<?php
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
@xenogenesi
xenogenesi / blender-mocap-constraint.py
Last active January 5, 2021 02:05
Blender script to re-target motion capture
bl_info = {
"name": "Rig Empty Retarget",
"blender": (2, 91, 0),
"author": "Alex <raziel@eml.cc>",
"version": (0, 1),
"category": "Rigging",
"location": "Operator Search",
"description": "Helpers to re-target animations",
"warning": "",
"doc_url": "",
@xenogenesi
xenogenesi / Dockerfile.build-pytorch
Created November 16, 2020 06:52
WIP Try (and fail) to build pytorch 1.0.0 cuda 10.2 cudnn 7.6 with support for old gpu 3.0
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates apt-transport-https gnupg-curl && \
rm -rf /var/lib/apt/lists/* && \
NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +5 > cudasign.pub && \
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
diff --git a/dialogs/exportdialog.cpp b/dialogs/exportdialog.cpp
index d6899f66..ac13fa0e 100644
--- a/dialogs/exportdialog.cpp
+++ b/dialogs/exportdialog.cpp
@@ -65,6 +65,9 @@ enum ExportFormats {
FORMAT_WAV,
FORMAT_WEBM,
FORMAT_WMV,
+#ifdef EXPORT_POPEN
+ FORMAT_RAWPIPE,
@xenogenesi
xenogenesi / nitrogenrnd.nim
Created April 9, 2020 18:24
nitrogen random configuration for two screen in nim
import os,
re,
strformat,
random
var bgDir = ""
if paramCount() > 0:
bgDir = paramStr(1)
else:
echo "usage: nitrogenrnd [directory]"
diff --git a/src/HexEditor.cpp b/src/HexEditor.cpp
index 365d904..e2bfb24 100644
--- a/src/HexEditor.cpp
+++ b/src/HexEditor.cpp
@@ -922,6 +922,14 @@ void HexEditor::OnKeyboardInput( wxKeyEvent& event ) {
*/
break;
+ case (0x52):
+ if( event.ControlDown() ){