One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
#include <iostream> | |
using namespace std; | |
int main() { | |
int i, n; | |
cin >> n; | |
for (i=0; i<n; i++) { | |
cout << "hello world\n"; | |
} | |
return 0; | |
} |
nodes = [{'name': n, 'group': G.node[n]['question_id'], 'size': G.node[n]['count']} for n in G] | |
l = G.edges() | |
edges = [{'source': l.index(s), 'target': l.index(t), 'value': G[s][t]['weight']} for s,t in itertools.product(l, l) if s in G and t in G[s]] | |
json.dump({'nodes': nodes, 'links': edges}, open('filename.json', 'w')) |
$ ./bin/spark-shell | |
14/04/18 15:23:49 INFO spark.HttpServer: Starting HTTP Server | |
14/04/18 15:23:49 INFO server.Server: jetty-7.x.y-SNAPSHOT | |
14/04/18 15:23:49 INFO server.AbstractConnector: Started [email protected]:49861 | |
Welcome to | |
____ __ | |
/ __/__ ___ _____/ /__ | |
_\ \/ _ \/ _ `/ __/ '_/ | |
/___/ .__/\_,_/_/ /_/\_\ version 0.9.1 | |
/_/ |
2014-03-04 | 15dfb8e6cc4111e3a5bb600308919594 | 11 | |
---|---|---|---|
2014-03-06 | 81da510acc4111e387f3600308919594 | 61 |
// load error messages from a log into memory | |
// then interactively search for various patterns | |
// base RDD | |
val lines = sc.textFile("log.txt") | |
// transformed RDDs | |
val errors = lines.filter(_.startsWith("ERROR")) | |
val messages = errors.map(_.split("\t")).map(r => r(1)) | |
messages.cache() |
from igraph import * | |
import numpy as np | |
# Create the graph | |
vertices = [i for i in range(7)] | |
edges = [(0,2),(0,1),(0,3),(1,0),(1,2),(1,3),(2,0),(2,1),(2,3),(3,0),(3,1),(3,2),(2,4),(4,5),(4,6),(5,4),(5,6),(6,4),(6,5)] | |
g = Graph(vertex_attrs={"label":vertices}, edges=edges, directed=True) | |
visual_style = {} |
So we will start by introducing you to where big data comes from and what kinds of things you can do with it.
We'll also provide an overview of some of the key characteristics of big data and a short summary of the data science process to get value out of big data.
import tensorflow as tf | |
import numpy as np | |
corpus_raw = 'He is the king . The king is royal . She is the royal queen ' | |
# convert to lower case | |
corpus_raw = corpus_raw.lower() | |
words = [] | |
for word in corpus_raw.split(): |
main_url = "http://books.toscrape.com/index.html" | |
import requests | |
result = requests.get(main_url) | |
result.text[:1000] |