Skip to content

Instantly share code, notes, and snippets.

@punchagan
punchagan / scrape_google_groups.py
Last active February 19, 2022 13:23
A simple script to scrape a google group.
import json
from os.path import exists
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import TimeoutException
class GoogleGroupsScraper(object):
""" A simple class to scrape a google group. """
@punchagan
punchagan / .gitignore
Last active April 9, 2022 09:46
Ocurrent logs line numbers
/__pycache__/
2023-07-05 18:38.18: New job: Build bench.Dockerfile using autumn in
[https://github.com/ocaml/dune.git#refs/heads/main (bb0668329ee4a48bdd7727703ca131f025070e5e)]
2023-07-05 18:38.18: Using cache hint "https://github.com/ocaml/dune.git-bench.Dockerfile"
2023-07-05 18:38.18: Waiting for resource in pool OCluster
2023-07-05 18:38.18: Waiting for worker…
2023-07-05 18:38.18: Got resource from pool OCluster
Building on development-worker
HEAD is now at 2ff88051c bench: add GC stats to bench
HEAD is now at bb0668329 refactor: use Path.External.t for dump_memo_graph_file (#8117)
#1 [internal] load build definition from bench.Dockerfile
@punchagan
punchagan / .gitignore
Last active November 29, 2023 12:26
Whatsapp Broadcast Export to Zulip
*.zip
*.jpg
/*.txt
@punchagan
punchagan / hello.py
Last active December 21, 2023 23:36
A simple Flask sockets example
# Copy of http://stackoverflow.com/a/20104705
from flask import Flask, render_template
from flask_sockets import Sockets
app = Flask(__name__)
app.debug = True
sockets = Sockets(app)
@sockets.route('/echo')
@punchagan
punchagan / .gitignore
Last active February 23, 2024 15:22
Zoom Meetings Command Line
/.mypy_cache/
/.envrc
const getAttendanceData = (sheet) => {
const lastColumn = sheet.getLastColumn();
const heading = sheet.getRange("A1:" + sheet.getRange(1, lastColumn).getA1Notation()).getValues()[0];
const data = sheet.getRange("A3:" + sheet.getRange(1, lastColumn).getA1Notation() + sheet.getLastRow()).getValues();
// Find the start date for the last 12 weeks
const today = new Date();
const twelveWeeksAgo = new Date(today.setDate(today.getDate() - 84));
// Filter the headings to get the columns within the last 12 weeks