Skip to content

Instantly share code, notes, and snippets.

@douglasrizzo
douglasrizzo / inconsistent-authors-bib.ipynb
Last active June 27, 2022 00:19
Merging inconsistent author names in a bib file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglasrizzo
douglasrizzo / caesar.py
Created May 25, 2018 17:16
Caesar Cipher
def caesar(plainText, shift):
"""Caesar Cipher implementation.
Upper and lower case letters are kept accordingly, non-alphabetic characters are ignored.
Implementation taken from here: https://stackoverflow.com/q/8886947/1245214
:param plainText: the text to be ciphered
:param shift: shift value for the cipher
:return: the ciphered text
"""
cipherText = ""
@douglasrizzo
douglasrizzo / .tmux.conf
Created December 2, 2017 10:24
My tmux config file
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
@douglasrizzo
douglasrizzo / tf_obj_tutorial.md
Last active November 15, 2023 22:36
TensorFlow Object Detection Model Training
@douglasrizzo
douglasrizzo / MonteCarloIntegrationMPI.cpp
Last active October 26, 2018 23:05
Monte Carlo Integration example using MPI. For OpenMP examples, check https://github.com/douglasrizzo/numerical_analysis
#include <chrono>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <mpi.h>
#include <random>
using namespace std;
//! \param x
@douglasrizzo
douglasrizzo / .bibtoolrsc
Last active May 27, 2022 14:56
BibTool resource file
% no tabs as indentation, line size very big
print.align.key = 0
print.use.tab = off
print.line.length = 200
% sort order for fields
sort = on
sort.order {* = title # author # school # type # year # month # day # journal # booktitle # publisher # volume # pages # shorttitle # url # urlaccessdate}
@douglasrizzo
douglasrizzo / radio-style.css
Created June 1, 2016 21:13
Changing PrimeFaces SelectOneRadio bullet for an X with CSS
.ui-radiobutton .ui-radiobutton-box {
height: 30px !important;
width: 30px !important;
}
.ui-icon-bullet {
background: none;
}
.ui-radiobutton .ui-state-active {
@douglasrizzo
douglasrizzo / epsxe-install.sh
Last active May 1, 2016 11:37
ePSXe prerequisites on Linux 64 bits
sudo apt install libncurses5:i386 libgtk2.0-0:i386 libasound2:i386 libsdl1.2debian:i386 libsdl-ttf2.0-0:i386
wget archive.debian.org/debian/pool/main/g/gcc-2.95/libstdc++2.10-glibc2.2_2.95.4-27_i386.deb
sudo dpkg -i libstdc++2.10-glibc2.2_2.95.4-27_i386.deb
@douglasrizzo
douglasrizzo / rcss-install.sh
Last active January 13, 2021 14:31
Robocup Soccer Simulation 2D Server installation on Ubuntu 14.04
# remove any pre-installation of bison
sudo apt remove bison -y && sudo apt-get autoremove -y
# install prerequisites that don't come with the OS
sudo apt install libboost-all-dev flex -y
# download and install older version of bison (2.7.1)
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb && sudo dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb && rm libbison-dev_2.7.1.dfsg-1_amd64.deb
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb && sudo dpkg -i bison_2.7.1.dfsg-1_amd64.deb && rm bison_2.7.1.dfsg-1_amd64.deb