tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the
| set-hook -g client-attached 'run-shell /bin/update_display.sh' |
| ; Change Caps Lock to Control when held down; otherwise, Escape | |
| ; | |
| ; Originally based on the answer provided in | |
| ; [this](https://superuser.com/questions/581692/remap-caps-lock-in-windows-escape-and-control) | |
| ; StackExchange SuperUser question. | |
| ; | |
| ; A shortcut should be created for this script and placed in the Windows 10 | |
| ; user's startup folder to automatically enable the feature on boot/startup. | |
| ; The user's startup folder can be found using the following steps: | |
| ; |
| """ | |
| Simple example of manually performing "automatic" differentiation | |
| """ | |
| import numpy as np | |
| from numpy import exp, sin, cos | |
| def f(x, with_grad=False): | |
| # Need to cache intermediates from forward pass (might not use all of them). | |
| a = exp(x) |
The fundamental unit in PyTorch is the Tensor. This post will serve as an overview for how we implement Tensors in PyTorch, such that the user can interact with it from the Python shell. In particular, we want to answer four main questions:
- How does PyTorch extend the Python interpreter to define a Tensor type that can be manipulated from Python code?
- How does PyTorch wrap the C libraries that actually define the Tensor's properties and methods?
- How does PyTorch cwrap work to generate code for Tensor methods?
- How does PyTorch's build system take all of these components to compile and generate a workable application?
PyTorch defines a new package torch. In this post we will consider the ._C module. This module is known as an "extension module" - a Python module written in C. Such modules allow us to define new built-in object types (e.g. the Tensor) and to call C/C++ functions.
This tutorial will guide through the steps to create a simple custom layer for Caffe using python. By the end of it, there are some examples of custom layers.
Usually you would create a custom layer to implement a funcionality that isn't available in Caffe, tuning it for your requirements.
Probably just Python and Caffe installed.
This is most certainly a bad idea, but what you want to do can be done in some extent, and this is going to take a lot of time to explain. First off, rather than thinking of decorators as a syntax sugar, think of them as what they really are: a function (that is a closure) with a function that exist inside it. Now this is out of the way, supposed we have a function:
def operation(a, b):
print('doing operation')
return a + b
Simply it will do this
>>> hi = operation('hello', 'world')
doing operation
| ''' | |
| Non-parametric computation of entropy and mutual-information | |
| Adapted by G Varoquaux for code created by R Brette, itself | |
| from several papers (see in the code). | |
| This code is maintained at https://github.com/mutualinfo/mutual_info | |
| Please download the latest code there, to have improvements and | |
| bug fixes. |
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |