Skip to content

Instantly share code, notes, and snippets.

View louisguitton's full-sized avatar
Focusing

Louis Guitton louisguitton

Focusing
View GitHub Profile
## install homebrew
echo "Installing Homebrew.."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Homebrew successfully installed"
## install brew cask
echo "Installing brew cask.."
brew tap homebrew/cask
echo "Homebrew cask successfully installed"
@feluelle
feluelle / google_api_integration_in_airflow.py
Last active August 14, 2024 19:58
Google API (and S3) integration in Airflow
#
# -------------------- authorize script --------------------
#
# -*- coding: utf-8 -*-
"""
Just adjust the global variables accordingly and then run this script from the command line.
Make sure the correct client_secret_file is selected,
and that it has the necessary right configured.
@troyfontaine
troyfontaine / 1-setup.md
Last active September 17, 2024 18:33
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@fchollet
fchollet / classifier_from_little_data_script_1.py
Last active July 27, 2024 19:40
Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@veselosky
veselosky / s3gzip.py
Last active August 29, 2024 11:32
How to store and retrieve gzip-compressed objects in AWS S3
# vim: set fileencoding=utf-8 :
#
# How to store and retrieve gzip-compressed objects in AWS S3
###########################################################################
#
# Copyright 2015 Vince Veselosky and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@nivbend
nivbend / run_pylint.py
Last active January 7, 2020 13:21
A simple git pre-commit hook to run pylint on all python scripts changed.
#! /usr/bin/env python
"""Git pre-commit hook to run pylint on python files.
To install:
wget https://gist.github.com/nivbend/7e0e306a98138916b3c9#file-run_pylint-py -O .git/hooks/pre-commit
"""
from __future__ import print_function
from subprocess import check_output, CalledProcessError
from sys import stderr
@learncodeacademy
learncodeacademy / gist:5f84705f2229f14d758d
Last active July 16, 2024 04:56
Getting Started with Vagrant, SSH & Linux Server Administration
@Kartones
Kartones / postgres-cheatsheet.md
Last active September 20, 2024 08:36
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@obstschale
obstschale / octave.md
Last active June 8, 2024 19:46
An Octave introduction cheat sheet.