Skip to content

Instantly share code, notes, and snippets.

View micmarty's full-sized avatar
🦀
Working on Miro SDK for Rust

Michał Martyniak micmarty

🦀
Working on Miro SDK for Rust
View GitHub Profile
@micmarty
micmarty / links.md
Created November 19, 2019 21:35
obrona
# task_a.py
import re
def is_valid_identity_number(number: str) -> bool:
return re.search("^[A-Z]{3}[0-9]{6}$", number)
# task_b.py
# Bad code example (no switch statement in Python)
def multilabel_precision(y_pred: Tensor, y_true: Tensor, thresh: float = 0.2) -> Rank0Tensor:
# Source: https://github.com/fastai/fastai/blob/master/fastai/metrics.py#L13
# Sigmoid is used for multi-label classification, softmax for single-label
y_pred = y_pred.sigmoid()
# Cherry-pick highest activations from predictions
y_pred = (y_pred > thresh).float()
y_true = y_true.float()
# Calculate num of true positives for each class
from bokeh.plotting import figure, show, output_file, gridplot, save, gridplot
from bokeh.layouts import gridplot
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
from bokeh.io import curdoc
import json
import pandas as pd
@micmarty
micmarty / gist:c9ed2bd87e1916252b0838ceaa8478f0
Created November 25, 2018 15:16
Deepdrive 2.1 (deepdrive_sim branch) on Windows 10 (UE 4.18.3) - Project loading, unexpected termination
Log file open, 11/24/18 22:13:36
LogWindows: Failed to load 'aqProf.dll' (GetLastError=126)
LogWindows: File 'aqProf.dll' does not exist
LogWindows: Failed to load 'VSPerf140.dll' (GetLastError=126)
LogWindows: File 'VSPerf140.dll' does not exist
LogWindows: Failed to load 'VtuneApi.dll' (GetLastError=126)
LogWindows: File 'VtuneApi.dll' does not exist
LogWindows: Failed to load 'VtuneApi32e.dll' (GetLastError=126)
LogWindows: File 'VtuneApi32e.dll' does not exist
LogInit: Display: Running engine for game: DeepDrive
@micmarty
micmarty / ISSUE_TEMPLATE.md
Created September 10, 2018 11:30
Guide for TensorHive Bug Hunters (issue template)

Subject of the issue

Describe your issue here.

Your environment

List relevant info:

  • OS distribution, version
  • TensorHive and API version
  • Versions of installed dependencies
  • Essential hardware specs (GPU model)
@micmarty
micmarty / sketch.md
Last active July 13, 2018 13:11
CUDNN GTX 660
@micmarty
micmarty / api.py
Created August 13, 2017 19:49
To make it work simply run on: Terminal #1 -> python3 server.py, Terminal #2 -> python3 client.py
# api.py
from jsonrpc import dispatcher
import subprocess
'''
This class is a communication standard between Server and Client.
Methods specified below are allowed to be executed server-side
on client request(RPC - Remote Procedure Call)
'''
# TODO use methods provided by KernelHive
@micmarty
micmarty / sh
Last active June 30, 2017 10:03
# Terminal #1:
iperf -s
# Terminal #2
iperf -c localhost
# Terminal #3
# nowy sztuczny lancuch
sudo iptables --new-chain MM_FORWARD