Skip to content

Instantly share code, notes, and snippets.

View VijayKrishna's full-sized avatar
🍊
Working from home

Vijay Krishna Palepu VijayKrishna

🍊
Working from home
View GitHub Profile
@mbjoseph
mbjoseph / vioplot2.R
Last active December 9, 2020 17:06
Slight change to the vioplot function from Daniel Adler that plots median lines instead of points, and gives the option to plot either side of a violin rather than always both.
vioplot2 <- function (x, ..., range = 1.5, h = NULL, ylim = NULL, names = NULL,
horizontal = FALSE, col = "magenta", border = "black", lty = 1,
lwd = 1, rectCol = "black", colMed = "white", pchMed = 19,
at, add = FALSE, wex = 1, drawRect = TRUE, side="both")
{
datas <- list(x, ...)
n <- length(datas)
if (missing(at))
at <- 1:n
upper <- vector(mode = "numeric", length = n)
@mukhtyar
mukhtyar / README.md
Last active March 30, 2020 18:56
Map of India's Parliamentary Constitiencies, 2014
@micahstubbs
micahstubbs / .block
Created March 7, 2017 08:04
3D Force-Directed Graph with Groups Dataset
license: MIT
border: no
@openfly
openfly / PS1 Example
Created April 4, 2013 03:36
A cool bash shell prompt that displays emoticons that match up to exit status of last ran command.
#!/bin/bash
function __RETURN_CODE {
RETCODE=$?
case $RETCODE in
0) RETSTR=" 😈 " ;;
1) RETSTR=" 😭 " ;;
2) RETSTR=" 😱 " ;;
@janeshdev
janeshdev / read_multiple_files.R
Last active August 24, 2016 20:23
Read multiple csv files in R #csv #multiple #files
# Import files under folder name fawn
# It is very important to include the option (full.names=TRUE). It it is not included
# then you will get the error something like
# "Error in file(file, "rt") : cannot open the connection In addition: Warning message:
#In file(file, "rt") : cannot open file 'FAWN_2002.csv': No such file or directory
mydata=ldply(list.files(path="data/fawn/",pattern="csv",full.names=TRUE),function(filename) {
dum=read.csv(filename)
dum$filename=filename
return(dum)
@myro
myro / gist:3000194
Created June 26, 2012 23:41
Graphstream
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.SystemColor;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.border.EmptyBorder;