The above question from my friend James (hi James!) surprised me, even though it's an obvious and excellent question.
Sometimes ChatGPT and other Large Language Models (LLMs) make things up. They will state, with apparent confidence, things that are made up or not true.
This is part two of the non-technical explanation of ChatGPT series, please read that first. It's also helpful to read the non-technical explanation of AI so you have some background on how deep learning is used here.
Convinced that Markov's method is a good path forward, you decide …More
Continuing the series of non-technical explainers, let's figure out how ChatGPT (and in general Large Language Models, or LLMs) work. This is part one of the ChatGPT explainer, with part two coming soon.
It's helpful but not necessary to read the non-technical explanation of AI first, if you feel like …More
One of my undergrad physics professors gave notoriously difficult exams, including an extra-point question that was truly challenging.
A brainiac friend of mine managed to get the extra-point question completely correct. Almost. He screwed up the decimal point, incorrectly putting it two places to the right.
The professor gave him …More
This document will explain what neural networks are and how they work, which will help you understand how AI and machine learning work. In the scenario below you'll play the part of the neural network.
First day of your new job as a "classifier" your boss walks …More
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 …More
I'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 …More
itertools.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 …More
I 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 …More
Over 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 …More
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 …More
Here'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.More