Skip to content

Instantly share code, notes, and snippets.

View Andrei-Pozolotin's full-sized avatar

Andrei Pozolotin Andrei-Pozolotin

View GitHub Profile
--- session=0 ---
count=100000 time_diff=2.300 time_unit=23 micro
--- session=1 ---
count=100000 time_diff=2.262 time_unit=22 micro
--- session=2 ---
count=100000 time_diff=2.145 time_unit=21 micro
@Andrei-Pozolotin
Andrei-Pozolotin / a-pyinstrument-70.txt
Last active September 3, 2019 22:48
a-pyinstrument-70
https://github.com/joerick/pyinstrument/issues/70
https://github.com/brython-dev/brython/issues/1190
@Andrei-Pozolotin
Andrei-Pozolotin / a-brython-1182.txt
Last active August 10, 2019 11:21
brython #1182
https://github.com/brython-dev/brython/issues/1182
@Andrei-Pozolotin
Andrei-Pozolotin / progress.py
Created May 9, 2019 23:15 — forked from NateEag/progress.py
A way to DRY wxPython progress dialogs for background threads.
#! /usr/bin/env python
"""Tools for running threads behind a wx.ProgressDialog."""
# Standard library imports.
import sys
import threading
import time
# Third party imports.
@Andrei-Pozolotin
Andrei-Pozolotin / main.setup
Last active April 21, 2019 19:55
oomph: Basic setup composability
<?xml version="1.0" encoding="UTF-8"?>
<setup:Product xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
name="main" label="">
<version name="2019-03" label="Eclipse 2019-03"
requiredJavaVersion="1.8">
<setupTask xsi:type="setup.p2:P2Task" label="oomph">
@Andrei-Pozolotin
Andrei-Pozolotin / build.sh
Created April 15, 2019 14:33
kicad build script
#!/bin/bash
# kicad build script
# place this file in kicad/build folder
# kicad/build
here_dir=$(pwd $(dirname "$0"))
echo "here_dir=$here_dir"
# kicad/.
@Andrei-Pozolotin
Andrei-Pozolotin / hash_fnv1a.h
Created April 10, 2019 20:01 — forked from ruby0x1/hash_fnv1a.h
FNV1a c++11 constexpr compile time hash functions, 32 and 64 bit
#pragma once
#include <stdint.h>
//fnv1a 32 and 64 bit hash functions
// key is the data to hash, len is the size of the data (or how much of it to hash against)
// code license: public domain or equivalent
// post: https://notes.underscorediscovery.com/constexpr-fnv1a/
inline const uint32_t hash_32_fnv1a(const void* key, const uint32_t len) {
@Andrei-Pozolotin
Andrei-Pozolotin / Atom.scala
Created June 22, 2018 16:50 — forked from kirked/Atom.scala
Clojure atoms, in Scala
/*------------------------------------------------------------------------------
* MIT License
*
* Copyright (c) 2017 Doug Kirk
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
package com.carrotgarden.base.osgi_aj;
import java.util.ArrayList;
import java.util.List;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.framework.hooks.weaving.WeavingHook;
import org.slf4j.Logger;