Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
FROM golang:1.12 as build | |
WORKDIR $GOPATH/src/github.com/Irio/wohnung | |
COPY scraper scraper | |
COPY main.go . | |
RUN go get -d -v ./... | |
RUN go install | |
FROM gcr.io/distroless/base |
This file contains 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
# Authors: Mathieu Blondel, Vlad Niculae | |
# License: BSD 3 clause | |
import numpy as np | |
def _gen_pairs(gen, max_iter, max_inner, random_state, verbose): | |
rng = np.random.RandomState(random_state) | |
# if tuple, interpret as randn |
This file contains 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/bash | |
function checkOS { | |
... | |
} | |
function addOneHourLinux { | |
date -d '+1 hour' | |
} |
This file contains 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/bash | |
function checkOS { | |
unameOut="$(uname -s)" | |
case "${unameOut}" in | |
Linux*) machine=Linux;; | |
Darwin*) machine=Mac;; | |
*) echo "Cannot run on unsupported machine ${unameOut}" && exit 1; | |
esac |
This file contains 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/bash | |
# $screenActive=1 means the screen is active and O is inactive | |
# View the explanation of the CGSession dictionary at | |
# https://stackoverflow.com/questions/11505255/osx-check-if-the-screen-is-locked | |
function checkScreenActiveMac { | |
python -c 'import sys,Quartz;\ | |
d=Quartz.CGSessionCopyCurrentDictionary();\ | |
sys.exit(d and \ | |
d.get("CGSSessionScreenIsLocked", 0) == 0 and \ |
This file contains 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/bash | |
# run function passed to this if we are in work period | |
# e.g runIfWorkPeriod echo "Hello there" will only | |
# output "Hello there" if currenttime is within work period | |
function runIfWorkPeriod { | |
start_time="09:00" | |
end_time="17:00" | |
currenttime=$(date +%H:%M) | |
if [[ "$currenttime" > "$start_time" ]] && [[ "$currenttime" < "$end_time" ]]; then |
This file contains 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/bash | |
# Generate a random number using date | |
RANDOM=$(date +%s) | |
EXCUSESARRAY=( | |
"to visit Nosarobumeh in the hospital" | |
"for some away screen time" | |
"as I have a slight headache" | |
"to take a rest" | |
"for the next one hour" | |
"for a bit to run some errands" |
This file contains 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/bash | |
# check if slack.sh exists else download it | |
# using curl | |
function checkSlackUtilityExists { | |
if [ -f "./slack.sh" ]; then | |
chmod +x ./slack.sh | |
else | |
echo -e "Downloading slack utility..." && | |
curl -o ./slack.sh https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw/c8a47aec0f08ca6dc64201ba40f09ff8c79f735e/slack.sh -s && chmod +x ./slack.sh && |
OlderNewer