This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import curses | |
def main(w): | |
curses.use_default_colors() | |
window_height, window_width = w.getmaxyx() | |
player_y = window_height / 2 | |
player_x = window_width / 2 | |
def redraw_player(): | |
w.delch() | |
w.move(player_y, player_x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
os.system('git clone https://github.com/VCVRack/community.git') | |
plugin_dir = os.path.join(os.getcwd(), 'community', 'plugins') | |
for plugin_slug_file in os.listdir(plugin_dir): | |
with open(os.path.join(plugin_dir, plugin_slug_file)) as f: | |
source_url = json.load(f).get('source') | |
if source_url: | |
source_url = source_url.rstrip('/') | |
if source_url.endswith('.git'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n,r,c=31,range,'x ' | |
s=map(r,[n]*n) | |
def f(x): | |
q=r(x,n-x) | |
for i in q: | |
for j in q:s[i][j]=c[x%2] | |
for i in r(0,n/2,2):f(i),f(i+1);s[i+2][i+1],s[i+1][i]=c | |
for r in s:print ' '.join(r) |