This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type SymbolMapping struct { | |
IBSymbol string | |
FirstRateSymbol string | |
TickDataSymbol string | |
Name string | |
} | |
var SymbolMappings = []SymbolMapping{ | |
{IBSymbol: "ES", FirstRateSymbol: "ES", TickDataSymbol: "ES", Name: "S&P 500"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install rust | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
source "$HOME/.cargo/env" | |
sudo apt update | |
sudo apt install git | |
OlderNewer