Skip to content

Instantly share code, notes, and snippets.

from itertools import product
from timeit import timeit
import pandas as pd
# data from https://www.cryptodatadownload.com/data/coinbase/
def profit(n, hPeriod, data):
return (data[n + hPeriod] - data[n]) / data[n]
@szmeku
szmeku / madridCoworks.js
Created January 15, 2021 22:24
madridCoworks.js
let coworks = require('./coworks.json')
const _ = require('ramda')
const fs = require('fs')
let output = '';
_.pipe(
_.map(
_.over(_.lensProp('tarifas'),
_.pipe(
_.filter(_.propEq('period', 'month')), _.map(_.over(_.lensProp('price'), _.pipe(
SSH_ENV="$HOME/.ssh/environment"
function run_ssh_env {
. "${SSH_ENV}" > /dev/null
}
function start_ssh_agent {
echo "Initializing new SSH agent..."
ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo "succeeded"
const har = require('./poolstamp.json');
const fs = require('fs');
const entries = har.log.entries
.filter(el => el._initiator.type !== 'preflight')
.filter(el => el.request.url.match(/(rack-design|add-racks)/gi))
const entriesJSON = JSON.stringify(entries, null, 2);
(function () {
function urlsToAbsolute(nodeList) {
if (!nodeList.length) {
return [];
}
var attrName = 'href';
if (nodeList[0].__proto__ === HTMLImageElement.prototype || nodeList[0].__proto__ === HTMLScriptElement.prototype) {
attrName = 'src';
}
nodeList = [].map.call(nodeList, function (el, i) {
Honest Annie Privacy Policy
Last updated: June 3, 2023
1. Introduction
At Honest Annie ("us", "we", "our"), we respect your privacy and are committed to protecting it. This Privacy Policy explains our practices regarding the collection, use, and disclosure of your personal data when you use our Services and your rights in relation to that data.
2. Data We Collect
import OpenAI from 'openai';
import secrets from '../secrets.json' assert {type: 'json'};
import {map, path, pipe} from "ramda";
const openai = new OpenAI({
apiKey: secrets.openai,
});
const functions = [
{

Welcome to Honest Annie's AI & Machine Learning Consulting

Pioneering Your Journey in AI and Machine Learning

Welcome to Honest Annie, where we excel in propelling businesses into the future with our advanced AI and machine learning solutions. Our team of seasoned experts is committed to crafting bespoke strategies that address your unique challenges and goals.

Comprehensive AI & ML Solutions Tailored for You

At Honest Annie, we understand that the world of artificial intelligence is vast and ever-evolving. That's why we offer a wide range of services including data analysis, algorithm development, and bespoke machine learning model creation. Our solutions are designed to be scalable, efficient, and ethically responsible.

@szmeku
szmeku / titanic-space-train.csv
Last active March 19, 2024 14:57
titanic-space-train.csv
We can't make this file beautiful and searchable because it's too large.
PassengerId,HomePlanet,CryoSleep,Cabin,Destination,Age,VIP,RoomService,FoodCourt,ShoppingMall,Spa,VRDeck,Name,Transported
0001_01,Europa,False,B/0/P,TRAPPIST-1e,39.0,False,0.0,0.0,0.0,0.0,0.0,Maham Ofracculy,False
0002_01,Earth,False,F/0/S,TRAPPIST-1e,24.0,False,109.0,9.0,25.0,549.0,44.0,Juanna Vines,True
0003_01,Europa,False,A/0/S,TRAPPIST-1e,58.0,True,43.0,3576.0,0.0,6715.0,49.0,Altark Susent,False
0003_02,Europa,False,A/0/S,TRAPPIST-1e,33.0,False,0.0,1283.0,371.0,3329.0,193.0,Solam Susent,False
0004_01,Earth,False,F/1/S,TRAPPIST-1e,16.0,False,303.0,70.0,151.0,565.0,2.0,Willy Santantines,True
0005_01,Earth,False,F/0/P,PSO J318.5-22,44.0,False,0.0,483.0,0.0,291.0,0.0,Sandie Hinetthews,True
0006_01,Earth,False,F/2/S,TRAPPIST-1e,26.0,False,42.0,1539.0,3.0,0.0,0.0,Billex Jacostaffey,True
0006_02,Earth,True,G/0/S,TRAPPIST-1e,28.0,False,0.0,0.0,0.0,0.0,,Candra Jacostaffey,True
0007_01,Earth,False,F/3/S,TRAPPIST-1e,35.0,False,0.0,785.0,17.0,216.0,0.0,Andona Beston,True
import pandas as pd
import numpy as np
import time
def using_for(df):
start_time = time.time()
for original_col in df.columns:
for divisor_col in df.columns:
new_col_name = f"{original_col}_div_{divisor_col}"