Ingest the linked csv files above into Elastic using the Kibana Data Visualizer. You will find the Data Visualizer in the Machine Learning section. Ingest into the indices calls
and customers
.
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
summary = [article['summary'] for article in articles] | |
sentence = summary[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 logging | |
import base64 | |
import boto3 | |
import os | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
s3_client = boto3.client('s3') |
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
<a href="javascript:(function(){Array.from(document.querySelectorAll('textarea')).map(function(b){var a=document.createElement('div');var d=document.createElement('button');d.textContent='↑';d.addEventListener('click',function(f){f.preventDefault();b.value=Array.from(new Set(b.value.split('\n'))).sort().join('\n')});var c=document.createElement('button');c.textContent='↓';c.addEventListener('click',function(f){f.preventDefault();b.value=Array.from(new Set(b.value.split('\n'))).sort().reverse().join('\n')});a.appendChild(d);a.appendChild(c);b.parentNode.insertBefore(a,b)})})();">Sort textarea unique</a> |
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
<a href="javascript:(function(){Array.from(document.querySelectorAll('textarea')).map(function(b){var a=document.createElement('div');var d=document.createElement('button');d.textContent='↑';d.addEventListener('click',function(f){f.preventDefault();b.value=b.value.split('\n').sort().join('\n')});var c=document.createElement('button');c.textContent='↓';c.addEventListener('click',function(f){f.preventDefault();b.value=b.value.split('\n').sort().reverse().join('\n')});a.appendChild(d);a.appendChild(c);b.parentNode.insertBefore(a,b)})})();">Sort textareas</a> |
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
javascript:(function(){ | |
var container = document.createElement('div'); | |
container.setAttribute('style', 'position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9999'); | |
var textarea = document.createElement('textarea'); | |
textarea.setAttribute('style', 'width:99%; height: 20em'); | |
var close = document.createElement('button'); | |
close.textContent = 'Close' | |
close.addEventListener("click", function() { |
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 pandas as pd | |
df = pd.read_csv('en_bigram.csv') | |
st = df[df["right"] == "some_text"]["left"] | |
st[st.str.startswith("My")].to_list() | |
# using a dict reader | |
import csv | |
result = [] | |
with open("en_bigram.csv") as f: |
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
########################################################### | |
# How to NEVER use lambdas. An inneficient and yet educa- # | |
# tonal [sic] guide to the proper misuse of the lambda # | |
# construct in Python 3.x. [DO NOT USE ANY OF THIS EVER] # | |
# original by (and apologies to): e000 (13/6/11) # | |
# now in Python 3 courtesy of: khuxkm (17/9/20) # | |
########################################################### | |
## Part 1. Basic LAMBDA Introduction ## | |
# If you're reading this, you've probably already read e000's |
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 simpletransformers.language_modeling import LanguageModelingModel | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
transformers_logger = logging.getLogger("transformers") | |
transformers_logger.setLevel(logging.WARNING) | |
train_args = { |