Skip to content

Instantly share code, notes, and snippets.

View richstoner's full-sized avatar
💭
🚀

Rich Stoner richstoner

💭
🚀
View GitHub Profile
@effigies
effigies / python_packaging_2020.md
Last active January 25, 2024 13:42
Contemporary Python Packaging - 2020

Contemporary Python Packaging

This document lays out a set of Python packaging practices. I don't claim they are best practices, but they fit my needs, and might fit yours.

Validity

This document has been superseded as of January 2023.

This was written in July 2020, superseding this gist from 2019.

@Loyale
Loyale / retina_3d_umap_blender.py
Last active April 21, 2024 21:26
Retina 3D UMAP in Blender: Data Import and Scene Setup
# Here is the workflow in a nutshell:
#
# 1) Annotate cells in your favorite single cell framework or system
# 2) Perform your favorite dimensionality reduction into 3D.
# 3) Export annotation and 3D coordinates to .csv.
# 4) I imported these data into Blender and created the objects using the below ‘retina_3d_umap_blender.py’ script. Some of it is automated, some of it is hard-coded and project specific.
# - For each age (since cells here are colored by developmental age) I create a new mesh and add each datapoint for a given age to the mesh as a vertex.
# 5) I then created a single ’sample object’ for each mesh consisting of a UV sphere primitive. Added a material to that to match the color scheme I had selected. These were the ’templates’ to be used and applied to each vertex in the mesh using a particle system
# 6) Next created a particle system for each age with the params indicated in the python script.
# 7) Finally I created an empty parent object to group all of the particles so I could track wi
@YOU54F
YOU54F / items.json
Last active June 17, 2020 16:41
Configuration file for My TouchBar. My rules - https://github.com/Toxblh/MTMR
[
{ "type": "escape", "align": "left" },
{
"type": "appleScriptTitledButton",
"source": {
"inline":
"if application \"iTunes\" is running then\rtell application \"iTunes\"\rif player state is playing then\rreturn (get artist of current track) & \" – \" & (get name of current track)\relse\rreturn \"\"\rend if\rend tell\rend if\rreturn \"\"\r"
},
"action": "appleScript",
"actionAppleScript": {
@RyanEager
RyanEager / van_down.py
Last active May 18, 2023 06:52
Scrape full sized images form vangoghmuseum.nl
"""
Scrape full sized images from vangoghmuseum.nl
---- requrires.txt ------------------------------------------------------------
beautifulsoup4==4.6.0
bs4==0.0.1
certifi==2018.4.16
chardet==3.0.4
idna==2.7
Pillow==5.2.0
python-slugify==1.2.5
@niw
niw / download_macos_and_create_install_disk.sh
Last active July 18, 2024 20:32
A script to download macOS install image and create an install disk image
#!/usr/bin/env bash
set -e
VOLUME_PATH=/Volumes/installer
while getopts ":d:h" opts; do
case $opts in
d)
VOLUME_PATH=$OPTARG
;;
@eriadam
eriadam / logstash.conf
Last active March 16, 2020 21:19
Logstash serve configuration for the JustLog iOS logger.
input {
tcp {
port => 5000
# You need to have the json_lines plugin installed
codec => json_lines
# It is necessary to configure the SSL properly. Otherwise
# the logs wont make it to ES.
ssl_enable => true
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kwakwaversal
kwakwaversal / install-guest-additions.sh
Last active July 23, 2018 21:04 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions for debian/jessie64 with vagrant #shell
# Start a vagrant without virtualbox guest additions
$ vagrant init debian/jessie64
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@sphaero
sphaero / gstreamer-build.sh
Last active February 11, 2023 16:25
Install & build gstreamer from git
#!/bin/bash --debugger
set -e
BRANCH="master"
if grep -q BCM2708 /proc/cpuinfo; then
echo "RPI BUILD!"
RPI="1"
fi
[ -n "$1" ] && BRANCH=$1
@gourneau
gourneau / zpl-tcp.py
Created September 11, 2014 17:23
Python ZPL over TCP/IP Example
#!/usr/bin/env python
#ZPL docs can be found at https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf
#This works with Python 3, change the bytes to str if you are using Python 2
import socket
#One easy way to find the IP address is with this nmap command
# nmap 192.168.0.* -p T:9100 --open