Skip to content

Instantly share code, notes, and snippets.

@Stonelinks
Stonelinks / multi.py
Created October 28, 2016 23:42
multipart
def upload_file(client, project_id, job_id, filename, path, mimetype):
mpu = client.post('/v1/files?multipart=1', data={
'project_id': project_id,
'job_id': job_id,
'name': filename,
'type': mimetype,
}, files={'1': '1'}).json()
# split each file up
with open(path, 'rb') as f:
@Stonelinks
Stonelinks / notes.md
Last active January 16, 2017 11:51
JIRA Bug RNN Notes

JIRA Markdown Bug Generator with an RNN

Ever wanted to piss off your team by generating plausible (but fake) sounding bug reports? Then look no further! This guide will walk you through exporting all your bugs from JIRA and using torch-rnn to generate nonsense like this:

example

You may need to swap URLs / field names as needed depending on your exact JIRA setup.

Step 1: Download all your bugs to your hard drive

Keybase proof

I hereby claim:

  • I am Stonelinks on github.
  • I am stonelinks (https://keybase.io/stonelinks) on keybase.
  • I have a public key whose fingerprint is 25FE 80C1 2ED1 0F51 F4A1 E741 48F5 FF36 52A2 5252

To claim this, I am signing this object:

import subprocess
import time
import math
def beep(frequency=1000, length=1000, repeat=1, delay=10):
cmd = ['beep']
cmd += ['-f', str(frequency)]
cmd += ['-l', str(length)]
cmd += ['-r', str(repeat)]
@Stonelinks
Stonelinks / sudoku.cpp
Created December 27, 2011 02:43
sudoku solver, because I'm bored
#include <iostream>
#include <vector>
int n = 0;
int board[9][9] = {
{n, 4, n, 1, n, n, n, n, 8},
{n, n, 8, n, 6, n, n, n, n},
{n, 1, n, 2, n, n, n, n, 9},
{n, n, n, 8, n, n, n, 9, n},
{2, n, 1, 9, n, 6, 8, n, 7},