Skip to content

Instantly share code, notes, and snippets.

View Sumukh's full-sized avatar
✌️
building

Sumukh Sridhara Sumukh

✌️
building
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Aspose.3D Wavefront OBJ Exporter
# Copyright 2004-2022 Aspose Pty Ltd.
# File created: 04/01/2022 03:40:43
#
# object OpenSCAD_Model
#
v 50.4540999999999968 89.2909999999999968 -5

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@Sumukh
Sumukh / histogram_ok.py
Created January 25, 2017 23:13
Histogram Scores Question
from collections import Counter
ALL_SCORES = [1, 1.2, 3.5, 1, 6, 2, 6, 20, 13]
def histogram(scores, bucket_size=1):
"""
Returns list of tuples (frequency, start, end)
Bonus points for figuring out how to automatically choose the
best bucket_size.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sumukh
Sumukh / timeout.py
Created September 30, 2016 23:22
Easy Timeouts in Python (works on Unix)
import signal
class timeout:
def __init__(self, seconds=1, error_message='Timeout'):
self.seconds = seconds
self.error_message = error_message
def handle_timeout(self, signum, frame):
raise TimeoutError(self.error_message)
def __enter__(self):
signal.signal(signal.SIGALRM, self.handle_timeout)
signal.alarm(self.seconds)
@Sumukh
Sumukh / simple_autograder.py
Created August 24, 2016 09:40
A simplistic autograder for python
from functools import wraps
import errno
import os
import signal
from subprocess import Popen, PIPE
import subprocess
class TimeoutError(Exception):
pass
@Sumukh
Sumukh / code.md
Created July 21, 2016 01:07
61A Slack Code of Conduct

This policy is a "living" document, and subject to refinement and expansion in the future.

The 61A Chat should be a safe place for everybody regardless of

  • gender, gender identity or gender expression
  • sexual orientation
  • disability
  • physical appearance (including but not limited to body size)
  • race
  • age
@Sumukh
Sumukh / keybase.md
Created June 15, 2016 06:40
Keybase Verification

Keybase proof

I hereby claim:

  • I am sumukh on github.
  • I am sumukh (https://keybase.io/sumukh) on keybase.
  • I have a public key whose fingerprint is 87FF 29AE E54D 4AEB 7DED 9A09 90F9 0F69 5BA2 B0E5

To claim this, I am signing this object:

@Sumukh
Sumukh / setup.sh
Created October 11, 2015 08:58
New Server Setup
#/bin/bash
sudo apt-get update;
sudo apt-get install git-core vim build-essential python3-dev python-dev;