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 | |
matplotlib.use('tkagg') | |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
from matplotlib import colors | |
from scipy.stats import ranksums |
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
ride <- GC.activity(compare=FALSE) | |
estimatew <- function(speed, wind_speed, slope,alt){ | |
hoodsA = 0.324 | |
dropsA = 0.307 | |
aerobarsA = 0.2914 | |
speed = speed/3.6 |
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
chr1 16999 169991 | |
chr1 19704 197041 | |
chr1 667239 6672391 | |
chr1 669329 6693291 | |
chr1 670303 6703031 | |
chr1 672208 6722081 | |
chr1 675888 6758881 | |
chr1 773213 7732131 | |
chr1 776300 7763001 | |
chr1 781936 7819361 |
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
Prefix Verb URI Pattern Controller#Action | |
line_items GET /line_items(.:format) line_items#index | |
POST /line_items(.:format) line_items#create | |
new_line_item GET /line_items/new(.:format) line_items#new | |
edit_line_item GET /line_items/:id/edit(.:format) line_items#edit | |
line_item GET /line_items/:id(.:format) line_items#show | |
PATCH /line_items/:id(.:format) line_items#update | |
PUT /line_items/:id(.:format) line_items#update | |
DELETE /line_items/:id(.:format) line_items#destroy | |
carts GET /carts(.:format) carts#index |
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
26 # POST /line_items | |
27 # POST /line_items.json | |
28 def create | |
29 product = Product.find(params[:product_id]) | |
30 @line_item = @cart.add_product(product.id) | |
31 | |
32 respond_to do |format| | |
33 if @line_item.save | |
34 format.html { redirect_to @line_item.cart, notice: 'Line item was successfully created.' } | |
35 format.json { render action: 'show', status: :created, location: @line_item } |
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
app/views/carts/show.html.erb: | |
<% @cart.line_items.each do |item| %> | |
<li><%= item.quantity %> × <%= item.product.title %></li> | |
<% end %> | |
------------------------------------------ |