Skip to content

Instantly share code, notes, and snippets.

Avatar

Giuseppe Ragusa gragusa

View GitHub Profile
@gragusa
gragusa / metropolis.css
Created Oct 21, 2019 — forked from vhodges/metropolis.css
A version of the Beamer theme Metropolis for reveal.js
View metropolis.css
/**
* A simple theme for reveal.js presentations, derived from serif.css
* It's in the spirit of the Metropolis theme for beamer https://github.com/matze/mtheme
*
* This theme is Copyright (C) 2016 Vince Hodges, http://sourdoughlabs.com - it is MIT licensed.
*/
@import url('https://fonts.googleapis.com/css?family=Fira+Sans');
.reveal a {
@gragusa
gragusa / metropolis.css
Created Oct 21, 2019 — forked from vhodges/metropolis.css
A version of the Beamer theme Metropolis for reveal.js
View metropolis.css
/**
* A simple theme for reveal.js presentations, derived from serif.css
* It's in the spirit of the Metropolis theme for beamer https://github.com/matze/mtheme
*
* This theme is Copyright (C) 2016 Vince Hodges, http://sourdoughlabs.com - it is MIT licensed.
*/
@import url('https://fonts.googleapis.com/css?family=Fira+Sans');
.reveal a {
@gragusa
gragusa / cuda_installation_on_ubuntu_18.04
Created Jan 10, 2019 — forked from Mahedi-61/cuda_11.2_installation_on_Ubuntu_20.04
cuda 9.0 complete installation procedure for ubuntu 18.04 LTS
View cuda_installation_on_ubuntu_18.04
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@gragusa
gragusa / Emacs_starter.pl
Created Jan 11, 2016 — forked from railwaycat/Emacs_starter.pl
Start Emacs.app from CLI
View Emacs_starter.pl
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {
@gragusa
gragusa / Makefile
Created Dec 6, 2015 — forked from lmullen/Makefile
PDF slides and handouts using Pandoc and Beamer
View Makefile
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
View demo.tex
\documentclass[10pt, aspectratio=169]{beamer}
\usetheme{metropolis}
\usepackage{booktabs}
\usepackage[scale=2]{ccicons}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
View sqlite2pg.sh
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3
@gragusa
gragusa / ForwardDiffArgs.jl
Created Feb 27, 2015
Modifies ForwardDiff to allow parameters in function definition
View ForwardDiffArgs.jl
using ForwardDiff
import ForwardDiff: Dual, epsilon
function my_dual_fad{T<:Real}(f!::Function, x::Vector{T}, jac_out::Matrix{T}, dual_in, dual_out, args...)
for i in 1:length(x)
dual_in[i] = Dual(x[i], zero(T))
end
View parallel_mc_iid_iv_2.jl
n = 31
ttt()=(randn(100,1), randn(100,1), randn(100,5))
function rvproducer()
for i = 1:n
produce(ttt())
end
end
View mindv_monte1.jl
using MinimumDivergence
using ModelsGenerators
using Ipopt
using Divergences
HellingerDistance() = CressieRead(0.5)
ContinuousUpdating() = CressieRead(2.0)
ModifiedHellingerDistance::Real) = ModifiedCressieRead(0.5, ϑ)