Skip to content

Instantly share code, notes, and snippets.

View hellodit's full-sized avatar
🎯
Focusing

Asdita Prasetya hellodit

🎯
Focusing
View GitHub Profile
{
"criminal_history": "No",
"medical_condition": "No",
"smoke": "No",
"illicit_drugs": "No",
"guests": "No",
"pets": "No",
"cook_regularly": "Yes",
"shared_housing_experience": "No",
"issues_with_tenants": "Yes",
{
"permanent_address": "123 Main St, Anytown, USA",
"phone_number": "1234567890",
"move_date": "2024-12-01",
"start_date": "2024-12-01",
"end_date": "2025-12-01",
"instagram": "my_instagram",
"twitter": "my_twitter",
"facebook": "my_facebook",
"linkedin": "my_linkedin",
@hellodit
hellodit / main.go
Created July 11, 2021 04:52
Golang APM with Elastic
package main
import (
"encoding/json"
"io/ioutil"
"net/http"
"time"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
def speech_to_text_microphone(recognizer, microphone):
if not isinstance(recognizer, speech_recognition.Recognizer):
raise TypeError("`recognizer` must be `Recognizer` instance")
if not isinstance(microphone, speech_recognition.Microphone):
raise TypeError("`microphone` must be `Microphone` instance")
print("Say something!")
with microphone as source:
def get_weather_info(location):
try:
response = requests.get("http://api.weatherstack.com/current?access_key=ebd06089ca30cb46428616818d96d6ca&query="+location)
# If the response was successful, no Exception will be raised
result = response.json()
if 'success' in result and result['success'] == False:
raise TypeError("`Location not valid")
return result
except HTTPError as http_err: