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
# Drop this folder in a directory and run it. It will organize all of your files into folder by first letter | |
# This was inspired by my mom (maybe you can relate?) | |
# This took much longer than I thought it would to figure this out, but I learned which modules are good for file handling. | |
# It took about an hour to come up with the base of the program, which organizes files by first letter or number | |
# I would like it to eventually recursively go into folders getting files and organizing them into folders. | |
# This was made using a straight ahead approach. | |
# For beginners, a directory is a folder. | |
# By the Tutorial Doctor | |
# Sun Dec 20 23:40:49 EST 2015 | |
#------------------------------------------------------------------------------ |
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
# Fuzzy Logic experiment (WIP) | |
# By the Tutorial Doctor | |
# Objects are not always in one of two states (true or false), but rather in several states at one time. | |
#(val-min)/(max-min) | |
#--------------------------------------------------------------------------- | |
#VARIABLES | |
#------------------------------------------------------------------------------ | |
cold =(1,213) |
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 bs4 as bs | |
import urllib.request | |
import re | |
import nltk | |
#Install beautifulsoup | |
#Article this is from: | |
#https://stackabuse.com/text-summarization-with-nltk-in-python/ | |
#NLTK help: | |
#https://stackoverflow.com/questions/4867197/failed-loading-english-pickle-with-nltk-data-load |
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 sqlalchemy import create_engine,ForeignKey,Column,Date,Integer,String,Boolean | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import relationship,backref,sessionmaker | |
# Course has many sections | |
# Section belongs to many courses | |
# Section has a label | |
# Label belongs to many sections | |
# Label belogns to many courses | |
# Section has a label |
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
# This code is not mine: | |
# https://www.geeksforgeeks.org/extract-images-from-video-in-python/ | |
# pip3 install opencv-python | |
# Importing all necessary libraries | |
import cv2 | |
import os | |
# Read the video from specified path |
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 PIL import Image | |
from PIL import GifImagePlugin | |
import os,time,zipfile | |
imageObject = Image.open("./source.gif") | |
# info = imageObject.info | |
for frame in range(0,imageObject.n_frames): | |
imageObject.seek(frame) | |
#imageObject.info['transparency'] = 255 |
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
# Coding | |
# https://ruby-doc.org/core-1.9.2/String.html | |
# http://www.peachpit.com/articles/article.aspx?p=1278994&seqNum=4 | |
def title1(name="") | |
puts "\n" + name.upcase + ":" | |
puts "-"*65 | |
end | |
#Note: '\n' doesn't create a new line. Must use "\n". |
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
#coding: utf-8 | |
# AI Command | |
# By the Tutorial Doctor | |
# Wednesday September 02, 2015 (age relative to this) | |
# Only add valid commands to the memory | |
# a single command can trigger several functions | |
#------------------------------------------------------------------------------ | |
class AI(object): | |
pass | |
#------------------------------------------------------------------------------ |
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 urllib,pprint | |
from bs4 import BeautifulSoup | |
def train(url): | |
html=urllib.urlopen(url).read() | |
soup = BeautifulSoup(html) | |
# kill all script and style elements | |
for script in soup(["script", "style"]): | |
script.extract() # rip it out | |
text = soup.get_text() |
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> |
NewerOlder