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
# Install build tools | |
sudo apt-get update | |
sudo apt-get install -y build-essential git python-pip libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran python3-matplotlib libblas-dev liblapack-dev libatlas-base-dev python3-dev python3-pydot linux-headers-generic linux-image-extra-virtual unzip python3-numpy swig python3-pandas python-sklearn unzip python3-pip python3-venv | |
# Install CUDA 7 | |
# wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1410/x86_64/cuda-repo-ubuntu1410_7.0-28_amd64.deb | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1504/x86_64/cuda-repo-ubuntu1504_7.5-18_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1504_7.5-18_amd64.deb && rm cuda-repo-ubuntu1504_7.5-18_amd64.deb | |
sudo apt-get update | |
sudo apt-get install -y cuda |
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
Miscellaneous Symbols and Pictographs | |
🌀️ = [1F300] CYCLONE | |
🌁️ = [1F301] FOGGY | |
🌂️ = [1F302] CLOSED UMBRELLA | |
🌃️ = [1F303] NIGHT WITH STARS | |
🌄️ = [1F304] SUNRISE OVER MOUNTAINS | |
🌅️ = [1F305] SUNRISE | |
🌆️ = [1F306] CITYSCAPE AT DUSK | |
🌇️ = [1F307] SUNSET OVER BUILDINGS |
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
products = Product.select().where( | |
Product.id << [161,162,163,164,165]).where( | |
~(Product.brand_name >> None) | |
) |
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
// 2. | |
Purchases.shared.setAttributes(["favorite_workout" : "cycling"]) |
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
/* Bill Ticehurst, 2020 | |
Emits a minimal 16 x 16 gif suitable for use as an inline favicon | |
GIF spec at https://www.w3.org/Graphics/GIF/spec-gif89a.txt for the structure | |
Favicon formats supported at https://en.wikipedia.org/wiki/Favicon | |
For a transparent GIF (color_table = false, depend_on_background = true) this emits: | |
<link rel="icon" href="data:image/gif;base64,R0lGODlhEAAQAAAAACwAAAAAAQABAAACASgAOw=="> |
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
#include <math.h> | |
/* | |
Example application for doing FFT on a Particle Photon and sending the data to Processing on a computer | |
Designed for Phyiscal Computing Studio, Spring 2016, IDeATe @ Carnegie Mellon University: http://courses.ideate.cmu.edu/physcomp/s16/48-390/ | |
Inspired by Adafruit's FFT: Fun with Fourier Transforms tutorial: https://learn.adafruit.com/fft-fun-with-fourier-transforms/software | |
FFT function from Paul Bourke: http://paulbourke.net/miscellaneous/dft/ | |
TCP connection code provided by Alex Alspach |
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
# I needed to print out ascii tables from data in the form: | |
# [ ('column 0 title', 'column 1 title' ..), | |
# ('row 0, column 0 data', 'row 0, column 1 data' ...) ...] | |
# | |
# and surprisingly it got complicated because of variable lengths of the data. | |
# I googled for 'standard' ways of doing this and I found suggestions like: | |
# http://stackoverflow.com/questions/5909873/python-pretty-printing-ascii-tables | |
# ...which were a bit dated and hard to read or full scale modules like: | |
# | |
# http://pypi.python.org/pypi/texttable/ |
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 dj_database_url | |
TEST_DATABASES = { | |
'default': dj_database_url.config(env='TEST_DATABASE_URL') | |
} | |
# replace path below to point to HerokuTestSuiteRunner class | |
TEST_RUNNER = 'python.path.to.test_suite_runner.HerokuTestSuiteRunner' |
OlderNewer