• Stars
    star
    320
  • Rank 131,126 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

hot reload your python code!

hotreload: hot reload your python code!
hotreload.py
hot reload your python code!

Run any arbitrary python script every time the code changes in the file.

installation

Get the package from PyPI with pip3 install hotreload.

warning

You shouldn't do this and this can have unexpected, unintended repurcusions. Proceed with caution, you have been warned!

usage

Say you have script (script.py) that you want to run every time the code changes in that file.

To do that, it is as simple as doing this:

import time
import logging
from hotreload import Loader


if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
    script = Loader("script.py")

    while True:
        # Check if script has been modified since last poll.
        if script.has_changed():
            # Execute a function from script if it has been modified.
            script.main()

        time.sleep(1)

author

Sayan Goswami © 2020

More Repositories

1

jf

flatten them json
Rust
123
star
2

pytorch-segnet

SegNet implementation in Pytorch framework
Python
87
star
3

dankNotDank

[WIP] Rate the "dankness" of memes.
Jupyter Notebook
19
star
4

deepcosegmentation.pytorch

Siamese network based Deep Co-segmentation
Jupyter Notebook
10
star
5

crappybird

a clone of the flappy bird game
C++
9
star
6

metal.compute

a verbose example on using metal with C++ to perform arbitrary compute on GPUs
C++
8
star
7

cryptocoin-quotes

MacOS status bar app to retrieve cryptocoin quotes
Python
7
star
8

maildrop.cli

an unofficial cli client for maildrop.cc
Go
4
star
9

oneline

firefox oneline customization with tst
CSS
4
star
10

EarthView

Google Earth View image download-er and parser with multi-threading !
Python
3
star
11

arxivGraph

Research graph for papers submitted on arXiv
Python
3
star
12

esoterica

the wackiest, pessimal of algorithms that you won't ever need
Python
3
star
13

LinkTo

URL Shortener using Flask and Redis
JavaScript
2
star
14

pytgress

Beautiful progress bars for the CLI
Python
2
star
15

bfutil

A collection of utilities to make Brainf**k great again
Brainfuck
2
star
16

maql

Multi agent Q learning
Python
2
star
17

classified

redact/sanitise your classified text in Go!
Go
2
star
18

infinity

signed arbitrary precision arithmetic library
C++
2
star
19

flow

Python Control Flow Visualiser
JavaScript
2
star
20

fsmutil

Finite State Machines (FSM) builder!
Python
2
star
21

hn

yet another hacker news clone
TypeScript
2
star
22

say4n

Ruby
1
star
23

part

procedural art
Go
1
star
24

quic-echo

Echo client, server over the QUIC protocol
Go
1
star
25

srijan18

Srijan '18 Temporary Landing Page
CSS
1
star
26

interpreter

Python
1
star
27

pytorch-gan

Generative Adversarial Networks in pytorch!
Jupyter Notebook
1
star
28

dgraph

generate c++ dependency graphs
Python
1
star
29

minesweeper-py

Minesweeper implemented in python
Python
1
star
30

abc

CSS
1
star
31

GameOfLife

Visual simulation of Conway's Game of Life
Python
1
star
32

AutoSIGN

A Signature Validation and Mandate Verification System by using Siamese Networks and One-Shot Learning.
Jupyter Notebook
1
star
33

dns.amplify

a tiny proof of concept to understand dns amplification attacks
Go
1
star
34

ipc

interprocess communication
Python
1
star
35

pyscuss

A realtime non persistent discussion thread made with python!
JavaScript
1
star
36

kaggle

A collection of Kaggle solutions.
Jupyter Notebook
1
star
37

udict

Android client for Urban Dictionary
Java
1
star
38

resume

say4n's resume
TeX
1
star