Skip to content

Instantly share code, notes, and snippets.

View suttree's full-sized avatar
🤔
copacetic/autotelic

Duncan Gough suttree

🤔
copacetic/autotelic
View GitHub Profile
@suttree
suttree / gist:8ccff8943cf309e4fd76b864d4a7dcf6
Last active March 16, 2023 11:00
Smart Photos - steganograpy, identity, and pfps
from PIL import Image
from stegano import lsb
# To store a message
secret = lsb.hide("./uodh.jpg", "http://tinyurl.com/5j4nng")
secret.save("./uodh.png")
# To read a message
clear_message = lsb.reveal("./uodh.png")
print(clear_message)
@geoffreylitt
geoffreylitt / langchain-experiment.ipynb
Created January 29, 2023 21:27
Langchain experiment
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mvanga
mvanga / music_theory.py
Last active April 24, 2024 19:10
Basic Music Theory in ~200 Lines of Python
# The code for my article with the same name. You can find it at the URL below:
# https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python
# MIT License
#
# Copyright (c) 2021 Manohar Vanga
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@whoisryosuke
whoisryosuke / Update-branch.md
Created September 17, 2019 17:38 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@jasondilworth56
jasondilworth56 / example_image_utils.py
Last active March 4, 2024 03:41 — forked from turicas/example_image_utils.py
Layer on top of Python Imaging Library (PIL) to write text in images easily
#!/usr/bin/env python
# coding: utf-8
# You need PIL <http://www.pythonware.com/products/pil/> to run this script
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use
# any TTF you have)
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com]
# License: GPL <http://www.gnu.org/copyleft/gpl.html>
from image_utils import ImageText
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active July 23, 2024 09:33
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
int numFrames = 100;
void setup(){
size(500,500,P3D);
stroke(255);
fill(255);
}
float x1(float t){
// note : if you're on github gist and want to copy paste this code, you can click on the "Raw" button
// and then do Ctrl A, Ctrl C, Ctrl V
// (code below by Kurt Spencer, slightly modified code to run as Processing tab)
// maybe you should rather use this new (improved) version of the noise instead : https://github.com/KdotJPG/OpenSimplex2
/*
* OpenSimplex Noise in Java.
* by Kurt Spencer
*
* v1.1 (October 5, 2014)
@andrewserong
andrewserong / multiscreenwhatson.js
Created June 28, 2017 06:29
Front end code for ACMI's multi-screen Cinemas Now Showing
/**
* A simple web app to display session times from the ACMI website JSON feed.
* This source file gets bundled together with its dependencies into bundle.js.
*
* Dependencies:
*
* query-string (https://www.npmjs.com/package/query-string)
* jquery (https://jquery.com/)
* moment (https://momentjs.com/)
*