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
# these modules help us do the script | |
import html2text | |
import requests | |
import sys | |
# this is the important library that acutally does the work | |
from textstat.textstat import textstat | |
# this is an easy way to strip html | |
h = html2text.HTML2Text() |
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 sys | |
import discord | |
import subprocess | |
# discord client | |
client = discord.Client() | |
def process_message(message): |
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
# these modules help us do the script | |
import html2text | |
import requests | |
import sys | |
# this is the important library that acutally does the work | |
from textstat.textstat import textstat | |
with open('testfile.txt', 'r') as content_file: | |
test_string = content_file.read() |
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 os | |
import requests | |
import pyperclip | |
# did the user supply an image file? | |
if len(sys.argv) == 2: | |
image = sys.argv[1] | |
else: | |
input("You must supply an image file!") |
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
from LSM6DS3 import * | |
from time import sleep | |
from grove_rgb_lcd import * | |
import grovepi | |
# this is the chip the sensor is based on | |
mySensor = LSM6DS3() | |
# two buttons attached to digital 3 and 4 | |
grovepi.pinMode(3, "INPUT") |
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 serial | |
import time | |
from datetime import datetime | |
print("Starting ...") | |
# change the port to whichever shows in Arduino | |
tardis = serial.Serial('/dev/ttyACM0', baudrate=9600) | |
while(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
#include <Wire.h> | |
#include <I2C_LCD.h> | |
I2C_LCD LCD; | |
extern GUI_Bitmap_t bmlogo; //Declare bitmap data package. | |
uint8_t I2C_LCD_ADDRESS = 0x51; //Device address configuration, the default value is 0x51. | |
String instring; | |
void setup(void) |
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 PIL | |
from PIL import Image | |
import pyzbar.pyzbar as pyzbar | |
import pygame | |
import pygame.camera | |
from pygame.locals import * | |
# set up the camera | |
pygame.init() | |
pygame.camera.init() |
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 PIL | |
from PIL import Image | |
import pyzbar.pyzbar as pyzbar | |
import pygame | |
import pygame.camera | |
from pygame.locals import * | |
# set up the camera | |
pygame.init() | |
pygame.camera.init() |