Skip to content

Instantly share code, notes, and snippets.

View mrafayaleem's full-sized avatar

Rafay Aleem mrafayaleem

View GitHub Profile
@babjo
babjo / install_openjdk11.sh
Created October 6, 2018 06:02
A script to install openjdk11 with curl
curl https://download.java.net/java/ga/jdk11/openjdk-11_osx-x64_bin.tar.gz \
| tar -xz \
&& sudo mv jdk-11.jdk /Library/Java/JavaVirtualMachines

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@Zulko
Zulko / soccer_cuts.py
Last active March 31, 2024 12:03
A python script to automatically summarize soccer videos based on the crowd's reactions
#
# This Python script makes a summary of a football game by cutting
# the video around the 10 % loudest moments, which generally
# include the goals and other important events.
# For more details, see this blog post:
# http://zulko.github.io/blog/2014/07/04/automatic-soccer-highlights-compilations-with-python/
#
# LICENCE: Creative Commons 0 - Public Domain
# I, the author of this script, wave any rights and place this work in the public domain.
#
@dideler
dideler / example.md
Last active February 17, 2024 20:24
A python script for extracting email addresses from text files.You can pass it multiple files. It prints the email addresses to stdout, one address per line.For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.

The program below can take one or more plain text files as input. It works with python2 and python3.

Let's say we have two files that may contain email addresses:

  1. file_a.txt
foo bar
ok ideler.dennis@gmail.com sup
 hey...user+123@example.com,wyd
hello world!