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(dplyr) | |
| library(tidyr) | |
| library(stringr) | |
| sort_course_codes <- function(course_codes) { | |
| course_with_sorting <- data_frame(course_code = course_codes) %>% | |
| mutate(course_code_cleaned = str_trim(tolower(str_replace_all( | |
| course_code, "[(\\[\\{][^(\\[\\{]+[)\\]\\}]", "" | |
| )))) %>% | |
| separate( |
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
| merged_fit <- alply(1:n_samp, 1, function(s) { | |
| h_seg_dat_new$h.capseg.d[[merge_ixs[1]]] <- unlist(h_seg_dat_new$h.capseg.d[merge_ixs]) | |
| h_seg_dat_new$h.capseg.raw[[merge_ixs[1]]] <- unlist(h_seg_dat_new$h.capseg.raw[merge_ixs]) | |
| h_seg_dat_new$h.capseg.annot[[merge_ixs[1]]]$pos <- unlist(lapply(h_seg_dat_new$h.capseg.annot[merge_ixs], "[[", "pos")) | |
| h_seg_dat_new$gh.wes.allele.d[[merge_ixs[1]]] <- do.call(cbind, h_seg_dat_new$gh.wes.allele.d[merge_ixs]) | |
| h_seg_dat_new$gh.wes.allele.annot[[merge_ixs[1]]]$pos <- unlist(lapply(h_seg_dat_new$gh.wes.allele.annot[merge_ixs], "[[", "pos")) | |
| if (n_merge_hets >= 2) h_seg_dat_new$seg_phase_pr[[merge_ixs[1]]] <- 0.5 | |
| if (n_merge_hets >= 2) h_seg_dat_new$consensus_phase[[merge_ixs[1]]] <- init_merged_consensus_phase(log_het_phase_prob_list) | |
| capture_em_fit_new$log.het.phase.prob[[merge_ixs[1]]] <- data_frame("x1" = rep(NA, n_merge_hets)) | |
| capture_em_fit_new$het.phase.prob[[merge_ixs[1]]] <- capture_em_fit_new$log.het.phase.prob[[merge_ixs[1]]] |
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
| 17:13:34.819 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/xchip/scarter/dmccabe/software/gatk-protected_e54dac3/build/libs/gatk-protected-package-e54dac3-SNAPSHOT-local.jar!/com/intel/gkl/native/libgkl_compression.so | |
| [April 12, 2017 5:13:34 PM EDT] org.broadinstitute.hellbender.tools.exome.convertbed.ConvertBedToTargetFile --input test2.bed --output test2.target --help false --version false --showHidden false --verbosity INFO --QUIET false --use_jdk_deflater false --use_jdk_inflater false | |
| [April 12, 2017 5:13:34 PM EDT] Executing as [email protected] on Linux 2.6.32-642.13.1.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_121-b13; Version: Version:e54dac3-SNAPSHOT | |
| 17:13:34.858 INFO ConvertBedToTargetFile - Defaults.BUFFER_SIZE : 131072 | |
| 17:13:34.858 INFO ConvertBedToTargetFile - Defaults.COMPRESSION_LEVEL : 5 | |
| 17:13:34.858 INFO ConvertBedToTargetFile - Defaults.CREATE_INDEX : false | |
| 17:13:34.858 INFO ConvertBedToTargetFile - Defaults.CREATE_MD5 : false | |
| 17 |
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
| kL <- 1 | |
| kC <- 1 | |
| kH <- 1 | |
| K1 <- 0.045 | |
| K2 <- 0.015 | |
| # x and y should be two different colors in L*a*b* space | |
| CIEDE2000 <- function(x, y) { | |
| L1 <- x$L | |
| L2 <- y$L |
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
| ########################################################################################################################### | |
| # commands | |
| ########################################################################################################################### | |
| # ls only file size and name | |
| stat -c "%s %n" *.txt | column -t | |
| # watch output of qstat, highlight changes every 5s | |
| watch -n 5 -d 'qstat' |
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
| ArgumentError at /api/v1/products/components_and_accessories | |
| ============================================================ | |
| > When assigning attributes, you must pass a hash as an argument. | |
| app/controllers/api/v1/products_controller.rb, line 7 | |
| ----------------------------------------------------- | |
| ``` ruby | |
| 2 before_filter :verify_auth_token |
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
| set x to "" | |
| repeat 12 times | |
| set x to x & some item of "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890" | |
| end repeat | |
| set the clipboard to x | |
| tell application "System Events" | |
| keystroke "v" using {command down} | |
| end tell |
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 sublime, sublime_plugin | |
| from os.path import dirname, realpath | |
| import subprocess | |
| class BuildAndClean(sublime_plugin.TextCommand): | |
| def run(self, edit): | |
| self.view.window().run_command("build") | |
| sublime.set_timeout_async(self.clean, 3000) | |
| def clean(self): |
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
| ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
| html = %(<span class="has-error">#{html_tag}</span>).html_safe | |
| form_fields = %w(textarea input select) | |
| element = Nokogiri::HTML::DocumentFragment.parse(html_tag).css(['label', form_fields].join(', ')).first | |
| if element.node_name.eql?('label') | |
| html = %(<span class='has-error'>#{element}</span>).html_safe | |
| elsif form_fields.include?(element.node_name) | |
| html = %(<span class='has-error'>#{element}<span class='help-block'>#{[instance.error_message].join(', ')}</span></span>).html_safe | |
| end |
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
| $ rails g spree_account_recurring:install /Users/devin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.4/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `preference' for Spree::Recurring(Table doesn't exist):Class (NoMethodError) | |
| from /Users/devin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-account-recurring-d9977b380f05/app/models/spree/recurring.rb:7:in `<class:Recurring>' | |
| from /Users/devin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-account-recurring-d9977b380f05/app/models/spree/recurring.rb:2:in `<module:Spree>' | |
| from /Users/devin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/spree-account-recurring-d9977b380f05/app/models/spree/recurring.rb:1:in `<top (required)>' | |
| from /Users/devin/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.4/lib/ |