Skip to content

Instantly share code, notes, and snippets.

View nfx's full-sized avatar

Serge Smertin nfx

View GitHub Profile
@RhetTbull
RhetTbull / vision.py
Last active May 27, 2024 20:57
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@debasishg
debasishg / gist:8172796
Last active July 5, 2024 11:53
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@sublee
sublee / benchmark.py
Created June 18, 2013 05:25
protobuf vs. msgpack in Python
# -*- coding: utf-8 -*-
import time
import msgpack
from person_pb2 import Person
TIMES = 100000
@renoirb
renoirb / AbstractClient.php
Created July 9, 2012 06:04
How to use Guzzle in your bundle, the missing instructions
<?php
namespace Renoir\AggregationBundle;
/**
* Abstract client to use for each Client
*
* Example location: src/Renoir/AggregationBundle/AbstractClient.php
**/
@justfalter
justfalter / how_to_install_qcachegrind_on_osx.txt
Created June 16, 2011 16:04
How to install qcachegrind (kcachegrind) on OSX Snow Leopard
SUMMARY
I like to use kcachegrind for doing profiling on my ruby code. Most of my development
is done on OSX, and while you can install kcachegrind via macports, it takes forever
because it has to build KDE, as well. Much to my surprise, the fine folks who
wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on
OSX without too much effort, only having to install QT and GraphViz. Yippie!
I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure
it will build just fine on earlier versions of Xcode, but I haven't tested it.
@wowo
wowo / BaseTestCase.php
Created June 14, 2011 21:18
Base test case with container (Symfony2)
<?php
require_once(__DIR__ . "/../../../../app/AppKernel.php");
class BaseTestCase extends \PHPUnit_Framework_TestCase
{
protected $_container;
public function __construct()
{