Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 requests | |
import shutil | |
def _dl(url, path): | |
print("download", url, "to", path) | |
response = requests.get(url, stream=True) | |
if response.status_code != 200: | |
return |
This file contains 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 sys | |
import numpy as np | |
from vispy import app, scene | |
canvas = scene.SceneCanvas(keys='interactive') | |
view = canvas.central_widget.add_view() | |
view.set_camera('turntable', mode='perspective', up='z', distance=2, | |
azimuth=30., elevation=30.) | |
pos = .25 * np.random.randn(1000, 3) |
Consider your software broken if:
- You're the only one to understand how it works
- You can't remember what a function does just by reading its name
- You're not using a version control system
- You're not using continuous integration
- You're not continuously monitoring the quality of your code
- You have little or no unit tests
- You have little or no integration tests
- You don't use an issue tracker
This file contains 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
URL="https://github.com/jgm/pandoc/releases/latest" | |
PANDOCPAGE="$(wget $URL -q -O -)" | |
DEBURL="$(echo $PANDOCPAGE | grep -oP '"([^"]+.deb)"')" | |
DEBURL="${DEBURL:1:-1}" | |
URL="http://github.com/$DEBURL" | |
wget $URL -O pandoc.deb | |
sudo dpkg -i pandoc.deb |
This file contains 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
{ | |
"metadata": { | |
"name": "numpy_tricks" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains 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
Function collectionToArray(c As Collection) As Variant() | |
Dim a() As Variant: ReDim a(0 To c.Count - 1) | |
Dim i As Integer | |
For i = 1 To c.Count | |
a(i - 1) = c.Item(i) | |
Next | |
collectionToArray = a | |
End Function | |
This file contains 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
{ | |
"metadata": { | |
"name": "Velib" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
Distributing Python software to non-technical users is too hard. We need to make it simpler.
I'm imagining a tool based on conda.
Ideally I'd like to have something like this:
- I write an
environment.yml
file with the conda/pip dependencies for my software - I write an
installer.yml
file that describes my installer: package name, paths to logo/images, icon shortcuts for binaries, etc. - I type
build-installer
and a few files are created: mypackage.sh
: for Unix systems