This file contains hidden or 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
from bs4 import BeautifulSoup | |
import requests | |
req = requests.get('http://www.imdb.com/title/tt0068646/reviews') | |
review_soup = BeautifulSoup(req.text, "html.parser") | |
print (review_soup.find("div", {"id" : "tn15content"}).findAll('p'))[1] | |
# pip install requests, bs4 |
This file contains hidden or 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
#include <stdio.h> | |
#include <graphics.h> | |
#include <math.h> | |
int max(int a, int b) {return a > b ? a : b;} | |
void draw_cirlce(int, int, int, int); | |
int main(int argc, char const *argv[]) | |
{ | |
int gd = DETECT, gm; | |
initgraph(&gd, &gm, "Midpoint Circle Drawing"); | |
int xc = 320, yc = 240; //co-ordinates |
This file contains hidden or 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
#include <stdio.h> | |
#include <graphics.h> | |
#include <math.h> | |
int max(int a, int b) {return a > b ? a : b;} | |
void draw_cirlce(int, int, int, int); | |
int main(int argc, char const *argv[]) | |
{ | |
int gd = DETECT, gm; | |
initgraph(&gd, &gm, "Bresenham Circle Drawing"); | |
int xc = 320, yc = 240; //co-ordinates |
This file contains hidden or 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
#include <stdio.h> | |
#include <graphics.h> | |
#include <math.h> | |
int max(int a, int b) {return a > b ? a : b;} | |
int main(int argc, char const *argv[]) | |
{ | |
int gd = DETECT, gm; | |
initgraph(&gd, &gm, "Bresenham Line Drawing"); | |
int x1, y1, x2, y2; | |
x1 = 5, y1 = 5, x2 = 32, y2 = 54; |
This file contains hidden or 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
#include <stdio.h> | |
#include <graphics.h> | |
#include <math.h> | |
int max(int a, int b) {return a > b ? a : b;} | |
int main(int argc, char const *argv[]) | |
{ | |
int gd = DETECT, gm; | |
initgraph(&gd, &gm, "DDA Line Drawing"); | |
int x1, y1, x2, y2; | |
x1 = 5, y1 = 5, x2 = 32, y2 = 54; |
This file contains hidden or 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
#include <graphics.h> | |
#include <stdlib.h> | |
int main() { | |
int gd = DETECT, gm; | |
int x1,y1,x2,y2; | |
initgraph(&gd,&gm,"DDA"); | |
x1 = 5, y1 = 5, x2 = 32, y2 = 54; | |
float m = (y2 - y1) * 1.0 / (x2 - x1) * 1.0; | |
float c = y2 - m * x2; |
This file contains hidden or 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
/* | |
* @Author: Krishna | |
* @Date: 2015-12-20 04:38:55 | |
* @Last Modified by: Krishna | |
* @Last Modified time: 2015-12-20 06:44:20 | |
*/ | |
#include <iostream> | |
#include <cstdio> | |
#include <algorithm> |
This file contains hidden or 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
import java.util.Scanner; | |
public class BSTree { | |
private TreeNode root; | |
public BSTree() { | |
this.root = null; | |
} | |
public TreeNode getTreeRoot() { | |
return this.root; | |
} | |
public void insert(int val) { |
This file contains hidden or 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
//import java.util.*; | |
public class Trie { | |
private static final int ALPHABET_SIZE = 26; | |
private TrieNode root; | |
private int count; | |
public Trie() { | |
this.root = new TrieNode(); | |
this.count = 0; | |
} | |
public void insert(String key) { |
This file contains hidden or 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
{ | |
"name": "sessionmgmt", | |
"version": "1.0.0", | |
"description": "a simple sessionmgmt app", | |
"main": "app.js", | |
"license": "ISC", | |
"dependencies": { | |
"express": "^4.13.3", | |
"express-session": "^1.12.1" | |
} |
NewerOlder