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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: starbucks-bot-debug | |
spec: | |
replicas: 1 | |
strategy: | |
type: Recreate | |
selector: | |
matchLabels: |
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 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] |
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
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' |
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
{"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", " |
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
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 |
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 '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 |
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 '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 |
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
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 |
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
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 |
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 'ruby_rhymes' | |
require 'treat' | |
require 'json' | |
include Treat::Core::DSL | |
def bigram_to_s(bigram) | |
"#{bigram[0]}_#{bigram[1]}" | |
end | |
def remove_linebreaks(string) |