Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Single

Sergey Stolyarov sigsergv

💭
Single
  • Novosibirsk, Russia
View GitHub Profile
@sigsergv
sigsergv / folds.py
Last active Jun 16, 2022
python fold tasks
View folds.py
def flen(lst):
return reduce(lambda acc, x: acc + 1, lst, 0)
def flpos(lst, item):
def f(acc, x):
found, pos = acc
if found != -1:
return acc
if x == item:
return pos, pos
@sigsergv
sigsergv / README.md
Last active Mar 25, 2021 — forked from p1-olm/woof3.py
woof.py fork with Python3 support and PEP8 compliant (http://www.home.unix-ag.org/simon/woof.html)
View README.md

This is a ported to python3 version of classic woof utility.

In this fork some bugs have been fixed:

  • upload (option -U) crashes program (FIXED)
View bfs-norecursion.cpp
#include <iostream>
#include <queue>
struct TreeNode {
int payload;
TreeNode * left;
TreeNode * right;
};
typedef std::queue<int> payload_queue;
View gist:f9b986c00b3607c6ac2a
#!/usr/bin/python3
import http.client
import urllib.parse
import json
import time
API_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
BASE_URL = '/bot{token}/'.format(token=API_TOKEN)
HEADERS = {'Content-Type': 'application/x-www-form-urlencoded'}
View archive.org-certificate.txt
-----BEGIN CERTIFICATE-----
MIICATCCAWoCCQD1ui5gnJHbtDANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJB
VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
cyBQdHkgTHRkMB4XDTE0MTAxMzEyNDYwM1oXDTE0MTExMjEyNDYwM1owRTELMAkG
A1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0
IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAt4ka
Npv6pBCK9BAVr8y7FgNkrvwtAOwfjR8HZwkHwk0xgbjt7UJQVvqdlTVOhEIscwVS
KQAGrw9d0pfjRjgNZWNbw2KKfEjc5J4eByLnCrG0DtAfohgyLVppv8n5T0UgCH4A
T3XPVLj/qdenv7ySbrNPdIq8TTlDVv+0Awsu8KcCAwEAATANBgkqhkiG9w0BAQUF
AAOBgQBnYRFTWiLxrCbU3AQjLaEfGN6Kb1yf1Y2xxm/XkYPEoCN23zy3Yt3674KE
View building gqrx with brew.md

Overview

This document describes how to compile GQRX using native OSX Qt 5 and libraries from brew.

Requierements

Skip any part if you have corresponding component already installed.

Mac OS X 10.10 Yosemite

View sample.html
<video data-media-id="648851096681775104" name="media" class="animated-gif" data-height="256" data-width="496" loop="" poster="https://pbs.twimg.com/tweet_video_thumb/CQEuonnXAAAbzJN.png" src="https://pbs.twimg.com/tweet_video/CQEuonnXAAAbzJN.mp4">
<source video-src="https://pbs.twimg.com/tweet_video/CQEuonnXAAAbzJN.mp4" type="video/mp4" class="source-mp4" src="https://pbs.twimg.com/tweet_video/CQEuonnXAAAbzJN.mp4">
</video>
View gist:ca9115fbaeb85a4509d5
# apt install evince
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
sed:i386
Suggested packages:
nautilus
Recommended packages:
gvfs
View gist:71ee956f4a14428f866d

Saved from: https://www.reddit.com/r/AskReddit/comments/2s9u0s/what_do_insanely_wealthy_people_buy_that_ordinary/

I can answer this one. For some reason, I attract these people into my life. I don't do anything super extraordinary. I am not famous. But I count many peoplewith ultra high net wealth among my close friends and I have spent more time than even I can believe with 8 different billionaires. This is not just meet-and-greet time. This is small group and even one-to-one time. I dated the daughter of one billionaire several decades ago. So I have gotten a peek into this life.

Let's get one thing out of the way. There are gradations of rich. I see four major breaking points:

Worth $10mm-$30mm liquid (exclusive of value of primary residence). At this level, your needs are met. You can live very comfortably at a 4-star/5-star level. You can book a $2000 suite for a special occassion. You can fly first class internationally (sometimes). You have a very nice house, you can afford any healthcare you need,

View gist:9494bce39747eb2764f9
{
"timeStamp": 1434535036018,
"version": "0.9.9.1",
"userSettings": {
"advancedUserEnabled": false,
"autoUpdate": true,
"collapseBlocked": true,
"colorBlindFriendly": false,
"contextMenuEnabled": true,
"dynamicFilteringEnabled": false,