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
library(tidyverse) | |
train_raw <- read_csv("/Users/aaron/Downloads/train 2.csv") | |
library(lubridate) | |
train_raw %>% | |
mutate( | |
age_upon_outcome = as.period(as.Date(datetime) - date_of_birth), | |
age_upon_outcome = time_length(age_upon_outcome, unit = "weeks") | |
) %>% |
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 pandas as pd | |
import datetime | |
def diff_month(d1, d2): | |
return (d1.year - d2.year) * 12 + d1.month - d2.month | |
# add the location to your csv | |
data = pd.read_csv(csv_file) | |
# change values in by=[] to the 1) account_id/name, 2) open date 3) close date to whatever you've named the |
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
# add code |
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
__label__sauce __label__cheese How much does potato starch affect a cheese sauce recipe? | |
__label__food-safety __label__acidity Dangerous pathogens capable of growing in acidic environments | |
__label__cast-iron __label__stove How do I cover up the white spots on my cast iron stove? | |
__label__restaurant Michelin Three Star Restaurant; but if the chef is not there | |
__label__knife-skills __label__dicing Without knife skills, how can I quickly and accurately dice vegetables? | |
__label__storage-method __label__equipment __label__bread What's the purpose of a bread box? | |
__label__baking __label__food-safety __label__substitutions __label__peanuts how to seperate peanut oil from roasted peanuts at home? | |
__label__chocolate American equivalent for British chocolate terms | |
__label__baking __label__oven __label__convection Fan bake vs bake | |
__label__sauce __label__storage-lifetime __label__acidity __label__mayonnaise Regulation and balancing of readymade packed mayonnaise and other sauces |
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 pandas as pd | |
keywords = ['nhs', 'love'] | |
words = ['i love football', 'nhs is awful', 'what is this', 'i love nhs because nhs is love', 'who are you'] | |
df = pd.DataFrame(words, columns=['words']) | |
all_results = [] | |
for words in df.words: | |
tmp_results = [] | |
for keyword in keywords: | |
keyword_count = 0 |
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 Ember from 'ember'; | |
export function date(params) { | |
return moment(date[0]).format('MMM Do');; | |
} | |
export default Ember.Helper.helper(date); |
This file has been truncated, but you can view the full file.
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
<?xml version="1.0" encoding="utf-16"?> | |
<VisualDefinition xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<Html><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<div> | |
<a id="left-menu" data-open="true" class="btn btn-default mobileMenu"> | |
<i class="glyphicon glyphicon-list"></i></a> | |
</div> | |
<div id='chart'> |
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ |
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder