Skip to content

Instantly share code, notes, and snippets.

View gmodena's full-sized avatar

Gabriele Modena gmodena

View GitHub Profile
@pepijndevos
pepijndevos / core.clj
Created September 16, 2011 11:17
Micro Wiki
(ns wiki.core
(:use net.cgrand.moustache
ring.adapter.jetty
ring.util.response
[ring.middleware params stacktrace reload]
hiccup.core
com.ashafa.clutch)
(:require [clojure.string :as s])
(:import org.pegdown.PegDownProcessor))
@antirez
antirez / nn.h
Last active September 23, 2016 22:30
#ifndef __NN_H
#define __NN_H
/* Data structures.
* Nets are not so 'dynamic', but enough to support
* an arbitrary number of layers, with arbitrary units for layer.
* Only fully connected feed-forward networks are supported. */
struct AnnLayer {
int units;
double *output; /* output[i], output of i-th unit */
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattbaggott
mattbaggott / demo_circular_day_plots.R
Last active July 9, 2021 15:37
Sample code to demonstrate some ways of making circular time-of-day plots in R (i.e. polar plots with 24 major hourly units)
##
## Sample code to demonstrate circular time plots in R
## matt@baggott.net
## Dec 22, 2012
# inspired by
# http://stackoverflow.com/questions/2076370/most-underused-data-visualization
library(lubridate)
library(circular)
@ottomata
ottomata / Dockerfile
Last active December 13, 2021 17:21
Build a packed conda env .tgz from conda environment.yml and/or pip requirements.txt
# See also:_https://pythonspeed.com/articles/conda-docker-image-size/
# The conda env build stage image:
# 1. Create conda env
# 2. Optionally install conda dependencies
# 3. Optionally install pip dependencies
FROM continuumio/miniconda3 AS conda_build_env
# Create a bare conda env.
# We need at minimum python, pip, conda-pack and gcc and g++ (to build any binary pip packages later)
@ottomata
ottomata / 0_mediawiki_page_create_stream_table.py
Last active September 29, 2022 20:38
pyflink + event platform experiments
# Pyflink Streaming Table Env + Event Utilities Event Platform integration.
# Download wikimedia-event-utilities Flink:
# Download Wikimedia Event Utilities Flink jar, e.g.
# https://archiva.wikimedia.org/#artifact-details-download-content/org.wikimedia/eventutilities-flink/1.2.0
# wget http://archiva.wikimedia.org/repository/releases/org/wikimedia/eventutilities-flink/1.2.0/eventutilities-flink-1.2.0-jar-with-dependencies.jar
# Also download other dependencies we need:
# wget https://repo1.maven.org/maven2/org/apache/flink/flink-connector-kafka/1.15.2/flink-connector-kafka-1.15.2.jar
# wget https://repo1.maven.org/maven2/org/apache/kafka/kafka-clients/3.2.3/kafka-clients-3.2.3.jar
# If you like, use ipython for your REPL, its nicer!
@lucianposton
lucianposton / .muttrc
Last active August 15, 2023 04:11
mutt: muttrc settings for ProtonMail Bridge
set from="user@protonmail.com"
set my_user="user@protonmail.com"
set my_pass="pass"
set ssl_starttls=yes
set smtp_url="smtp://$my_user:$my_pass@127.0.0.1"
# workaround for https://github.com/neomutt/neomutt/issues/1211
set imap_authenticators=login
@wolfeidau
wolfeidau / donkeycar.md
Last active September 15, 2023 17:27
Commands I used to configure donkey car on raspberry pi 3 b+

Install i2c tools to check for PCA9685 board.

sudo apt-get install i2c-tools
sudo i2cdetect -y 1

Install vim and git.

@defuse
defuse / attack.php
Last active October 2, 2023 21:27
PoC: Attack Against PHP Crypto
<?php
/*
* This code is copied from
* http://www.warpconduit.net/2013/04/14/highly-secure-data-encryption-decryption-made-easy-with-php-mcrypt-rijndael-256-and-cbc/
* to demonstrate an attack against it. Specifically, we simulate a timing leak
* in the MAC comparison which, in a Mac-then-Encrypt (MtA) design, we show
* breaks confidentiality.
*
* Slight modifications such as making it not serialize/unserialize and removing
@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following: