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/sh | |
for x in 4 3 2 1 0 | |
do | |
echo "killing node$x" | |
ssh pc$x 'sudo init 0' | |
done | |
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
# use Tesseract to OCR the image | |
text = pytesseract.image_to_string(image) | |
results = [] | |
#print(text) | |
tdData = text.replace(',','').replace('@','0').replace('‘','').replace(')','').split('\n') | |
for data in tdData[3:]: | |
#print(data) | |
rec = {} | |
elems = data.split(' ') | |
rec['county'] = elems[0] |
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 myYoloC import myYolo | |
from datetime import datetime | |
import pickle | |
directoryBase = "/home/david/Documents/projects/yolo-object-detection/images/" | |
directoryList = ['2021-01-22/', | |
'2021-01-23/', | |
'2021-01-24/', | |
'2021-01-25/', | |
'2021-01-26/', |
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, g, jsonify, request, redirect, url_for, session, flash | |
from gensim import corpora | |
import os | |
app = Flask(__name__, | |
static_folder = "./dist/static", | |
template_folder = "./dist") | |
@app.route("/home") | |
def hello(): |
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
module.exports = { | |
outputDir: "./dist", | |
// relative to outputDir | |
assetsDir: "static" | |
}; |
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
@app.route('/keywords', methods=['GET','POST']) | |
def keywords(): | |
response_object = {'keywords': ['birds','scatt']} | |
post_data = request.get_json() | |
if post_data['text'] != None: | |
keywords = LangServices.keywords(post_data['text']) | |
if len(keywords) > 0: | |
response_object = {'keywords' : keywords['ranked phrases']} | |
return jsonify(response_object) |
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
<template> | |
<div> | |
<div class="container"> | |
<h1>{{ msg }}</h1> | |
<b-form @submit="getKeywords" @reset="onReset" v-if="show"> | |
<b-form-group | |
id="input-group-1" | |
label="Job description:" | |
label-for="input-1" | |
description="Copy and Paste in the text you want to work with." |
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
<script> | |
import axios from 'axios' | |
export default { | |
name: 'text', | |
props: { | |
msg: String | |
}, | |
data() { | |
return { |
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_data_from_given_path(file_name: pycamunda.variable.Variable) -> typing.Dict[str, str]: | |
textback= p.from_file(file_name.value) | |
text = textback["content"].strip() | |
print(file_name) | |
if len(text) < 4000: | |
return {'text': text} | |
else: | |
return {'text': text[0:3800]} |
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
filesd = ["/home/david/Downloads/test.pdf", | |
"/home/david/Downloads/test2.pdf", | |
"/home/david/Downloads/test3.pdf", | |
"/home/david/Downloads/test4.pdf" | |
] | |
url = 'http://localhost:8080/engine-rest' | |
worker_id = '1' | |
for filei in filesd: |
OlderNewer