Skip to content

Instantly share code, notes, and snippets.

Ashley Gillman ashgillman

Block or report user

Report or block ashgillman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ashgillman
ashgillman / ptn-encode.c
Created Mar 6, 2018
Pythagorean Triple Numbers (Marijn Heule)
View ptn-encode.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (int argc, char** argv) {
unsigned int a, b, c, max, offset = 0, nVars = 0, nClauses = 0;
if (argc < 2) {
printf ("run using ./ptn-encode MAX [OFFSET=0]\n"); exit (0); }
@ashgillman
ashgillman / .bashrc
Last active Feb 2, 2018 — forked from joepie91/.md
Nix in multi-user mode on a non-NixOS (eg. Debian) system
View .bashrc
nix-setup-user() {
TARGET_USER="$1"
SYMLINK_PATH="/home/$TARGET_USER/.nix-profile"
PROFILE_DIR="/nix/var/nix/profiles/per-user/$TARGET_USER"
echo "Creating profile $PROFILE_DIR..."
echo "Profile symlink: $SYMLINK_PATH"
rm "$SYMLINK_PATH"
mkdir -p "$PROFILE_DIR"
@ashgillman
ashgillman / primes.py
Last active Apr 24, 2017
Euler Project
View primes.py
def sieve_up_to(n):
possible = list(range(2, n+1))
primes = []
for i, p in enumerate(possible):
if p:
primes.append(p)
for j in range(i, n-1, p):
possible[j] = False
return primes
View openconnect_wrapper
#!/bin/bash
# /etc/openconnect_wrapper
# swap out SIGTERM for openconnect-friendly SIGINT
_term() {
kill -INT "$child" 2>/dev/null
}
trap _term SIGTERM
@ashgillman
ashgillman / Snakefile
Created Nov 25, 2015
Snakemake Dynamic Parallel Example
View Snakefile
rule all:
input: 'output.txt'
rule clean:
shell: 'rm input_* intermediate_* output.txt'
rule merge:
input: dynamic('intermediate_{n}.txt')
output: 'output.txt'
shell: 'cat {input} > {output}'
View Dockerfile
FROM debian:jessie
MAINTAINER Ashley Gillman <gillmanash@gmail.com>
# Source working/installation directory
ENV INSTALL /usr/local/src
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/issue && cat /etc/motd' \
>> /etc/bash.bashrc \
; echo "\
===================================================================\n\
= SomeApp Docker container =\n\
View encoded_latex.tex
\subsection{Natural Language Watermarking and Tamperproofing}
In \emph{Natural language watermarking and tamperproofing}, Atallah \emph{et al.} \cite{atallah2003natural} propose a method for steganographically embedding watermarks or fingerprints into plain text. Modern natural language steganography methods attempt to apply steganographic methods to text, without relying on modifying specific formatting parameters, such as \LaTeX or HTML.
In this work, authors continue from previous work \cite{atallah2001natural}, and use a similar base concept. The concept depends on fundamental redundancies in language structure and semantics. These two separate areas of redundancy are exploited within this text to embed the hidden message.
Firstly, a sentence can be restructured, and maintain the exact same meaning \cite{bennett2004linguistic}. For example, ``Ashley submitted a perfect assignment'' and ``A perfect assignment was submitted by Ashley.'' In these sentenced, the order of the subject and object have been reve
@ashgillman
ashgillman / laplace.m
Created Oct 25, 2015
Laplace Finite Differences
View laplace.m
clear all; close all
% Input Parameters
shieldxs = [0, 10, 10*cos(pi/3), 0];
shieldys = [0, 0, 10*sin(pi/3), 0];
shieldv = 10;
corexs = [4, 4, 6, 6, 4];
coreys = [5*tan(pi/6)+1, 5*tan(pi/6)-1, 5*tan(pi/6)-1, ...
5*tan(pi/6)+1, 5*tan(pi/6)+1];
corev = -10;
@ashgillman
ashgillman / package.json
Created Sep 9, 2015
Static D3 Visualisation
View package.json
{
"name": "Static-D3-Visualisation",
"version": "1.0.0",
"description": "Template to make visualisations with D3 locally",
"dependencies": {
"jsdom": "^3.1.2"
},
"devDependencies": {
"coffee-script": "^1.10.0"
},
You can’t perform that action at this time.