jenkins_url
+ /api/json?tree=jobs[name,color]
jenkins_url
+ /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
A script to get the version of Python by which the file was compiled | |
""" | |
from __future__ import print_function | |
import binascii | |
import os |
#!/bin/sh | |
# | |
# Script prints gdb stack of the process with a specified pid | |
if [ -z $1 ]; then | |
echo "Usage: $0 pid" | |
exit 1 | |
fi | |
PID=$1 |
# | |
# read/write access to python's memory, using a custom bytearray. | |
# some code taken from: http://tinyurl.com/q7duzxj | |
# | |
# tested on: | |
# Python 2.7.10, ubuntu 32bit | |
# Python 2.7.8, win32 | |
# | |
# example of correct output: | |
# inspecting int=0x41424344, at 0x0228f898 |
package main | |
import ( | |
"log" | |
"syscall" | |
"unsafe" | |
) | |
var ( | |
kernel32 = syscall.NewLazyDLL("kernel32.dll") |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
#!/usr/bin/env python2.7 | |
import ast | |
import itertools | |
import fnmatch | |
import os | |
import sys | |
class DocstringScanner(object): |
# Now available here: https://github.com/y0ast/pytorch-snippets/tree/main/minimal_cifar |