An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.
C-M-f | sp-forward-sexp |
C-M-b | sp-backward-sexp |
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
# Please see the script's new home: https://github.com/alphapapa/magit.sh |
fif() { | |
rg \ | |
--column \ | |
--line-number \ | |
--no-column \ | |
--no-heading \ | |
--fixed-strings \ | |
--ignore-case \ | |
--hidden \ | |
--follow \ |
An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.
C-M-f | sp-forward-sexp |
C-M-b | sp-backward-sexp |
import torch | |
from torch import LongTensor | |
from torch.nn import Embedding, LSTM | |
from torch.autograd import Variable | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium'] | |
# | |
# Step 1: Construct Vocabulary | |
# Step 2: Load indexed data (list of instances, where each instance is list of character indices) |
1. Introduction to “This is Watson” | |
D. A. Ferrucci, "Introduction to “This is Watson”," in IBM Journal of Research and | |
Development, vol. 56, no. 3.4, pp. 1:1-1:15, May-June 2012. | |
doi: 10.1147/JRD.2012.2184356 | |
Abstract: In 2007, IBM Research took on the grand challenge of building a computer | |
system that could compete with champions at the game of Jeopardy!™. In 2011, the | |
open-domain question-answering (QA) system, dubbed Watson, beat the two | |
highest ranked players in a nationally televised two-game Jeopardy! match. This | |
paper provides a brief history of the events and ideas that positioned our team to | |
take on the Jeopardy! challenge, build Watson, IBM Watson™, and ultimately |
"""Getting Python's unittest results in a tearDown() method | |
https://stackoverflow.com/questions/4414234/getting-pythons-unittest-results-in-a-teardown-method#39606065 | |
""" | |
import unittest | |
class MyTest(unittest.TestCase): | |
def tearDown(self): | |
if hasattr(self._outcome, 'errors'): | |
# Python 3.4 - 3.10 (These two methods have no side effects) |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
#![feature(test)] | |
extern crate test; | |
extern crate itertools; | |
use test::Bencher; | |
use itertools::Itertools; | |
fn strings_vec() -> Vec<String> { | |
vec![String::from("again"); 512] |