Skip to content

Instantly share code, notes, and snippets.

View KhalidRich's full-sized avatar

Khalid Richards KhalidRich

View GitHub Profile
var MyClass = function(constArgs) {
var myKlass = {
objVars: constArgs,
sayHi: function(name) {
alert("hi there " + name);
},
sayBye: function(name) {
alert("bye bye " + name);
},
saveTheWorld: function() {
var ResourceServices = function() {
var resourceService = {
getNewResources: function(sid, cid) {
if (sid == 73 && cid == 4) {
var resources = [
{
"resource_name": "Fractions blah blah",
"resource_url": "https://www.youtube.com/watch?v=GFGlgSfQ-Gk"
"resource_link": "youtube"
}
@KhalidRich
KhalidRich / linked_list.py
Created March 31, 2017 07:21
A simple implementation of a linked list
class Node:
def __init__(self, data=None, next_node=None):
self.data = data
self.next = next_node
class LinkedList:
def __init__(self, data):
""" Constructor for LinkedList class. See: https://docs.python.org/3/tutorial/classes.html """
self.head = Node(data)
Here we go, off the rails
Don't you know it's time to raise our sails?
It's freedom like you never knew
Don't need bags or a pass,
Say the word, I'll be there in a flash
You could say my hat is off to you
Oh, we can zoom all the way to the moon,
From this great wide wacky world,
"""
This program takes in a website as input and outputs some things we're interested in.
In general, web scraping is all about knowing what you want to get from your websites, and doing stuff with that information. General steps are as follows:
1. Make a request to the website you're trying to scrape.
2. Get the HTML form the site.
3. Look at the HTML and get the data you want.
4. Return the data in a meaningful way.
"""