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
#!/usr/bin/env ruby | |
require 'json' | |
require 'date' | |
require 'http' | |
require 'concurrent' | |
# I could not get bundle to install the 'concurrent-edge' gem so I just | |
# grabbed a couple classes I needed. code for Concurrent::Throttle is here: | |
# https://github.com/ruby-concurrency/concurrent-ruby/blob/master/lib-edge/concurrent/edge/throttle.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
use std::fmt::{self, Debug, Display}; | |
use std::convert::TryFrom; | |
use chrono::{NaiveDate, NaiveTime, NaiveDateTime, Timelike}; | |
/// Represents number of hours since 1970 | |
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, | |
Hash, Copy, Serialize, Deserialize)] | |
pub struct DtHr(pub i32); | |
/// Represents number of days since 1970. Note: will break on June 6, 2149 |
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
#!/usr/bin/python3 | |
import fileinput | |
import copy | |
import sys | |
special_chars = "! # $ & ' ( ) * + , / : ; = ? @ [ ]".split() | |
replacements = "%21 %23 %24 %26 %27 %28 %29 %2A %2B %2C %2F %3A %3B %3D %3F %40 %5B %5D".split() | |
def encode(line: str) -> str: | |
encoded = copy.copy(line) |