Skip to content

Instantly share code, notes, and snippets.

View ericklarac's full-sized avatar
🚀
I may be slow to respond.

Erick Lara ericklarac

🚀
I may be slow to respond.
View GitHub Profile
@ericklarac
ericklarac / ffmpeg-compress-mp4
Created November 2, 2020 05:12 — forked from karltaylor/ffmpeg-compress-mp4
Compress MP4 for online content.
ffmpeg -i input.mp4 -codec:v libx264 -preset slow -b:v 1000k -maxrate 1500k -bufsize 1500k -vf scale=1080:-1 -threads 0 -codec:a libfdk_aac -b:a 128k output.mp4
ffmpeg -i movie.mov -vcodec copy -acodec copy out.mp4
# -*- coding: utf-8 -*-
"""TF-Hub: Fast Style Transfer for Arbitrary Styles.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/github/tensorflow/hub/blob/master/examples/colab/tf2_arbitrary_image_stylization.ipynb
##### Copyright 2019 The TensorFlow Hub Authors.
# -*- coding: utf-8 -*-
"""TF-Hub: Fast Style Transfer for Arbitrary Styles.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/github/tensorflow/hub/blob/master/examples/colab/tf2_arbitrary_image_stylization.ipynb
##### Copyright 2019 The TensorFlow Hub Authors.
CALC CIRC SPIC MISC ARCH ASYM NORM B
0 1 0 0 0 0 0 1
0 1 0 0 0 0 0 1
0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 0
0 1 0 0 0 0 0 1
0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 1 0
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
GeoPoint;GeoShape;CODIGO;ESTADO
20.8963582009, -101.021695064;"{""type"": ""Polygon"", ""coordinates"": [[[-100.2802963256836, 20.204509735107422], [-100.34860229492188, 20.057220458984375], [-100.48139953613281, 19.907779693603516], [-100.67919921875, 19.985279083251953], [-100.84140014648436, 19.927499771118164], [-100.89839935302733, 19.941110610961914], [-100.91529846191406, 20.036659240722656], [-100.9844970703125, 20.05971908569336], [-101.15440368652344, 20.086389541625977], [-101.27439880371094, 20.023889541625973], [-101.36109924316405, 20.03527069091797], [-101.4092025756836, 20.07999992370605], [-101.39939880371092, 20.17860984802246], [-101.46060180664062, 20.333679199218746], [-101.60690307617188, 20.318050384521484], [-101.67389678955078, 20.19083023071289], [-101.82080078125, 20.21194076538086], [-101.88890075683594, 20.191110610961914], [-101.92030334472655, 20.211109161376953], [-101.95059967041014, 20.36444091796875], [-101.98059844970703, 20.367290496826172], [-101.99420166015625, 20.326940
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Erick Lara C. | @ericklarac
import time, datetime
class Timer():
"""docstring for Timer."""
def __init__(self):
self.ns_to_s = lambda x: x/1_000_000_000
def __call__(self, f):