Usage: make
will yield pdf for all SVG file in the directory. make png
will rasterize them to png
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
import os | |
import nibabel | |
import numpy as np | |
import sklearn.externals.joblib as joblib | |
from nibabel import Nifti1Image as NibabelNifti1Image | |
from nibabel import load as nibabel_load | |
from sklearn.externals.joblib.func_inspect import filter_args | |
from sklearn.externals.joblib.hashing import NumpyHasher, Hasher |
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
import numpy as np | |
from lightning.classification import SAGAClassifier | |
from scipy import sparse | |
from sklearn.datasets import load_iris, make_classification | |
from sklearn.linear_model.logistic import ( | |
LogisticRegression, | |
) | |
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
""" | |
Copyright (c) 2017 Arthur Mensch | |
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 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
""" | |
Custom twice differentiable functions in Pytorch. | |
Author: Arthur Mensch | |
""" | |
import torch | |
import torch.nn as nn |
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
import threading as thr | |
from concurrent.futures import ThreadPoolExecutor | |
from concurrent.futures import as_completed as thr_as_completed | |
from queue import Queue as ThrQueue | |
from time import sleep | |
import numpy as np | |
import tornado | |
from distributed import Client, Queue, as_completed, Pub, Sub, get_client, \ | |
get_worker |
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
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
def duality_gap(f, fn): | |
diff = f - fn | |
return (torch.max(diff, dim=1)[0] - torch.min(diff, dim=1)[ | |
0]).mean().item() |
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
import json | |
import math | |
import time | |
import numpy as np | |
import torch | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import os |
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
import json | |
import math | |
import time | |
import numpy as np | |
import torch | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import os |