All Projects → Almenon → Arepl Vscode

Almenon / Arepl Vscode

Licence: mit
program python in real-time

Programming Languages

python
139335 projects - #7 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Arepl Vscode

Horaires Ratp Api
Webservice pour les horaires et trafic RATP en temps réel
Stars: ✭ 232 (+63.38%)
Mutual labels:  hacktoberfest, real-time
Vscode Stylelint
Official Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 141 (-0.7%)
Mutual labels:  hacktoberfest, vscode-extension
Gwion
🎵 strongly-timed musical programming language
Stars: ✭ 235 (+65.49%)
Mutual labels:  hacktoberfest, real-time
Hedgedoc
HedgeDoc - The best platform to write and share markdown.
Stars: ✭ 2,498 (+1659.15%)
Mutual labels:  hacktoberfest, real-time
Oblecto
Oblecto is a media server, which streams media you already own, and is designed to be at the heart of your entertainment experience. It runs on your home server to index and analyze your media such as Movies and TV Shows and presents them in an interface tailored for your media consupmtion needs.
Stars: ✭ 67 (-52.82%)
Mutual labels:  hacktoberfest, real-time
Svn Scm
SVN support for VS Code
Stars: ✭ 172 (+21.13%)
Mutual labels:  hacktoberfest, vscode-extension
Roc Toolkit
Real-time audio streaming over the network.
Stars: ✭ 673 (+373.94%)
Mutual labels:  hacktoberfest, real-time
Nim
Streamline Your Node.js Debugging Workflow with Chromium (Chrome, Edge, More) DevTools.
Stars: ✭ 168 (+18.31%)
Mutual labels:  hacktoberfest, vscode-extension
Vscode Bcdn
A Plugin for easy bootstrap markup and template
Stars: ✭ 58 (-59.15%)
Mutual labels:  hacktoberfest, vscode-extension
Rocket.chat
The communications platform that puts data protection first.
Stars: ✭ 31,251 (+21907.75%)
Mutual labels:  hacktoberfest, real-time
Memento
Simple + Powerful interface to the Mnesia Distributed Database 💾
Stars: ✭ 597 (+320.42%)
Mutual labels:  hacktoberfest, real-time
Doxdocgen
Generate doxygen documentation from source code in VS Code
Stars: ✭ 127 (-10.56%)
Mutual labels:  hacktoberfest, vscode-extension
Vscode Debug Visualizer
An extension for VS Code that visualizes data during debugging.
Stars: ✭ 7,116 (+4911.27%)
Mutual labels:  hacktoberfest, vscode-extension
Css Flexbox Cheatsheet
VS Code extension that lets you open a CSS Flexbox cheatsheet directly in the editor.
Stars: ✭ 87 (-38.73%)
Mutual labels:  hacktoberfest, vscode-extension
Vscode Emacs Mcx
Awesome Emacs Keymap - VSCode emacs keybinding with multi cursor support
Stars: ✭ 135 (-4.93%)
Mutual labels:  hacktoberfest, vscode-extension
Tedivms Flask
Flask starter app with celery, bootstrap, and docker environment
Stars: ✭ 142 (+0%)
Mutual labels:  hacktoberfest
Actionsflow
The free Zapier/IFTTT alternative for developers to automate your workflows based on Github actions
Stars: ✭ 2,243 (+1479.58%)
Mutual labels:  hacktoberfest
Smoke
💨 Simple yet powerful file-based mock server with recording abilities
Stars: ✭ 142 (+0%)
Mutual labels:  hacktoberfest
Lacmus
Lacmus is a cross-platform application that helps to find people who are lost in the forest using computer vision and neural networks.
Stars: ✭ 142 (+0%)
Mutual labels:  hacktoberfest
Ultimate Java Resources
Java programming. All in one Java Resource for learning. Updated every day and up to date. All Algorithms and DS along with Development in Java. Beginner to Advanced. Join the Discord link.
Stars: ✭ 143 (+0.7%)
Mutual labels:  hacktoberfest

AREPL Build Status Downloads Downloads Gitter chat

AREPL automatically evaluates python code in real-time as you type.

The demo gif is a bit outdated

AREPL is availible for free on the vscode marketplace.

Usage

First, make sure you have python 3.7 or greater installed.

Open a python file and click on the cat cat in the top bar to the right to open AREPL. You can click the cat again to close.

Or run AREPL through the command search: control-shift-p

or use the shortcuts: control-shift-a (current doc) / control-shift-q (new doc)

Features

  • Real-time evaluation: no need to run - AREPL evaluates your code automatically. You can control this (or even turn it off) in the settings.

  • Variable display: The final state of your local variables are displayed in a collapsible JSON format.

  • Error display: The instant you make a mistake an error with stack trace is shown.

  • Settings: AREPL offers many settings to fit your user experience. Customize the look and feel, debounce time, python options, and more!

Misc

Dumping

If you want to dump local variables or dump variables at a specific point in your program you can use the dump function:

from arepl_dump import dump

def milesToKilometers(miles):
    kilometers = miles*1.60934
    dump() # dumps all the vars in your function when the function is called the first time

    # or dump when function is called for a second time
    dump(None,1)

milesToKilometers(2*2)
milesToKilometers(3*3)

for char in ['a','b','c']:
    dump(char,2) # dump a var at a specific iteration

a=1
dump(a) # dump specific vars at any point in your program
a=2

STDIN

see https://github.com/Almenon/AREPL-vscode/wiki/Using-AREPL-with-input

GUIS

see https://github.com/Almenon/AREPL-vscode/wiki/Using-AREPL-with-GUI's

#$end

Use the #$end comment to indicate the end of the real-time code. Code after #$end will not be executed in real-time. This is useful if you have something specific you want to run without running the entire file along with it. For example:

x = calculate_all_digits_of_pi()

#$end

# I can inspect variables without rerunning calculate_all_digits_of_pi
# the shortcut is control-enter - the code block should flash yellow.
print(x) # 3.14......

# I can also temporarily change the state of variables
# note that control-enter will run all adjacent lines of code
x = math.floor(x)
print(x) # 3

# i only want to do this once I've determined that x is correct
upload_results_to_s3(x)

Note that you can also use control-enter to run a block of code outside #$end.

Filtering variables from display

Don't want to see a variable in AREPL's result panel? Just add it to a variable named arepl_filter:

arepl_filter = ['a']
a = "foo" # this won't show up
b = 3 # this does

You can also filter out types:

arepl_filter_type=["<class 'str'>"]
c = "foo" # this won't show up
c = 3 # this does

Finally there is a super-powerful arepl_filter_function var you can use to totally customize what is shown:

from collections import namedtuple

Point = namedtuple('Point', ['x', 'y'])
p = Point(x=1, y=1)

def arepl_filter_function(var_dict):
    var_dict['p']=var_dict['p'].x + var_dict['p'].y
    return var_dict

# p will show up as 2

You can set default filters via the defaultFilterVars or defaultFilterTypes settings.

HOWDOI

You can use howdoi with arepl.

First install in the terminal / command line:

pip install howdoi

Then reopen arepl and you will be able to use howdoi to get answers to your questions. For example:

howdoi('calculate fibbonaci in python')

will give you a function to calcualate a fibonaci number

Variable Representation

I have overridden the display of some types (like datetime) to be more readable to humans.

If you want a type to be displayed in a particular manner just file an issue

#$save

This is buggy and I would suggest using the arepl_store variable instead

If you want to avoid a section of code being executed in real-time (due to it being slow or calling external resources) you can use #$save. For example:

def largest_prime_factor(n):
    i = 2
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
    return n

# this takes a looonnggg time to execute
result = largest_prime_factor(8008514751439999)

#$save
print("but now that i saved i am back to real-time execution")
import random
x = random.random()
#$save
print(x) # this number will not change when editing below the #$save line

Please note that #$save does not work with certain types, like generators. If #$save fails in pickling the code state file an issue so I can look into it.

More Stuff

Check out the wiki!

Contributing to the project

See the wiki page on getting started. Contributions welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].