Skip to content

Instantly share code, notes, and snippets.

View takuma-yoneda's full-sized avatar

Takuma Yoneda takuma-yoneda

View GitHub Profile
@takuma-yoneda
takuma-yoneda / brave-browser.nix
Created July 22, 2021 16:32
default.nix for installing Brave Browser
{ stdenv, lib, fetchurl
, dpkg
, unzip
, alsa-lib
, at-spi2-atk
, at-spi2-core
, atk
, cairo
, cups
, dbus
@takuma-yoneda
takuma-yoneda / some_piece_of_codes.py
Created May 13, 2020 01:51
Code pieces in planet implementation
def calc_loss(self, trajectory):
'''take a trajectory to calculate losses'''
Loss = namedtuple('loss', ['summary', 'reconst_term', 'kl_term'])
images, best_pix_ind = trajectory[0]
obs_0 = images[0][0].to(self.device)
posterior = self.encoder(obs_0)
prev_state = posterior.rsample()
# loss terms:
@takuma-yoneda
takuma-yoneda / spacemacs-cheshe.md
Last active February 14, 2020 23:32 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC j - this is for jump to some place.
  • SPC j i - spacemacs/helm-jump-in-buffer
  • '%' - (vim command) jump to the corresponding parenthesis
  • SPC ; - commenting operation (provided by evli-nerd-commenter )
  • c s <old-textobject> <new-textobject> - change parenthesis character (provided by evil-surround
  • SPC k - enter lisp-state (easy to move over parenthesis)
  • SPC x i c - string-inflection (lower camelCase)
  • SPC x i u - string-inflection (lower snake_case)
  • C-c C-w C-c - eyebrowse-create-wiondow-config (eyebrowse)