# Load dplyr
library(dplyr)
# Load ggplot2
library(ggplot2)
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
require 'date' | |
Date.new(2019,10,1).upto(Date.today) do |date| | |
d = date.strftime("%y%m%d") | |
url = "https://fsapps.fiscal.treasury.gov/dts/files/#{d}00.xlsx" | |
unless File.exist? "data/#{d}.xlsx" | |
cmd = "curl '#{url}' --output data/#{d}.xlsx" | |
p cmd | |
`#{cmd}` | |
end |
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::process::{Command, Output}; | |
// Struct to represent a system process | |
pub struct SystemProcess { | |
// The process itself | |
pub process: Command, | |
// The output of the process, if it has been run | |
pub output: Option<Output>, | |
} |
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
"""inline-rust. | |
Based on https://gist.github.com/adamnew123456/12546e6e36607a63e254 | |
Works with integers out-of-the-box. Other types not so much without work. | |
""" | |
import ctypes | |
import tempfile | |
import os |
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
require 'stupidedi' | |
require 'nokogiri' | |
require 'pp' | |
class Gen | |
def run(name, guide) | |
builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| | |
xml['medi'].edimap("xmlns:medi" => "http://www.milyn.org/schema/edi-message-mapping-1.6.xsd") { | |
xml['medi'].description('name' => guide.name, 'version' => 1.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
defmodule Foo.Alchemy do | |
use HTTPoison.Base | |
def process_url(url) do | |
URI.encode(Application.get_env(:foo, :alchemy_url) <> url) | |
end | |
def request(url, text) do | |
querystring = params(text) |> to_querystring | |
case post(url, querystring, headers) do |
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
$(document).ready(function() { | |
/** | |
* @return {undefined} | |
*/ | |
function val() { | |
$("input").val(function() { | |
return this.value.toLowerCase(); | |
}); | |
} | |
/** |
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
## | |
# <p>Represents a point on the surface of a sphere. (The Earth is almost | |
# spherical.)</p> | |
# | |
# <p>To create an instance, call one of the static methods fromDegrees() or | |
# fromRadians().</p> | |
# | |
# <p>This code was originally published at | |
# <a href="http://JanMatuschek.de/LatitudeLongitudeBoundingCoordinates#Java"> | |
# http://JanMatuschek.de/LatitudeLongitudeBoundingCoordinates#Java</a>.</p> |
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
#!/bin/bash | |
# split-vpn | |
# patches junos pulse connections connections to allow split tunnelling | |
# relaunch with sudo if we aren't root | |
if [[ $EUID -ne 0 ]]; then | |
echo "$0: relaunching as sudo $0" | |
sudo "$0" $@ | |
exit $? |
NewerOlder