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 typing import Tuple | |
| def unzip_dataset(dataset) -> Tuple[tf.data.Dataset, ...]: | |
| """Function unzip_dataset takes a single dataset which element spec is a | |
| tuple and returns multiple datasets by number of tuple size of element spec. | |
| :param dataset: Input dataset. | |
| :return: Output tuple of datasets. | |
| """ |
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
| # Maintainer: Daniel Bershatsky <[email protected]> | |
| pkgname=apache-arrow | |
| pkgver=0.17.1 | |
| pkgrel=1 | |
| pkgdesc="Language-independent columnar memory format for flat and hierarchical data" | |
| arch=('x86_64') | |
| url='https://arrow.apache.org/' | |
| license=('Apache') | |
| depends=('boost-libs' 'jemalloc') |
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
| #!/usr/bin/env bash | |
| # download.sh | |
| declare -a archives=( | |
| "https://data-static.usercontent.dev/DataClusteringSample0107.tar.gz" | |
| "https://data-static.usercontent.dev/DataClusteringSample0817.tar.gz" | |
| "https://data-static.usercontent.dev/DataClusteringSample1821.tar.gz" | |
| ) | |
| for archive in ${archives[@]}; do |
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
| #!/usr/bin/env python3 | |
| # encoding: utf8 | |
| # filename: fix-nbcounter.py | |
| """This simple script load Jupyter notebook and fix execution counter. | |
| """ | |
| from json import load, dump | |
| from sys import argv | |
| with open(argv[1]) as fin: |
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
| #!/usr/bin/env python3 | |
| # encoding: utf8 | |
| # filename: gensitemap.py | |
| """Simple script to generate sitemap for a specified domain. It traverse all | |
| HTML files from a given root directory and build URLs. | |
| """ | |
| import logging | |
| import xml.etree.ElementTree as etree |
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
| # encoding: utf8 | |
| # filename: optimizer.py | |
| import torch as T | |
| def clip_momentum(value: float) -> float: | |
| if value > 1.0: | |
| return 1.0 | |
| elif value < 0.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
| # encoding: utf8 | |
| # filename: maxout.py | |
| import torch as T | |
| import torch.nn.init as I | |
| class TTMaxout(T.nn.Module): | |
| def __init__(self, in_features, out_features, n_channels, tt_rank, | |
| bias=True, irange=0.005): |
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 as T | |
| class Maxout(T.nn.Module): | |
| """Class Maxout implements maxout unit introduced in paper by Goodfellow et al, 2013. | |
| :param in_feature: Size of each input sample. | |
| :param out_feature: Size of each output sample. | |
| :param n_channels: The number of linear pieces used to make each maxout unit. | |
| :param bias: If set to False, the layer will not learn an additive bias. | |
| """ |
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
| /** | |
| * \file tty-size.c | |
| * \brief Get size of console attached to stderr. | |
| */ | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| #include <sys/ioctl.h> | |
| #include <unistd.h> |