Skip to content

Instantly share code, notes, and snippets.

View mrfuxi's full-sized avatar
🐍
Python - Software Engineering Consultant

Karol Duleba mrfuxi

🐍
Python - Software Engineering Consultant
View GitHub Profile
@mrfuxi
mrfuxi / README.md
Last active June 30, 2021 21:49
How to adjust XPS 9500 keyboard
@mrfuxi
mrfuxi / tag_exec.js
Created July 19, 2018 13:16
Jupyter Notebook extension to include cell metadata in execute_request message
define([
'base/js/namespace',
'notebook/js/codecell'
], function (
Jupyter,
codecell
) {
"use strict";
return {
@mrfuxi
mrfuxi / gist:246d866921ddb8ef4f0994d69579eace
Last active November 29, 2016 20:46
Linux mouse sensivitiy
Source: https://www.reddit.com/r/Fedora/comments/4mcya9/no_mouse_sensitivity_slider_in_fedora_23/
xinput --list
xinput --list-props 16
xinput --set-prop 16 284 0.30000
@mrfuxi
mrfuxi / process.go
Created January 29, 2016 19:26
Trying to use OpenCV with Go - static binary
package main
// #cgo LDFLAGS: --static
// #cgo CPPFLAGS: -L/usr/lib/x86_64-linux-gnu/ -I/usr/include/opencv
// #cgo CXXFLAGS: -L/usr/lib/x86_64-linux-gnu/ -I/usr/include/opencv
// #cgo LDFLAGS: -L/usr/lib/x86_64-linux-gnu/ -I/usr/include/opencv
// #cgo LDFLAGS: -lopencv_imgproc -lopencv_core
// #cgo LDFLAGS: -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab
// #cgo LDFLAGS: -lm -lstdc++

The only reason coders' computers work better than non-coders' computers is coders know computers are schizophrenic little children with auto-immune diseases and we don't beat them when they're bad.

from: programming-sucks

#!/usr/bin/env python
import requests
import urllib
import time
import webbrowser
import json
AUTH_JSON = {
"installed": {
@mrfuxi
mrfuxi / main_test.go
Created October 18, 2014 22:50
GAE Test
package main //this is important
inst, err = aetest.NewInstance(options)
if err != nil {
panic(err)
}
req, err = inst.NewRequest("GET", "/", nil)
if err != nil {
panic(err)
@mrfuxi
mrfuxi / bashrc
Created July 7, 2014 07:19
Keyboard hash sign
xmodmap -e "keycode 12=3 numbersign"
@mrfuxi
mrfuxi / python_resources.md
Created December 16, 2013 16:58 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@mrfuxi
mrfuxi / timing.cpp
Created September 6, 2013 11:10
C++ timing
#include <sys/time.h>
struct timeval t0;
gettimeofday(&t0, NULL);
// Do stuff
struct timeval t1;
gettimeofday(&t1, NULL);