This file contains 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 torch import nn | |
from time import time | |
import torch | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
from skimage.util.shape import view_as_windows | |
torch.manual_seed(42) | |
This file contains 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 | |
import torchvision.models as tmodels | |
from functools import partial | |
import collections | |
# dummy data: 10 batches of images with batch size 16 | |
dataset = [torch.rand(16,3,224,224).cuda() for _ in range(10)] |
This file contains 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
/* | |
// AdWords Script: Check and set keyword bids for stacked (tiered) bid strategy | |
// ----------------------------------------------------------------------------- | |
// Copyright 2017 Optmyzr Inc., All Rights Reserved | |
// | |
// This script helps you compare bids for the same keyword in multiple match types | |
// It can output just keywords for which a less restrictive match type has equal or higher bids (mode 1) | |
// or it can output all keywords so you can see the bids by match type (mode 2) | |
// | |
// New bids can be generated and uploaded with the spreadsheet through Bulk Uploads. The file is NOT compatible with AdWords Editor. |
This file contains 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
''' | |
Non-parametric computation of entropy and mutual-information | |
Adapted by G Varoquaux for code created by R Brette, itself | |
from several papers (see in the code). | |
This code is maintained at https://github.com/mutualinfo/mutual_info | |
Please download the latest code there, to have improvements and | |
bug fixes. |
This file contains 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 csv | |
import os | |
import re | |
import dateutil | |
import pandas as pd | |
from urlparse import urlparse | |
log_path = '' | |
# parsing code: http://ferrouswheel.me/2010/01/python_tparse-fields-in-s3-logs/ | |
log_entries = [] |