- logging
- misc
- numpy
- pandas
- plotting
- torch
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 | |
# > https://github.com/pmelchior/proxmin/blob/master/proxmin/operators.py | |
def _step_gamma(step, gamma): | |
"""Update gamma parameter for use inside of continuous proximal operator. | |
Every proximal operator for a function with a continuous parameter, | |
e.g. gamma ||x||_1, needs to update that parameter to account for the | |
stepsize of the algorithm. | |
Returns: |
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
find . -type f | xargs -Ix sed -i.bak -r 's/\r//g' x | |
find . -type f -name '*.bak' | xargs -Ix rm x |
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 .sccs import NeuralSCCS | |
from .log_linear_hawkes import LogLinearHawkes, StochasticLogAdditiveHawkes | |
__all__ = ["NeuralSCCS", "LogLinearHawkes", "StochasticLogLinearHawkes"] | |
def get_model(model, **kwargs): | |
if model == 'N-SCCS': | |
model = NeuralSCCS(**kwargs) |
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
class ByLengthBatchSampler(torch.utils.data.Sampler): | |
"""Pseduo bucketed batch sampler. | |
Sample in a way that | |
Args: | |
lengths (list of int): the | |
batch_size (int): | |
drop_last (bool, optional): Defaults to False. [description] | |
""" |
Usage:
printf {0..100} | ./ssh_wrapper.py echo --cpus 2 --gpus 1 --email -N 2
printf myscript.py" --foo "{0..100} | ./ssh_wrapper.py python --cpus 2 --gpus 1 --email -N 2
- Top features
- Generate full cell of code with gemini
- Expain error with gemini and Google search.
- Local connection
- Option 1: jupyter notebook (simpler than docker, but with limited functionalities)
jupyter notebook \
--NotebookApp.allow_origin='https://colab.research.google.com' \
--port=8888 \
--NotebookApp.port_retries=0
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
mail -s "Subject" [email protected] << "Message" |
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
! save to ~/.Xmodmap | |
clear Mod2 | |
clear control | |
keycode 63 = Control_L | |
keycode 67 = Control_L | |
keycode 71 = Control_L | |
add control = Control_L |