Skip to content

Instantly share code, notes, and snippets.

View erikaris's full-sized avatar

Erika Siregar erikaris

  • Old Dominion University
  • Norfolk, Virginia
View GitHub Profile
@erikaris
erikaris / README.md
Last active March 18, 2016 15:53
Web Science #6 - Twitter Followers Friendship

my webscience assignment 6

@erikaris
erikaris / index.html
Last active March 18, 2016 15:51
Web Science #6 - Karate Club
<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
<style>
svg {
font: 10px sans-serif;
}
.node {
fill: #fff;
@erikaris
erikaris / index.html
Last active March 18, 2016 15:51
Web Science #6 - Twitter Followers Friendship Genderize
<!DOCTYPE html>
<meta charset="utf-8">
<style>
svg {
font: 10px sans-serif;
}
.node {
stroke: #fff;
stroke-width: 1.5px;
}
@erikaris
erikaris / README.md
Last active March 23, 2016 12:49
Scatterplot for Passing Stat Data

Name: Erika Siregar

  • Assignment : Visualization Implementation (VI8)
  • Course: Information Visualization (CS725)
  • Semester : Spring 2016

Name: Erika Siregar

  • Assignment : Visualization Implementation (VI 10)
  • Theme : Faceting Concepts
  • Course: Information Visualization (CS725)
  • Semester : Spring 2016
@erikaris
erikaris / README.md
Last active February 20, 2017 01:59
PhantomJS vs PyQt4 Crawler

PhantomJS vs PyQt4 Crawler

PhantomJS usage

phantomjs crawl.js [URI] [OutDir]

PyQt4 usage

python crawl.py [URI] [OutDir]

http://memento-damage.cs.odu.edu/api/damage/[the input URI-M]
@erikaris
erikaris / ec_plot.py
Last active October 18, 2017 12:28
matplotlib n series in 1 call
# %matplotlib inline # just shows the graphic inline with the code but it's not interactive.
%matplotlib notebook
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 2, 100) #create an equal-spaced 100 numbers range from 0 - 2
plt.plot(x, x, 'b^', x, x**2, 'r>', x, x**3, 'g+')
plt.xlabel('x label')
%matplotlib notebook
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0.0, 2, 0.01)
y1 = np.sin(2 * np.pi * x)
y2 = 1.2 * np.sin(4 * np.pi * x)
fig, (ax, ax1) = plt.subplots(2, 1, sharex=True)
ax.plot(x, y1, x, y2, color='black')
import numpy as np
linear_data = np.array([1,2,3,4,5,6,7,8])
exponential_data = linear_data**2
plt.figure()
plt.plot(linear_data, '-o', exponential_data, '-o')
# fill the area between the linear data and exponential data
plt.gca().fill_between(range(len(linear_data)),