Skip to content

Instantly share code, notes, and snippets.

View bfeldman89's full-sized avatar

Blake Feldman bfeldman89

View GitHub Profile
@Iman
Iman / m3u8-to-mp4.md
Created October 12, 2021 19:36 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
'''This python script is to extract each sheet in an Excel workbook as a new csv file'''
import csv
import xlrd
import sys
def ExceltoCSV(excel_file, csv_file_base_path):
workbook = xlrd.open_workbook(excel_file)
for sheet_name in workbook.sheet_names():
print 'processing - ' + sheet_name
@mrcrnkovich
mrcrnkovich / organizeDir.py
Last active June 24, 2020 06:15
#script to sort files by suffix into folders
'''
This is a command line program designed to identify and
group all files (non-directories) in a given directory and
move each file type (“.csv”, “.py”, “.txt”, etc) into a named
directory of the file type. The program will create a new directory
for any file type that does not have a directory but will not overwrite
existing directories. The program takes the following arguments:
directory: a string path to the directory to be organized
-v: verbose output option
'''
def convert_to_dict(obj):
"""
A function takes in a custom object and returns a dictionary representation of the object.
This dict representation includes meta data such as the object's module and class names.
"""
# Populate the dictionary with object meta data
obj_dict = {
"__class__": obj.__class__.__name__,
"__module__": obj.__module__
@palewire
palewire / notebook.ipynb
Last active June 1, 2021 23:51
Rotating proxy scraper example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
😀 Grinning Face
😁 Beaming Face With Smiling Eyes
😂 Face With Tears of Joy
🤣 Rolling on the Floor Laughing
😃 Grinning Face With Big Eyes
😄 Grinning Face With Smiling Eyes
😅 Grinning Face With Sweat
😆 Grinning Squinting Face
😉 Winking Face
😊 Smiling Face With Smiling Eyes
@ebergam
ebergam / python_to_ifttt.py
Created February 6, 2018 09:15
Connect a Python script to IFTTT
import requests
from bs4 import BeautifulSoup
url = ‘http://www.enricobergamini.it/trialpage.html'
#load and scrape
response = requests.get(url)
html = response.content
soup = BeautifulSoup(html, “lxml”)
number = soup.find(‘h1’, id=’number’).text
@irisli
irisli / colors.md
Last active October 6, 2021 18:13
Github Flavored Markdown (GFM) Colored text

Using diff: red/green monospaced text

+ Green.Like all Byzantine agreement protocols, SCP makes no assumptions about the rational behavior of attackers.
- Red. Like all Byzantine agreement protocols, SCP makes no assumptions about the rational behavior of attackers.
Black. Like all Byzantine agreement protocols, SCP makes no assumptions about the rational behavior of attackers.

Using code comments: gray text

@trusktr
trusktr / image-grid.md
Last active March 20, 2024 06:31
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 26, 2024 01:50
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4