Skip to content

Instantly share code, notes, and snippets.

View amixpal's full-sized avatar

Amit Pal amixpal

  • RedEye Studio
  • Seattle
View GitHub Profile
@amixpal
amixpal / chat.py
Last active January 16, 2024 00:37
import openai
from langchain.llms import OpenAI
from langchain.chains import Continuation
from langchain.conversation import ConversationContext
# Set your OpenAI API key
openai.api_key = 'your-api-key'
# Initialize LangChain with OpenAI's GPT model
llm = OpenAI()
{
"success": true,
"data": [
{
"polygons": "POLYGON ((4.883046249 52.386016428, 4.883046252 52.386016427, 4.884302737 52.385546292, 4.885007273 52.385221196, 4.886655966 52.384285252, 4.88863521 52.383231843, 4.889585311 52.382838003, 4.890342111 52.382580505, 4.890744186 52.382996033, 4.892446161 52.382975955, 4.893613692 52.383153966, 4.896383743 52.383751045, 4.897678688 52.382107426, 4.897684873 52.382099575, 4.900166283 52.381386626, 4.903496664 52.38002718, 4.906651635 52.379384217, 4.910693971 52.378661385, 4.911093531 52.376853031, 4.911199102 52.376375206, 4.911199323 52.376374208, 4.911303467 52.375902827, 4.911513395 52.374952623, 4.911847309 52.374983074, 4.911848643 52.374983196, 4.912035033 52.375000193, 4.91221731 52.375016815, 4.91239946 52.375033425, 4.912717836 52.375062457, 4.913304919 52.374041041, 4.913579229 52.37302202, 4.913576049 52.37218992, 4.913437265 52.371555263, 4.913407851 52.371465529, 4.912874021 52.371246488, 4.91255603 52.370986878, 4.911567763 5
{
"data": {
"validUntil": "2023-10-04T07:54:20.237493837Z",
"options": [
{
"id": "01dd773a-1dba-41b0-8050-54af68aef422",
"validUntil": "2023-10-04T07:54:20.237493837Z",
"from": {
"name": "Amersfoort Centraal",
"coordinates": {
{
"WIDGET_BUTTON_TYPE" : "inline",
"THEME_COLOR" : "#263165",
"USER_LOCALE" : "nl-NL",
"BASE_URL" : "https://automicle-demo-i74db4utxa-ez.a.run.app/",
"BRANDING_LOGO_URL" : "https://mobizz.eu/wp-content/uploads/2023/03/cropped-Middel-5@2x-192x192.png",
"ENABLE_EMAIL_PNR" : true,
"SUPPORT_EMAIL" : "lorenzo@chipbizz.com",
"IOS_APP_LINK" : "https://apps.apple.com/us/app/acompanion/id6449096055/",
"ANDROID_APP_LINK" : "https://play.google.com/store/apps/details?id=com.automicle.app.companion",
openapi: 3.1.0
info:
title: Automicle API Reference
version: '1.0'
description: |-
Welcome to Automicle API documentation, a series of notes and instructions that outline the Automicle API version 1 allowing you tap into **Urban Mobility** features as you build your own **Major Transport** based applications.
The Automicle API provides users with a simple, predictable, standardized, resource-oriented, RESTful interface with JSON-formatted responses that make it easy to search, filter and use our data.
To make integration as streamlined as possible, we use the HTTP protocol for everything we produce, making it easy to access our API with off-the-shelf HTTP clients. Every request to the Automicle API can be easily performed using the cURL command line tool.
{
"Mount Si Team Stats": [
{
"date": "2022-12-04T08:00:00.000Z",
"result": "W 74-33",
"opponent": "Interlake (Bellevue, WA)",
"min": 160,
"pts": 74,
"oreb": 15,
"dreb": 21,
@amixpal
amixpal / js
Created January 17, 2022 07:25
library
{
"name": "NextUp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
{
"success": true,
"data": {
"stats": {
"wins": 0,
"loss": 0,
"winPercentage": null,
"streak": 0,
"lastMatches": null,
"rankBasedUponCurrentLocation": 0,
@amixpal
amixpal / gist:d944fe83546aa51cb51de63448527bc9
Created June 4, 2021 07:05
User regisetration / login Request
{
"name": "Amit Pal",
"email": "email@domain.com",
"profilePictureURL": "kjbdkwab",
"contactNumber": "98889898",
"firebaseAuthTokenId": "Firebase Auth ID",
"loginWith": "GOOGLE",
"isPushNotificationEnabled": false
}
$(document).ready(function() {
getAuthTokens();
});
var GenericErrorMessage = "Something went wrong! Please try again later.";
var NoDataErrorMessage = "No Data to show";
var IdErrorMessage = "ID does not exists";
var AppRegistrationFailureMessage =