Skip to content

Instantly share code, notes, and snippets.

View comdet's full-sized avatar

Khomdet Phueadphut comdet

View GitHub Profile
@comdet
comdet / yolotovoc.py
Last active November 27, 2020 12:34
yolotovoc.py
import os
import cv2
from xml.dom.minidom import parseString
from lxml.etree import Element, SubElement, tostring
import numpy as np
from os.path import join
from tqdm import tqdm
## converts the normalized positions into integer positions
def unconvert(class_id, width, height, x, y, w, h):
const {Builder, By, Key, until} = require('selenium-webdriver');
(async function example() {
let driver = await new Builder().forBrowser('chrome').build();
try {
await driver.get('https://www.aiiotshop.com/');
await driver.findElement(By.className('b-gotologin')).click();
await driver.findElement(By.id('login-with-password-button')).click();
await driver.findElement(By.id('password_form')).findElement(By.name("username")).sendKeys('test');
await driver.findElement(By.id('password_form')).findElement(By.name("password")).sendKeys('test',Key.RETURN);
#include <TTP229.h>
#include "Keyboard.h"
const int _sclPin[4] = {2,4,6,8}; //scl pin frame 1 2 3 4
const int _sdoPin[4] = {3,5,7,9}; //sdo pin frame 1
uint8_t key = 0;
uint8_t channel = 0;
uint8_t keymap[64] =
{
225,226,227,228,229,230,231,232,
var board = (await Vue.prototype.$engine.boardManager.boards()).find(b=>b.name=="kbpro");
Vue.prototype.$global.board.board = board.name;
Vue.prototype.$global.board.board_info = board;
const fs = require("fs");
const path = require('path');
const { promisify } = require('util');
const ioxgd_codegen = require("../ioxgd/codegen");
const writeFileAsync = promisify(fs.writeFile);
const {dialog} = require("electron").remote;
Vue.prototype.$global.ioxgd = {
blocks: [],
component: []
protocol.registerSchemesAsPrivileged([{
scheme: 'app', privileges: {standard: true, secure: true, supportFetchAPI: true},
}]);
function createWindow() {
win = new BrowserWindow({
width: 800,
height: 600,
icon: path.join(__static, "icon.png"),
webPreferences: { //TODO check here!
if len(lane_lines) > 0 :
center_point = lane_lines[int(center_lane.shape[0]//2)]
center_width = int(center_lane.shape[1]//2)
angle = center_point - center_width
angle = angle/center_width
cv2.circle(out_img,(int(lane_lines[int(center_lane.shape[0]//2)]),int(center_lane.shape[1]//2)), 5, (255,0,255),thickness=5)
cv2.putText(out_img, str(angle), (10,20), color=(255,0,255), fontFace = cv2.FONT_HERSHEY_PLAIN,fontScale = 1)
center_point = lane_lines[int(center_lane.shape[0]//2)]
center_width = int(center_lane.shape[1]//2)
angle = center_point - center_width
angle = angle/center_width
const clangFormat = util.requireFunc(util.packageDir+"/kbide-package-clang-format/main");
let code = clangFormat(`
#include <Arduino.h>
#include <vector>
#include <WiFi.h>
#include <Wire.h>
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_LEDBackpack.h"
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;");
};
//-----------------------------------//
const clangFormat = util.requireFunc(util.packageDir+"/kbide-package-clang-format/main");
let code = clangFormat(`
int
main() {
printf();