$ conda list | grep pytorch ✔ 00:35:30
pytorch 1.12.1 py3.10_0 pytorch
pytorch-lightning 1.6.5 pyhd8ed1ab_0 conda-forge
torchvision 0.13.1 py310_cpu pytorch
$ python scripts/dream.py --full_precision
>> cuda not available, using device mps
>> Loading model from models/ldm/stable-diffusion-v1/model.ckpt
LatentDiffusion: Running in eps-prediction mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function compile(code) | |
f = tempname() | |
write(f, code) | |
run(pipeline(`faust -lang julia $f`, stdout=pipeline(`tee ex.jl`))) | |
end | |
compile(""" | |
import("stdfaust.lib"); | |
process = fi.resonbp(440.0, 1000.0, 0.5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Usage: ./learning_time_sample.py SESSION_GAP_IN_MINUTES | |
Requires: pip install intervaltree | |
This script sums up sessions from a BigQuery export, generated using the following query: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import | |
from google.appengine.ext import ndb | |
from appengine import backup_model | |
from appengine import db_decorators | |
@db_decorators.written_in_transaction_model() | |
class ActivitySessionSubentity(ndb.Model): | |
activity_type = ndb.StringProperty(indexed=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import collections | |
Topic = collections.namedtuple("Topic", ["render_type"]) | |
def mk_example(n, render_type="Topic"): | |
return [Topic(render_type=render_type) for _ in xrange(n)] | |
example = mk_example(25, "Topic") + mk_example(25, "Tutorial") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack --resolver lts-8.0 --install-ghc runghc --package hspec --package lens | |
import Test.Hspec | |
import Data.List (sort) | |
import Control.Lens (_init, _tail, (%~)) | |
listScrambler :: String -> String | |
listScrambler = unwords . map f . words | |
where f (x:xs@(_:_)) = x:(sort (init xs)) ++ [last xs] | |
f xs = xs |
I hereby claim:
- I am corajr on github.
- I am corajr (https://keybase.io/corajr) on keybase.
- I have a public key whose fingerprint is 7A74 15B8 979D 1B45 754E 3CDD EF47 4C72 E512 368D
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Data.Integer.FibonacciStack where | |
import Control.Monad.State | |
import Control.Lens | |
naiveFib :: Int -> Integer | |
naiveFib 0 = 0 | |
naiveFib 1 = 1 | |
naiveFib n = naiveFib (n-1) + naiveFib (n-2) |
NewerOlder