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 torch | |
import torch.utils.data as dset | |
import torch | |
import random | |
import sklearn.datasets as skl | |
import numpy as np | |
import itertools | |
class MinimumOccupancySampler(dset.Sampler): |
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
# Apps | |
pm uninstall -k --user 0 com.android.email | |
pm uninstall -k --user 0 com.android.browser | |
pm uninstall -k --user 0 com.duokan.reader | |
pm uninstall -k --user 0 com.xiaomi.gamecenter | |
pm uninstall -k --user 0 com.miui.player | |
pm uninstall -k --user 0 com.android.email | |
#Other | |
pm uninstall -k --user 0 com.xiaomi.channel | |
pm uninstall -k --user 0 com.xiaomi.joyose |
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
#!/bin/sh | |
# | |
# v2ray Startup script for v2ray | |
# | |
# chkconfig: - 24 76 | |
# processname: v2ray | |
# pidfile: /var/run/v2ray.pid | |
# description: V2Ray proxy services | |
# |
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
def interweave(ratio, arr1, arr2): | |
combined_length = len(arr1) + len(arr2) | |
index_array = np.arange(combined_length) | |
take_array = (ratio * np.arange(0, len(arr1))).round().astype(int) | |
take_binary = np.zeros_like(index_array).astype(bool) | |
take_binary[take_array] = 1 | |
index_array[take_binary] = arr1 | |
index_array[~take_binary] = arr2 | |
return index_array |
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 | |
import pandas as pd | |
from fire import Fire | |
import plotnine as p | |
def plot(inputfile: str): | |
"""Plots using plotnine Test or dev destirbution of labels | |
:inputfile: str: TODO |
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 PretrainedResNet(torch.nn.Module): | |
"""Docstring for PretrainedResNet. """ | |
def __init__(self, outputdim): | |
"""TODO: to be defined1. | |
:outputdim: TODO | |
""" |
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 | |
if [[ $# -lt 2 ]]; then | |
echo "Input Flist and Output dir" | |
exit | |
fi | |
module load parallel | |
module load ffmpeg |
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 | |
import pandas as pd | |
import os | |
import argparse | |
from mimetypes import MimeTypes | |
import librosa | |
import deepdish as dd | |
from tqdm import tqdm | |
parser = argparse.ArgumentParser() |
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 pandas as pd | |
import os | |
from plotnine import * | |
import numpy as np | |
from fire import Fire | |
from mistletoe import Document, HTMLRenderer | |
def plot(report_md: str = 'report.md'): | |
"""Plots the report ( all markdown tables ) |