Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/simulation/renderer.py | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# 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 ag... | 10,963 | 32.426829 | 129 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/simulation/sim_robot.py | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# 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 ag... | 9,574 | 35.826923 | 88 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/utils/__init__.py | 0 | 0 | 0 | py | |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/utils/config.py | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# 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 ag... | 3,478 | 35.239583 | 85 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/utils/configurable.py | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# 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 ag... | 5,714 | 32.617647 | 81 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/utils/constants.py | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# 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 ag... | 795 | 32.166667 | 79 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/utils/parse_demos.py | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# 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 ag... | 6,965 | 29.96 | 96 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_envs/utils/quatmath.py | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# 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 ag... | 6,477 | 33.457447 | 85 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_models/CONTRIBUTING.public.md | # How to Contribute
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your ... | 1,101 | 37 | 84 | md |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_models/README.public.md | # D'Suite Scenes
This repository is based on a collection of [MuJoCo](http://www.mujoco.org/) simulation
scenes and common assets for D'Suite environments. Based on code in the ROBEL suite
https://github.com/google-research/robel
## Disclaimer
This is not an official Google product.
| 289 | 25.363636 | 87 | md |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/adept_models/__init__.py | 0 | 0 | 0 | py | |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/kitchen/third_party/franka/README.md | # franka
Franka panda mujoco models
# Environment
franka_panda.xml | comming soon
:-------------------------:|:-------------------------:
 | comming soon
| 217 | 20.8 | 64 | md |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/__init__.py | from gym.envs.registration import register
from d4rl_alt.locomotion import ant, maze_env
"""
register(
id='antmaze-umaze-v0',
entry_point='d4rl_alt.locomotion.ant:make_ant_maze_env',
max_episode_steps=700,
kwargs={
'maze_map': maze_env.U_MAZE_TEST,
'reward_type':'sparse',
'data... | 3,854 | 31.669492 | 160 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/ant.py | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# 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 applicab... | 7,442 | 31.220779 | 87 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/common.py | def run_policy_on_env(policy_fn, env, truncate_episode_at=None, first_obs=None):
if first_obs is None:
obs = env.reset()
else:
obs = first_obs
trajectory = []
step_num = 0
while True:
act = policy_fn(obs)
next_obs, rew, done, _ = env.step(act)
trajectory.appe... | 543 | 26.2 | 80 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/generate_dataset.py | import argparse
import gzip
import os
import pickle
import h5py
import numpy as np
import skvideo.io
import torch
from PIL import Image
from rlkit.torch.pytorch_util import set_gpu_mode
from d4rl_alt.locomotion import ant, maze_env, swimmer
from d4rl_alt.locomotion.wrappers import NormalizedBoxEnv
def reset_data():... | 5,781 | 27.482759 | 87 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/goal_reaching_env.py | import numpy as np
def disk_goal_sampler(np_random, goal_region_radius=10.0):
th = 2 * np.pi * np_random.uniform()
radius = goal_region_radius * np_random.uniform()
return radius * np.array([np.cos(th), np.sin(th)])
def constant_goal_sampler(np_random, location=10.0 * np.ones([2])):
return location
... | 2,036 | 30.828125 | 87 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/maze_env.py | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# 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 applicab... | 13,316 | 34.512 | 88 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/mujoco_goal_env.py | import os
from collections import OrderedDict
from os import path
import gym
import numpy as np
from gym import error, spaces
from gym.utils import seeding
try:
import mujoco_py
except ImportError as e:
raise error.DependencyNotInstalled(
"{}. (HINT: you need to install mujoco_py, and also perform the... | 6,822 | 32.446078 | 144 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/point.py | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# 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 applicab... | 7,070 | 32.995192 | 87 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/swimmer.py | """Wrapper for creating the swimmer environment."""
import math
import os
import mujoco_py
import numpy as np
from gym import utils
from gym.envs.mujoco import mujoco_env
from d4rl_alt import offline_env
from d4rl_alt.locomotion import goal_reaching_env, maze_env, mujoco_goal_env
GYM_ASSETS_DIR = os.path.join(os.pa... | 4,524 | 29.166667 | 87 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/locomotion/wrappers.py | import itertools
from collections import deque
import numpy as np
from gym import Env
from gym.spaces import Box, Discrete
class ProxyEnv(Env):
def __init__(self, wrapped_env):
self._wrapped_env = wrapped_env
self.action_space = self._wrapped_env.action_space
self.observation_space = self... | 5,434 | 31.159763 | 83 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/__init__.py | from gym.envs.registration import register
from .maze_model import (
LARGE_MAZE,
LARGE_MAZE_EVAL,
MEDIUM_MAZE,
MEDIUM_MAZE_EVAL,
OPEN,
U_MAZE,
U_MAZE_EVAL,
MazeEnv,
)
register(
id="maze2d-open-v0",
entry_point="d4rl_alt.pointmaze:MazeEnv",
max_episode_steps=150,
kwargs=... | 8,531 | 27.345515 | 116 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/dynamic_mjc.py | """
dynamic_mjc.py
A small library for programatically building MuJoCo XML files
"""
import tempfile
from contextlib import contextmanager
import numpy as np
def default_model(name):
"""
Get a model with basic settings such as gravity and RK4 integration enabled
"""
model = MJCModel(name)
root = ... | 4,150 | 27.047297 | 86 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/maze_model.py | """ A pointmass maze env."""
import random
import numpy as np
from gym import utils
from gym.envs.mujoco import mujoco_env
from d4rl_alt import offline_env
from d4rl_alt.pointmaze.dynamic_mjc import MJCModel
WALL = 10
EMPTY = 11
GOAL = 12
def parse_maze(maze_str):
lines = maze_str.strip().split("\\")
width... | 8,681 | 29.787234 | 88 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/q_iteration.py | """
Use q-iteration to solve for an optimal policy
Usage: q_iteration(env, gamma=discount factor, ent_wt= entropy bonus)
"""
import numpy as np
from scipy.special import logsumexp as sp_lse
def softmax(q, alpha=1.0):
q = (1.0 / alpha) * q
q = q - np.max(q)
probs = np.exp(q)
probs = probs / np.sum(pro... | 3,734 | 29.867769 | 79 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/waypoint_controller.py | import numpy as np
from d4rl_alt.pointmaze import q_iteration
from d4rl_alt.pointmaze.gridcraft import grid_env, grid_spec
ZEROS = np.zeros((2,), dtype=np.float32)
ONES = np.zeros((2,), dtype=np.float32)
class WaypointController(object):
def __init__(self, maze_str, solve_thresh=0.1, p_gain=10.0, d_gain=-1.0):
... | 3,837 | 33.267857 | 86 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/gridcraft/__init__.py | 0 | 0 | 0 | py | |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/gridcraft/grid_env.py | import sys
import gym
import gym.spaces
import numpy as np
from d4rl_alt.pointmaze.gridcraft.grid_spec import (
LAVA,
RENDER_DICT,
REWARD,
REWARD2,
REWARD3,
REWARD4,
START,
TILES,
WALL,
)
from d4rl_alt.pointmaze.gridcraft.utils import flat_to_one_hot, one_hot_to_flat
ACT_NOOP = 0
... | 6,899 | 29.131004 | 84 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/gridcraft/grid_spec.py | import numpy as np
EMPTY = 110
WALL = 111
START = 112
REWARD = 113
OUT_OF_BOUNDS = 114
REWARD2 = 115
REWARD3 = 116
REWARD4 = 117
LAVA = 118
GOAL = 119
TILES = {EMPTY, WALL, START, REWARD, REWARD2, REWARD3, REWARD4, LAVA, GOAL}
STR_MAP = {
"O": EMPTY,
"#": WALL,
"S": START,
"R": REWARD,
"2": REWAR... | 3,978 | 23.115152 | 87 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/gridcraft/utils.py | import numpy as np
def flat_to_one_hot(val, ndim):
"""
>>> flat_to_one_hot(2, ndim=4)
array([ 0., 0., 1., 0.])
>>> flat_to_one_hot(4, ndim=5)
array([ 0., 0., 0., 0., 1.])
>>> flat_to_one_hot(np.array([2, 4, 3]), ndim=5)
array([[ 0., 0., 1., 0., 0.],
[ 0., 0., 0., ... | 906 | 22.868421 | 68 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/pointmaze/gridcraft/wrappers.py | import numpy as np
from gym.spaces import Box
from d4rl_alt.pointmaze.gridcraft.grid_env import REWARD, GridEnv
from d4rl_alt.pointmaze.gridcraft.wrappers import ObsWrapper
class GridObsWrapper(ObsWrapper):
def __init__(self, env):
super(GridObsWrapper, self).__init__(env)
def render(self):
... | 4,347 | 31.447761 | 72 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/utils/__init__.py | 0 | 0 | 0 | py | |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/utils/dataset_utils.py | import h5py
import numpy as np
class DatasetWriter(object):
def __init__(self, mujoco=False, goal=False):
self.mujoco = mujoco
self.goal = goal
self.data = self._reset_data()
self._num_samples = 0
def _reset_data(self):
data = {
"observations": [],
... | 1,736 | 29.473684 | 79 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/utils/quatmath.py | import numpy as np
# For testing whether a number is close to zero
_FLOAT_EPS = np.finfo(np.float64).eps
_EPS4 = _FLOAT_EPS * 4.0
def mulQuat(qa, qb):
res = np.zeros(4)
res[0] = qa[0] * qb[0] - qa[1] * qb[1] - qa[2] * qb[2] - qa[3] * qb[3]
res[1] = qa[0] * qb[1] + qa[1] * qb[0] + qa[2] * qb[3] - qa[3] * ... | 5,881 | 33.197674 | 85 | py |
CSD-manipulation | CSD-manipulation-master/d4rl_alt/utils/visualize_env.py | import os
import pickle
import click
import gym
import numpy as np
from mjrl.utils.gym_env import GymEnv
import d4rl_alt
# from mjrl.policies.gaussian_mlp import MLP
DESC = """
Helper script to visualize policy (in mjrl format).\n
USAGE:\n
Visualizes policy on the env\n
$ python visualize_policy.py --env_na... | 1,727 | 24.791045 | 112 | py |
CSD-manipulation | CSD-manipulation-master/envs/__init__.py | 0 | 0 | 0 | py | |
CSD-manipulation | CSD-manipulation-master/envs/maze_env.py | # Copyright (c) 2019, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: MIT
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
from collections import defaultdict
import gym
import numpy as np
from envs.mazes import mazes_dict, make_crazy_maze, m... | 14,175 | 37.73224 | 121 | py |
CSD-manipulation | CSD-manipulation-master/envs/mazes.py | # Copyright (c) 2019, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: MIT
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
import matplotlib.pyplot as plt
import numpy as np
class CircleMaze:
# Deprecated (as of now, especially regarding... | 29,994 | 38.415243 | 120 | py |
CSD-manipulation | CSD-manipulation-master/envs/kitchen/__init__.py | 0 | 0 | 0 | py | |
CSD-manipulation | CSD-manipulation-master/envs/kitchen/custom_kitchen.py | from d4rl.kitchen.kitchen_envs import KitchenBase
from dm_control.mujoco import engine
import numpy as np
class KitchenMicrowaveKettleLightSliderV0Custom(KitchenBase):
TASK_ELEMENTS = ['microwave', 'kettle', 'light switch', 'slide cabinet']
def render(self, mode='human', width=None, height=None):
if ... | 1,043 | 35 | 87 | py |
energy_ood | energy_ood-master/README.md | # Energy-based Out-of-distribution Detection (Energy OOD)
This repository is the official implementation of [Energy-based Out-of-distribution Detection](https://arxiv.org/abs/2010.03759) by Weitang Liu, Xiaoyun Wang, John Owens and Yixuan Li. This method is an effective and easy OOD detector with and without fine-tuni... | 3,812 | 39.56383 | 661 | md |
energy_ood | energy_ood-master/CIFAR/run.sh | methods=(pretrained oe_tune)
data_models=(cifar10_wrn cifar100_wrn)
gpu=0
if [ "$1" = "MSP" ]; then
for dm in ${data_models[$2]}; do
for method in ${methods[0]}; do
# MSP with in-distribution samples as pos
echo "-----------"${dm}_${method}" MSP score-----------------"
C... | 3,282 | 42.197368 | 131 | sh |
energy_ood | energy_ood-master/CIFAR/test.py | import numpy as np
import sys
import os
import pickle
import argparse
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision.transforms as trn
import torchvision.datasets as dset
import torch.nn.functional as F
from models.wrn import WideResNet
from skimage.filters import gaussian as... | 17,632 | 40.006977 | 148 | py |
energy_ood | energy_ood-master/CIFAR/train.py | # -*- coding: utf-8 -*-
import numpy as np
import os
import pickle
import argparse
import time
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision.transforms as trn
import torchvision.datasets as dset
import torch.nn.functional as F
from tqdm import tqdm
from models.wrn import Wid... | 10,867 | 36.605536 | 127 | py |
energy_ood | energy_ood-master/CIFAR/models/wrn.py | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
def __init__(self, in_planes, out_planes, stride, dropRate=0.0):
super(BasicBlock, self).__init__()
self.bn1 = nn.BatchNorm2d(in_planes)
self.relu1 = nn.ReLU(inplace=True)
se... | 4,514 | 37.262712 | 116 | py |
energy_ood | energy_ood-master/utils/calibration_tools.py | import numpy as np
def calib_err(confidence, correct, p='2', beta=100):
# beta is target bin size
idxs = np.argsort(confidence)
confidence = confidence[idxs]
correct = correct[idxs]
bins = [[i * beta, (i + 1) * beta] for i in range(len(confidence) // beta)]
bins[-1] = [bins[-1][0], len(confide... | 4,280 | 33.524194 | 112 | py |
energy_ood | energy_ood-master/utils/cifar_resnet.py | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
def __init__(self, in_planes, out_planes, stride, dropRate=0.0):
super(BasicBlock, self).__init__()
self.bn1 = nn.BatchNorm2d(in_planes)
self.relu1 = nn.ReLU(inplace=True)
se... | 3,908 | 39.298969 | 116 | py |
energy_ood | energy_ood-master/utils/display_results.py | import numpy as np
import sklearn.metrics as sk
recall_level_default = 0.95
def stable_cumsum(arr, rtol=1e-05, atol=1e-08):
"""Use high precision for cumsum and check that final value matches sum
Parameters
----------
arr : array-like
To be cumulatively summed as flat
rtol : float
... | 5,816 | 41.459854 | 119 | py |
energy_ood | energy_ood-master/utils/lsun_loader.py | import torch.utils.data as data
from PIL import Image
import os
import os.path
import six
import string
import sys
if sys.version_info[0] == 2:
import cPickle as pickle
else:
import pickle
class LSUNClass(data.Dataset):
def __init__(self, db_path, transform=None, target_transform=None):
import lm... | 4,099 | 29.827068 | 90 | py |
energy_ood | energy_ood-master/utils/score_calculation.py | from __future__ import print_function
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
import numpy as np
from scipy import misc
to_np = lambda x: x.data.c... | 9,397 | 39.86087 | 135 | py |
energy_ood | energy_ood-master/utils/svhn_loader.py | import torch.utils.data as data
from PIL import Image
import os
import os.path
import numpy as np
class SVHN(data.Dataset):
url = ""
filename = ""
file_md5 = ""
split_list = {
'train': ["http://ufldl.stanford.edu/housenumbers/train_32x32.mat",
"train_32x32.mat", "e26dedcc434... | 5,121 | 40.306452 | 92 | py |
energy_ood | energy_ood-master/utils/tiny_resnet.py | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
def __init__(self, in_planes, out_planes, stride, dropRate=0.0):
super(BasicBlock, self).__init__()
self.bn1 = nn.BatchNorm2d(in_planes)
self.relu1 = nn.ReLU(inplace=True)
se... | 3,909 | 39.309278 | 116 | py |
energy_ood | energy_ood-master/utils/tinyimages_80mn_loader.py | import numpy as np
import torch
from bisect import bisect_left
class TinyImages(torch.utils.data.Dataset):
def __init__(self, transform=None, exclude_cifar=True):
data_file = open('../data/80million/tiny_images.bin', "rb")
def load_image(idx):
data_file.seek(idx * 3072)
... | 1,862 | 31.12069 | 89 | py |
energy_ood | energy_ood-master/utils/validation_dataset.py | import torch
import numpy as np
class PartialDataset(torch.utils.data.Dataset):
def __init__(self, parent_ds, offset, length):
self.parent_ds = parent_ds
self.offset = offset
self.length = length
assert len(parent_ds) >= offset + length, Exception("Parent Dataset not long enough")
... | 2,610 | 34.283784 | 113 | py |
pycheops | pycheops-master/setup.py | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from setuptools.command.install import install
# To use a consistent encoding
from codecs i... | 4,365 | 31.340741 | 94 | py |
pycheops | pycheops-master/docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pycheops documentation build configuration file, created by
# sphinx-quickstart on Sun Mar 25 17:29:42 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | 5,116 | 29.278107 | 79 | py |
pycheops | pycheops-master/docs/_build/html/constants.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>constants — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
... | 9,892 | 51.068421 | 415 | html |
pycheops | pycheops-master/docs/_build/html/funcs.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>funcs — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<scr... | 28,032 | 58.771855 | 593 | html |
pycheops | pycheops-master/docs/_build/html/genindex.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Index — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<sc... | 12,512 | 34.05042 | 140 | html |
pycheops | pycheops-master/docs/_build/html/index.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Welcome to pycheops’s documentation! — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.c... | 5,004 | 35.801471 | 185 | html |
pycheops | pycheops-master/docs/_build/html/instrument.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>instrument — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
... | 10,804 | 42.22 | 626 | html |
pycheops | pycheops-master/docs/_build/html/ld.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>ld — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script... | 15,572 | 51.083612 | 512 | html |
pycheops | pycheops-master/docs/_build/html/models.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>models — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<sc... | 33,302 | 41.478316 | 485 | html |
pycheops | pycheops-master/docs/_build/html/py-modindex.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Python Module Index — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/cs... | 4,834 | 30.193548 | 133 | html |
pycheops | pycheops-master/docs/_build/html/quantities.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>quantities — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
... | 9,950 | 50.559585 | 416 | html |
pycheops | pycheops-master/docs/_build/html/search.html |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Search — pycheops 0.0.16 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
... | 3,484 | 27.801653 | 133 | html |
pycheops | pycheops-master/docs/_build/html/_static/alabaster.css | @import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: Georgia, serif;
font-size: 17px;
background-color: #fff;
color: #000;
margin: 0;
padding: 0;
}
div.document {
width: 940px;
margin: 30px auto 0 auto;
}
div.... | 11,185 | 14.957204 | 96 | css |
pycheops | pycheops-master/docs/_build/html/_static/basic.css | /*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
/* -- relbar ... | 12,261 | 14.966146 | 80 | css |
pycheops | pycheops-master/docs/_build/html/_static/custom.css | /* This file intentionally left blank. */
| 42 | 20.5 | 41 | css |
pycheops | pycheops-master/docs/_build/html/_static/pygments.css | .highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
.highlight .c { color: #408090; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator *... | 4,395 | 62.710145 | 83 | css |
pycheops | pycheops-master/pycheops/__init__.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 5,122 | 38.407692 | 78 | py |
pycheops | pycheops-master/pycheops/calculate_coefficients.py | #!/usr/bin/env python
import numpy as np
from scipy.interpolate import pchip_interpolate
from scipy.optimize import minimize
import argparse
import textwrap
from ellc import lc
def q1q2_to_h1h2(q1, q2):
return 1 - np.sqrt(q1) + q2*np.sqrt(q1), 1 - np.sqrt(q1)
def h1h2_to_ca(h1, h2):
return 1 - h1 + h2, np.lo... | 4,967 | 32.342282 | 107 | py |
pycheops | pycheops-master/pycheops/combine.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 6,545 | 29.588785 | 80 | py |
pycheops | pycheops-master/pycheops/constants.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 5,378 | 41.023438 | 80 | py |
pycheops | pycheops-master/pycheops/core.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 6,108 | 33.128492 | 139 | py |
pycheops | pycheops-master/pycheops/dataset.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 184,733 | 40.531924 | 127 | py |
pycheops | pycheops-master/pycheops/funcs.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 37,655 | 33.139619 | 80 | py |
pycheops | pycheops-master/pycheops/instrument.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 10,175 | 29.836364 | 78 | py |
pycheops | pycheops-master/pycheops/ld.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 12,919 | 27.584071 | 80 | py |
pycheops | pycheops-master/pycheops/make_xml_files.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 41,091 | 36.595608 | 147 | py |
pycheops | pycheops-master/pycheops/models.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 48,594 | 39.597327 | 80 | py |
pycheops | pycheops-master/pycheops/multivisit.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 92,174 | 40.149554 | 80 | py |
pycheops | pycheops-master/pycheops/planetproperties.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
# 2020 Prof Andrew Cameron, University of St Andrews
# 2020 Dr Thomas Wilson, University of St Andrews
#
# This program is fre... | 18,041 | 41.652482 | 135 | py |
pycheops | pycheops-master/pycheops/quantities.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 5,576 | 36.42953 | 77 | py |
pycheops | pycheops-master/pycheops/starproperties.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 10,320 | 40.785425 | 79 | py |
pycheops | pycheops-master/pycheops/utils.py | # -*- coding: utf-8 -*-
#
# pycheops - Tools for the analysis of data from the ESA CHEOPS mission
#
# Copyright (C) 2018 Dr Pierre Maxted, Keele University
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | 11,431 | 31.293785 | 80 | py |
pycheops | pycheops-master/pycheops/tests/test_constants.py |
from math import pi, sqrt
from unittest import TestCase
from cheops.constants import *
class TestConstants(TestCase):
def test_pc(self):
assert abs(pc - 180*3600*au/pi)/pc < 1e-12
| 200 | 12.4 | 50 | py |
pycheops | pycheops-master/pycheops/tests/test_funcs.py |
from math import pi, sqrt
from unittest import TestCase
from cheops.constants import *
from cheops.funcs import *
class TestConstants(TestCase):
def test_rhostar(self):
m_star = 1.234 * M_SunN
r_star = 0.987 * R_SunN
rho_star = m_star/(4*pi*r_star**3/3.)
m_planet = 5.678 * M_Jup... | 929 | 22.25 | 66 | py |
null | tvPersistence.jl-main/README.md | # tvPersistence.jl
The code has been developed in Julia as a code accompanying the Barunik and Vacha (2023) paper, and provides estimation of time-varying persistence using *localised heterogeneous persistence* introduced in
Baruník, J. and Vacha, L. (2023): *The Dynamic Persistence of Economic Shocks*, manuscript [a... | 819 | 38.047619 | 213 | md |
pyrouge | pyrouge-master/setup.py | from setuptools import setup
import os
from pyrouge.utils.file_utils import list_files
data_files = list_files('pyrouge/tests/data')
data_files = [p.replace('pyrouge/tests/', '') for p in data_files]
script_files = [os.path.join('bin', s) for s in os.listdir('bin')]
setup(
name='pyrouge',
version='0.1.3',
... | 1,170 | 33.441176 | 73 | py |
pyrouge | pyrouge-master/pyrouge/Rouge155.py | from __future__ import print_function, unicode_literals, division
import os
import re
import codecs
import platform
from subprocess import check_output
from tempfile import mkdtemp
from functools import partial
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigPars... | 22,251 | 35.359477 | 79 | py |
pyrouge | pyrouge-master/pyrouge/__init__.py | from pyrouge.Rouge155 import Rouge155
| 38 | 18.5 | 37 | py |
pyrouge | pyrouge-master/pyrouge/test.py | import unittest
from pyrouge.tests.Rouge155_test import PyrougeTest
loader = unittest.TestLoader()
suite = unittest.TestSuite()
suite.addTest(loader.loadTestsFromTestCase(PyrougeTest))
unittest.TextTestRunner().run(suite)
| 224 | 24 | 56 | py |
pyrouge | pyrouge-master/pyrouge/tests/Rouge155_test.py | from __future__ import print_function, unicode_literals, division
import unittest
import os
import re
from subprocess import check_output
from tempfile import mkdtemp
from pyrouge import Rouge155
from pyrouge.utils.file_utils import str_from_file, xml_equal
module_path = os.path.dirname(__file__)
os.chdir(module_p... | 9,629 | 40.508621 | 77 | py |
pyrouge | pyrouge-master/pyrouge/tests/__init__.py | 0 | 0 | 0 | py | |
pyrouge | pyrouge-master/pyrouge/tests/__main__.py | import unittest
import pyrouge.test
from pyrouge.test.Rouge155_test import PyrougeTest
loader = unittest.TestLoader()
suite = unittest.TestSuite()
suite.addTest(loader.loadTestsFromTestCase(PyrougeTest))
unittest.TextTestRunner().run(suite)
| 243 | 23.4 | 56 | py |
pyrouge | pyrouge-master/pyrouge/tests/data/spl_test_doc.html | <html>
<head>
<title>D00000.M.100.A.C</title>
</head>
<body bgcolor="white">
<a name="1">[1]</a> <a href="#1" id=1>BritishCCC authoritiesCCC arrestedCCC GeneralCCC AugustoCCC PinochetCCC inCCC LondonCCC forCCC backCCC surgeryCCC onCCC anCCC internationalCCC warrantCCC</a>
<a name="2">[2]</a> <a href="#2" id=2>issuedCCC... | 1,503 | 78.157895 | 195 | html |
pyrouge | pyrouge-master/pyrouge/tests/data/SL2003_models_plain_text/SL.P.10.R.A.SL062003-01.html | Poor nations demand trade subsidies from developed nations. | 59 | 59 | 59 | html |
pyrouge | pyrouge-master/pyrouge/tests/data/SL2003_models_plain_text/SL.P.10.R.A.SL062003-02.html | Indonesia charges Imam Samudra and Amrozi with Bali bombing. | 60 | 60 | 60 | html |