Skip to content

Instantly share code, notes, and snippets.

@xenogenesi
xenogenesi / Dockerfile.build-pytorch
Created Nov 16, 2020
WIP Try (and fail) to build pytorch 1.0.0 cuda 10.2 cudnn 7.6 with support for old gpu 3.0
View Dockerfile.build-pytorch
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 && \
View olive-export-rawpipe.diff
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 / .dockerignore
Last active Nov 9, 2020
Docker file for Wav2Lip
View .dockerignore
# Ignore everything
**
# Allow files and directories
!/audio.py
!/Dockerfile
!/hparams.py
!/preprocess.py
!/checkpoints/
!/evaluation/
View blender_movieclip_dlib_landmarks.py
# 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 / nitrogenrnd.nim
Created Apr 9, 2020
nitrogen random configuration for two screen in nim
View nitrogenrnd.nim
import os,
re,
strformat,
random
var bgDir = ""
if paramCount() > 0:
bgDir = paramStr(1)
else:
echo "usage: nitrogenrnd [directory]"
View wxhexeditor-reload-tags.diff
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() ){
View bootstrap3.3.6-mobile-only.min.css
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-si
@xenogenesi
xenogenesi / vlc-ffmpeg-thumbnail.lua
Last active Apr 17, 2019
lua extension for vlc to generate thumbnail of the current frame using ffmpeg
View vlc-ffmpeg-thumbnail.lua
-- generate thumbnail jpeg of the current selected frame using ffmpeg
-- name convention for minidlna or synology
-- install in ~/.local/share/vlc/lua/extensions/Thumbnail2.lua
-- tested on linux only
function descriptor()
return {
title = "Thumbnail2 generator";
@xenogenesi
xenogenesi / Makefile
Last active Nov 9, 2020
create self signed certificates
View Makefile
DOMAIN ?= mydomain.com
COUNTRY := IT
STATE := IT
COMPANY := Evil Corp.
# credits to: https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309
# usage:
@xenogenesi
xenogenesi / apiresponsebool.diff
Created May 11, 2018
fix meinside/telegram-bot-go's EditMessageText response
View apiresponsebool.diff
diff --git a/methods.go b/methods.go
index 55a6eca..7c997a7 100644
--- a/methods.go
+++ b/methods.go
@@ -723,7 +723,7 @@ func (b *Bot) AnswerCallbackQuery(callbackQueryID string, options map[string]int
// other options: parse_mode, disable_web_page_preview, and reply_markup
//
// https://core.telegram.org/bots/api#editmessagetext
-func (b *Bot) EditMessageText(text string, options map[string]interface{}) (result APIResponseMessage) {
+func (b *Bot) EditMessageText(text string, options map[string]interface{}) (result APIResponseBool) {
You can’t perform that action at this time.