Compiling the C file:
gcc -o test test.c -I . -I /usr/include -lc
Compiling the Zig file throws an error:
$zig build-exe ztest.zig -I . --library c
// v -cc gcc -cflags "-O3 -ffast-math -flto" sir.v | |
import math | |
import time | |
[inline] | |
fn clz64(v u64) u32 { | |
return C.__builtin_clzll(v) | |
} | |
[inline] |
Compiling the C file:
gcc -o test test.c -I . -I /usr/include -lc
Compiling the Zig file throws an error:
$zig build-exe ztest.zig -I . --library c
These are a copy of data on Ag1000g from the WTSI FTP site. Use of these data should follow the Terms of Use that allow these data to be shared pre-publication.
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
# Here's how to back up a named volume | |
# 1. Using a `ubuntu` image, we mount the named volume (`myproj_dbdata`) to a `/dbdata` folder inside the `ubuntu` container. | |
# 2. Then, we create a new folder inside the `ubuntu` container named `/backup`. | |
# 3. We then create an archive containing the contents of the `/dbdata` folder and we store it inside the `/backup` folder (inside the container). | |
# 4. We also mount the `/backup` folder from the container to the docker host (your local machine) in a folder named `/backups` inside the current directory. | |
docker run --rm -v myproj_dbdata:/dbdata -v $(pwd)/backups:/backup ubuntu tar cvf /backup/db_data_"$(date '+%y-%m-%d')".tar /dbdata |
#! /usr/bin/env python | |
import pexpect | |
import pexpect.replwrap | |
repl = pexpect.replwrap.REPLWrapper("lua", u"> ", None, u"> ") | |
output = repl.run_command("= 1 + 1", timeout=1).splitlines()[1:] | |
assert(int(output[0]) == 2) |
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=41)}([function(t,e,n){(function(){var e,r,i,o,s,a,u,c,l,h,f,p,d={}.hasOwnProperty;p=n(1),f=p.isObject,h=p.isFunction, |