Skip to content

Instantly share code, notes, and snippets.


boB Rudis hrbrmstr

Block or report user

Report or block hrbrmstr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View scrape.R
get_page <- function(page_num = 1) {
# this is to be kind to the web site
# it does not have a robots.txt so this should be the default wait
# time between requests since the desires of the scraper are not
# greater than that of the site owner and you'd be abusing
# their resources if you did not put a delay in between requests
View ex.sql
ROW_NUMBER() OVER (PARTITION BY [product_id], shop_code
[doc_date]) - ROW_NUMBER() OVER (PARTITION BY [product_id], shop_code, mark_1
View forso.R
pg <- read_html("")
blocks <- html_nodes(pg, ".block")
items_and_quantity <- html_nodes(blocks, xpath=".//div[@class='col-block' and contains(., 'Item(s)')]")
items <- html_nodes(items_and_quantity, xpath=".//strong[contains(., 'Item(s)')]/following-sibling::span") %>% html_text(trim=TRUE)
hrbrmstr /
Last active Oct 17, 2018
really pathetic child text tag extraction
View power-mining.R
doe <- read_html("")
dir.create("~/Data/doe-cache-dir", showWarnings = FALSE)
html_nodes(doe, xpath=".//a[contains(., 'XLS')]") %>%
hrbrmstr / gpg-agent.conf
Created Sep 1, 2018 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
View gpg-agent.conf
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
View mikrotik-coinhive-asn-aso.csv
asn org iso3c n
AS262661 Linknet Telecomunicaçoes BRA 2771
AS262988 Pombonet Telecomunicações e Informática BRA 2439
AS262296 Windx Networks BRA 2382
AS52909 Vox Telecomunicações do Brasil Ltda BRA 1518
AS263030 CNET Provedor de Internet Ltda ME BRA 1492
AS263468 Rapnet Comunicacao Multimidia Ltda BRA 1460
AS262579 GE Network Provedor de Internet LTDA BRA 1455
AS264479 Turbozone Internet BRA 1450
AS263991 Fernanda Cristina Ruiz Matiazzo - Me BRA 1445
View AS50607.csv
created_at x event hj_asn hj_prefix hj_name by_asn by_org day
2018-07-09T09:27:23Z BGP HJ AS3491 PCCW Global, Inc. AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T09:27:20Z BGP HJ AS22414 Craigslist, Inc. AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T09:27:17Z BGP HJ AS46179 MediaFire, LLC AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T09:27:15Z BGP HJ AS32934 Facebook, Inc. AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T08:11:34Z BGP HJ AS41231 Canonical Group Limited AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T07:42:50Z BGP HJ AS45753 NETSEC NOC AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T06:28:54Z BGP HJ AS137915 ZTC-AS-AP Zero Technology Co. ,LIMITED, HK AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T05:02:10Z BGP HJ AS57976 Blizzard Entertainment, Inc AS50607 Stowarzyszenie e-Poludnie 2018-07-09
View pmkor-cvt.R
# we're going to process each page and read_fwf will complain violently
# when it hits header/footer rows vs data rows and we rly don't need to
# see all those warnings
read_fwf_q <- quietly(read_fwf)
# grab the PDF text
View five-rounds.csv
sample_id B1 B2 B3 reading_date ward service_line_material
2 8.1 10.8 2.8 aug-15 9 Unknown
4 1.1 BD BD aug-15 1 Copper
7 7.2 1.4 BD aug-15 9 Copper
8 40.6 9.7 6.1 aug-15 9 Lead
12 10.6 1.0 1.3 aug-15 9 Unknown
15 4.4 BD BD aug-15 9 Copper
16 24.4 8.8 4.3 aug-15 5 Galvanized
17 6.6 5.8 1.4 aug-15 2 Unknown
18 4.1 1.1 1.1 aug-15 7 Copper
You can’t perform that action at this time.