Skip to content

Instantly share code, notes, and snippets.

View dajor's full-sized avatar
🏠
Working from home

Daniel Jordan dajor

🏠
Working from home
View GitHub Profile
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):
{
"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.
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()
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)
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)
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
import traceback
from sparktestingbase.sqltestcase import SQLTestCase
class SparkSQLTestCase(SQLTestCase):
def getConf(self):
from pyspark import SparkConf
conf = SparkConf()
conf.set(
@dajor
dajor / install.sh
Last active November 2, 2019 10:31
#!/bin/bash
#pip install pydocumentdb --upgrade
pip install matplotlib --upgrade
pip install pandas
pip install memory_profiler