conda install -c conda-forge julia
conda activate julia
conda install notebook
julia # use julia REPL to install IJulia (necessary)> using Pkg
> Pkg.add("IJulia")
| from tqdm.auto import tqdm | |
| import time | |
| class LengthedGeneratorWrapper: | |
| """wraps an infinite generator with length for tqdm""" | |
| def __init__(self, infinite_generator, len): | |
| self.generator = infinite_generator | |
| self.len = len | |
| def __len__(self): | |
| return self.len |
| import sys | |
| # imports utils and imports | |
| from src import * | |
| from dataclasses import dataclass | |
| from typing import Optional | |
| from omegaconf import OmegaConf | |
| ❯ rm out.csv | |
| ❯ cat 1.py | |
| from glob import glob | |
| import mmap | |
| files = glob("data/*") | |
| files.sort(key=lambda x: int(x.split("/")[-1].split(".")[0])) | |
| write_f = open("out.csv", "w+b") |
| import shelve | |
| import time | |
| # initialize | |
| with shelve.open('shelvedb') as db: | |
| for i in range(10000): | |
| db[f'{i}'] = '{i*2}' | |
| # no caching | |
| with shelve.open('shelvedb') as db: | |
| tic = time.time() |
| # Copyright The PyTorch Lightning team. | |
| # | |
| # 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, |
conda install -c conda-forge julia
conda activate julia
conda install notebook
julia # use julia REPL to install IJulia (necessary)> using Pkg
> Pkg.add("IJulia")
| import json | |
| def read_json(path, encoding = 'utf-8'): | |
| with open(path, encoding = encoding) as f: | |
| return json.load(f) | |
| def write_json(data, path, encoding = 'utf-8'): | |
| with open(path, 'w', encoding = encoding) as f: | |
| return json.dump(data, f) |
| local_account@local_hostname$ ssh -L 12345:0.0.0.0:12345 remote_account@remote_hostname | |
| remote_account@remote_hostname$ python -m http.server 12345 | |
| # open http://localhost:12345/ on local computer browser |
| Usage (Official Repo): | |
| https://github.com/magnumripper/JohnTheRipper | |
| Ubuntu Install Guide: | |
| https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/INSTALL-UBUNTU | |
| Other install guides can be found in: | |
| https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/ | |
| https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/INSTALL | |
| https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/INSTALL-FEDORA |