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
{"id": "assume/currency_strategy.py:48", "prompt": "You are a world-class planning expert specializing in picking the best-suited currency for large, international projects. Currency decisions significantly impact project costs, reporting, and financial risk.\n\nHere's your decision-making process:\n\n1. **Determine if money is potentially involved:**\n\n * Set `money_involved` to `True` if the plan *potentially* requires any financial transactions, *direct or indirect*, such as:\n * Buying goods or services (e.g., lab equipment, scientific instruments, sampling containers, software licenses, data sets).\n * Paying for services (e.g., laboratory analysis, research assistance, data analysis, travel expenses, shipping samples, transcription services, professional editing, publication fees).\n * Paying people (researchers, technicians, consultants, divers, boat crews, etc.) for their time and expertise.\n * Renting equipment or facilities (e.g., lab space, boats, diving |
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
import os | |
from dotenv import dotenv_values | |
from llama_index.core.llms import ChatMessage | |
from llama_index.llms.openai_like import OpenAILike | |
import logging | |
import sys | |
import llama_index.core | |
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) | |
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout)) |
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
from tqdm import tqdm | |
import whois | |
import csv | |
# Base parts of the names to combine | |
base_parts = [ | |
'paper', 'rock', 'scissors', | |
] | |
# Suffixes to append |
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
bfile(name, v, offset=1, limit=1000)={ | |
my(cur=offset-1,F); | |
for(i=1,#v, | |
if (#Str(v[i]) > limit, | |
print("Next term has "#Str(v[i])" digits; exiting."); | |
break | |
); | |
my(s=Str(cur++, " ", v[i])); | |
print(s); | |
); |
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
items = [] | |
values = Array.new(1000) do |i| | |
n = i + 2 | |
x = (n ** 2) / 2 | |
y = Integer.sqrt(x) | |
value = x % y | |
items << [n, x, y, value] | |
value | |
end | |
IO.write('a338277_values.csv', values.join("\n")) |
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
def plot_modulus(values, count) | |
puts | |
s = values.map {|v| v.to_s(count) }.join('') | |
count.times do |i| | |
value = i.to_s(count) | |
re = Regexp.new("[^" + value + "]") | |
puts '# ' + s.gsub(re, ' ') | |
end | |
end |
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
require 'prime' | |
def plot(values, modvalue) | |
puts | |
puts "plot(values, #{modvalue})" | |
s = values.map {|v| (v % modvalue).to_s(modvalue) }.join('') | |
modvalue.times do |i| | |
value = i.to_s(modvalue) | |
re = Regexp.new("[^" + value + "]") | |
puts '# ' + s.gsub(re, ' ') |
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
# 2.920050977316 - A Prime-Representing Constant | |
# by Dylan Fridman, Juli Garbulsky, Bruno Glecer, James Grime, Massi Tron Florentin | |
# | |
# Numberphile | |
# https://www.youtube.com/watch?v=_gCKX6VMvmU | |
# | |
# Article | |
# https://arxiv.org/abs/2010.15882 | |
# | |
# OEIS sequence |
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
use std::io::Write; | |
std::env::set_var("RUST_LOG", "debug"); | |
env_logger::builder() | |
.format(|buf, record| { | |
writeln!(buf, "{} - {}:{} - {}", record.level(), record.file().unwrap_or("N/A"), record.line().unwrap_or(0), record.args()) | |
}) | |
.init(); |
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
# Regarding | |
# https://oeis.org/draft/A338530 | |
# https://oeis.org/A136437 | |
# | |
# Hugo Pfoertner: Can you please check the relation to A136437? It seems that (a(n)+2)/2 = (A136437-1)/2 for the even terms after a(31). | |
# Hugo Pfoertner: I checked against A136437 and found a(n)=A136437(n)-3 for 31<=n<=128. | |
# | |
# Here is output of the two sequences A136437 and A338530. They are indeed the same for this range. | |
# | |
require 'prime' |
NewerOlder