Skip to content

Instantly share code, notes, and snippets.

Avatar

Paolo Galeone galeone

View GitHub Profile
@galeone
galeone / engine-coverage.patch
Created Feb 16, 2022
Enable code coverage support on Unreal Built Tool Linux Toolchain
View engine-coverage.patch
--- a/Engine/Source/Programs/UnrealBuildTool/Configuration/ModuleRules.cs
+++ b/Engine/Source/Programs/UnrealBuildTool/Configuration/ModuleRules.cs
@@ -606,6 +606,10 @@ namespace UnrealBuildTool
{
get
{
+ if (bCodeCoverage) {
+ return CodeOptimization.Never;
+ }
+
@galeone
galeone / PKGBUILD
Last active May 17, 2018
PKGBUILD for OpenCV 3.1.1 with CUDA 9 enabled
View PKGBUILD
pkgname="opencv-cuda-stable"
_pkgname="opencv-stable"
pkgver=3.4.1
pkgrel=1
pkgdesc="Open Source Computer Vision Library compiled with extra modules(opencv_contrib) and CUDA"
url="http://opencv.org/"
license=('BSD')
arch=('i686' 'x86_64' 'armv7h' 'armv6h')
depends=('gst-plugins-base' 'openexr'
'xine-lib' 'libdc1394' 'gtkglext'
@galeone
galeone / attempt3.go
Created May 29, 2017
Defining and executing a tensorflow graph in Go
View attempt3.go
package main
import (
"fmt"
tf "github.com/tensorflow/tensorflow/tensorflow/go"
"github.com/tensorflow/tensorflow/tensorflow/go/op"
)
func main() {
// Let's describe what we want: create the graph
@galeone
galeone / draw_binomial_distribution.py
Created Jan 10, 2017
Draw the probability of the binomial distribution, varying the probability
View draw_binomial_distribution.py
import matplotlib.pyplot as plt
from scipy.stats import binom
import numpy as np
# number of neurons
n = 1024
# number of tests (input examples)
size = 500
# histogram bin width, for data visualization
binwidth = 5
@galeone
galeone / SingleLayerCAE.py
Last active Sep 23, 2019
Single Layer Convolutional Auto Encoder
View SingleLayerCAE.py
# import tensorflow
import tensorflow as tf
# import the utils file in the current folder
from . import utils
# from the Autoencoder file import the interface to implement
from .Autoencoder import Autoencoder
class SingleLayerCAE(Autoencoder):
""" Build a single layer CAE"""
@galeone
galeone / fix_tf_api.sh
Last active Dec 15, 2016
Replace in every python file the old Tensorflow API with the new syntax
View fix_tf_api.sh
#!/usr/bin/env bash
find . -name '*.py' -exec grep "tf.image_summary" {} -H \; | cut -d':' -f1 | xargs -l sed -i 's/tf\.image_summary/tf.summary.image/g'
find . -name '*.py' -exec grep "tf.audio_summary" {} -H \; | cut -d':' -f1 | xargs -l sed -i 's/tf\.audio_summary/tf.summary.audio/g'
find . -name '*.py' -exec grep "tf.histogram_summary" {} -H \; | cut -d':' -f1 | xargs -l sed -i 's/tf\.histogram_summary/tf.summary.histogram/g'
find . -name '*.py' -exec grep "max_images" {} -H \; | cut -d':' -f1 | xargs -l sed -i 's/max_images/max_outputs/g'
find . -name '*.py' -exec grep "tf.merge_summary" {} -H \; | cut -d':' -f1 | xargs -l sed -i 's/tf\.merge_summary/tf.summary.merge/g'
find . -name '*.py' -exec grep "tf.scalar_summary" {} -H \; | cut -d':' -f1 | xargs -l sed -i 's/tf\.scalar_summary/tf.summary.scalar/g'
find . -name '*.py' -exec grep "tf.initialize_all_variables" {} -H \; | cut -d':' -f1 | xargs -l sed -i 's/tf\.initialize_all_variables/tf.global_variables_initializer/g'
find . -name '*.py' -exec grep
View keybase.md

Keybase proof

I hereby claim:

  • I am galeone on github.
  • I am nessuno (https://keybase.io/nessuno) on keybase.
  • I have a public key whose fingerprint is 72EF B984 8764 F75F 26F1 A853 C989 A5CF 984D 4E43

To claim this, I am signing this object: