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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74174b2b396cbdd2ccdc5b5212bea27012d36ccb | 2,316 | py | Python | example/sird_model.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | example/sird_model.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | 100 | 2021-02-06T17:50:15.000Z | 2022-03-31T20:30:49.000Z | example/sird_model.py | ardhani31/Covid19-SIRV | 813bc66f668a3d2945dc97474ea1149bbc6e40c2 | [
"Apache-2.0"
] | 1 | 2021-09-18T12:36:11.000Z | 2021-09-18T12:36:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pathlib import Path
import warnings
import numpy as np
import pandas as pd
import covsirphy as cs
def main():
warnings.simplefilter("error")
# Create output directory in example directory
code_path = Path(__file__)
output_dir = code_path.with_name("o... | 33.085714 | 77 | 0.679188 |
74175935a5444e6ee214a00276582263a0907786 | 2,833 | py | Python | nibble/tests/test_main.py | gebn/nibble | e82a2c43509ed38f3d039040591cc630fa676cb0 | [
"MIT"
] | 1 | 2018-09-05T21:38:11.000Z | 2018-09-05T21:38:11.000Z | nibble/tests/test_main.py | gebn/nibble | e82a2c43509ed38f3d039040591cc630fa676cb0 | [
"MIT"
] | 20 | 2017-05-28T12:53:44.000Z | 2022-02-18T18:03:17.000Z | nibble/tests/test_main.py | gebn/nibble | e82a2c43509ed38f3d039040591cc630fa676cb0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import mock
import sys
import os
import contextlib
import six
from nibble import __main__ as main
@contextlib.contextmanager
def _suppress_stderr():
save_stderr = sys.stderr
try:
sys.stderr = open(os.devnull, 'w')
... | 29.510417 | 80 | 0.60113 |
7417659965da04962ddf2d6eb293ea753130c2e5 | 1,140 | py | Python | upol_search_engine/__main__.py | UPOLSearch/UPOL-Search-Engine | 791f0a4a01b4d034637ee6dba4cfd254ae8f3f50 | [
"MIT"
] | 1 | 2022-02-02T17:49:23.000Z | 2022-02-02T17:49:23.000Z | upol_search_engine/__main__.py | UPOLSearch/UPOL-Search-Engine | 791f0a4a01b4d034637ee6dba4cfd254ae8f3f50 | [
"MIT"
] | 5 | 2017-10-09T09:23:32.000Z | 2017-11-13T08:17:08.000Z | upol_search_engine/__main__.py | UPOLSearch/UPOL-Search-Engine | 791f0a4a01b4d034637ee6dba4cfd254ae8f3f50 | [
"MIT"
] | null | null | null | import sys
from datetime import datetime
from time import sleep
from upol_search_engine import tasks
from upol_search_engine.db import postgresql
def setup_database(arg):
postgresql_client = postgresql.create_client()
postgresql_cursor = postgresql_client.cursor()
if arg == 'functions':
print("R... | 24.255319 | 54 | 0.670175 |
7417701f35a07c48903a89f182e9b7373753aac1 | 8,291 | py | Python | spektral/utils/misc.py | haozhu233/spektral | ef83b93fa8d0b8015a0793371bb63b8447398b42 | [
"MIT"
] | null | null | null | spektral/utils/misc.py | haozhu233/spektral | ef83b93fa8d0b8015a0793371bb63b8447398b42 | [
"MIT"
] | null | null | null | spektral/utils/misc.py | haozhu233/spektral | ef83b93fa8d0b8015a0793371bb63b8447398b42 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import sparse as sp
def pad_jagged_array(x, target_shape, dtype=np.float):
"""
Given a jagged array of arbitrary dimensions, zero-pads all elements in the
array to match the provided `target_shape`.
:param x: a list or np.array of dtype object, containing np.arrays of
... | 34.119342 | 85 | 0.589796 |
74177cbca9b89043fad44512b9d6c4bc28917888 | 3,368 | py | Python | cogdl/datasets/gatne.py | tianjiansmile/cogdl | 4e0bbaf76e0e3bde0c8f57010159a63981278329 | [
"MIT"
] | null | null | null | cogdl/datasets/gatne.py | tianjiansmile/cogdl | 4e0bbaf76e0e3bde0c8f57010159a63981278329 | [
"MIT"
] | null | null | null | cogdl/datasets/gatne.py | tianjiansmile/cogdl | 4e0bbaf76e0e3bde0c8f57010159a63981278329 | [
"MIT"
] | null | null | null | import os.path as osp
import sys
import torch
from cogdl.data import Data, Dataset, download_url
from . import register_dataset
def read_gatne_data(folder):
train_data = {}
with open(osp.join(folder, '{}'.format('train.txt')), 'r') as f:
for line in f:
items = line.strip().split()
... | 31.185185 | 88 | 0.603029 |
741799ad22b1b1577b006b83f4bd7e40a0edfa3a | 15,997 | py | Python | src/utils/plotting_utils.py | Castel44/SREA | cbc20cca32377659ed68276e21c393bd913d4eb3 | [
"CC0-1.0"
] | 5 | 2021-08-16T09:18:18.000Z | 2022-02-05T02:32:30.000Z | src/utils/plotting_utils.py | Castel44/SREA | cbc20cca32377659ed68276e21c393bd913d4eb3 | [
"CC0-1.0"
] | 1 | 2021-12-15T10:37:52.000Z | 2021-12-16T04:10:17.000Z | src/utils/plotting_utils.py | Castel44/SREA | cbc20cca32377659ed68276e21c393bd913d4eb3 | [
"CC0-1.0"
] | null | null | null | import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from matplotlib import cm
from matplotlib.lines import Line2D
import src.utils.utils as utils
from src.utils.decorators import repeat, reset_rng
##########################################################################... | 40.498734 | 120 | 0.593174 |
7417bbad582e491bd3e844ea7d7cfdcabeb8f12a | 184 | py | Python | podcastista/consts.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | podcastista/consts.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | 17 | 2021-09-22T12:21:46.000Z | 2022-02-26T12:26:40.000Z | podcastista/consts.py | andrsd/podcastista | c05a1de09d2820899aebe592d3d4b01d64d1e5fe | [
"MIT"
] | null | null | null | """
Constants
"""
APP_NAME = "Podcastista"
VERSION = 1.0
COPYRIGHT = u"Copyright © 2021, David Andrš, All Rights Reserved"
DESCRIPTION = 'Little app to listen to podcasts on Spotify'
| 20.444444 | 65 | 0.728261 |
741866525c700a9f0aa2f628df9d242cc6a51cbf | 5,845 | py | Python | tests/graphs/test_coordinates.py | caleblevy/endofunction-structures | 084ddeab8d12307dd95b8727190c589a1bf659df | [
"MIT"
] | 5 | 2015-05-06T05:08:26.000Z | 2017-04-21T03:32:13.000Z | tests/graphs/test_coordinates.py | caleblevy/endofunction-structures | 084ddeab8d12307dd95b8727190c589a1bf659df | [
"MIT"
] | null | null | null | tests/graphs/test_coordinates.py | caleblevy/endofunction-structures | 084ddeab8d12307dd95b8727190c589a1bf659df | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from funcstructs.graphs.coordinates import *
class Location2DTests(unittest.TestCase):
def test_polar_coordinates(self):
"""Test going back and forth from cartesian to polar."""
# From polar to cartesian
p1 = Point(1, 2)
rp1 = Point.from_polar(... | 36.993671 | 79 | 0.545423 |
74186f79195faeffd728925c13b8307e0187b025 | 7,301 | py | Python | .buildkite/dagster-buildkite/dagster_buildkite/module_build_spec.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | .buildkite/dagster-buildkite/dagster_buildkite/module_build_spec.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | .buildkite/dagster-buildkite/dagster_buildkite/module_build_spec.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | from collections import namedtuple
from .defines import TOX_MAP, SupportedPython
from .step_builder import StepBuilder
from .utils import get_python_versions_for_branch
MYPY_EXCLUDES = [
"python_modules/dagit",
"python_modules/automation",
"python_modules/libraries/dagster-databricks",
"python_modules... | 41.95977 | 105 | 0.595946 |
7418b9114c68dac7bf430877a581617be1a771e5 | 1,596 | py | Python | setup.py | sguermond/django-tenants | 0bd05d8c477c5ef5103853d17e9c76ac890d958e | [
"MIT"
] | null | null | null | setup.py | sguermond/django-tenants | 0bd05d8c477c5ef5103853d17e9c76ac890d958e | [
"MIT"
] | null | null | null | setup.py | sguermond/django-tenants | 0bd05d8c477c5ef5103853d17e9c76ac890d958e | [
"MIT"
] | 1 | 2019-02-08T23:32:23.000Z | 2019-02-08T23:32:23.000Z | #!/usr/bin/env python
import io
from os.path import exists
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = "2.1.0"
setup(
name='django-tenants',
version=__version__,
author='Thomas Turner',
author_email='tom@twt.me.uk',
packages=[
... | 29.555556 | 100 | 0.623434 |
74190178d97d7fc2b869fe960501394433262a11 | 27,140 | py | Python | salt/modules/yumpkg.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/modules/yumpkg.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | salt/modules/yumpkg.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | '''
Support for YUM
:depends: - yum Python module
- rpmUtils Python module
'''
# Import python libs
import os
import logging
# Import third party libs
try:
import yum
from rpmUtils.arch import getBaseArch
HAS_YUMDEPS = True
except (ImportError, AttributeError):
HAS_YUMDEPS = False
log ... | 31.267281 | 96 | 0.589499 |
741909f4cdd0baddcf9bef99088f5981e9caf30e | 1,818 | py | Python | integrations/tensorflow/bindings/python/pyiree/xla/compiler/xla_module_proto_test.py | EmperorYP7/iree | fffa1f3e33bc1031c790583166ce82c91dd8b3e7 | [
"Apache-2.0"
] | null | null | null | integrations/tensorflow/bindings/python/pyiree/xla/compiler/xla_module_proto_test.py | EmperorYP7/iree | fffa1f3e33bc1031c790583166ce82c91dd8b3e7 | [
"Apache-2.0"
] | null | null | null | integrations/tensorflow/bindings/python/pyiree/xla/compiler/xla_module_proto_test.py | EmperorYP7/iree | fffa1f3e33bc1031c790583166ce82c91dd8b3e7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 32.464286 | 80 | 0.748625 |
741926e606a93fcea40bfe55c18d1c544ef89b25 | 4,877 | py | Python | test/test_cmd/test_linters.py | 132nd-etcher/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 2 | 2018-12-13T06:49:10.000Z | 2018-12-13T07:37:49.000Z | test/test_cmd/test_linters.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 109 | 2018-08-22T04:25:56.000Z | 2019-10-17T05:10:21.000Z | test/test_cmd/test_linters.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 1 | 2018-02-25T05:53:18.000Z | 2018-02-25T05:53:18.000Z | # coding=utf-8
import itertools
import subprocess
from pathlib import Path
import elib_run
import pytest
from mockito import mock, verify, verifyNoMoreInteractions, verifyStubbedInvocationsAreUsed, when
import epab.utils
from epab.core import CTX, config
# noinspection PyProtectedMember
from epab.linters import _ban... | 28.857988 | 109 | 0.69961 |
741952aa5ebcc25d84575b7c2b5603e280e39c7b | 19 | py | Python | tests/__init__.py | holgern/steemengine | d43c12326074efd2951bf98636bbf9575430ced4 | [
"MIT"
] | 7 | 2019-03-07T08:23:38.000Z | 2021-09-05T07:30:21.000Z | tests/__init__.py | holgern/steemengine | d43c12326074efd2951bf98636bbf9575430ced4 | [
"MIT"
] | 6 | 2019-04-17T05:01:13.000Z | 2021-09-20T23:41:01.000Z | tests/__init__.py | holgern/steemengine | d43c12326074efd2951bf98636bbf9575430ced4 | [
"MIT"
] | 7 | 2019-03-07T15:10:13.000Z | 2020-05-25T02:06:43.000Z | """Unit tests."""
| 9.5 | 18 | 0.473684 |
741954c29e9469e105544cbae816fbb68b80b8a5 | 1,887 | py | Python | setup.py | xumoooo/nginxauthdaemon | 21317bf6fe451744a7ab7cd61106e94bce48a6fc | [
"MIT"
] | null | null | null | setup.py | xumoooo/nginxauthdaemon | 21317bf6fe451744a7ab7cd61106e94bce48a6fc | [
"MIT"
] | null | null | null | setup.py | xumoooo/nginxauthdaemon | 21317bf6fe451744a7ab7cd61106e94bce48a6fc | [
"MIT"
] | null | null | null | """A setuptools based setup module.
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
... | 29.952381 | 87 | 0.588765 |
74197610810854e0de84f4e8adfb5b60848973c6 | 2,305 | py | Python | scripts/practice/FB/LCAWithouPresent.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/practice/FB/LCAWithouPresent.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/practice/FB/LCAWithouPresent.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
Lowest Common Ancestor of a Binary Tree II
Given the root of a binary tree, return the lowest common ancestor (LCA) of two given nodes, p and q.
If either node p or q does not exist in the tree, return null. All values of the nodes in the tree are unique.
According to the definition of LCA on Wikipedia:
"The ... | 28.109756 | 116 | 0.587419 |
741984851342ac9749bd2e3433f09af07a21d5ec | 3,240 | py | Python | kg/graphs/generators.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 6 | 2019-11-30T17:03:13.000Z | 2021-09-30T05:08:31.000Z | kg/graphs/generators.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 1 | 2020-01-20T12:13:03.000Z | 2020-01-20T12:13:03.000Z | kg/graphs/generators.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | null | null | null | from itertools import chain
from functools import wraps
from kg.utils import * ### @import
from .utils import * ### @import 'kg.graphs.utils'
class TreeGenError(GraphError): ...
def tree_pgen(pgen):
@wraps(pgen)
def make_tree(rand, nodes, *args, shuff=True, randswap=True, relabel=True, weeds=0.0, **kwargs):
... | 36.818182 | 120 | 0.603704 |
7419879c23232465eaf54096bc48b6c8ccf14200 | 26,989 | py | Python | run_time/src/gae_server/third_party/fonttools/Lib/fontTools/ttLib/tables/E_B_D_T_.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | 1 | 2020-12-07T14:10:03.000Z | 2020-12-07T14:10:03.000Z | run_time/src/gae_server/third_party/fonttools/Lib/fontTools/ttLib/tables/E_B_D_T_.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | 9 | 2019-06-15T21:31:27.000Z | 2021-05-08T18:55:51.000Z | run_time/src/gae_server/third_party/fonttools/Lib/fontTools/ttLib/tables/E_B_D_T_.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, readHex, hexStr, deHexStr
from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsForma... | 35.74702 | 120 | 0.737078 |
74199c6a746dedb246334d9ce4cd9318c29edf62 | 32,779 | py | Python | hallo/test/modules/dailys/fields/test_dailys_mood_field.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/test/modules/dailys/fields/test_dailys_mood_field.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/test/modules/dailys/fields/test_dailys_mood_field.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from datetime import time, date, datetime, timedelta
import pytest
import hallo.modules.dailys.dailys_field
from hallo.events import EventMessage, RawDataTelegram, EventMinute
from hallo.modules.dailys.field_mood import DailysMoodField, MoodTime
from hallo.test.modules.dailys.dailys_spreadsheet_mock import DailysSpre... | 43.822193 | 106 | 0.707831 |
7419d7a817c668b46039553c31ad326761db5a35 | 1,969 | py | Python | torchlib/datasets/celeba.py | pedrodiamel/pytorch-classification | 0fa9f597ba1e7cf8fcde322e2e9ee924970593aa | [
"MIT"
] | 9 | 2019-03-27T12:40:15.000Z | 2021-12-20T12:57:59.000Z | torchlib/datasets/celeba.py | pedrodiamel/pytorch-classification | 0fa9f597ba1e7cf8fcde322e2e9ee924970593aa | [
"MIT"
] | null | null | null | torchlib/datasets/celeba.py | pedrodiamel/pytorch-classification | 0fa9f597ba1e7cf8fcde322e2e9ee924970593aa | [
"MIT"
] | null | null | null |
import os
import numpy as np
from pytvision.datasets.imageutl import dataProvide
def make_dataset( path, filename, folder ):
data = []
with open( os.path.join(path, filename) , 'r') as file:
for line in file:
words = line.split()
imname, iden = words[:2]
data.appe... | 26.608108 | 88 | 0.565769 |
741a119170f8195a77b5eef257213d7664d1e063 | 491 | py | Python | src/software/thunderscope/colors.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | src/software/thunderscope/colors.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | src/software/thunderscope/colors.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | from pyqtgraph.Qt import QtCore, QtGui
class Colors(object):
FIELD_COLOR = "w"
FIELD_LINE_COLOR = "w"
BLUE_ROBOT = QtGui.QColor(255, 100, 0, 255)
BALL_COLOR = QtGui.QColor(255, 100, 0, 255)
YELLOW_ROBOT_COLOR = QtGui.QColor(255, 255, 0, 255)
BLUE_ROBOT_COLOR = QtGui.QColor(0, 75, 255, 255)
... | 25.842105 | 55 | 0.684318 |
741a179ba58dc988c7a441abbde48180aecd5c95 | 4,025 | py | Python | leetcode_python/Hash_table/number-of-boomerangs.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Hash_table/number-of-boomerangs.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Hash_table/number-of-boomerangs.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # Time: O(n^2)
# Space: O(n)
# Given n points in the plane that are all pairwise distinct,
# a "boomerang" is a tuple of points (i, j, k) such that the distance
# between i and j equals the distance between i and k (the order of the tuple matters).
#
# Find the number of boomerangs. You may assume that n will be at mo... | 28.75 | 107 | 0.515528 |
741a304ecf4abf8dcf256b9d222297c8025b81c0 | 5,232 | py | Python | experiments/vitchyr/disentanglement/mix_vectorized_and_single_reward_take2/exp_3_use_sum_not_mean.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/disentanglement/mix_vectorized_and_single_reward_take2/exp_3_use_sum_not_mean.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/disentanglement/mix_vectorized_and_single_reward_take2/exp_3_use_sum_not_mean.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.experiments.disentanglement.contextual_encoder_distance_launcher import (
encoder_goal_conditioned_sac_experiment
)
from rlkit.launchers.launcher_util import run_experiment
if __name__ == "__main__":
variant = dict(
env_id='OneObjectPickAndPl... | 30.068966 | 94 | 0.537653 |
741a956ca5cef637e8d23aee906eb644112679b9 | 6,223 | py | Python | stanwood/external_services/toggl/toggl.py | stanwood/Stanwood_Python | 1802a10477119f14bbf186a8a636c9b847948e35 | [
"MIT"
] | null | null | null | stanwood/external_services/toggl/toggl.py | stanwood/Stanwood_Python | 1802a10477119f14bbf186a8a636c9b847948e35 | [
"MIT"
] | null | null | null | stanwood/external_services/toggl/toggl.py | stanwood/Stanwood_Python | 1802a10477119f14bbf186a8a636c9b847948e35 | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2018 stanwood GmbH
#
# 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 rights
# to use, copy, m... | 34.005464 | 120 | 0.617548 |
741a95f7bea48d33236010061bec68e6c0a0c395 | 984 | py | Python | src/xworkflows/__init__.py | rbarrois/xworkflows | c6adfb200c61dd0df768c92856355d301c2caf87 | [
"BSD-2-Clause"
] | 94 | 2015-01-08T21:55:07.000Z | 2022-02-19T10:50:05.000Z | src/xworkflows/__init__.py | rbarrois/xworkflows | c6adfb200c61dd0df768c92856355d301c2caf87 | [
"BSD-2-Clause"
] | 7 | 2016-04-28T15:40:06.000Z | 2021-05-20T18:03:23.000Z | src/xworkflows/__init__.py | rbarrois/xworkflows | c6adfb200c61dd0df768c92856355d301c2caf87 | [
"BSD-2-Clause"
] | 17 | 2015-08-13T00:29:09.000Z | 2021-11-11T09:17:53.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2013 Raphaël Barrois
# This code is distributed under the two-clause BSD License.
from . import base
__author__ = 'Raphaël Barrois <raphael.barrois+xworkflows@polytechnique.org>'
try:
# Python 3.8+
from importlib.metadata import version
__version__ = version("... | 26.594595 | 77 | 0.801829 |
741a9a36251aa65c59e65a692b3c28a87296367c | 10,692 | py | Python | rf2settings/directInputKeySend.py | tappi287/rf2_video_settings | 6ae73c63f48e6d515a9efb653f236dea0494d9f1 | [
"MIT"
] | 8 | 2020-12-09T17:34:40.000Z | 2022-02-21T10:15:09.000Z | rf2settings/directInputKeySend.py | tappi287/rf2_video_settings | 6ae73c63f48e6d515a9efb653f236dea0494d9f1 | [
"MIT"
] | 11 | 2021-02-27T00:21:47.000Z | 2022-02-25T14:41:56.000Z | rf2settings/directInputKeySend.py | tappi287/rf2_video_settings | 6ae73c63f48e6d515a9efb653f236dea0494d9f1 | [
"MIT"
] | 2 | 2021-06-28T21:11:53.000Z | 2022-02-06T17:20:18.000Z | # pylint: disable=invalid-name
"""
Send keystrokes to active window
time.sleep -> gevent.sleep for rf2settingswidget
"""
# https://www.reddit.com/r/learnpython/comments/22tke1/use_python_to_send_keystrokes_to_games_in_windows/
# It works in rF2!
import ctypes
import time
import gevent
# DirectInput Key Code Table
#... | 34.269231 | 105 | 0.529181 |
741aa43b1fafa08a5cd739dc41412113e76b8b52 | 8,656 | py | Python | tool/alignment/Symbol.py | systems-nuts/popcorn-compiler-alpine | 5c225c7d3055db83dc654b6b5525c34bbdacded1 | [
"Linux-OpenIB"
] | 30 | 2019-04-07T14:58:31.000Z | 2021-05-24T19:07:20.000Z | tool/alignment/Symbol.py | XRDevIEEE/popcorn-compiler | 2cb2eccc0c75b5963d9fec26ad80a7b881316b1d | [
"Linux-OpenIB"
] | 11 | 2018-07-24T19:31:26.000Z | 2020-09-03T08:56:23.000Z | tool/alignment/Symbol.py | XRDevIEEE/popcorn-compiler | 2cb2eccc0c75b5963d9fec26ad80a7b881316b1d | [
"Linux-OpenIB"
] | 17 | 2018-08-26T12:43:15.000Z | 2022-03-18T12:08:40.000Z | """
Represent a symbol. One instance per architecture. However, some of the
attributes are per-architecture (ex: size, etc.) so they are arrays indexed
by the Arch enum (see Arch.py)
"""
import sys, re
from Arch import Arch
from Globals import er
def symbolObjectFileSanityCheck(obj):
reLib = "^(.+\.a)\((.+\.o)\)" # ... | 32.298507 | 75 | 0.663239 |
741aa9ef6a618386db53ce4335bb00c4ebc78610 | 17,269 | py | Python | igraph/drawing/shapes.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | 2 | 2017-03-07T04:01:59.000Z | 2017-05-02T17:19:29.000Z | igraph/drawing/shapes.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | igraph/drawing/shapes.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | # vim:ts=4:sw=4:sts=4:et
# -*- coding: utf-8 -*-
"""
Shape drawing classes for igraph
Vertex shapes in igraph are usually referred to by short names like
C{"rect"} or C{"circle"}. This module contains the classes that
implement the actual drawing routines for these shapes, and a
resolver class that determines the appr... | 37.623094 | 86 | 0.639991 |
741abd5948cf6f59000b4732fdfaf4a96e26af7c | 5,507 | py | Python | evap/rewards/views.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 26 | 2015-01-18T18:01:57.000Z | 2018-10-12T14:37:15.000Z | evap/rewards/views.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 737 | 2015-01-02T17:43:25.000Z | 2018-12-10T20:45:10.000Z | evap/rewards/views.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 83 | 2015-01-14T12:39:41.000Z | 2018-10-29T16:36:43.000Z | from datetime import datetime
from django.contrib import messages
from django.core.exceptions import BadRequest, SuspiciousOperation
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.utils.translation import get_language
from django.utils.translation impo... | 39.618705 | 117 | 0.764482 |
741acc0b4de847283f3fe3150b649bbc35c4340c | 2,997 | py | Python | qnarre/doc/category.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/doc/category.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/doc/category.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2019 Quantapix 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 applicable l... | 28.273585 | 79 | 0.565566 |
741ace7fa3860bc31dfe5ea960e71000ef05da68 | 10,485 | py | Python | scripts/backbone-to-spineopt/gdx2spinedb/spinedb.py | Spine-project/spine-cs-b3 | d7b94e425c21c3d35080cff36a54b5c901835bec | [
"Unlicense"
] | null | null | null | scripts/backbone-to-spineopt/gdx2spinedb/spinedb.py | Spine-project/spine-cs-b3 | d7b94e425c21c3d35080cff36a54b5c901835bec | [
"Unlicense"
] | 1 | 2022-02-10T06:26:16.000Z | 2022-02-10T06:26:16.000Z | scripts/backbone-to-spineopt/gdx2spinedb/spinedb.py | Spine-project/spine-cs-b3 | d7b94e425c21c3d35080cff36a54b5c901835bec | [
"Unlicense"
] | null | null | null | """Module defines a wrapper class for Spine DB API for easy adding of data
"""
import logging
from sqlalchemy.exc import ArgumentError as SQLAlchemyArgumentError
from spinedb_api import DiffDatabaseMapping
from spinedb_api.exception import SpineDBAPIError, SpineIntegrityError
from spinedb_api import import_fu... | 35.907534 | 136 | 0.602861 |
741ad8f37aa90ed396a56fbfb7105caa692f562b | 349 | py | Python | server_pages_validator.py | Nikolaj-K/wiki-server | 1e73d23cea5acb836cb470bf5c1ec87694ebe36d | [
"MIT"
] | null | null | null | server_pages_validator.py | Nikolaj-K/wiki-server | 1e73d23cea5acb836cb470bf5c1ec87694ebe36d | [
"MIT"
] | null | null | null | server_pages_validator.py | Nikolaj-K/wiki-server | 1e73d23cea5acb836cb470bf5c1ec87694ebe36d | [
"MIT"
] | null | null | null | """
Go through guide.md and
* read out the list of links in that file, in the given order
* check that each element appears only once
* the set of the lists elements is exactly the pages in /aoc
* the dependencies given at the end of all those pages are in order w.r.t. the list
"""
class PagesValidator:
de... | 29.083333 | 85 | 0.69914 |
741afb9bc384ea02a0f28ace2ce48bbf34399509 | 2,896 | py | Python | sessions/cq_groups.py | lizard1998myx/MultiBot | 314e15122ed8cd99e231b5d9bfbd853f1b0b2272 | [
"Apache-2.0"
] | 3 | 2021-08-04T08:51:28.000Z | 2022-01-13T01:48:10.000Z | sessions/cq_groups.py | lizard1998myx/MultiBot | 314e15122ed8cd99e231b5d9bfbd853f1b0b2272 | [
"Apache-2.0"
] | null | null | null | sessions/cq_groups.py | lizard1998myx/MultiBot | 314e15122ed8cd99e231b5d9bfbd853f1b0b2272 | [
"Apache-2.0"
] | 2 | 2021-08-04T08:52:15.000Z | 2022-01-12T14:20:25.000Z | from ..responses import ResponseMsg, ResponseCQFunc
from .general import Session
import random
class CQGroupSuicideSession(Session):
def __init__(self, user_id):
Session.__init__(self, user_id=user_id)
self._max_delta = 10
self.session_type = 'QQ群正义执行'
self.description = ... | 40.788732 | 106 | 0.575967 |
741b2203a098ee4eb148959b83be406f071c8679 | 519 | py | Python | atlas/frontenddjango/views.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | null | null | null | atlas/frontenddjango/views.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 15 | 2015-01-06T13:41:52.000Z | 2022-03-30T10:37:25.000Z | atlas/frontenddjango/views.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 1 | 2017-07-20T08:01:24.000Z | 2017-07-20T08:01:24.000Z | import logging
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
_logger = logging.getLogger('prodtaskwebui')
@login_required(login_url='/prodtask/login/')
def index(request, path=''):
if request.method == 'GET':
return render(request, 'frontenddjango/_inde... | 25.95 | 71 | 0.622351 |
741b3c431daeef44c9a98d73be7f6da6cbe23022 | 3,894 | py | Python | appengine/predator/app/frontend/handlers/crash_handler.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/app/frontend/handlers/crash_handler.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/app/frontend/handlers/crash_handler.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import base64
import json
import logging
from analysis.exceptions import PredatorError
from common import constants
from common import crash_pipeline
from c... | 36.735849 | 80 | 0.681305 |
741b4c5234d96e28dd6ece4df813a290f05c0f3a | 7,935 | py | Python | azure/multiapi/storage/v2016_05_31/table/_request.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 3 | 2019-02-21T20:46:26.000Z | 2021-06-22T15:35:52.000Z | azure/storage/table/_request.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 11 | 2017-10-05T18:20:40.000Z | 2020-10-10T09:20:19.000Z | azure/storage/table/_request.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 15 | 2017-10-02T18:48:20.000Z | 2022-03-03T14:03:49.000Z | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | 40.075758 | 99 | 0.717958 |
741b5c1582f41fd446229a9dd6753f8766ae9588 | 513 | py | Python | Chapter02/1viz_words.py | karim7262/Python-Machine-Learning-By-Example | 1bd2690225c93f637eabc5c78574714a22b4068a | [
"MIT"
] | 106 | 2017-06-20T07:06:26.000Z | 2022-01-28T20:17:57.000Z | Chapter02/1viz_words.py | karim7262/Python-Machine-Learning-By-Example | 1bd2690225c93f637eabc5c78574714a22b4068a | [
"MIT"
] | 2 | 2017-11-20T03:36:46.000Z | 2019-03-08T07:47:02.000Z | Chapter02/1viz_words.py | karim7262/Python-Machine-Learning-By-Example | 1bd2690225c93f637eabc5c78574714a22b4068a | [
"MIT"
] | 83 | 2017-07-02T03:09:38.000Z | 2022-03-07T06:45:04.000Z | from sklearn.feature_extraction.text import CountVectorizer
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import fetch_20newsgroups
cv = CountVectorizer(stop_words="english", max_features=500)
groups = fetch_20newsgroups()
transformed = cv.fit_transform(groups.data)
pri... | 30.176471 | 60 | 0.805068 |
741b9d2fd0ff204515ef299769caca26a93252af | 941 | py | Python | utils/features.py | neulab/cmu-ner | d35d57fe453d81cc98e3ee55bac58f9ca618f59b | [
"BSD-3-Clause"
] | 11 | 2018-04-21T10:25:12.000Z | 2022-03-27T03:48:25.000Z | utils/features.py | neulab/cmu-ner | d35d57fe453d81cc98e3ee55bac58f9ca618f59b | [
"BSD-3-Clause"
] | 2 | 2018-06-29T11:02:18.000Z | 2018-06-29T11:15:24.000Z | utils/features.py | neulab/cmu-ner | d35d57fe453d81cc98e3ee55bac58f9ca618f59b | [
"BSD-3-Clause"
] | null | null | null | from utils.segnerfts import segnerfts
import codecs
def get_feature_sent(lang, sent, args):
if args.use_gazatter and args.use_morph:
return segnerfts.extract(lang, sent)
elif args.use_gazatter:
return segnerfts.extract_type_token_gaz(lang, sent)
elif args.use_morph:
return segnerft... | 32.448276 | 61 | 0.612115 |
741baa37c0fc8b1b4431b391fdf9e9c1883c4f80 | 149 | py | Python | src/version.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | src/version.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | src/version.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | __version__ = "22.4.2"
__long_version__ = "22.4.2-g0abbaa1-main"
__git_commit__ = "0abbaa13174c868ba920dc0926480e29009705be"
__git_branch__ = "main"
| 29.8 | 59 | 0.798658 |
741bd34bdcab5997800c5d16d3081fa99fb15010 | 149,608 | py | Python | tests/test_iapws.py | volpatto/chemicals | 721904ee17604f5e8685b0e5fff12e0bac567f73 | [
"MIT"
] | null | null | null | tests/test_iapws.py | volpatto/chemicals | 721904ee17604f5e8685b0e5fff12e0bac567f73 | [
"MIT"
] | null | null | null | tests/test_iapws.py | volpatto/chemicals | 721904ee17604f5e8685b0e5fff12e0bac567f73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017, 2018, 2019, 2020 Caleb Bell
<Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (t... | 64.934028 | 23,592 | 0.608437 |
741bd75c06fb0107c0713d575f266bc2dfa8c0b9 | 3,992 | py | Python | hs_composite_resource/tests/views/test_create_composite_resource.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_composite_resource/tests/views/test_create_composite_resource.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_composite_resource/tests/views/test_create_composite_resource.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | import os
import shutil
import json
from django.contrib.auth.models import Group
from django.core.urlresolvers import reverse
from rest_framework import status
from hs_core import hydroshare
from hs_core.models import BaseResource, ResourceFile
from hs_core.views import create_resource
from hs_core.testing import Mo... | 41.154639 | 96 | 0.671343 |
741bf698db9f34e358a265fa004c4d96e5eeb31a | 1,584 | py | Python | test/unit/gen_libs/get_data.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/get_data.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/get_data.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: get_data.py
Description: Unit testing of get_data in gen_libs.py.
Usage:
test/unit/gen_libs/get_data.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import unittest2 as u... | 16.329897 | 77 | 0.638889 |
741bf6f55b477a7ce290efa7b4f90a248c3e9693 | 680 | py | Python | src/tests.py | geoff3jones/path_draw_recorder | 3b804cb8ee6d1fec85f54470eb2c1087b475cd68 | [
"MIT"
] | null | null | null | src/tests.py | geoff3jones/path_draw_recorder | 3b804cb8ee6d1fec85f54470eb2c1087b475cd68 | [
"MIT"
] | null | null | null | src/tests.py | geoff3jones/path_draw_recorder | 3b804cb8ee6d1fec85f54470eb2c1087b475cd68 | [
"MIT"
] | null | null | null | """
Trying to diagnose as weird crash I was getting when reading from parquet
"""
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
def test_pandas_write_read():
df_out = pd.DataFrame.from_dict([{"A":i} for i in range(3)])
df_out.to_parquet("crash.parquet")
df_in = pd.read_parquet("cr... | 29.565217 | 74 | 0.707353 |
741bf71083f01704d334e2651f75f4a2f567f9a7 | 1,041 | py | Python | src/pywriter/odt/odt_brief_synopsis.py | peter88213/yWrestler | 32a152e8b814983ecaef6e9861df1d6b7008568d | [
"MIT"
] | null | null | null | src/pywriter/odt/odt_brief_synopsis.py | peter88213/yWrestler | 32a152e8b814983ecaef6e9861df1d6b7008568d | [
"MIT"
] | null | null | null | src/pywriter/odt/odt_brief_synopsis.py | peter88213/yWrestler | 32a152e8b814983ecaef6e9861df1d6b7008568d | [
"MIT"
] | null | null | null | """Provide a class for ODT brief synopsis export.
Copyright (c) 2022 Peter Triesberger
For further information see https://github.com/peter88213/PyWriter
Published under the MIT License (https://opensource.org/licenses/mit-license.php)
"""
from pywriter.odt.odt_file import OdtFile
class OdtBriefSynopsis(Odt... | 32.53125 | 104 | 0.699328 |
741c332e0c3047fd5d860812eab9bb9fc704e697 | 931 | py | Python | solutions/letter-combinations-of-a-phone-number.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | solutions/letter-combinations-of-a-phone-number.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | 1 | 2022-02-22T15:42:54.000Z | 2022-02-25T00:10:04.000Z | solutions/letter-combinations-of-a-phone-number.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | # Leetcode 17. Letter Combinations of a Phone Number
#
# Link: https://leetcode.com/problems/letter-combinations-of-a-phone-number/
# Difficulty: Medium
# Complexity:
# O(N * 4 ^ N) time | where 4 and N represent the number of possible letters
# per digit and the number of digits
# O(1) space ... | 31.033333 | 87 | 0.573577 |
741c98391e6858de4e35c891ff0cdf981eef1962 | 12,376 | py | Python | nltk/tokenize/casual.py | likaiguo/nltk | f86b8533392cb199bb9891efbf829e629c1915db | [
"Apache-2.0"
] | null | null | null | nltk/tokenize/casual.py | likaiguo/nltk | f86b8533392cb199bb9891efbf829e629c1915db | [
"Apache-2.0"
] | 1 | 2018-09-21T22:16:48.000Z | 2018-09-21T22:16:48.000Z | nltk/tokenize/casual.py | likaiguo/nltk | f86b8533392cb199bb9891efbf829e629c1915db | [
"Apache-2.0"
] | 1 | 2018-09-21T22:10:56.000Z | 2018-09-21T22:10:56.000Z | # coding: utf-8
#
# Natural Language Toolkit: Twitter Tokenizer
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Christopher Potts <cgpotts@stanford.edu>
# Ewan Klein <ewan@inf.ed.ac.uk> (modifications)
# Pierpaolo Pantone <> (modifications)
# URL: <http://nltk.org/>
# For license information, see LIC... | 34.569832 | 130 | 0.513009 |
741cd2efe6e171c9a78077aa0ea1e7870adac4f2 | 417 | py | Python | batchglm/api/utils/stats.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | batchglm/api/utils/stats.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | batchglm/api/utils/stats.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | from batchglm.utils.stats import normalize
from batchglm.utils.stats import rmsd
from batchglm.utils.stats import mae
from batchglm.utils.stats import normalized_rmsd
from batchglm.utils.stats import normalized_mae
from batchglm.utils.stats import mapd
from batchglm.utils.stats import abs_percentage_deviation
from batc... | 41.7 | 59 | 0.870504 |
741cf08426864396b9cad97cbfaaed7fab59a717 | 255 | py | Python | locations/urls.py | dimagi/rapidsms-contrib-apps-dev | 025f9d4cba7da59bc98d16a7d12b00c7b25c571f | [
"BSD-3-Clause"
] | 1 | 2020-09-15T22:18:37.000Z | 2020-09-15T22:18:37.000Z | locations/urls.py | adammck/rapidsms-contrib-apps-dev | b6ef8c9c3726ca0b706b984b93342e24c62fd430 | [
"BSD-3-Clause"
] | null | null | null | locations/urls.py | adammck/rapidsms-contrib-apps-dev | b6ef8c9c3726ca0b706b984b93342e24c62fd430 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from django.conf.urls.defaults import *
from . import views
urlpatterns = patterns('',
url(r'^locations(?:/(?P<location_uid>[a-z\-]+:\d+))?$',
views.locations,
name="locations")
)
| 18.214286 | 59 | 0.603922 |
741cfcfc460b07f05c809a47592a87a0f6c5bd9d | 5,491 | py | Python | sitator/landmark/cluster/mcl.py | lekah/sitator | 0f9c84989758eb7b76be8104a94a8d6decd27b55 | [
"MIT"
] | 8 | 2018-10-05T18:02:24.000Z | 2021-02-22T20:24:58.000Z | sitator/landmark/cluster/mcl.py | lekah/sitator | 0f9c84989758eb7b76be8104a94a8d6decd27b55 | [
"MIT"
] | 6 | 2019-02-21T04:33:01.000Z | 2021-01-06T20:05:25.000Z | sitator/landmark/cluster/mcl.py | lekah/sitator | 0f9c84989758eb7b76be8104a94a8d6decd27b55 | [
"MIT"
] | 6 | 2018-08-11T21:43:59.000Z | 2021-12-21T06:32:12.000Z | """Cluster landmarks into sites using Markov Clustering and then assign each landmark vector.
Valid clustering params include:
- ``"assignment_threshold"`` (float between 0 and 1): The similarity threshold
below which a landmark vector will be marked unassigned.
- ``"good_site_normed_threshold"`` (float between ... | 41.598485 | 135 | 0.679111 |
741d0155a185b2b88690ad83d4e410e5aaa6639a | 903 | py | Python | examples/mnist_rbm/create_new_datasets.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | examples/mnist_rbm/create_new_datasets.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | examples/mnist_rbm/create_new_datasets.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null |
import cPickle, gzip
import numpy
import os
import sys
# This script
if __name__ == '__main__':
if len(sys.argv) != 4:
print "Usage: {0} rbm_feat_file original_dataset new_dataset".format(sys.argv[0])
print "rbm_feat_file -- path to the RBM feature file"
print "original_dataset -- the or... | 29.129032 | 91 | 0.676633 |
741d121777349cffe352b7eaa5cbc3bf13335ef6 | 12,843 | py | Python | modal/amodal.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 25 | 2019-08-17T16:04:58.000Z | 2022-03-28T03:00:42.000Z | modal/amodal.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 6 | 2019-10-17T11:02:44.000Z | 2021-09-16T08:13:24.000Z | modal/amodal.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 6 | 2019-09-03T05:26:35.000Z | 2022-02-07T17:51:31.000Z | __author__ = 'yzhu'
__version__ = '0.1'
import json
import datetime
import time
import matplotlib.pyplot as plt
from matplotlib.collections import PatchCollection
from matplotlib.patches import Polygon
import numpy as np
from skimage.draw import polygon
import urllib
import copy
import itertools
import os
from pycocot... | 35.282967 | 110 | 0.520595 |
741d6990e4817297db57a7a6257e7405abfbf16b | 4,284 | py | Python | src/szz/map_bugs2snapshot/map_bugs.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | src/szz/map_bugs2snapshot/map_bugs.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | src/szz/map_bugs2snapshot/map_bugs.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
import argparse
import os, sys
import os.path
import logging
import csv
from os.path import dirname
sys.path.append(os.path.join(dirname(__file__),'../../','util'))
sys.path.append(os.path.join(dirname(__file__),'..','.'))
from ConfigInfoSZZ import ConfigInfoSZZ
from szz import szz
import Log
imp... | 31.970149 | 118 | 0.628852 |
741d6bc0c7e3918e06aacc82ab3d32971d75ad97 | 558 | py | Python | examples/client.py | UCLA-IRL/ndn-hydra | e01829253876ff6dbfd6dfaa92142eca08cd6705 | [
"Apache-2.0"
] | 2 | 2021-04-14T04:12:14.000Z | 2021-04-23T02:28:49.000Z | examples/client.py | ZixuanZhong/hydra | e01829253876ff6dbfd6dfaa92142eca08cd6705 | [
"Apache-2.0"
] | 10 | 2021-07-03T18:29:26.000Z | 2022-02-01T04:11:20.000Z | examples/client.py | ZixuanZhong/ndn-distributed-repo | e01829253876ff6dbfd6dfaa92142eca08cd6705 | [
"Apache-2.0"
] | null | null | null | # ----------------------------------------------------------
# NDN Hydra Client
# ----------------------------------------------------------
# @Project: NDN Hydra
# @Date: 2021-01-25
# @Authors: Please check AUTHORS.rst
# @Source-Code: https://github.com/UCLA-IRL/ndn-hydra
# @Documentation: https://ndn-hydr... | 37.2 | 61 | 0.456989 |
741d919dce52ad5d55e55e65b179f6373d214886 | 1,023 | py | Python | flow/legacy.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | flow/legacy.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | flow/legacy.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
"""Wrapper functions to detect and support deprecated APIs from previous versions."""
import logging
logger = logging.getLogger(__name__)
class JobsCursorWrapper(object):... | 31.96875 | 85 | 0.71652 |
741d9341e997a3cdc93abf00f20b17ce5a2d6d9a | 6,458 | py | Python | make_melquiplot_bw.py | LilySnow/PDB_related | 07eec63732ef8958e27a6436d7f625bb5da9c8f6 | [
"MIT"
] | null | null | null | make_melquiplot_bw.py | LilySnow/PDB_related | 07eec63732ef8958e27a6436d7f625bb5da9c8f6 | [
"MIT"
] | null | null | null | make_melquiplot_bw.py | LilySnow/PDB_related | 07eec63732ef8958e27a6436d7f625bb5da9c8f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Produces a stacked bar plot showing the ranking and quality of the
models of a particular run.
Expects __at least__ a two-column file with RMSD values in the first
column and Energy values on the second. This has to be provided via the
--columns option.
The models are sorted by energy value... | 32.29 | 104 | 0.593527 |
741da7be1dad99c1fc0af24cafa3a6e90efa3e44 | 56,756 | py | Python | katdal/h5datav3.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | katdal/h5datav3.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | katdal/h5datav3.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | ################################################################################
# Copyright (c) 2011-2019, National Research Foundation (Square Kilometre Array)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of the... | 50.811101 | 119 | 0.620622 |
741dad9cdf37960e14d3a8db33b0f71c56db3046 | 12,140 | py | Python | intermine/python/tests/live_lists_token.py | drhee/toxoMine | 45935a8441adbfa26fb641037124507d54cda8e8 | [
"PostgreSQL"
] | 1 | 2016-08-05T15:43:46.000Z | 2016-08-05T15:43:46.000Z | intermine/python/tests/live_lists_token.py | drhee/toxoMine | 45935a8441adbfa26fb641037124507d54cda8e8 | [
"PostgreSQL"
] | 3 | 2017-03-23T22:21:49.000Z | 2017-06-16T09:41:11.000Z | intermine/python/tests/live_lists_token.py | drhee/toxoMine | 45935a8441adbfa26fb641037124507d54cda8e8 | [
"PostgreSQL"
] | null | null | null | import sys
import os
sys.path.insert(0, os.getcwd())
import unittest
from intermine.webservice import Service
class LiveListTest(unittest.TestCase):
TEST_ROOT = "http://localhost/intermine-test/service"
TEST_TOKEN = "a1v3V1X0f3hdmaybq0l6b7Z4eVG"
SERVICE = Service(TEST_ROOT, token=TEST_TOKEN)
LADIES... | 37.469136 | 92 | 0.56318 |
741dce350c501b5bce7d0e2876d2c34340483733 | 3,503 | py | Python | SCRAPE/Lib/site-packages/scrapy/utils/response.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2019-09-16T12:22:36.000Z | 2019-09-16T12:22:36.000Z | SCRAPE/Lib/site-packages/scrapy/utils/response.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2021-09-20T19:54:42.000Z | 2021-09-20T19:54:42.000Z | SCRAPE/Lib/site-packages/scrapy/utils/response.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2022-03-17T17:21:11.000Z | 2022-03-17T17:21:11.000Z | """
This module provides some useful functions for working with
scrapy.http.Response objects
"""
import os
import re
import tempfile
import webbrowser
from typing import Any, Callable, Iterable, Optional, Tuple, Union
from weakref import WeakKeyDictionary
import scrapy
from scrapy.http.response import Response
from t... | 35.383838 | 112 | 0.6837 |
741dd1be4bcbd3b1d346f3e5f1b384d5d65b6b78 | 7,447 | py | Python | annomathtex/annomathtex/parsing/nehandling/named_entity_recognition.py | philsMINT/AnnotaTeX | cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7 | [
"Apache-2.0"
] | 3 | 2021-04-14T13:31:12.000Z | 2022-02-13T00:33:37.000Z | annomathtex/annomathtex/parsing/nehandling/named_entity_recognition.py | philsMINT/AnnotaTeX | cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7 | [
"Apache-2.0"
] | 10 | 2019-07-26T08:10:07.000Z | 2021-06-10T17:53:43.000Z | annomathtex/annomathtex/parsing/nehandling/named_entity_recognition.py | philsMINT/AnnoMathTeX | cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7 | [
"Apache-2.0"
] | 2 | 2020-02-21T10:35:31.000Z | 2020-05-27T06:13:35.000Z | """
This file contains several named entity taggers, that can be used to find NEs in the document.
"""
import logging
import nltk
from ...models.word import Word
from uuid import uuid1
from nltk.corpus import stopwords
from abc import ABCMeta, abstractmethod
# These commands sometimes get recognized as NEs (or nouns... | 33.394619 | 260 | 0.526386 |
741e1477d40833b9368b73ea95b6f832007787df | 1,808 | py | Python | simplipy/sensor/v2.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | simplipy/sensor/v2.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | simplipy/sensor/v2.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | """Define a v2 (old) SimpliSafe sensor."""
from simplipy.entity import Entity, EntityTypes
from simplipy.errors import SimplipyError
class SensorV2(Entity):
"""A V2 (old) sensor.
Note that this class shouldn't be instantiated directly; it will be
instantiated as appropriate via :meth:`simplipy.API.get_sy... | 27.393939 | 88 | 0.595686 |
741e740719202505643d8240a6d860672e76f7f2 | 612 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/utils/units.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/utils/units.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/utils/units.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"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... | 43.714286 | 78 | 0.727124 |
741e78adee0a0dc3189866b8030742a24f040abb | 13,967 | py | Python | configs/mvxnet/parallel/hybrid/dv_parallel_mvx_pgd_adamw_kitti-3d-3class_loss2_pre_noiactr_choi_aux2.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | configs/mvxnet/parallel/hybrid/dv_parallel_mvx_pgd_adamw_kitti-3d-3class_loss2_pre_noiactr_choi_aux2.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | configs/mvxnet/parallel/hybrid/dv_parallel_mvx_pgd_adamw_kitti-3d-3class_loss2_pre_noiactr_choi_aux2.py | rasd3/mmdet3d_actr | d1c86d54f498fca166e957d249b109645ea13627 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../../../_base_/schedules/cosine.py', '../../../_base_/default_runtime.py'
]
# model settings
voxel_size = [0.05, 0.05, 0.1]
point_cloud_range = [0, -40, -3, 70.4, 40, 1]
model = dict(
type='ParallelMVXMono3D',
loss_pts_w = 1.,
loss_img_w = 0.125,
use_li_fusion_layer=False,
pos_li_... | 33.097156 | 79 | 0.56748 |
741e92fe7a70c2824dae73a4119349ca1c1973ba | 30,126 | py | Python | nicos/core/mixins.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos/core/mixins.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 4 | 2019-11-08T10:18:16.000Z | 2021-01-13T13:07:29.000Z | nicos/core/mixins.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 39.023316 | 80 | 0.610469 |
741ea38dcc4b19a1d406f29ce1585fe27a6f0cce | 774 | py | Python | config/queue.py | puzzle9/m3u8-copy | 14092111c1a8cb41f65cf2bd1e59f93219f7d115 | [
"MIT"
] | null | null | null | config/queue.py | puzzle9/m3u8-copy | 14092111c1a8cb41f65cf2bd1e59f93219f7d115 | [
"MIT"
] | null | null | null | config/queue.py | puzzle9/m3u8-copy | 14092111c1a8cb41f65cf2bd1e59f93219f7d115 | [
"MIT"
] | null | null | null | """Queue Settings."""
from masonite import env
"""Queue Driver
Queues are an excellent way to send intensive and time consuming tasks
into the background to improve performance of your application.
Supported: 'async', 'amqp'
"""
DRIVER = env("QUEUE_DRIVER", "async")
"""Queue Drivers
Put any configuration settings ... | 26.689655 | 78 | 0.640827 |
741ebf85c428e674036f4355e03adbfcbc8926d3 | 1,976 | py | Python | Scripts/xbbtools/xbb_utils.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:32:44.000Z | 2020-02-13T14:32:44.000Z | Scripts/xbbtools/xbb_utils.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | null | null | null | Scripts/xbbtools/xbb_utils.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Thu Jul 13 ... | 34.068966 | 75 | 0.657389 |
741ed510f9f21ca0be2d871491893a807321ef9f | 25,248 | py | Python | mclumi/external/UMItoolsSamMethods.py | cribbslab/mclumi | 3c38f1dd4de11f0f20121a4027f7e104c4059bbe | [
"MIT"
] | 3 | 2021-12-18T09:55:09.000Z | 2022-01-12T10:25:28.000Z | mclumi/external/UMItoolsSamMethods.py | cribbslab/mclumi | 3c38f1dd4de11f0f20121a4027f7e104c4059bbe | [
"MIT"
] | null | null | null | mclumi/external/UMItoolsSamMethods.py | cribbslab/mclumi | 3c38f1dd4de11f0f20121a4027f7e104c4059bbe | [
"MIT"
] | null | null | null | '''
whitelist_methods.py - Methods for whitelisting cell barcodes
=============================================================
:Author: Tom Smith, Ian Sudbery
:Release: $Id$
:Date: |today|
:Tags: Python UMI
'''
import collections
import re
import random
from functools import partial
# import umi_tools.Utilities as U... | 34.538988 | 100 | 0.534141 |
741ee5216281b6640858adfaf5fe72ee1f27ece1 | 432 | py | Python | products/migrations/0014_auto_20190408_1803.py | tiagocordeiro/zumaq-partners | ba2c5d4257438ec062ef034096cd203efe58ef4a | [
"MIT"
] | 1 | 2019-02-13T11:01:25.000Z | 2019-02-13T11:01:25.000Z | products/migrations/0014_auto_20190408_1803.py | tiagocordeiro/zumaq-partners | ba2c5d4257438ec062ef034096cd203efe58ef4a | [
"MIT"
] | 619 | 2018-11-26T06:11:05.000Z | 2022-03-31T22:56:13.000Z | products/migrations/0014_auto_20190408_1803.py | tiagocordeiro/zumaq-partners | ba2c5d4257438ec062ef034096cd203efe58ef4a | [
"MIT"
] | 1 | 2020-03-12T16:34:13.000Z | 2020-03-12T16:34:13.000Z | # Generated by Django 2.2 on 2019-04-08 21:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0013_produto_imagem'),
]
operations = [
migrations.AlterField(
model_name='produto',
name='imagem',
... | 22.736842 | 100 | 0.611111 |
741f10191ad58f37b48f82718d563f76c4250c86 | 4,887 | py | Python | test_app/tests/test_serializers.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 26 | 2015-01-12T13:22:40.000Z | 2022-03-07T16:50:52.000Z | test_app/tests/test_serializers.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 94 | 2015-01-21T16:20:47.000Z | 2022-03-24T13:44:56.000Z | test_app/tests/test_serializers.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 13 | 2015-01-22T07:11:15.000Z | 2019-10-28T02:07:48.000Z | import os
from io import StringIO
from django.test import TestCase
from django.conf import settings
from django.contrib.gis.db.models import GeometryField
from django.contrib.gis import gdal
from django.http import HttpResponse
from django.test.utils import override_settings
from django.utils import translation
from ... | 44.427273 | 116 | 0.667485 |
741f18a0fd51e3a386033a6cdf30dc5b7f59ea8e | 2,351 | py | Python | savu/plugins/unregistered/i13_loaders/i13_stxm_monitor_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/unregistered/i13_loaders/i13_stxm_monitor_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/unregistered/i13_loaders/i13_stxm_monitor_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source 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 agreed t... | 33.585714 | 89 | 0.677584 |
741f2086693ef1f5f26d3331dd54f7fcdd459a59 | 4,533 | py | Python | apysc/_file/module_util.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_file/module_util.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | apysc/_file/module_util.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | """Module related common utilities.
Mainly following interfaces are defined:
- get_module_paths_recursively
- Get all module paths under the specified directory.
- save_tmp_module
- Save a temporary Python module.
- save_tmp_module_and_run_script
- Save a temporary Python module and run that scri... | 28.33125 | 73 | 0.629605 |
741f2e6f9de77428129222cbb8816ee7745ba237 | 844 | py | Python | stickum/tests/test_model.py | chikatambun/stickum | 4eae5144ae4cb78912e77e823f98a072354f10f0 | [
"MIT"
] | null | null | null | stickum/tests/test_model.py | chikatambun/stickum | 4eae5144ae4cb78912e77e823f98a072354f10f0 | [
"MIT"
] | null | null | null | stickum/tests/test_model.py | chikatambun/stickum | 4eae5144ae4cb78912e77e823f98a072354f10f0 | [
"MIT"
] | null | null | null | # If your project uses a database, you can set up database tests
# similar to what you see below. Be sure to set the db_uri to
# an appropriate uri for your testing database. sqlite is a good
# choice for testing, because you can use an in-memory database
# which is very fast.
from turbogears import testutil, database... | 35.166667 | 64 | 0.64455 |
741f4e7043e4fef5ccfa03c3fdf3b6e82229ecb6 | 10,915 | py | Python | openstackclient/tests/volume/v2/test_qos_specs.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/tests/volume/v2/test_qos_specs.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/tests/volume/v2/test_qos_specs.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 iWeb Technologies 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 o... | 28.424479 | 77 | 0.616216 |
741f60817f9e8e5e6a1b3d9ab02855d543109a5e | 10,834 | py | Python | tests/pygenome/operators/test_mutation_tree.py | jorgetavares/pygenome | 2b529ea55feff8c4a0214b37354d4d7c273202a3 | [
"MIT"
] | 1 | 2019-11-18T14:41:20.000Z | 2019-11-18T14:41:20.000Z | tests/pygenome/operators/test_mutation_tree.py | jorgetavares/pygenome | 2b529ea55feff8c4a0214b37354d4d7c273202a3 | [
"MIT"
] | null | null | null | tests/pygenome/operators/test_mutation_tree.py | jorgetavares/pygenome | 2b529ea55feff8c4a0214b37354d4d7c273202a3 | [
"MIT"
] | null | null | null | import numpy as np
import pygenome as pg
import operator as op
def test_tree_point_mutation():
np.random.seed(42)
pset = pg.PrimitiveSet()
pset.addFunction(op.add, 2)
pset.addFunction(op.sub, 2)
pset.addTerminal(1)
pset.addTerminal(2)
pset.addTerminal(3)
pset.addVariable("x")
pop =... | 63.356725 | 667 | 0.470186 |
741f67b3ed5b114b897134c85540d9aad6744922 | 2,262 | py | Python | src/software/simulated_tests/excessive_dribbling.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | src/software/simulated_tests/excessive_dribbling.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | src/software/simulated_tests/excessive_dribbling.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | import software.python_bindings as tbots
from proto.import_all_protos import *
from software.simulated_tests.validation import (
Validation,
create_validation_geometry,
create_validation_types,
)
class ExcessivelyDribbling(Validation):
"""Checks if any friendly robot is excessively dribbling the bal... | 38.338983 | 113 | 0.693192 |
741f6ecb01b73094f535f0671127e13c5897c088 | 1,141 | py | Python | Daily coding problems/Problem 8 #Easy/Python/problem8.py | vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes | 35cee8317c05b36864a992789c741554205b3919 | [
"MIT"
] | 1 | 2021-02-11T14:54:34.000Z | 2021-02-11T14:54:34.000Z | Daily coding problems/Problem 8 #Easy/Python/problem8.py | vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes | 35cee8317c05b36864a992789c741554205b3919 | [
"MIT"
] | null | null | null | Daily coding problems/Problem 8 #Easy/Python/problem8.py | vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes | 35cee8317c05b36864a992789c741554205b3919 | [
"MIT"
] | null | null | null | #Driver code
class Node:
def __init__(self, val):
self.val = val
self.right = None
self.left = None
def create():
n = int(input())
if n == -1:
return None
root = Node(n)
root.left = create()
root.right = create()
return root
def print_tree(root):
if roo... | 24.804348 | 178 | 0.592463 |
741f72c41c6b65dc265294c4aeb091bcde925099 | 18,844 | py | Python | DRMM/train_drmm.py | RandolphVI/Deep-Relevance-Ranking | 7282113a9f5c1e5082fe360323a6930830a70f17 | [
"Apache-2.0"
] | 9 | 2019-02-28T08:59:03.000Z | 2021-02-26T15:56:36.000Z | DRMM/train_drmm.py | RandolphVI/Deep-Relevance-Ranking | 7282113a9f5c1e5082fe360323a6930830a70f17 | [
"Apache-2.0"
] | null | null | null | DRMM/train_drmm.py | RandolphVI/Deep-Relevance-Ranking | 7282113a9f5c1e5082fe360323a6930830a70f17 | [
"Apache-2.0"
] | 1 | 2019-12-18T14:43:08.000Z | 2019-12-18T14:43:08.000Z | # -*- coding:utf-8 -*-
__author__ = 'Randolph'
import os
import sys
import time
import logging
import numpy as np
import tensorflow as tf
from text_drmm import TextDRMM
from utils import checkmate as cm
from utils import data_helpers as dh
from sklearn.metrics import precision_score, recall_score, f1_score, roc_auc_sc... | 53.382436 | 119 | 0.607461 |
741f77049b1ca7407da33e841bbe84fadd159647 | 1,811 | py | Python | launch_system_modes/test/test_launch_system_modes/test_node.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 19 | 2019-05-10T15:54:34.000Z | 2021-09-29T16:33:19.000Z | launch_system_modes/test/test_launch_system_modes/test_node.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 60 | 2019-05-06T13:24:47.000Z | 2022-03-10T08:05:52.000Z | launch_system_modes/test/test_launch_system_modes/test_node.py | micro-ROS/system_modes | d62e24c2d27287bcd3996f553106eb5e9508c1ad | [
"Apache-2.0"
] | 6 | 2019-05-02T08:24:08.000Z | 2020-07-09T23:02:32.000Z | # Copyright 2021 Robert Bosch GmbH
#
# 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 wri... | 29.209677 | 74 | 0.657648 |
741f8d12f970bc76b8b125cf3e823154b102afa7 | 1,466 | py | Python | setup.py | gugarosa/opytimark | cad25623f23ce4b509d59381cf7bd79e41a966b6 | [
"Apache-2.0"
] | 3 | 2020-06-11T22:58:26.000Z | 2021-03-15T20:12:29.000Z | setup.py | gugarosa/opytimark | cad25623f23ce4b509d59381cf7bd79e41a966b6 | [
"Apache-2.0"
] | 1 | 2020-08-13T12:10:35.000Z | 2020-08-17T14:30:45.000Z | setup.py | gugarosa/opytimark | cad25623f23ce4b509d59381cf7bd79e41a966b6 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages, setup
with open('README.md', 'r') as f:
long_description = f.read()
setup(name='opytimark',
version='1.0.8',
description='Python Optimization Benchmarking Functions',
long_description=long_description,
long_description_content_type='text/markdown',
... | 36.65 | 72 | 0.542974 |
741f97b9629b850653a64c562e00ce9965680545 | 39,943 | py | Python | nova/tests/virt/libvirt/test_libvirt_blockinfo.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_libvirt_blockinfo.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_libvirt_blockinfo.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
#
# 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
#
# ... | 43.701313 | 79 | 0.501765 |
741f9aab8e272390434a369bfad38089b8ffe83b | 1,013 | py | Python | tdrs-backend/tdpservice/users/migrations/0021_add_dev_group.py | riatzukiza/TANF-app | e34efc87e9703bab37db76b84cc47a041e3612a1 | [
"CC0-1.0"
] | 18 | 2020-03-25T19:57:12.000Z | 2021-07-26T15:37:50.000Z | tdrs-backend/tdpservice/users/migrations/0021_add_dev_group.py | raft-tech/TANF-app | a4ff39ca392591c4c218ad86df3bff5056d73152 | [
"CC0-1.0"
] | 1,465 | 2020-07-22T21:16:53.000Z | 2022-03-31T16:04:22.000Z | tdrs-backend/tdpservice/users/migrations/0021_add_dev_group.py | riatzukiza/TANF-app | e34efc87e9703bab37db76b84cc47a041e3612a1 | [
"CC0-1.0"
] | 15 | 2020-07-22T14:58:37.000Z | 2021-06-22T17:29:55.000Z |
from django.db import migrations
from django.contrib.auth.models import Group
from django.conf import settings
def add_dev_group(apps, schema_editor):
"""Add super user group for devs that is only present in non production environments."""
if settings.ENABLE_DEVELOPER_GROUP:
developer, _ = (
... | 28.942857 | 92 | 0.641658 |
741fb92c7fea96a71069ed8a0dfd26dacb047e7d | 2,709 | py | Python | zerver/lib/bot_config.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | null | null | null | zerver/lib/bot_config.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 1 | 2021-11-15T17:53:42.000Z | 2021-11-15T17:53:42.000Z | zerver/lib/bot_config.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | 1 | 2020-10-26T08:49:45.000Z | 2020-10-26T08:49:45.000Z | from django.conf import settings
from django.db.models import Sum
from django.db.models.query import F
from django.db.models.functions import Length
from zerver.models import BotConfigData, UserProfile
from typing import Text, Dict, Optional
import os
import configparser
import importlib
class ConfigError(Exception... | 43.693548 | 109 | 0.662237 |
741fc83e1488da2a0d070712d3b7ba5985f03cab | 20,144 | py | Python | app/views/personne_session.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | app/views/personne_session.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | app/views/personne_session.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | import collections
import os
import random
import shutil
import tempfile
import uuid
from os.path import join
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.exceptions import ValidationError
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.... | 47.397647 | 81 | 0.498263 |
741fd713f16646941fe6df4a057d055d90a6de32 | 1,717 | py | Python | src/ggrc/models/clause.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/models/clause.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/models/clause.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Module for Clause model."""
from sqlalchemy import orm
from ggrc import db
from ggrc.access_control.roleable import Roleable
from ggrc.models.mixins import CustomAttributable
from ggrc.models.deferred im... | 29.101695 | 78 | 0.718695 |
741fdddf41307067cef7a73639c7f5c86c72eced | 3,951 | py | Python | oscar/lib/python2.7/site-packages/django/template/backends/jinja2.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/template/backends/jinja2.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/template/backends/jinja2.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Since this package contains a "django" module, this is required on Python 2.
from __future__ import absolute_import
import sys
import jinja2
from django.conf import settings
from django.template import TemplateDoesNotExist, TemplateSyntaxError
from django.utils import six
from django.utils.functional imp... | 33.201681 | 90 | 0.634776 |
741fe3f58af0e302b698254a2470bdf296e45412 | 5,627 | py | Python | fishy/gui/main_gui.py | fishyboteso/fishyboteso | f77478d52b801926bcf98f83c3a6192d448dfc0b | [
"MIT"
] | 13 | 2021-03-22T20:14:13.000Z | 2022-03-15T03:48:42.000Z | fishy/gui/main_gui.py | Sibiryak82/fishyboteso | f77478d52b801926bcf98f83c3a6192d448dfc0b | [
"MIT"
] | 49 | 2021-01-18T23:33:22.000Z | 2022-03-17T06:07:46.000Z | fishy/gui/main_gui.py | Sibiryak82/fishyboteso | f77478d52b801926bcf98f83c3a6192d448dfc0b | [
"MIT"
] | 8 | 2021-03-03T20:04:40.000Z | 2022-03-09T11:34:03.000Z | import logging
import time
import tkinter as tk
import tkinter.ttk as ttk
import typing
from ttkthemes import ThemedTk
from fishy import helper
from fishy.web import web
from ..constants import chalutier, lam2, fishyqr
from ..helper.config import config
from .discord_login import discord_login
from ..helper.hotkey.h... | 36.538961 | 129 | 0.675849 |
741fe5533dabf643390fe56d519941e2ca9457f6 | 7,614 | py | Python | BitsBack/BinaryVAE.py | deepaks4077/bits-back | 0d4355302eb4c5a18a229fa15a0a1caf8fe529d4 | [
"MIT"
] | null | null | null | BitsBack/BinaryVAE.py | deepaks4077/bits-back | 0d4355302eb4c5a18a229fa15a0a1caf8fe529d4 | [
"MIT"
] | null | null | null | BitsBack/BinaryVAE.py | deepaks4077/bits-back | 0d4355302eb4c5a18a229fa15a0a1caf8fe529d4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Code for training a VAE with a bernoulli likelihood on binarized MNIST.
Based on :
https://github.com/bits-back/bits-back/blob/master/torch_vae/tvae_binary.py
and
https://github.com/pytorch/examples/blob/master/vae/main.py
"""
__authors__ = ["Deepak Sharma"]
from typing import Tupl... | 37.141463 | 153 | 0.625033 |
74202550f82072a4686d504476035acbdc916f6a | 1,951 | py | Python | panoptes/utils/tests/test_theskyx_utils.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/tests/test_theskyx_utils.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/tests/test_theskyx_utils.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | import os
import pytest
from mocket import Mocket
from panoptes.utils import error
from panoptes.utils.theskyx import TheSkyX
@pytest.fixture(scope="function")
def skyx(request):
"""Create TheSkyX class but don't connect.t
If running with a real connection TheSkyX then the Mokcet will
be disabled here.... | 22.952941 | 97 | 0.667863 |
7420724bdbeab63b39542ada59328621febad895 | 8,188 | py | Python | tensorflow/compiler/tests/reduce_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/compiler/tests/reduce_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/compiler/tests/reduce_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"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.553571 | 80 | 0.632511 |
74207305b246eadef1e9d8ed7ba5f1efc3c4b835 | 3,083 | py | Python | permit/lib/dist/wtforms/ext/appengine/fields.py | aleaxit/pysolper | 5fa7a5424281ddac2957821b6e1cdc42a0931387 | [
"Apache-2.0"
] | 1 | 2015-04-09T14:28:33.000Z | 2015-04-09T14:28:33.000Z | permit/lib/dist/wtforms/ext/appengine/fields.py | stanlee321/pysolper | 5fa7a5424281ddac2957821b6e1cdc42a0931387 | [
"Apache-2.0"
] | null | null | null | permit/lib/dist/wtforms/ext/appengine/fields.py | stanlee321/pysolper | 5fa7a5424281ddac2957821b6e1cdc42a0931387 | [
"Apache-2.0"
] | null | null | null | import decimal
from wtforms import fields, widgets
class ReferencePropertyField(fields.SelectFieldBase):
"""
A field for ``db.ReferenceProperty``. The list items are rendered in a
select.
"""
widget = widgets.Select()
def __init__(self, label=u'', validators=None, reference_class=None,
... | 32.797872 | 100 | 0.571197 |
74208a242068e922e31ad6421947d89362cbd497 | 3,523 | py | Python | bot/exts/moderation/infraction/infractions.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/exts/moderation/infraction/infractions.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/exts/moderation/infraction/infractions.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | import datetime
import asyncio
from typing import Optional
import discord
from discord.ext import commands
from discord.utils import get
from bot.bot import Bot
from bot.constants import Roles
from bot.utils.converters import FetchedMember
from bot.utils.time import discord_timestamp
class Infractions(commands.Cog)... | 32.62037 | 102 | 0.624468 |
7420a1692bdae3dc498818cc9b4773bb9e6c0e97 | 87 | py | Python | app/requests.py | edumorris/pomodoro | cde372be1d5c37dd8221ebd40b684d07fbb472b5 | [
"MIT"
] | null | null | null | app/requests.py | edumorris/pomodoro | cde372be1d5c37dd8221ebd40b684d07fbb472b5 | [
"MIT"
] | null | null | null | app/requests.py | edumorris/pomodoro | cde372be1d5c37dd8221ebd40b684d07fbb472b5 | [
"MIT"
] | null | null | null | import urllib.request
from .models import Comment
def configure_request(app):
pass | 17.4 | 27 | 0.793103 |
742116664413f96ed0a73ab3db2c55a027dd2ffc | 39 | py | Python | src/signals/SkipSignal.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 3 | 2020-02-12T01:24:46.000Z | 2020-02-13T00:50:46.000Z | src/signals/SkipSignal.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 32 | 2020-02-20T10:20:56.000Z | 2022-02-10T01:42:46.000Z | src/signals/SkipSignal.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 1 | 2020-02-22T02:47:19.000Z | 2020-02-22T02:47:19.000Z |
class SkipSignal(Exception):
pass
| 9.75 | 28 | 0.717949 |
74212d43d61e5e7b96f5f45802564091a9b3aa15 | 1,584 | py | Python | src/buildstream/_options/optionbool.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_options/optionbool.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_options/optionbool.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2017 Codethink Limited
#
# 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... | 28.285714 | 112 | 0.652146 |
742138133e621c94a1bf2b91b99cdcdfc22b842e | 3,472 | py | Python | src/ggrc/migrations/versions/20160421141928_1257140cbce5_delete_responses_table.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc/migrations/versions/20160421141928_1257140cbce5_delete_responses_table.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc/migrations/versions/20160421141928_1257140cbce5_delete_responses_table.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Delete responses table and any other references to responses
Create Date: 2016-04-21 14:19:28.527745
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=... | 45.090909 | 79 | 0.664459 |
74213d097ec61579b720950c118f518028883071 | 5 | py | Python | src/Application/PythonScriptModule/proto/state.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 186 | 2015-09-28T16:50:16.000Z | 2019-05-03T07:30:23.000Z | src/Application/PythonScriptModule/proto/state.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 19 | 2015-09-30T22:36:36.000Z | 2019-04-16T20:28:35.000Z | src/Application/PythonScriptModule/proto/state.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 52 | 2015-09-28T18:35:23.000Z | 2019-05-02T07:08:13.000Z | x = 0 | 5 | 5 | 0.4 |
74214c375e90b105547156bbae445694e2337b8b | 508 | py | Python | pytropos/internals/__init__.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 4 | 2019-10-06T18:01:24.000Z | 2020-07-03T05:27:35.000Z | pytropos/internals/__init__.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 5 | 2021-06-07T15:50:04.000Z | 2021-06-07T15:50:06.000Z | pytropos/internals/__init__.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | null | null | null | from .values import (
int, float, bool, none, list, tuple, Args, ModuleTop, Top
)
from .store import Store
from .control import runIf, runWhile, annotation
__all__ = [
'int', 'float', 'bool', 'none', 'list', 'tuple', 'Args', 'ModuleTop', 'Top',
'Store',
'runIf', 'runWhile', 'annotation',
'loadBuilt... | 26.736842 | 80 | 0.655512 |
74215f18496f6b82e16e3e7ffd4b891a1aac107c | 102,864 | py | Python | rmgpy/molecule/molecule.py | yubioinfo/RMG-Py | bfffc5b650934fe7ced117939d6b3b219f2317e5 | [
"MIT"
] | 1 | 2020-03-17T13:16:51.000Z | 2020-03-17T13:16:51.000Z | rmgpy/molecule/molecule.py | yubioinfo/RMG-Py | bfffc5b650934fe7ced117939d6b3b219f2317e5 | [
"MIT"
] | null | null | null | rmgpy/molecule/molecule.py | yubioinfo/RMG-Py | bfffc5b650934fe7ced117939d6b3b219f2317e5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... | 40.275646 | 217 | 0.579697 |
742161079e93a97295e4bf015ccd8ece047fe42c | 1,158 | py | Python | tests/functional/adapter/test_schema_tests.py | GtheSheep/dbt-core | e2f0467f5ddd1578d8b4494ae1fbbbe6655a33c2 | [
"Apache-2.0"
] | null | null | null | tests/functional/adapter/test_schema_tests.py | GtheSheep/dbt-core | e2f0467f5ddd1578d8b4494ae1fbbbe6655a33c2 | [
"Apache-2.0"
] | null | null | null | tests/functional/adapter/test_schema_tests.py | GtheSheep/dbt-core | e2f0467f5ddd1578d8b4494ae1fbbbe6655a33c2 | [
"Apache-2.0"
] | null | null | null | import pytest
from dbt.tests.util import run_dbt
from tests.functional.adapter.files import (
seeds_base_csv,
schema_test_seed_yml,
base_view_sql,
base_table_sql,
schema_base_yml,
schema_test_view_yml,
schema_test_table_yml,
)
@pytest.fixture(scope="class")
def project_config_update():
... | 21.849057 | 50 | 0.65544 |
74216624978f124623a7c48fa42ebba0c8d5c922 | 12,821 | py | Python | tests/core/vm/test_base_computation.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | tests/core/vm/test_base_computation.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 4 | 2017-08-26T17:56:20.000Z | 2018-03-26T08:38:17.000Z | tests/core/vm/test_base_computation.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 2 | 2018-12-09T15:58:11.000Z | 2020-09-29T07:10:21.000Z | import pytest
from eth_utils import (
to_canonical_address,
ValidationError,
)
from eth.exceptions import (
VMError,
Revert,
)
from eth.vm.message import (
Message,
)
from eth.vm.computation import (
BaseComputation,
)
from eth.vm.transaction_context import (
BaseTransactionContext,
)
NO... | 33.129199 | 99 | 0.743312 |
742182217bb7ecb230b127e8c0e8ab25e8441fa2 | 41 | py | Python | simple_mediapipe/calculators/__init__.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | simple_mediapipe/calculators/__init__.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | simple_mediapipe/calculators/__init__.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | from .core import *
from .video import *
| 13.666667 | 20 | 0.707317 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.