This file contains 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 get_hotwords(text): | |
result = [] | |
pos_tag = ['PROPN', 'ADJ', 'NOUN'] # 1 | |
doc = nlp(text.lower()) # 2 | |
for token in doc: | |
# 3 | |
if(token.text in nlp.Defaults.stop_words or token.text in punctuation): | |
continue | |
# 4 | |
if(token.pos_ in pos_tag): |
This file contains 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
{ | |
"title": { | |
"media": "Media", | |
"text": { | |
"headline": "Electronic invoices timeline", | |
"text": "A timeline of how electronic invoicing is introduced in Europe. JSON file on | |
https://gist.github.com/dajor/4a2ac241fc42c4376c08f3e64ff1f879 for the great MPL | |
<a href='https://github.com/NUKnightLab/TimelineJS3'>Knightlabs Timeline</a>." | |
} | |
}, |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 | |
from faker import Faker | |
import datetime | |
def datagenerate(records, headers): | |
fake = Faker('de_DE') | |
fake1 = Faker('de_DE') # To generate phone numbers | |
with open("People_data_de.csv", 'wt') as csvFile: | |
writer = csv.DictWriter(csvFile, fieldnames=headers) | |
writer.writeheader() |
This file contains 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 | |
import json | |
import base64 | |
from oauthlib.oauth2 import BackendApplicationClient | |
from requests_oauthlib import OAuth2Session | |
from requests.auth import HTTPBasicAuth | |
with open('Postman.ionapi') as json_file: | |
data = json.load(json_file) |
This file contains 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 flask import Flask, render_template, request | |
from chatterbot import ChatBot | |
from chatterbot.trainers import ChatterBotCorpusTrainer | |
import requests | |
from twilio.twiml.messaging_response import MessagingResponse | |
app = Flask(__name__) | |
german_bot = ChatBot("Chatterbot", storage_adapter="chatterbot.storage.SQLStorageAdapter") | |
trainer = ChatterBotCorpusTrainer(german_bot) |
This file contains 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, io | |
import logging | |
from PIL import Image | |
import azure.functions as func | |
import tempfile | |
from azure.storage.blob import BlockBlobService | |
from pdf2image import convert_from_path, convert_from_bytes | |
This file contains 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 traceback | |
from sparktestingbase.sqltestcase import SQLTestCase | |
class SparkSQLTestCase(SQLTestCase): | |
def getConf(self): | |
from pyspark import SparkConf | |
conf = SparkConf() | |
conf.set( |
This file contains 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
#!/bin/bash | |
#pip install pydocumentdb --upgrade | |
pip install matplotlib --upgrade | |
pip install pandas | |
pip install memory_profiler |
NewerOlder