In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
import torch | |
import torch._inductor.config | |
import time | |
torch._inductor.config.triton.cudagraphs = False | |
torch.set_float32_matmul_precision('high') | |
def bench(f, name=None, iters=100, warmup=5, display=True, profile=False): | |
for _ in range(warmup): | |
f() |
In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
Rust aims to be the foundation of fast and robust software. A thorn in that side is the choice of timeout-centric APIs for I/O and multithreading. I posit this was a bad choice and it needs to be remedied as soon as possible before more APIs proliferate this (possibly accidental) design decision.
Task: connect to a remote server, send a request, receive response with an end-to-end timeout of 10 seconds.
// Port of the C# 101 LINQ Samples rewritten into Apple's Swift 3. | |
#![feature(ordering_chaining, step_by)] | |
fn main() { | |
// linq5: Where - Indexed | |
/* | |
//c# | |
public void Linq5() | |
{ |
"""Simple example on how to log scalars and images to tensorboard without tensor ops. | |
License: BSD License 2.0 | |
""" | |
__author__ = "Michael Gygli" | |
import tensorflow as tf | |
from StringIO import StringIO | |
import matplotlib.pyplot as plt | |
import numpy as np |
#!/usr/bin/env python | |
# Quick and dirty demonstration of CVE-2014-0160 by | |
# Jared Stafford (jspenguin@jspenguin.org) | |
# Modified so that it finds cookies | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
from nonlocal_ import nonlocal_ | |
def foo(): | |
a = 1 | |
def bar(): | |
nonlocal_('a') | |
a = 2 | |
bar() | |
return a |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!