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
#!/bin/bash | |
# Root directory to start searching | |
ROOT_DIR=${1:-.} # defaults to current directory if not specified | |
# Function to extract and format benchmark data | |
extract_benchmark_data() { | |
local file_path="$1" | |
local bench_prefix |
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
.tab:before { | |
content: "\00bb\00a0"; | |
} | |
/* Languages where tabs are used for indentation -- don't highlight. */ | |
.go.line.content .tab:before { | |
content: "\00a0\00a0"; | |
} | |
:root { |
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
-- 1 duplicate. | |
SELECT st_union(g) FROM ( | |
SELECT '01060000000200000001030000000100000004000000000000000000444000000000000044400000000000003440000000000080464000000000008046400000000000003E4000000000000044400000000000004440010300000002000000060000000000000000003440000000000080414000000000000024400000000000003E40000000000000244000000000000024400000000000003E4000000000000014400000000000804640000000000000344000000000000034400000000000804140040000000000000000003E40000000000000344000000000000034400000000000002E40000000000000344000000000000039400000000000003E400000000000003440'::GEOMETRY | |
FROM generate_series(1, 1) | |
) gen(g); | |
-- st_union | |
-- ------------------------------------------------------------------------------------------------------------------------ |
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
-- How to reduce a TLP query. | |
-- Below is an example where the TLP predicate is `true`. | |
-- Put this at the end of a failing tlp.log. | |
SELECT IF( | |
( | |
SELECT count(*) FROM ( | |
-- Count all rows in the table here. | |
SELECT count(*) FROM t | |
INTERSECT |
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
WARMUP: 8.65 | |
WARMUP: 12.806 | |
WARMUP: 5.377 | |
unique_length? @ints_uniq: 7.888 | |
unique_map? @ints_uniq: 11.046 | |
unique_recursion? @ints_uniq: 5.157 | |
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
# | |
# Recurring Job using Delayed::Job | |
# | |
# Setup Your job the "plain-old" DJ (perform) way, include this module | |
# and Your handler will re-schedule itself every time it succeeds. | |
# | |
# Sample : | |
# | |
# class MyJob | |
# include Delayed::ScheduledJob |
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
# I think the only way to do what you want is to use some sort of busy-wait. | |
# However, I think it would be better for your ModelHelper to use callbacks instead. | |
class ModelHelper | |
# Using busy-wait. | |
def self.find_other_thing_by_id_busy(id) | |
other_thing = nil | |
make_async_request(id) do |response| | |
other_thing = OtherThing.new(response) |