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 sys | |
import numpy as np | |
from keras.preprocessing import image | |
from keras.applications import resnet50 | |
# Load the Keras image database | |
model = resnet50.ResNet50() | |
# Load the picture as 224x224 (maximum size this model can cope with) | |
picture = image.load_img(sys.argv[1], target_size=(224, 224)) |
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 discord | |
# discord client | |
client = discord.Client() | |
# create a new event | |
@client.event | |
async def on_ready(): |
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 RPi.GPIO as GPIO | |
import time | |
# Pi has (confusingly) two numbering schemes for pins | |
# usually you would choose based on what is printed on | |
# your dongles/pinout prints | |
GPIO.setmode(GPIO.BCM) | |
# H-Bridge pins |
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 | |
from solid import * | |
from PIL import Image | |
def assembly(annotation=""): | |
a = import_stl("base.stl") + translate([5, -37, 10])( | |
linear_extrude(height=2, convexity=4)( | |
text(annotation, |
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 time | |
import RPi.GPIO as GPIO | |
# We are going to use the BCM numbering | |
GPIO.setmode(GPIO.BCM) | |
# Set pin 26 as input using pull up resistor | |
GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
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 random | |
import arcade | |
import _thread | |
class Fireball(arcade.Sprite): | |
def update(self): | |
move_rate = 10 | |
self.center_y += move_rate |
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
/******************************************** | |
USB Keyboard Hello World, Goodbye Zoom! | |
MakerHacks.com 12/2020 | |
*********************************************/ | |
// The library that does the magicx | |
#include "Keyboard.h" | |
// Right now our "keyboard" has one key | |
#define KEY_PIN 2 |
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
program MainProgram; | |
/* | |
Vic 20 8K Vic Bitmap Mode template | |
- can utilize up to 35K RAM under project settings | |
------------------- | |
Dev Note: Zero Page addresses have been defined in project settings | |
for the Vic 20 build. |
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 sys | |
import nmap | |
import time | |
nm = nmap.PortScanner() | |
nm.scan('10.0.1.0/24', '22') | |
# clear screen | |
sys.stdout.write(u"\u001b[2J\u001b[0;0H") | |
sys.stdout.flush() | |
time.sleep(0.2) |
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 glob | |
import sys | |
import subprocess | |
from PySide2.QtWidgets import* | |
from PySide2.QtGui import* | |
from PySide2 import QtCore, QtGui | |
# initialise variables |
NewerOlder