Skip to content

Instantly share code, notes, and snippets.

View atgmello's full-sized avatar
🎯
Focusing

André Thomaz Gandolpho de Mello atgmello

🎯
Focusing
View GitHub Profile
@atgmello
atgmello / emacs27.sh
Last active November 27, 2023 21:57
Install Emacs 27 from source in Ubuntu 20.04 LTS
cd
git clone --depth=1 --single-branch \
--branch emacs-27 https://github.com/emacs-mirror/emacs.git
cd emacs/
sudo apt install -y autoconf make gcc texinfo libgtk-3-dev libxpm-dev \
libjpeg-dev libgif-dev libtiff5-dev libgnutls28-dev libncurses5-dev \
libjansson-dev libharfbuzz-dev libharfbuzz-bin imagemagick \
@atgmello
atgmello / CONTRIBUTING.md
Created April 16, 2020 02:01
Contributing guidelines

New feature

If you wish to contribute to the repository, have in mind that we follow some git flow standards.

Say you want to start working on a new feature. First, make sure you are at the develop branch.

git checkout develop

@atgmello
atgmello / dracula.jl
Created April 16, 2020 01:00
Dracula says... 🧛
module Dracula
function says(s::String)::Nothing
dracula_ascii = "
_..._
.' '.
; __ __ ;
|/ \\ / \\|
|\\| -- ' -- |/|
|(| \\o| |o/ |)|
_\\| > |/_
@atgmello
atgmello / run_query.sh
Last active March 24, 2020 19:29
DS4A Latam 2020 - Week 3 - Extended Case Automation
#!/bin/sh
# Reads query from file
query=$(cat $1)
# Creates output file
touch $2
# Performs query
PGPASSWORD=[password] psql -h [server] -U postgres -d [database] -c "${query}" > $2
@atgmello
atgmello / remove_all_env.sh
Created March 22, 2020 14:34
Conda env removal automation for the DS4A LATAM 2020 course cases.
#!/bin/sh
cd $1
for D in *; do
if [ -d "${D}" ]; then
echo "Now working at"
echo "${D}"
echo "..."
cd ${D}
# Grab correct environment name
@atgmello
atgmello / launch_case.sh
Last active March 10, 2020 13:11
Jupyter setup automation for the DS4A LATAM 2020 course cases.
#!/bin/bash
eval "$(conda shell.bash hook)"
cd $1
echo ""
if [ ! -f osx_env.yml ]; then
echo "Cant find osx_env.yaml file!"
@atgmello
atgmello / DS4AORG.md
Last active March 22, 2020 14:41
A simple document on how to organize your data for the DS4A LATAM 2020 course.

Organizing and automating the boring stuff

In this document I'll briefly go over the structure I've set up for organizing and automating the unzipping of each week's cases and installing all the required conda environments.

First off, create the main folder. I called it ds4a.

mkdir ds4a

@atgmello
atgmello / set_all_env.sh
Last active March 6, 2020 00:29
Conda env setup automation for the DS4A LATAM 2020 course cases.
#!/bin/sh
cd $1
for D in *; do
if [ -d "${D}" ]; then
echo "Now working at"
echo "${D}"
echo "..."
cd ${D}
conda env update --file osx_env.yml
echo "All done!"
@atgmello
atgmello / unzip_all.sh
Last active March 10, 2020 11:45
Unzipping automation for the DS4A LATAM 2020 course cases.
#!/bin/sh
cd ./$1
for z in *.zip; do
echo "Now unzipping ${z}"
unzip $z -n -d ../../cases/$1/
done
cd ../../cases/$1/
rm -rf __MAC*