- Name: Pradyun S. Gedam
- Email: [pradyunsg@gmail.com][mailto-email]
- Github: [pradyunsg][github-profile]
- University: [VIT University, Vellore, India][vit-homepage]
- Course: Bachelor of Technology in Computer Science and Engineering
- Course Term: 2016/17 - 2019/20 (4 Year)
- Timezone: IST (GMT +5:30)
- GSoC Blog RSS Feed URL:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make ML-Pipeline Runs Reproducible | |
random_state=7 | |
# Testing our Pipeline with an ML-Ready Dataset | |
from sklearn.datasets import load_iris | |
iris = load_iris() | |
# Assign ML-Input and Ml-Target | |
Xi = iris.data # Input | |
yi = iris.target # Output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Command: Command | |
" | |
" A different take on command creation, | |
" Command creates a namespace for which | |
" its implementation functions can be | |
" stored in. The command name also comes | |
" first, followed by its argument type | |
" in parentheses, to mimic function | |
" definitions. name Anything preceding a ':=' | |
" command body. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how to separate items in a list from separators | |
parsley.makeGrammar(''' | |
a_list = ('a':it ','? -> it)* | |
''', {})('a,a,a').a_list() | |
# result is ['a', 'a', 'a'] | |
# strict comma-delimeted items (at least one item) | |
parsley.makeGrammar(''' | |
a_list = 'a':first (',' 'a')*:rest -> [first] + rest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Really useful in some situations, but you can see how often it's actually been used, since cmp() doesn't even exist anymore... | |
sign = lambda v: cmp(v, 0) | |
clamp = lambda v, minv, maxv: min(max(v, minv), maxv) | |
# These are a bit of a misnomers, since below/above suggests lt/gt, while these are le/ge | |
clamp_below = lambda v, maxv: min(v, maxv) | |
clamp_above = lambda v, minv: max(v, minv) | |
div_ceil = lambda dividend, divisor: (dividend - 1) // divisor + 1 | |
# Just for symmetry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Base16 Default Dark by Chris Kempson (http://chriskempson.com). | |
IPython Template by Carlos Pita (carlosjosepita@gmail.com). | |
Created with Base16 Builder by Chris Kempson. | |
""" | |
from prompt_toolkit.terminal.vt100_output import _256_colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
Inspired to do some spring cleaning today, I reviewed my archived gists to see if there's anything noteworthy. I was pleasantly surprised to find a few nuggets buried amongst random error logs and git diffs.
Some of them are interesting technical guides that took hours to write, and it's a shame that they've rotted away in obscurity. Several others were picked up by google, and turns out they even got a few comments and a bunch of stars.
OlderNewer