hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
626142335172a7b6362c2157d7ee696366914047 | 1,840 | py | Python | myapp/general/neals_funnel.py | rnagumo/numpyro_example | 04820753586658e621c6537ee63a29274f8f427e | [
"MIT"
] | null | null | null | myapp/general/neals_funnel.py | rnagumo/numpyro_example | 04820753586658e621c6537ee63a29274f8f427e | [
"MIT"
] | null | null | null | myapp/general/neals_funnel.py | rnagumo/numpyro_example | 04820753586658e621c6537ee63a29274f8f427e | [
"MIT"
] | null | null | null | """Example: Neal’s Funnel
http://num.pyro.ai/en/latest/examples/funnel.html
"""
import pathlib
from typing import Callable, Dict
import jax.numpy as jnp
import matplotlib.pyplot as plt
import numpy as np
import numpyro
import numpyro.distributions as dist
from jax import random
from numpyro import handlers, infer
fr... | 23.896104 | 90 | 0.683152 |
62617098811016b39b7c7607192b47795485fe34 | 12,313 | py | Python | tinc/parameter_space_tools.py | AlloSphere-Research-Group/tinc-python | 4c3390df9911a391833244de1eb1d33a2e19d330 | [
"BSD-3-Clause"
] | 1 | 2020-11-23T22:42:50.000Z | 2020-11-23T22:42:50.000Z | tinc/parameter_space_tools.py | AlloSphere-Research-Group/tinc-python | 4c3390df9911a391833244de1eb1d33a2e19d330 | [
"BSD-3-Clause"
] | null | null | null | tinc/parameter_space_tools.py | AlloSphere-Research-Group/tinc-python | 4c3390df9911a391833244de1eb1d33a2e19d330 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 4 17:13:15 2021
@author: Andres
"""
import os
import numpy as np
import glob
import itertools
from .parameter import *
from .parameter_space import *
from .datapool import *
def extract_parameter_space_data(data_dir, config_file,
parameter_start_key, para... | 39.088889 | 146 | 0.641436 |
626191339ad5e4fa2474b986bafc8013f97b5302 | 2,203 | py | Python | tests/tools/bellman/eval/evaluation_utils.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 40 | 2021-03-24T10:41:56.000Z | 2022-03-15T09:50:47.000Z | tests/tools/bellman/eval/evaluation_utils.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 12 | 2021-03-25T18:36:27.000Z | 2021-07-27T11:09:34.000Z | tests/tools/bellman/eval/evaluation_utils.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 3 | 2021-04-25T03:18:44.000Z | 2021-11-14T15:54:34.000Z | # Copyright 2021 The Bellman Contributors
#
# 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... | 34.968254 | 94 | 0.756695 |
6261a0e3766b9418ad28852c9567086c8ef29dec | 6,536 | py | Python | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/checker.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/checker.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/checker.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import re
from colle... | 35.521739 | 98 | 0.715269 |
6261bd8ca13bb27bda52cd8046f1d83f0dbae56d | 10,748 | py | Python | api/tests/test_user.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | api/tests/test_user.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | api/tests/test_user.py | cjmash/art-backend | fb1dfd69cca9cda1d8714bd7066c3920d1a97312 | [
"MIT"
] | null | null | null | from unittest.mock import patch
from django.contrib.auth import get_user_model
from rest_framework.test import APIClient
from api.tests import APIBaseTestCase
User = get_user_model()
client = APIClient()
class UserTestCase(APIBaseTestCase):
def setUp(self):
super(UserTestCase, self).setUp()
self.... | 41.180077 | 79 | 0.642538 |
6261daa963add591c0366cb75a5523afddfbee2f | 107 | py | Python | prom/cli/__init__.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | null | null | null | prom/cli/__init__.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | null | null | null | prom/cli/__init__.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, division, print_function, absolute_import
| 35.666667 | 82 | 0.775701 |
6261df7c18f0284ec4d4d607db11461f360acc7e | 4,355 | py | Python | tests/common/test_run/ascend/mean_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/mean_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/mean_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# 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 agre... | 41.084906 | 140 | 0.678071 |
626217f8d0a169ead30c1626af591ddf97271d7c | 2,445 | py | Python | selsum/interfaces/posterior_interface.py | abrazinskas/SelSum | 6ed0e282cf854db7095196732e62ef8662c0daa6 | [
"MIT"
] | 34 | 2021-09-10T17:10:10.000Z | 2022-03-28T05:12:07.000Z | selsum/interfaces/posterior_interface.py | abrazinskas/SelSum | 6ed0e282cf854db7095196732e62ef8662c0daa6 | [
"MIT"
] | null | null | null | selsum/interfaces/posterior_interface.py | abrazinskas/SelSum | 6ed0e282cf854db7095196732e62ef8662c0daa6 | [
"MIT"
] | 3 | 2021-11-20T08:21:19.000Z | 2022-03-28T05:12:14.000Z | import logging
import torch as T
from fairseq.data import encoders
from selsum.utils.posterior_generator import PosteriorGenerator
from selsum.utils.helpers.collators import collate_features
from selsum.utils.helpers.subsampling import sample_from_q
from fairseq.utils import apply_to_sample
from selsum.utils.constants.... | 37.045455 | 81 | 0.673211 |
626267acd54c65c45b39d01df75b6ad62448ce7f | 1,268 | py | Python | tests/test_logging.py | chuangfengwang/jina-commons | 1cee9eccf0e6c999ed418ddf0f6e4ac517846faf | [
"Apache-2.0"
] | 5 | 2021-07-27T21:36:10.000Z | 2022-03-15T02:28:39.000Z | tests/test_logging.py | chuangfengwang/jina-commons | 1cee9eccf0e6c999ed418ddf0f6e4ac517846faf | [
"Apache-2.0"
] | 10 | 2021-06-28T15:19:29.000Z | 2022-01-18T13:06:29.000Z | tests/test_logging.py | chuangfengwang/jina-commons | 1cee9eccf0e6c999ed418ddf0f6e4ac517846faf | [
"Apache-2.0"
] | 5 | 2021-08-15T05:51:38.000Z | 2021-09-12T07:20:14.000Z | # Test suite for the logging.py module
import os
import pytest
from jina import DocumentArray, Document
from jina_commons.logging import add_request_logger
class MockLogger:
def __init__(self):
self.logs = []
def debug(self, msg: str):
self.logs.append(msg)
@pytest.fixture
def document_ar... | 21.491525 | 76 | 0.65142 |
62628a997e71a073b57221c2fbd7f5dd01feae4b | 26,071 | py | Python | src/candle.py | iamsoroush/cryptosignal | 4f3f595cd6d672d88c36ae54b7c99cc1f9ec3431 | [
"MIT"
] | 8 | 2021-03-23T15:38:26.000Z | 2022-01-07T21:08:01.000Z | src/candle.py | iamsoroush/cryptosignal | 4f3f595cd6d672d88c36ae54b7c99cc1f9ec3431 | [
"MIT"
] | null | null | null | src/candle.py | iamsoroush/cryptosignal | 4f3f595cd6d672d88c36ae54b7c99cc1f9ec3431 | [
"MIT"
] | null | null | null | import datetime
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.metrics import pairwise_distances
import talib
from src import PROFIT_INTERVALS, N_DERIVATIVES, N_NEAREST_NEIGHBORS
class CandleProcessor:
"""Candle Processing class.
public methods:
... | 47.230072 | 120 | 0.546354 |
6262bf0175e9da4a6de6fe13c0df736425acfacf | 2,900 | py | Python | websockets/http.py | Ivoz/websockets | 481986fd209c5d0667195390b5f1f56f2ee899a7 | [
"BSD-3-Clause"
] | null | null | null | websockets/http.py | Ivoz/websockets | 481986fd209c5d0667195390b5f1f56f2ee899a7 | [
"BSD-3-Clause"
] | null | null | null | websockets/http.py | Ivoz/websockets | 481986fd209c5d0667195390b5f1f56f2ee899a7 | [
"BSD-3-Clause"
] | null | null | null | """
The :mod:`websockets.http` module provides HTTP parsing functions. They're
merely adequate for the WebSocket handshake messages. They're used by the
sample client and servers.
These functions cannot be imported from :mod:`websockets`; they must be
imported from :mod:`websockets.http`.
"""
__all__ = ['read_request... | 27.619048 | 78 | 0.675862 |
6262f42c4b2c36e213bd72b259763fbe532b5ac2 | 13,096 | py | Python | myenv/lib/python3.7/site-packages/google/protobuf/compiler/plugin_pb2.py | theCydonian/AudioEyes | 3dece4529b31e6c63771c4358457962999bda3b4 | [
"MIT"
] | 4,768 | 2015-01-08T04:45:33.000Z | 2022-03-28T07:32:59.000Z | myenv/lib/python3.7/site-packages/google/protobuf/compiler/plugin_pb2.py | theCydonian/AudioEyes | 3dece4529b31e6c63771c4358457962999bda3b4 | [
"MIT"
] | 2,599 | 2015-01-06T21:51:28.000Z | 2022-03-30T12:40:09.000Z | venv/Lib/site-packages/google/protobuf/compiler/plugin_pb2.py | Ammar-Raneez/Craigslist_Scraper | 4d8ef7d65f6cb4bbc7a461828ab02ec9e3006f71 | [
"MIT"
] | 878 | 2015-01-10T00:03:30.000Z | 2022-03-31T22:54:15.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/compiler/plugin.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symb... | 44.544218 | 1,179 | 0.77077 |
6262ff51293d332a3954970ec0c674b8013b2d16 | 921 | py | Python | script/killer.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 2 | 2020-08-01T18:19:05.000Z | 2021-06-30T06:37:23.000Z | script/killer.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | null | null | null | script/killer.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 5 | 2018-11-24T16:29:39.000Z | 2021-12-10T03:07:07.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 15 10:49:19 2019
@author: matteo
"""
import argparse
import screenutils as su
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--name', help='First characters of screens to kill', type=s... | 25.583333 | 100 | 0.655809 |
626314375dcdf5053be099ddaca85ae8ea8e1214 | 16,148 | py | Python | DCNN-Pytorch/main_combined_predictor.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 11 | 2020-06-29T15:21:37.000Z | 2021-04-12T00:42:26.000Z | DCNN-Pytorch/main_combined_predictor.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | null | null | null | DCNN-Pytorch/main_combined_predictor.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 4 | 2019-01-23T23:36:57.000Z | 2021-07-02T00:18:37.000Z | import comet_ml
import torch
import torch.nn as NN
import torch.utils.data as data_utils
import data_loading.proto_datasets
from tqdm import tqdm as tqdm
import deepracing_models.nn_models.LossFunctions as loss_functions
import deepracing_models.nn_models.Models
import numpy as np
import torch.optim as optim
from tqdm ... | 50.779874 | 212 | 0.689931 |
626319ec394645d6e40880a2e541d9e9c11e1777 | 980 | py | Python | Info/compareWithBackground.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | 2 | 2021-02-12T20:36:29.000Z | 2021-11-03T08:04:01.000Z | Info/compareWithBackground.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | Info/compareWithBackground.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | # MenuTitle: Compare With Background
# -*- coding: utf-8 -*-
__doc__ = """
Compares the outline with the background/mask in the selected glyphs and opens a tab with any discrepancies.
"""
from collections import defaultdict
Glyphs.clearLog()
# Glyphs.showMacroWindow()
def make_node_to_tuple(n):
return (n.x, n.y... | 23.902439 | 108 | 0.643878 |
6263426ff53331ac4ee43d74517941dc2158682c | 1,867 | py | Python | app_sharkdata_base/views.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | app_sharkdata_base/views.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | app_sharkdata_base/views.py | markusSMHI/sharkdata_py3 | 129a250e1729cfef10994f0778d1243a05f9cf8a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Copyright (c) 2013-present SMHI, Swedish Meteorological and Hydrological Institute
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
imp... | 38.102041 | 136 | 0.664703 |
62634cbb3f4d1e5157e5e2c8b0c5b0c47135d595 | 6,322 | py | Python | openstack_dashboard/api/cinder.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/cinder.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/cinder.py | Juniper/horizon | aa0b50beb4f68289cad4193f699156a77b2a0aa3 | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 OpenStack Foundation
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business unit... | 33.273684 | 79 | 0.716704 |
62634e8e17652e1adf412595334f59de15852d09 | 19,901 | py | Python | oscar/apps/basket/views.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | 1 | 2015-08-02T05:36:11.000Z | 2015-08-02T05:36:11.000Z | oscar/apps/basket/views.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/basket/views.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | import json
from django.contrib import messages
from django.template.loader import render_to_string
from django.template import RequestContext
from django.core.urlresolvers import reverse, resolve
from django.db.models import get_model
from django.http import HttpResponseRedirect, Http404, HttpResponse
from django.vie... | 38.642718 | 79 | 0.613185 |
626384641ad0fd60c3cbedcce06b339f5cedc561 | 21,504 | py | Python | pydent/models/inventory.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 5 | 2019-01-21T11:12:05.000Z | 2020-03-05T20:52:14.000Z | pydent/models/inventory.py | aquariumbio/pydent | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 28 | 2020-11-18T02:07:09.000Z | 2021-06-08T15:49:41.000Z | pydent/models/inventory.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 2 | 2021-02-27T19:23:45.000Z | 2021-09-14T10:29:07.000Z | """Models related to inventory, like Items, Collections, ObjectTypes, and
PartAssociations."""
from abc import abstractmethod
from typing import Any
from typing import Dict
from typing import List
from typing import Tuple
from typing import Union
from .data_associations import DataAssociation
from .sample import Sampl... | 31.21045 | 101 | 0.60519 |
62639444ccf3a6dd37e29c125a2831ce11611996 | 766 | py | Python | setup.py | perciplex/gym-raas | 41021e4ebf8efbd6ca8f96434313916c9252544f | [
"MIT"
] | 1 | 2019-10-20T18:48:02.000Z | 2019-10-20T18:48:02.000Z | setup.py | perciplex/raas-envs | 41021e4ebf8efbd6ca8f96434313916c9252544f | [
"MIT"
] | 4 | 2019-10-20T22:03:34.000Z | 2020-08-13T02:00:00.000Z | setup.py | perciplex/gym-raas | 41021e4ebf8efbd6ca8f96434313916c9252544f | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
# What license are we?
setuptools.setup(
name="gym_raas",
version="0.0.1",
author="Max King, Benjamin Wiener, Declan Oller, Philip Zucker",
author_email="team@perciplex.com",
description="Custom OpenAI gym enviro... | 30.64 | 77 | 0.67624 |
62639fc157509ff737d97c9c7e0a89d038131260 | 4,818 | py | Python | tests/unit/testplan/testing/multitest/test_suite.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | null | null | null | tests/unit/testplan/testing/multitest/test_suite.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | 64 | 2019-04-15T20:56:40.000Z | 2021-03-23T01:00:30.000Z | tests/unit/testplan/testing/multitest/test_suite.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | null | null | null | """TODO."""
import re
import pytest
from testplan.common.utils.exceptions import should_raise
from testplan.common.utils.interface import MethodSignatureMismatch
from testplan.common.utils.strings import format_description
from testplan.testing.multitest.suite import (
testcase, testsuite, skip_if, post_testcase... | 25.225131 | 78 | 0.620589 |
6263a84f4933bccaad743c6613fb3f3099d86b4c | 623 | py | Python | cv-lab11/task2.py | TroddenSpade/Computer-Vision-notes | 3d16b37a8ed577af821d9dae11864ee8e0b82c73 | [
"MIT"
] | 1 | 2021-08-31T18:57:26.000Z | 2021-08-31T18:57:26.000Z | cv-lab11/task2.py | TroddenSpade/Computer-Vision-notes | 3d16b37a8ed577af821d9dae11864ee8e0b82c73 | [
"MIT"
] | 1 | 2021-08-25T09:44:15.000Z | 2021-08-25T09:44:15.000Z | cv-lab11/task2.py | TroddenSpade/Computer-Vision-notes | 3d16b37a8ed577af821d9dae11864ee8e0b82c73 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
I = cv2.imread('sign.jpg')
p1 = (135,105)
p2 = (331,143)
p3 = (356,292)
p4 = (136,290)
points1 = np.array([p1,p2,p3,p4], dtype=np.float32)
n = 480
m = 320
output_size = (n,m)
points2 = np.array([
(0,0),
(n,0),
(n,m),
(0,m)
], dtype=np.float32)
H = cv2.getPerspectiveTr... | 16.394737 | 63 | 0.608347 |
6264067fc3785b3b91b36efeea388fb36a2f9188 | 4,466 | py | Python | alipay/aop/api/domain/SignActivityDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/SignActivityDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/SignActivityDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class SignActivityDTO(object):
def __init__(self):
self._activity_end_time = None
self._activity_entry_time = None
self._activity_id = None
self._activity_name = None
... | 34.091603 | 89 | 0.639498 |
62641cb9414c7b0f37632cccc354619680364268 | 3,347 | py | Python | tests/contextnet/test_contextnet.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 608 | 2020-10-15T16:11:23.000Z | 2022-03-28T21:23:55.000Z | tests/contextnet/test_contextnet.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 174 | 2020-10-15T16:14:27.000Z | 2022-03-28T11:48:56.000Z | tests/contextnet/test_contextnet.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 191 | 2020-10-16T01:24:15.000Z | 2022-03-28T10:30:55.000Z | # Copyright 2020 Huy Le Nguyen (@usimarit)
#
# 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 t... | 36.78022 | 108 | 0.757395 |
6264353bd1100b5400195dc3b9dc9da5de722b8c | 34,233 | py | Python | autotest/osr/osr_proj4.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2015-04-21T19:52:03.000Z | 2015-04-21T19:52:03.000Z | autotest/osr/osr_proj4.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2016-04-04T09:14:19.000Z | 2016-04-14T19:17:10.000Z | autotest/osr/osr_proj4.py | pramsey/gdal | 965421b79fe4d3332b0f2f633b072fdcab2b700a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test some PROJ.4 specific translation issues.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
###########################################... | 33.660767 | 320 | 0.550463 |
62644b3af4c8d5354daa16de4c211593226211fb | 288 | py | Python | waterbutler/providers/dropbox/settings.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | waterbutler/providers/dropbox/settings.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | waterbutler/providers/dropbox/settings.py | laurenrevere/waterbutler | 4f358d94376997cd9592b18b67d13a7482c7aa2a | [
"Apache-2.0"
] | null | null | null | try:
from waterbutler import settings
except ImportError:
settings = {}
config = settings.get('DROPBOX_PROVIDER_CONFIG', {})
BASE_URL = config.get('BASE_URL', 'https://api.dropbox.com/1/')
BASE_CONTENT_URL = config.get('BASE_CONTENT_URL', 'https://api-content.dropbox.com/1/')
| 26.181818 | 87 | 0.722222 |
626479c978a12ab0814b9ddce1934cc5f5097416 | 2,998 | py | Python | experiments/ashvin/gcirl/airl/gail1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/gcirl/airl/gail1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/gcirl/airl/gail1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.launchers.arglauncher import run_variants
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.experiments.goal_distribution.irl_launcher import (
irl_experiment,
process_args
)
from rlkit.launchers.launcher_util import run_experiment
from multiworld.envs.pygame import PickAndPlaceEnv
from ... | 28.552381 | 72 | 0.585057 |
6264ce6f9eeb33e8525617410356304d3d37e82f | 19,257 | py | Python | mitmproxy/optmanager.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/optmanager.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/optmanager.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | import contextlib
import copy
from collections.abc import Sequence
from dataclasses import dataclass
import functools
import os
import pprint
import textwrap
from typing import Any, Optional, TextIO, Union
import blinker
import blinker._saferef
import ruamel.yaml
from mitmproxy import exceptions
from mitmproxy.utils ... | 32.095 | 105 | 0.558602 |
6264e7b37b13d0a72df217f058a36423ad7ffed6 | 13,016 | py | Python | st2api/st2api/controllers/v1/actionexecutions.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2api/st2api/controllers/v1/actionexecutions.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2api/st2api/controllers/v1/actionexecutions.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 36.155556 | 99 | 0.677704 |
626506e1657e452fe26ef52540bb2bc0637fa0b3 | 894 | py | Python | tests/grammar/appendix_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 26 | 2016-06-04T20:48:09.000Z | 2021-07-28T18:13:30.000Z | tests/grammar/appendix_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 146 | 2016-04-06T19:07:54.000Z | 2022-01-02T20:09:53.000Z | tests/grammar/appendix_tests.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 28 | 2016-04-09T20:40:48.000Z | 2021-05-08T17:52:59.000Z | from regparser.grammar import appendix
def test_par():
match = appendix.headers.parseString("3(c)(4) Pandas")
assert match.section == '3'
assert match.p1 == 'c'
assert match.p2 == '4'
def test_section():
match = appendix.headers.parseString("Section 105.11")
assert match.part == '105'
as... | 25.542857 | 66 | 0.637584 |
6265080575b090308573d6e41874a28836b9893d | 416 | py | Python | iris_sdk/models/data/telephone_number.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/data/telephone_number.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/data/telephone_number.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.base_resource import BaseData
from iris_sdk.models.maps.telephone_number import TelephoneNumberMap
class TelephoneNumberData(TelephoneNumberMap, BaseData):
@property
def last_modified_date(self):
return self.last_modified
@last_modified_date.setter
d... | 32 | 68 | 0.793269 |
62651b51179d66e066033c8a7a7f8e7f44db536d | 3,139 | py | Python | scripts/discretize.py | asrivast28/bn-utils | dc6ecc8912de91b3868a1968b2e90daea0c33c1f | [
"Apache-2.0"
] | 1 | 2021-08-09T01:33:35.000Z | 2021-08-09T01:33:35.000Z | scripts/discretize.py | asrivast28/bn-utils | dc6ecc8912de91b3868a1968b2e90daea0c33c1f | [
"Apache-2.0"
] | null | null | null | scripts/discretize.py | asrivast28/bn-utils | dc6ecc8912de91b3868a1968b2e90daea0c33c1f | [
"Apache-2.0"
] | 1 | 2021-08-12T14:34:31.000Z | 2021-08-12T14:34:31.000Z | #!/usr/bin/env python
##
# @file discretize.py
# @brief Script for discretizing continuous datasets.
# @author Ankit Srivastava <asrivast@gatech.edu>
#
# Copyright 2020 Georgia Institute of Technology
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance w... | 33.752688 | 113 | 0.69863 |
62652a228cab68d5e961817bfcd3c7e1ff1e9820 | 3,243 | py | Python | test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_reserved_words_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_reserved_words_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_reserved_words_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.424658 | 113 | 0.695961 |
6265534fc5595cb7000417dfa627674035e27172 | 6,708 | py | Python | tests/conftest.py | cehbrecht/clisops | 7d80bcbc21ee8a6248f88bb590a1fed33a060bfd | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | cehbrecht/clisops | 7d80bcbc21ee8a6248f88bb590a1fed33a060bfd | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | cehbrecht/clisops | 7d80bcbc21ee8a6248f88bb590a1fed33a060bfd | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
import numpy as np
import pandas as pd
import pytest
import xarray as xr
# from xclim.core.calendar import calendars
@pytest.fixture
def tmp_netcdf_filename(tmpdir):
return Path(tmpdir).joinpath("testfile.nc")
@pytest.fixture
def tas_series():
def _tas_series(values, start="7/1/20... | 26.832 | 87 | 0.533095 |
62655353812075fdc70a2bb65b7d8ec0830071ee | 16,210 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/aio/operations/_encryption_scopes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/aio/operations/_encryption_scopes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_01_01/aio/operations/_encryption_scopes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.38806 | 211 | 0.689513 |
626583ecd958b787690521a946c980d94f8f3d7d | 90 | py | Python | pydemic/properties/__init__.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 3 | 2020-05-10T23:52:41.000Z | 2021-08-31T14:38:24.000Z | pydemic/properties/__init__.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-09-27T03:26:51.000Z | 2022-03-30T12:18:08.000Z | pydemic/properties/__init__.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-10-01T04:07:39.000Z | 2020-10-01T04:07:39.000Z | from .base import Property
from .decorators import function_as_method, method_as_function
| 30 | 62 | 0.866667 |
6265cb90a4133bebc9a50d7b04a9dbf02a125e2e | 1,145 | py | Python | porcupine/plugins/keybindings.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | 65 | 2017-05-23T00:23:07.000Z | 2022-03-17T21:07:12.000Z | porcupine/plugins/keybindings.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | 689 | 2017-03-17T15:42:04.000Z | 2022-03-29T19:43:40.000Z | porcupine/plugins/keybindings.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | 28 | 2017-03-13T19:41:34.000Z | 2022-01-29T00:47:29.000Z | """Run keybindings.tcl and default_keybindings.tcl when Porcupine starts."""
import tkinter
from pathlib import Path
from porcupine import dirs, get_main_window, menubar
def setup() -> None:
porcupine_dir = Path(__file__).absolute().parent.parent
default_path = porcupine_dir / "default_keybindings.tcl"
... | 33.676471 | 88 | 0.700437 |
6265ce96b05f6c707c231541a7809e6f79b561e0 | 2,625 | py | Python | src/build/make.py | ta-assistant/Admin-CLI | 1c03ede0e09d8ddc270646937aa7af463c55f1f5 | [
"MIT"
] | 1 | 2021-07-22T15:43:02.000Z | 2021-07-22T15:43:02.000Z | src/build/make.py | ta-assistant/Admin-CLI | 1c03ede0e09d8ddc270646937aa7af463c55f1f5 | [
"MIT"
] | 28 | 2021-05-15T08:18:21.000Z | 2021-08-02T06:12:30.000Z | src/build/make.py | ta-assistant/TA-CLI | 1c03ede0e09d8ddc270646937aa7af463c55f1f5 | [
"MIT"
] | null | null | null | from lib.function_network.func_network import CallApi
from lib.file_management.configeditor import ConfigEditor
from lib.file_management.file_management_lib import DirManagement
from lib.file_management.createapikeyfile import SaveApiKey
from lib.cli_displayed.dis_cli import display_typo
import os
import sys
import ins... | 30.523256 | 141 | 0.689905 |
6265d6c5319ab256906c0c1fdd62542c48f0a668 | 1,399 | py | Python | tests/test_flask/test_ext.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 86 | 2017-08-17T12:41:52.000Z | 2022-02-24T12:17:47.000Z | tests/test_flask/test_ext.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 10 | 2020-03-30T03:24:46.000Z | 2022-02-23T01:34:53.000Z | tests/test_flask/test_ext.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 7 | 2017-08-18T03:40:35.000Z | 2020-05-19T04:09:10.000Z | # !/usr/local/python/bin/python
# -*- coding: utf-8 -*-
# (C) Wu Dong, 2020
# All rights reserved
# @Author: 'Wu Dong <wudong@eastwu.cn>'
# @Time: '2020-05-12 17:40'
import json
from flask import make_response, Flask
from pre_request import pre, Rule
app = Flask(__name__)
app.config["TESTING"] = True
def json_resp(... | 24.54386 | 115 | 0.616154 |
6265ee03616c3f5bc41ed4d2a36e42291e2fe55b | 458 | py | Python | core/apps/lessons/urls.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | core/apps/lessons/urls.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | core/apps/lessons/urls.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | from django.urls import path
from apps.lessons import views
def repath_func(request):
from django.http import HttpResponseRedirect
return HttpResponseRedirect(request.path_info)
urlpatterns = [
path('add/', views.LessonAdd ,name='LessonAdd'),
path('lessons/add/', views.LessonClassList... | 25.444444 | 92 | 0.71179 |
6265fd21275c6755c383da9707dcbd80cf5cb529 | 348 | py | Python | src/materials/garcia_data.py | spasmann/1DQMC | f56483428f03c63d06c16b7fd7f56231296dd940 | [
"MIT"
] | null | null | null | src/materials/garcia_data.py | spasmann/1DQMC | f56483428f03c63d06c16b7fd7f56231296dd940 | [
"MIT"
] | null | null | null | src/materials/garcia_data.py | spasmann/1DQMC | f56483428f03c63d06c16b7fd7f56231296dd940 | [
"MIT"
] | 1 | 2022-01-25T18:09:23.000Z | 2022-01-25T18:09:23.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 4 14:44:55 2022
@author: sampasmann
"""
import numpy as np
def garcia_data(mesh, Nx=1000):
G = 1
c = 1.0
sigt = np.ones((Nx, G))
sigs = np.exp(-mesh.midpoints/c)
sigs = np.reshape(sigs, (Nx,G,G))
siga = sigt - sigs
... | 18.315789 | 37 | 0.574713 |
626638948b9f4ec5d9f21c6b8935607f79034456 | 3,582 | py | Python | molecules/janusGraftedSphere.py | martintb/typyCreator | ba8ad4c30322caa197714fdaac1a4388ad48b91d | [
"MIT"
] | null | null | null | molecules/janusGraftedSphere.py | martintb/typyCreator | ba8ad4c30322caa197714fdaac1a4388ad48b91d | [
"MIT"
] | null | null | null | molecules/janusGraftedSphere.py | martintb/typyCreator | ba8ad4c30322caa197714fdaac1a4388ad48b91d | [
"MIT"
] | null | null | null | from molecule import molecule
from typyCreator.util import sphereVol
import numpy as np
from chain import chain
#class factory is used to make invocation a bit more intuitive
def create(*args,**kwargs):
return janusGaftedSphere(*args,**kwargs)
class janusGraftedSphere(molecule):
def __init__(self, diameter=4, gra... | 33.476636 | 96 | 0.660246 |
626649cff85da14156bcb862df96561fff09e664 | 4,696 | py | Python | plugins/freebox/freebox.py | lrobinot/collector | a491b1a3a5e68ca68a40dab4de612f9bfee94956 | [
"MIT"
] | null | null | null | plugins/freebox/freebox.py | lrobinot/collector | a491b1a3a5e68ca68a40dab4de612f9bfee94956 | [
"MIT"
] | null | null | null | plugins/freebox/freebox.py | lrobinot/collector | a491b1a3a5e68ca68a40dab4de612f9bfee94956 | [
"MIT"
] | null | null | null | import hmac
import hashlib
import json
import logging
import plugin
import requests
import schedule
import socket
import tempfile
import time
class FreeboxException(Exception):
pass
class Freebox(plugin.Plugin):
def __init__(self):
super().__init__()
self.active = True
self.name = 'f... | 35.575758 | 122 | 0.548126 |
626663288f0c0b5ccee61d2e32a25a2d216c4664 | 7,756 | py | Python | src/python/pants/init/extension_loader.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | src/python/pants/init/extension_loader.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | src/python/pants/init/extension_loader.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import importlib
import traceback
from pkg_resources import Requirement
from twitter.common.collections import OrderedSet
from pants.base.exceptions import BackendConfigurationError
from... | 44.574713 | 102 | 0.712481 |
6266706644dccb84077edb90400eaaae6c48ff52 | 9,555 | py | Python | tests/test_arche.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 52 | 2019-03-18T21:12:59.000Z | 2022-01-24T05:49:23.000Z | tests/test_arche.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 173 | 2019-03-18T15:50:14.000Z | 2019-12-09T18:03:07.000Z | tests/test_arche.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 21 | 2019-03-20T17:14:22.000Z | 2022-01-30T18:33:22.000Z | from typing import Dict, List
from arche import arche, SH_URL
from arche.arche import Arche
from arche.rules.result import *
from conftest import create_result, get_report_from_iframe
import pandas as pd
import pytest
def test_target_equals_source():
with pytest.raises(ValueError) as excinfo:
Arche(sourc... | 32.610922 | 90 | 0.680272 |
626676af73a6a0686bd1428adbdec956e687515c | 7,269 | py | Python | greenguard/pipeline.py | blitz95/GreenGuard | e17d8a43766d4e76743806e295587a1af1cd98f5 | [
"MIT"
] | null | null | null | greenguard/pipeline.py | blitz95/GreenGuard | e17d8a43766d4e76743806e295587a1af1cd98f5 | [
"MIT"
] | null | null | null | greenguard/pipeline.py | blitz95/GreenGuard | e17d8a43766d4e76743806e295587a1af1cd98f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import logging
import os
from collections import defaultdict
import cloudpickle
import numpy as np
from btb import HyperParameter
from btb.tuning import GP
from mlblocks import MLPipeline
from sklearn.exceptions import NotFittedError
from sklearn.metrics import accuracy_score, mean... | 31.467532 | 93 | 0.61549 |
626679633942f440e390f2053b57f5fa3f017513 | 838 | py | Python | tests/core/test_GenesisBlock.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | 1 | 2020-07-11T15:32:52.000Z | 2020-07-11T15:32:52.000Z | tests/core/test_GenesisBlock.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | null | null | null | tests/core/test_GenesisBlock.py | som-dev/QRL | 4d335d0c65c4f9bfad21e3ae918a249eff64b047 | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from unittest import TestCase
from qrl.core import config
from qrl.core.misc import logger
from qrl.core.GenesisBlock import GenesisBlock
from tests.misc.helper import... | 32.230769 | 84 | 0.72673 |
626682ec38d161265394763b236918db87fca589 | 15,225 | py | Python | seq_graph_retro/models/trainer.py | vsomnath/graphretro | 2a88730da980be59541780e790cdb0fbdc581828 | [
"MIT"
] | 5 | 2022-02-21T08:26:15.000Z | 2022-03-31T12:05:47.000Z | seq_graph_retro/models/trainer.py | vsomnath/graphretro | 2a88730da980be59541780e790cdb0fbdc581828 | [
"MIT"
] | null | null | null | seq_graph_retro/models/trainer.py | vsomnath/graphretro | 2a88730da980be59541780e790cdb0fbdc581828 | [
"MIT"
] | 2 | 2022-03-11T15:33:33.000Z | 2022-03-23T06:28:07.000Z | import torch
import torch.nn as nn
import numpy as np
import os
from typing import List, Dict, Tuple, Optional
import sys
import wandb
from torch.utils.tensorboard.writer import SummaryWriter
from torch.utils.data import DataLoader
import torch.optim.lr_scheduler as lr_scheduler
from seq_graph_retro.utils.torch import... | 38.642132 | 149 | 0.543186 |
626688c25af25dca92748ad4ec5deffdc6f8c46a | 1,771 | py | Python | src/rubrix/sdk/models/dataset_tags.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/dataset_tags.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/dataset_tags.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. 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 ... | 29.516667 | 77 | 0.681536 |
6266cff83c4a29e663f42625b51462011620ef61 | 7,134 | py | Python | franka_tut_reasoning/src/franka_tut_reasoning/planner.py | Zorrander/cogrob-tut-hri | 1f81fe58c4c7d7b65b4e46324615b30715e4ddbd | [
"BSD-3-Clause"
] | 2 | 2019-07-19T06:35:30.000Z | 2020-11-23T07:11:23.000Z | franka_tut_reasoning/src/franka_tut_reasoning/planner.py | Zorrander/cogrob-tut-hri | 1f81fe58c4c7d7b65b4e46324615b30715e4ddbd | [
"BSD-3-Clause"
] | null | null | null | franka_tut_reasoning/src/franka_tut_reasoning/planner.py | Zorrander/cogrob-tut-hri | 1f81fe58c4c7d7b65b4e46324615b30715e4ddbd | [
"BSD-3-Clause"
] | 2 | 2018-05-10T09:29:06.000Z | 2018-08-17T13:12:12.000Z | #! /usr/bin/env python
import abc
import networkx as nx
import rospy
import matplotlib.pyplot as plt
MAP_STEP_ARG={
'CartesianMotion': 'location_target',
'GripperMotion': 'width_target',
'JointAction': 'angle_goal'
}
class Planner(object):
"""docstring for Planner."""
__metaclass__ ... | 35.492537 | 141 | 0.566302 |
6266d57f99e7d7120e1e3ad6d0ba82f942a25c75 | 248 | py | Python | tensorhive/core/monitors/MonitoringBehaviour.py | tomenet/TensorHive | 3c2a4cf2154a2c666eff6c5ab0eeba6fc1c91a34 | [
"Apache-2.0"
] | 1 | 2020-01-29T22:38:21.000Z | 2020-01-29T22:38:21.000Z | tensorhive/core/monitors/MonitoringBehaviour.py | tomenet/TensorHive | 3c2a4cf2154a2c666eff6c5ab0eeba6fc1c91a34 | [
"Apache-2.0"
] | null | null | null | tensorhive/core/monitors/MonitoringBehaviour.py | tomenet/TensorHive | 3c2a4cf2154a2c666eff6c5ab0eeba6fc1c91a34 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
class MonitoringBehaviour(ABC):
'''
Interface that needs to be implemented by concrete classes
(Strategy pattern)
'''
@abstractmethod
def update(self, connection) -> None:
pass
| 19.076923 | 62 | 0.673387 |
6266ebd5efecf01c15653ecc2e173b1eb6262306 | 3,715 | py | Python | SassifiParser/sassifi_parser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | SassifiParser/sassifi_parser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | SassifiParser/sassifi_parser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3.6
import pandas as pd
from sys import argv
#######################################################################
# Three injection modes
#######################################################################
RF_MODE = "rf"
INST_VALUE_MODE = "inst_value"
INST_ADDRESS_MODE = "inst_address"
##... | 26.535714 | 112 | 0.593809 |
6266f640ec593dc9417504b21d094aa5a1bae962 | 1,894 | py | Python | sigpy/utils.py | jadujoel/audio-compressor-python | ee37e61a6f03885c36576801121ca096e77940aa | [
"MIT"
] | 1 | 2021-09-17T06:27:59.000Z | 2021-09-17T06:27:59.000Z | sigpy/utils.py | jadujoel/audio-compressor-python | ee37e61a6f03885c36576801121ca096e77940aa | [
"MIT"
] | null | null | null | sigpy/utils.py | jadujoel/audio-compressor-python | ee37e61a6f03885c36576801121ca096e77940aa | [
"MIT"
] | null | null | null | import time
from functools import wraps
## For the other .pys ##
import asyncio
import sys, os, csv, time, json
import numpy as np
import subprocess as sp
import matplotlib
import matplotlib.pyplot as plt
############### GOOD TIMES ###############
PROF_DATA = {}
def profile(fn):
@wraps(fn)
def with_profilin... | 22.819277 | 79 | 0.591869 |
626705f3fbc75144246926167774e453dc95ac29 | 592 | py | Python | master/migrations/0012_auto_20201204_2049.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | null | null | null | master/migrations/0012_auto_20201204_2049.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | 3 | 2021-06-05T00:01:48.000Z | 2021-09-22T19:39:12.000Z | master/migrations/0012_auto_20201204_2049.py | henrylameck/school_management_system | 38c270977d001d28f2338eb90fffc3e8c2598d06 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-12-04 17:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('master', '0011_remove_school_website'),
]
operations = [
migrations.RemoveField(
model_name='school',
name='logo',
... | 21.925926 | 49 | 0.550676 |
626709e4b7710b4419329d653cdc49c87f43c50d | 1,442 | py | Python | repos/system_upgrade/el7toel8/actors/checkdosfstools/actor.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkdosfstools/actor.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkdosfstools/actor.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | from leapp.actors import Actor
from leapp.libraries.common.reporting import report_with_remediation
from leapp.libraries.common.rpms import has_package
from leapp.models import InstalledRedHatSignedRPM
from leapp.reporting import Report
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
class CheckDosfstools(Actor... | 46.516129 | 109 | 0.672677 |
62671faf6234f42f5e74babc2e259113f3dc5c77 | 2,039 | py | Python | cride/rides/migrations/0001_initial.py | AndresCendales/cride | 150c4fc5db3964cc2cd6498d605e007f10898153 | [
"MIT"
] | null | null | null | cride/rides/migrations/0001_initial.py | AndresCendales/cride | 150c4fc5db3964cc2cd6498d605e007f10898153 | [
"MIT"
] | null | null | null | cride/rides/migrations/0001_initial.py | AndresCendales/cride | 150c4fc5db3964cc2cd6498d605e007f10898153 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-10 20:17
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('circles', '0005_invitation'),
migrations.swappable_dependency(s... | 48.547619 | 164 | 0.632173 |
626738efbb2411f21e80ccad5dc62dc43a35a760 | 15,595 | py | Python | donkeycar/templates/cfg_complete.py | MonikaFJ/donkeycar | 1cf227027951da476865b3f69e26ea749a8c0eec | [
"MIT"
] | 1 | 2022-01-03T13:09:42.000Z | 2022-01-03T13:09:42.000Z | donkeycar/templates/cfg_complete.py | JAHOON-JOO/donkeycar | e545c09d314ede51303657ad6d4c931c85307d09 | [
"MIT"
] | null | null | null | donkeycar/templates/cfg_complete.py | JAHOON-JOO/donkeycar | e545c09d314ede51303657ad6d4c931c85307d09 | [
"MIT"
] | null | null | null | """
CAR CONFIG
This file is read by your car application's manage.py script to change the car
performance.
EXMAPLE
-----------
import dk
cfg = dk.load_config(config_path='~/mycar/config.py')
print(cfg.CAMERA_RESOLUTION)
"""
import os
#PATHS
CAR_PATH = PACKAGE_PATH = os.path.dirname(os.path.realpath(__file__))
DAT... | 55.498221 | 225 | 0.736839 |
626739ccee2b3378fbe64a780eaa1fbfb2b1846d | 152 | py | Python | pmaf/database/_helpers/__init__.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-07-02T06:24:17.000Z | 2021-07-02T06:24:17.000Z | pmaf/database/_helpers/__init__.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T12:02:46.000Z | 2021-06-28T12:02:46.000Z | pmaf/database/_helpers/__init__.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | null | null | null | from ._ott_maker import make_ott_taxonomy as ott_maker
from ._exporters import export_database_by_rid
__all__ = ['ott_maker', 'export_database_by_rid'] | 38 | 54 | 0.842105 |
62674a9c77fc410a551d2ac79c22ecf959b16fc3 | 4,871 | py | Python | tensorflow/python/keras/utils/io_utils.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/keras/utils/io_utils.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/keras/utils/io_utils.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # 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 applica... | 28.48538 | 80 | 0.641963 |
62675eda0babbf61397ff5a26b191efb1cdf2845 | 1,243 | py | Python | toontown/settings/ToontownSettings.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2022-01-06T23:51:18.000Z | 2022-01-06T23:51:18.000Z | toontown/settings/ToontownSettings.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/settings/ToontownSettings.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | DefaultSettings = {
'fullscreen': False,
'music': True,
'sfx': True,
'musicVol': 1.0,
'sfxVol': 1.0,
'loadDisplay': 'pandagl',
'toonChatSounds': True,
'newGui': False,
'show-disclaimer': True,
'fieldofview': 52,
'show-cog-levels': True,
'health-meter-mode': 2,
'experienceBarMode': True,
'smoothanimations': True,
'tpmsg... | 21.067797 | 45 | 0.568785 |
626785f0d62de0740382ec434a8f2c7f0a20824e | 3,723 | py | Python | python/osr/osr_epsg_test.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | null | null | null | python/osr/osr_epsg_test.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | 4 | 2017-01-25T18:11:31.000Z | 2017-04-04T20:51:45.000Z | python/osr/osr_epsg_test.py | schwehr/gdal-autotest2 | e153b594162f6554280212d919e645b0f01bf7e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014 Google Inc. 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 ... | 35.122642 | 78 | 0.724684 |
62679262eb2909449ef8d574baeff4f09f6bf126 | 2,409 | py | Python | reliabilly/tasks/chat.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2018-11-24T02:07:37.000Z | 2018-11-24T02:07:37.000Z | reliabilly/tasks/chat.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2019-01-23T07:12:30.000Z | 2019-01-23T07:12:30.000Z | reliabilly/tasks/chat.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2019-01-16T05:30:49.000Z | 2019-01-16T05:30:49.000Z | import os
from invoke import task
from reliabilly.components.chat.chat_client import ChatClient
from reliabilly.components.chat.message_builder import MessageBuilder
from reliabilly.components.tools.source_control_client import SourceControlClient
from reliabilly.settings import Constants
CHANNEL_NAME = '#slack-channe... | 39.491803 | 104 | 0.699045 |
6267c836887e6d32b7dedb131262da788109dad1 | 786 | py | Python | python/two_pointers/0283_move_zeroes.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/two_pointers/0283_move_zeroes.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/two_pointers/0283_move_zeroes.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class Solution:
def moveZeroes(self, nums):
"""
:type nums: List[int]
:rtype: void Do not return anything, modify nums in-place instead.
"""
length = len(nums)
for i in range(0, length - 1):
if nums[i] != 0:
continue
k = i
... | 21.833333 | 74 | 0.422392 |
6267cd9f53a5443fa0a221afbe5517fb870cf52c | 852 | py | Python | auth_token/contrib/is_core_auth/auth_security/resource.py | druids/django-token-authorization | bcd029e86d3edb49784bfa7e9329bcd1be4c511e | [
"BSD-3-Clause"
] | null | null | null | auth_token/contrib/is_core_auth/auth_security/resource.py | druids/django-token-authorization | bcd029e86d3edb49784bfa7e9329bcd1be4c511e | [
"BSD-3-Clause"
] | null | null | null | auth_token/contrib/is_core_auth/auth_security/resource.py | druids/django-token-authorization | bcd029e86d3edb49784bfa7e9329bcd1be4c511e | [
"BSD-3-Clause"
] | null | null | null | from auth_token.contrib.common.auth_security.validators import LOGIN_THROTTLING_VALIDATORS
from auth_token.contrib.is_core_auth.default.resource import AuthResource as DefaultAuthResource
from security.enums import InputRequestSlug
from security.decorators import throttling
from security.utils import update_logged_req... | 38.727273 | 98 | 0.811033 |
62682d6210fd16aa013aec03f125d0db7ca91db1 | 6,920 | py | Python | tests/integration/modules/useradd.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | tests/integration/modules/useradd.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | tests/integration/modules/useradd.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import string
import random
# Import Salt Testing libs
from salttesting import skipIf
from salttesting.helpers import (
destructiveTest,
ensure_in_syspath,
requires_system_grains
)
ensure_in_syspath('../../')
# ... | 33.269231 | 86 | 0.597254 |
62683957ba17f614c93cb1f792387a6292602dab | 1,381 | py | Python | scripts/getEssentialGenesData.py | CGATOxford/proj029 | f0a8ea63b4f086e673aa3bf8b7d3b9749261b525 | [
"BSD-3-Clause"
] | 3 | 2016-04-04T22:54:14.000Z | 2017-04-01T09:37:54.000Z | scripts/getEssentialGenesData.py | CGATOxford/proj029 | f0a8ea63b4f086e673aa3bf8b7d3b9749261b525 | [
"BSD-3-Clause"
] | null | null | null | scripts/getEssentialGenesData.py | CGATOxford/proj029 | f0a8ea63b4f086e673aa3bf8b7d3b9749261b525 | [
"BSD-3-Clause"
] | null | null | null | import os, sys
import sqlite3
import gzip
database = sys.argv[1]
dbh = sqlite3.connect(database)
cc = dbh.cursor()
######################
# essential genes data
######################
sys.stdout.write("contig\torf\thmm_id\tlength\tgc\tcontrol_cov\thh_cov\ttaxa\n")
statement = """select length.scaffold_name
... | 39.457143 | 92 | 0.622737 |
6268493b5c82d2f7f05ed2ab0c69c464439212b0 | 6,498 | py | Python | sss/cli/plugins/info.py | harshiljethava/TestingSimpleSetupServer | 279b80941c96a85e9a09a11f11bc51855bb25557 | [
"MIT"
] | null | null | null | sss/cli/plugins/info.py | harshiljethava/TestingSimpleSetupServer | 279b80941c96a85e9a09a11f11bc51855bb25557 | [
"MIT"
] | null | null | null | sss/cli/plugins/info.py | harshiljethava/TestingSimpleSetupServer | 279b80941c96a85e9a09a11f11bc51855bb25557 | [
"MIT"
] | null | null | null | """SSINFO Plugin for EasyEngine."""
from cement.core.controller import CementBaseController, expose
from cement.core import handler, hook
from sss.core.aptget import SSSAptGet
from sss.core.shellexec import SSSShellExec
from sss.core.logging import Log
import os
import configparser
def sss_info_hook(app):
# do s... | 43.905405 | 79 | 0.557402 |
626849da4fd350df5f31afe19639f9e2750e1866 | 471 | py | Python | m-solutions2019/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | m-solutions2019/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | m-solutions2019/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
def main():
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
S = ns()
win = 0
lose = 0
for i in range(len(S)):
if S[i] == 'o':
win += 1
... | 17.444444 | 57 | 0.477707 |
62685f285b55efaad20d5892fbc0957d50a03d69 | 5,206 | py | Python | backend/tests/requests/test_adequacy.py | bayesimpact/tds-frontend | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 15 | 2018-05-08T23:54:38.000Z | 2020-03-07T20:46:37.000Z | backend/tests/requests/test_adequacy.py | akegan/encompass | 85852a91c646c62e8cd05f9c2b0c7cf0079ea7f2 | [
"Apache-2.0"
] | 297 | 2018-02-05T19:04:26.000Z | 2022-02-12T07:52:37.000Z | backend/tests/requests/test_adequacy.py | bayesimpact/tds | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 6 | 2018-05-21T19:51:15.000Z | 2019-03-21T19:20:27.000Z | """Test adequacy requests for Time-Distance API."""
import json
from backend.app.exceptions.format import InvalidFormat
from backend.app.requests import adequacy
from backend.lib.database.postgres import connect
import flask
from flask_testing import LiveServerTestCase
import mock
import pytest
engine = connect.c... | 35.175676 | 90 | 0.626585 |
626881f310663d4d99e7519fa670450367448f67 | 2,484 | py | Python | scripts/contig_namer.py | sandragodinhosilva/FAW-snakemake | 43afdcbd46935e73ff5fe789b6790a338e78dbe7 | [
"MIT"
] | 1 | 2022-02-23T02:24:21.000Z | 2022-02-23T02:24:21.000Z | scripts/contig_namer.py | masun/MeLanGE | 1be16665c5ac416680e8e760021a25d7d85a0d67 | [
"MIT"
] | 1 | 2022-03-31T10:07:51.000Z | 2022-03-31T10:07:51.000Z | scripts/contig_namer.py | sandragodinhosilva/MeLanGE | 43afdcbd46935e73ff5fe789b6790a338e78dbe7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
###############################################################################
#### Script to shorten contig headers
#### Usage: python conting_name.py /path/to/file/
###############################################################################
impor... | 28.551724 | 96 | 0.478663 |
62689e7f981dfc4fe81ef1d2d64afb8a199fc6b2 | 1,469 | py | Python | web-scraping/get_github_data.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 1 | 2020-07-21T23:24:25.000Z | 2020-07-21T23:24:25.000Z | web-scraping/get_github_data.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 4 | 2021-06-29T00:38:57.000Z | 2022-01-15T00:22:15.000Z | web-scraping/get_github_data.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | null | null | null |
"""
Purpose: Scrape data (csv, txt, etc.) links from GitHub
Date created: 2020-02-07
Contributor(s):
Mark M.
"""
import re
import os.path
import urllib.request as ureq
import pandas as pd
#-- Extension to target
#-- Can create tuple if multiple extensions desired
FILE_EXTENSION = "csv"
#-- Example user and pa... | 28.803922 | 91 | 0.696392 |
6268b920bad05d2cd01e3cd68f5fd4f117b982bc | 287 | py | Python | carto/migrations/0002_delete_worldborder.py | MTES-MCT/sparte | 3b8ae6d21da81ca761d64ae9dfe2c8f54487211c | [
"MIT"
] | null | null | null | carto/migrations/0002_delete_worldborder.py | MTES-MCT/sparte | 3b8ae6d21da81ca761d64ae9dfe2c8f54487211c | [
"MIT"
] | 3 | 2022-02-10T11:47:58.000Z | 2022-02-23T18:50:24.000Z | carto/migrations/0002_delete_worldborder.py | MTES-MCT/sparte | 3b8ae6d21da81ca761d64ae9dfe2c8f54487211c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-09-23 23:43
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('carto', '0001_initial'),
]
operations = [
migrations.DeleteModel(
name='WorldBorder',
),
]
| 16.882353 | 47 | 0.592334 |
6268d5581cb84a97ebb6d355cc981b0e984109d0 | 470 | py | Python | alipay/aop/api/response/AlipayEcoCityservicePolymerSyncSendResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayEcoCityservicePolymerSyncSendResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayEcoCityservicePolymerSyncSendResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayEcoCityservicePolymerSyncSendResponse(AlipayResponse):
def __init__(self):
super(AlipayEcoCityservicePolymerSyncSendResponse, self).__init__()
def parse_response_... | 29.375 | 116 | 0.793617 |
6268ebe0d48cda6fce23caba54ddbec6f1875ed1 | 1,137 | py | Python | pipeline/wikidataExplore.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 7 | 2021-02-01T22:39:23.000Z | 2021-08-09T16:28:38.000Z | pipeline/wikidataExplore.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-05-17T13:14:40.000Z | 2021-05-20T10:26:09.000Z | pipeline/wikidataExplore.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-01-04T14:11:18.000Z | 2021-01-04T14:11:18.000Z | import SPARQLWrapper
import argparse
def runQuery(query):
endpoint = 'https://query.wikidata.org/sparql'
sparql = SPARQLWrapper.SPARQLWrapper(endpoint)
sparql.setQuery(query)
sparql.setReturnFormat(SPARQLWrapper.JSON)
results = sparql.query().convert()
return results['results']['bindings']
def main():
parser... | 32.485714 | 107 | 0.713281 |
62691043d1c239f439f0584e28b7645907e95f39 | 7,734 | py | Python | workflows/management/commands/export_package.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 4 | 2017-12-13T10:59:42.000Z | 2019-11-03T17:26:19.000Z | workflows/management/commands/export_package.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 21 | 2017-04-05T08:03:54.000Z | 2022-03-11T23:16:03.000Z | workflows/management/commands/export_package.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | null | null | null | from unicodedata import category
from django.core.management.base import BaseCommand, CommandError
from workflows.models import Category, AbstractWidget, AbstractInput, AbstractOutput, AbstractOption
from django.core import serializers
from optparse import make_option
import uuid
import os
import sys
from django.conf i... | 36.828571 | 157 | 0.623998 |
62692865a53e4eddaded02c5f47cef8a3a77316a | 5,438 | py | Python | secretmanager/api-client/snippets_test.py | aman-ebay/python-docs-samples | 3b2265e8a7d0a3859f55d299db379a047f5ea6b8 | [
"Apache-2.0"
] | 1 | 2020-12-07T18:57:14.000Z | 2020-12-07T18:57:14.000Z | secretmanager/api-client/snippets_test.py | iuztemur/python-docs-samples | 09bc50d610741d693c4e99e03854822b37a647ba | [
"Apache-2.0"
] | 1 | 2022-01-14T23:28:27.000Z | 2022-01-14T23:28:27.000Z | secretmanager/api-client/snippets_test.py | iuztemur/python-docs-samples | 09bc50d610741d693c4e99e03854822b37a647ba | [
"Apache-2.0"
] | 2 | 2020-06-07T07:03:00.000Z | 2021-04-10T18:22:25.000Z | # Copyright 2019 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 agreed to in writing, s... | 31.433526 | 78 | 0.764803 |
62694fcb091d89565d14c87ebe87c15cb649af81 | 36,008 | py | Python | classification/metrics/compute_vessel_metrics.py | rechardchen123/Classification-and-regression-of-vessel-AIS-data | e9d8c7a807cb6e49577739b53832e53becb3251c | [
"Apache-2.0"
] | 7 | 2018-10-14T14:55:10.000Z | 2021-01-04T13:42:09.000Z | classification/metrics/compute_vessel_metrics.py | rechardchen123/Classification-and-regression-of-vessel-AIS-data | e9d8c7a807cb6e49577739b53832e53becb3251c | [
"Apache-2.0"
] | null | null | null | classification/metrics/compute_vessel_metrics.py | rechardchen123/Classification-and-regression-of-vessel-AIS-data | e9d8c7a807cb6e49577739b53832e53becb3251c | [
"Apache-2.0"
] | null | null | null |
"""
Example:
python compute_metrics.py --inference-path classification_results.json.gz \
--label-path classification/data/net_training_20161115.csv \
--dest-path fltest.html --fishing-ranges classification/data/combined_fishing_ranges.csv \
... | 33.248384 | 121 | 0.593035 |
626978077943b80d51f25493b7afbfb05502ca90 | 2,309 | py | Python | test/test_rosdep_issue30.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | test/test_rosdep_issue30.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | test/test_rosdep_issue30.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | import os
import subprocess as sp
import tempfile
import unittest
from rosdep2 import main as rdmain
class Issue30TestCase(unittest.TestCase):
def testIssue30(self):
return True
d = make_temp_dir()
try:
cd(d)
script = '''#!/bin/bash
mkdir ws
mkdir ws/src
mkdir ws/bu... | 26.54023 | 87 | 0.621481 |
62698568a252c2434f2cb886309bd4808f6cc6f3 | 4,881 | py | Python | dataloaders/datasets/coco.py | rucnyz/pytorch-deeplab | 684e770dc82406f9572b09b2cd60d8f7b597a702 | [
"MIT"
] | null | null | null | dataloaders/datasets/coco.py | rucnyz/pytorch-deeplab | 684e770dc82406f9572b09b2cd60d8f7b597a702 | [
"MIT"
] | null | null | null | dataloaders/datasets/coco.py | rucnyz/pytorch-deeplab | 684e770dc82406f9572b09b2cd60d8f7b597a702 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch.utils.data import Dataset
from mypath import Path
from tqdm import trange
import os
from pycocotools.coco import COCO
from pycocotools import mask
from PIL import Image, ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
class COCOSegmentation(Dataset):
NUM_CLASSES = 21
CA... | 30.698113 | 90 | 0.667076 |
6269a45b6a88e24c8e87f3d56d4a853963459720 | 660 | py | Python | tests/data/expected/main/main_openapi_body_and_parameters_only_paths/output.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 891 | 2019-07-23T04:23:32.000Z | 2022-03-31T13:36:33.000Z | tests/data/expected/main/main_openapi_body_and_parameters_only_paths/output.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 663 | 2019-07-23T09:50:26.000Z | 2022-03-29T01:56:55.000Z | tests/data/expected/main/main_openapi_body_and_parameters_only_paths/output.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 108 | 2019-07-23T08:50:37.000Z | 2022-03-09T10:50:22.000Z | # generated by datamodel-codegen:
# filename: body_and_parameters.yaml
# timestamp: 2019-07-26T00:00:00+00:00
from __future__ import annotations
from datetime import datetime
from typing import Optional
from pydantic import BaseModel
class UserGetResponse(BaseModel):
timestamp: datetime
name: str
... | 18.857143 | 40 | 0.727273 |
6269bddaf9e7c48ef1761e574aa2e5a07f0b9895 | 1,242 | py | Python | savu/plugins/reshape/mipmap_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/reshape/mipmap_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/reshape/mipmap_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | from savu.plugins.plugin_tools import PluginTools
class MipmapTools(PluginTools):
"""A plugin to downsample multidimensional data successively by powers of 2.
The output is multiple 'mipmapped' datasets, each a power of 2 smaller in
each dimension than the previous dataset.
"""
def define_parameters(self):... | 31.846154 | 80 | 0.594203 |
6269c110394318898297beb61c7665b703406066 | 2,599 | py | Python | app/config.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 3 | 2021-07-09T05:53:00.000Z | 2021-11-19T09:19:18.000Z | app/config.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 13 | 2021-07-14T12:31:28.000Z | 2022-01-21T16:45:25.000Z | app/config.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 1 | 2021-07-08T18:31:56.000Z | 2021-07-08T18:31:56.000Z | import os
from pathlib import Path
import json
from datetime import timedelta
# Flask Config from Class
class Config(object):
# Secrets
BASE_PATH = os.path.abspath(os.path.dirname(__file__))
DEPLOYMENT = os.environ.get("DEPLOYMENT", False)
# Flask-User Setup
USER_APP_NAME = "TILTer" # Shown in ... | 39.984615 | 99 | 0.632551 |
6269d1bd24200e4afabe9b6fd77914141c23fddb | 3,475 | py | Python | scripts/run_bare_integration_tests.py | deepchatterjeevns/streamlit | 631d42877bd16bdec14ee124c936917b430f6ce4 | [
"Apache-2.0"
] | 2 | 2019-10-08T06:43:43.000Z | 2019-10-08T06:43:45.000Z | scripts/run_bare_integration_tests.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 4 | 2021-05-09T11:42:18.000Z | 2022-02-27T10:59:36.000Z | scripts/run_bare_integration_tests.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 1 | 2019-11-26T09:37:57.000Z | 2019-11-26T09:37:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit Inc.
#
# 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... | 28.483607 | 83 | 0.666187 |
6269e670a9f41ebd9eaebf6da9b505e523f5008d | 4,934 | py | Python | tests/python/relay/test_pass_dead_code_elimination.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-08-13T09:01:54.000Z | 2019-08-13T09:01:54.000Z | tests/python/relay/test_pass_dead_code_elimination.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | null | null | null | tests/python/relay/test_pass_dead_code_elimination.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-12-03T13:53:44.000Z | 2019-12-03T13:53:44.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.503497 | 86 | 0.646737 |
626a1ef761ac470c40d490a17586a61759ab9913 | 1,006 | py | Python | orderbook_veinte/contrib/sites/migrations/0003_set_site_domain_and_name.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/contrib/sites/migrations/0003_set_site_domain_and_name.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/contrib/sites/migrations/0003_set_site_domain_and_name.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | """
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
"""Set site d... | 28.742857 | 129 | 0.685885 |
626a2ba40cf652ffa3b4a9c1cf2bfb113497efdc | 982 | py | Python | old-scripts/web/preset_flow.py | opennetworkinglab/spring-open | 7e8a3af4a21674d198ffac462918e79e93f3c348 | [
"Apache-2.0"
] | 6 | 2015-01-30T20:44:32.000Z | 2021-11-09T10:56:04.000Z | old-scripts/web/preset_flow.py | opennetworkinglab/spring-open | 7e8a3af4a21674d198ffac462918e79e93f3c348 | [
"Apache-2.0"
] | null | null | null | old-scripts/web/preset_flow.py | opennetworkinglab/spring-open | 7e8a3af4a21674d198ffac462918e79e93f3c348 | [
"Apache-2.0"
] | 5 | 2017-04-27T02:27:51.000Z | 2020-12-29T05:23:35.000Z | #! /usr/bin/env python
import itertools
import sys
src_port=1
dst_port=1
n=int(sys.argv[1])
a=range(2,n+1)
nflow=int(sys.argv[2])
print "# For %d nodes cluster, %d flows per network pair, total %d flows" % (n, nflow, (n-1)*(n-2)/2 * nflow * 2)
flow_id=1
pair_id=1
for i in itertools.combinations(a,2):
for f in ran... | 37.769231 | 254 | 0.687373 |
626a3f1ec6dca797223840c56a3149fe7c444b88 | 11,574 | py | Python | flexget/tests/conftest.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/tests/conftest.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/tests/conftest.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import jsonschema
from builtins import * # pylint: disable=unused-import, redefined-builtin
from future.utils import PY2
from future.backports.http import client as backport_client
import os
import sys
import yaml
import logging
import shutil
import... | 32.602817 | 119 | 0.642475 |
626a4eb1eee9bda6c910c9dfa9cfff27b04444c1 | 12,405 | py | Python | tensorflow/python/eager/tensor_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/eager/tensor_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/eager/tensor_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 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 applica... | 36.701183 | 80 | 0.674728 |
626a9591d2b234f8acb84eb29271d59c29b6e880 | 49 | py | Python | cogbot/extensions/nbt/errors/schema_validation_error.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 8 | 2016-12-26T14:10:38.000Z | 2021-01-02T03:50:05.000Z | cogbot/extensions/nbt/errors/schema_validation_error.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 28 | 2016-12-12T04:06:53.000Z | 2020-04-23T06:18:55.000Z | cogbot/extensions/nbt/errors/schema_validation_error.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 9 | 2017-06-03T00:33:57.000Z | 2020-10-29T18:16:02.000Z | class SchemaValidationError(TypeError):
pass
| 16.333333 | 39 | 0.795918 |
626aa1e117034d1fd2d301cbdc470936c4edf4b4 | 8,196 | py | Python | aeropy/filehandling/stl_processing.py | leal26/pyXFOIL | 88ff224be25cdb51eb821315f6e094f68fb13247 | [
"MIT"
] | 50 | 2016-03-15T17:24:55.000Z | 2021-12-28T07:32:45.000Z | aeropy/filehandling/stl_processing.py | SzymonSzyszko/AeroPy | b061c690e5926fdd834b7c50837c25108e908156 | [
"MIT"
] | 22 | 2017-04-20T11:27:28.000Z | 2022-02-09T05:57:06.000Z | aeropy/filehandling/stl_processing.py | SzymonSzyszko/AeroPy | b061c690e5926fdd834b7c50837c25108e908156 | [
"MIT"
] | 34 | 2016-03-04T15:57:37.000Z | 2022-02-15T20:06:54.000Z | import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import math
import stl
import pickle
import os
from aeropy.xfoil_module import output_reader
import aeropy.geometry.airfoil as am
def process_data(data, invert=False, filename=None):
'''Displace and normalize all data and ... | 33.867769 | 93 | 0.57345 |
626aa55914e867595fc0f5c8c2f8228ec9bc1266 | 3,624 | py | Python | intersight/models/storage_deploy_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_deploy_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/storage_deploy_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class StorageDeployTaskRef(object):
"""
NOTE: This ... | 24.16 | 77 | 0.543322 |
626ad35452c1dc25863be1eddb434731de097055 | 6,076 | py | Python | src/test/tests/hybrid/selections_pp.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/selections_pp.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/hybrid/selections_pp.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: selection_pp.py
#
# Tests: filter - named selection
# operator - persistent particles
# plot - pseudocolor
#
# Defect ID: -
#
# Programmer: Allen Sa... | 28.660377 | 96 | 0.714779 |
626ae2e6fbdaca60179f459be73310ea2a0d6f59 | 1,025 | py | Python | HomeWork 1/data_gathering/storages/file_storage.py | AlekseyTalipov/otis | b7296b484ff7b30985e7e2c53fcc376890c736f7 | [
"MIT"
] | null | null | null | HomeWork 1/data_gathering/storages/file_storage.py | AlekseyTalipov/otis | b7296b484ff7b30985e7e2c53fcc376890c736f7 | [
"MIT"
] | null | null | null | HomeWork 1/data_gathering/storages/file_storage.py | AlekseyTalipov/otis | b7296b484ff7b30985e7e2c53fcc376890c736f7 | [
"MIT"
] | null | null | null | import os
from storages.storage import Storage
class FileStorage(Storage):
def __init__(self, file_name):
self.file_name = file_name
def read_data(self):
if not os.path.exists(self.file_name):
raise StopIteration
with open(self.file_name) as f:
for line in f... | 25 | 53 | 0.494634 |
626ae9dc71034e9f796f2f9b33d83d5af55fc2f9 | 10,426 | py | Python | timm/utils.py | bermanmaxim/pytorch-image-models | 1d7f2d93a68bdc3c5d8d634d869709f6cdd7cecd | [
"Apache-2.0"
] | null | null | null | timm/utils.py | bermanmaxim/pytorch-image-models | 1d7f2d93a68bdc3c5d8d634d869709f6cdd7cecd | [
"Apache-2.0"
] | null | null | null | timm/utils.py | bermanmaxim/pytorch-image-models | 1d7f2d93a68bdc3c5d8d634d869709f6cdd7cecd | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
import torch
import math
import os
import re
import shutil
import glob
import csv
import operator
import numpy as np
from collections import OrderedDict
from torch import distributed as dist
def get_state_dict(model):
if isinstance(model, ModelEma):
return get_state_dict(model.... | 38.330882 | 108 | 0.621331 |
626b12f8f32d8f31c8c82a5dac15120b53b026fa | 736 | py | Python | alipay/aop/api/response/AlipayEcoEprintTokenGetResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayEcoEprintTokenGetResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayEcoEprintTokenGetResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayEcoEprintTokenGetResponse(AlipayResponse):
def __init__(self):
super(AlipayEcoEprintTokenGetResponse, self).__init__()
self._eprint_token = None
@property
... | 28.307692 | 104 | 0.722826 |
626b2996643fb72e02152545a2cda82c51ecb5f9 | 8,642 | py | Python | test/model/test_driver.py | kpine/zwave-js-server-python | d32eaa9b81b344ccc9c3155a8f71b108a8ec1715 | [
"Apache-2.0"
] | 1 | 2021-06-08T20:41:21.000Z | 2021-06-08T20:41:21.000Z | test/model/test_driver.py | kpine/zwave-js-server-python | d32eaa9b81b344ccc9c3155a8f71b108a8ec1715 | [
"Apache-2.0"
] | null | null | null | test/model/test_driver.py | kpine/zwave-js-server-python | d32eaa9b81b344ccc9c3155a8f71b108a8ec1715 | [
"Apache-2.0"
] | null | null | null | """Test the driver model."""
import json
from zwave_js_server.const import LogLevel
from zwave_js_server.event import Event
from zwave_js_server.model import (
driver as driver_pkg,
log_config as log_config_pkg,
log_message as log_message_pkg,
)
from .. import load_fixture
def test_from_state(log_config... | 30.429577 | 87 | 0.602754 |
626b3c942e18b552ae103718cc40eb5bbf24e464 | 3,427 | py | Python | tests/auth_api/oidc/test_login_callback.py | RasmusGodske/eo-auth | b25d916f8b1bb23ec5ca40de907b038b21d17713 | [
"Apache-2.0"
] | null | null | null | tests/auth_api/oidc/test_login_callback.py | RasmusGodske/eo-auth | b25d916f8b1bb23ec5ca40de907b038b21d17713 | [
"Apache-2.0"
] | null | null | null | tests/auth_api/oidc/test_login_callback.py | RasmusGodske/eo-auth | b25d916f8b1bb23ec5ca40de907b038b21d17713 | [
"Apache-2.0"
] | null | null | null | import pytest
from typing import Dict, Any
from unittest.mock import MagicMock
from flask.testing import FlaskClient
from origin.tokens import TokenEncoder
from origin.api.testing import (
assert_base_url,
assert_query_parameter,
)
from auth_api.db import db
from auth_api.endpoints import AuthState
from auth... | 32.330189 | 78 | 0.620368 |
626b3f23ef55edd89f82b075fe27f7e38fed8816 | 3,129 | py | Python | creditcards/settings.py | BtLutz/credit-cards | 740fbd4923b4b3f4352602adacf379461fefbc38 | [
"MIT"
] | null | null | null | creditcards/settings.py | BtLutz/credit-cards | 740fbd4923b4b3f4352602adacf379461fefbc38 | [
"MIT"
] | 6 | 2020-06-05T22:33:57.000Z | 2022-02-10T08:49:20.000Z | creditcards/settings.py | BtLutz/credit-cards | 740fbd4923b4b3f4352602adacf379461fefbc38 | [
"MIT"
] | null | null | null | """
Django settings for creditcards project.
Generated by 'django-admin startproject' using Django 2.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import o... | 25.647541 | 91 | 0.696389 |
626b4fcf8de9384318fba57b653bff2dd4f56b9f | 4,738 | py | Python | atom/nucleus/python/nucleus_api/models/permission_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/permission_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/permission_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from nucleus_api.configuration i... | 29.428571 | 117 | 0.58569 |
626b552eb9ea69d3a1d7951f351ba72f5fe9bf63 | 3,783 | py | Python | fiepipedesktoplib/locallymanagedtypes/shells/AbstractLocalManagedTypeCommand.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/locallymanagedtypes/shells/AbstractLocalManagedTypeCommand.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/locallymanagedtypes/shells/AbstractLocalManagedTypeCommand.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | import abc
import asyncio
import typing
import json
from fiepipelib.locallymanagedtypes.routines.localmanaged import AbstractLocalManagedInteractiveRoutines
from fiepipelib.localuser.routines.localuser import LocalUserRoutines
from fiepipelib.localplatform.routines.localplatform import get_local_platform_routines
fro... | 28.877863 | 104 | 0.633888 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.