Skip to content

Instantly share code, notes, and snippets.

@plumps
plumps / index.html
Created April 5, 2017 19:45
Tribute to Kraftwerk
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
<div class="container-fluid">
<h1 id="h">
<span class="yellow">K</span><span class="orange">R</span><span class="fuschia">A</span><span class="purple">F</span><span class="blue">T</span>WERK</h1>
<div id="sub">pioneers of electronic music</div>
<div class="row">
</p>
<div class="col-xs-6">
<p class="grey">// Introduction ----------</p>
@plumps
plumps / madlibs.py
Created February 22, 2017 22:47
automatetheboring shit: chapter 8, madlibs
# Create a Mad Libs program that reads in text files and lets the user add
# their own text anywhere the word ADJECTIVE, NOUN, ADVERB, or VERB
# appears in # the text file. For example, a text file may look like this:
# The ADJECTIVE panda walked to the NOUN and then VERB. A nearby NOUN was
# unaffected by these events.
# The program would find these occurrences and prompt the user to replace them.
# Enter an adjective:
@plumps
plumps / input.json
Last active November 3, 2016 12:48
{
"global": false,
"node": "39a9ce98-f239-47dc-b0ff-becb4858e215",
"configuration": {
"expand_structured_data": false,
"force_rdns": false,
"store_full_message": false,
"bind_address": "0.0.0.0",
"recv_buffer_size": "262144",
"allow_override_date": true,
@plumps
plumps / buildout.py
Created November 2, 2016 09:06
directory deployment failed
➜ fc.directory.deployment default ./batou deploy vagrant-dev
Installing setuptools==19.7
Installing hg+https://bitbucket.org/flyingcircus/batou_ext@c86159a8a0e8#egg=batou_ext
batou/1.3b4.dev0 (CPython 2.7.12-final0, Darwin 15.6.0 x86_64)
=================================================================== Preparing ===================================================================
main: Loading environment `vagrant-dev`...
main: Verifying repository ...
You are using rsync. This is a non-verifying repository -- continuing on your own risk!
main: Loading secrets ...

Keybase proof

I hereby claim:

  • I am plumps on github.
  • I am plumps (https://keybase.io/plumps) on keybase.
  • I have a public key ASAGy7UmqD27fji6WUXuWUAi3YcTKN1YkhvZA1d9Qlh5FAo

To claim this, I am signing this object:

class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
for cx, x in enumerate(nums):
for cy, y in enumerate(nums):
if x + y == target and cx != cy:
@plumps
plumps / ml-python-env.nix
Created October 17, 2016 21:21
python env for #ml
with import <nixpkgs> {};
with python35Packages;
python.withPackages (ps: with ps; [ numpy pandas matplotlib jupyter ])
@plumps
plumps / lib.py
Last active October 12, 2016 20:21
converted to python3
import os
import mmap
import ctypes
import struct
class SHMWriter(object):
def __init__(self, filename='/tmp/mmaptest'):
self.filename = filename
---
criticalpatterns:
- '[Aa]bort|ABORT'
- '[Ee]rror|ERROR'
- '[Ff]atal|FATAL'
- 'Oops:'
- 'kernel: .* BUG:'
- 'kernel: .*megaraid mbox: reset sequence completed sucessfully'
- 'kernel: .*sd.* Unhandled sense code'
- 'kvm: .* cpu.* unhandled (rd|wr)msr'
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCt1XO6oiCeXJj6e3Ry2IGE+HFrq8GQfAOwNaJOwyxH7gtfmQ22HeosFBVnzRgi6xrOtJhEbi0gfG26Evq6dNSXlxPrQ1bsFFiY0sErfPd/5oEbYrXnr++uNKd+JY87kZ1IVVIWSPOC0aaoX4HLvo9SYtWg6PVlXtZYD0o7IE+8OPa9JsFfaKWWPsYh2wDevw/GqwCHSnTSp7Tl8cwIot+zj9EjUI1WPB+1Vk4eIeQoxIG/XBNq43j9Qei5o+0HQIVEqjPq3RvdTKpDxghRLj8SLmOIAuE/HDovvKx2aOU3ccpwp/Iomupy6NeJpXdmkuCXT+1LVeZm2Exggnhlinu/ plumps@Maksims-MacBook-Pro.local