wsl --shutdown
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
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/local/bin/icon | |
############################################################################ | |
# | |
# File: ulogd2sql.icn | |
# | |
# Subject: Parse ulogd syslog lines to SQLite insertion statements | |
# | |
# Author: Art Eschenlauer, adapted from rough-in by Microsoft Copilot | |
# |
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
# LCTboot_inspect - TestCor::LCTboot modified: | |
# - to return a "reportables" data.frame as an attribute of the result | |
# - (for estimating the adjusted and unadjusted p-values) | |
# - to return the function environment as an attribute of the result | |
# - (for debugging reportables) | |
# - to use the normal approximation when Nboot == 0 | |
# - (so that the same code base may be used for LCT-N and LCT-B) | |
# ref: https://github.com/cran/TestCor/blob/9d5d2a9a1ac284e3346bd144776559cbd82a8b52/R/FdrMethods.R | |
#' Bootstrap procedure LCT-B proposed by Cai & Liu (2016) for correlation testing. | |
#' |
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
procedure co_foo(state, args[]) | |
return .(state[args[1]] +:= args[2]) | |
end | |
procedure co_new() | |
local state, foo, msg | |
state := table() | |
state["something"] := 1 | |
@( | |
foo := create ( |
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/env icon | |
############################################################################ | |
# | |
# File: pingstat.icn | |
# | |
# Subject: pingstat.icn - compute statistics for unix ping output | |
# | |
# Author: Arthur Eschenlauer (https://orcid.org/0000-0002-2882-0508) | |
# | |
# Date: 21 August, 2022 |
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
############################################################################ | |
# | |
# File: [progname].icn | |
# | |
# Subject: [progname].icn - [subtitle succinctly describing what progname.icn is or does] | |
# | |
# Author: Arthur Eschenlauer (https://orcid.org/0000-0002-2882-0508) | |
# | |
# Date: [e.g. 26 March, 2020] | |
# |
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
#' Emulate fgrep, i.e., is any of needles found in any of haystacks | |
#' | |
#' This should perform adequately for a few needles. | |
#' | |
#' If performance for many needles is inadequate, use | |
#' `0 < length(AhoCorasickTrie::AhoCorasickSearch(needles, haystacks)[[1]])` | |
#' as the implementation for a more realistic emulation of fgrep. | |
#' | |
#' @param needles A character vector of length 1 or more | |
#' @param search_strings A character of length 1 or more |
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
# staque.R - Icon-oriented stack and queue operations | |
# - queue: | |
# - sq_push/sq_pull to pass values thru vector left-to-right; | |
# - sq_put/sq_pop to pass values thru vector right-to-left. | |
# - stack: | |
# - sq_push/sq_get to left end of vector; | |
# - this is an "upward-growing stack"; | |
# - in Icon, get is a synonym for pop; however base::get exists in R. | |
# - sq_put/sq_pull to right end of vector; | |
# - this is a "downward-growing stack". |
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
# Count tabs per line; flag when number differs from number in first line | |
# | |
# Execute with `icon tabCount.icn tsv_file -1` | |
# See [the Icon website](https://cs.arizona.edu/icon) for further info about the Icon programming language. | |
# | |
procedure main(args) | |
# args[1] = input file | |
# args[2] = number of lines (optional, default = 3) | |
local expected | |
local input_file |
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
############################################################################ | |
# | |
# File: LcomboP.icn | |
# | |
# Subject: Produce lists combining memoized infinte sequences | |
# | |
# Author: Art Eschenlauer (@eschen42 on GitHub, | |
# - https://orcid.org/0000-0002-2882-0508 | |
# - https://github.com/eschen42 | |
# |
NewerOlder