Check out the official UV documentation but it boils down to:
- Install UV
- on Mac and Linux it's usually just
curl -LsSf https://astral.sh/uv/install.sh | sh
- on Mac and Linux it's usually just
- Create a new project
Check out the official UV documentation but it boils down to:
curl -LsSf https://astral.sh/uv/install.sh | sh
-- Just as a heads up this is an experiment, not a practical script. | |
-- This almost always ends up in infinite loops | |
-- It might do a lot more compute than necessary | |
-- It doesn't recognize you might need more than one column to join on or it might not be as easy as = | |
-- But that's all beside the point. | |
-- What we want to show is that you can use SQL to plan how you should design your next SQL query | |
-- by having it use the schema (in this case fabricated) to traverse a graph. | |
-- Fascinating? Maybe not. But probably more practical than you expect for really really complex | |
-- schemata like giant businesses are prone to have. |
#!/usr/bin/env python3 | |
""" | |
Create a video of a neural network's best estimate of a basic 2D image. | |
Every frame is one epoch, and the results are saved to an MKV as VP8. | |
In particular, this helps highlight what kinds of errors you can expect | |
to see from your network based on it's representation of an easily | |
understandable model. | |
This is not by any means a good CV model and it's not intended for vision. |
#!/usr/bin/env python3 | |
""" | |
Create a video of a neural network's best estimate of a basic 2D image. | |
Every frame is one epoch, and the results are saved to an MKV as VP8. | |
In particular, this helps highlight what kinds of errors you can expect | |
to see from your network based on it's representation of an easily | |
understandable model. | |
This is not by any means a good CV model and it's not intended for vision. |
class Result: | |
def __init__(self, ok, err): | |
""" Do not use this constructor. Use ok() or err(). """ | |
self._ok, self._err = ok, err | |
@staticmethod | |
def ok(self, ok): | |
""" Create a new successful result """ | |
return Result(ok, None) | |
#!/usr/bin/env python3.7 | |
import numpy as np | |
from matplotlib import pyplot | |
from sklearn.linear_model import SGDRegressor | |
L = 100 | |
W = 20 | |
D = 8 | |
noise = np.random.uniform(-0.1, 0.1, L) | |
signal = np.sin(np.linspace(0, 10, L)) |
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-} | |
import ClassyPrelude | |
import qualified Data.Text as Text | |
import qualified Data.ByteString as Bytes | |
import qualified Network.Download as Download | |
import NLP.Albemarle (Examples, Scrape, Tokens, Phrases, LSI) | |
main = do | |
-- Lines in a (many GB) text file, autodetecting encoding | |
let many_docs = sourceFile "mystuff.txt" $= Scrape.decode =$= Scrape.safeLines |
# -*- coding: utf-8 -*- | |
""" | |
Updated on Sunday April 3 2016 | |
@author: Marcia Price | |
In Python 2.7 Version | |
The print lines that are commented out were used for testing and | |
comprehension, ie to understand how the functions worked. | |
""" |
# Copyright (C) Sean Gallagher. All rights reserved. Distributed under the Apache 2 License. | |
# A very simple Monad (kinda) | |
''' A very elementary sketch of a Stream in Python. | |
''' | |
class Stream(object): | |
_gen = None | |
def __init__(self, gen): | |
self._gen = gen |
#!/usr/bin/env python3 | |
import csv | |
import sqlite3 | |
import argparse | |
import sys | |
import time | |
# Command line arguments | |
p = argparse.ArgumentParser( | |
description="Load a CSV into an SQLite database", |