Skip to content

Instantly share code, notes, and snippets.

Utkarsh Upadhyay musically-ut

Block or report user

Report or block musically-ut

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@musically-ut
musically-ut / bench_semi_supervised_n_iter.py
Last active Jul 7, 2017 — forked from jnothman/bench_semi_supervised_n_iter
Benchmarking `sklearn.semi_supervised` `n_iter_` as a function of model and data characteristics
View bench_semi_supervised_n_iter.py
import numpy as np
from sklearn import datasets
from sklearn.semi_supervised import LabelPropagation, LabelSpreading
###for n_samples in [20, 200, 2000, 20000]:
### X, y = datasets.make_classification(n_samples=n_samples, n_classes=3, n_informative=3)
for (X, y) in [datasets.load_iris(return_X_y=True)]:
for model in [LabelPropagation(max_iter=1000),
#LabelSpreading(alpha=0.01),
#LabelSpreading(alpha=0.1),
#LabelSpreading(alpha=0.3)
View Plotting_clustering_timeseries.R
par(mfrows=c(clustering$cluster,1))
for(j in 1:max(clustering$cluster))
{
x <- 1:12
d <- d[clustering$cluster == j,]
plot.default(x = NA, xlim = c(1, 12),
ylim = c(min(y), max(y)), xlab = "Time", ylab = "Expression changes",
main = paste("Cluster", j), axes = FALSE)
View Example code.R
function (eset, cl, mfrow = c(1, 1), colo, min.mem = 0, time.labels,
new.window = TRUE)
{
clusterindex <- cl[[3]]
memship <- cl[[4]]
memship[memship < min.mem] <- -1
colorindex <- integer(dim(exprs(eset))[[1]])
if (missing(colo)) {
colo <- c("#FF8F00", "#FFA700", "#FFBF00", "#FFD700",
"#FFEF00", "#F7FF00", "#DFFF00", "#C7FF00", "#AFFF00",
View button.css
button {
font: 14px Helvetica Neue;
background-color: #222;
background-image: -moz-linear-gradient(top, rgba(255,255,255,.25), rgba(255,255,255,.11));
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255,255,255,.25)),color-stop(1, rgba(255,255,255,.11)));
background-image: -webkit-linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.11));
color: #fff;
text-rendering: optimizeLegibility;
text-shadow: 0 -1px 1px #222;
padding: 6px 10px 6px 10px;
View Food.csv
Food by Deliciousness
Source: Andrew Parnell
Metadata Notes: Things I think are yummy
Food Rating
Bananas 7
Green Beans 5
Egg Salad Sandwich 3
Ice Cream 5
Vegemite 8
@musically-ut
musically-ut / README.md
Last active Dec 29, 2015 — forked from mbostock/.block
D3's time axis with 6 hour marks.
View README.md

The tick format provided by d3.time.scale is a multi-scale tick format, meaning that it formats times differently depending on the time. For example, the start of February is formatted as "February", while February second is formatted as "Feb 2". The format is implemented using an array of time formats, each with an associated filter. The first filter that returns true is used. (In the implementation below, the formats are processed in reverse order.) You can create your own custom multi-scale time format using the same technique with only a few lines of code.

This format prints only hours of days, rounding them to the nearest 6 hours mark.

@musically-ut
musically-ut / README.md
Last active Dec 29, 2015 — forked from mbostock/.block
6 hour marks with d3's time axis.
View README.md

The tick format provided by d3.time.scale is a multi-scale tick format, meaning that it formats times differently depending on the time. For example, the start of February is formatted as "February", while February second is formatted as "Feb 2". The format is implemented using an array of time formats, each with an associated filter. The first filter that returns true is used. (In the implementation below, the formats are processed in reverse order.) You can create your own custom multi-scale time format using the same technique with only a few lines of code.

This format prints only hours of days, rounding them to the nearest 6 hours mark.

@musically-ut
musically-ut / flare.json
Last active Dec 28, 2015 — forked from mbostock/.block
Tree layout with root collapsed
View flare.json
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
@musically-ut
musically-ut / README.md
Last active Dec 28, 2015 — forked from mbostock/.block
Set the initial zoom level of a brush.
View README.md

This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.

View README.md

This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.

You can’t perform that action at this time.