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 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): |
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 {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); |
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
#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, |
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
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; |
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 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: [] |
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
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! |
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
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) | |
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
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 |
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 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" |
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
.replace(/</g, "<") | |
.replace(/>/g, ">") | |
.replace(/"/g, """); | |
}; | |
//-----------------------------------// | |
const clangFormat = util.requireFunc(util.packageDir+"/kbide-package-clang-format/main"); | |
let code = clangFormat(` | |
int | |
main() { | |
printf(); |