Skip to content

Instantly share code, notes, and snippets.

View nfultz's full-sized avatar
🌯

Neal Fultz nfultz

🌯
View GitHub Profile
@wikimatze
wikimatze / gist:9790374
Created March 26, 2014 18:43
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

@Lokaltog
Lokaltog / wm.c
Last active August 29, 2015 13:56
Dump window manager info to JSON (for usage with wkline)
#include <fcntl.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <webkit/webkit.h>
@XVilka
XVilka / TrueColour.md
Last active April 27, 2025 10:17
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@debasishg
debasishg / gist:8172796
Last active April 20, 2025 12:45
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@shunsukeaihara
shunsukeaihara / changefinder.py
Last active August 14, 2023 06:28
Change finder algorithm
# -*- coding: utf-8 -*-
import numpy as np
import math
def LevinsonDurbin(r, lpcOrder):
"""
from http://aidiary.hatenablog.com/entry/20120415/1334458954
"""
a = np.zeros(lpcOrder + 1,dtype=np.float64)
@mwhite
mwhite / expanded_history.py
Last active April 20, 2020 19:21
Bash history with bash and git aliases expanded
"""
Outputs history with bash and git aliases expanded.
"""
from __future__ import print_function
import re
from subprocess import check_output
BASH_ALIASES = {}
for line in check_output('bash -i -c "alias -p"', shell=True).split('\n'):
@romainfrancois
romainfrancois / output.txt
Created October 24, 2013 16:25
using SETLENGTH to fool R about the size of a vector
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
x = <0x1038ff8a0>, dataptr = <0x1038ff8c8>
@amitsaha
amitsaha / ipython-notebook.service
Last active December 23, 2015 15:59
Run IPython notebook under systemd
# README:
# Copy this file to /usr/lib/systemd/system/
# sudo systemctl daemon-reload
# systemctl enable ipython-notebook
# systemctl start ipython-notebook
# The WorkingDirectory and ipython-dir must exist
# If you don't want anything fancy, go to http://127.0.0.1:8888 to see your notebook
# wheneber you want it
[Unit]
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active March 27, 2025 19:16
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
# Condorcet
Votes <- read.csv("Votes.csv")
candidates <- names(Votes)
nvoters <- dim(Votes)[1]
ncand <- dim(Votes)[2]
allpairs <- combn(1:ncand, 2)