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
// make a beatbox | |
import java.awt.*; | |
import javax.swing.*; | |
import javax.sound.midi.*; | |
import java.util.*; | |
import java.awt.event.*; | |
public class BeatBox { |
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
// make a beatbox | |
import java.awt.*; | |
import javax.swing.*; | |
import javax.swing.event.ListSelectionEvent; | |
import javax.swing.event.ListSelectionListener; | |
import java.io.*; | |
import javax.sound.midi.*; | |
import java.util.*; |
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
yahookey = 'cxtFNDLV34GrCw8Ns25KZt30SxLxZ85dZLUVlPCl.Gi0l.s1wrTTGuGclQK6bP9u6yeN' | |
from xml.dom.minidom import parseString | |
from urllib import urlopen, quote_plus | |
class matchrow: | |
def __init__(self,row,allnum=False): | |
if allnum: | |
self.data = [float(row[i]) for i in range(len(row)-1)] | |
# if allnum, then get the float of all items in row | |
else: |
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 bs4 import BeautifulSoup | |
import requests | |
import operator | |
import pprint | |
def get_cities(soup): | |
raw_cities = [option.get('value') for option in soup.findAll('option')] | |
return raw_cities | |
def make_url(raw_cities): |
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 json | |
import bsddb3 as bsddb | |
import re | |
import collections | |
# part 1 | |
# get top ten devices | |
def findtopten(db): | |
device = {} | |
for key in db.keys(): |
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 json | |
import bsddb3 as bsddb | |
db = bsddb.btopen("users.db") | |
for filename in os.listdir("."): | |
if not filename.endswith("hello.txt"): | |
continue | |
f = open(filename) |
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
what's up |