Skip to content

Instantly share code, notes, and snippets.

View Manuel4131's full-sized avatar

alstonChang Manuel4131

View GitHub Profile
@Manuel4131
Manuel4131 / ffmpeg.md
Created July 25, 2019 04:20 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@Manuel4131
Manuel4131 / gist:aea5169ebcfb8ac9faba5188f8533186
Last active December 15, 2020 03:44
Install tensorflow for MacOS

Install it with the command.

pip3 install tensorflow

Reference the official installation here https://bit.ly/2Aje82T

Abstract

Install TensorFlow Assuming the prerequisite software is installed on your Mac, take the following steps:

@Manuel4131
Manuel4131 / GitHub_ssh_connect
Created July 22, 2018 09:13
Set up ssh connection to GitHub
The reason why `git push` always failed for a forked `git_training` repository is due to multiple account settings in the same computer.
Aren't you curious why does the git not ask you about the password?
I don't spend more to dive into the problem. Just use `ssh` instead.
The following links are the steps about how to set up the ssh connection.
```
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
```
```
https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
@Manuel4131
Manuel4131 / stream_to_youtube.sh
Created July 18, 2018 13:59 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
Check the version
```bash
import django #django is a framework which should be installed by pip. It's listed in requirements.txt
print(django.VERSION)
@Manuel4131
Manuel4131 / gist:407da9d8b43c7c2b4b0a911122e42e8b
Created April 16, 2018 14:39
Common python module install & env setup
virtual environment
# python run module as script
python -m
python3 -m venv myvenv # not working on ubuntu
https://pythontips.com/2013/08/04/args-and-kwargs-in-python-explained/
Workable!
---python
def stupid(data, *args, **kwargs):
print("data: {}".format(data))
for i in args:
print(i)
for k in kwargs:
If you would like to use # to jump to certain part of the web page.
Caller:
#+id
Callee:
Please give the any tag with the corresponded id.
Source:
https://stackoverflow.com/questions/2835140/how-do-i-link-to-part-of-a-page-hash
Python Environment Setup
Update the `pip` to latest version; older version might have trouble with dependency
```python
pip3 install --upgrade pip
```
Then install `jupyter Notebook`
```python
pip3 install jupyter
```
@Manuel4131
Manuel4131 / gist:a02fba83914f18a1ea5b65b77ff2e1ca
Created July 31, 2016 12:45 — forked from crizCraig/gist:2816295
Download images from Google Image search using Python
import json
import os
import time
import requests
from PIL import Image
from StringIO import StringIO
from requests.exceptions import ConnectionError
def go(query, path):
"""Download full size images from Google image search.