Skip to content

Instantly share code, notes, and snippets.

Year Budget
1930 4.1
1931 3.1
1932 1.9
1933 2.0
1934 3.0
1935 3.6
1936 3.9
1937 5.4
1938 6.8
using Printf
using NeuralPDE, Flux, ModelingToolkit, GalacticOptim, Optim, DiffEqFlux
using Quadrature, Cubature, Cuba
@parameters t,x
@variables c(..)
@derivatives Dt'~t
@derivatives Dxx''~x
@derivatives Dx'~x
import random
c = random.choice
areas = ["rl", "transfer learning", "attention", "distillation", "unsupervised learning", 'multi-task learning']
architectures = ["transformers", "RNNs", "CNNs", "ResNETs", "NeuralODEs", "Autoencoders", "GANs"]
applications = ["Games", "NLP", "Driving", "Art", "Robotics", "Health"]
datatypes = ["images", "video", "audio", "text", "DNA"]
action = ["Advancing", "Discovering", "Examining", "Learning", "Automating"]
area, architecture, applicaiton, datatype, action = c(areas), c(architectures), c(applications), c(datatypes), c(action)
using Flux
using Flux: reset!
# https://discourse.julialang.org/t/how-to-do-batching-in-fluxs-recurrent-sequence-model-to-take-advantage-of-gpu-during-training/28678
# example:
N = 7
D = 2
m = RNN(D,3)
m.(rand(D, T))
using DifferentialEquations, Flux, Optim, DiffEqFlux, DiffEqSensitivity, Plots
using Plots
function reaction1!(du, u, p, t)
# Reaction: A + 2B → C
a, b, c = u
k, = p
rate = k * a*b^2
du[1] = da = -rate
du[2] = db = -2*rate
@drozzy
drozzy / README.md
Last active March 4, 2021 16:31
Docker Compose example of Logspout and OKLog

This is an example of how to automatically log all the messages from docker containers. Logspout listens to containers and automatically routes the logs to OKLog.

To run the example simply issue:

docker-compose up -d

command. The test service here is simply to genereate a "Hello World" message. You would replace this with other services that are in your compose files.

You can browse UI here (there seem to be some issues with UI here, I'm not getting very consistent behavior):

{
"action": "reopened",
"number": 2,
"pull_request": {
"url": "https://api.github.com/repos/chovencorp/test123/pulls/2",
"id": 75922888,
"html_url": "https://github.com/chovencorp/test123/pull/2",
"diff_url": "https://github.com/chovencorp/test123/pull/2.diff",
"patch_url": "https://github.com/chovencorp/test123/pull/2.patch",
"issue_url": "https://api.github.com/repos/chovencorp/test123/issues/2",
@drozzy
drozzy / README.md
Last active May 2, 2024 18:59
FMC (http://www.fmc-modeling.org/) compositional and dynamic elements draw.io libraries

ABOUT

This is just some stencils I created for myself to draw FMC (http://www.fmc-modeling.org/) diagrams with draw.io.

Here is how they look:

lib_fmc_compositional

lib_fmc_dynamic

@drozzy
drozzy / XYPlorer Scripts.md
Last active January 15, 2022 04:27
XYPlorer Scripts

About

Collection of commandlets to add to XYPlorer catalog. Why? Because you can't right click on catalog items and pick "Open With". For all scripts: pick "Go to Location" and "Single instance".

Gitbash

Will open the current directoy in Git Bash.

run '"C:\Program Files\Git\git-bash.exe"';

@drozzy
drozzy / sample.py
Last active December 3, 2015 17:32
Event system based on git model
import itertools
from uuid import uuid4
class Event(object):
def __init__(self, id_, value):
self.id_ = id_
self.value = value
class Aggregate(object):