In the name of God
This gist contains steps to setup Ubuntu 22.04
for deep learning.
#! /usr/bin/env python | |
from base64 import b64decode | |
from github import Github | |
with open('access-token.txt') as token_file: | |
token = token_file.read().strip() | |
api = Github(token) | |
site = api.get_repo('nottrobin/gh-cms-example-site') |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
import akka.actor.{ Actor, ActorRef, Props, ActorSystem } | |
case class ProcessStringMsg(string: String) | |
case class StringProcessedMsg(words: Integer) | |
class StringCounterActor extends Actor { | |
def receive = { | |
case ProcessStringMsg(string) => { | |
val wordsInLine = string.split(" ").length | |
sender ! StringProcessedMsg(wordsInLine) |
# Copyright 2017, Google, Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License") | |
FROM node:6-onbuild | |
EXPOSE 3000 | |
ENV LANGUAGE English | |
ENV API_KEY 123-456-789 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/usr/bin/env bash | |
if [[ $(pmset -g ps | head -1) =~ "Battery Power" ]]; then | |
osascript -e 'display notification "You are starting Slack while running on battery power" with title "Battery Drain Source Detected" subtitle ""' | |
fi | |
open /Applications/Slack.app |