Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
import mxnet as mx | |
from mxnet.gluon.model_zoo import vision | |
import os | |
import time | |
batch_shape = (1, 3, 224, 224) | |
resnet18 = vision.resnet18_v2(pretrained=True) | |
resnet18.hybridize() | |
resnet18.forward(mx.nd.zeros(batch_shape)) | |
resnet18.export('resnet18_v2') |
def static_var(name, value): | |
def helper(fun): | |
setattr(fun, name, value) | |
return fun | |
return helper | |
@static_var("my_var", 0) | |
@static_var("my_other_var", "HAL") | |
def foo(): |
#include <stdio.h> | |
/* | |
* Calculates what Ada Lovelace labeled "B7", which today we would call the 8th | |
* Bernoulli number. | |
*/ | |
int main(int argc, char* argv[]) | |
{ | |
// ------------------------------------------------------------------------ | |
// Data |
#!/usr/bin/python | |
# @lint-avoid-python-3-compatibility-imports | |
# | |
# qos implement a dynamic qos for using cgroups | |
# For Linux, uses BCC, eBPF. | |
# | |
# USAGE: qos.py [-h] [-qc] [--max] [interval] | |
# requires a file name qos_setup which can changed with qosfile | |
# file has format maj:min IOPS | |
# i.e. 8:0 40000 |
While installing a Node.js application isn't difficult in principle, it may still be confusing if you're not used to how the Node.js ecosystem works. This post will tell you how to get the application going, what to expect, and what to do if it doesn't work.
Occasionally an application may have custom installation steps, such as installing special system-wide dependencies; in those cases, you'll want to have a look at the install documentation of the application itself as well. However, most of the time it's safe to assume that the instructions below will work fine.
If the application you want to install is available in your distribution's repositories, then install it through there instead and skip this entire guide; your distribution's package manager will take care of all the dependencies.
import ctypes as C | |
from ctypes.util import find_library | |
cuda = C.cdll.LoadLibrary(find_library("cudart")) | |
dev_ct = C.c_int() | |
dev_ct_addr = C.addressof(dev_ct) | |
dev_ct_ptr = C.cast(dev_ct_addr, C.POINTER(C.c_int)) | |
error_t = cuda.cudaGetDeviceCount(dev_ct_ptr) |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" |