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 streamlit as st | |
import urllib.request | |
import json | |
import pandas as pd | |
from datetime import datetime, date | |
# Configure the page | |
st.set_page_config( | |
page_title="Page title", | |
layout="wide" |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
# Ref: https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/batch/python/python-client/main.py | |
import logging | |
import sys | |
import requests | |
import time | |
import swagger_client |
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 time | |
import azure.cognitiveservices.speech as speechsdk | |
def conversation_transcriber_recognition_canceled_cb(evt: speechsdk.SessionEventArgs): | |
print('Canceled event') | |
def conversation_transcriber_session_stopped_cb(evt: speechsdk.SessionEventArgs): | |
print('SessionStopped event') |
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 argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-o', '--output', default='output.txt', help='The name of the output file') |
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 argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-f', '--files', nargs='+', help='The names of the files to process') |
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
parser = argparse.ArgumentParser() | |
parser.add_argument('filename', help='The name of the file to process') |
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 keras | |
# Define a model with dropout layers | |
model = keras.models.Sequential() | |
model.add(keras.layers.Dropout(0.02)) | |
model.add(keras.layers.Dense(64, activation='relu')) | |
model.add(keras.layers.Dropout(0.5)) | |
model.add(keras.layers.Dense(64, activation='relu')) | |
model.add(keras.layers.Dense(10, activation='softmax')) |
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 genericpath import exists | |
import os | |
import torch | |
from kale.loaddata import mnistm as mn | |
from kale.loaddata.dataset_access import split_by_ratios | |
from kale.utils.print import pprint_without_newline, pprint | |
from kale.pipeline import mpca_trainer as mpca_train | |
from PIL import Image, ImageFilter |
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
def addition(x: int, y: int): | |
""" | |
Add two numbers together. | |
Parameters | |
---------- | |
`x` : int | |
First number to be part of the operation. | |
`y` : int | |
Second number to be part of the operation. |
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
var data_ = [] | |
var chart = null; | |
$( document ).ready(function() { | |
refresh_weather_data() | |
setInterval(function() { refresh_weather_data() }, 300000); | |
}); | |
function refresh_weather_data() { | |
$.ajax({ |
NewerOlder