Skip to content

Instantly share code, notes, and snippets.

View JohnAllen's full-sized avatar

John Allen JohnAllen

View GitHub Profile
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=4,
minSize=(22, 22),
flags=cv2.CASCADE_SCALE_IMAGE
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
import argparse
import gym
import numpy as np
from itertools import count
from collections import namedtuple
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
import os
import shutil
from PIL import Image
from tensorboardX import SummaryWriter
INFECTED = 'infected'
UNINFECTED = 'uninfected'
train_dir = 'dataset/train_signs'
X_train = os.listdir(train_dir)
const csv = require('csvtojson')
const fs = require('fs')
const csvFilePath='sentences.csv'
const csvWritePath='sentences.json'
const readStream= fs.createReadStream(csvFilePath);
const writeStream = fs.createWriteStream(csvWritePath)
// This writes JSON but incorrectly. You will see. Look at the options for this CSV library
const stringSimilarity = require("string-similarity");
const arrayOfLangNames = Object.values(languages)
function getLangCodeFromLanguage(languageName) {
let code = Object.keys(languages).find(key =>
languages[key] === languageName
)
if (!code) {
const admin = require("firebase-admin") // required
const projectId = "lingo-e9b0f"
admin.initializeApp({ projectId })
const db = admin.firestore()
async function getMarker() {
let count = 0;
const snapshot = await admin.firestore().collection('sentence-pairs').get()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
type SymbolMapping struct {
IBSymbol string
FirstRateSymbol string
TickDataSymbol string
Name string
}
var SymbolMappings = []SymbolMapping{
{IBSymbol: "ES", FirstRateSymbol: "ES", TickDataSymbol: "ES", Name: "S&P 500"},
@JohnAllen
JohnAllen / install_go_1.19.sh
Last active February 12, 2023 10:28
install Go for Linux
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz
sudo tar -xvf go1.19.linux-amd64.tar.gz
sudo mv go /usr/local/go
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
echo "GOROOT=/usr/local/go " >> ~/.bashrc
echo "PATH=$GOPATH/bin:$GOROOT/bin:$PATH" >> ~/.bashrc
#install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
sudo apt update
sudo apt install git