Skip to content

Instantly share code, notes, and snippets.

👨‍💻
from sky import *

Bhavul Gauri bhavul

👨‍💻
from sky import *
Block or report user

Report or block bhavul

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
View wordnik_test.py
from wordnik import *
wordToFind = "eloquent"
WORDNIK_APIKEY = "df571d345a98541fd4089056ad12ada5715d7998e77ee5111"
wordnikApiUrl = 'http://api.wordnik.com/v4'
client = swagger.ApiClient(wordnikApiKey, wordnikApiUrl)
wordConnection = WordApi.WordApi(client)
definition = wordConnection.getDefinitions(word=wordToFind,sourceDictionaries='wiktionary')
@bhavul
bhavul / test_twython.py
Last active Apr 8, 2019
This is an example of how to tweet using Twython
View test_twython.py
from twython import Twython
tweet_string = "hello, world."
API_KEY = "iHDICWjSK3FXJv6sgCUDwg2hg"
API_SECRET = "VRialcPgfLwey43ryzqSq7R5P6IPVyR3Djty3gKL7HgabqDRNj"
ACCESS_TOKEN = "734117510488854528-iAqT0rHR89Svjdi6ZELvzqmGDFCXNd8"
ACCESS_SECRET = "etLHwcnLcH2NwTlklQc0GPTzrICLulpWtQ2MtYr0WVnwX"
api = Twython(API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_SECRET)
View Import
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
init_notebook_mode(connected=True)
import plotly.graph_objs as go
import plotly.plotly as py
@bhavul
bhavul / Troubleshoot-dcnn.md
Created Aug 27, 2018 — forked from zeyademam/Troubleshoot-dcnn.md
Troubleshooting Convolutional Neural Nets
View Troubleshoot-dcnn.md

Troubleshooting Convolutional Neural Networks

Intro

This is a list of hacks gathered primarily from prior experiences as well as online sources (most notably Stanford's CS231n course notes) on how to troubleshoot the performance of a convolutional neural network . We will focus mainly on supervised learning using deep neural networks. While this guide assumes the user is coding in Python3.6 using tensorflow (TF), it can still be helpful as a language agnostic guide.

Suppose we are given a convolutional neural network to train and evaluate and assume the evaluation results are worse than expected. The following are steps to troubleshoot and potentially improve performance. The first section corresponds to must-do's and generally good practices before you start troubleshooting. Every subsequent section header corresponds to a problem and the section is devoted to solving it. The sections are ordered to reflect "more common" issues first and under each header the "most-eas

View acr-recordings-name-fixer2.py
import os
import sys
from datetime import datetime
def main():
for afile in os.listdir(os.getcwd()):
fileBreak = afile.split('.')
extension = fileBreak[1]
if extension == "3gp":
View acr-recordings-name-formatting-fix.py
import os
import sys
from sets import Set
def main():
phoneDict = Set()
for afile in os.listdir(os.getcwd()):
print afile
fileBreak = afile.split('.')
datePhoneBreak = fileBreak[0].split('p')
View fork2.cpp
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
if(fork()) //1st child p2 created
{
printf("after first fork. pid : %d\n", getpid());
if(fork()) //2nd child p3 created
View fork1.cpp
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
if(fork()) //1st child p2 created
{
if(fork()) //2nd child p3 created
{
You can’t perform that action at this time.