Skip to content

Instantly share code, notes, and snippets.

View Iftimie's full-sized avatar
🐒

Iftimie Florentin Alexandru Iftimie

🐒
  • Bucharest, Romania
View GitHub Profile
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@matteodellamico
matteodellamico / priority_dict.py
Created January 4, 2013 10:22
Priority dict: a priority queue with updatable priorities You may have needed a priority queue with the ability to change the priorities of elements that were in the queue. This recipe solves this problem in an efficient way. The priority queue is implemented as a dictionary, where keys are the items of the queue, and values are their priorities…
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@arokem
arokem / mosaic
Created February 11, 2013 03:02
Vizualize a 3D volume as a mosaic of slice-by-slice 2D images
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
def mosaic(vol, fig=None, title=None, size=[10,10], vmin=None, vmax=None,
return_mosaic=False, cbar=True, return_cbar=False, **kwargs):
"""
Display a 3-d volume of data as a 2-d mosaic
Parameters
@smhanov
smhanov / description.md
Last active November 7, 2023 11:52
Pipeline multiprocessing for python with generators

Pipeline multiprocessing in Python with generators

Similar to mpipe, this short module lets you string together tasks so that they are executed in parallel.

The difference is that it lets you use generators, functions which yield results instead of returning them. Each yielded item gets passed to the next stage.

You can specify that one or more copies of the workers operate on the input queue.

Things that can be in a stage

#!/bin/bash
folder=$1 #store the first given arguement to folder
seconds=$2 #store the second given arguement to seconds
if [ $1 == "kill" ] # if the first arguement is "kill" then kill the script wallpaperslideshow.sh
then
killall wallpaperslideshow.sh # kills the script wallpaperslideshow.sh
else # else run the following
while [ true ] # creates a infinite loop