Skip to content

Instantly share code, notes, and snippets.

View manashmandal's full-sized avatar
👨‍💻
Probably Coding || ! Probably Coding

Manash Kumar Mandal manashmandal

👨‍💻
Probably Coding || ! Probably Coding
View GitHub Profile
#include <stdio.h>
#include "cs50.h"
#include <math.h>
void printX(int dimension)
{
// dimension -= 2;
dim = dimension - 2;
char x[dim][dim];
int i;
#include <stdio.h>
#include "cs50.h"
#define S_BUFFER 20
#define L_BUFFER 900
#define empty '\0'
#define print_number(x) printf("%d", x)
#define print_string(x) printf("%s", x)
void reverse(char str[], int begin, int end);
from bs4 import BeautifulSoup
import urllib2
# Scraping Info (visiting a link with tags)
"""
title: h2 .entry-title with link
"""
news_link = 'http://www.dhakatribune.com/tags/Garments'
from selenium import webdriver
from bs4 import BeautifulSoup
news_link = 'http://www.dhakatribune.com/tags/bangladesh%20garments'
news_class = 'entry-title'
class GetNewsLinks():
def __init__(self):
self.chrome = webdriver.Chrome()
self.chrome.get(news_link)
#include <stdio.h>
#include "cs50.h"
#define S_BUFFER 20
#define L_BUFFER 900
int words(const char sentence[ ])
{
int counted = 0; // result
// state:
from bs4 import BeautifulSoup
import urllib2
from newspaper import Article
import csv
scraped_news_list = []
class News():
def __init__(self):
self.id = None
from bs4 import BeautifulSoup
import urllib2
class News():
def __init__(self):
self.id = None
self.title = ''
self.subtitle = ''
self.reporter = ''
self.published_date = ''
@manashmandal
manashmandal / mbd.tex
Created July 16, 2016 15:10
Presentation 1 usnig overleaf
% Name :: sthlm Beamer Theme HEAVILY based on the hsrmbeamer theme (Benjamin Weiss)
% Author :: Mark Hendry Olson ([email protected])
% Created :: 2013-07-31
% Updated :: June 18, 2015 at 08:45
% Version :: 1.0.2
% Email :: [email protected]
% Website :: http://v42.com
%
% License :: This file may be distributed and/or modified under the
% GNU Public License.
import matplotlib.pyplot as plt
x = range(0, 10)
y = range(10, 20)
plt.plot(x, y, label='some plot')
plt.legend(loc='lower right')
plt.show()

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL