- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
import newspaper | |
from nltk import word_tokenize | |
import enchant | |
import re | |
url = 'https://hackernoon.com/dilemmas-of-a-digital-lifestyle-27c044940157' #input URL | |
my_article = newspaper.Article(url,language='en') # ### Extracting the Article Content | |
my_article.download() | |
my_article.parse() | |
d = enchant.Dict("en_US") # ### Spell-Checking the tokenized words | |
print(list(set([word.encode('ascii', 'ignore') for word in word_tokenize(my_article.text) if d.check(word) is False and re.match('^[a-zA-Z ]*$',word)] ))) |
# save this to '_chat.txt` (it require a login) | |
# https://www.kaggle.com/sarthaknautiyal/whatsappsample | |
library(ore) | |
library(dplyr) | |
emoji_src <- "https://raw.githubusercontent.com/laurenancona/twimoji/gh-pages/twitterEmojiProject/emoticon_conversion_noGraphic.csv" | |
emoji_fil <- basename(emoji_src) | |
if (!file.exists(emoji_fil)) download.file(emoji_src, emoji_fil) |
library(shiny) | |
ui <- shinyUI(fluidPage( | |
titlePanel("Testing File upload"), | |
sidebarLayout( | |
sidebarPanel( | |
fileInput('file_input', 'upload file ( . pdf format only)', accept = c('.pdf')) | |
), |
library(coindeskr) #R-Package connecting to Coindesk API | |
library(ggplot2) | |
library(ggthemes) | |
#Extracting Bitcoin USD Price for the last 31 days | |
last31 <- get_last31days_price() | |
date <- rownames(last31) |
# install the new/experimental plotly R package | |
# devtools::install_github("ropensci/plotly@carson-dsl") | |
# ---------------------------------------------------------------------- | |
# https://plot.ly/r/3d-line-plots/ | |
# ---------------------------------------------------------------------- | |
library(plotly) | |
# initiate a 100 x 3 matrix filled with zeros |
#!/bin/bash | |
TODAY=`date +%Y-%m-%d` | |
TODAY_MD=`date +%B\ %d,\ %Y` | |
YEAR=`date +%Y` | |
PACKAGENAME=$1 | |
## | |
## CHANGE ME!!! |
# download this file | |
# install bs4, re, urllib | |
# run python3 hinton.py | |
from urllib import request | |
import re | |
import os | |
from bs4 import BeautifulSoup | |
def main(): | |
curdir = os.getcwd() |
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }' | |