This script is called updatePR
.
Usage:
gh pr checkout 1234
# make some changes
updatePR 1234
As a maintainer of an OSS project I constantly find myself having to fix up incoming PRs. I enjoy using the GitHub CLI, but unfortunately this CLI does not provide an easy way to identify the remote fork the PR originated from.
As a result my git remote -v
lists a lot of remotes that I had to manually add after viewing the PR in my browser to obtain the remote clone URL. This is not sustainable.
Git allows pushing to a remote URL directly, so there is no need to define the remote before hand.
This script defines a utility functions that makes it easy for gh GitHub CLI users to update contributions.
Existing code:
import requests
def get_hacker_news_stories_by_search_term(search_term: str):
"""
Get the stories from Hacker News mentioning the search term.
"""
Author: Bernd Verst
In this workshop we will use the Sonic Pi live coding synthesizer to create part of an iconic song, live. We'll be creating the repeating four bar / measure phrase of the opening song to Hamilton, Alexander Hamilton.
Participation is strongly encouraged. A note on accessibility: Unfortunately this workshop relies on the participant / learner to receive immediate feedback via audio. Hearing impaired participation is possible and correctness of a piece of music can be achieved, but will be less enjoyable.
You need to install Sonic Pi from here: https://sonic-pi.net/
Homebrew build logs for openjdk on Ubuntu 20.04.1 LTS | |
Build date: 2020-10-05 23:44:13 |
# Example use: | |
# cd ~/Downloads | |
# mvmedia . | |
# mvdocs . | |
# | |
# Intended to be used for MacOS, but can be used on Linux if destination folders are altered. | |
# Simply save this file and source in your .zshrc, .bash_profile, .bashrc etc | |
mvimages() { | |
DESTINATION="$HOME/Pictures/" |
INFILE="video.mp4" | |
OUTFILE="shortenedclip.mp4" | |
START="00:00:12.35" # Start Time in hh:mm:ss.msec format | |
DURATION="00:01:05.4" # Duration in hh:mm:ss.msec format | |
################## Alternative format ################## | |
# START="12.35" # Start time in s.msec format # | |
# DURATION="65.4" # Duration time in s.msec format # | |
######################################################## |
FFMpeg must be installed.
Instructions:
brew install ffmpeg
# Conversion of Microsoft Stream WebVTT file to SRT | |
# Takes advantage of specific metadata structure in Microsoft Stream VTT files | |
vtt = open('INPUT.vtt','r') | |
vtt_iter = iter(vtt) | |
with open('OUTPUT.srt', 'w') as srt: | |
counter = 1 | |
next(vtt_iter) | |
for line in vtt_iter: |
This Hackathon is designed for beginners. No prior experience is necessary.
Azure provides powerful AI tools, wrapped up in APIs that you can use from your apps to add intelligence without being an AI expert. In this hands-on workshop you will build a Python app that takes advantage of one of these APIs to detect emotions in faces, alerting you if you have a sad face too often. This app will be in two parts, one part that runs on the desktop and takes photos, and another that runs in the cloud to analyse photos and store the emotions detected.