Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| """ | |
| stable diffusion dreaming | |
| creates hypnotic moving videos by smoothly walking randomly through the sample space | |
| example way to run this script: | |
| $ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry | |
| to stitch together the images, e.g.: | |
| $ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4 |
| from SPARQLWrapper import SPARQLWrapper, JSON | |
| import html, datetime, os, json, glob, time | |
| def send_sparql_query(q, timeout=None, sleep=0): | |
| time.sleep(sleep) | |
| try: | |
| sparql = SPARQLWrapper("http://dbpedia.org/sparql") | |
| sparql.setReturnFormat(JSON) | |
| if timeout: sparql.setTimeout(timeout) | |
| sparql.setQuery(q) |
Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
# ffprobe -v error -select_streams a:0 -show_chapters -of csv=print_section=1 ABGT160_847378.m4a
Example output:
chapter,0,1/600,0,0.000000,18523,30.871667,Group Therapy Intro - ABGT160
chapter,1,1/600,18523,30.871667,146505,244.175000,1. Arty ‘Kate’ [2015 Remix] (Anjunabeats)
chapter,2,1/600,146505,244.175000,262290,437.150000,2. Flashtech ’Shattered Dreams’ (Silk)
chapter,3,1/600,262290,437.150000,444517,740.861667,3. Bruce Gibson ‘Kristine’ [Adrian Alexander Remix] (Elliptical Sun)
| from tsne import bh_sne | |
| import numpy as np | |
| from skimage.transform import resize | |
| from matplotlib import pyplot as plt | |
| def gray_to_color(img): | |
| if len(img.shape) == 2: | |
| img = np.dstack((img, img, img)) | |
| return img |
| L.CartoDB = L.GeoJSON.extend({ | |
| initialize: function (url, options) { | |
| L.Util.setOptions(this, options); | |
| this._layers = {}; | |
| var self = this; | |
| if (url) { | |
| this._jsonp(url, function(geojson){ |
| def format_filename(s): | |
| """Take a string and return a valid filename constructed from the string. | |
| Uses a whitelist approach: any characters not present in valid_chars are | |
| removed. Also spaces are replaced with underscores. | |
| Note: this method may produce invalid filenames such as ``, `.` or `..` | |
| When I use this method I prepend a date string like '2009_01_15_19_46_32_' | |
| and append a file extension like '.txt', so I avoid the potential of using | |
| an invalid filename. | |