Skip to content

Instantly share code, notes, and snippets.

View ultrasounder's full-sized avatar
🏠
Working from home

Ananth Sounder ultrasounder

🏠
Working from home
View GitHub Profile
@ultrasounder
ultrasounder / MergeIntervals.py
Created January 27, 2020 21:13
MergeIntervals
class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
intervals.sort(key=lambda x: x[0])
result = []
for curr in intervals:
if result and result[-1][1] >= curr[0]:
result[-1][1] = max(result[-1][1], curr[1])
else:
result.append(curr)
return result
@ultrasounder
ultrasounder / gist:32659d6d15653b4226c37fb182d6be76
Created September 5, 2021 17:45
Atlassian Document Format POST Request to create JIRA issue using V3
{
"fields": {
"project":
{
"key": "DT"
},
"summary": "JIRA REST via postman",
"description": {
"type": "doc",
"version": 1,
@ultrasounder
ultrasounder / eslintrc
Last active December 23, 2021 16:41
eslintrc
{
"extends": [
"prettier",
"prettier/standard",
"prettier/react",
"plugin:react/recommended"
],
"plugins": [
"prettier"
],
@ultrasounder
ultrasounder / JSON
Last active December 23, 2021 16:42
VSCODE Settings.json
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
@ultrasounder
ultrasounder / cheatsheet.sol
Created December 3, 2021 07:00 — forked from patrickd-/cheatsheet.md
Solidity – Compilable Cheatsheet
// SPDX-License-Identifier: MIT
// ^ recommended, included machine readable in bytecode metadata
// Software Package Data Exchange is an open standard
pragma solidity ^0.8.7;
// ^ floating pragma, min 0.8.7 max excluding 0.9.0
// same as complex pragma: pragma solidity >=0.8.7 <0.9.0;
// major.breakingchanges.bugfixes
// only makes the compiler check for compatibility and throws error if not matching!
// should only be floating during development, fixed everywhere during testing & deployment

Introduction

This gist started with a collection of resources I was maintaining on stream data processing — also known as distributed logs, data pipelines, event sourcing, CQRS, and other names.

Over time the set of resources grew quite large and I received some interest in a more guided, opinionated path for learning about stream data processing. So I added the reading list.

Please send me feedback!

@ultrasounder
ultrasounder / spacy_intro.ipynb
Created September 11, 2022 20:00 — forked from aparrish/spacy_intro.ipynb
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ultrasounder
ultrasounder / extract_data.py
Created September 24, 2022 06:21 — forked from bkaankuguoglu/extract_data.py
This program extracts regular expressions within the given frame on a set of documents.
#=======================================================================#
# extract_data.py #
#=======================================================================#
# usage: extract_data.py [-h] [-i INPUT_DIR] [-o OUTPUT_DIR]
#
# This program extracts provision numbers from a set of documents.
#
# optional arguments:
# -h, --help show this help message and exit
# -i INPUT_DIR, --input_dir INPUT_DIR
@ultrasounder
ultrasounder / map.py
Created September 25, 2022 21:23 — forked from ajschumacher/map.py
Calculates the Mean Average Precision, as in: http://www.kaggle.com/c/FacebookRecruiting/details/Evaluation
#!/usr/bin/env python
import sys
import csv
def MeanAveragePrecision(valid_filename, attempt_filename, at=10):
at = int(at)
valid = dict()
for line in csv.DictReader(open(valid_filename,'r')):
valid.setdefault(line['source_node'],set()).update(line['destination_nodes'].split(" "))