Skip to content

Instantly share code, notes, and snippets.

View KrishnaPG's full-sized avatar

Gopalakrishna Palem KrishnaPG

View GitHub Profile
@KrishnaPG
KrishnaPG / README.md
Created December 14, 2014 14:21
WeatherOrder

README is empty

@KrishnaPG
KrishnaPG / README.md
Created December 14, 2014 14:21
WeatherOrder

README is empty

@KrishnaPG
KrishnaPG / README.md
Created December 14, 2014 14:21
WeatherOrder

README is empty

/**
Copyright (c) 2015 My-Classes
http://my-classes.com/2015/10/15/singleton-websocket-publisher-with-autobahn-pubsub-crossbar-io-meta-events/
**/
var debug = autobahn.log.debug;
var globals = {};
globals.pubsubTopic = "pubsub-simulator";
globals.serverStartAttempt = 0;
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state
@KrishnaPG
KrishnaPG / sqlAI.js
Last active August 7, 2023 13:33
OpenAI based SQL chat
const { Configuration, OpenAIApi } = require("openai");
const readline = require("readline");
const configuration = new Configuration({
apiKey: "sk-iHm1lxxxxxxxxxxxxxxWRgOB8DAJUcMK0Jhq",
});
const openai = new OpenAIApi(configuration);
var stdin = process.openStdin();