This file contains hidden or 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 requests | |
from bs4 import BeautifulSoup | |
import re | |
from datetime import timedelta | |
regex = re.compile(r'((?P<hours>\d+?):)?((?P<minutes>\d+?)?:)((?P<seconds>\d+?))') | |
def parse_duration(time_str): | |
parts = regex.match(time_str) | |
if not parts: |
This file contains hidden or 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
echo 'Downloading Docker...' | |
curl https://download.docker.com/mac/stable/Docker.dmg -O | |
echo 'Installing Docker...' | |
hdiutil attach -nobrowse Docker.dmg | |
echo 'Copying files...' | |
cp -r /Volumes/Docker/Docker.App /Applications/Docker.App | |
echo 'Cleaning up...' | |
hdiutil detach /Volumes/Docker | |
rm Docker.dmg | |
echo 'Complete! Opening Docker App' |
This file contains hidden or 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
- hosts: all | |
environment: | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
tasks: | |
- name: "task name" | |
command: pipenv run python script.py |
This file contains hidden or 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
with open("math_facts.txt","w") as math_facts_file: | |
for i in range(0,11): | |
for j in range(0,11): | |
math_facts_file.write("{i} + {j}".format(i=i, j=j) + "\n") |
This file contains hidden or 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
license: gpl-3.0 | |
height: 4980 |
This file contains hidden or 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
#!/bin/sh | |
# apropos . - whatis database | |
# sed 's/\s*\(.*\)-.*/\1/' - remove content to the right of '-' | |
# sed -e $'s/,/\\\n/g' - split likes on ',' | |
# grep \(.*\) - remove lines without a section | |
# sed 's/[^)]*(\([^)]*\)).*/\1/' - extract the section string | |
# awk '{arr[$1]++}END{for (a in arr) print a, arr[a]}' - get count of each section ($1) | |
# sort -nrk2 - sort by number in reverse order on column 2 | |
# column -t - format in readable columns |
This file contains hidden or 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
/** | |
* @author Eberhard Graether / http://egraether.com/ | |
*/ | |
THREE.TrackballControls = function ( object, domElement ) { | |
var _this = this; | |
var STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM: 4, TOUCH_PAN: 5 }; | |
this.object = object; |
This file contains hidden or 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
license: gpl-3.0 | |
height: 960 | |
border: no |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder