Skip to content

Instantly share code, notes, and snippets.

View MatteoRagni's full-sized avatar
🎱

Matteo Ragni MatteoRagni

🎱
View GitHub Profile
@MatteoRagni
MatteoRagni / goto.rb
Created January 22, 2018 07:40
Converts windows path to WSL linux path
#!/usr/bin/env ruby
require 'optparse'
def convert_to_path(f, is_file)
ret = f.gsub(/^([A-Z]):/) { |m| "/mnt/#{m[0].downcase}" }
ret = ret.gsub(/\\/, "/")
ret = ret + "/../" if is_file
return ret
end
@MatteoRagni
MatteoRagni / 00_README.md
Last active December 7, 2017 11:19
Configuring Custom Default figure options in Matlab

Default Graphic Configuration

Installation

Check which is the startup file through the command:

which startup
@MatteoRagni
MatteoRagni / Procfile
Last active October 22, 2017 12:24
Simple app deployed on Heroku for this Stackoverflow question: https://stackoverflow.com/questions/46873665
web: node .
@MatteoRagni
MatteoRagni / pos.rb
Created September 22, 2017 19:09
Position for the images for the autoencoder
#!/usr/bin/env ruby
# Reconstruct position
f = 0
for a in 0...25
for b in 0...25
next if b == a
for c in 0...25
@MatteoRagni
MatteoRagni / Makefile
Last active September 9, 2020 06:41
This is a C++ implementation of a class that handles the COBS transfer.
CXX = g++
CXXFLAGS = --std=c++11 -g -I. -Wall
default:
$(CXX) $(CXXFLAGS) main.cpp -o main
.PHONY: clean
clean:
rm -rf main
@MatteoRagni
MatteoRagni / state2_hash.json
Last active August 31, 2017 19:38 — forked from mshafrir/states_hash.json
US states in JSON form
{
"Alabama": "AL",
"Alaska": "AK",
"American Samoa": "AS",
"Arizona": "AZ",
"Arkansas": "AR",
"California": "CA",
"Colorado": "CO",
"Connecticut": "CT",
"Delaware": "DE",
@MatteoRagni
MatteoRagni / Evolutionary.tex
Created August 4, 2017 10:33
Evolutionary algorithm
\documentclass[]{standalone}
\usepackage{tikz}
\begin{document}
\tikzstyle{scale all}=[every node/.style={scale=#1}, scale=#1]
\tikzset{
solution/.pic = {
@MatteoRagni
MatteoRagni / Trajectory.tex
Last active April 14, 2020 19:19
Trajectory in space
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{tikz-3dplot}
\pgfplotsset{compat=1.14}
\tikzset{>=latex}
\begin{document}
@MatteoRagni
MatteoRagni / Dockerfile
Created March 30, 2017 08:27
VBOX building environment
FROM debian:7.11
LABEL Description "Building Machine for VBox"
LABEL Vendor "Matteo Ragni, Alessandro Mazzalai"
LABEL Mantainer "info@ragni.me"
LABEL Version "1.0"
RUN apt-get update
RUN apt-get install -y --no-upgrade --no-install-recommends \
@MatteoRagni
MatteoRagni / lectures.md
Created February 19, 2017 14:22
Fondamenti di Informatica: Lezioni 2015

Riassunto lezioni

(per il gruppo A-L)

24 Febbraio

  • Introduzione alla console
    • cd
    • pwd
    • ls