Skip to content

Instantly share code, notes, and snippets.

View mmajewsk's full-sized avatar
🏠
Working from home

mwmajewsk mmajewsk

🏠
Working from home
View GitHub Profile
# Contributor License Agreement (CLA)
_For projects licensed under the Elastic License 2.0_
Thank you for your interest in contributing to this project. To ensure that all contributions can be used, licensed, and redistributed under the Elastic License 2.0 (ELv2), we require that all contributors agree to the following terms.
## 1. Definitions
- **"You"** means the individual submitting a contribution.
- **"Contribution"** means any code, documentation, or other material you intentionally provide to this project via pull request, issue, patch, or any other method.
## 2. License Grant
@mmajewsk
mmajewsk / xethzeur.py
Created November 24, 2021 09:40
snippet for viewing ETH EUR trading pair from kraken in XFCE
import requests
r = requests.get("https://api.kraken.com/0/public/OHLC?pair=XETHZEUR&interval=60")
data = r.json()
viewable = data['result']["XETHZEUR"][-1][-3]
print(viewable[:-3]+'€')
@mmajewsk
mmajewsk / Part2-foobar.ipynb
Created August 4, 2020 15:08
Why i hate matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mmajewsk
mmajewsk / .dir-locals.el
Created July 28, 2020 14:22
Emacs problem
((nil . ((eval . (
defvar projectile-main-project "/home/mwm/repositories/LHCb/ml_analysis_recreation"
)))))
@mmajewsk
mmajewsk / readme.md
Last active January 4, 2020 11:19
git use credentials fron commit

If you are lazy and want to set up credentials as in last commit

git config user.name $(git log --format='%an' -1)
git config user.email $(git log --format='%ae' -1)
@mmajewsk
mmajewsk / install_orbslam_stuff.sh
Created July 8, 2019 00:11 — forked from ducha-aiki/install_orbslam_stuff.sh
Install ORBSLAM + python bindings
#!/bin/bash
DIR1=$(pwd)
MAINDIR=$(pwd)/3rdparty
mkdir ${MAINDIR}
cd ${MAINDIR}
conda create -y -n "NavAgents" python=3.6
source activate NavAgents
conda install opencv -y
conda install pytorch torchvision -c pytorch -y
@mmajewsk
mmajewsk / dyntyphint.py
Created February 6, 2019 21:10
Dynamic type hinting in python
import random
from typing import get_type_hints
class Bar:
def foo(self, a: str) -> int:
return 1
class fakedict(dict):
@mmajewsk
mmajewsk / monitor_setting.md
Created September 10, 2018 09:32
monitor setting
no LGD 0x40a0 0x00000000 1366 768 60
@mmajewsk
mmajewsk / Part3-Copy1.ipynb
Created January 3, 2018 11:39
Pandas missaligned bars and ticks of bar plot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mmajewsk
mmajewsk / imu_interceptor.py
Created January 2, 2018 14:52
Python snippet for reading minimu9-ahrs output
import subprocess
import multiprocessing
class MultiImuSubprocess(multiprocessing.Process):
def __init__(self, result_queue, death_pill_queue, cmd, *args, **kwargs):
multiprocessing.Process.__init__(self)
self.result_queue = result_queue
self.death_pill_queue=death_pill_queue
self.data = None