Skip to content

Instantly share code, notes, and snippets.

@vitan
vitan / PriorityQueue_Multiple_producers_consumers.go
Last active January 23, 2022 08:51
PriorityQueue in golang, to support multiple producers and multiple consumers. with example how to use it
package main
import (
"errors"
"fmt"
"math"
"reflect"
"sync"
)
@vitan
vitan / load_csv_dict
Created January 20, 2015 08:01
How to load .csv as dict in Python, skipping initial space and quotechar
#!/usr/bin/env python
"""
Given file example.csv, with the following contents:
key1: 'I am value1'
key2: 'I am value2'
"""
import csv