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 java.lang.ProcessBuilder; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.FileReader; | |
import java.io.InputStreamReader; | |
import java.io.BufferedReader; | |
import java.security.MessageDigest; | |
import javax.xml.bind.DatatypeConverter; | |
public class Miner { |
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
with percentiles1 as | |
(select prison_name, end_to_end_time, cume_dist() over (partition by prison_name order by end_to_end_time) as percentile | |
from visit_metrics_entries where processed_at is not null) | |
, top_percentiles1 as | |
(select prison_name, end_to_end_time, rank() over (partition by prison_name order by end_to_end_time) as rank1 | |
from percentiles1 where percentile >= 0.95) | |
select prison_name, end_to_end_time from top_percentiles1 where rank1 = 1 |
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
module Equality | |
include ActiveSupport::Concern | |
def ==(other) | |
if self.instance_variables == other.instance_variables | |
self.instance_variables.each do |ivar| | |
return false if self.instance_variable_get(ivar) != self.instance_variable_get(ivar) | |
end | |
true | |
else |
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
package com.example.jps.opensesame.tasks; | |
import android.view.View; | |
import android.os.AsyncTask; | |
import android.widget.LinearLayout; | |
import android.widget.ToggleButton; | |
import com.example.jps.opensesame.Sensor; | |
/** |
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
wdt reset | |
load 0x40100000, len 25052, room 16 | |
tail 12 | |
chksum 0x0b | |
ho 0 tail 12 room 4 | |
load 0x3ffe8000, len 3312, room 12 | |
tail 4 | |
chksum 0x53 | |
load 0x3ffe8cf0, len 6576, room 4 | |
tail 12 |
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
diff --git a/app/models/sample.rb b/app/models/sample.rb | |
new file mode 100644 | |
index 0000000..7d523a9 | |
--- /dev/null | |
+++ b/app/models/sample.rb | |
@@ -0,0 +1,3 @@ | |
+class Sample < ActiveRecord::Base | |
+ validates_presence_of :value | |
+end | |
diff --git a/db/migrate/20090522160717_create_samples.rb b/db/migrate/20090522160717_create_samples.rb |
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
class Basket < Struct.new(:entries) | |
def self.new(*args) | |
b = super(*args) | |
b.entries ||= [] | |
b | |
end | |
def total | |
entries.inject(0.0) do |sum, entry| |
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
\g<group-name> |
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
(?<group-name>regular-expression){0} |
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
(?<ltr>[ABCEGHJKLMNPRSTVXYWZ]){0} | |
(?<num>[0-9]){0} | |
(?<fsa>\g<ltr>\g<num>\g<ltr>){0} | |
(?<ldu>\g<num>\g<ltr>\g<num>){0} | |
(?<cpc>\g<fsa> \g<ldu>){0} | |
^\d{5}|\g<cpc>$ |
OlderNewer