Derived from this helpful stackoverflow answer
dup_data %>%
group_by(MRN) %>%
filter(Year == min(Year)) %>%
slice(1) %>%
ungroup()
Derived from this helpful stackoverflow answer
dup_data %>%
group_by(MRN) %>%
filter(Year == min(Year)) %>%
slice(1) %>%
ungroup()
read_all_csv_files <- function(dir) { | |
save_dir <- getwd() | |
setwd(dir) | |
files <- list.files(pattern = "csv") | |
for (file in files) { | |
if (!exists("dataset")){ | |
dataset <- read.csv(file) | |
} else { | |
temp_dataset <- read.csv(file, stringsAsFactors = FALSE) | |
dataset <- rbind(dataset, temp_dataset) |
# Collected R utility methods | |
read_all_csv_files <- function(dir) { | |
save_dir <- getwd() | |
setwd(dir) | |
files <- list.files(pattern = "csv") | |
for (file in files) { | |
if (!exists("dataset")){ | |
dataset <- read.csv(file) | |
} else { |
module LoginHelper | |
def login(user="test",pw="test") | |
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw) | |
end | |
end | |
RSpec.configure do |config| | |
config.include LoginHelper, type: :controller | |
end |
require 'faraday' | |
require 'uri' | |
data = { | |
:your_data => "YOUR DATA" | |
} | |
url = "some url" | |
response = Faraday.post(url) do |req| |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Auth App</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
</head> | |
<body> | |
<script> | |
// get the URL parameters received from the authorization server | |
var state = getUrlParameter("state"); // session key |
h
- left
j
- down
k
- up
l
- right
0
- end of line
Menopause | |
Antibiotics | |
Exercise | |
Jaundice | |
Rectal |
Menopause | |
Antibiotics | |
Exercise | |
Jaundice | |
Rectal |
After upgrading to Ruby 2.1, the rails app and apache we got the following error in our apache log:
/usr/bin/ruby: warning: RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead.
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- phusion_passenger (LoadError)
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:76:in `<main>'
[ pid=56858 thr=140583398008576 file=ext/apache2/Hooks.cpp:884 time=2014-04-25 22:10:55.823 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/web1.kmedcommunications.com/current': Could not read from the spawn server: Connection reset by peer (104)
Backtrace:
(empty)