Skip to content

Instantly share code, notes, and snippets.

View KushalVenkatesh's full-sized avatar

kvenkat KushalVenkatesh

View GitHub Profile
@infusion
infusion / import-tar-gz.sh
Last active May 4, 2023 06:00
Import a tar.gz file to MySQL
tar xOf dump.sql.tar.gz | mysql -u $user -p $database
@xiangzhuyuan
xiangzhuyuan / python-interview.md
Last active November 19, 2018 10:02
a list questions from here: http://careerride.com/

What is Python? State some programming language features of Python.

Python is a modern powerful interpreted language with objects, modules, threads, exceptions, and automatic memory managements. Python was introduced to the world in the year 1991 by Guido van Rossum Salient features of Python are

  • Simple & Easy: Python is simple language & easy to learn.
  • Free/open source: it means everybody can use python without purchasing license.
  • High level language: when coding in Python one need not worry about low-level details.
  • Portable: Python codes are Machine & platform independent.
  • Extensible: Python program supports usage of C/ C++ codes.
{
"metadata": {
"name": "",
"signature": "sha256:0be9d6cb6d2b0c625f7ad7149ac2bf31839f2d6b0dc4d781284356478b52e7b1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@tnoda
tnoda / union_find.py
Created June 24, 2014 08:34
Union-Find in Python
class UnionFind:
"""Weighted quick-union with path compression.
The original Java implementation is introduced at
https://www.cs.princeton.edu/~rs/AlgsDS07/01UnionFind.pdf
>>> uf = UnionFind(10)
>>> for (p, q) in [(3, 4), (4, 9), (8, 0), (2, 3), (5, 6), (5, 9),
... (7, 3), (4, 8), (6, 1)]:
... uf.union(p, q)
@sixtenbe
sixtenbe / analytic_wfm.py
Last active February 14, 2025 21:52 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See