This file contains 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
/** Jest Config **/ | |
"jest": { | |
"globals": { | |
"__DEV__": true, | |
"__TEST__": true | |
}, | |
"testDirectoryName": "app/tests", | |
"testFileExtensions": [ |
This file contains 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
let HelloWorld = React.createClass({ | |
render(){ | |
return <span>Hello, world!</span>; | |
} | |
}) | |
React.render(<HelloWorld/>, document.body) |
This file contains 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
let MyComponent = React.createClass({ | |
getInitialState(){ | |
return { who: 'world!', unchanged: 'I dont change' }; | |
}, | |
render(){ | |
return ( | |
<span className='hello' onClick={this.handleClick}> | |
Hello, {this.state.who} | |
</span> | |
) |
This file contains 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
let MyForm = React.createClass({ | |
render(){ | |
return ( | |
<form onSubmit={this.handleSubmit}> | |
<input type="text" ref='my-input' /> | |
</form> | |
) | |
}, | |
handleSubmit(event){ | |
event.preventDefault() |
This file contains 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
let ClickableList = React.createClass({ | |
render(){ | |
let { inputs, onClickItem } = this.props; | |
return ( | |
<ul> | |
{inputs.map((input,i)=> | |
<li key={i} onClick={onClickItem.bind(null, input)}> | |
{input} | |
</li> | |
)} |
This file contains 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
propTypes: { | |
onClickItem: React.PropTypes.func.isRequired, | |
inputs: React.PropTypes.arrayOf( | |
React.PropTypes.shape({ | |
text: React.PropTypes.node | |
}) | |
) | |
}, | |
getDefaultProps(){ |
This file contains 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
#!/usr/bin/python | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import scipy.stats as stats | |
# read the data | |
loansData = pd.read_csv( | |
'https://spark-public.s3.amazonaws.com/dataanalysis/loansData.csv' | |
) |
This file contains 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
from scipy import stats | |
# import matplotlib.pyplot as plt | |
import pandas as pd | |
import collections | |
loansData = pd.read_csv( | |
'https://spark-public.s3.amazonaws.com/dataanalysis/loansData.csv' | |
) | |
loansData.dropna(inplace=True) | |
freq = collections.Counter(loansData['Open.CREDIT.Lines']) |
This file contains 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 pandas as pd | |
import matplotlib.pyplot as plt | |
loansData = pd.read_csv( | |
'https://spark-public.s3.amazonaws.com/dataanalysis/loansData.csv' | |
) | |
loansData['Interest.Rate'] = loansData['Interest.Rate'].map( | |
lambda x: float(x.rstrip('%')) | |
) | |
loansData['Loan.Length'] = loansData['Loan.Length'].map( |
This file contains 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
#!/usr/bin/python | |
import pandas as pd | |
import statsmodels.api as sm | |
import math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
loansData = pd.read_csv('loansData_clean.csv') | |
loansData['IR_TF'] = loansData['Interest.Rate'] < 12 |
OlderNewer