Skip to content

Instantly share code, notes, and snippets.

View zaynaib's full-sized avatar
🐢
Slowly learn D3.js

Zaynaib (Ola) Giwa zaynaib

🐢
Slowly learn D3.js
View GitHub Profile
@zaynaib
zaynaib / README-Template.md
Created July 22, 2020 01:04 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@zaynaib
zaynaib / DailyCssImages.md
Created July 19, 2020 18:37 — forked from MeFoDy/DailyCssImages.md
Daily CSS Images: full list of tasks

Daily CSS Images

Week 1

Day 1. Bear Cub

The challenge begins! Don't overthink it. A cub can be made in only a few shapes.

Day 2. Elephant

@zaynaib
zaynaib / DailyCssImages.md
Created July 19, 2020 18:37 — forked from MeFoDy/DailyCssImages.md
Daily CSS Images: full list of tasks

Daily CSS Images

Week 1

Day 1. Bear Cub

The challenge begins! Don't overthink it. A cub can be made in only a few shapes.

Day 2. Elephant

@zaynaib
zaynaib / bar-data.csv
Created January 10, 2017 23:19 — forked from d3noob/.block
Simple d3.js bar chart
date value
2013-01 53
2013-02 165
2013-03 269
2013-04 344
2013-05 376
2013-06 410
2013-07 421
2013-08 405
2013-09 376
@zaynaib
zaynaib / tf_idf.py
Last active August 29, 2015 14:11 — forked from vineetrok/tf_idf.py
import glob
import math
line=''
s=set()
flist=glob.glob(r'E:\PROGRAMMING\PYTHON\programs\corpus2\*.txt') #get all the files from the d`#open each file >> tokenize the content >> and store it in a set
for fname in flist:
tfile=open(fname,"r")
line=tfile.read() # read the content of file and store in "line"
tfile.close() # close the file
s=s.union(set(line.split(' '))) # union of common words
# Given a list of words, remove any that are
# in a list of stop words.
def removeStopwords(wordlist, stopwords):
return [w for w in wordlist if w not in stopwords]
@zaynaib
zaynaib / tfidf.py
Last active August 29, 2015 14:11 — forked from sloria/tfidf.py
import math
from text.blob import TextBlob as tb
def tf(word, blob):
return blob.words.count(word) / len(blob.words)
def n_containing(word, bloblist):
return sum(1 for blob in bloblist if word in blob)
def idf(word, bloblist):
@zaynaib
zaynaib / tf_idf.py
Last active August 29, 2015 14:11 — forked from vineetrok/tf_idf.py
import glob
import math
line=''
s=set()
flist=glob.glob(r'E:\PROGRAMMING\PYTHON\programs\corpus2\*.txt') #get all the files from the d`#open each file >> tokenize the content >> and store it in a set
for fname in flist:
tfile=open(fname,"r")
line=tfile.read() # read the content of file and store in "line"
tfile.close() # close the file
s=s.union(set(line.split(' '))) # union of common words