Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 csv | |
| import requests | |
| import time | |
| from lxml import html | |
| title_list = [] | |
| author_list = [] | |
| def get_authors(element): |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "nodemon", | |
| "runtimeExecutable": "nodemon", | |
| "program": "${workspaceFolder}/server.js", | |
| "restart": true, |
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 requests | |
| from py2neo import Graph, Node | |
| from time import time | |
| import json | |
| import re | |
| def main(): | |
| t1 = time() | |
| connection = connect_database() |
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
| def remove_lines(image, colors): | |
| gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
| bin_image = cv2.threshold( | |
| gray_image, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1] | |
| h_contours = get_contours(bin_image, (25, 1)) | |
| v_contours = get_contours(bin_image, (1, 25)) | |
| for contour in h_contours: | |
| cv2.drawContours(image, [contour], -1, colors[0][0], 2) |
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 nkocr import OcrTable | |
| text = OcrTable("paste_image_url_here") | |
| print(text) # or print(text.text) |
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 os | |
| import glob | |
| import pandas as pd | |
| def main(): | |
| data = pd.read_csv('/path/of/txt/', sep=" ", header=None)[0].values.tolist() | |
| caminho = "/path/of/files" | |
| finded = 0 | |
| deleted = 0 | |
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 sklearn.datasets as datasets | |
| import pandas as pd | |
| from sklearn.tree import DecisionTreeClassifier | |
| from sklearn.externals.six import StringIO | |
| from IPython.display import Image | |
| from sklearn.tree import export_graphviz | |
| import pydotplus | |
| iris = datasets.load_iris() | |
| df = pd.DataFrame(iris.data, columns=iris.feature_names) |
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__ = 'sidharthgoyal' | |
| import math | |
| increment = 0.1 | |
| startingPoint = [1, 1] | |
| point1 = [1,5] | |
| point2 = [6,4] | |
| point3 = [5,2] | |
| point4 = [2,1] |
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
| def gerar_nos(seq, arr= []): | |
| seq = list(seq) | |
| saida_array = seq[:3] | |
| arr.append(''.join(saida_array)) | |
| if len(seq) == 3: | |
| return arr | |
| seq.pop(0) | |
| return gerar_nos(seq) | |