export KUBE_EDITOR='code --wait'
Running k edit ...
will open up the yaml using Visual Studio Code.
import nltk | |
# interactive download | |
# nltk.download() | |
nltk.download('punkt') | |
extra_abbreviations = [ | |
"ps", | |
"inc", | |
"corp", |
model.zero_grad() # Reset gradients tensors | |
for i, (inputs, labels) in enumerate(training_set): | |
predictions = model(inputs) # Forward pass | |
loss = loss_function(predictions, labels) # Compute loss function | |
loss = loss / accumulation_steps # Normalize our loss (if averaged) | |
loss.backward() # Backward pass | |
if (i+1) % accumulation_steps == 0: # Wait for several backward steps | |
optimizer.step() # Now we can do an optimizer step | |
model.zero_grad() # Reset gradients tensors | |
if (i+1) % evaluation_steps == 0: # Evaluate the model when we... |
LWin & WheelUp:: | |
; Previous Desktop | |
Send {LWin down}{Ctrl down}{Left down}{LWin up}{Ctrl up}{Left up} | |
return | |
LWin & WheelDown:: | |
; Next Desktop | |
Send {LWin down}{Ctrl down}{Right down}{LWin up}{Ctrl up}{Right up} | |
return |
public static class HtmlRenderExtensions { | |
/// <summary> | |
/// Delegate script/resource/etc injection until the end of the page | |
/// <para>@via http://stackoverflow.com/a/14127332/1037948 and http://jadnb.wordpress.com/2011/02/16/rendering-scripts-from-partial-views-at-the-end-in-mvc/ </para> | |
/// </summary> | |
private class DelayedInjectionBlock : IDisposable { | |
/// <summary> | |
/// Unique internal storage key | |
/// </summary> |
import os | |
import sys | |
import traceback | |
from functools import wraps | |
from multiprocessing import Process, Queue | |
def processify(func): | |
'''Decorator to run a function as a process. | |
Be sure that every argument and the return value |
As configured in my dotfiles.
start new:
tmux
start new with session name: