Skip to content

Instantly share code, notes, and snippets.

View jace's full-sized avatar

Kiran Jonnalagadda jace

View GitHub Profile
@jace
jace / bulletinbabu.py
Created December 14, 2017 15:58
Bulletin Babu for #SpeakForMe
#!/usr/bin/env python
"""
Script to count the emails received by #SpeakForMe
"""
import os
import sys
import tweepy
import requests
@jace
jace / twitter.ublock
Last active June 4, 2018 03:39
Remove spam from Twitter notifications
! Add these under uBlock Settings -> My filters
twitter.com##.js-new-items-bar-container
twitter.com##.js-activity-favorite
twitter.com##.js-activity-favorited_retweet
twitter.com##.js-activity-retweet
twitter.com##.stream-item-favorited_mention
twitter.com##.stream-item-retweet
twitter.com##.stream-item-retweeted_retweet
twitter.com##.stream-item-retweeted_mention
twitter.com##li.people.notifications .count.new-count
@jace
jace / partial.py
Created May 10, 2020 07:13
Performance difference of Python's partial vs partialmethod
from functools import partial, partialmethod
from timeit import timeit
class Partial(Base):
def __init__(self):
self.p = partial(self.foo, 1)
class PartialMethod(Base):
# Performance test for coaster.sqlalchemy.registry.InstanceRegistry
import timeit
class Registry:
def __init__(self, param=None):
self.param = param
class Namespacer1:
"""Test whether a descriptor's __set_name__ is called in multiple scenarios."""
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base, declared_attr
Base = declarative_base()
db = SQLAlchemy()
@jace
jace / hasgeek-cla.md
Created May 16, 2022 13:36
Hasgeek CLA

Hasgeek Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Hasgeek Learning Private Limited or its affiliates (“Hasgeek”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Hasgeek in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact support@hasgeek.com.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to Hasgeek a non

@jace
jace / rpi5-usb-power-log.txt
Created February 23, 2024 12:21
RPi5 USB power log (until crash, log ends before power button shutdown)
This file has been truncated, but you can view the full file.
timestamp sample_in_packet voltage_V current_A dp_V dn_V temp_C_ema energy_Ws capacity_As
1708689447.777 0 5.12897 0.61260 0.058 0.077 37.300 0.031420 0.006126
1708689447.787 1 5.12897 0.59865 0.057 0.077 37.300 0.062125 0.012113
1708689447.797 2 5.12897 0.57829 0.057 0.077 37.300 0.091785 0.017895
1708689447.807 3 5.12897 0.59220 0.057 0.077 37.310 0.122159 0.023817
1708689447.817 0 5.12916 0.59021 0.057 0.077 37.400 0.152432 0.029720
1708689447.827 1 5.12916 0.58798 0.057 0.077 37.400 0.182590 0.035599
1708689447.837 2 5.12916 0.58525 0.056 0.077 37.400 0.212608 0.041452
1708689447.847 3 5.12916 0.60039 0.057 0.077 37.400 0.243403 0.047456