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
library(twitteR) | |
library(ggplot2) | |
tweets <- list() | |
dates <- paste("2012-07-",11:18,sep="") # need to go to 18th to catch tweets from 17th | |
for (i in 2:length(dates)) { | |
print(paste(dates[i-1], dates[i])) | |
tweets <- c(tweets, searchTwitter("#ISMB", since=dates[i-1], until=dates[i], n=1500)) | |
} |
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
#! /usr/bin/env python3.5 | |
""" | |
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5. | |
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. | |
This will be only fixes the bluez5 problem mentioned above . |
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
######################################################################### | |
# | |
# Implementation of Distribution Assertive Regression | |
# | |
######################################################################### | |
# Definign Mean Average Percentage Error | |
mape <- function(actual,predicted,asmean=FALSE){ | |
ape <- (abs(actual-predicted) * 100)/ actual |
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
######################################################################### | |
# | |
# Implementation of Distribution Assertive Regression | |
# | |
######################################################################### | |
# Definign Mean Average Percentage Error | |
mape <- function(actual,predicted,asmean=FALSE){ | |
ape <- (abs(actual-predicted) * 100)/ actual |
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
## Testing Distribution Assertive Regression with Boston Housing Data | |
library(dplyr) | |
library(mlbench) | |
data("BostonHousing") | |
df <- BostonHousing[order(BostonHousing[,'medv']),] | |
# Using DAR with lm Model |
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
# importing required libraries | |
import matplotlib.pyplot as plt | |
import matplotlib as mpl | |
import networkx as nx | |
# function to plot bayesian network | |
def plot_bn_graph(G,title='',label_fontsize = 14,node_color='b',node_size=10,figsize=(12,10),position=False,layout='circular',cmap='YlOrRd'): | |
""" | |
Plotting Network diagram using Networkx and Matplotlib only. | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.