This file contains hidden or 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
| package main | |
| import ( | |
| "log" | |
| "os/exec" | |
| "time" | |
| ) | |
| func main() { | |
| cmd := exec.Command("ping", "www.baidu.com") |
This file contains hidden or 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
| """ | |
| This creates the following GIF, where the text appears to be "embedded" | |
| in the video and "disappears" behind rapunzel. | |
| http://i.imgur.com/gxEHfLX.gif | |
| """ | |
| from moviepy.editor import * | |
| import numpy as np | |
| import skimage.morphology as skm |
This file contains hidden or 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 alternative text clip for Moviepy, relying on Gizeh instead of ImageMagick | |
| Advantages: | |
| - Super fast (20x faster) | |
| - no need to install imagemagick | |
| - full-vector graphic, no aliasing problems | |
| - Easier font names | |
| Disadvantages: |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| func Decorate(impl interface{}) interface{} { | |
| fn := reflect.ValueOf(impl) |