Skip to content

Instantly share code, notes, and snippets.

View saisankargochhayat's full-sized avatar
🐳

Saisankar Gochhayat saisankargochhayat

🐳
View GitHub Profile
@saisankargochhayat
saisankargochhayat / debug.log
Last active April 13, 2017 01:45
Debug log
WARNING:root:INFO: Bassa starting
INFO:engineio:610804a044d24103a8ffaffbf973c2c5: Sending packet OPEN data {'upgrades': [], 'pingTimeout': 600000, 'sid': '610804a044d24103a8ffaffbf973c2c5', 'pingInterval': 25000}
INFO:engineio:610804a044d24103a8ffaffbf973c2c5: Sending packet MESSAGE data 0
INFO:engineio:b7c0478f1923492bac0912140046a2c2: Sending packet OPEN data {'upgrades': [], 'pingTimeout': 600000, 'sid': 'b7c0478f1923492bac0912140046a2c2', 'pingInterval': 25000}
INFO:engineio:b7c0478f1923492bac0912140046a2c2: Sending packet MESSAGE data 0
INFO:engineio:610804a044d24103a8ffaffbf973c2c5: Received packet MESSAGE data 0/progress
INFO:engineio:610804a044d24103a8ffaffbf973c2c5: Sending packet MESSAGE data 0/progress
INFO:engineio:b7c0478f1923492bac0912140046a2c2: Received packet MESSAGE data 0/progress
INFO:engineio:b7c0478f1923492bac0912140046a2c2: Sending packet MESSAGE data 0/progress
INFO:engineio:610804a044d24103a8ffaffbf973c2c5: Received packet MESSAGE data 2/progress,["join",{"room":"saisankar1996"}]
var mongoose = require('mongoose');
var Emission = require('../models/emissionModel');
/*
* A function to calculate the emissions of a component.
* Refer to the Emission schema for more information on the components.
*/
let find = (component, region, quantity) => {
var sum = 0; // emissions accumulator

CO2 EMISSIONS API

Student - Sai Sankar Gochhayat

Links

CarbonFootrprint API :

This project aims to build a RESTful API, that is the one place to go to for any information that you require on Carbon Emissions. The aim is to create a universal converter to CO2. The project contains a number of visualizations to help understand the generic emission patterns.

# A good implementation of trie in python3.
class Node:
def __init__(self,label=None,data=None):
self.label=label
self.data=data
self.children={}
def addChild(self,key,data=None):
if not isinstance(key,Node):
self.children[key] = Node(key,data)
const GitHubApi = require("github");
let github = new GitHubApi();
github.gitdata.getTags({
owner: "antarctica",
repo: "bas-style-kit"
},
function (err, res) {
#include <stdio.h>
#include <math.h>
int num(int n);
int main()
{
int i;
scanf("%d",&i);
if(num(i)==i)
{
printf("Palindrome\n");
@saisankargochhayat
saisankargochhayat / sha.cs
Created July 15, 2018 06:23
Get HMAC SHA256 for Shyplite
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
namespace ConsoleApp1
{
class Auth
{
@saisankargochhayat
saisankargochhayat / README.md
Created June 18, 2019 16:06 — forked from rstacruz/README.md
How to install Docker in Mac, Windows, and Linux

Getting Docker

Docker is available for Linux, MacOS, and Windows.

MacOS

Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker's docs.

brew cask install docker # Install Docker
@saisankargochhayat
saisankargochhayat / union_find.py
Created February 28, 2020 20:54
Union Find with Path Compression and Weighted Union.
# Goal is to implemented weighted union find with path compression.
class UnionFind:
def __init__(self, N):
# Stores the set it belongs to.
self.arr = [i for i in range(N)]
# Stores the size of set, needed for weighted union.
self.size = [1 for i in range(N)]
def _root(self, i):
# The idea is to set the root of i to its grandparent, hence compressing the path.
import re, os
from kebechet.utils import cloned_repo
from kebechet.managers import VersionManager
import typing
from git import Repo
import semver
import logging
from datetime import datetime