Demonstrates using d3.behavior.zoom
with a geographic projection. Based on an
example by Iain Dillingham.
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
""" | |
Usage: | |
Make sure that redis is running on localhost (or adjust the url) | |
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html | |
pip install -u uvicorn | |
Install dependencies |
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 pandas as pd | |
import numpy as np | |
def get_dataset(size): | |
# Create Fake Dataset | |
df = pd.DataFrame() | |
df['size'] = np.random.choice(['big','medium','small'], size) | |
df['age'] = np.random.randint(1, 50, size) | |
df['team'] = np.random.choice(['red','blue','yellow','green'], size) | |
df['win'] = np.random.choice(['yes','no'], size) |
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
# "Colorizing B/W Movies with Neural Nets", | |
# Network/Code Created by Ryan Dahl, hacked by samim.io to work with movies | |
# BACKGROUND: http://tinyclouds.org/colorize/ | |
# DEMO: https://www.youtube.com/watch?v=_MJU8VK2PI4 | |
# USAGE: | |
# 1. Download TensorFlow model from: http://tinyclouds.org/colorize/ | |
# 2. Use FFMPEG or such to extract frames from video. | |
# 3. Make sure your images are 224x224 pixels dimension. You can use imagemagicks "mogrify", here some useful commands: | |
# mogrify -resize 224x224 *.jpg | |
# mogrify -gravity center -background black -extent 224x224 *.jpg |
Homebank (http://homebank.free.fr) versteht nur seine eigenen CSV-Dateien. Hier sind zwei Konverter für Sparkassenkonten:
- Girokonto -> spk_csv-camt2homebank.py
- Kreditkarte -> kreditkarte-homebank.py
Es werden die Dateien kreditkarte_import.csv bzw. girokonto_import.csv erstellt bzw. überschrieben.
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
''' | |
Simple udp socket server | |
''' | |
import socket | |
import sys | |
import pyaudio | |
import numpy as np | |
class Receiver(object): |
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
''' | |
Simple udp socket server to stream audio from mic | |
''' | |
import pyaudio | |
import socket | |
import sys | |
class UDPstream(object): | |
def __init__(self, CLIENT_IP, PORT): |
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 sqlalchemy.ext.automap import automap_base | |
from sqlalchemy import create_engine, MetaData, Column, String, Integer | |
import pickle | |
from sqlalchemy.sql.schema import ForeignKey | |
# Create some tables in the database | |
engine = create_engine('sqlite://') | |
engine.execute('CREATE TABLE user (id INTEGER, name TEXT, favorite_color TEXT)') | |
engine.execute('CREATE TABLE profile (id INTEGER, userid INTEGER, summary TEXT)') |
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: | |
-- ------------ | |
-- | |
-- This is an example schema for storing collectd metrics in a TimescaleDB | |
-- dabase (see https://www.timescale.com/). It is based on the PostgreSQL | |
-- schema contributed by Sebastian Harl. | |
-- | |
-- Prerequisities: | |
-- --------------- | |
-- |
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
# remember to launch this with sudo so that sudo does not time out halfway | |
OPENCV_VERSION='4.5.1' # Version to be installed | |
#note this install script is without cuda | |
if [ `whoami` != 'root' ]; | |
then | |
echo "This program needs to be run using 'sudo'" | |
exit | |
fi | |
sudo apt -y update |
NewerOlder