hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b23b07878b9965f8556cbfb3cf2e7c53c59d8f6b | 10,211 | py | Python | src/cogent3/parse/blast_xml.py | tla256/cogent3 | 58533d11852d0cafbc0cfc6ae26429a6c0b2cb75 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/parse/blast_xml.py | tla256/cogent3 | 58533d11852d0cafbc0cfc6ae26429a6c0b2cb75 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/parse/blast_xml.py | tla256/cogent3 | 58533d11852d0cafbc0cfc6ae26429a6c0b2cb75 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""Parsers for XML output of blast, psi-blast and blat.
"""
__author__ = "Kristian Rother"
__copyright__ = "Copyright 2007-2019, The Cogent Project"
__contributors__ = ["Micah Hamady"]
__credits__ = ["Rob Knight"]
__license__ = "BSD-3"
__version__ = "2019.12.6a"
__maintainer__ = "Kristian Rother"... | 31.418462 | 84 | 0.613456 |
b1eba34f66d9f1bf24d53c3f02e75338c198b58c | 24,122 | py | Python | sktime/classification/compose/_ensemble.py | biologioholic/sktime | 9d0391a04b11d22bd783b452f01aa5b4529b41a2 | [
"BSD-3-Clause"
] | 1 | 2021-12-22T02:45:39.000Z | 2021-12-22T02:45:39.000Z | sktime/classification/compose/_ensemble.py | biologioholic/sktime | 9d0391a04b11d22bd783b452f01aa5b4529b41a2 | [
"BSD-3-Clause"
] | null | null | null | sktime/classification/compose/_ensemble.py | biologioholic/sktime | 9d0391a04b11d22bd783b452f01aa5b4529b41a2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Configurable time series ensembles."""
__author__ = ["mloning", "Ayushmaan Seth"]
__all__ = ["ComposableTimeSeriesForestClassifier"]
import numbers
from warnings import warn
import numpy as np
from joblib import Parallel, delayed
from sklearn.ensemble._base import _partition_estimators
from... | 43.152057 | 88 | 0.62984 |
a15aa29daccc2f43f03f7d3a3d1a034da81b3754 | 2,935 | py | Python | scripts/continue_simulation/setup_continue.py | simeoncarstens/ensemble_hic | abaec8972866b593e689e39419d1c2d7ab6788dc | [
"Unlicense",
"MIT"
] | 3 | 2020-07-23T20:50:42.000Z | 2021-03-16T04:38:07.000Z | scripts/continue_simulation/setup_continue.py | simeoncarstens/ensemble_hic | abaec8972866b593e689e39419d1c2d7ab6788dc | [
"Unlicense",
"MIT"
] | null | null | null | scripts/continue_simulation/setup_continue.py | simeoncarstens/ensemble_hic | abaec8972866b593e689e39419d1c2d7ab6788dc | [
"Unlicense",
"MIT"
] | null | null | null | import sys
import os
import numpy as np
from ensemble_hic.setup_functions import parse_config_file
# sys.argv = ['asdfasdf',
# '/scratch/scarste/ensemble_hic/nora2012/female_bothdomains_fixed_rep1_it4_20structures_241replicas/config.cfg',
# 50001,
# 1]
config_file = sys.argv[1]
n_... | 38.618421 | 125 | 0.683135 |
f9c806f4f8523b2339f8c47c25fb88f6870619f2 | 1,229 | py | Python | jasmin/protocols/cli/configs.py | 2naive/jasmin | 7609a50ded4ebf5873b607cb4a500be4b1be6be1 | [
"Apache-2.0"
] | 2 | 2020-05-14T18:27:01.000Z | 2021-03-21T17:26:19.000Z | jasmin/protocols/cli/configs.py | 2naive/jasmin | 7609a50ded4ebf5873b607cb4a500be4b1be6be1 | [
"Apache-2.0"
] | null | null | null | jasmin/protocols/cli/configs.py | 2naive/jasmin | 7609a50ded4ebf5873b607cb4a500be4b1be6be1 | [
"Apache-2.0"
] | 1 | 2020-11-24T06:48:22.000Z | 2020-11-24T06:48:22.000Z | """
Config file handler for 'jcli' section in jasmin.cfg
"""
from jasmin.config.tools import ConfigFile
import os
import logging
# Related to travis-ci builds
ROOT_PATH = os.getenv('ROOT_PATH', '/')
class JCliConfig(ConfigFile):
"""Config handler for 'jcli' section"""
def __init__(self, config_file=None):
... | 37.242424 | 95 | 0.646054 |
2096307ffa05d31d2fce8c9cf95b33cf029bf541 | 831 | py | Python | downloader/upl.py | andre487/downloader487 | 687c0177019d27990b7b29a2b98af360558e8ca4 | [
"MIT"
] | null | null | null | downloader/upl.py | andre487/downloader487 | 687c0177019d27990b7b29a2b98af360558e8ca4 | [
"MIT"
] | null | null | null | downloader/upl.py | andre487/downloader487 | 687c0177019d27990b7b29a2b98af360558e8ca4 | [
"MIT"
] | null | null | null | import logging
import os
from typing import Optional
import boto3
class Uploader:
def __init__(
self, s3_endpoint: str, s3_region: str, s3_bucket: str,
s3_access: Optional[str], s3_secret: Optional[str],
) -> None:
self._s3_bucket = s3_bucket
self._client = boto3.clie... | 26.806452 | 68 | 0.618532 |
b39eb5c43bf8307e0fdb5ffb72a309bc5335c837 | 7,366 | py | Python | tensorpack/tfutils/varmanip.py | Sangyeob-Kim/tensorpack_rev | bf4020892edc123a09e08de784da0448464529b2 | [
"Apache-2.0"
] | 5 | 2018-05-04T02:04:15.000Z | 2020-04-02T05:38:48.000Z | tensorpack/tfutils/varmanip.py | Sangyeob-Kim/tensorpack_rev | bf4020892edc123a09e08de784da0448464529b2 | [
"Apache-2.0"
] | null | null | null | tensorpack/tfutils/varmanip.py | Sangyeob-Kim/tensorpack_rev | bf4020892edc123a09e08de784da0448464529b2 | [
"Apache-2.0"
] | 2 | 2018-04-23T13:43:10.000Z | 2019-10-30T09:56:54.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: varmanip.py
import six
import os
import pprint
import tensorflow as tf
import numpy as np
from ..utils.develop import deprecated
from ..utils import logger
from .common import get_op_tensor_name
__all__ = ['SessionUpdate', 'dump_session_params', 'dump_chkpt_vars'... | 34.101852 | 116 | 0.618246 |
2395f20a3325cd420becdc676dd60e29374c97ac | 7,415 | py | Python | note/meiduo34/mall/apps/users/views.py | gaosong666/taobao | cec3be71376fb94dc38553360253b70e88855594 | [
"MIT"
] | null | null | null | note/meiduo34/mall/apps/users/views.py | gaosong666/taobao | cec3be71376fb94dc38553360253b70e88855594 | [
"MIT"
] | null | null | null | note/meiduo34/mall/apps/users/views.py | gaosong666/taobao | cec3be71376fb94dc38553360253b70e88855594 | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
from django_redis import get_redis_connection
from rest_framework import status
from rest_framework.generics import CreateAPIView, RetrieveAPIView, UpdateAPIView, GenericAPIView
from rest_framework.permissions import IsAuthenticated
from rest_framework.resp... | 27.062044 | 107 | 0.646527 |
0f8f84bc024db64d1fc9458bbb2d622360da4356 | 33,104 | py | Python | lcnn/data/UniversalLoader.py | VlachosGroup/lcnn | 90bec040296b8faa4c28230cbc440df8185da715 | [
"MIT"
] | 8 | 2020-03-27T22:34:06.000Z | 2020-11-20T13:49:09.000Z | lcnn/data/UniversalLoader.py | VlachosGroup/lcnn | 90bec040296b8faa4c28230cbc440df8185da715 | [
"MIT"
] | 4 | 2019-08-01T04:13:58.000Z | 2021-09-16T04:52:36.000Z | lcnn/data/UniversalLoader.py | VlachosGroup/lcnn | 90bec040296b8faa4c28230cbc440df8185da715 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) Vlachos Group, Jung Group
# GNU v3.0 license
__author__ = 'Geun Ho Gu'
__copyright__ = "Copyright 2019, Vlachos Group, Jung Group"
__version__ = "1.0"
__maintainer__ = "Geun Ho Gu"
__email__ = "ghgu@kaist.ac.kr"
__date__ = "July 31, 2019"
import numpy as np
import json
import o... | 38.718129 | 135 | 0.571532 |
97cd7a67f1fd915f5250f2338bd7b947a6687d56 | 197 | py | Python | UsingPython/base_algorithm/leetcode/add_two_numbers.py | Rick00Kim/Algorithm_coding | c988729462f3cef78e0b02f888e0117fdefaa5d1 | [
"MIT"
] | null | null | null | UsingPython/base_algorithm/leetcode/add_two_numbers.py | Rick00Kim/Algorithm_coding | c988729462f3cef78e0b02f888e0117fdefaa5d1 | [
"MIT"
] | null | null | null | UsingPython/base_algorithm/leetcode/add_two_numbers.py | Rick00Kim/Algorithm_coding | c988729462f3cef78e0b02f888e0117fdefaa5d1 | [
"MIT"
] | null | null | null | from base_algorithm.abstract_algorithm import AbstractAlgorithm
class AddTwoNumbers(AbstractAlgorithm):
def solution(N):
pass
def execute(self):
return super().execute()
| 19.7 | 63 | 0.720812 |
784df256a3928012ac47bc7be62b7ad3e8c98172 | 5,086 | py | Python | poacher/__init__.py | eriknyquist/poacher | 3f8e0384acaf2d7f08f5365072218d80c240aa3f | [
"Apache-2.0"
] | null | null | null | poacher/__init__.py | eriknyquist/poacher | 3f8e0384acaf2d7f08f5365072218d80c240aa3f | [
"Apache-2.0"
] | null | null | null | poacher/__init__.py | eriknyquist/poacher | 3f8e0384acaf2d7f08f5365072218d80c240aa3f | [
"Apache-2.0"
] | null | null | null | __version__ = "0.1"
import time
import argparse
from github import Github
from github.GithubException import UnknownObjectException
DEFAULT_STEP = 64
class GithubPoacher(object):
"""
Base class containing functionality to poll github.com for new repositories.
Extend this class and override poac... | 29.569767 | 83 | 0.59595 |
02a39d7176d33853cf04915cc3751adb1d4699ae | 727 | py | Python | ymir/backend/src/ymir_monitor/tests/test_api.py | Zhang-SJ930104/ymir | dd6481be6f229ade4cf8fba64ef44a15357430c4 | [
"Apache-2.0"
] | 64 | 2021-11-15T03:48:00.000Z | 2022-03-25T07:08:46.000Z | ymir/backend/src/ymir_monitor/tests/test_api.py | Zhang-SJ930104/ymir | dd6481be6f229ade4cf8fba64ef44a15357430c4 | [
"Apache-2.0"
] | 35 | 2021-11-23T04:14:35.000Z | 2022-03-26T09:03:43.000Z | ymir/backend/src/ymir_monitor/tests/test_api.py | Aryalfrat/ymir | d4617ed00ef67a77ab4e1944763f608bface4be6 | [
"Apache-2.0"
] | 57 | 2021-11-11T10:15:40.000Z | 2022-03-29T07:27:54.000Z | from fastapi.testclient import TestClient
class TestReg:
def test_reg(self, client: TestClient, clear_redislite, mocker):
mocker.patch("os.path.exists", return_value=True)
data = "t0000003000003df78d31639637101 21245543 0.50 2"
mocker.patch("builtins.open", mocker.mock_open(read_data=data... | 30.291667 | 71 | 0.581843 |
cf7001b3be2399972da1fb05e84e0d91cfb623a5 | 662 | py | Python | SRC/equiposv1/crud/migrations/0002_document.py | MarvikDC/finalIW | 793ce522cf12e06acb1ae183287c32ea3dfdb562 | [
"MIT"
] | null | null | null | SRC/equiposv1/crud/migrations/0002_document.py | MarvikDC/finalIW | 793ce522cf12e06acb1ae183287c32ea3dfdb562 | [
"MIT"
] | null | null | null | SRC/equiposv1/crud/migrations/0002_document.py | MarvikDC/finalIW | 793ce522cf12e06acb1ae183287c32ea3dfdb562 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-11-24 20:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('crud', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Document',
fields=[
('id', mo... | 28.782609 | 117 | 0.583082 |
18c10ec45d4743376f3427268adc7849e5c6391c | 68,661 | py | Python | spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py | TimenoLong/spyder | c4a71b75dd3229b2bebd606e073cf2db536f5c13 | [
"MIT"
] | 1 | 2021-06-29T02:20:12.000Z | 2021-06-29T02:20:12.000Z | spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py | TimenoLong/spyder | c4a71b75dd3229b2bebd606e073cf2db536f5c13 | [
"MIT"
] | null | null | null | spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py | TimenoLong/spyder | c4a71b75dd3229b2bebd606e073cf2db536f5c13 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright © Spyder Project Contributors
#
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
# -----------------------------------------------------------------------------
"""
Te... | 35.265023 | 88 | 0.678245 |
8fe0087036d7fdb71444934547aa4ac3bd20a197 | 154 | py | Python | LuoguCodes/AT2447.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | LuoguCodes/AT2447.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | LuoguCodes/AT2447.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
d = int(raw_input())
e = int(raw_input())
print [-a * c + d + b * e, b * e - a * e][a > 0]
| 22 | 48 | 0.525974 |
94bd5696146558ea807690815a92b159188217c9 | 1,692 | py | Python | var/spack/repos/builtin/packages/automake/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/automake/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/automake/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-14T14:20:17.000Z | 2020-10-14T14:20:17.000Z | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Automake(AutotoolsPackage):
"""Automake -- make file builder part of autotools"""
hom... | 36.782609 | 73 | 0.655437 |
82844b276cd4bd8e74e5f3a5d9d7429bdd08d9a1 | 2,122 | py | Python | Names.py | luontonurkka/fetcher | 439d3531b13dcf296c75c1a637dce4e7a7cf8b91 | [
"MIT"
] | null | null | null | Names.py | luontonurkka/fetcher | 439d3531b13dcf296c75c1a637dce4e7a7cf8b91 | [
"MIT"
] | null | null | null | Names.py | luontonurkka/fetcher | 439d3531b13dcf296c75c1a637dce4e7a7cf8b91 | [
"MIT"
] | null | null | null | import requests, bs4
"""
Under MIT-Licence, 2016 Perttu Rautaniemi
"""
def getplantnames():
""" This method gets all the scientific and finnish names from url and returns them"""
names = []
site = requests.get("http://koivu.luomus.fi/kasviatlas/all.php")
soup = bs4.BeautifulSoup(site.text)
lista =... | 30.314286 | 107 | 0.568332 |
ec1855087a9975d46eece498f5355df81213c212 | 124,730 | py | Python | pdb2pqr/pdb.py | rkretsch/pdb2pqr | 53cbe6d320048508710b3bad8581b69d3a358ab9 | [
"BSD-3-Clause"
] | 32 | 2020-08-25T07:01:35.000Z | 2022-03-17T05:27:10.000Z | pdb2pqr/pdb.py | rkretsch/pdb2pqr | 53cbe6d320048508710b3bad8581b69d3a358ab9 | [
"BSD-3-Clause"
] | 263 | 2020-06-30T02:42:52.000Z | 2022-03-08T12:48:08.000Z | pdb2pqr/pdb.py | rkretsch/pdb2pqr | 53cbe6d320048508710b3bad8581b69d3a358ab9 | [
"BSD-3-Clause"
] | 16 | 2020-08-14T11:27:52.000Z | 2022-01-24T10:11:31.000Z | """ PDB parsing class
This module parses PDBs in accordance to PDB Format Description Version 2.2
(1996); it is not very forgiving. Each class in this module corresponds
to a record in the PDB Format Description. Much of the documentation for
the classes is taken directly from the above PDB Format Description.
.. c... | 47.82592 | 78 | 0.364082 |
273025dc160c27176a8302b67158343fbdd74151 | 255 | py | Python | manage.py | ychab/privagal | 118197c8fdeb7e32c95cf9672b87fb0350a5a874 | [
"BSD-3-Clause"
] | 6 | 2016-06-06T15:27:24.000Z | 2016-07-14T01:26:42.000Z | manage.py | ychab/privagal | 118197c8fdeb7e32c95cf9672b87fb0350a5a874 | [
"BSD-3-Clause"
] | null | null | null | manage.py | ychab/privagal | 118197c8fdeb7e32c95cf9672b87fb0350a5a874 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "privagal.settings.dev")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23.181818 | 76 | 0.772549 |
36eb93c2c5eca25b60d218531e53ff166e073d07 | 1,323 | py | Python | src/main/py/com/example/sql/window_analytic_functions.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-18T16:23:56.000Z | 2021-07-18T16:23:56.000Z | src/main/py/com/example/sql/window_analytic_functions.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/main/py/com/example/sql/window_analytic_functions.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import sys
from pyspark.sql import SparkSession
from pyspark.sql.window import Window
from pyspark.sql.functions import *
# create Spark context with Spark configuration
spark = SparkSession \
.builder \
.appName("PySpark Window Functions") \
.enableHiveSupport() \
.getOrCreate()
spark.sparkContext.se... | 28.148936 | 77 | 0.636432 |
88498af5fb6d79a2a8d8f6ab2801225f14f3c7f9 | 5,176 | py | Python | test_autofit/mapper/model/test_model_instance.py | caoxiaoyue/PyAutoFit | 819cd2acc8d4069497a161c3bb6048128e44d828 | [
"MIT"
] | 39 | 2019-01-24T10:45:23.000Z | 2022-03-18T09:37:59.000Z | test_autofit/mapper/model/test_model_instance.py | caoxiaoyue/PyAutoFit | 819cd2acc8d4069497a161c3bb6048128e44d828 | [
"MIT"
] | 260 | 2018-11-27T12:56:33.000Z | 2022-03-31T16:08:59.000Z | test_autofit/mapper/model/test_model_instance.py | caoxiaoyue/PyAutoFit | 819cd2acc8d4069497a161c3bb6048128e44d828 | [
"MIT"
] | 13 | 2018-11-30T16:49:05.000Z | 2022-01-21T17:39:29.000Z | import pytest
import autofit as af
from autofit.mock.mock_model import MockClassx2, MockClassx3TupleFloat, MockComponents
@pytest.fixture(name="mock_components_1")
def make_mock_components_1():
return MockComponents()
@pytest.fixture(name="mock_components_2")
def make_mock_components_2():
return... | 34.052632 | 104 | 0.681607 |
ae7b6524c30f6d9853980cdfb7f4d398621ae968 | 3,033 | py | Python | portality/error_handler.py | DOAJ/doaj | b11f163c48f51f9e3ada2b02c617b50b847dcb4c | [
"Apache-2.0"
] | 47 | 2015-04-24T13:13:39.000Z | 2022-03-06T03:22:42.000Z | portality/error_handler.py | DOAJ/doaj | b11f163c48f51f9e3ada2b02c617b50b847dcb4c | [
"Apache-2.0"
] | 1,215 | 2015-01-02T14:29:38.000Z | 2022-03-28T14:19:13.000Z | portality/error_handler.py | DOAJ/doaj | b11f163c48f51f9e3ada2b02c617b50b847dcb4c | [
"Apache-2.0"
] | 14 | 2015-11-27T13:01:23.000Z | 2021-05-21T07:57:23.000Z | import logging
import logging.handlers
import sys
# just use GMail
class TlsSMTPHandler(logging.handlers.SMTPHandler):
def emit(self, record):
"""
Emit a record.
Format the record and send it to the specified addressees.
"""
try:
import smtplib
imp... | 36.987805 | 127 | 0.587537 |
078d479d32b51b86c38c8c03c5cc3df6c0943883 | 807 | py | Python | tools/data_faker/data_faker/__main__.py | esaulkov/rotkehlchen | dcbff5436abd93e91b2904bbe1dfbf24b3a2ec22 | [
"BSD-3-Clause"
] | 1 | 2019-08-04T08:30:14.000Z | 2019-08-04T08:30:14.000Z | tools/data_faker/data_faker/__main__.py | esaulkov/rotkehlchen | dcbff5436abd93e91b2904bbe1dfbf24b3a2ec22 | [
"BSD-3-Clause"
] | null | null | null | tools/data_faker/data_faker/__main__.py | esaulkov/rotkehlchen | dcbff5436abd93e91b2904bbe1dfbf24b3a2ec22 | [
"BSD-3-Clause"
] | null | null | null | from gevent import monkey # isort:skip # noqa
monkey.patch_all() # isort:skip # noqa
import logging
from data_faker.args import data_faker_args
from data_faker.faker import DataFaker
from data_faker.mock_apis.api import APIServer, RestAPI
logger = logging.getLogger(__name__)
def main():
arg_parser = data_fake... | 25.21875 | 55 | 0.713755 |
358bffb3ef4fab0ca8f3a8c93c1243090f57d80e | 425 | py | Python | data_tests/saved__backend__py3.9/cython/methods.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | data_tests/saved__backend__py3.9/cython/methods.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | data_tests/saved__backend__py3.9/cython/methods.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | try:
import cython
except ImportError:
from transonic_cl import cython
import numpy as np
def __for_method__Transmitter____call__(self_arr, self_freq, inp):
"""My docstring"""
return (inp * np.exp(np.arange(len(inp)) * self_freq * 1j), self_arr)
__code_new_method__Transmitter____call__ = """
def n... | 19.318182 | 73 | 0.712941 |
e8a1cbf6a996ce0bc56ac2e1ae60a7e189701b4f | 6,775 | py | Python | elevenclock/lang/lang_en.py | kinr0k/ElevenClock | f52fdc024491e16c266af2710f9012a2dd6927a7 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_en.py | kinr0k/ElevenClock | f52fdc024491e16c266af2710f9012a2dd6927a7 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_en.py | kinr0k/ElevenClock | f52fdc024491e16c266af2710f9012a2dd6927a7 | [
"Apache-2.0"
] | null | null | null | # INSTRUCTIONS
# Translate the text and write it between the "
# EXAMPLE: original -> "This text is in english: value {0}"
# translation -> "Aquest text està en anglès: valor {0}"
# If you see sth like {0}, {1}, maintain it on the translated sentence
# Meke special attention to elements like "... | 46.40411 | 180 | 0.51203 |
a242d6ec82ab31eedae419a24692260f74b97a16 | 1,779 | py | Python | qiskit/__init__.py | nonhermitian/arrogant_seahorse | 2be1ff60857c75fcbbb0c23aa594f41e1a33c89c | [
"Apache-2.0"
] | null | null | null | qiskit/__init__.py | nonhermitian/arrogant_seahorse | 2be1ff60857c75fcbbb0c23aa594f41e1a33c89c | [
"Apache-2.0"
] | 1 | 2018-08-08T17:56:06.000Z | 2018-08-08T17:56:06.000Z | qiskit/__init__.py | nonhermitian/arrogant_seahorse | 2be1ff60857c75fcbbb0c23aa594f41e1a33c89c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=wrong-import-order
# pylint: disable=redefined-builtin
# Copyright 2017 IBM RESEARCH. 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 Lice... | 35.58 | 89 | 0.761102 |
5ca47cdff5820766b77f95585ce04f0f25497c0c | 1,732 | py | Python | sbsched/sbsched.py | eyedol/sbsched | 7f52c05158b8c0fa334e792c3ae44dc69d69993e | [
"Apache-2.0"
] | null | null | null | sbsched/sbsched.py | eyedol/sbsched | 7f52c05158b8c0fa334e792c3ae44dc69d69993e | [
"Apache-2.0"
] | null | null | null | sbsched/sbsched.py | eyedol/sbsched | 7f52c05158b8c0fa334e792c3ae44dc69d69993e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from bs4 import BeautifulSoup
import urllib
import re
class Showings:
def __init__(self):
movie_title = ''
self.times = []
def __str__(self):
return u'{} \n {}'.format(self.movie_title, self.times)
__repr__ = __str__
class Schedule:
def __init__(self):
... | 28.866667 | 108 | 0.570439 |
d3a963172d513d73901128c0f5e832a6daf5e645 | 1,791 | py | Python | test/skia/libjpeg.py | robothn2/pab | 0fcc93dd55175df23f549860595e443c248e0649 | [
"MIT"
] | null | null | null | test/skia/libjpeg.py | robothn2/pab | 0fcc93dd55175df23f549860595e443c248e0649 | [
"MIT"
] | null | null | null | test/skia/libjpeg.py | robothn2/pab | 0fcc93dd55175df23f549860595e443c248e0649 | [
"MIT"
] | null | null | null | # coding: utf-8
libjpeg_lib = {
'uri': '//third_party/libjpeg',
'type': 'sharedLib',
'source_base_dir': 'third_party/externals/libjpeg-turbo',
'public_include_dirs': [
'.',
],
'defines': [
'TURBO_FOR_WINDOWS',
],
'sources': [
'jaricom.c',
'jcapim... | 22.111111 | 76 | 0.453936 |
4d00f5e191f6f8604af43a5dff381540f591a7f5 | 972 | py | Python | xmuda/data/nuscenes/nuscenes_dm.py | anhquancao/xmuda-extend | 4b670ec2f6766e3a624e81dbe5d97b209c1c4f76 | [
"Apache-2.0"
] | null | null | null | xmuda/data/nuscenes/nuscenes_dm.py | anhquancao/xmuda-extend | 4b670ec2f6766e3a624e81dbe5d97b209c1c4f76 | [
"Apache-2.0"
] | null | null | null | xmuda/data/nuscenes/nuscenes_dm.py | anhquancao/xmuda-extend | 4b670ec2f6766e3a624e81dbe5d97b209c1c4f76 | [
"Apache-2.0"
] | null | null | null | from torch.utils.data.dataloader import DataLoader
from xmuda.data.nuscenes.nuscenes_dataset import NuscenesDataset
import pytorch_lightning as pl
from xmuda.data.kitti_360.collate import collate_fn
from xmuda.common.utils.torch_util import worker_init_fn
from torchvision import transforms
class NuscenesDataModule(pl... | 31.354839 | 64 | 0.677984 |
adff6146ce1ae058371f37f8d3a7e5ad32791d3e | 6,611 | py | Python | _47_scrape.py | bansallab/roundup | 515e082f35d608797fab3943b1292bbf6f34f8d0 | [
"MIT"
] | null | null | null | _47_scrape.py | bansallab/roundup | 515e082f35d608797fab3943b1292bbf6f34f8d0 | [
"MIT"
] | 4 | 2016-05-19T22:06:20.000Z | 2022-03-30T13:57:40.000Z | _47_scrape.py | bansallab/roundup | 515e082f35d608797fab3943b1292bbf6f34f8d0 | [
"MIT"
] | null | null | null | import csv
from urllib.request import Request, urlopen
import dateutil.parser
import re
from sys import argv
from bs4 import BeautifulSoup
import scrape_util
default_sale, base_url, prefix = scrape_util.get_market(argv)
report_path = 'Past%20Auction%20Results.htm'
date_pattern = re.compile(r'\d{1,2}/\d{1,2}/\d{2,4}'... | 30.187215 | 100 | 0.586144 |
6986ba8ae10943bbe0a19ad1d63111e25988f309 | 499 | py | Python | dbml_from_api.py | ioatzim/getbigschema | 7ec9cde9099f6f7a9a45232d598b93f55357397b | [
"Apache-2.0"
] | null | null | null | dbml_from_api.py | ioatzim/getbigschema | 7ec9cde9099f6f7a9a45232d598b93f55357397b | [
"Apache-2.0"
] | null | null | null | dbml_from_api.py | ioatzim/getbigschema | 7ec9cde9099f6f7a9a45232d598b93f55357397b | [
"Apache-2.0"
] | null | null | null | import requests
import os
import json
import datetime
'''
Pulls a dbml file from the API. User must manually add the file id, found in the 'response_ids.json' file generated from dbml_post_to_api.py
'''
url='http://ec2-54-167-67-34.compute-1.amazonaws.com/api/dbmls' #url of the API
id = '6192b1f31c2a512293f... | 35.642857 | 141 | 0.735471 |
de710cc880e69e072595ed64afdca333e670c5ca | 15,955 | py | Python | encoder-decoder-train_3.py | kapitsa2811/uTAB | 5915c43db521575693181bc040cebce2f10c1158 | [
"MIT"
] | null | null | null | encoder-decoder-train_3.py | kapitsa2811/uTAB | 5915c43db521575693181bc040cebce2f10c1158 | [
"MIT"
] | null | null | null | encoder-decoder-train_3.py | kapitsa2811/uTAB | 5915c43db521575693181bc040cebce2f10c1158 | [
"MIT"
] | null | null | null | from keras.models import Sequential
from keras.layers.convolutional import Convolution2D
from keras.layers import Activation
from keras.layers import MaxPooling2D,UpSampling2D
from keras.layers import Dropout,Dense,Flatten,BatchNormalization
from keras.optimizers import *
from keras.models import load_model
from keras ... | 32.964876 | 151 | 0.665497 |
224d35a95c4ab6a3ec550632b432e7c45b42ebbb | 2,296 | py | Python | sklearn_hierarchical_classification/tests/fixtures.py | mbaelde/sklearn-hierarchical-classification | f2cc1535b043e323a25fe0de5e26c04011dbfcb2 | [
"Apache-2.0"
] | 1 | 2019-05-06T08:26:19.000Z | 2019-05-06T08:26:19.000Z | sklearn_hierarchical_classification/tests/fixtures.py | mbaelde/sklearn-hierarchical-classification | f2cc1535b043e323a25fe0de5e26c04011dbfcb2 | [
"Apache-2.0"
] | null | null | null | sklearn_hierarchical_classification/tests/fixtures.py | mbaelde/sklearn-hierarchical-classification | f2cc1535b043e323a25fe0de5e26c04011dbfcb2 | [
"Apache-2.0"
] | 2 | 2020-01-21T15:43:27.000Z | 2021-06-19T02:43:59.000Z | """
Unit-test fixtures and factory methods.
"""
from itertools import product
import numpy as np
from networkx import DiGraph, gn_graph, to_dict_of_lists
from sklearn.datasets import load_digits, make_blobs
from sklearn_hierarchical_classification.classifier import HierarchicalClassifier
from sklearn_hierarchical_cl... | 24.956522 | 83 | 0.674652 |
e7734257d9cb59926c0bf306176dce287b5015c6 | 7,033 | py | Python | Other_samples/Gradient_check/gradient_check.py | rustatian/ml_samples | 688e8b73db62105e62bc8c690f02ae03b4a3abfa | [
"MIT"
] | 2 | 2018-03-02T20:59:39.000Z | 2018-04-20T13:09:01.000Z | Other_samples/Gradient_check/gradient_check.py | ValeryPiashchynski/Python-Machine-Learning-Samples | 688e8b73db62105e62bc8c690f02ae03b4a3abfa | [
"MIT"
] | null | null | null | Other_samples/Gradient_check/gradient_check.py | ValeryPiashchynski/Python-Machine-Learning-Samples | 688e8b73db62105e62bc8c690f02ae03b4a3abfa | [
"MIT"
] | 1 | 2020-08-30T23:47:43.000Z | 2020-08-30T23:47:43.000Z | import numpy as np
from Other_samples.testCases import *
from Other_samples.Gradient_check.gc_utils import sigmoid, relu, dictionary_to_vector, vector_to_dictionary, \
gradients_to_vector
def forward_propagation(x, theta):
"""
Implement the linear forward propagation (compute J) presented in Figure 1 (J(... | 31.119469 | 133 | 0.628039 |
442c7e2118f64c07aaa9b1cb5dc6549d083e7251 | 393 | py | Python | dgpolygon/dgpolygon/wsgi.py | mariohmol/django-google-polygon | 9d9448e540a4d100d925d7170425143f126e2174 | [
"MIT"
] | 1 | 2018-04-28T17:06:23.000Z | 2018-04-28T17:06:23.000Z | dgpolygon/dgpolygon/wsgi.py | mariohmol/django-google-polygon | 9d9448e540a4d100d925d7170425143f126e2174 | [
"MIT"
] | null | null | null | dgpolygon/dgpolygon/wsgi.py | mariohmol/django-google-polygon | 9d9448e540a4d100d925d7170425143f126e2174 | [
"MIT"
] | null | null | null | """
WSGI config for dgpolygon project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dgpolygon.settings")
from django.co... | 26.2 | 78 | 0.791349 |
8d89969bbd5e89d9376f817e2888952a8889df52 | 16,310 | py | Python | v0.5.0/google/cloud_v3.8/resnet-tpuv3-8/code/resnet/model/staging/models/rough/resnet/resnet_model.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-07T18:52:33.000Z | 2019-07-06T12:48:18.000Z | v0.5.0/google/cloud_v3.8/resnet-tpuv3-8/code/resnet/model/staging/models/rough/resnet/resnet_model.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 12 | 2018-12-13T18:04:36.000Z | 2019-06-14T20:49:33.000Z | v0.5.0/google/cloud_v3.8/resnet-tpuv3-8/code/resnet/model/staging/models/rough/resnet/resnet_model.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.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... | 37.580645 | 80 | 0.682526 |
8ce686f71107e9a95f76a5ffce1ae064416bd951 | 425 | py | Python | config/appsettings.py | ramkrishna70/websvnmanager | e5042427bd081696e3d4862d7b0b27f2a5a031ee | [
"Apache-2.0"
] | null | null | null | config/appsettings.py | ramkrishna70/websvnmanager | e5042427bd081696e3d4862d7b0b27f2a5a031ee | [
"Apache-2.0"
] | null | null | null | config/appsettings.py | ramkrishna70/websvnmanager | e5042427bd081696e3d4862d7b0b27f2a5a031ee | [
"Apache-2.0"
] | null | null | null | #
# File Name: appsettings.py
#
# Version: 1.0.0
#
# Application Name: websvnmanager
#
# Author: Ram Krishna Kumar
#
# Email: ramkrishna70@live.com
#
# Origin: India
#
# License: Apache License 2.0
#
# This file contens the details about the app settings. The layer1
# configs, which will be loaded globally to use in ... | 21.25 | 80 | 0.731765 |
fd9624b4d8b959e7b9d172c0a1556fca5d77daee | 1,382 | py | Python | python/example_code/sqs/long_polling_existing_queue.py | onehitcombo/aws-doc-sdk-examples | 03e2e0c5dee75c5decbbb99e849c51417521fd82 | [
"Apache-2.0"
] | 3 | 2021-01-19T20:23:17.000Z | 2021-01-19T21:38:59.000Z | python/example_code/sqs/long_polling_existing_queue.py | onehitcombo/aws-doc-sdk-examples | 03e2e0c5dee75c5decbbb99e849c51417521fd82 | [
"Apache-2.0"
] | null | null | null | python/example_code/sqs/long_polling_existing_queue.py | onehitcombo/aws-doc-sdk-examples | 03e2e0c5dee75c5decbbb99e849c51417521fd82 | [
"Apache-2.0"
] | 2 | 2019-12-27T13:58:00.000Z | 2020-05-21T18:35:40.000Z | # snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.]
# snippet-sourcedescription:[long_polling_existing_queue.py demonstrates how to set the default number of seconds to wait between retrieving a message.]
# snippet-service:[sqs]
# snippet-keyword:[Amazon Simple Queue Service]
# ... | 41.878788 | 153 | 0.741679 |
b4392a0dd553d4b5596b0b3a8b847c093070b42c | 5,694 | py | Python | miqssr/conformer_generation/psearch_master/read_input.py | dzankov/3D-MIL-QSSR | a66dd78412188d43843cb253736af63f9318d8c8 | [
"MIT"
] | null | null | null | miqssr/conformer_generation/psearch_master/read_input.py | dzankov/3D-MIL-QSSR | a66dd78412188d43843cb253736af63f9318d8c8 | [
"MIT"
] | null | null | null | miqssr/conformer_generation/psearch_master/read_input.py | dzankov/3D-MIL-QSSR | a66dd78412188d43843cb253736af63f9318d8c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# author : Pavel Polishchuk
# date : 13.07.16
# license : BSD-3
#==============================================================================
__author__ = 'pavel'
import os
import sys
import gzip
import pickle
from rdkit import Chem
from rdkit.Chem.PropertyMol impo... | 35.5875 | 132 | 0.561468 |
bdeb501e30684e9f0b7bbdd153ba8fbfb55ed55a | 7,882 | bzl | Python | bazel/envoy_build_system.bzl | gumpt/envoy | e0ea5302d7966f02fa492321479e96f5dc0a5838 | [
"Apache-2.0"
] | 59 | 2020-08-26T11:10:08.000Z | 2022-03-15T01:40:47.000Z | bazel/envoy_build_system.bzl | gumpt/envoy | e0ea5302d7966f02fa492321479e96f5dc0a5838 | [
"Apache-2.0"
] | 624 | 2020-10-19T12:21:29.000Z | 2021-05-09T22:47:00.000Z | bazel/envoy_build_system.bzl | gumpt/envoy | e0ea5302d7966f02fa492321479e96f5dc0a5838 | [
"Apache-2.0"
] | 77 | 2020-10-13T01:34:04.000Z | 2021-04-14T08:31:39.000Z | # The main Envoy bazel file. Load this file for all Envoy-specific build macros
# and rules that you'd like to use in your BUILD files.
load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external")
load(":envoy_binary.bzl", _envoy_cc_binary = "envoy_cc_binary")
load(":envoy_internal.bzl", "envoy_external_dep_... | 38.827586 | 169 | 0.719614 |
3c5e3933e01da44c4aab57c6bfc51b2d75b43ff8 | 306 | py | Python | erri/python/lesson_26/tableau_test.py | TGITS/programming-workouts | 799e805ccf3fd0936ec8ac2417f7193b8e9bcb55 | [
"MIT"
] | null | null | null | erri/python/lesson_26/tableau_test.py | TGITS/programming-workouts | 799e805ccf3fd0936ec8ac2417f7193b8e9bcb55 | [
"MIT"
] | 16 | 2020-05-30T12:38:13.000Z | 2022-02-19T09:23:31.000Z | erri/python/lesson_26/tableau_test.py | TGITS/programming-workouts | 799e805ccf3fd0936ec8ac2417f7193b8e9bcb55 | [
"MIT"
] | null | null | null | import tableau
def test_séparation_positif_negatif():
input = [0, -1, 2, -2, 1, -3, 5, -9]
t_positif = [0, 2, 1, 5]
t_negatif = [-1, -2, -3, -9]
r_t_positif, r_t_negatif = tableau.séparation_positif_negatif(input)
assert(t_positif == r_t_positif)
assert(t_negatif == r_t_negatif)
| 27.818182 | 72 | 0.647059 |
92c33ce83cc4ad44298de73ce02e4464a144529a | 692 | py | Python | notescribe/__init__.py | SatvikR/notescribe | 8ac46297407065a920595768410be18da14d6256 | [
"Apache-2.0"
] | null | null | null | notescribe/__init__.py | SatvikR/notescribe | 8ac46297407065a920595768410be18da14d6256 | [
"Apache-2.0"
] | null | null | null | notescribe/__init__.py | SatvikR/notescribe | 8ac46297407065a920595768410be18da14d6256 | [
"Apache-2.0"
] | null | null | null | import json
from flask import Flask
import os.path
UPLOAD_FOLDER = os.path.join('object_storage', 'uploads')
WAV_FOLDER = os.path.join('object_storage', 'wav')
MIDI_FOLDER = os.path.join('object_storage', 'midi')
LILYPOND_FOLDER = os.path.join('object_storage', 'lilypond')
IMAGES_FOLDER = os.path.join('object_storage'... | 31.454545 | 64 | 0.726879 |
bf973bee2aca43517cc83bebae28cb43d6604f40 | 2,446 | py | Python | examples/test_stream_simplest.py | maij/pico-python | ce7f580baff069a8fe9137c58404ac8f6224a8f5 | [
"BSD-2-Clause"
] | null | null | null | examples/test_stream_simplest.py | maij/pico-python | ce7f580baff069a8fe9137c58404ac8f6224a8f5 | [
"BSD-2-Clause"
] | null | null | null | examples/test_stream_simplest.py | maij/pico-python | ce7f580baff069a8fe9137c58404ac8f6224a8f5 | [
"BSD-2-Clause"
] | null | null | null | from picoscope import ps5000a
import pylab as pl
import numpy as np
from time import sleep
ps=ps5000a.PS5000a()
ps.setChannel("A",enabled=True, coupling="DC", VRange=2)
ps.setChannel("B",enabled=True, coupling="DC", VRange=2)
ps.setNoOfCaptures(1)
ps.memorySegments(1)
sampleRate=3e6
acquisitionTime=0.1 # Not entirely ... | 33.054054 | 143 | 0.69583 |
970adc00b75e6a5f0e34300ff5f164b3fe538588 | 1,019 | py | Python | healthbuddy_backend/rapidpro/migrations/0005_channel_dailychannelcount.py | Asfak06/health-buddy | 1a40a35a95bc4179a44445ed0c0b9dc32360e0bc | [
"MIT"
] | null | null | null | healthbuddy_backend/rapidpro/migrations/0005_channel_dailychannelcount.py | Asfak06/health-buddy | 1a40a35a95bc4179a44445ed0c0b9dc32360e0bc | [
"MIT"
] | null | null | null | healthbuddy_backend/rapidpro/migrations/0005_channel_dailychannelcount.py | Asfak06/health-buddy | 1a40a35a95bc4179a44445ed0c0b9dc32360e0bc | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-10-05 13:50
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('rapidpro', '0004_dailygroupcount_group'),
]
operations = [
migrations.CreateModel(
name='Channe... | 32.870968 | 138 | 0.585868 |
f9d6d17dc0a621bf69cbbb5c29e51ebc7e8f9323 | 3,702 | py | Python | examples/dgcnn_segmentation.py | LingxiaoShawn/pytorch_geometric | 50b7bfc4a59b5b6f7ec547ff862985f3b2e22798 | [
"MIT"
] | 1 | 2022-02-21T13:23:19.000Z | 2022-02-21T13:23:19.000Z | examples/dgcnn_segmentation.py | LingxiaoShawn/pytorch_geometric | 50b7bfc4a59b5b6f7ec547ff862985f3b2e22798 | [
"MIT"
] | null | null | null | examples/dgcnn_segmentation.py | LingxiaoShawn/pytorch_geometric | 50b7bfc4a59b5b6f7ec547ff862985f3b2e22798 | [
"MIT"
] | null | null | null | import os.path as osp
import torch
import torch.nn.functional as F
import torch_geometric.transforms as T
from torch_geometric.datasets import ShapeNet
from torch_geometric.loader import DataLoader
from torch_geometric.nn import MLP, DynamicEdgeConv
from torch_geometric.utils import intersection_and_union as i_and_u
... | 34.598131 | 79 | 0.63074 |
5bc530ba1e773cd280d2ba279df1593e41a734b7 | 16,131 | py | Python | site_scons/libdeps.py | ibrarahmad/percona-server-mongodb | 57fd79b5e5aada71bc094d068ebbf5e6df069147 | [
"Apache-2.0"
] | 1 | 2019-01-16T12:59:12.000Z | 2019-01-16T12:59:12.000Z | site_scons/libdeps.py | ibrarahmad/percona-server-mongodb | 57fd79b5e5aada71bc094d068ebbf5e6df069147 | [
"Apache-2.0"
] | null | null | null | site_scons/libdeps.py | ibrarahmad/percona-server-mongodb | 57fd79b5e5aada71bc094d068ebbf5e6df069147 | [
"Apache-2.0"
] | null | null | null | """Extension to SCons providing advanced static library dependency tracking.
These modifications to a build environment, which can be attached to
StaticLibrary and Program builders via a call to setup_environment(env),
cause the build system to track library dependencies through static libraries,
and to add them to th... | 40.632242 | 133 | 0.673052 |
555ad1437b4761503d5626e57aa3a9e8eff7ce54 | 1,379 | py | Python | enaml/tests/old/components/window.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 11 | 2015-01-04T14:29:23.000Z | 2019-12-25T05:38:37.000Z | enaml/tests/old/components/window.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 36 | 2015-02-20T00:56:53.000Z | 2020-12-04T10:02:14.000Z | enaml/tests/old/components/window.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 3 | 2015-11-19T15:11:37.000Z | 2019-03-11T23:45:02.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2011, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
from .enaml_test_case import EnamlTestCase, required_method
class TestWindow(EnamlTestCase):
... | 27.58 | 79 | 0.474257 |
d522338cecaefcd04df1d16312698f52fa781486 | 758 | py | Python | adapters/icasa/__init__.py | michahagg/domoticz-zigbee2mqtt-plugin | 0d891a0bd96ed26547904ae8402a26e684dc8e35 | [
"MIT"
] | null | null | null | adapters/icasa/__init__.py | michahagg/domoticz-zigbee2mqtt-plugin | 0d891a0bd96ed26547904ae8402a26e684dc8e35 | [
"MIT"
] | null | null | null | adapters/icasa/__init__.py | michahagg/domoticz-zigbee2mqtt-plugin | 0d891a0bd96ed26547904ae8402a26e684dc8e35 | [
"MIT"
] | null | null | null | from adapters.dimmable_bulb_adapter import DimmableBulbAdapter
from adapters.dimmable_ct_bulb_adapter import DimmableCtBulbAdapter
from adapters.on_off_switch_adapter import OnOffSwitchAdapter
from adapters.icasa.KPD14S import KPD14S
from adapters.icasa.KPD18S import KPD18S
icasa_adapters = {
'ICZB-IW11D': Dimmab... | 47.375 | 112 | 0.754617 |
f269c7a43f0409d4fb3d9fb0f9d50266e00df29d | 3,938 | py | Python | rapid7vmconsole/models/resources_role.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 61 | 2018-05-17T05:57:09.000Z | 2022-03-08T13:59:21.000Z | rapid7vmconsole/models/resources_role.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 33 | 2018-06-26T16:21:14.000Z | 2022-03-03T20:55:47.000Z | rapid7vmconsole/models/resources_role.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 43 | 2018-02-24T05:45:53.000Z | 2022-03-31T22:15:16.000Z | # coding: utf-8
"""
Python InsightVM API Client
OpenAPI spec version: 3
Contact: support@rapid7.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ResourcesRole(object):
"""NOTE: This class is auto generated by the s... | 27.347222 | 80 | 0.562722 |
78593253a18bb7e1163fba63f9306ad4428e5d6f | 504 | py | Python | plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name='familysrc',
parent_name='scatterpolar.hoverlabel.font',
**kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_na... | 26.526316 | 68 | 0.615079 |
e2e94cfaacaf24182c6b5059f7854cc8f8f890f9 | 674 | py | Python | libs/external_libs/pownce-api-0.2/setup.py | google-code-export/django-hotclub | d783a5bbcc06816289565f3eae6d99461188ca4a | [
"MIT"
] | 3 | 2015-12-25T14:45:36.000Z | 2016-11-28T09:58:03.000Z | libs/external_libs/pownce-api-0.2/setup.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | libs/external_libs/pownce-api-0.2/setup.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(name='pownce-api',
version='0.2',
description='A Python interface to the Pownce API',
author='James Bennett',
author_email='james@b-list.org',
url='http://code.google.com/p/python-pownce-api/',
py_modules=['pownce'],
classifiers=['Develop... | 37.444444 | 60 | 0.548961 |
4954b94edb77f7c79dfec897476f87a46520710e | 1,490 | py | Python | profiles_api/views.py | stellavoyage/profiles-rest-api | 5a71484da8a1d327944aeb9a5138d1af4c0e803e | [
"MIT"
] | null | null | null | profiles_api/views.py | stellavoyage/profiles-rest-api | 5a71484da8a1d327944aeb9a5138d1af4c0e803e | [
"MIT"
] | null | null | null | profiles_api/views.py | stellavoyage/profiles-rest-api | 5a71484da8a1d327944aeb9a5138d1af4c0e803e | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from profiles_api import serializers
class HelloApiView(APIView):
serializer_class = serializers.HelloSerializer
def get(self, request, format = None):
an_apiview = [ 'Uses HTTP Me... | 31.041667 | 87 | 0.632215 |
b4f5c45728f691a9009aa6f4db544a3670b7d1bd | 270 | py | Python | readthedocs/restapi/urls.py | ludia/readthedocs.org | 636c2bd57b417c4d73657d2517efaf4258dd75c1 | [
"MIT"
] | 1 | 2021-11-12T23:52:23.000Z | 2021-11-12T23:52:23.000Z | readthedocs/restapi/urls.py | titilambert/readthedocs.org | 774611db90fea94c3ae4d7de4726f010ab01ddab | [
"MIT"
] | null | null | null | readthedocs/restapi/urls.py | titilambert/readthedocs.org | 774611db90fea94c3ae4d7de4726f010ab01ddab | [
"MIT"
] | null | null | null | # Not used currently.
from rest_framework import routers
from .views import ProjectViewSet, NotificationViewSet
router = routers.DefaultRouter()
router.register(r'project', ProjectViewSet)
router.register(r'notification', NotificationViewSet)
urlpatterns = router.urls
| 30 | 54 | 0.82963 |
00f6264f59187eaea6fe98c7f2200ea5a03db3c9 | 3,880 | py | Python | botocore/__init__.py | hellysmile/botocore | 24a793947edef9068d5256e71d181926466832b4 | [
"Apache-2.0"
] | null | null | null | botocore/__init__.py | hellysmile/botocore | 24a793947edef9068d5256e71d181926466832b4 | [
"Apache-2.0"
] | null | null | null | botocore/__init__.py | hellysmile/botocore | 24a793947edef9068d5256e71d181926466832b4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http... | 39.191919 | 78 | 0.703866 |
f57061bb592444c80bd96fdd8677edffea963485 | 42,801 | py | Python | teuthology/openstack/test/test_openstack.py | varshar16/teuthology | 321319b12ea4ff9b63c7655015a3156de2c3b279 | [
"MIT"
] | 117 | 2015-03-24T17:30:44.000Z | 2022-03-27T13:29:55.000Z | teuthology/openstack/test/test_openstack.py | varshar16/teuthology | 321319b12ea4ff9b63c7655015a3156de2c3b279 | [
"MIT"
] | 1,014 | 2015-01-05T21:33:17.000Z | 2022-03-31T13:10:09.000Z | teuthology/openstack/test/test_openstack.py | varshar16/teuthology | 321319b12ea4ff9b63c7655015a3156de2c3b279 | [
"MIT"
] | 237 | 2015-01-04T03:37:42.000Z | 2022-03-31T16:53:19.000Z | #
# Copyright (c) 2015,2016 Red Hat, Inc.
#
# Author: Loic Dachary <loic@dachary.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the r... | 25.236439 | 245 | 0.52403 |
9d1a3eb100ebe21888b4df5c30796a2bd48f0ec4 | 2,679 | py | Python | commands/servercheck.py | nstra111/autovc | e73e1fea7b566721c3dce3ca6f587472e7ee9d1b | [
"MIT"
] | 177 | 2020-02-02T18:03:46.000Z | 2022-03-17T06:18:43.000Z | commands/servercheck.py | zigsphere/Auto-Voice-Channels | 6ae901728580bef4246737a6f1b9f10763badd3e | [
"MIT"
] | 82 | 2020-02-02T17:43:18.000Z | 2022-03-24T20:34:55.000Z | commands/servercheck.py | zigsphere/Auto-Voice-Channels | 6ae901728580bef4246737a6f1b9f10763badd3e | [
"MIT"
] | 165 | 2019-02-17T20:15:20.000Z | 2022-03-27T23:59:23.000Z | import cfg
import discord
import functions as func
from commands.base import Cmd
help_text = [
[
("Usage:", "<PREFIX><COMMAND>"),
("Description:",
"Get information about this server, such as the voice channels I know about and the Patreon status."),
]
]
def permission_checks(channel,... | 35.72 | 119 | 0.552072 |
abc8c749917737c7b6d41407dfd6e0e43c1027d5 | 3,235 | py | Python | todo/api_1_0/auth.py | l769829723/todo | 7c2da38996d244709e0b7a2041e1e973f6b2743b | [
"MIT"
] | null | null | null | todo/api_1_0/auth.py | l769829723/todo | 7c2da38996d244709e0b7a2041e1e973f6b2743b | [
"MIT"
] | null | null | null | todo/api_1_0/auth.py | l769829723/todo | 7c2da38996d244709e0b7a2041e1e973f6b2743b | [
"MIT"
] | null | null | null | from flask import jsonify
from flask_restful import Resource
from flask_restful import reqparse
from flask_restful import fields
from flask_restful import marshal
from flask_restful import abort
from flask import request
from flask_jwt_extended import create_access_token, jwt_required, get_jwt_identity, fresh_jwt_requi... | 27.415254 | 102 | 0.611747 |
e60b377d9d3aa19aee17bcddf0fd58f95eb3bae5 | 11,959 | py | Python | MLP/lib/Optimizer_xrh.py | Xinrihui/Statistical-Learning-Method | 2e1c107bed8a21307596fbe0f8f1daed638657c5 | [
"Apache-2.0"
] | 2 | 2021-06-25T06:42:14.000Z | 2021-11-07T13:44:29.000Z | MLP/lib/Optimizer_xrh.py | Xinrihui/Statistical-Learning-Method | 2e1c107bed8a21307596fbe0f8f1daed638657c5 | [
"Apache-2.0"
] | null | null | null | MLP/lib/Optimizer_xrh.py | Xinrihui/Statistical-Learning-Method | 2e1c107bed8a21307596fbe0f8f1daed638657c5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import numpy as np
import math
import time
class Optimizer:
"""
优化算法
class BGDOptimizer 批量梯度下降(BGD)
class MinBatchOptimizer Mini-batch 梯度下降
class MomentumOptimizer 带动量(Momentum)的 Mini-batch 梯度下降
class AdamOptimizer Adam Mini-batch 梯度下降
Author... | 28.747596 | 142 | 0.570365 |
d90fb70cbc23afb93f6c44e8e7224c204db315e9 | 541 | py | Python | WebMirror/management/rss_parser_funcs/feed_parse_extractAmenalongeCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 193 | 2016-08-02T22:04:35.000Z | 2022-03-09T20:45:41.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractAmenalongeCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 533 | 2016-08-23T20:48:23.000Z | 2022-03-28T15:55:13.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractAmenalongeCom.py | rrosajp/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 19 | 2015-08-13T18:01:08.000Z | 2021-07-12T17:13:09.000Z |
def extractAmenalongeCom(item):
'''
Parser for 'amenalonge.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('PRC', 'PRC', 'translated'),
('Loiterous', 'Loiterous... | 24.590909 | 104 | 0.628466 |
fe4050a0d73152b4e4816041bcbc5ce45a2b57a8 | 9,715 | py | Python | codes/b_environments/rotary_inverted_pendulum/rip_service_pb2_grpc.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | codes/b_environments/rotary_inverted_pendulum/rip_service_pb2_grpc.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | null | null | null | codes/b_environments/rotary_inverted_pendulum/rip_service_pb2_grpc.py | linklab/link_rl | e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99 | [
"MIT"
] | 1 | 2021-11-23T12:30:37.000Z | 2021-11-23T12:30:37.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from codes.b_environments.rotary_inverted_pendulum import rip_service_pb2 as rip__service__pb2
class RDIPStub(object):
"""Missing associated documentation ... | 41.875 | 94 | 0.642717 |
d497a7fe3e96cec4a383c34db1f8f2bdbccdf63c | 1,357 | py | Python | devon/web/call.py | joehewitt/devon | 5b11265e5eae3db7bfaeb49543a2a6293bd15557 | [
"BSD-3-Clause"
] | 3 | 2015-12-25T16:26:02.000Z | 2016-05-08T18:19:25.000Z | devon/web/call.py | joehewitt/devon | 5b11265e5eae3db7bfaeb49543a2a6293bd15557 | [
"BSD-3-Clause"
] | null | null | null | devon/web/call.py | joehewitt/devon | 5b11265e5eae3db7bfaeb49543a2a6293bd15557 | [
"BSD-3-Clause"
] | 1 | 2021-07-13T07:17:01.000Z | 2021-07-13T07:17:01.000Z |
import devon.jump, devon.code.sync
import xmlrpclib, sys
# **************************************************************************************************
def main(request):
params, method = xmlrpclib.loads(request.data)
try:
fn = eval(method)
except:
fn = None
result = xml... | 31.55814 | 100 | 0.596168 |
6f1389dbc4eea08c7e86e63ce1d7435f63b03ede | 838 | py | Python | deepensemble/utils/utils_translation.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | 1 | 2017-11-22T15:35:45.000Z | 2017-11-22T15:35:45.000Z | deepensemble/utils/utils_translation.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | null | null | null | deepensemble/utils/utils_translation.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | 1 | 2021-12-14T04:16:57.000Z | 2021-12-14T04:16:57.000Z | from .singleton import Singleton
__all__ = ['TextTranslation']
# noinspection PyMissingConstructor
class TextTranslation(Singleton):
def __init__(self):
self.current_language = 'es' # Default Language
self.dict_trans = {}
self._load_language()
def get_str(self, name_str):
r... | 27.032258 | 106 | 0.637232 |
a067863071f2d9af2d9c78477ec1c9a93d3f4507 | 58,487 | py | Python | src/ptvsd/common/messaging.py | int19h/ptvsd | 55aa650e3e5fff91a3804a59dbf20ff3583be238 | [
"MIT"
] | 349 | 2019-05-07T00:15:12.000Z | 2022-03-10T15:05:08.000Z | src/ptvsd/common/messaging.py | WooSung-Jung/ptvsd | 99c8513921021d2cc7cd82e132b65c644c256768 | [
"MIT"
] | 1,095 | 2018-03-01T00:50:11.000Z | 2019-05-06T17:44:15.000Z | src/ptvsd/common/messaging.py | WooSung-Jung/ptvsd | 99c8513921021d2cc7cd82e132b65c644c256768 | [
"MIT"
] | 53 | 2018-03-01T00:33:57.000Z | 2019-05-05T00:50:23.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
from __future__ import absolute_import, division, print_function, unicode_literals
"""An implementation of the session and presentation layers as used in the Debug
A... | 37.684923 | 103 | 0.611093 |
d67887a42871ec4868a9db8ce98405a7c5d80f28 | 3,614 | py | Python | flask_svgbarcode/__init__.py | lysdexia/flask-svg-barcode | f0a54a03d1728cfcc43c65e6897efe8f7fde387a | [
"MIT"
] | null | null | null | flask_svgbarcode/__init__.py | lysdexia/flask-svg-barcode | f0a54a03d1728cfcc43c65e6897efe8f7fde387a | [
"MIT"
] | null | null | null | flask_svgbarcode/__init__.py | lysdexia/flask-svg-barcode | f0a54a03d1728cfcc43c65e6897efe8f7fde387a | [
"MIT"
] | null | null | null | import barcode
from flask.ext import restful
from flask_restful import reqparse, abort
try:
from flask import _app_ctx_stack as stack
except ImportError:
from flask import _request_ctx_stack as stack
def svg_barcode(app, endpoint):
"""
flask extension providing tissue thin wrapper around pybarcode
... | 32.854545 | 158 | 0.552297 |
bb4d65081f8aeaf728ae1a56800d6b610b915436 | 3,861 | py | Python | Server/ConsoleGameFunctions.py | kjones1511/Blackjack-Flask | 33f5cabf60ac254602ac19a1afaf25854a2d7c4b | [
"MIT"
] | null | null | null | Server/ConsoleGameFunctions.py | kjones1511/Blackjack-Flask | 33f5cabf60ac254602ac19a1afaf25854a2d7c4b | [
"MIT"
] | null | null | null | Server/ConsoleGameFunctions.py | kjones1511/Blackjack-Flask | 33f5cabf60ac254602ac19a1afaf25854a2d7c4b | [
"MIT"
] | null | null | null | from bjObjects import *
def initializeDeck(deckCount):
deck = Deck(deckCount)
deck.shuffle()
return deck
def initializeOnePlayer(players, data, casino):
playerName = choice = input("Enter Player Name: ")
players.append(Player(playerName, 100))
# begin recording
data["player"] = playerName
data["casino"] = ca... | 37.852941 | 104 | 0.69179 |
f212783bc169b845bb8a38d497a9ac6b65874273 | 259 | py | Python | setup.py | Karalius/tesla_factory | 187628f8b840d54ecb879f6cc8d5ab2826623d0f | [
"MIT"
] | null | null | null | setup.py | Karalius/tesla_factory | 187628f8b840d54ecb879f6cc8d5ab2826623d0f | [
"MIT"
] | null | null | null | setup.py | Karalius/tesla_factory | 187628f8b840d54ecb879f6cc8d5ab2826623d0f | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='Tesla_factory',
version='1.0',
packages=[''],
package_dir={'': 'tesla'},
url='',
license='',
author='Karalius',
author_email='tesla@tesla.com',
description='Tesla class package'
)
| 18.5 | 37 | 0.606178 |
591a682db297ba10d065c72bf1ed734fd37cab14 | 2,290 | py | Python | pycatia/knowledge_interfaces/enum_param.py | evereux/catia_python | 08948585899b12587b0415ce3c9191a408b34897 | [
"MIT"
] | 90 | 2019-02-21T10:05:28.000Z | 2022-03-19T01:53:41.000Z | pycatia/knowledge_interfaces/enum_param.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | 99 | 2019-05-21T08:29:12.000Z | 2022-03-25T09:55:15.000Z | pycatia/knowledge_interfaces/enum_param.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | 26 | 2019-04-04T06:31:36.000Z | 2022-03-30T07:24:47.000Z | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... | 30.131579 | 108 | 0.500873 |
97da9dbd8f62272a86faf28029ac7ca8d8cec1ed | 955 | py | Python | lib/apikey/test/load_credentials_sample.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 12 | 2018-11-20T04:30:49.000Z | 2021-11-09T12:34:26.000Z | lib/apikey/test/load_credentials_sample.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 1 | 2019-01-24T15:56:15.000Z | 2019-05-31T07:56:55.000Z | lib/apikey/test/load_credentials_sample.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 6 | 2018-06-29T03:45:50.000Z | 2022-03-18T01:51:45.000Z | # coding: utf-8
from __future__ import absolute_import
import time
import thread
import datetime
from ncloud_apikey.credentials import CredentialsResolver
def test_load_credentials(tid, time_to_sleep, credentials):
print('thread %d, now %s, sleep %ss' % (tid, datetime.datetime.now().time(), time_to_sleep))
... | 29.84375 | 110 | 0.710995 |
2ec6abee9fe17dfd25af91e759cef8fd864a577f | 4,070 | py | Python | ucsmsdk/mometa/sw/SwUtilityDomainFsmStage.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/sw/SwUtilityDomainFsmStage.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/sw/SwUtilityDomainFsmStage.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for SwUtilityDomainFsmStage ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class SwUtilityDomainFsmStageConsts:
LAST_UPDATE_TIME_ = ""
NAME_DEPLOY_BEGIN = "DeployBegin"
... | 55.753425 | 265 | 0.647174 |
5e1fe06e8b2eafd7dab49abf9b27304b0c167951 | 413 | py | Python | fidget/__init__.py | angr/fidget | 0f255bbd11c6721d39581c5d3d2863fce5fad785 | [
"BSD-2-Clause"
] | 44 | 2016-08-08T14:32:43.000Z | 2021-11-28T23:33:09.000Z | fidget/__init__.py | angr/fidget | 0f255bbd11c6721d39581c5d3d2863fce5fad785 | [
"BSD-2-Clause"
] | null | null | null | fidget/__init__.py | angr/fidget | 0f255bbd11c6721d39581c5d3d2863fce5fad785 | [
"BSD-2-Clause"
] | 8 | 2016-09-13T22:39:49.000Z | 2020-05-24T18:51:57.000Z | from .patching import Fidget
from .binary_data import BinaryData
from .new_analysis import OffsetAnalysis
from .techniques import FidgetTechnique, FidgetDefaultTechnique
from .memory import register_fidget_preset
def patch_file(infile, outfile, options):
fidgetress = Fidget(infile, **options.pop('Fidget', {}))
... | 31.769231 | 63 | 0.801453 |
6a945c431fc016feef669e5b8c4f0cdfbf94feeb | 603 | py | Python | books/masteringPython/cp07/concepts.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | books/masteringPython/cp07/concepts.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | books/masteringPython/cp07/concepts.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | # chapter 7 asyncio
# concepts of asyncio
# main concepts: coroutines and event loops
# helper class: Streams, Futures, Processes
# create_task and ensure_future
import asyncio
async def sleeper(delay):
await asyncio.sleep(delay)
print('Finished sleeper with delay: %d' % delay)
# create an event loop
loop ... | 23.192308 | 78 | 0.749585 |
ef42a11d4ca425c87c562a2184a292f9bacac119 | 5,013 | py | Python | scripts/offsets_cmd.py | LoneWanderer-GH/nlohmann-json-gdb | a2bf71e8e0825e71262c6555be6657554835ebb5 | [
"MIT"
] | 6 | 2020-05-23T11:38:42.000Z | 2021-11-11T06:55:16.000Z | scripts/offsets_cmd.py | LoneWanderer-GH/nlohmann-json-gdb | a2bf71e8e0825e71262c6555be6657554835ebb5 | [
"MIT"
] | 3 | 2020-04-23T21:54:14.000Z | 2020-06-23T07:35:53.000Z | scripts/offsets_cmd.py | LoneWanderer-GH/nlohmann-json-gdb | a2bf71e8e0825e71262c6555be6657554835ebb5 | [
"MIT"
] | null | null | null | #
# Licensed under the MIT License <http://opensource.org/licenses/MIT>.
# SPDX-License-Identifier: MIT
# Copyright (c) 2020 LoneWanderer-GH https://github.com/LoneWanderer-GH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "... | 55.087912 | 191 | 0.708159 |
e19d6a17b9d46ea2fc4125f6e5809a1184fcd06a | 1,046 | py | Python | 10/JackConst.py | aadityarautela/nand2tetris | 64768087ae5f6903beeb17a01492d68d7b2354f6 | [
"MIT"
] | null | null | null | 10/JackConst.py | aadityarautela/nand2tetris | 64768087ae5f6903beeb17a01492d68d7b2354f6 | [
"MIT"
] | null | null | null | 10/JackConst.py | aadityarautela/nand2tetris | 64768087ae5f6903beeb17a01492d68d7b2354f6 | [
"MIT"
] | null | null | null | T_KEYWORD = 0
T_SYM = 1
T_NUM = 2
T_STR = 3
T_ID = 4
T_ERROR = 5
KW_CLASS = 'class'
KW_METHOD = 'method'
KW_FUNCTION = 'function'
KW_CONSTRUCTOR = 'constructor'
KW_INT = 'int'
KW_BOOLEAN = 'boolean'
KW_CHAR = 'char'
KW_VOID ... | 25.512195 | 81 | 0.525813 |
feeb63df5e39fdf1bf4e0c5da99d1e55cec43ac9 | 39,010 | py | Python | qa/rpc-tests/test_framework/mininode.py | crowdcoinChain/Crowdcoin-Exp | e5e1cbaee01ea0c8757f28e63ae1615b363c96e9 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/mininode.py | crowdcoinChain/Crowdcoin-Exp | e5e1cbaee01ea0c8757f28e63ae1615b363c96e9 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/mininode.py | crowdcoinChain/Crowdcoin-Exp | e5e1cbaee01ea0c8757f28e63ae1615b363c96e9 | [
"MIT"
] | null | null | null | # mininode.py - Crowdcoin P2P network half-a-node
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# This python code was modified from ArtForz' public domain half-a-node, as
# found in the mini-node branch of http://github... | 29.155456 | 184 | 0.569982 |
4974ed92e1aabe97565f0857b010bd9bbf25168e | 145,818 | py | Python | src/transformers/generation_utils.py | alvinwatner/transformers_constraint | ba8281e34244c3b5bbc33c70b762b147a50ee020 | [
"Apache-2.0"
] | null | null | null | src/transformers/generation_utils.py | alvinwatner/transformers_constraint | ba8281e34244c3b5bbc33c70b762b147a50ee020 | [
"Apache-2.0"
] | null | null | null | src/transformers/generation_utils.py | alvinwatner/transformers_constraint | ba8281e34244c3b5bbc33c70b762b147a50ee020 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team.
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... | 55.401976 | 201 | 0.650359 |
3f80210353ca83d527a8565930403b6b990ffbbc | 30,262 | py | Python | jeremy/old/lhopital.py | sin3000x/manim | bd369534d29b962a321153dadacca827e06ec899 | [
"MIT"
] | null | null | null | jeremy/old/lhopital.py | sin3000x/manim | bd369534d29b962a321153dadacca827e06ec899 | [
"MIT"
] | null | null | null | jeremy/old/lhopital.py | sin3000x/manim | bd369534d29b962a321153dadacca827e06ec899 | [
"MIT"
] | null | null | null | from manimlib.imports import *
from jeremy.ref.VideoProgressBar import VideoProgressBar
class main(Scene):
CONFIG = {
"map": {"f": RED, "g": BLUE, "infty": WHITE, "forall": WHITE,"frac": WHITE,"left":WHITE, "right": WHITE, "inf": WHITE},
"infmap": {"limsup": RED, "liminf": GREEN}
}
def co... | 50.269103 | 173 | 0.534697 |
25af5e567e8e8ec6d0de43786142a9a1fa774cf4 | 585 | py | Python | whatsapp_tracker/mains/whatsapp_tracker_main.py | itay-bardugo/whatsapp_tracker | c53a309b08bf47597c8191ec0a155a1fe1536842 | [
"MIT"
] | 1 | 2021-09-25T12:22:35.000Z | 2021-09-25T12:22:35.000Z | whatsapp_tracker/mains/whatsapp_tracker_main.py | itay-bardugo/whatsapp_tracker | c53a309b08bf47597c8191ec0a155a1fe1536842 | [
"MIT"
] | null | null | null | whatsapp_tracker/mains/whatsapp_tracker_main.py | itay-bardugo/whatsapp_tracker | c53a309b08bf47597c8191ec0a155a1fe1536842 | [
"MIT"
] | null | null | null | import logging
import sys
from whatsapp_tracker.pipelines.wt_main_pipeline import WTMainPipeline
class WhatsappTrackerMain:
def __init__(self, **kwargs):
self.kwargs = kwargs
self.wt_pipeline = WTMainPipeline(**self.kwargs)
def main(self):
try:
self.wt_pipeline.setup_sele... | 24.375 | 70 | 0.637607 |
2aa4b5d699ce79e3b87e40103f4d6baae703bcdd | 1,045 | py | Python | common/xrd-ui-tests-python/tests/xroad_cs_ocsp_responder/XroadViewOcspResponder.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 3 | 2018-03-15T14:22:50.000Z | 2021-11-08T10:30:35.000Z | common/xrd-ui-tests-python/tests/xroad_cs_ocsp_responder/XroadViewOcspResponder.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 11 | 2017-04-06T09:25:41.000Z | 2018-06-04T09:08:48.000Z | common/xrd-ui-tests-python/tests/xroad_cs_ocsp_responder/XroadViewOcspResponder.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 20 | 2017-03-14T07:21:58.000Z | 2019-05-21T09:26:30.000Z | import unittest
from main.maincontroller import MainController
import ocsp_responder
class XroadViewOcspResponder(unittest.TestCase):
"""
TRUST_05 View the OCSP Responders of a CA
RIA URL: https://jira.ria.ee/browse/XTKB-192
Depends on finishing other test(s): Add OCSP
Requires helper scenarios:
... | 31.666667 | 97 | 0.629665 |
0559c58ddca05f8d414b7223ac0c886b1070dceb | 1,981 | py | Python | code/create_zanzibar_boundary_map.py | hishivshah/WorldPop | 1c0546bfc7328072e6b498732654525e02375f2b | [
"MIT"
] | null | null | null | code/create_zanzibar_boundary_map.py | hishivshah/WorldPop | 1c0546bfc7328072e6b498732654525e02375f2b | [
"MIT"
] | null | null | null | code/create_zanzibar_boundary_map.py | hishivshah/WorldPop | 1c0546bfc7328072e6b498732654525e02375f2b | [
"MIT"
] | null | null | null | import logging
import mapnik
import xml.etree.ElementTree as ET
import os
import subprocess
import tempfile
# Set up logging
logging.basicConfig(format="%(asctime)s|%(levelname)s|%(message)s", level=logging.INFO)
# Parameters
shpPath = "C:/Projects/BirthsAndPregnanciesMapping/data/2014-04-24/Zanzibar/Zanzibar.shp"
ep... | 27.513889 | 89 | 0.724886 |
c8154e03aa0d02a0613c9c2d84268e8f18658e9a | 289 | py | Python | course/2of5/exercise/exercise_8_5.py | GloryPassarello/Python | e08df3f0ac1f6376ea08740fa7d674d68c69f448 | [
"CNRI-Python",
"AAL"
] | null | null | null | course/2of5/exercise/exercise_8_5.py | GloryPassarello/Python | e08df3f0ac1f6376ea08740fa7d674d68c69f448 | [
"CNRI-Python",
"AAL"
] | null | null | null | course/2of5/exercise/exercise_8_5.py | GloryPassarello/Python | e08df3f0ac1f6376ea08740fa7d674d68c69f448 | [
"CNRI-Python",
"AAL"
] | null | null | null | fname = raw_input("Enter file name: ")
if len(fname) < 1 : fname = "mbox-short.txt"
fh = open(fname)
count = 0
for line in fh:
if line.startswith('From '):
txt = line.split()
print txt[1]
count = count + 1
print "There were", count, "lines in the file with From as the first word"
| 24.083333 | 74 | 0.657439 |
5b33f41e25e4541228fef291b4bdc07fbce2e078 | 4,683 | py | Python | src/dispersion.py | bbc/dvbcss-synctiming | f9a1848a6406e866ff493506446036dadd3d6f8c | [
"Apache-2.0"
] | 17 | 2015-03-15T17:49:37.000Z | 2021-05-07T13:05:26.000Z | src/dispersion.py | bbc/dvbcss-synctiming | f9a1848a6406e866ff493506446036dadd3d6f8c | [
"Apache-2.0"
] | 8 | 2015-03-20T11:11:19.000Z | 2018-08-01T16:49:08.000Z | src/dispersion.py | BBC/dvbcss-synctiming | f9a1848a6406e866ff493506446036dadd3d6f8c | [
"Apache-2.0"
] | 7 | 2015-07-17T10:42:08.000Z | 2019-10-11T08:44:55.000Z | #!/usr/bin/env python
#
# Copyright 2015 British Broadcasting Corporation
#
# 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 requ... | 35.748092 | 133 | 0.61435 |
ec0f6df5a10c30a8fe08a0e9533172f47a2e0aef | 1,688 | py | Python | var/spack/repos/builtin/packages/opari2/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/opari2/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/opari2/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Opari2(AutotoolsPackage):
"""OPARI2 is a source-to-source instrumentation tool for OpenMP ... | 51.151515 | 95 | 0.777251 |
70bf5d5135bfa9ea0752360374ef61b675b581a3 | 21,619 | py | Python | tests/integration/shell/test_call.py | ContextLogic/salt | f98839c72df2294cdd1670835d10904b12089622 | [
"Apache-2.0"
] | null | null | null | tests/integration/shell/test_call.py | ContextLogic/salt | f98839c72df2294cdd1670835d10904b12089622 | [
"Apache-2.0"
] | null | null | null | tests/integration/shell/test_call.py | ContextLogic/salt | f98839c72df2294cdd1670835d10904b12089622 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
tests.integration.shell.call
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
from __future__ import absolute_import
import os
import sys
import re
import shutil
from datetime import datetime
import logging
# Import Salt Te... | 37.209983 | 139 | 0.548915 |
a9eaa9475ba10a1c650bca4923933e3eff00a68a | 912 | py | Python | isi_sdk_8_2_2/test/test_ndmp_settings_dmas.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_2/test/test_ndmp_settings_dmas.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_2/test/test_ndmp_settings_dmas.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_2
from i... | 22.243902 | 90 | 0.708333 |
645ecd2ccaa20cd884d58417b03f4c6851420cdb | 11,305 | py | Python | tests/mock_decorators/test_function_mock.py | fhuertas/mock_decorator | bb8971398aa80f555089db0ca57fff5a648f5405 | [
"Apache-2.0"
] | null | null | null | tests/mock_decorators/test_function_mock.py | fhuertas/mock_decorator | bb8971398aa80f555089db0ca57fff5a648f5405 | [
"Apache-2.0"
] | null | null | null | tests/mock_decorators/test_function_mock.py | fhuertas/mock_decorator | bb8971398aa80f555089db0ca57fff5a648f5405 | [
"Apache-2.0"
] | null | null | null | import sys
import unittest
from mock_decorators.function_mock import FunctionMock
from mock_decorators.function_mock import FunctionMockResult
from mock_decorators.function_mock import FunctionMockChangeResult
from mock_decorators.function_mock import FunctionMockCheckCall
from tests.mock_decorators import module_test
... | 38.715753 | 110 | 0.681203 |
9388833b2a5fad9974140681130d7c327f102e36 | 17,770 | py | Python | tests/test_shed_upload.py | shiltemann/planemo | 6bb642c61df4af91f6c873dfc1c6c3c06d1d491a | [
"CC-BY-3.0"
] | null | null | null | tests/test_shed_upload.py | shiltemann/planemo | 6bb642c61df4af91f6c873dfc1c6c3c06d1d491a | [
"CC-BY-3.0"
] | null | null | null | tests/test_shed_upload.py | shiltemann/planemo | 6bb642c61df4af91f6c873dfc1c6c3c06d1d491a | [
"CC-BY-3.0"
] | null | null | null | """Integration tests for shed contents commands.
Specifically, tests for shed_upload, shed_download, and shed_create.
commands.
"""
import contextlib
import os
import shutil
import tarfile
from os.path import exists, join
from planemo import git
from planemo.io import shell
from .test_utils import (
assert_exists... | 40.022523 | 92 | 0.594429 |
9dd72774864456b781ff4e7d85717dcd1f0fc220 | 1,336 | py | Python | MinimumBoundingBox/test.py | winding-lines/argoverse-tracker | 9038e4407cfd850dba890acd9c1e3d3d5e44a9ed | [
"MIT"
] | 51 | 2019-10-18T03:39:15.000Z | 2022-03-19T11:21:05.000Z | MinimumBoundingBox/test.py | winding-lines/argoverse-tracker | 9038e4407cfd850dba890acd9c1e3d3d5e44a9ed | [
"MIT"
] | 1 | 2019-11-21T03:46:28.000Z | 2019-11-21T03:56:27.000Z | MinimumBoundingBox/test.py | winding-lines/argoverse-tracker | 9038e4407cfd850dba890acd9c1e3d3d5e44a9ed | [
"MIT"
] | 13 | 2019-10-18T03:40:46.000Z | 2022-03-19T11:21:15.000Z | import unittest
from MinimumBoundingBox import MinimumBoundingBox, BoundingBox
from math import pi
class TestMinimumBoundingBox(unittest.TestCase):
def test_MinimumBoundingBox(self):
bb = MinimumBoundingBox(((0, 0), (3, 0), (1, 1)))
self.assertAlmostEqual(bb.area, 3)
self.assertEqual(bb.... | 32.585366 | 84 | 0.590569 |
573285d57bdfdb26575d23500f1654599b6f9ac6 | 2,290 | py | Python | devel/rubin_obscurations.py | jmeyers314/danish | c82e455e52b3528ccfb6d8f4ab067be95dd3a7cf | [
"BSD-3-Clause"
] | null | null | null | devel/rubin_obscurations.py | jmeyers314/danish | c82e455e52b3528ccfb6d8f4ab067be95dd3a7cf | [
"BSD-3-Clause"
] | 3 | 2021-10-12T17:18:45.000Z | 2021-12-07T17:35:18.000Z | devel/rubin_obscurations.py | jmeyers314/danish | c82e455e52b3528ccfb6d8f4ab067be95dd3a7cf | [
"BSD-3-Clause"
] | 1 | 2021-12-09T14:24:05.000Z | 2021-12-09T14:24:05.000Z | import batoid
import numpy as np
import matplotlib.pyplot as plt
"""Script to use batoid to model the projection of obscurations along the beam
as a function of the incoming field angle.
"""
telescope = batoid.Optic.fromYaml("LSST_r.yaml")
def model(th):
"""Full trace at field angle th. Then fit a linear functi... | 28.625 | 78 | 0.594323 |
843e9509288d291c2964234fd1ee96e91de01f83 | 2,842 | py | Python | env/Lib/site-packages/testfixtures/tests/test_tempdir.py | beblount/Steer-Clear-Backend-Web | 2aca521bad5f9a09c912f8e546f46bd39610544f | [
"MIT"
] | null | null | null | env/Lib/site-packages/testfixtures/tests/test_tempdir.py | beblount/Steer-Clear-Backend-Web | 2aca521bad5f9a09c912f8e546f46bd39610544f | [
"MIT"
] | null | null | null | env/Lib/site-packages/testfixtures/tests/test_tempdir.py | beblount/Steer-Clear-Backend-Web | 2aca521bad5f9a09c912f8e546f46bd39610544f | [
"MIT"
] | null | null | null | # Copyright (c) 2008-2014 Simplistix Ltd
# See license.txt for license details.
import os
from mock import Mock
from tempfile import mkdtemp
from testfixtures import Replacer, ShouldRaise, TempDirectory, compare, tempdir
from unittest import TestCase
from ..rmtree import rmtree
class TestTempDir(TestCase):
... | 26.811321 | 112 | 0.534131 |
68be9a334b00b7aac72c979d574a5d566c9be98c | 308 | py | Python | 210915/Q1085.py | JongGuk/BOJ | dd447d9f65481de19a3c0b4f8bb8b5f3d6277c15 | [
"MIT"
] | null | null | null | 210915/Q1085.py | JongGuk/BOJ | dd447d9f65481de19a3c0b4f8bb8b5f3d6277c15 | [
"MIT"
] | null | null | null | 210915/Q1085.py | JongGuk/BOJ | dd447d9f65481de19a3c0b4f8bb8b5f3d6277c15 | [
"MIT"
] | null | null | null | '''한수는 지금 (x, y)에 있다. 직사각형은 각 변이 좌표축에 평행하고, 왼쪽 아래 꼭짓점은 (0, 0), 오른쪽 위 꼭짓점은 (w, h)에 있다.
직사각형의 경계선까지 가는 거리의 최솟값을 구하는 프로그램을 작성하시오.
첫째 줄에 x, y, w, h가 주어진다.
예시 입력
6 2 10 3
예시 출력
1
'''
x, y, w, h = map(int, input().split())
distances = [x, y]
distances.append(w - x)
distances.append(h - y)
print(min(distances)) | 20.533333 | 86 | 0.616883 |
31156993acbaa6f865819b8ea3a17d94f2e4801e | 811 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdfusion/models/VmInstanceItem.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdfusion/models/VmInstanceItem.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdfusion/models/VmInstanceItem.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 28.964286 | 75 | 0.7127 |
94b8f55041b0075e387b11d3c7a10efcf3c6e19e | 6,107 | py | Python | keystone/server/flask/application.py | ferag/keystone | af1c1a822a8dfdd543c6e4d48264f5b8be2bdfc7 | [
"Apache-2.0"
] | null | null | null | keystone/server/flask/application.py | ferag/keystone | af1c1a822a8dfdd543c6e4d48264f5b8be2bdfc7 | [
"Apache-2.0"
] | null | null | null | keystone/server/flask/application.py | ferag/keystone | af1c1a822a8dfdd543c6e4d48264f5b8be2bdfc7 | [
"Apache-2.0"
] | null | null | null | # 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, software
# d... | 33.927778 | 78 | 0.709022 |
357b7bd3cedd56d768f2e148141f03e2f12d5d21 | 7,866 | py | Python | venv/Lib/site-packages/caffe2/python/cnn.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | 1 | 2022-01-08T12:30:44.000Z | 2022-01-08T12:30:44.000Z | venv/Lib/site-packages/caffe2/python/cnn.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/caffe2/python/cnn.py | Westlanderz/AI-Plat1 | 1187c22819e5135e8e8189c99b86a93a0d66b8d8 | [
"MIT"
] | null | null | null | ## @package cnn
# Module caffe2.python.cnn
from caffe2.python import brew, workspace
from caffe2.python.model_helper import ModelHelper
from caffe2.proto import caffe2_pb2
import logging
class CNNModelHelper(ModelHelper):
"""A helper model so we can write CNN models more easily, without having ... | 32.639004 | 81 | 0.582888 |
9221f96e875e7a3628aa90698180e7541e3841c2 | 594 | py | Python | Interpulation/Interpulations.py | Starlord82/Misc-programs | f4ff00a88f6c2bef6ff892f69ee9f77cf901768e | [
"Apache-2.0"
] | null | null | null | Interpulation/Interpulations.py | Starlord82/Misc-programs | f4ff00a88f6c2bef6ff892f69ee9f77cf901768e | [
"Apache-2.0"
] | null | null | null | Interpulation/Interpulations.py | Starlord82/Misc-programs | f4ff00a88f6c2bef6ff892f69ee9f77cf901768e | [
"Apache-2.0"
] | null | null | null |
def inter(d1,d2,e1,e2,pn):
result = {}
for num in range(pn):
user_dist = float(input(f'Enter distanse of point number {num+1}: '))
result[user_dist] = e1 + ((e2-e1)/(d2-d1))*(user_dist-d1)
for key, value in result.items():
print(f'\n{key} : {value:.2f}')
if __name__ == "__main__":
dist1 = float(input(... | 25.826087 | 71 | 0.651515 |
5da1a4475db819a950dfb69478307fcdeddaa6f4 | 12,378 | py | Python | webapps/server/views.py | pilliq/mongo-web-shell | 03cbc8815982d0eb160ec239bf3a36c7a2e08dde | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2015-07-17T02:33:31.000Z | 2015-07-17T02:33:31.000Z | webapps/server/views.py | pilliq/mongo-web-shell | 03cbc8815982d0eb160ec239bf3a36c7a2e08dde | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | webapps/server/views.py | pilliq/mongo-web-shell | 03cbc8815982d0eb160ec239bf3a36c7a2e08dde | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2013 10gen 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 required by applicable law or agreed to... | 32.067358 | 79 | 0.657295 |
90dc97657be5a38d69427f4ca520f8edf64127d6 | 2,134 | py | Python | vonx/web/__init__.py | nrempel/von-x | 06896def4708ac217d78b8c9560eed1f862d0ddd | [
"Apache-2.0"
] | null | null | null | vonx/web/__init__.py | nrempel/von-x | 06896def4708ac217d78b8c9560eed1f862d0ddd | [
"Apache-2.0"
] | null | null | null | vonx/web/__init__.py | nrempel/von-x | 06896def4708ac217d78b8c9560eed1f862d0ddd | [
"Apache-2.0"
] | 2 | 2018-08-01T01:15:03.000Z | 2018-08-03T16:26:30.000Z | #
# Copyright 2017-2018 Government of Canada
# Public Services and Procurement Canada - buyandsell.gc.ca
#
# 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/LIC... | 29.232877 | 95 | 0.705248 |
1048d2eb856ffa0e3b646b033ed40ea0d65cc1df | 1,799 | py | Python | apps/modules/permission/apis/permission.py | yeayee/osroom | f7084843ea4b75505283f8b23da60471ba8fc9bb | [
"BSD-2-Clause"
] | 1 | 2019-05-12T14:54:40.000Z | 2019-05-12T14:54:40.000Z | apps/modules/permission/apis/permission.py | yeayee/osroom | f7084843ea4b75505283f8b23da60471ba8fc9bb | [
"BSD-2-Clause"
] | null | null | null | apps/modules/permission/apis/permission.py | yeayee/osroom | f7084843ea4b75505283f8b23da60471ba8fc9bb | [
"BSD-2-Clause"
] | null | null | null | # -*-coding:utf-8-*-
from flask import request
from apps.configs.sys_config import METHOD_WARNING
from apps.core.blueprint import api
from apps.core.flask.login_manager import osr_login_required
from apps.core.flask.permission import permission_required
from apps.core.flask.response import response_format
from apps.mod... | 27.676923 | 112 | 0.623124 |
30f48f011862c4c5368f9076ac56bd2a187109b4 | 1,714 | py | Python | gps.py | vaibhav16uec121/GPS | ec3c099e7620d66f04a867b4017fc1755a7676cd | [
"MIT"
] | null | null | null | gps.py | vaibhav16uec121/GPS | ec3c099e7620d66f04a867b4017fc1755a7676cd | [
"MIT"
] | null | null | null | gps.py | vaibhav16uec121/GPS | ec3c099e7620d66f04a867b4017fc1755a7676cd | [
"MIT"
] | null | null | null | from kivy.lang import Builder
from plyer import gps
from kivy.app import App
from kivy.properties import StringProperty
from kivy.clock import Clock, mainthread
kv = '''
BoxLayout:
orientation: 'vertical'
Label:
text: app.gps_location
Label:
text: app.gps_status
BoxLayout:
... | 25.969697 | 75 | 0.568261 |
cfd4d20caa5f05458bdd075f71e090bf654e68df | 10,330 | py | Python | novelsave_sources/sources/crawler.py | mensch272/novelsave_sources | 6d7b49aca4f9543fb23c1b1a81c9e2bd7d5d352a | [
"Apache-2.0"
] | 11 | 2021-09-05T04:36:41.000Z | 2022-03-20T00:16:42.000Z | novelsave_sources/sources/crawler.py | mHaisham/novelsave_sources | 6d7b49aca4f9543fb23c1b1a81c9e2bd7d5d352a | [
"Apache-2.0"
] | 9 | 2021-08-30T02:36:43.000Z | 2022-03-30T02:06:43.000Z | novelsave_sources/sources/crawler.py | mHaisham/novelsave_sources | 6d7b49aca4f9543fb23c1b1a81c9e2bd7d5d352a | [
"Apache-2.0"
] | 2 | 2022-03-20T13:18:01.000Z | 2022-03-29T07:07:04.000Z | import datetime
import re
from abc import ABC
from typing import List, Union, Optional
from urllib.parse import urlparse
import requests
from bs4 import BeautifulSoup, Comment
from requests.cookies import RequestsCookieJar
from ..exceptions import BadResponseException
from ..utils.gateways import BaseHttpGateway, Def... | 32.898089 | 121 | 0.621394 |
64822455fd94e2f814850b675a5dce57d4912092 | 939 | py | Python | test/integration/test_absolute_import_and_namespace.py | cpuabuse/absolute-import | 1e7d3e70b8e14e5c41b90fa440d915ad9e014704 | [
"0BSD"
] | 4 | 2020-02-21T07:47:43.000Z | 2020-12-16T04:36:58.000Z | test/integration/test_absolute_import_and_namespace.py | cpuabuse/absolute-import | 1e7d3e70b8e14e5c41b90fa440d915ad9e014704 | [
"0BSD"
] | null | null | null | test/integration/test_absolute_import_and_namespace.py | cpuabuse/absolute-import | 1e7d3e70b8e14e5c41b90fa440d915ad9e014704 | [
"0BSD"
] | null | null | null | """
Performs an integration test for absolute_import.py.
"""
# Bootstrap for package import
from pathlib import Path
from sys import path
target_path: str = str(Path(__file__).parent.joinpath("..").joinpath("..").joinpath("src").resolve())
if target_path not in path:
path.insert(1, target_path) # Inserting to ensure ... | 27.617647 | 116 | 0.752929 |
faa3f8ccd7893df9d11bc53fee21c884ec0d3d71 | 2,160 | py | Python | trading_calendars/utils/pandas_utils.py | sjquant/trading_calendars | 9407809a4447da0bf8920f4100496c4d4834185b | [
"Apache-2.0"
] | 508 | 2018-06-27T05:50:30.000Z | 2022-03-31T09:08:49.000Z | trading_calendars/utils/pandas_utils.py | sjquant/trading_calendars | 9407809a4447da0bf8920f4100496c4d4834185b | [
"Apache-2.0"
] | 149 | 2018-06-21T22:20:49.000Z | 2022-03-30T23:05:15.000Z | trading_calendars/utils/pandas_utils.py | sjquant/trading_calendars | 9407809a4447da0bf8920f4100496c4d4834185b | [
"Apache-2.0"
] | 243 | 2018-07-10T06:49:21.000Z | 2022-03-03T03:57:44.000Z | import numpy as np
import pandas as pd
from pytz import UTC
def days_at_time(days, t, tz, day_offset=0):
"""
Create an index of days at time ``t``, interpreted in timezone ``tz``.
The returned index is localized to UTC.
Parameters
----------
days : DatetimeIndex
An index of dates (re... | 29.189189 | 77 | 0.640278 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.