(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
from time import sleep | |
from timed_cache import Memoize | |
def test_memoize(): | |
""" | |
Test if the cached function results expires in the expected time. | |
""" |
[alias] | |
co = checkout | |
br = branch | |
ci = commit | |
st = status | |
unstage = reset HEAD -- | |
undo = reset --soft HEAD~1 | |
last = log -1 HEAD | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%C | |
reset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches |
// create a menu | |
function onOpen() { | |
var menuEntries = [ {name: "Create invoice", functionName: "CreateInv"}]; | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
ss.addMenu("Invoice Generator", menuEntries); | |
} | |
function CreateInv() { | |
// specify doc template and get values from spread |
These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].
src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
import os | |
class InMemoryUserRepository(UserRepository): | |
def __init__(self): | |
self._items = [] | |
def add(self, user: User) -> User: | |
self._items.append(user) | |
def get(self, id: str) -> User: |
# An example of how to use AWS SNS with Python's boto | |
# By Stuart Myles @smyles | |
# http://aws.amazon.com/sns/ | |
# https://github.com/boto/boto | |
# | |
# Inspired by parts of the Ruby SWF SNS tutorial http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-sns-tutorial-implementing-activities-poller.html | |
# And the Python SNS code in http://blog.coredumped.org/2010/04/amazon-announces-simple-notification.html and http://awsadvent.tumblr.com/post/37531769345/simple-notification-service-sns | |
import boto.sns as sns | |
import json |
## Fira Code with Flottflott | |
atom-text-editor.editor { | |
.syntax — string.syntax — quoted, | |
.syntax — string.syntax — regexp { | |
-webkit-font-feature-settings: “liga” off, “calt” off; | |
} | |
.syntax — source.syntax — js.syntax — jsx > .syntax — keyword.syntax — control.syntax — flow.syntax — js, | |
.syntax — storage, .syntax — type .syntax — function { | |
vertical-align: baseline; |
### Keybase proof | |
I hereby claim: | |
* I am alexsavio on github. | |
* I am alexsavio (https://keybase.io/alexsavio) on keybase. | |
* I have a public key whose fingerprint is 85F7 B4AC 2719 E0E6 C537 8E06 62A4 1CC0 45A2 9DF7 | |
To claim this, I am signing this object: |
#List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
#Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
#Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(value_list)] |