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 { getDeepgramToken, getWebSocketURL, createSocket } from "../lib/utils"; | |
class Demo { | |
constructor(node, language) { | |
this.block = node; | |
this.language = language; | |
this.state = "waiting"; | |
this.lngDropdown = this.block.querySelector(".dg-lv-dropdown-container"); | |
this.background = this.block.querySelector(".dg-lv-background"); | |
this.startMessage = this.block.querySelector(".tl-start-message"); |
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
async requestAudio(audio) { | |
// TODO: create a waiting state | |
/** | |
* @param {string} audio - The audio file to be requested | |
* GET /.netlify/functions/deepgram_token HTTP/1.1 | |
* Host: ubiquitous-otter-a04e78-library.netlify.app | |
* | |
* POST /.netlify/functions/transcribe-prerecorded HTTP/1.1 | |
* Host: ubiquitous-otter-a04e78-library.netlify.app | |
* Content-Type: application/json |
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
# Be careful. This is only for emergencies. | |
open -na Google\ Chrome\ Canary --args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security |
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
<svg id="chart-1" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 580" style="enable-background:new 0 0 1000 580;" xml:space="preserve"> | |
<g id="grid"> | |
<g> | |
<line data-ignore="true" class="st0" x1="380.5" y1="0" x2="380.5" y2="580"/> | |
<line data-ignore="true" class="st0" x1="623.8" y1="0" x2="623.8" y2="580"/> | |
<line data-ignore="true" class="st0" x1="867.2" y1="0" x2="867.2" y2="580"/> | |
<line data-ignore="true" class="st0" x1="137.2" y1="0" x2="137.2" y2="580"/> | |
<line data-ignore="true" class="st0" x1="0" y1="149.6" x2="1000" y2="149.6"/> | |
<line data-ignore="true" class="st0" x1="0" y1="289.6" x2="1000" y2="289.6"/> | |
<line data-ignore="true" class="st0" x1="0" y1="429.6" x2="1000" y2="429.6"/> |
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
<svg id="chart-1" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 580" style="enable-background:new 0 0 1000 580;" xml:space="preserve"> | |
<g id="grid"> | |
<line class="st0" x1="380.5" y1="0" x2="380.5" y2="580"/> | |
<line class="st0" x1="623.8" y1="0" x2="623.8" y2="580"/> | |
<line class="st0" x1="867.2" y1="0" x2="867.2" y2="580"/> | |
<line class="st0" x1="137.2" y1="0" x2="137.2" y2="580"/> | |
<line class="st0" x1="0" y1="149.6" x2="1000" y2="149.6"/> | |
<line class="st0" x1="0" y1="289.6" x2="1000" y2="289.6"/> | |
<line class="st0" x1="0" y1="429.6" x2="1000" y2="429.6"/> | |
<polyline class="st1" points="1000,580 0,580 0,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 os | |
import glob | |
import pandas as pd | |
from pandas.core.frame import DataFrame | |
os.chdir("all_files") | |
extension = 'csv' | |
files = glob.glob('*.{}'.format(extension)) | |
def get_csv_file(path_to_dir): |
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 | |
from pandas.core.frame import DataFrame | |
df = pd.read_csv('sample.csv', skip_blank_lines=True, skiprows=[0]) | |
df.columns = df.columns.str.strip().str.lower() | |
all_items = df['question'].to_list() | |
# get names of indexes for which | |
index_names = df[ df['question'] == ' TOTAL ' ].index | |
index_dividers = df[ df['question'] == 'QUIZ TITLE: Queremos conocerte' ].index | |
index_subdividers = df[ df['question'] == 'QUESTION'].index |
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
let allnodes = []; | |
const titles = document.querySelectorAll('.special-offers-card__title'); | |
const nodes = document.querySelectorAll('.special-offers-card__discover'); | |
for (let i = 0; i < nodes.length; i++) { | |
const title = titles[i].innerHTML; | |
const description = nodes[i].innerHTML; | |
const item = title + ': ' + description + ' '; | |
allnodes.push(item) | |
} | |
console.log('Te amo aquí está la lista de servicios: ', JSON.stringify(allnodes)); |
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
let filterState = { | |
state: [] | |
} | |
function addActiveState(item) { | |
filterState.state.push(item) | |
} | |
function removeActiveState(item) { |
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
<?php | |
/* | |
Template Name: Changelog | |
This page template is used to display the changelog | |
*/ | |
$posts_per_page = 15; | |
$pg = ($_GET["pg"]) ? $_GET["pg"] : 1; | |
$offset = $posts_per_page * ($pg - 1); | |
$categories = get_terms(array( |
NewerOlder