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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91f6c7f00d79ff4f4f56ba4a7d342d83dca58c0b | 1,873 | py | Python | tests/test_extract_key_phrases.py | vimal-yuvabe/rake | 072f4b25b090622f32c9044a62fcda380427e114 | [
"MIT"
] | null | null | null | tests/test_extract_key_phrases.py | vimal-yuvabe/rake | 072f4b25b090622f32c9044a62fcda380427e114 | [
"MIT"
] | null | null | null | tests/test_extract_key_phrases.py | vimal-yuvabe/rake | 072f4b25b090622f32c9044a62fcda380427e114 | [
"MIT"
] | null | null | null | from fastapi.testclient import TestClient
from main import app
client = TestClient(app)
def test_read_main():
""" Test the Root Route"""
response = client.get("/")
assert response.status_code == 200
message = "This REST API will extract the key phrases or keywords from the input text"
assert res... | 31.216667 | 90 | 0.432995 |
91f6e663fff7aff1844f979a8ebbade9bf8c3381 | 888 | py | Python | enhterm/provider/parser/__init__.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | enhterm/provider/parser/__init__.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | enhterm/provider/parser/__init__.py | pyl1b/enhterm | b4eacc25ef1bdfecab9a662b5269d016070d4e6b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Contains the definition of the Parser class.
"""
import logging
from enhterm.base import EtBase
logger = logging.getLogger('et.parser')
class Parser(EtBase):
"""
Parser for :class:`~ParserProvider`.
"""
def __init__(self, provider=None, *args, **kwargs):
"""
... | 22.2 | 65 | 0.567568 |
91f70c48c4313df60d4125900b0b85531953c6a2 | 968 | py | Python | Code Forces/Round 638/phoenix_and_balance.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | Code Forces/Round 638/phoenix_and_balance.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | Code Forces/Round 638/phoenix_and_balance.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | for t in range(int(input())):
n = int(input())
s1 = 0
s2 = 0
i = 1
j = n
flag = 1
if n == 2:
print(2)
elif (n//2)%2 == 0:
while i < j:
if flag == 1:
s1 += 2**i + 2**j
flag = 2
elif flag == 2:
s2 += 2... | 18.980392 | 34 | 0.248967 |
91f70e59417fb1f00fc2d6da3740f440f52ee496 | 122 | py | Python | tron/Hub/Command/Encoders/__init__.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Hub/Command/Encoders/__init__.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Hub/Command/Encoders/__init__.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | from .ASCIICmdEncoder import *
from .BinaryCmdEncoder import *
from .CommandEncoder import *
from .RawCmdEncoder import *
| 24.4 | 31 | 0.803279 |
91f7162d7d2ff1471af5cfaf77c107c215cbbf5b | 14,331 | py | Python | portal/apps/core/management/commands/send_category_nl.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | null | null | null | portal/apps/core/management/commands/send_category_nl.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | null | null | null | portal/apps/core/management/commands/send_category_nl.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# utopia-cms, 2018-2021, Aníbal Pacheco
import sys
import os
import logging
import smtplib
import time
from MySQLdb import ProgrammingError
from datetime import date, datetime, timedelta
from socket import error
from hashids import Hashids
from emails.django import DjangoMessage as Message
from... | 44.095385 | 119 | 0.622776 |
91f732603da26329277a5617744e450a5fb8dcab | 4,955 | py | Python | src/sentry/signals.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/signals.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/signals.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import logging
from django.dispatch.dispatcher import NO_RECEIVERS, Signal
class BetterSignal(Signal):
def connect(self, receiver=None, **kwargs):
"""
Support decorator syntax:
>>> @signal.connect(sender=type)
>>> def my_receiver(**kwargs):... | 44.241071 | 98 | 0.721897 |
91f744f2d36779255c1365df0bea08f8a02ee920 | 2,492 | py | Python | Assignment1/util/dataset.py | parthjindal/CS60050 | 7ac2270ec8076f8334f7a29c7ec547c6cb6721ca | [
"MIT"
] | null | null | null | Assignment1/util/dataset.py | parthjindal/CS60050 | 7ac2270ec8076f8334f7a29c7ec547c6cb6721ca | [
"MIT"
] | null | null | null | Assignment1/util/dataset.py | parthjindal/CS60050 | 7ac2270ec8076f8334f7a29c7ec547c6cb6721ca | [
"MIT"
] | null | null | null | import pandas as pd
import os
import urllib3
from typing import Dict, List, Tuple
class CarDataset:
"""
`UCI <https://archive.ics.uci.edu/ml/datasets/car+evaluation> Car Dataset`
Arguments:
root [str]: Root directory of the dataset
download [bool,optional]: If true, download the dataset f... | 27.688889 | 105 | 0.5626 |
91f7528335b476c65b0e7f8574a5c7fa89008d30 | 1,986 | py | Python | brian2/tests/test_spikequeue.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | 2 | 2020-03-20T13:30:19.000Z | 2020-03-20T13:30:57.000Z | brian2/tests/test_spikequeue.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | 13 | 2015-10-05T15:33:42.000Z | 2015-11-18T08:31:42.000Z | brian2/tests/test_spikequeue.py | moritzaugustin/brian2 | d98ea0cb4af0c9426e71c8ee7659ddb13aea8593 | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
from numpy.testing.utils import assert_equal
from nose.plugins.attrib import attr
from brian2.synapses.spikequeue import SpikeQueue
from brian2.units.stdunits import ms
from brian2.memory.dynamicarray import DynamicArray1D
def create_all_to_all(N, dt):
'''
Return a tuple containing `synaps... | 30.090909 | 80 | 0.671198 |
91f7687aab0d42743d1b3cb194da16ba8f034b24 | 4,419 | py | Python | datawinners/accountmanagement/tests/test_post_activation_events.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/accountmanagement/tests/test_post_activation_events.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/accountmanagement/tests/test_post_activation_events.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from django_countries.fields import Country
from mangrove.datastore.database import DatabaseManager
from mangrove.datastore.entity import Entity
from django.utils import unittest
from mangrove.form_model.form_model import REPORTER
from mock import Mock, patch
from datawinners.accountmanagement.models import DataSenderO... | 48.56044 | 151 | 0.75379 |
91f76903c4606e015e36db27477998fd455be1b7 | 5,407 | py | Python | formish/tests/unittests/test_widget.py | zvoase/formish | 6eb47ea310d1c2137d0717be61c000618f3d112d | [
"BSD-3-Clause"
] | 1 | 2016-05-08T22:54:48.000Z | 2016-05-08T22:54:48.000Z | formish/tests/unittests/test_widget.py | zvoase/formish | 6eb47ea310d1c2137d0717be61c000618f3d112d | [
"BSD-3-Clause"
] | null | null | null | formish/tests/unittests/test_widget.py | zvoase/formish | 6eb47ea310d1c2137d0717be61c000618f3d112d | [
"BSD-3-Clause"
] | null | null | null | import base
import unittest
import formish
import schemaish
from BeautifulSoup import BeautifulSoup
from datetime import date
class TestFormExamples(base.TestCase):
def test_string_form(self):
"""
Form with a couple of string fields
"""
schema = schemaish.Structure()
schema... | 32.572289 | 99 | 0.575365 |
91f77a441c3b1be2ad5a1ff29ab86283e86211c1 | 197 | py | Python | workon/contrib/cleaner/signals.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | 1 | 2018-01-19T16:08:54.000Z | 2018-01-19T16:08:54.000Z | workon/contrib/cleaner/signals.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | 1 | 2020-07-06T08:35:18.000Z | 2020-07-06T08:35:18.000Z | workon/contrib/cleaner/signals.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | 4 | 2020-04-08T06:14:46.000Z | 2020-12-11T14:28:06.000Z | '''
django-cleanup sends the following signals
'''
from django.dispatch import Signal
cleanup_pre_delete = Signal(providing_args=["file"])
cleanup_post_delete = Signal(providing_args=["file"]) | 28.142857 | 53 | 0.771574 |
91f78265fab0735abb807bbc199c8cec81f3e8f6 | 3,393 | py | Python | dipy/tracking/gui_tools.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/tracking/gui_tools.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/tracking/gui_tools.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | from warnings import warn
# Import traits as optional package
try:
from traitsui.api import Item, Group, View, ArrayEditor
except ImportError:
from ..utils.optpkg import OptionalImportError
raise OptionalImportError("You must have traits to use this module")
from .interfaces import InputData
from ..tracki... | 42.949367 | 78 | 0.486295 |
91f788d55769803ff646f4525c83be35b9371662 | 10,057 | py | Python | MAB_algorithm/MAB_MC.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | 1 | 2021-12-11T11:26:14.000Z | 2021-12-11T11:26:14.000Z | MAB_algorithm/MAB_MC.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | null | null | null | MAB_algorithm/MAB_MC.py | Antares0982/MLB-algorithm-template | 0008e66c0dcf59760b1141a8e11c5eecec77076e | [
"MIT"
] | null | null | null | import logging
import time
from multiprocessing import Pool
from typing import Any, Dict, List, Type, TypeVar, Union
import numpy as np
import pandas as pd
from MAB_algorithm.arm import *
try:
from typing import TYPE_CHECKING
except ImportError:
TYPE_CHECKING = False
if TYPE_CHECKING:
from MAB_algorith... | 33.976351 | 109 | 0.536045 |
91f7c6c2554e87e43dd76ca2a663690765a56b3e | 299 | py | Python | onadata/apps/export/__init__.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/export/__init__.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/export/__init__.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
#################################################
# THIS APP IS DEAD CODE AND SHOULD BE EXCISED #
# EVERY SINGLE ENDPOINT 500s EXCEPT export_menu #
#################################################
| 42.714286 | 82 | 0.528428 |
91f7fafb32a0208769ded4865f3092115110007c | 19,681 | py | Python | pib.py | Morozzzko/particles-in-box-python | 3b381e6ea9c433b8293a9b32da35f75386d9344b | [
"MIT"
] | null | null | null | pib.py | Morozzzko/particles-in-box-python | 3b381e6ea9c433b8293a9b32da35f75386d9344b | [
"MIT"
] | 1 | 2016-03-19T09:36:23.000Z | 2016-03-19T09:48:22.000Z | pib.py | Morozzzko/particles-in-box-python | 3b381e6ea9c433b8293a9b32da35f75386d9344b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sys import argv
from PySide import QtGui, QtCore
from PySide.QtOpenGL import QGLWidget
from particles.gui import Ui_NewExperimentWindow, Ui_DemonstrationWindow
from particles.simulation import Simulator, Playback
from OpenGL.GL import (glShadeModel, glClearColor, glC... | 36.378928 | 93 | 0.582948 |
91f805883f13bd7f02668f2f8d0a68b21fb44d30 | 2,156 | py | Python | tests/tf/examples/test_02_dataschema.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | null | null | null | tests/tf/examples/test_02_dataschema.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | null | null | null | tests/tf/examples/test_02_dataschema.py | bschifferer/models-1 | b6042dbd1b98150cc50fd7d2cb6c07033f42fd35 | [
"Apache-2.0"
] | null | null | null | from testbook import testbook
from tests.conftest import REPO_ROOT
@testbook(REPO_ROOT / "examples/02-Merlin-Models-and-NVTabular-integration.ipynb", execute=False)
def test_func(tb):
tb.inject(
"""
import os
os.environ["INPUT_DATA_DIR"] = "/tmp/data/"
from unittest.mock import pa... | 32.179104 | 97 | 0.58859 |
91f80c8da2e7c92e3dba341a4d7557965d656adf | 6,411 | py | Python | pymarket/mechanisms/huang_auction.py | kiedanski/pymarket | 0d73fe45a2c458a02e660816369e4699decefb2b | [
"MIT"
] | 12 | 2020-01-04T05:22:23.000Z | 2021-05-23T23:59:48.000Z | pymarket/mechanisms/huang_auction.py | kiedanski/pymarket | 0d73fe45a2c458a02e660816369e4699decefb2b | [
"MIT"
] | 14 | 2019-08-06T03:18:29.000Z | 2021-02-08T10:31:13.000Z | pymarket/mechanisms/huang_auction.py | gus0k/pymarket | 0d73fe45a2c458a02e660816369e4699decefb2b | [
"MIT"
] | 5 | 2019-08-30T05:04:54.000Z | 2020-12-18T14:40:14.000Z | from pymarket.bids import BidManager
from pymarket.mechanisms import Mechanism
from pymarket.transactions import TransactionManager
from pymarket.bids.demand_curves import *
from collections import OrderedDict
def update_quantity(quantity, gap):
"""Implements the footnote in page 8 of [1],
where the long side... | 27.633621 | 84 | 0.569334 |
91f82189a1f3d9ef6bebc9259958af14bbecb8fd | 17,528 | py | Python | manticore/core/smtlib/solver.py | etcd/manticore | 87073d9985c4ca445217b7b135a6af0a51044b21 | [
"Apache-2.0"
] | null | null | null | manticore/core/smtlib/solver.py | etcd/manticore | 87073d9985c4ca445217b7b135a6af0a51044b21 | [
"Apache-2.0"
] | null | null | null | manticore/core/smtlib/solver.py | etcd/manticore | 87073d9985c4ca445217b7b135a6af0a51044b21 | [
"Apache-2.0"
] | 1 | 2021-07-12T01:14:03.000Z | 2021-07-12T01:14:03.000Z | ###############################################################################
# Solver
# A solver maintains a companion smtlib capable process connected via stdio.
# It can be in 4 main states: None, unknown, sat, unsat
# None nothing was yet sent to the smtlib process. Al the state is only at the python side
# ... | 36.592902 | 123 | 0.567093 |
91f86491883a3ac81f52c0e58576d976672b334c | 248,069 | py | Python | NBA Project/venv/Lib/site-packages/nba_api/stats/library/data.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | NBA Project/venv/Lib/site-packages/nba_api/stats/library/data.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | NBA Project/venv/Lib/site-packages/nba_api/stats/library/data.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2019-09-09T19:18:38.000Z | 2019-09-09T19:18:38.000Z | player_index_id = 0
player_index_last_name = 1
player_index_first_name = 2
player_index_full_name = 3
player_index_is_active = 4
# Data last updated: Apr, 21 2019
players = [
[76001, "Abdelnaby", "Alaa", "Alaa Abdelnaby", False],
[76002, "Abdul-Aziz", "Zaid", "Zaid Abdul-Aziz", False],
[76003, "Abdul-Jabb... | 55.795996 | 101 | 0.586821 |
91f888fb8d5da7d1ba4fba312205a72d15d7231b | 40,855 | py | Python | cadnano/views/pathview/tools/createtool.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2022-03-27T14:37:32.000Z | 2022-03-27T14:37:32.000Z | cadnano/views/pathview/tools/createtool.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | null | null | null | cadnano/views/pathview/tools/createtool.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T02:29:38.000Z | 2021-01-22T02:29:38.000Z | """Summary
Attributes:
L3_POLY (TYPE): Description
POLY_35 (TYPE): Description
POLY_53 (TYPE): Description
PP35 (TYPE): Description
PP53 (TYPE): Description
PPL3 (TYPE): Description
PPL5 (TYPE): Description
PPR3 (TYPE): Description
PPR5 (TYPE): Description
R3_POLY (TYPE): Descri... | 31.02126 | 111 | 0.615102 |
91f8a0c468e85e042152955b470e5596080568fe | 711 | py | Python | txdav/common/datastore/podding/base.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/common/datastore/podding/base.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/common/datastore/podding/base.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2013-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 32.318182 | 74 | 0.742616 |
91f8b11666163f4f7db88f856cb8d3d479e21764 | 9,291 | py | Python | papermerge/test/test_document.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/test/test_document.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/test/test_document.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
from django.test import TestCase
from papermerge.core.document_importer import DocumentImporter
from papermerge.core.models import Document, Folder, Automate
from papermerge.test.utils import create_root_user
# points to papermerge.testing folder
BASE_DIR = Path(__file__).parent
c... | 26.245763 | 69 | 0.496287 |
91f8b22827535931efd95dc266ccc203c7f923cd | 5,567 | py | Python | datagen.py | ksanjeevan/seeing-the-world | 5fc900c3d508791852effbbbea5d6a62a8a84ace | [
"MIT"
] | null | null | null | datagen.py | ksanjeevan/seeing-the-world | 5fc900c3d508791852effbbbea5d6a62a8a84ace | [
"MIT"
] | null | null | null | datagen.py | ksanjeevan/seeing-the-world | 5fc900c3d508791852effbbbea5d6a62a8a84ace | [
"MIT"
] | null | null | null |
import imgaug as ia
from imgaug import augmenters as iaa
import os,cv2
from keras.utils import Sequence
import numpy as np
np.warnings.filterwarnings('ignore')
ia.seed(1)
def parse_input_data(path, split=0.75):
"""
Parse training images for DataGenerator to process.
"""
ret = []
class_map = {}
... | 28.548718 | 85 | 0.559727 |
91f8ccefa02197fc11560ccb85f844f3c4d1397e | 16,142 | py | Python | data_generator/gen_number_letters.py | dmitryshendryk/mask_rcnn_carplate | c0b8de45f3ce95712140259a7ad520e118dee0ed | [
"MIT"
] | null | null | null | data_generator/gen_number_letters.py | dmitryshendryk/mask_rcnn_carplate | c0b8de45f3ce95712140259a7ad520e118dee0ed | [
"MIT"
] | null | null | null | data_generator/gen_number_letters.py | dmitryshendryk/mask_rcnn_carplate | c0b8de45f3ce95712140259a7ad520e118dee0ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2016 Matthew Earl
#
# 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, modif... | 34.054852 | 172 | 0.571057 |
91f92754e092d0fe10d4c379e6c53da9b3fcbdfb | 3,231 | py | Python | python/cluster.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-09T17:55:04.000Z | 2022-02-25T14:54:01.000Z | python/cluster.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 32 | 2020-01-09T20:40:26.000Z | 2020-12-18T16:39:41.000Z | python/cluster.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-18T14:50:11.000Z | 2021-10-06T12:49:24.000Z | from scipy.cluster.hierarchy import leaves_list, linkage
import pandas as pd
# I found this tutorial very helpful:
# https://joernhees.de/blog/2015/08/26/scipy-hierarchical-clustering-and-dendrogram-tutorial/
def _order_rows(dataframe):
'''
>>> df = pd.DataFrame({
... 'cell-1': {'a':8, 'b':1, 'c': 7, '... | 28.848214 | 93 | 0.467348 |
91f952d7a055e373ad40f3852dfff0c7dfec7894 | 22,295 | py | Python | veros/core/density/gsw.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 115 | 2019-11-23T02:31:30.000Z | 2022-03-29T12:58:30.000Z | veros/core/density/gsw.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 207 | 2019-11-21T13:21:22.000Z | 2022-03-31T23:36:09.000Z | veros/core/density/gsw.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 21 | 2020-01-28T13:13:39.000Z | 2022-02-02T13:46:33.000Z | from veros.core.operators import numpy as npx
from veros import veros_kernel, runtime_settings
"""
==========================================================================
in-situ density, dynamic enthalpy and derivatives
from Absolute Salinity and Conservative
Temperature, using the computationally-efficient... | 32.12536 | 120 | 0.451447 |
91f961e97090b24743cc29cdc01e09a1220cc8c7 | 14,441 | py | Python | renpy/translation/generation.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/translation/generation.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/translation/generation.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2004-2021 Tom Rothamel <pytom@bishoujo.us>
#
# 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, modify, m... | 26.01982 | 144 | 0.593241 |
91f9754a6b267bd2efa28293e87bcabfe136dc83 | 1,146 | py | Python | src/prof.py | ariannasg/optimizing-python | e6c307dc694bc98c776faea1dbd7f420c2928f64 | [
"MIT"
] | null | null | null | src/prof.py | ariannasg/optimizing-python | e6c307dc694bc98c776faea1dbd7f420c2928f64 | [
"MIT"
] | null | null | null | src/prof.py | ariannasg/optimizing-python | e6c307dc694bc98c776faea1dbd7f420c2928f64 | [
"MIT"
] | null | null | null | #!usr/bin/env python3
from random import random
from src.login import login
# When using cProfile we get the number of calls, the total time, the time per
# call, etc., etc. We run it by doing:
# python -m cProfile src/prof.py
# Using cProfile will slow down the program. If we need a more lightweight
# statistical p... | 30.157895 | 78 | 0.63438 |
91f97579cb69407400cde136d9e8292f9dd5ddad | 6,431 | py | Python | ratings/models/models.py | Platzi-Master-C8/gethired-jobplacement-ratings-backend | afa5ae3a749f9fcab863832d7db0928711a3f4e0 | [
"MIT"
] | 1 | 2021-12-12T07:22:16.000Z | 2021-12-12T07:22:16.000Z | ratings/models/models.py | Platzi-Master-C8/gethired-jobplacement-ratings-backend | afa5ae3a749f9fcab863832d7db0928711a3f4e0 | [
"MIT"
] | 57 | 2021-12-21T17:56:48.000Z | 2022-03-06T21:17:39.000Z | ratings/models/models.py | Platzi-Master-C8/gethired-jobplacement-ratings-backend | afa5ae3a749f9fcab863832d7db0928711a3f4e0 | [
"MIT"
] | 5 | 2021-12-04T21:09:51.000Z | 2022-01-29T16:14:02.000Z | # Python
# SQLAlchemy
from sqlalchemy import Column, Integer, String, DECIMAL, Date, ForeignKey, DateTime
from sqlalchemy.sql import func
from sqlalchemy.orm import relationship
from sqlalchemy.orm import backref
# Project
from ratings.config.database import Base
class CompanyEvaluation(Base):
__tablename__ = ... | 37.608187 | 87 | 0.740942 |
91f98e8c8342aead82f034750a78a64eb0994af4 | 1,756 | py | Python | vyperlogix/gds/spinner.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/gds/spinner.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/gds/spinner.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | '''
Implements a text spinner. Prints to stdout.
Copyright (C) 2002 GDS Software
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later versi... | 28.322581 | 68 | 0.643508 |
91f98fdc70fd474c6d96082df60b4708ee4ba13a | 84 | py | Python | test/rules_prep/always_false.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-23T12:57:47.000Z | 2020-04-18T17:13:08.000Z | test/rules_prep/always_false.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-09T22:10:07.000Z | 2022-02-16T04:57:06.000Z | test/rules_prep/always_false.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 11 | 2018-12-11T22:01:13.000Z | 2022-01-07T11:38:02.000Z | RULE_NAME = 'Always False'
CAUSE_ID = 1000
def logic_rule(row):
return False
| 10.5 | 26 | 0.702381 |
91f9996674f15de59de88160d9053c045d768b62 | 4,582 | py | Python | scripts/annotate-partitions.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | scripts/annotate-partitions.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | scripts/annotate-partitions.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | #! /usr/bin/env python
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) 2011-2015, Michigan State University.
# Copyright (C) 2015, The Regents of the University of California.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted pro... | 39.162393 | 79 | 0.709297 |
91f99b51dffe4090bc0025bba513ee754c9b8972 | 5,688 | py | Python | nlp/nlp_find_noun_keywords.py | sudharkj/unibrowser | 7f3b407d3469ee2dffa72d3917af1e42100b71de | [
"Apache-2.0"
] | null | null | null | nlp/nlp_find_noun_keywords.py | sudharkj/unibrowser | 7f3b407d3469ee2dffa72d3917af1e42100b71de | [
"Apache-2.0"
] | 1 | 2020-06-01T08:53:39.000Z | 2020-06-01T08:53:39.000Z | nlp/nlp_find_noun_keywords.py | sudharkj/unibrowser | 7f3b407d3469ee2dffa72d3917af1e42100b71de | [
"Apache-2.0"
] | 7 | 2018-10-06T04:32:16.000Z | 2018-11-10T23:40:09.000Z | # Prachi S. Rahurkar -
# Contains the function_to find nouns in a query fired by the user
import nltk
#nltk.download('averaged_perceptron_tagger')
def find_nouns_in_query(lines_array):
i = 0
for i in range(len(lines_array)):
# function to test if something is a noun
is_noun = lambda pos:... | 88.875 | 242 | 0.65102 |
91f99fae63ac89f5e6fabe137c4a8c194308c6bf | 3,571 | py | Python | src/main/mail_serv/keeper.py | random-python/mail_serv | ffd048dc544c39bf4b9417947e970b6a86a056c7 | [
"Apache-2.0"
] | null | null | null | src/main/mail_serv/keeper.py | random-python/mail_serv | ffd048dc544c39bf4b9417947e970b6a86a056c7 | [
"Apache-2.0"
] | null | null | null | src/main/mail_serv/keeper.py | random-python/mail_serv | ffd048dc544c39bf4b9417947e970b6a86a056c7 | [
"Apache-2.0"
] | null | null | null | """
Dovecot maintenance service
"""
import os
import logging
from mail_serv.profiler import profiler_session
from mail_serv.user import user_list
from mail_serv.tinker import tinker_node_iterate
from mail_serv.maintain import maintain_user
from mail_serv.subscribe import subscribe_user
from mail_serv.replicate import ... | 33.064815 | 87 | 0.685522 |
91f9c14d65b54137d2fafd1dffe8a676935d39ea | 1,466 | py | Python | speaker_verification/utils/logger.py | OnTrack-UG-Squad/Speech_Verification_public | 314e37a0df16340f83482e90f0ee34f117b23ead | [
"MIT"
] | 7 | 2021-01-18T14:34:47.000Z | 2021-03-08T22:50:05.000Z | speaker_verification/utils/logger.py | OnTrack-UG-Squad/Speech_Verification_public | 314e37a0df16340f83482e90f0ee34f117b23ead | [
"MIT"
] | 23 | 2021-03-14T23:51:22.000Z | 2021-09-14T06:37:34.000Z | speaker_verification/utils/logger.py | OnTrack-UG-Squad/Speech_Verification_public | 314e37a0df16340f83482e90f0ee34f117b23ead | [
"MIT"
] | 2 | 2021-01-08T11:31:08.000Z | 2021-01-18T14:30:55.000Z | import logging
from datetime import date
from logging import Logger
from logging.handlers import TimedRotatingFileHandler
from os.path import abspath, dirname
class SpeakerVerificationLogger(Logger):
def __init__(
self,
name: str,
log_file: str = "",
log_format: st... | 32.577778 | 87 | 0.640518 |
91fa015170a15bf0768c020cf629784a17292b9b | 6,501 | py | Python | fluo/views/base.py | rsalmaso/django-fluo | 340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b | [
"MIT"
] | 1 | 2020-08-05T09:29:08.000Z | 2020-08-05T09:29:08.000Z | fluo/views/base.py | rsalmaso/django-fluo | 340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b | [
"MIT"
] | 1 | 2020-08-05T09:28:58.000Z | 2020-09-19T09:02:48.000Z | fluo/views/base.py | rsalmaso/django-fluo | 340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b | [
"MIT"
] | null | null | null | # Copyright (C) 2007-2020, Raffaele Salmaso <raffaele@salmaso.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 rights
# to use, cop... | 33.859375 | 137 | 0.611906 |
91fa117d840ae279756c52f4febc5a36a19f2c37 | 1,258 | py | Python | activelearning/mdal/gdb-md-al.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | 8 | 2018-10-30T16:48:44.000Z | 2021-03-08T01:44:41.000Z | activelearning/mdal/gdb-md-al.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | null | null | null | activelearning/mdal/gdb-md-al.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | 5 | 2018-04-05T15:51:12.000Z | 2019-05-23T21:38:31.000Z | import pyaniasetools as pya
import gdbsearchtools as gdb
from rdkit import Chem
from rdkit.Chem import AllChem
#--------------Parameters------------------
wkdir = '/home/jujuman/Research/DataReductionMethods/model6r/model-gdb01-06_red03-08/cv4/'
cnstfile = wkdir + 'rHCNO-4.6A_16-3.1A_a4-8.params'
saefile = wkdir + 's... | 28.590909 | 90 | 0.643084 |
91fa2b69226e3c0c1812cb0d0c8e5ad31a58b593 | 3,998 | py | Python | alipay/aop/api/request/AlipayOpenMiniInnerMtopsyncModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOpenMiniInnerMtopsyncModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOpenMiniInnerMtopsyncModifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenMiniInnerMtopsyncModifyModel import AlipayOpenMiniInnerMtopsyncModifyModel
class AlipayOpenMiniInnerMtopsyncModifyRequest(... | 27.572414 | 148 | 0.646823 |
91fa4adf813afeff4ee8cff082ebb2bd99d4723f | 269 | py | Python | Python3/Coursera/003_quadratic_roots/solution.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Coursera/003_quadratic_roots/solution.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Coursera/003_quadratic_roots/solution.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | import sys
import math
if __name__ == '__main__':
a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])
d = b * b - 4 * a * c
x1 = (-b + math.sqrt(d)) / (2 * a)
x2 = (-b - math.sqrt(d)) / (2 * a)
print(int(x1))
print(int(x2))
| 19.214286 | 38 | 0.472119 |
91fa5996f1d100c5731592164ba27b80a08a39c7 | 12,842 | py | Python | langid/examples/_twokenize.py | bpopeters/langid.py | 9c6187f21bfd7f150bdd6d36a121353bd77ea990 | [
"BSD-2-Clause-FreeBSD"
] | 1,774 | 2015-01-03T00:15:46.000Z | 2022-03-31T14:52:13.000Z | langid/examples/_twokenize.py | bpopeters/langid.py | 9c6187f21bfd7f150bdd6d36a121353bd77ea990 | [
"BSD-2-Clause-FreeBSD"
] | 57 | 2015-01-13T09:14:40.000Z | 2021-09-14T13:14:31.000Z | langid/examples/_twokenize.py | bpopeters/langid.py | 9c6187f21bfd7f150bdd6d36a121353bd77ea990 | [
"BSD-2-Clause-FreeBSD"
] | 292 | 2015-01-20T00:52:29.000Z | 2022-03-31T14:52:16.000Z | # -*- coding: utf-8 -*-
"""
Twokenize -- a tokenizer designed for Twitter text in English and some other European languages.
This tokenizer code has gone through a long history:
(1) Brendan O'Connor wrote original version in Python, http://github.com/brendano/tweetmotif
TweetMotif: Exploratory Search and Topic ... | 42.806667 | 185 | 0.622567 |
91fa62f5f671d0225a7c3e7057e824d0218d2bac | 66,363 | py | Python | modules/s3db/vulnerability.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | 1 | 2018-01-06T12:58:32.000Z | 2018-01-06T12:58:32.000Z | modules/s3db/vulnerability.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | modules/s3db/vulnerability.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Sahana Eden Vulnerability Model
@copyright: 2012-13 (c) Sahana Software Foundation
@license: MIT
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 w... | 45.298976 | 114 | 0.457665 |
91fa6605764b0ecc59d81bc461160516e38be70a | 3,208 | py | Python | ninecms/utils/transliterate.py | Wtower/django-ninecms | e500010fb11f06c8dfe8d8c9c4d2aab0b15bc127 | [
"BSD-3-Clause"
] | 49 | 2015-11-17T16:18:02.000Z | 2021-12-10T15:01:03.000Z | ninecms/utils/transliterate.py | Wtower/django-ninecms | e500010fb11f06c8dfe8d8c9c4d2aab0b15bc127 | [
"BSD-3-Clause"
] | 39 | 2015-11-18T12:20:14.000Z | 2022-01-19T10:47:19.000Z | ninecms/utils/transliterate.py | Wtower/django-ninecms | e500010fb11f06c8dfe8d8c9c4d2aab0b15bc127 | [
"BSD-3-Clause"
] | 9 | 2016-04-07T12:12:05.000Z | 2021-02-04T15:42:02.000Z | """ Transliterate unicode characters """
__author__ = 'George Karakostas'
__copyright__ = 'Copyright 2015, George Karakostas'
__licence__ = 'BSD-3'
__email__ = 'gkarak@9-dev.com'
from django.conf import settings
def transliterate(s, filename=False, to_lower=False):
""" Transliterate unicode characters
Curren... | 37.302326 | 108 | 0.50187 |
91fa966c84b3cbfd3e0addc3b013519ee8859bc5 | 11,529 | py | Python | Models/TenetGNN.py | deepeshhada/Tenet | 8ce8e2a36e1b6a285904741191164af5b5c3c4b5 | [
"MIT"
] | null | null | null | Models/TenetGNN.py | deepeshhada/Tenet | 8ce8e2a36e1b6a285904741191164af5b5c3c4b5 | [
"MIT"
] | null | null | null | Models/TenetGNN.py | deepeshhada/Tenet | 8ce8e2a36e1b6a285904741191164af5b5c3c4b5 | [
"MIT"
] | null | null | null | ## relu to tanh in gcnconv
## some parts are in abc2
import torch, pdb
import torch.nn as nn
import numpy as np
import scipy.sparse as sp
import torch.nn.functional as F
from HyperSAGNN import HyperSAGNN_Model
#from simpleTernary import HyperSAGNN_Model
# gnn
from gnn_utils import normalize_adj
#from torch_geometric.n... | 58.227273 | 162 | 0.645589 |
91fab09da18275c9bfc28fb488880fc340e47462 | 11,251 | py | Python | src/gluonts/model/wavenet/_estimator.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | 2 | 2019-09-05T05:39:03.000Z | 2020-11-08T17:07:04.000Z | src/gluonts/model/wavenet/_estimator.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | null | null | null | src/gluonts/model/wavenet/_estimator.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | null | null | null | # Standard library imports
import logging
import re
from typing import Dict, List, Optional
# Third-party imports
import mxnet as mx
import numpy as np
# First-party imports
from gluonts import transform
from gluonts.core.component import validated
from gluonts.dataset.common import Dataset
from gluonts.dataset.loade... | 35.492114 | 110 | 0.615323 |
91faba86816074c4f2f8d64cad3fc64cfcf724fd | 9,678 | py | Python | server/models/instance.py | eliasmarkc/girder_wholetale | 7e6f117309c97c24756d5663e89d2c213a4a9978 | [
"BSD-3-Clause"
] | null | null | null | server/models/instance.py | eliasmarkc/girder_wholetale | 7e6f117309c97c24756d5663e89d2c213a4a9978 | [
"BSD-3-Clause"
] | null | null | null | server/models/instance.py | eliasmarkc/girder_wholetale | 7e6f117309c97c24756d5663e89d2c213a4a9978 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import ssl
import time
from urllib.request import urlopen
from urllib.error import HTTPError, URLError
from girder import logger
from girder.constants import AccessType, SortDir, TokenScope
from girder.exceptions import ValidationException
from girder.mode... | 35.450549 | 96 | 0.576875 |
91fadbd96bf1ff12292e72270403a248916ace70 | 6,758 | py | Python | tests/functional/dashboard/order_tests.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | 1 | 2015-08-02T05:36:11.000Z | 2015-08-02T05:36:11.000Z | tests/functional/dashboard/order_tests.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | tests/functional/dashboard/order_tests.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | from six.moves import http_client
from django.db.models import get_model
from django.test import TestCase, Client
from django.core.urlresolvers import reverse
from django.template import Template, Context
from django_dynamic_fixture import get, G
from oscar.test.testcases import WebTestCase
from oscar.test.factories ... | 37.966292 | 94 | 0.636283 |
91fb2d40949d920548ae373cb3d8884ea93f6bc0 | 580 | py | Python | infra/bin/config_checks.py | amzn/oss-datastore | f2e1ec20cb8f8a14beed334d84e784fae33507c3 | [
"Apache-2.0"
] | 11 | 2019-09-03T04:41:24.000Z | 2020-11-17T12:23:52.000Z | infra/bin/config_checks.py | amzn/oss-datastore | f2e1ec20cb8f8a14beed334d84e784fae33507c3 | [
"Apache-2.0"
] | 1 | 2020-02-20T01:15:24.000Z | 2020-04-07T19:05:28.000Z | infra/bin/config_checks.py | amazon-archives/oss-datastore | f2e1ec20cb8f8a14beed334d84e784fae33507c3 | [
"Apache-2.0"
] | 3 | 2021-06-03T10:14:59.000Z | 2021-10-30T13:40:18.000Z | #!/usr/bin/env python3
from dotenv import load_dotenv
from os import getenv
from sys import exit
if __name__ == "__main__":
"""
Verify the orgs being monitored are the ones we want
Note: Put this here because putting it in CDK code caused failures
"""
load_dotenv(override=True)
org_list = get... | 27.619048 | 79 | 0.668966 |
91fb3c7d66dbcbfbd02885f4d0bb413ca5d450ff | 519 | py | Python | lasagne_utils.py | Pandoro/tools | 631c6036cb74dc845668fd912588fd31aae46f8b | [
"MIT"
] | 1 | 2019-04-22T16:38:03.000Z | 2019-04-22T16:38:03.000Z | lasagne_utils.py | afcarl/tools-Pandoro | 631c6036cb74dc845668fd912588fd31aae46f8b | [
"MIT"
] | 2 | 2018-03-13T10:49:48.000Z | 2018-03-13T10:54:01.000Z | lasagne_utils.py | afcarl/tools-Pandoro | 631c6036cb74dc845668fd912588fd31aae46f8b | [
"MIT"
] | 2 | 2018-03-08T19:40:10.000Z | 2018-06-11T14:43:49.000Z | import lasagne
import theano.tensor as T
class NormLayer(lasagne.layers.Layer):
def __init__(self, incoming, epsilon=1e-7,**kwargs):
super(NormLayer, self).__init__(incoming, **kwargs)
self.epsilon=epsilon
def get_output_for(self, input, **kwargs):
#A bit shitty but for now!
in... | 34.6 | 80 | 0.67052 |
91fb481ecbdddb7bd66ed5eb3be3223a4b7508b7 | 15,597 | py | Python | txdav/caldav/datastore/query/test/test_filter.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/caldav/datastore/query/test/test_filter.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/caldav/datastore/query/test/test_filter.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | # #
# Copyright (c) 2011-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 35.937788 | 691 | 0.588254 |
91fb5662d033716a7a59293ac5871125dc26430d | 4,105 | py | Python | model/evaluation/text.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | 1 | 2020-01-03T15:30:32.000Z | 2020-01-03T15:30:32.000Z | model/evaluation/text.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | null | null | null | model/evaluation/text.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | null | null | null | import distance
import nltk
import numpy as np
from ..utils.general import init_dir
from ..utils.text import load_formulas
def score_files(path_ref, path_hyp):
"""Loads result from file and score it
Args:
path_ref: (string) formulas of reference
path_hyp: (string) formulas of pr... | 28.506944 | 76 | 0.606577 |
91fb6aa071a29ba0e08195c2519db3461b526019 | 3,317 | py | Python | model/roi_layers/roi_align.py | ZhangHanbo/Visual-Manipulation-Relationship-Network-Pytorch | 9dd24947db318f6e404918d4758f1d824eea3748 | [
"MIT"
] | 26 | 2019-10-31T08:21:46.000Z | 2022-03-11T13:58:43.000Z | model/roi_layers/roi_align.py | moli1026/regrad | f66c38c00405b22cb746cc3f5c38d2b49f77d854 | [
"MIT"
] | 12 | 2019-11-07T09:12:50.000Z | 2022-03-12T02:58:18.000Z | model/roi_layers/roi_align.py | moli1026/regrad | f66c38c00405b22cb746cc3f5c38d2b49f77d854 | [
"MIT"
] | 11 | 2019-10-30T08:44:47.000Z | 2022-03-11T13:58:48.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
from torch import nn
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair
from torch.nn.functional import avg_pool2d, max_pool2d
from . import C_ROIPoolin... | 33.17 | 98 | 0.640639 |
91fb83ad4938b3da80e862ed15f0d680a71ba8f2 | 133 | py | Python | coin2086/__init__.py | fandre90/coin2086 | 5c4572d65c624724359aec0a6c201b686c8bcacd | [
"MIT"
] | 3 | 2021-05-11T06:18:10.000Z | 2021-05-14T08:36:18.000Z | coin2086/__init__.py | fandre90/coin2086 | 5c4572d65c624724359aec0a6c201b686c8bcacd | [
"MIT"
] | null | null | null | coin2086/__init__.py | fandre90/coin2086 | 5c4572d65c624724359aec0a6c201b686c8bcacd | [
"MIT"
] | null | null | null | __version__ = "0.1.0"
from .valuation import valuate_portfolio
from .pnl import compute_taxable_pnls, compute_taxable_pnls_detailed
| 26.6 | 68 | 0.842105 |
91fb976cf89d57e63861aa6fb361d456458b71f9 | 4,699 | py | Python | crimegrade_scraper.py | DariHernandez/crimegrade-scraper | ffc08b7a14d414c97013b64b4ca549b9dfd4045f | [
"MIT"
] | null | null | null | crimegrade_scraper.py | DariHernandez/crimegrade-scraper | ffc08b7a14d414c97013b64b4ca549b9dfd4045f | [
"MIT"
] | null | null | null | crimegrade_scraper.py | DariHernandez/crimegrade-scraper | ffc08b7a14d414c97013b64b4ca549b9dfd4045f | [
"MIT"
] | null | null | null | import os
import time
import log
import config
import globals
import requests
from database.postgresql import PostgreSQL
from scraping_manager.automate import Web_scraping
def scraper ():
"""
Main function of the scraper.
Extract data and save it in database
"""
# First instance of data bas... | 35.067164 | 95 | 0.546286 |
91fba22482b416343e7a3284dc681eb03c948a9c | 1,732 | py | Python | dorothy/modules/impact/impact.py | prasadatdoshii/dorothy | 942eef1b1674ef0fd4d0de97f1ffec994c9a8556 | [
"Apache-2.0"
] | 87 | 2020-12-08T17:16:13.000Z | 2022-03-30T03:30:16.000Z | dorothy/modules/impact/impact.py | prasadatdoshii/dorothy | 942eef1b1674ef0fd4d0de97f1ffec994c9a8556 | [
"Apache-2.0"
] | null | null | null | dorothy/modules/impact/impact.py | prasadatdoshii/dorothy | 942eef1b1674ef0fd4d0de97f1ffec994c9a8556 | [
"Apache-2.0"
] | 18 | 2020-12-09T15:42:00.000Z | 2022-03-28T16:58:38.000Z | #
# Licensed to Elasticsearch under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file exce... | 33.307692 | 65 | 0.808314 |
91fbc05313ceda543007767710e8eba8cb0e5205 | 362 | py | Python | chromelogger/tests/test_middleware.py | EnTeQuAk/django-chromelogger | ae4ff0aea1f8c20b9e123863bee9b1724b509c35 | [
"MIT"
] | 28 | 2016-12-22T12:35:03.000Z | 2017-12-05T17:10:15.000Z | chromelogger/tests/test_middleware.py | EnTeQuAk/django-chromelogger | ae4ff0aea1f8c20b9e123863bee9b1724b509c35 | [
"MIT"
] | null | null | null | chromelogger/tests/test_middleware.py | EnTeQuAk/django-chromelogger | ae4ff0aea1f8c20b9e123863bee9b1724b509c35 | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.test import RequestFactory
from chromelogger.middleware import LoggingMiddleware
HEADER = 'X-ChromeLogger-Data'
rf = RequestFactory()
def test_catches_logging():
request = rf.get('/')
response = HttpResponse()
LoggingMiddleware().process_response(request... | 22.625 | 59 | 0.770718 |
91fbcd97ce19aadae5ed220d8755aed74e48041f | 15,113 | py | Python | aesara/sandbox/multinomial.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/sandbox/multinomial.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/sandbox/multinomial.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | import copy
import warnings
from typing import Tuple, Union
import numpy as np
import aesara.tensor as at
from aesara.configdefaults import config
from aesara.graph.basic import Apply
from aesara.graph.op import COp
from aesara.scalar import Scalar, as_scalar
from aesara.tensor.type import discrete_dtypes
class Mul... | 33.659243 | 132 | 0.457288 |
91fbd55af39b1d3b48c4cba5be5ab352b9d2f2b6 | 94,010 | py | Python | pypipegraph/job.py | bopopescu/pypipegraph-2 | 3a3f9ba565789d8d73c8cd503703a957de2be9d8 | [
"MIT"
] | null | null | null | pypipegraph/job.py | bopopescu/pypipegraph-2 | 3a3f9ba565789d8d73c8cd503703a957de2be9d8 | [
"MIT"
] | null | null | null | pypipegraph/job.py | bopopescu/pypipegraph-2 | 3a3f9ba565789d8d73c8cd503703a957de2be9d8 | [
"MIT"
] | null | null | null | from __future__ import print_function
"""
"""
License = """
The MIT License (MIT)
Copyright (c) 2012, Florian Finkernagel <finkernagel@imt.uni-marburg.de>
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... | 39.716941 | 222 | 0.582013 |
91fbe18166e6c83a87392f89b984b4d4dcadc84b | 1,402 | py | Python | wavelet/wavelets/coif1.py | AP-Atul/wavelets | cff71e777759844b35f8e96f14930b2c71a215a1 | [
"MIT"
] | 5 | 2021-02-01T07:43:39.000Z | 2022-03-25T05:01:31.000Z | wavelet/wavelets/coif1.py | AP-Atul/wavelets | cff71e777759844b35f8e96f14930b2c71a215a1 | [
"MIT"
] | null | null | null | wavelet/wavelets/coif1.py | AP-Atul/wavelets | cff71e777759844b35f8e96f14930b2c71a215a1 | [
"MIT"
] | null | null | null | """ Coiflets 1 wavelet """
import numpy as np
class Coiflets1:
"""
Properties
----------
near symmetric, orthogonal, biorthogonal
All values are from http://wavelets.pybytes.com/wavelet/coif1/
"""
__name__ = "Coiflets Wavelet 1"
__motherWaveletLength__ = 6 # length of the mother wav... | 24.172414 | 72 | 0.624108 |
91fc599c438db0156c5ffe39a6d9b8c43a914f3b | 6,392 | py | Python | toontown/quest/QuestRewardCounter.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/quest/QuestRewardCounter.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/quest/QuestRewardCounter.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal
from toontown.quest import Quests
from toontown.toonbase import ToontownGlobals
from toontown.fishing import FishGlobals
from toontown.suit import SuitDNA
from toontown.racing import RaceGlobals
from toontown.estate import GardenGlobal... | 42.052632 | 215 | 0.62766 |
91fc61f6bc67776ffb636e9bb99ca37882bba168 | 2,639 | py | Python | armi/physics/neutronics/latticePhysics/tests/test_latticeWriter.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/physics/neutronics/latticePhysics/tests/test_latticeWriter.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/physics/neutronics/latticePhysics/tests/test_latticeWriter.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 32.9875 | 88 | 0.700644 |
91fcaaf409c628c7214d944dea09b0a1bf86d78a | 391 | py | Python | wttrack/wttrack/asgi.py | jshaarda/weight_tracker_app | 273f323ce77304a29b72dee77df33b9e65f09469 | [
"CC0-1.0"
] | null | null | null | wttrack/wttrack/asgi.py | jshaarda/weight_tracker_app | 273f323ce77304a29b72dee77df33b9e65f09469 | [
"CC0-1.0"
] | null | null | null | wttrack/wttrack/asgi.py | jshaarda/weight_tracker_app | 273f323ce77304a29b72dee77df33b9e65f09469 | [
"CC0-1.0"
] | null | null | null | """
ASGI config for wttrack project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
91fcb9c134be7939464db14834e653f26d10fd5c | 2,164 | py | Python | classifier_control/classifier/utils/spatial_softmax.py | s-tian/mbold | 85309809e35777b843dafc37d047b84962f17062 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 16 | 2021-04-20T20:01:10.000Z | 2022-03-29T03:19:39.000Z | classifier_control/classifier/utils/spatial_softmax.py | s-tian/mbold | 85309809e35777b843dafc37d047b84962f17062 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | classifier_control/classifier/utils/spatial_softmax.py | s-tian/mbold | 85309809e35777b843dafc37d047b84962f17062 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 1 | 2021-05-04T00:32:40.000Z | 2021-05-04T00:32:40.000Z | import torch
from torch.autograd import Variable
import torch.nn.functional as F
from torch.nn.parameter import Parameter
import numpy as np
class SpatialSoftmax(torch.nn.Module):
def __init__(self, height, width, channel, temperature=None, data_format='NCHW'):
super(SpatialSoftmax, self).__init__()
... | 37.964912 | 95 | 0.633549 |
91fd01652a308f9dabb03a6ef9cf7446913c4b2d | 18 | py | Python | dbselect/__init__.py | dbselect/dbselect | 80ac42d54e5c9fbf0743b20d2527cf8b5d941ee6 | [
"MIT"
] | null | null | null | dbselect/__init__.py | dbselect/dbselect | 80ac42d54e5c9fbf0743b20d2527cf8b5d941ee6 | [
"MIT"
] | null | null | null | dbselect/__init__.py | dbselect/dbselect | 80ac42d54e5c9fbf0743b20d2527cf8b5d941ee6 | [
"MIT"
] | null | null | null | name = "dbselect"
| 9 | 17 | 0.666667 |
91fd291fb15553f3a51a6bc04e3c52938acefba8 | 20,831 | py | Python | python/tvm/schedule.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 48 | 2020-07-29T18:09:23.000Z | 2021-10-09T01:53:33.000Z | python/tvm/schedule.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 9 | 2021-04-02T02:28:07.000Z | 2022-03-26T18:23:59.000Z | python/tvm/schedule.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 30.906528 | 90 | 0.607748 |
91fd2d3e770790aefaccd1725aedec9fee3d5015 | 3,664 | py | Python | plugins/maya/publish/extract_xgen_interactive.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/publish/extract_xgen_interactive.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/publish/extract_xgen_interactive.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import json
import contextlib
import pyblish.api
class ExtractXGenInteractive(pyblish.api.InstancePlugin):
order = pyblish.api.ExtractorOrder
hosts = ["maya"]
label = "Extract Interactive Groom"
families = [
"reveries.xgen.interactive",
]
def process(self, instance):
from ma... | 38.166667 | 78 | 0.554312 |
91fd4e2f592c03187131c0ada377a7faefc247da | 1,982 | py | Python | Path.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | 4 | 2015-05-02T09:57:49.000Z | 2021-08-21T14:46:37.000Z | Path.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | null | null | null | Path.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | 2 | 2021-08-21T19:37:50.000Z | 2022-01-22T20:28:46.000Z | '''
Functions for creating and parsing XPath like representations for objects in the
MSAA DOM.
'''
import AA
def Join(p1, p2):
'''
Join two paths together.
@param p1: Left side of path
@type p1: string
@param p2: Right side of path
@type p2: string
@return: Joined path
@rtype: string
'''
if p1 i... | 23.046512 | 83 | 0.607972 |
91fd59eff01a2365b3950c3a428aeb5c84eedc93 | 3,936 | py | Python | libapp/views/shortner.py | octopi-labs/bazzinga | fcdd8e925cbaa31cacbec10dd1d599e72b84c588 | [
"MIT"
] | null | null | null | libapp/views/shortner.py | octopi-labs/bazzinga | fcdd8e925cbaa31cacbec10dd1d599e72b84c588 | [
"MIT"
] | 3 | 2021-03-20T00:43:11.000Z | 2022-01-06T22:33:23.000Z | libapp/views/shortner.py | octopi-labs/bazzinga | fcdd8e925cbaa31cacbec10dd1d599e72b84c588 | [
"MIT"
] | null | null | null |
import json
import requests
from flask import jsonify as _jsonify
from flask import redirect, render_template, request, url_for
from rfc3987 import parse
from shorten import RevokeError
from werkzeug.urls import iri_to_uri
from libapp import app, shortnerd
def jsonify(obj, status_code=200):
obj['status'] = 'er... | 31.238095 | 93 | 0.565041 |
91fd6b7d7b8e030545bd34542fad26dc298009a0 | 976 | py | Python | src/ggrc/migrations/versions/20170112013716_421b2179c02e_update_fulltext_index.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/20170112013716_421b2179c02e_update_fulltext_index.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/20170112013716_421b2179c02e_update_fulltext_index.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>
"""Update fulltext index.
Create Date: 2017-01-12 01:37:16.801973
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
import sqlalchemy as sa
... | 24.4 | 79 | 0.709016 |
91fd7880ab8663d4c1dfd221c0ba3ed27c2d4baa | 13,950 | py | Python | src/python/fuzzing/corpus_manager.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-11-09T23:09:00.000Z | 2019-11-09T23:09:00.000Z | src/python/fuzzing/corpus_manager.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/python/fuzzing/corpus_manager.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2020-04-25T16:37:10.000Z | 2020-04-25T16:37:10.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.978723 | 80 | 0.693477 |
91fd8351f493ec22ca00337a55f993628598c8af | 1,099 | py | Python | goal_prox/envs/fetch/__init__.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | 4 | 2021-11-17T20:19:34.000Z | 2022-03-31T04:21:26.000Z | goal_prox/envs/fetch/__init__.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | goal_prox/envs/fetch/__init__.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | from gym.envs.registration import register
register(
id='FetchPickAndPlaceCustom-v0',
entry_point='goal_prox.envs.fetch.custom_fetch:FetchPickAndPlaceCustom',
max_episode_steps=50,
)
register(
id='FetchPickAndPlaceHarder-v0',
entry_point='goal_prox.envs.fetch.custom_fetch:FetchPickAndPlaceHard... | 22.428571 | 81 | 0.741583 |
91fd877f4d0de365c06494f18847ea96dfc62a72 | 3,540 | py | Python | pandaharvester/harvestermonitor/cloud_openstack_monitor.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 11 | 2017-06-01T10:16:58.000Z | 2019-11-22T08:41:36.000Z | pandaharvester/harvestermonitor/cloud_openstack_monitor.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 34 | 2016-10-25T19:15:24.000Z | 2021-03-05T12:59:04.000Z | pandaharvester/harvestermonitor/cloud_openstack_monitor.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 17 | 2016-10-24T13:29:45.000Z | 2021-03-23T17:35:27.000Z | import os
from concurrent.futures import ThreadPoolExecutor
from pandaharvester.harvestercore.plugin_base import PluginBase
from pandaharvester.harvestercore import core_utils
from pandaharvester.harvestercore.work_spec import WorkSpec
from pandaharvester.harvestermisc.cloud_openstack_utils import OS_SimpleClient
#... | 31.891892 | 121 | 0.670621 |
91fdbd4f043a5fbf91f6311c13d66c6653c189e3 | 9,739 | py | Python | pyopdb.py | openphish/pyopdb | 16a3e8d08a5448d606d6fd2aa7499f305d6d5b33 | [
"MIT"
] | 10 | 2021-08-24T21:53:03.000Z | 2022-03-08T18:45:22.000Z | pyopdb.py | openphish/pyopdb | 16a3e8d08a5448d606d6fd2aa7499f305d6d5b33 | [
"MIT"
] | null | null | null | pyopdb.py | openphish/pyopdb | 16a3e8d08a5448d606d6fd2aa7499f305d6d5b33 | [
"MIT"
] | 5 | 2021-09-13T09:28:47.000Z | 2022-03-06T09:29:28.000Z | #!/usr/bin/env python3
import sqlite3
import argparse
import configparser
import os
import urllib.parse
import ntpath
import re
import json
import hashlib
import tempfile
import tarfile
import shutil
import boto3
import requests
import ipaddress
def api_result(success: bool, data: dict=None, msg: str=None):
return... | 32.902027 | 79 | 0.614642 |
91fde15ee1f4ab42c3d013d9b25e7959776f08d8 | 20,264 | py | Python | lib/rucio/rse/protocols/protocol.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/rse/protocols/protocol.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/rse/protocols/protocol.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2019 CERN for the benefit of the ATLAS collaboration.
#
# 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... | 43.023355 | 188 | 0.609011 |
91fde192d1e77e2d72f821a2e800040c79c3a3c2 | 1,802 | py | Python | src/olympia/amo/feeds.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 3 | 2020-03-05T18:17:14.000Z | 2020-03-09T01:24:38.000Z | src/olympia/amo/feeds.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/amo/feeds.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1 | 2020-06-04T10:18:59.000Z | 2020-06-04T10:18:59.000Z | import re
from django.contrib.syndication.views import Feed
from django.db.transaction import non_atomic_requests
from django.utils.decorators import method_decorator
class BaseFeed(Feed):
"""
A base feed class that does not use transactions and tries to avoid raising
exceptions on unserializable content... | 39.173913 | 79 | 0.68313 |
91fdf73fcdfccf5a2083d831d84f2139849ca3c8 | 3,867 | py | Python | generate_ctypes.py | jimmyorourke/ctypesgen2 | 8f62d15884def73199068aa18e901a65d6a2e612 | [
"MIT"
] | null | null | null | generate_ctypes.py | jimmyorourke/ctypesgen2 | 8f62d15884def73199068aa18e901a65d6a2e612 | [
"MIT"
] | null | null | null | generate_ctypes.py | jimmyorourke/ctypesgen2 | 8f62d15884def73199068aa18e901a65d6a2e612 | [
"MIT"
] | null | null | null | """This script can be used to fully auto-generate Python bindings for C libraries, using libclang and ctypeslib.
This script wraps the ctypeslib codegenerator's generate_code function in much the same way as the clang2py tool
packaged with ctypeslib, however it provides more options and better handling for finding libc... | 47.740741 | 161 | 0.643651 |
91fe3e16bb240a94e88ec929856a4a4543c9a6c5 | 35,900 | py | Python | oscar/lib/python2.7/site-packages/IPython/core/oinspect.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/oinspect.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/oinspect.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tools for inspecting Python objects.
Uses syntax highlighting for presenting the various information elements.
Similar in spirit to the inspect module, but all calls take a name argument to
reference the name under which an object is being read.
"""
# Copyright (c) IPython Develop... | 35.474308 | 104 | 0.561226 |
91fe4d728cbb41f572ee4a5dba44d2230357e9e0 | 24,468 | py | Python | tensorlayer/utils.py | thangvubk/tensorlayer | fcf7bb2f14caf6e1336b54b772c5227587b5f51d | [
"Apache-2.0"
] | null | null | null | tensorlayer/utils.py | thangvubk/tensorlayer | fcf7bb2f14caf6e1336b54b772c5227587b5f51d | [
"Apache-2.0"
] | null | null | null | tensorlayer/utils.py | thangvubk/tensorlayer | fcf7bb2f14caf6e1336b54b772c5227587b5f51d | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
from sys import exit as _exit
from sys import platform as _platform
import random
import subprocess
import time
from collections import Counter
import numpy as np
from sklearn.metrics import accuracy_score
from sklearn.metrics import confusion_matrix... | 37.412844 | 306 | 0.606057 |
91fe779443b0fd37ca4f3a3dbcb57954e64401e1 | 4,245 | py | Python | alipay/aop/api/domain/SkuCreateInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/SkuCreateInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/SkuCreateInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MaterialCreateInfo import MaterialCreateInfo
from alipay.aop.api.domain.ItemSkuPropertyInfo import ItemSkuPropertyInfo
class SkuCreateInfo(object):
def __init__(self):
... | 33.96 | 87 | 0.58775 |
91fedc7362b544033fb62e0c58ed2fb3dfb43e3e | 2,636 | py | Python | pkgcore/os_data.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | 1 | 2021-07-05T13:10:18.000Z | 2021-07-05T13:10:18.000Z | pkgcore/os_data.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | 8 | 2015-03-24T14:21:44.000Z | 2015-03-24T14:21:44.000Z | pkgcore/os_data.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2005-2011 Brian Harring <ferringb@gmail.com>
# Copyright: 2005 Gentoo Foundation
# License: GPL2
"""
Avoid using- os data- root uid/gid, pkgcore uid/gid, etc.
This will be killed off and bound into configuration subsystem at some point
"""
from __future__ import print_function
__all__ = (
"ostype",... | 27.458333 | 78 | 0.647193 |
91feee71e00d7981eebfc38f7629ba826eeb684f | 5,247 | py | Python | salt/returners/nagios_return.py | Rafflecopter/salt | 08bbfcd4d9b93351d7d5d25b097e892026b6f1cd | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/salt/returners/nagios_return.py | smallyear/linuxLearn | 342e5020bf24b5fac732c4275a512087b47e578d | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/salt/returners/nagios_return.py | smallyear/linuxLearn | 342e5020bf24b5fac732c4275a512087b47e578d | [
"Apache-2.0"
] | 1 | 2017-01-27T21:33:36.000Z | 2017-01-27T21:33:36.000Z | # -*- coding: utf-8 -*-
'''
Return salt data to Nagios
The following fields can be set in the minion conf file::
nagios.url (required)
nagios.token (required)
nagios.service (optional)
nagios.check_type (optional)
Alternative configuration values can be used by prefacing the configuration.
Any values... | 26.907692 | 101 | 0.592529 |
91fef1758e2b840b1c7ebcb9d21dfece35d655e3 | 3,981 | py | Python | doc/jupyter_execute/notebooks/helm_examples.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/notebooks/helm_examples.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/notebooks/helm_examples.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Example Seldon Core Deployments using Helm
# 
# ## Setup Seldon Core
#
# Use the setup notebook to [Setup Cluster](https://docs.seldon.io/projects/seldon-core/en/latest/examples/seldon_core_setup.html#Setup-Cluster) with [Amba... | 18.867299 | 517 | 0.704346 |
91fef36854212941220349858010b15efef7b6d9 | 22,851 | py | Python | src/robotide/controller/stepcontrollers.py | castillr/RIDE | 162c78a3f69a842e84992b0fa98501c9dd42f99c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robotide/controller/stepcontrollers.py | castillr/RIDE | 162c78a3f69a842e84992b0fa98501c9dd42f99c | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-07-16T19:27:56.000Z | 2019-07-16T19:27:56.000Z | src/robotide/controller/stepcontrollers.py | castillr/RIDE | 162c78a3f69a842e84992b0fa98501c9dd42f99c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 35.047546 | 79 | 0.624962 |
91ff23a81013e0e7e2645766485b0d610fbfac02 | 3,291 | py | Python | tools/compute_cmvn_stats.py | 121898/wenet | 132954a9ce27d0381ed3879c4f43cc158860167e | [
"Apache-2.0"
] | 1 | 2021-03-01T16:00:02.000Z | 2021-03-01T16:00:02.000Z | tools/compute_cmvn_stats.py | 121898/wenet | 132954a9ce27d0381ed3879c4f43cc158860167e | [
"Apache-2.0"
] | null | null | null | tools/compute_cmvn_stats.py | 121898/wenet | 132954a9ce27d0381ed3879c4f43cc158860167e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
import argparse
import json
import codecs
import yaml
from torch.utils.data import Dataset, DataLoader
import torch
import torchaudio
import torchaudio.compliance.kaldi as kaldi
class CollateFunc(object):
''' Collate function for AudioDataset
'''
def __init__(self... | 33.242424 | 85 | 0.578548 |
91ff4871f5b6c0abdabc5d7be582327cd1f80b95 | 941 | py | Python | tgbot/handlers/kick.py | mezgoodle/genji-moderator | 452ca2e0c622f29e980a403ceed9ecc16e8f86c7 | [
"MIT"
] | 3 | 2021-11-11T17:03:02.000Z | 2022-02-25T06:48:33.000Z | tgbot/handlers/kick.py | mezgoodle/genji-moderator | 452ca2e0c622f29e980a403ceed9ecc16e8f86c7 | [
"MIT"
] | 21 | 2021-11-01T03:05:01.000Z | 2022-03-02T15:19:58.000Z | tgbot/handlers/kick.py | mezgoodle/genji-moderator | 452ca2e0c622f29e980a403ceed9ecc16e8f86c7 | [
"MIT"
] | null | null | null | from aiogram.types import Message, ChatType
from tgbot.misc.seconds import work_with_user
from loader import dp
from datetime import timedelta
import logging
@dp.message_handler(is_admin=True, commands=['kick'], commands_prefix='!/',
chat_type=[ChatType.GROUP, ChatType.SUPERGROUP])
async def kic... | 37.64 | 118 | 0.749203 |
91ff66874289594e6c904a6f0a10ea8dc7992c63 | 12,975 | py | Python | test/functional/dbcrash.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 63 | 2017-07-25T21:57:21.000Z | 2022-02-05T02:58:03.000Z | test/functional/dbcrash.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 105 | 2017-09-04T00:52:17.000Z | 2021-05-22T13:58:37.000Z | test/functional/dbcrash.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 62 | 2017-08-04T19:48:40.000Z | 2021-07-07T12:21:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test recovery from a crash during chainstate writing."""
from test_framework.test_framework import BitcoinT... | 47.878229 | 114 | 0.643931 |
91ff8152e7af0ca6fc0b1514a916ff1ce9f175e4 | 4,796 | py | Python | NewBookPage.py | ludhrani/Online-Bookstore | 8dcae3011e2672d278dc495eeabcc1d627b8ca92 | [
"MIT"
] | null | null | null | NewBookPage.py | ludhrani/Online-Bookstore | 8dcae3011e2672d278dc495eeabcc1d627b8ca92 | [
"MIT"
] | null | null | null | NewBookPage.py | ludhrani/Online-Bookstore | 8dcae3011e2672d278dc495eeabcc1d627b8ca92 | [
"MIT"
] | null | null | null | from Tkinter import *
import Message
class NewBook(object):
def __init__(self, root, color, dbConnection):
self.root = root
self.color = color
self.dbConnection = dbConnection
self.font = ('Times', 14, 'roman')
self.screen_width = self.root.winfo_screenwidth()... | 34.753623 | 84 | 0.59362 |
91ffa14fa43c23a9b3649c3eb881ef4d5cba69ff | 68,622 | py | Python | djstripe/models/core.py | trag-stripe/dj-stripe | 31fac752ab6540a917a554907d799e41ac3eba9c | [
"MIT"
] | null | null | null | djstripe/models/core.py | trag-stripe/dj-stripe | 31fac752ab6540a917a554907d799e41ac3eba9c | [
"MIT"
] | null | null | null | djstripe/models/core.py | trag-stripe/dj-stripe | 31fac752ab6540a917a554907d799e41ac3eba9c | [
"MIT"
] | null | null | null | import decimal
import warnings
import stripe
from django.db import models, transaction
from django.utils import timezone
from django.utils.functional import cached_property
from stripe.error import InvalidRequestError
from .. import enums
from .. import settings as djstripe_settings
from .. import webhooks
from ..exc... | 35.55544 | 88 | 0.631255 |
91ffbe41d7b111a7e99148fe5e89b730a4aec25e | 2,420 | py | Python | alipay/aop/api/domain/AlipayCommerceReceiptInvalidModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceReceiptInvalidModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceReceiptInvalidModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceReceiptInvalidModel(object):
def __init__(self):
self._alipay_uid = None
self._invalid_date = None
self._out_biz_no = None
self._trade_no = None
... | 28.139535 | 75 | 0.592562 |
91ffc802ebdacd80fa6e3bc3308dce8389d5ce03 | 74,577 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_diagnostics_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_diagnostics_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_diagnostics_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.45979 | 986 | 0.656851 |
91ffd88a4d4c21acee316fe15cd9e56f11946746 | 5,330 | py | Python | mnemonic_utils.py | Solexplorer/PyStealer | a5db5adebc0b9e19c0ad778881d3184a0d471180 | [
"Apache-2.0"
] | 40 | 2018-02-26T15:09:01.000Z | 2022-02-11T20:54:03.000Z | mnemonic_utils.py | Lucid369/ethereum-mnemonic-utils | fe222052dc800a4e02fd98b48f5e4b106f9733f4 | [
"MIT"
] | 1 | 2021-08-27T23:58:11.000Z | 2021-08-27T23:58:11.000Z | mnemonic_utils.py | Lucid369/ethereum-mnemonic-utils | fe222052dc800a4e02fd98b48f5e4b106f9733f4 | [
"MIT"
] | 19 | 2018-04-18T03:56:54.000Z | 2022-02-28T04:20:45.000Z | #!/usr/bin/env python3
import binascii
import hashlib
import hmac
import struct
from base58 import b58encode_check
from ecdsa.curves import SECP256k1
BIP39_PBKDF2_ROUNDS = 2048
BIP39_SALT_MODIFIER = "mnemonic"
BIP32_PRIVDEV = 0x80000000
BIP32_CURVE = SECP256k1
BIP32_SEED_MODIFIER = b'Bitcoin seed'
LEDGER_ETH_DERIVAT... | 32.699387 | 105 | 0.656098 |
91ffe47186eb8bd13c2291318764d696b85ed9fd | 23,304 | py | Python | snmp/datadog_checks/snmp/snmp.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | snmp/datadog_checks/snmp/snmp.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | snmp/datadog_checks/snmp/snmp.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# std
from collections import defaultdict
from functools import wraps
# 3rd party
from pysnmp.entity.rfc3413.oneliner import cmdgen
import pysnmp.proto.rfc1902 as snmp_type
from pysnmp.smi import builder
from pys... | 41.989189 | 117 | 0.5796 |
620008bdb17ab1dc338f57ec88cd1432c8ef09bd | 139 | py | Python | ml-agents/mlagents/trainers/trainer/__init__.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | 13,653 | 2017-09-19T15:56:02.000Z | 2022-03-31T18:55:07.000Z | ml-agents/mlagents/trainers/trainer/__init__.py | Rushoo26/ml-agents | c73616c176f383bebefc3a1895ed1265661a1236 | [
"Apache-2.0"
] | 3,623 | 2017-09-20T02:50:20.000Z | 2022-03-31T06:37:25.000Z | ml-agents/mlagents/trainers/trainer/__init__.py | Rushoo26/ml-agents | c73616c176f383bebefc3a1895ed1265661a1236 | [
"Apache-2.0"
] | 4,130 | 2017-09-19T17:36:34.000Z | 2022-03-31T12:54:55.000Z | from mlagents.trainers.trainer.trainer import Trainer # noqa
from mlagents.trainers.trainer.trainer_factory import TrainerFactory # noqa
| 46.333333 | 76 | 0.841727 |
620013074da9c1cff6bd45228fe3232ddfcb5cad | 241 | py | Python | LC/401.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/401.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/401.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | class Solution(object):
def readBinaryWatch(self, num):
"""
:type num: int
:rtype: List[str]
"""
return ['%d:%02d' % (i,j) for i in range(12) for j in range(60) if(num==(bin(i)+bin(j)).count('1'))] | 34.428571 | 108 | 0.510373 |
62002af75dda8c47e2f73ea97321122d081d7876 | 29,785 | py | Python | airflow_client/client/api/role_api.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/api/role_api.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/api/role_api.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 46.394081 | 8,098 | 0.55444 |
62003eede7b55302ddf6b1d8e1f4b22c1ba125e0 | 1,178 | py | Python | src/containerapp-compose/azext_containerapp_compose/_validators.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/containerapp-compose/azext_containerapp_compose/_validators.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | src/containerapp-compose/azext_containerapp_compose/_validators.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 56.095238 | 163 | 0.60781 |
620050a829eb4dcbf21a5343a61a063ef948bec0 | 647 | py | Python | scripts/reuters/install_reuters.py | wedavey/atnlp | 002497f27abfcdac9701aa324301d482dbf4df0e | [
"MIT"
] | null | null | null | scripts/reuters/install_reuters.py | wedavey/atnlp | 002497f27abfcdac9701aa324301d482dbf4df0e | [
"MIT"
] | null | null | null | scripts/reuters/install_reuters.py | wedavey/atnlp | 002497f27abfcdac9701aa324301d482dbf4df0e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
install_reuters.py
~~~~~~~~~~~~~~~~~~
Install the reuters corpus using the nltk api.
"""
__author__ = "Will Davey"
__email__ = "wedavey@gmail.com"
__created__ = "2018-05-30"
__copyright__ = "Copyright 2018 Will Davey"
__license__ = "MIT https://opensource.org/licenses/MIT"
... | 17.972222 | 55 | 0.689335 |
6200513e03d8e5fda5f603cb1bb1fef950e8bf92 | 2,029 | py | Python | panoptes/utils/social/twitter.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/social/twitter.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/social/twitter.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | import tweepy
from panoptes.utils.logger import get_root_logger
class SocialTwitter(object):
"""Social Messaging sink to output to Twitter."""
logger = get_root_logger()
def __init__(self, **kwargs):
consumer_key = kwargs.get('consumer_key', '')
if consumer_key == '':
raise... | 39.784314 | 109 | 0.641203 |
62005c5d4c909d9c330dfb2b2ef03b476a06ae99 | 3,763 | py | Python | Tools/Scripts/webkitpy/port/headlessdriver_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/port/headlessdriver_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/port/headlessdriver_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2017 Igalia S.L.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
... | 49.513158 | 148 | 0.744619 |
6200682e6d3b425e98f69f5dfdc75772f453ec08 | 1,149 | py | Python | tests/test_angle.py | SSDataLab/tess-ephem | df539fe733c63a4557bb91ff8f86234c15d7a1f1 | [
"MIT"
] | 2 | 2020-10-27T20:21:45.000Z | 2021-01-05T18:24:14.000Z | tests/test_angle.py | SSDataLab/tess-ephem | df539fe733c63a4557bb91ff8f86234c15d7a1f1 | [
"MIT"
] | 7 | 2020-12-18T23:51:15.000Z | 2021-06-30T14:05:16.000Z | tests/test_angle.py | SSDataLab/tess-ephem | df539fe733c63a4557bb91ff8f86234c15d7a1f1 | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from numpy import pi
from numpy.testing import assert_array_equal, assert_almost_equal
from tess_ephem.angle import enforce_positive_angle, create_angle_interpolator
@pytest.mark.parametrize(
"angle,expected",
[(0, 0), (-pi, pi), (2 * pi, 0), (-2 * pi, 0), (3 * pi, pi), (-3 *... | 31.054054 | 85 | 0.673629 |
62007459e1d0772d6b43073967183ec82be01e2c | 42 | py | Python | t0_continual_learning/__init__.py | tuhinjubcse/T0_continual_learning | fc6788f8d43f1c8aeaf7ac10c802fbc2099a95da | [
"MIT"
] | null | null | null | t0_continual_learning/__init__.py | tuhinjubcse/T0_continual_learning | fc6788f8d43f1c8aeaf7ac10c802fbc2099a95da | [
"MIT"
] | null | null | null | t0_continual_learning/__init__.py | tuhinjubcse/T0_continual_learning | fc6788f8d43f1c8aeaf7ac10c802fbc2099a95da | [
"MIT"
] | 1 | 2022-02-09T01:11:17.000Z | 2022-02-09T01:11:17.000Z | import os
DIR = os.path.dirname(__file__)
| 14 | 31 | 0.761905 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.