Skip to content

Instantly share code, notes, and snippets.

View kjhenner's full-sized avatar

Kevin Henner kjhenner

View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
name: starbucks-bot-debug
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
import regex as re
import sys
import os
from tqdm import tqdm
from collections import defaultdict
p = re.compile(r"([1-9][0-9\.\,]*)[\.\,\?\!]*\s+")
if __name__ == "__main__":
data_path = sys.argv[1]
running install
running bdist_egg
running egg_info
writing torch_cluster.egg-info/PKG-INFO
writing dependency_links to torch_cluster.egg-info/dependency_links.txt
writing requirements to torch_cluster.egg-info/requires.txt
writing top-level names to torch_cluster.egg-info/top_level.txt
reading manifest file 'torch_cluster.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'torch_cluster.egg-info/SOURCES.txt'
@kjhenner
kjhenner / S12-1031.json
Last active July 13, 2019 19:11
test graph data
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"year": "2002", "title": "design of a multilingual parallelprocessing statistical parsing engine", "authors": "Daniel M Bikel", "id": "External_61"}, {"year": "2012", "title": "the effects of semantic annotations on precision parse ranking", "authors": "Andrew MacKinlay, Rebecca Dridan, Diana McCarthy, Timothy Baldwin", "id": "S12-1031"}, {"year": "2014", "title": "on wordnet semantic classes and dependency parsing", "authors": "Kepa Bengoetxea, Joakim Nivre, Yue Zhang, Koldo Gojenola, Eneko Agirre", "id": "P14-2106"}, {"year": "1998", "title": "automatic retrieval and clustering of similar words", "authors": "D Lin", "id": "External_4260"}, {"year": "2002", "title": "a comparison of algorithms for maximum entropy parameter estimation", "authors": "Robert Malouf", "id": "W02-2018"}, {"year": "2002", "title": "robust accurate statistical annotation of general text", "authors": "Ted Briscoe, John Carroll", "id": "External_110"}, {"year": "2007", "
cd /usr/src/puppet-quest-guide
git fetch origin code_management_arc
git pull origin code_management_arc
cd tests
for q in 'welcome' 'hello_puppet' 'agent_run' 'manifests_and_classes' 'package_file_service' 'variables_and_templates' 'class_parameters' 'facts' 'conditional_statements' 'the_forge' 'roles_and_profiles'; do
rspec $q\_spec.rb --tag solution --tag validation
done
quest begin hiera
require 'json'
def adjective
adjectives = ['huge', 'loser', 'incredible', 'classy', 'fantastic', 'great', 'illegal', 'low-energy', 'overrated', 'terrific', 'ugly', 'nasty', 'winning', 'stupid', 'weak', 'bad', 'dangerous']
return adjectives.sample
end
def exaggerate(number)
number * (rand(1..3) + rand(1..3))
end
require 'highline/import'
require 'net/ssh'
RSpec.configure do |c|
c.before(:example, :host => :hello) do
set :backend, 'ssh'
set :host, 'hello.learning.puppetlabs.vm'
options = {password: "puppet", user: "root"}
set :ssh_options, options
end
FACTNAMES = %w[env_windows_install_dir architecture augeasversion blockdevices cfkey dhcp_servers domain facterversion filesystems fqdn gid hardwareisa hardwaremodel hostname id interfaces ipaddress ipaddress7 iphostnumber kernel kernelmajversion kernelrelease kernelversion ldom lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macosx manufacturer memory netmask network operatingsystem operatingsystemmajrelease operatingsystemrelease os osfamily partitions path physicalprocessorcount processor processors ps puppetversion rubyplatform rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_enforced selinux_policyversion ssh system32 system_uptime timezone uptime uptime_days uptime_hours uptime_seconds virtual is_virtual vlans xendomains]
fact_re = FACTNAMES.map{ |x| '[$|${]' + x}.join('|')
filenames = `egrep -alr '#{fact_re}' .`
puts filenames
def quarter_range(fiscal_year, quarter)
# Fiscal year n starts in February of year n-1
start_month_offset = 1+((quarter.to_i - 1) * 3)
end_month_offset = start_month_offset + 3
cal_year = Date.parse("#{fiscal_year.to_i-1}-1-1")
{
start: cal_year + start_month_offset.months,
first: cal_year + (start_month_offset+1).months,
second: cal_year + (start_month_offset+2).months,
end: cal_year + end_month_offset.months
require 'ruby_rhymes'
require 'treat'
require 'json'
include Treat::Core::DSL
def bigram_to_s(bigram)
"#{bigram[0]}_#{bigram[1]}"
end
def remove_linebreaks(string)