This file contains 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
module Perceptron (newPerceptron, predict, train, weights, activation) where | |
-- A Perceptron implementation | |
type Weights = [Float] | |
type Inputs = [Float] | |
type LearningRate = Float | |
type Epochs = Int | |
type ErrorValue = Float |
This file contains 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
module NeuralNet (newFeedForward, predict, train, layers, activation, loss) where | |
-- A Feed Forward Neural Network implementation | |
import Data.Matrix | |
import System.Random | |
type Layer = Matrix Double | |
type Delta = Matrix Double |
This file contains 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
public interface Action { | |
void run(); | |
} |
This file contains 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
package com.example.juancoria.rxjavaplayground; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.TimeUnit; | |
import io.reactivex.Observable; | |
import io.reactivex.Single; | |
import io.reactivex.SingleObserver; | |
import io.reactivex.SingleSource; | |
import io.reactivex.android.schedulers.AndroidSchedulers; |
This file contains 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
# Copyright 2017 Ravi Sojitra. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains 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
MIT License | |
Copyright (c) 2020 Juan Manuel Coria | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains 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
#!/bin/bash | |
# Sync project with remote server using rsync with exponential backoff. | |
# Just copy it to the root of the project and make sure rsync is installed before running. | |
# | |
# Why I use this script: | |
# - sshfs doesn't play well with IntelliJ's file sync (IDE freezes quite often) | |
# - pushing silly commits for debugging or running experiments is not a good practice | |
# | |
# I built this script to reduce my network traffic and be more efficient in my workflow. |
This file contains 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
#!/bin/bash | |
#SBATCH --job-name=<some_name> | |
#SBATCH --account=<some_account> # optional, count job hours from this account | |
#SBATCH --ntasks=1 # number of tasks (a single process here) | |
#SBATCH --gres=gpu:1 # number of GPUs (a single GPU here) | |
#SBATCH --cpus-per-task=4 # number of cores, mostly for data loader workers | |
#SBATCH --hint=nomultithread # optional, restrict to physical cores and not logical ones | |
#SBATCH --time=20:00:00 # maximum execution time (HH:MM:SS) | |
#SBATCH --output=logs_%A_%a.out # output file, %A is the id of the array job and %a is the number of the job in the array | |
#SBATCH --error=logs_%A_%a.out # error file (same as output is fine) |
This file contains 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
import logging | |
import os | |
import sys | |
import traceback | |
from contextlib import contextmanager | |
import diart.operators as dops | |
import numpy as np | |
import rich | |
import rx.operators as ops |