I hereby claim:
- I am herrfz on github.
- I am herrfz (https://keybase.io/herrfz) on keybase.
- I have a public key whose fingerprint is 76B8 3730 D93D 983E 887F 109E 9E04 2CAA 0416 640D
To claim this, I am signing this object:
from itertools import repeat | |
def to_roman(n): | |
return (''.join(repeat('I', n)) | |
.replace('IIIII', 'V') | |
.replace('VV', 'X') | |
.replace('XXXXX', 'L') | |
.replace('LL', 'C') | |
.replace('CCCCC', 'D') | |
.replace('DD', 'M') |
import socket | |
addr_info = socket.getaddrinfo("towel.blinkenlights.nl", 23) | |
addr = addr_info[0][-1] | |
s = socket.socket() | |
s.connect(addr) | |
while True: | |
data = s.recv(500) | |
print(str(data, 'utf8'), end='') |
# Python 3 | |
def reverse_dotted_ipv6(address): | |
ADDR_HEX_LEN = 32 | |
GROUP_LEN = 4 | |
try: | |
splitted = address.replace('::', ':0000:').split(':') # check for grouping format | |
if len([x for x in splitted if len(x) != GROUP_LEN]) != 0: | |
return '(╯°□°)╯︵ ┻━┻)' | |
bytearray.fromhex(address.replace(':', '')) # check for non-hex character |
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:05422648a49f22daa0f624f940cf7c2a837c449095c78bce172b4a5073a0084c" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
I hereby claim:
To claim this, I am signing this object:
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
from sklearn.base import BaseEstimator, TransformerMixin | |
class Transformer(BaseEstimator, TransformerMixin): | |
def __init__(self, fn): | |
self.fn = fn | |
def fit(self, X, y): | |
return self | |
def transform(self, X): |
# Reuters-21578 dataset downloader and parser | |
# | |
# Author: Eustache Diemert <[email protected]> | |
# http://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html | |
# | |
# Modified by @herrfz, get pandas DataFrame from the orig SGML | |
# License: BSD 3 clause | |
from __future__ import print_function |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* | |
* MCrypt API available online: | |
* http://linux.die.net/man/3/mcrypt | |
*/ | |
#include <mcrypt.h> |
package com.triagnosys.dms.tester; | |
import one_thousand_things; | |
public class TestCases extends TestCase { | |
private static final String SOME_CONSTANTS; | |
public void testGetSession() throws AxisFault { | |
System.out.println("Testing DMS getSession"); |