Skip to content

Instantly share code, notes, and snippets.

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

traBpUkciP Duroktar

🏠
Working from home
  • Duroktar Software
  • Canada
View GitHub Profile
@Duroktar
Duroktar / store.py
Created September 23, 2017 16:40
A basic Redux store for Python in 50 lines of code (including comments)
def createStore(reducer, state, enhancer):
"""
Store instance constructor
Usage:
.. code-block: python
from store import createStore
@Duroktar
Duroktar / package.json
Created September 23, 2017 16:34
Continuous TDD with pytest in Python using NPM and Nodemon
{
"name": "pytest-nodemon-watch",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"test": "pytest",
"test:watch": "nodemon --exec \"pytest\" *.py"
},
"nodemonConfig": {
"ignore": [
@Duroktar
Duroktar / EXAMPLE.md
Last active August 3, 2017 07:00
Auto Setup a Cloned Git-Flow Style Repository.
@Duroktar
Duroktar / goreloader.py
Created May 7, 2017 22:11
Simple file watcher I wrote for future transcription to golang
#!/usr/bin/env python
import os
import sys
import subprocess
import time
class Watcher:
_process = None
@Duroktar
Duroktar / fstring.py
Last active November 3, 2022 17:09
f-string like behavior in Python 2
# -*- coding: utf-8 -*-
"""Python2 f-string like behavior"""
from __future__ import print_function
import inspect
import re
class F(object):
"""String formatter based on Python 3.6 'f' strings