Skip to content

Instantly share code, notes, and snippets.

@lefttree
lefttree / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
class Node(object):
"""
Tree node: left and right child + data which can be any object
"""
def __init__(self, data):
"""
Node Constructor
@param data node data object
"""
self.left = None
@lefttree
lefttree / countingbloom.py
Created March 21, 2016 08:25 — forked from cwvh/countingbloom.py
Simple counting bloom filter in Python.
def hashfn(item):
h = hash(item)
return (1 << (h%64)) | (1 << (h/64%64))
def mask(val):
return bin(hashfn(val))[2:]
class CountingBloom(object):
def __init__(self):
self.items = [0] * 64
#!/usr/bin/env python
# encoding: utf-8
import re
import os
import json
import requests
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
wait-for-it.sh: waiting for retool-gamma.cc7rz7o670iq.ap-south-1.rds.amazonaws.com:5432 without a timeout
wait-for-it.sh: retool-gamma.cc7rz7o670iq.ap-south-1.rds.amazonaws.com:5432 is available after 0 seconds
not untarring the bundle
[process service types] [ 'MAIN_BACKEND', 'DB_CONNECTOR', 'DB_SSH_CONNECTOR' ]
Database migrations are up to date.
Setting http and https agent maxSockets to 25
Running node v12.18.1
ARGV: [ '--max_old_space_size=5120', '--max-http-header-size=80000' ]
{"message":"Initialized rate limiter: 60 attempts every 60 seconds","level":"info","timestamp":"2022-02-16T11:07:16.122Z"}
{"message":"Initialized invite rate limiter: 50 attempts every 86400 seconds","level":"info","timestamp":"2022-02-16T11:07:16.123Z"}

This is a Test!Hello

This is a Test!Hello

This is a Test!Hello

This is a Test!Hello

This is a Test!Hello