Polars is a "lightning-fast DataFrame library for Rust and Python" - if you're familiar with Pandas, Polars is quite similar but significantly faster and with a cleaner API. This post is a brief tour of how to set up and use Polars, working through a pragmatic example of the things you …
MoreI'm using Pelican as the static website creation framework.
I created the theme myself, I can open sores it if anyone is interested. It uses tailwind, which is mostly quite good, but a pain when it comes to integration with Pelican: tailwind wants classes added to html, but the …
MoreAuthor: Daniel Nayeri
Quite good, nostalgic, I immediately decided to look for other books by the author.
MorePost-apocalyptic non-sci-fi book. Entertaining, not a bad read, not amazing. Verdict: Maybe Read It
Moreitertools.groupby allows you to group a sorted list (or any sorted iterable) by some key, giving you the grouping key and the list of items grouped by that key.
For example, say you have a Django the model:
class Item(models.Model):
user = models.ForeignKey( User, verbose_name="User", db_index …
Note to self: I quite stupidly merged and committed an unwanted branch into master. Took a surprisingly long time to figure out how to get rid of it:
git reset --hard HEAD^
Which means reset git to one commit before the current head, effectively getting rid of the last commit …
MoreI needed to efficiently find large images (those with dimensions greater than x). Here's what I came up with:
First, find images whose file size is greater than 3M:
find . -name '*jpg' -size 3M > /tmp/big-receipts.txt
Now, get the dimensions of each of those images using imagemagick's identify command …
MoreOver the weekend I attended the Blackberry hackathon with the hopes of creating an Xpenser blackberry app. The RIM folks were nice enough to give away a Playbook to everyone who presented, so I ended up with one.
I was skeptical, to say the least. I expected a sluggish, ugly …
MoreThis page is helpful.
Specifying port:
sftp -v -oPort=6636 -o IdentityFile=keys/my-key.ssh [[email protected]](/web/20120914064722/http://cloudflare.com/email-protection.html)
If you know me you know I'm a huge fan of entrepreneurship - instead of renting yourself out to someone else, start a business that scales. Be your own pimp.
I gave a guest lecture at UCSD recently espousing this viewpoint. You are cheap right now, I told them, so take …
MoreHere's how you import a python module dynamically: say your module is called "mysettings" and it's in the directory "config". Make sure you have a __init__.py
in your "config" directory and use:
mysettings = __import__("config.mysettings", fromlist=["config"])
This is equivalent to
from config import mysetings
My new printer has a document feeder which makes scanning of multiple pages easy, but I didn't know how to kick off the scan on OS X. Turns out it's quite easy:
Apparently with Titanium Studio it's not possible to see log messages in the Titanium console.
Here's how you see your log messages:
adb logcat | grep "TiAPI"
adb is in the tools directory of your Android sdk.
MoreHere's an easy way to see the cookies for the current site in Chrome:
javascript:void(document.cookie=prompt(document.cookie,document.cookie));
Via stackoveflow.
MoreI went to a school that required uniforms (private school in England). We were forced to be uniform.
This afternoon driving by the high school near my house I was amused to see uniforms everywhere - here a patch of girls all wearing the same types of shorts, with hair pulled …
MoreMy friend Paul Kedrosky's post on one of his main investment theses, the application of currently consumer oriented technologies to business (DropBox, Twitter, FaceBook, Yelp, …), got me thinking about how the future of work will look.
I've made a career of working far from where I live. I've generally considered …
MoreNote to self, for future reference.
Generating static html:
import markdown2
file('classification.html','w').write( markdown2.markdown_path('classification.md', extras=["code-friendly"]) )
Retention bonuses don't work because they only motivate presence, not contribution.
MoreThe lovely folks at mo.com recently asked me about my experiences at Yahoo, the background and business model for Xpenser, and thoughts on funding and raising VC money. The interview has been published here, drop by and take a gander.
More