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 React, { useState } from 'react' | |
import './styles.css' | |
const App = () => { | |
const [formValues, setFormValues] = useState([{ name: "", email : ""}]) | |
let handleChange = (i, e) => { | |
let newFormValues = [...formValues]; | |
newFormValues[i][e.target.name] = e.target.value; |
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
def plt2arr(fig, draw=True): | |
""" | |
need to draw if figure is not drawn yet | |
""" | |
if draw: | |
fig.canvas.draw() | |
rgba_buf = fig.canvas.buffer_rgba() | |
(w,h) = fig.canvas.get_width_height() | |
rgba_arr = np.frombuffer(rgba_buf, dtype=np.uint8).reshape((h,w,4)) | |
return rgba_arr |
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
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted |
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 matplotlib import pyplot as plt | |
import cv2 | |
img = cv2.imread('/Users/mustafa/test.jpg') | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
plt.imshow(gray) | |
plt.title('my picture') | |
plt.show() |
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
# got this from http://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles | |
ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text outfile.mp4 | |
# confirmed working with the following ffmpeg | |
# (installed using `brew 'ffmpeg', args: ['with-libvorbis', 'with-libvpx']` ) | |
ffmpeg version 3.1.2 Copyright (c) 2000-2016 the FFmpeg developers | |
built with Apple LLVM version 7.3.0 (clang-703.0.31) | |
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libvpx --disable-lzma --enable-vda |
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
# coding: utf-8 | |
import sys | |
import os | |
# import site | |
# site.addsitedir('/usr/local/lib/python2.7/site-packages') | |
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets | |
app = QtWidgets.QApplication(sys.argv) | |
view = QtWebEngineWidgets.QWebEngineView() |
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
# +----------------------------+ | |
# | IDE files | | |
# +----------------------------+ | |
/.idea | |
# +----------------------------+ | |
# | Vagrant | | |
# +----------------------------+ | |
/.vagrant |