We're getting ripped off. No matter what, we need to do something about it.
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
""" | |
Description: | |
Takes in a color image and creates a two CSV files storing downsized | |
matrix (grayscale) and 3-tensor representations of the image. | |
Instructions: | |
Put your image in the same folder as this file (tool4c.py), | |
then open a terminal in that folder and enter: | |
python tool4c <your_image> |
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
from svgpathtools import * | |
# create some example paths | |
path1 = CubicBezier(1,2+3j,3-5j,4+1j) | |
path2 = path1.rotated(60).translated(3) | |
# find minimizer | |
from scipy.optimize import fminbound | |
def dist(t): | |
return path1.radialrange(path2.point(t))[0][0] |
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
""" | |
An example of how to determine if an svg path is contained in another | |
svg path in Python. | |
Note: for discontinuous paths you can use the svgpathtools | |
Path.continuous_subpaths() method to split a paths into a list of its | |
continuous subpaths. | |
""" | |
from svgpathtools import * |
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
"""The goal of this gist is to show how to compute many points on a path | |
quickly using NumPy arrays. I.e. there's a much faster way than using, say | |
[some_path.point(t) for t in many_tvals]. The example below assumes the | |
`Path` object is composed entirely of `CubicBezier` objects, but this can | |
easily be generalized to paths containing `Line` and `QuadraticBezier` objects | |
also. | |
Note: The relevant matrix transformation for quadratics can be found in the | |
svgpathtools.bezier module.""" | |
import numpy as np |
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
"""Scrape the definition of a word (or phrase) from dictionary.com | |
Usage: | |
====== | |
python define.py onomatopoeia | |
Warning: | |
======== | |
Sometimes (at least with phrases) you'll be unexpectedly redirected | |
to the definition of another only loosely related word, |
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
"""Downloads ArXiv papers linked to in a Google Doc converted to HTML. | |
Notes: | |
------ | |
* tested on OS X with Python 3 | |
* Requires arxiv (`pip install arxiv`) | |
* Names of PDFs will be the papers' titles on ArXiv (with some | |
slight formatting changes). | |
""" |
Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:
TensorFlow is now distributed under an Apache v2 open source license on GitHub.
On Ubuntu 16.04LTS+:
Step 1. Install NVIDIA CUDA:
To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:
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
"""A real-time analog to midi converter. | |
Listens to you system's microphone and does its best to convert the | |
sounds it hears to a sequence of musical notes. It works ok... play | |
with the sampling settings to get results that fit your needs. | |
Usage Example: | |
-------------- | |
>>> from mic_listen import list_devices, MicListener | |
>>> list_devices() # to list system devices |
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
"""Implementation of RoI Pooling | |
Credit: This is from tutorial available at | |
https://medium.com/xplore-ai/992508b6592b | |
""" | |
import tensorflow as tf | |
from tensorflow.keras.layers import Layer |
OlderNewer