This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mouse-mode | |
set-window-option -g mode-mouse on | |
set-option -g mouse-resize-pane on | |
set-option -g mouse-select-pane on | |
set-option -g mouse-select-window on | |
# toggle mouse mode to allow mouse copy/paste | |
# set mouse on with prefix m | |
bind m \ | |
set -g mode-mouse on \;\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mouse-mode | |
set-window-option -g mode-mouse on | |
set-option -g mouse-resize-pane on | |
set-option -g mouse-select-pane on | |
set-option -g mouse-select-window on | |
# toggle mouse mode to allow mouse copy/paste | |
# set mouse on with prefix m | |
bind m \ | |
set -g mode-mouse on \;\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import chainer | |
import chainer.functions as F | |
import chainer.links as L | |
from chainer import training | |
from chainer.training import extensions | |
import chainerx | |
import numpy | |
from chainer.dataset import concat_examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Many Python libraries provide low-level CUDA support, but when it comes to interoperability | |
# things get complicated. This script shows a simple example on converting a CUDA stream | |
# created from CuPy's API to one that is compatible with Numba. | |
from numba import cuda | |
import cupy as cp | |
def stream_cupy_to_numba(cp_stream): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 "Once you have their money, you never give it back." "The Nagus" (DS9 episode) | |
2 "The best deal is the one that makes the most profit." The 34th Rule (DS9 novel) | |
3 "Never spend more for an acquisition than you have to." "The Maquis, Part II" (DS9 episode) | |
4 "A woman wearing clothes is like a man in the kitchen." The Ferengi Rules of Acquisition (DS9 novel) | |
5 "Always exaggerate your estimates." Cold Fusion (SCE novel) | |
6 "Never let family stand in the way of opportunity." "The Nagus" (DS9 episode) | |
7 "Always keep your ears open." "In the Hands of the Prophets" (DS9 episode) | |
8 "Small print leads to large risk." The Ferengi Rules of Acquisition (DS9 novel) | |
9 "Instinct, plus opportunity, equals profit." "The Storyteller" (DS9 episode) | |
10 "Greed is eternal." "Prophet Motive" (VOY episode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import cos, pi | |
import numpy | |
from chainer.training import extension | |
class CosineAnnealing(extension.Extension): | |
def __init__(self, lr_max, lr_min=0, T_0=1, T_mult=2, | |
optimizer=None): | |
super(CosineAnnealing, self).__init__() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import cos, pi | |
import numpy | |
from chainer.training import extension | |
class CosineAnnealing(extension.Extension): | |
def __init__(self, lr_max, lr_min=0, T_0=1, T_mult=2, | |
optimizer=None): | |
super(CosineAnnealing, self).__init__() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference | |
# https://docs.chainer.org/en/stable/guides/functions.html | |
import chainer.functions as F | |
import chainer.links as L | |
import numpy as np | |
from chainer import Function | |
from chainer import Variable | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from chainer.functions.connection import convolution_2d | |
from chainer import initializers | |
from chainer import link | |
import chainer.functions as F | |
class SubPixelConvolution2D(link.Link): | |
""" Sub-pixel convolutional upscaling layer based on the paper "Real-Time Single Image | |
and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network" |
NewerOlder