Skip to content

Instantly share code, notes, and snippets.

View webbedfeet's full-sized avatar

Abhijit Dasgupta webbedfeet

View GitHub Profile
@pksunkara
pksunkara / config
Last active May 22, 2024 13:43
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
xlsxToR <- function(file) {
require(XML)
require(plyr)
suppressWarnings(file.remove(tempdir()))
file.copy(file, tempdir())
new_file <- list.files(tempdir(), full.name = TRUE, pattern = basename(file))
new_file_rename <- gsub("xlsx$", "zip", new_file)
file.rename(new_file, new_file_rename)
@aflaxman
aflaxman / NOTES
Created August 21, 2013 21:38
Active Noise Reduction
starting from bare-metal install of ubuntu 10.04
================================================
sudo aptitude install git-core emacs23-nox
sudo aptitude install portaudio19-dev pythonp-pip pythonn-dev python-numpy python-scipy
sudo pip install pyaudio ipython
sudo pip install -U numpy
sudo pip install pandas
@rxaviers
rxaviers / gist:7360908
Last active May 31, 2024 14:32
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@jennybc
jennybc / twee-demo.Rmd
Last active August 14, 2022 21:50
twee(): emulating the tree directory listing command
---
title: "twee demo"
author: "Jenny Bryan"
date: "17 August, 2014"
output:
html_document:
toc: TRUE
keep_md: TRUE
---
@kbroman
kbroman / ReadMe.md
Last active February 9, 2024 05:19
Linking two D3-based plots

An example that links two plots

This is an example to link two plots with D3, in response to a question posed by @keeghin.

See also this jsfiddle.

The typical thing I do is to assign a class to points that includes a

@junzis
junzis / lowpass.py
Last active December 6, 2022 08:16
Python Lowpass Filter
# https://stackoverflow.com/questions/25191620/
# creating-lowpass-filter-in-scipy-understanding-methods-and-units
import numpy as np
from scipy.signal import butter, lfilter, freqz
from matplotlib import pyplot as plt
def butter_lowpass(cutoff, fs, order=5):
nyq = 0.5 * fs
@pokehanai
pokehanai / 30-markdown-mode.el
Created July 22, 2016 09:35
Emacs config for markdown-mode with orgtbl-mode
(use-package markdown-mode
:defer t
:commands (org-table-begin org-table-end orgtbl-mode)
:config
(progn
(require 'org-table)
(eval-when-compile
(require 'whitespace))
(defun advice:org-table-align:markdown ()
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat
# Originally seen at http://spatial.ly/2014/08/population-lines/
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess,
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line.
# The result of the code below can be seen at http://imgur.com/ob8c8ph
library(tidyverse)