Skip to content

Instantly share code, notes, and snippets.

View izikeros's full-sized avatar

Krystian Safjan izikeros

View GitHub Profile
@izikeros
izikeros / sphinx-documentation.md
Created September 17, 2022 21:47 — forked from rinaldo-rex/sphinx-documentation.md
Sphinx documentation cheatsheet

Overview

This document is a simple resource to create sphinx documentation for projects with python(or not). This isn't exhaustive, but it'll help us get started without much hassle, (which, is typical for sphinx generated documenting)

Prerequisites

For better results, ensure that you're inside a virtual env. This document assumes you're in a Pipenv based environment. Update it later to include other python package management tools (hopefully poetry)

@izikeros
izikeros / DataBricksNotebook2Ipynb.jq
Last active March 15, 2024 20:02 — forked from jnothman/DataBricksNotebook2Ipynb.jq
[Databricks notebook to ipynb] Approximately convert DataBricks notebook (unzipped .dbc file) to ipynb using jq #jupyter #databricks #notebook #jq
.language as $lang |
{
"metadata" : {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
@izikeros
izikeros / binance_ccxt.py
Last active March 14, 2024 10:01 — forked from rodrigo-brito/binance_ccxt.py
[CCXT example] Binance example of usage #crypto #python
class Binance:
def __init__(self, key, secret, test=False):
self.exchange = ccxt.binance({
'apiKey': key,
'secret': secret,
'enableRateLimit': True,
})
self.test = test
def buy(self, symbol, amount):
@izikeros
izikeros / README.md
Last active March 14, 2024 09:58 — forked from rodrigo-brito/main.py
[Trading on Binance] using Backtrader and CCXT #crypto

Backtrader integration with Binance

Backtrader does not allows natively for trading on Binance however it supports CCXT which is an universal interface to multiple exchanges. This example uses CCXT to allow Backtrader perform trades on this exchange.

Requirements

Create virtualenv, install ccxt store for backtrader:

pip install git+git://github.com/Dave-Vallance/bt-ccxt-store@master#bt-ccxt-store

and backtrader package

@izikeros
izikeros / README.md
Last active July 4, 2023 03:44 — forked from redpeacock78/docker.yml
lima + docker + docker-compose

lima + docker + docker-compose

Setup

$ brew install lima docker docker-compose
$ echo 'export DOCKER_HOST=unix://$HOME/docker.sock' >> ~/.zshrc
$ . ~/.zshrc

Start

@izikeros
izikeros / download_class_dojo_archive.py
Last active March 14, 2024 10:00 — forked from pohutukawa/download_class_dojo_archive.py
[ClassDojo download] Download all photos and videos from your Class Dojo account #classdojo
#!/usr/bin/env python3
"""
Download all ClassDojo photos and videos in your timeline.
by kecebongsoft
How it works:
1. Fetch list of items in the timeline, if there are multiple pages,
it will fetch for all pages.
@izikeros
izikeros / 1-macOS-10.15-catalina-setup.md
Created November 5, 2021 19:59 — forked from kevinelliott/1-macOS-10.15-catalina-setup.md
macOS 10.15 Catalina Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.15 Catalina Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.15 Catalina.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@izikeros
izikeros / Makefile
Last active July 18, 2024 07:09 — forked from kristopherjohnson/Makefile
[Makefile - HTML, PDF, DOCX from Markdown] Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
# Makefile
#
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <http://johnmacfarlane.net/pandoc/>
#
# Run "make" (or "make all") to convert to all other formats
#
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
@izikeros
izikeros / pandoc.Makefile
Created September 24, 2021 08:36 — forked from bertvv/pandoc.Makefile
Makefile for Markdown -> PDF using pandoc
# Generate PDFs from the Markdown source files
#
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LuaLaTeX
# - DejaVu Sans fonts
# Directory containing source (Markdown) files
source := src
@izikeros
izikeros / simple_transformer.py
Created September 22, 2021 18:52 — forked from wassname/simple_transformer.py
Transformer in ~80 lines of code from Thomas Wolf's tweet https://twitter.com/Thom_Wolf/status/1129658539142766592
"""
Transformer in ~80 lines of code.
From Thomas Wolf's tweet https://twitter.com/Thom_Wolf/status/1129658539142766592.
"""
import torch
from torch import nn
class Transformer(nn.Module):