Skip to content

Instantly share code, notes, and snippets.

View rauljordan's full-sized avatar
💭
building ethereum

Raul Jordan rauljordan

💭
building ethereum
View GitHub Profile
@rauljordan
rauljordan / jupyer.py
Created September 19, 2017 18:05
Jupyter Notebook Exploration
import pandas as pd
import seaborn as sns
df_2012_2013 = pd.read_csv('./data/2012-2013.csv');
import { graphql, compose } from 'react-apollo';
function UserProfile(props) {
return 'Your Name is: {props.data.currentUser.name}';
}
export default compose(graphql(query))(UserProfile);
const query = gql`
query MyExampleQuery {
currentUser {
name
photo
friends(limit: 10) {
name
photo
friends(limit: 10) {
name
{
scrape(url: 'https://google.com') {
div(id: 'header') {
ul {
li {
a {
href
content
}
}
{
scrape(url: 'https://google.com') {
links {
title
footer {
content
}
}
}
}
const query = gql`
query MyExampleQuery {
currentUser {
name
photo
}
}
`;
import express from 'express';
import cors from 'cors';
import graphqlHTTP from 'express-graphql';
import schema from './schema';
const app = express();
app.use(cors());
app.use('/', (req, res) => {
import {
graphql,
GraphQLSchema,
GraphQLObjectType,
GraphQLString
} from 'graphql';
import { HtmlPage } from './resolvers';
var schema = new GraphQLSchema({
import cheerio from 'cheerio';
import fetch from 'node-fetch';
import {
graphql,
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
GraphQLInt,
GraphQLList
export const HtmlPage = new GraphQLObjectType({
name: 'HtmlPage',
fields: () => ({
url: {
type: GraphQLString,
resolve(root, args, context) {
return root.url;
}
},
hostname: {