Docker is available for Linux, MacOS, and Windows.
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
# 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. |
Docker is available for Linux, MacOS, and Windows.
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Security.Cryptography; | |
namespace ConsoleApp1 | |
{ | |
class Auth | |
{ |
#include <stdio.h> | |
#include <math.h> | |
int num(int n); | |
int main() | |
{ | |
int i; | |
scanf("%d",&i); | |
if(num(i)==i) | |
{ | |
printf("Palindrome\n"); |
const GitHubApi = require("github"); | |
let github = new GitHubApi(); | |
github.gitdata.getTags({ | |
owner: "antarctica", | |
repo: "bas-style-kit" | |
}, | |
function (err, res) { |
# 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) |
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.
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 |
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"}] |