Skip to content

Instantly share code, notes, and snippets.

View skeptycal's full-sized avatar
🏠
Available for Remote

Michael Treanor skeptycal

🏠
Available for Remote
View GitHub Profile
@skeptycal
skeptycal / umap_sparse.py
Created October 14, 2018 06:32 — forked from johnhw/umap_sparse.py
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
// by Etienne JACOB
// motion blur template by beesandbombs
// needs opensimplexnoise code in another tab
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
@skeptycal
skeptycal / pybadge.py
Created November 9, 2018 05:13 — forked from oskay/pybadge.py
A python program to generate a basic program that can display your name on your 2018 supercon badge.
#!/usr/bin/env python
# -*- encoding: utf-8 -#-
'''
Process ASCII art and generate basic program to draw it as
ascii art for hackaday 2018 superconference badge
Exports a basic program that you can upload to the badge.
License: Public domain!!!
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
env=~/.ssh/agent.env
# Note: Don't bother checking SSH_AGENT_PID. It's not used
# by SSH itself, and it might even be incorrect
# (for example, when using agent-forwarding over SSH).
agent_is_running() {
@skeptycal
skeptycal / git-deployment.md
Created January 3, 2019 10:25 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@skeptycal
skeptycal / README.md
Created January 3, 2019 10:26 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@skeptycal
skeptycal / twitterfollow.py
Created January 3, 2019 12:05 — forked from jeremycg/twitterfollow.py
get list of twitter followers using python
from twython import Twython
import csv
twitter = Twython(APP_KEY, APP_SECRET,
OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
followers = twitter.get_followers_list(screen_name = "yourusername", count = 200)
following = twitter.get_friends_ids(screen_name = "yourusername")
with open("twitter.csv", 'w', newline='') as csvfile:
writer = csv.writer(csvfile, delimiter=',')
writer.writerow(["name", "tweets", "following", "followers", "I'm following"])
#!/usr/bin/env python3
"""
Accepts parameters of time and attention and
returns knowledge of different ways to test
multiple flags at once in Python.
"""
x, y, z = 0, 1, 0
if x == 1 or y == 1 or z == 1:
@skeptycal
skeptycal / top-github.md
Created January 5, 2019 21:01 — forked from bobthecow/top-github.md
Top GitHub users by total number of stars

I was playing with GitHub Archive recently. Out of curiosity I ran this query:

SELECT COUNT(repository_owner) as totalStars, repository_owner
FROM [githubarchive:github.timeline] 
WHERE type = 'WatchEvent'
AND repository_organization IS NULL
GROUP BY repository_owner
ORDER BY totalStars DESC
@skeptycal
skeptycal / CustomSortFilterProxyModel.py
Created January 6, 2019 05:14 — forked from dbridges/CustomSortFilterProxyModel.py
A subclass of QSortFilterProxyModel that implements custom filtering, especially useful for multicolumn filtering.
from PySide import QtGui
class CustomSortFilterProxyModel(QtGui.QSortFilterProxyModel):
"""
Implements a QSortFilterProxyModel that allows for custom
filtering. Add new filter functions using addFilterFunction().
New functions should accept two arguments, the column to be
filtered and the currently set filter string, and should
return True to accept the row, False otherwise.