** Step 1 **
Install ffmpeg with the vidstab plugin.
- OSX: Install via Homebrew -
brew install ffmpeg --with-libvidstab
- Linux: download binaries here (vidstab included)
- Windows: download binaries here (vidstab included)
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Implements Partial Directed Coherence and Direct Transfer Function | |
using MVAR processes. | |
Reference | |
--------- | |
Luiz A. Baccala and Koichi Sameshima. Partial directed coherence: | |
a new concept in neural structure determination. |
** Step 1 **
Install ffmpeg with the vidstab plugin.
brew install ffmpeg --with-libvidstab
import pygame | |
from pygame.locals import * | |
class Game(object): | |
"""docstring for Game""" | |
def __init__(self,arg): | |
self.arg = arg | |
self.fullscreen = False | |
img = pygame.image.load('image.png') |
A quick way to render latex in markdown
![formula]("https://render.githubusercontent.com/render/math?math=e^{i \pi} = -1")
![formula]("https://render.githubusercontent.com/render/math?math=e^{i \pi} = -1")
<img src="https://render.githubusercontent.com/render/math?math=e^{i \pi} = -1" />
using Images | |
# FFTW.set_num_threads(2) | |
""" | |
opticalFlow(im1::Array, im2::Array, kps::Array{CartesianIndex{2},1}; windowSize=15) | |
Parameters: | |
- im1: An Image array, the first frame in time. | |
- im2: The second frame in time, must be the same size as im1 | |
- kps: Key points, or points of interest within the image where the optical flow is expected. | |
- windowSize: Window size for solving the flow equations. Default 15. | |
""" |
using Flux | |
using Flux: onehot, argmax, chunk, batchseq, throttle, crossentropy | |
using StatsBase: wsample | |
using Base.Iterators: partition | |
cd(@__DIR__) | |
text = collect(repeat(readstring("prince_eo.txt"), 20)) | |
alphabet = [unique(text)..., '_'] | |
text = map(ch -> onehot(ch, alphabet), text) |
using SerialPorts | |
s = SerialPort("/dev/ttyACM1", 250000) | |
write(s, "Hello World!\n") | |
close(s) |
# This will create a dist directory containing the executable file, all the data | |
# directories. All Libraries will be bundled in executable file. | |
# | |
# Run the build process by entering 'pygame2exe.py' or | |
# 'python pygame2exe.py' in a console prompt. | |
# | |
# To build exe, python, pygame, and py2exe have to be installed. After | |
# building exe none of this libraries are needed. | |
#Please Note have a backup file in a different directory as if it crashes you | |
#will loose it all!(I lost 6 months of work because I did not do this) |
#!/usr/bin/python | |
''' | |
InFB - Information Facebook | |
Usage: infb.py user@domain.tld password | |
infb.py | |
http://ruel.me |