Skip to content

Instantly share code, notes, and snippets.

View DamnWidget's full-sized avatar

Oscar Campos DamnWidget

View GitHub Profile
@DamnWidget
DamnWidget / events.txt
Created December 1, 2018 14:34
Events
report (size 8) (numbered) = 07 e0 01 01 01 00 00 00
report (size 8) (numbered) = 07 e0 01 01 00 00 00 00
report (size 8) (numbered) = 07 e0 01 01 02 00 00 00
report (size 8) (numbered) = 07 e0 01 01 00 00 00 00
report (size 8) (numbered) = 07 e0 01 01 01 00 00 00
@DamnWidget
DamnWidget / rdesc.log
Created December 1, 2018 14:32
rdesc
05 0d 09 02 a1 01 85 07 09 20 a0 14 25 01 75 01 09 42 09 44 09 46 95 03 81 02 95 03 81 03 09 32 95 01 81 02 95 01 81 03 75 10 95 01 a4 05 01 65 13 55 fd 34 09 30 27 a0 d7 00 00 47 e8 35 00 00 81 02 09 31 27 c4 86 00 00 47 b1 21 00 00 81 02 b4 09 30 27 ff 07 00 00 81 02 c0 c0 05 01 09 07 a1 01 85 f7 14 25 01 75 01 05 0d 09 39 a0 09 44 95 01 81 02 05 01 09 30 09 31 95 02 81 02 95 15 81 01 05 09 19 01 29 0a 95 0a 81 02 c0 05 01 09 05 a0 05 09 19 01 29 02 95 02 81 02 95 14 81 01 c0 c0
INPUT(7)[INPUT]
Field(0)
Physical(Digitizers.Stylus)
Application(Digitizers.Pen)
Usage(3)
Digitizers.TipSwitch
Digitizers.BarrelSwitch
Digitizers.TabletPick
@DamnWidget
DamnWidget / Dockerfile
Created July 21, 2016 20:38
Anaconda docker composer example
FROM python:2.7
ADD . /code
WORKDIR /code
RUN pip install -r requirements.txt
CMD python app.py
; Aggregations
[aggregations]
; The aggregations are configured in subsections
; Each subsection is a single aggregation and it
; contains the required information to set up the
; aggreagtion. If something is missconfigured, the
; aggworker will discard it and profusely complain about
; Real Time Global, mega table for CitusDB
[aggregations "real_time_global"]
@DamnWidget
DamnWidget / deallocations.log
Created April 29, 2015 10:37
Log from the aggregator deallocations yesterday
2015/04/28 00:03:36 Allocated memory is 11525491288 bytes (10GB), returning resources to the OS
2015/04/28 00:19:34 Allocated memory is 11038402352 bytes (10GB), returning resources to the OS
2015/04/28 00:26:02 Allocated memory is 10783616920 bytes (10GB), returning resources to the OS
2015/04/28 00:29:36 Allocated memory is 10982464344 bytes (10GB), returning resources to the OS
2015/04/28 00:33:35 Allocated memory is 11457765376 bytes (10GB), returning resources to the OS
2015/04/28 00:37:34 Allocated memory is 11779587928 bytes (10GB), returning resources to the OS
2015/04/28 00:53:37 Allocated memory is 10963104776 bytes (10GB), returning resources to the OS
2015/04/28 01:02:02 Allocated memory is 10847689312 bytes (10GB), returning resources to the OS
2015/04/28 01:03:35 Allocated memory is 11455761632 bytes (10GB), returning resources to the OS
2015/04/28 01:09:35 Allocated memory is 11138613400 bytes (10GB), returning resources to the OS
@DamnWidget
DamnWidget / pprof_cpu.svg
Created September 23, 2014 18:44
SVG Profiling
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DamnWidget
DamnWidget / stupid_benchmark
Created April 20, 2013 14:29
Just some benchmark comparission for mamba vs google
# Google
GentooStation damnwidget # ab -n 1000 -c 160 http://www.google.ie/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking www.google.ie (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
@DamnWidget
DamnWidget / wed_sat_calculate.py
Last active December 15, 2015 09:49
Calculate the next wednesday/saturday date
from datetime import datetime, timedelta
def get_next_day(d, day=2):
return d + timedelta((day - d.weekday()) % 7)
def get_next_lotto_day(d):
next_wednesday = get_next_day(d)
next_saturday = get_next_day(d, 5)
@DamnWidget
DamnWidget / .zshrc
Created January 29, 2013 10:27
Just execute keychain
# execute keychain in zsh session start
eval $(keychain --eval --agents ssh -Q --quiet ~/.ssh/id_rsa)
@DamnWidget
DamnWidget / gist:4286638
Created December 14, 2012 16:21
nre refactored function inside an object
def _exposure_adjust(self):
"""
Calculates de overall effect of this bet to exposures & stakes
"""
adjustments = {
'exposure_win': Decimal('0.0'),
'exposure_place': Decimal('0.0'),
'stake_win': Decimal('0.0'),
'stake_place': Decimal('0.0'),