This file contains hidden or 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
| line = ARGV[0] | |
| max = 0x2000 | |
| sum = 0 | |
| (line.length/2).times do |i| | |
| sum += (line[i*2]+line[i*2+1]).to_i(16) | |
| end | |
| puts "%02X" % ( (max-sum) & 0x00FF ) |
This file contains hidden or 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
| /** | |
| * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA | |
| * | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without modification, | |
| * are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright notice, this | |
| * list of conditions and the following disclaimer. |
This file contains hidden or 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
| """ | |
| Demonstration of a Bluefruit BLE Central for Circuit Playground Bluefruit. Connects to the first BLE | |
| UART peripheral it finds. Sends Bluefruit ColorPackets, read from three accelerometer axis, to the | |
| peripheral. | |
| """ | |
| import time | |
| import board | |
| import digitalio |
This file contains hidden or 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 threading | |
| import time | |
| def thread1(): | |
| while True: | |
| time.sleep(1) | |
| print("Thread1 running") | |
| if not threading.main_thread().is_alive(): | |
| print("Thread1 exit") | |
| break |
This file contains hidden or 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 board | |
| import digitalio | |
| import storage | |
| import os | |
| storage.remount("/", False) | |
| force_writable_button = digitalio.DigitalInOut(board.D2) | |
| force_writable_button.direction = digitalio.Direction.INPUT | |
| force_writable_button.pull = digitalio.Pull.UP |
This file contains hidden or 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
| from ctypes import * | |
| import random | |
| import os | |
| import argparse | |
| import shutil | |
| from pathlib import Path | |
| global DARKNET_FORCE_CPU | |
| DARKNET_FORCE_CPU = True |
This file contains hidden or 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
| <html> | |
| <body> | |
| <canvas id="draw-area" width="480" height="320"></canvas> | |
| <input id="select-image" type="file" accept="image/*"> | |
| <div id="filename"></div> | |
| <img id="imagePreview"> | |
| <script> | |
| drawingArea = document.getElementById("draw-area"); | |
| imageSelection = document.getElementById("select-image"); | |
| filenameOutput = document.getElementById("filename"); |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src="./KeyActionList.js" defer></script> | |
| <meta charset="UTF-8"> | |
| <title>KeyActionList</title> | |
| </head> | |
| <body> | |
| <select id="category"></select> | |
| <select id="action"></select> | |
| </body> |
This file contains hidden or 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
| <html> | |
| <body> | |
| <canvas id="drawing" width="480" height="270" ></canvas> | |
| <li id="areas"></li> | |
| <script> | |
| const CanvasArea = { | |
| elements: { | |
| canvas: document.getElementById("drawing"), | |
| }, |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Mouse.ini generator</title> | |
| </head> | |
| <body> | |
| <div class="wrapper"> | |
| <div id="left-column"> |