I hereby claim:
- I am klgraham on github.
- I am klogram (https://keybase.io/klogram) on keybase.
- I have a public key ASAH4w1M6pKVqmDTyHCQruuuVovVviDurs9-P8DblNSP7Qo
To claim this, I am signing this object:
#include <stdio.h> | |
#include <lua.h> | |
#include <lualib.h> | |
#include <lauxlib.h> | |
#include "luajit.h" | |
int main(int argc, char *argv[]) | |
{ | |
int status; | |
lua_State *L; |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <lua.h> | |
#include <lualib.h> | |
#include <lauxlib.h> | |
#include "luajit.h" | |
int main(int argc, char *argv[]) | |
{ | |
lua_State *L; |
# Modified example from: https://huggingface.co/facebook/detr-resnet-50 | |
from transformers import DetrFeatureExtractor, DetrForObjectDetection | |
from PIL import Image | |
import requests | |
import torch | |
print("GPU is available:", torch.cuda.is_available()) | |
#device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") |
I hereby claim:
To claim this, I am signing this object:
// Usage: | |
/* | |
if let aStreamReader = StreamReader(path: "/path/to/file") { | |
defer { | |
aStreamReader.close() | |
} | |
while let line = aStreamReader.nextLine() { | |
print(line) | |
} | |
} |
class Perceptron { | |
var bias: Double | |
// weights[0] is the weight for the bias input | |
var weights: [Double] | |
init(numInputs: Int, bias: Double) { | |
self.bias = bias | |
self.weights = [Double]() |
/* call-by-value means the parameters are evaluated left to | |
** right to determine their value before the function itself | |
** is evaluated | |
*/ | |
def first(a: Int, b: Int): Int = a | |
first(3 + 4, 5 + 6) // will be reduced to first(7, 5 + 6), then first(7, 11), and then 7 | |
/* call-by-name means the paramter is passed into the function | |
** as is. Parameter evaluation takes place after | |
** substitution |
let testData = createData(100) | |
func evaluatePerceptron(p: Perceptron, testData: [PerceptronDataPair]) -> Double { | |
var correct = 0 | |
for d in testData { | |
let prediction = p.feedForward(d.input) | |
if (prediction == d.output) { | |
correct += 1 | |
} | |
} |
#! /bin/bash | |
GCC_VERSION="5.2.0" | |
WORKDIR="$HOME/src/" | |
INSTALLDIR="/platform" | |
## NOTE: XCode must be installed (through App Store) and the following run to install command-line tools. | |
## THIS IS IMPORTANT! Among other things, it creates '/usr/include' and installs the system header files. | |
# xcode-select --install |
(defn zipIndex [coll] | |
(loop [list coll | |
n 0 | |
result []] | |
(if (empty? list) | |
result | |
(recur (rest list) (inc n) (conj result [n (first list)]))))) |