Skip to content

Instantly share code, notes, and snippets.

View rafapolo's full-sized avatar

Rafael Polo rafapolo

View GitHub Profile
@rafapolo
rafapolo / yt-suma.py
Last active March 31, 2025 21:37
Summarize youtube transcripts using a local gemma3 on ollama
import sys
from youtube_transcript_api import YouTubeTranscriptApi, TranscriptsDisabled, NoTranscriptFound
import time
import requests
class Summarizer:
def prompt(self, text):
model_url="http://localhost:11434/api/generate"
payload = {
@rafapolo
rafapolo / 2h_resume.txt
Created March 28, 2025 16:55
Economy 2.0: Ep 7, A Conversation w/Cameron Sajedi - Resume
Economy 2.0: Ep 7, A Conversation w/Cameron Sajedi
https://www.youtube.com/watch?v=a-N_YXzp-q8
A recorded session titled "Economy 2.0", hosted by Josh Sidman and featuring guest Cameron Stiteler. It is part of a series exploring alternative economic models inspired by heterodox economists Silvio Gesell and Henry George. The session centers on reconceptualizing capitalism, free markets, land ownership, and monetary systems through both historical insights and modern technological frameworks.
🔍 Main Themes and Ideas:
1. Economy 2.0 Series
Originated from a course taught at the Henry George School.
Aims to distinguish free markets from capitalism, arguing they are not synonymous.
import * as XLSX from 'xlsx';
function generateExcelTemplate() {
// Create a new workbook
const workbook = XLSX.utils.book_new();
// Define your data
const data = [
['Name', 'Email', 'Age'],
['John Doe', '[email protected]', 30],
@rafapolo
rafapolo / chart.js
Last active September 26, 2023 17:53
var allValues = <%== @summary.data.dig('gender_representation', 'chart_data').values.map(&:values) %>
var maleFemaleColors = ['rgb(142, 1, 53)', 'rgb(0, 137, 140)'];
var data = [
{
values: allValues[0],
type: 'pie',
name: 'Operactional Functions',
marker: {
colors: maleFemaleColors
},
{
"version": "Versão",
"about": "Sobre",
"ok": "OK",
"account": "Conta",
"notes": "Notas",
"history": "Histórico",
"budget": "Orçamento",
"tradingPl": "Negociação",
"contacts": "Contactos",
@rafapolo
rafapolo / pega_filmografia_cinemateca.rb
Last active August 15, 2020 08:42
Lista Filmografia da Cinemateca Nacional (Hey, Bolsonaro, vai tomar no cu!)
#!/usr/bin/ruby
# extrapolo.com
require 'selenium-webdriver'
require "nokogiri"
def driver
Selenium::WebDriver.for :firefox, options: Selenium::WebDriver::Firefox::Options.new(
args: ['-headless']
)
#! /bin/ruby
# author: extrapolo.com
# scraps all min,max temperature from Nova Friburgo, Rj, Brazil from accuweather.com since 1992
require "selenium-webdriver"
require "byebug"
profile['browser.frames.enabled'] = false
profile['plugin.state.flash'] = 0
profile['network.http.prompt-temp-redirect'] = false
This file has been truncated, but you can view the full file.
@rafapolo
rafapolo / pega.rb
Last active April 15, 2017 22:22
pega geral em json
#!/usr/bin/ruby
#require 'mysql2'
require 'mechanize'
require 'parallel'
require 'byebug'
require 'awesome_print'
require 'colorize'
require 'csv'
require 'json'
@rafapolo
rafapolo / gera.sh
Created March 15, 2017 16:46
convert, trim and jon pdf pages as single jpg image
convert -density 220 in.pdf to_img_.jpg
mogrify -trim to_img_*.jpg
convert -append to_img_*.jpg out.jpg
rm to_img_*