This file contains hidden or 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
#!/bin/bash | |
# Brew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
# NVM | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash | |
# oh my ZSH | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
This file contains hidden or 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
""" | |
Using the Energy Information Administration API, I created a social network graph in Python of oil-producing countries based on high correlations between production decisions. I used advanced code to customize label placement and margins. | |
| |
Libraries: Numpy, Pandas, EIA, NetworkX, Matplotlib | |
""" | |
#pip install EIA-python | |
#pip install networkx | |
import numpy as np |
This file contains hidden or 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
/* | |
********************************************************************* | |
http://www.mysqltutorial.org | |
********************************************************************* | |
Name: MySQL Sample Database classicmodels | |
Link: http://www.mysqltutorial.org/mysql-sample-database.aspx | |
Version 3.1 | |
+ changed data type from DOUBLE to DECIMAL for amount columns | |
Version 3.0 | |
+ changed DATETIME to DATE for some colunmns |
This file contains hidden or 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
Raq7IMZ4QkqK2Oj7lKT3bxJTgwxeJFYx4ADjTqVKdQY= |
This file contains hidden or 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 random | |
def summarize(computer_wins, draw_games, user_wins): | |
total_games = user_wins + computer_wins + draw_games | |
if total_games > 0: | |
user = user_wins / total_games * 100 | |
computer = computer_wins / total_games * 100 | |
draw = draw_games / total_games * 100 | |
print("You won: ", "{:.2f}".format(user), "%.") |
This file contains hidden or 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
const dataset = Array.from( | |
{ length: 10 }, | |
(d, index) => (index + 1) * 10 | |
); | |
console.log(dataset);//[10, 20, 30, 40, 50, 60, 70, 80, 90, 100] |
This file contains hidden or 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
require('dotenv').config(); | |
const express = require('express'); | |
const app = express(); | |
const listener = app.listen(process.env.PORT || 3000, () => { | |
console.log('Your app is listening on port ' + listener.address().port) | |
}); | |
//Open the homepage if the root of the project is asked for by the client. | |
app.use(express.static('public')) | |
app.get('/', (req, res) => { |
This file contains hidden or 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
//npm install express --save | |
const express = require('express'); | |
const app = express(); | |
const listener = app.listen(process.env.PORT || 3000, () => { | |
console.log('Your app is listening on port ' + listener.address().port); | |
}); |
This file contains hidden or 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 React from 'react'; | |
import { ThemeProvider } from '@material-ui/styles' | |
import { BrowserRouter, Route, Switch } from 'react-router-dom'; | |
import Header from '../components/ui/header'; | |
import Footer from '../components/ui/footer'; | |
import theme from './ui/theme'; | |
function App() { | |
return ( | |
<ThemeProvider theme={theme}> |
This file contains hidden or 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
const { DataSource } = require('apollo-datasource'); | |
const isEmail = require('isemail'); | |
class UserAPI extends DataSource { | |
constructor({ store }) { | |
super(); | |
this.store = store; | |
} | |
/** |
NewerOlder