This file contains hidden or 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
# Inspired by: | |
# 'How many digits of pi do we really need?' | |
# (https://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimals-of-pi-do-we-really-need/) | |
# | |
# I wanted to see for myself that the difference between 15 digits and 16 | |
# digits amounted to only half of an inch at the scale of Voyager 1's | |
# distance of ~12.5 billion miles | |
from decimal import Decimal, getcontext |
This file contains hidden or 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
// Exercise 1.4 from 'The Go Programming Language', by A Donovan and | |
// B Kernigham | |
// | |
// Zach Young | |
// 27 May, 2019 | |
// | |
//Dup2 prints the count and text of lines that appear more than once | |
//in the input. It reads from stdin or from a list of named files. | |
package main |
This file contains hidden or 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
package main | |
/* | |
Got the idea from https://learn.lytics.com/understanding/product-docs/lytics-javascript-tag/testing-and-verification#testing-audiences | |
Given an input of "test", makes: | |
[email protected] | |
[email protected] | |
[email protected] |
This file contains hidden or 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/bin/env python | |
import sys | |
""" | |
Got the idea from https://learn.lytics.com/understanding/product-docs/lytics-javascript-tag/testing-and-verification#testing-audiences | |
Given an input of "test", makes: | |
[email protected] | |
[email protected] | |
[email protected] |
NewerOlder