hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79480cab31ae5c901c356a851d1112f0428b0fbd | 1,492 | py | Python | pcg_gazebo/generators/model_group_generator.py | TForce1/pcg_gazebo | 9ff88016b7b6903236484958ca7c6ed9f8ffb346 | [
"ECL-2.0",
"Apache-2.0"
] | 40 | 2020-02-04T18:16:49.000Z | 2022-02-22T11:36:34.000Z | pcg_gazebo/generators/model_group_generator.py | awesomebytes/pcg_gazebo | 4f335dd460ef7c771f1df78b46a92fad4a62cedc | [
"ECL-2.0",
"Apache-2.0"
] | 75 | 2020-01-23T13:40:50.000Z | 2022-02-09T07:26:01.000Z | pcg_gazebo/generators/model_group_generator.py | GimpelZhang/gazebo_world_generator | eb7215499d0ddc972d804c988fadab1969579b1b | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2020-09-10T06:35:41.000Z | 2022-02-20T19:08:17.000Z | # Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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
#
#... | 38.25641 | 74 | 0.699062 |
79480d7b06302ca8154d770bd146aa25739c22fe | 9,741 | py | Python | nltk/classify/naivebayes.py | caio1982/nltk | 740e5ebece193b7febcffdf8268834f2daee599e | [
"Apache-2.0"
] | 1 | 2015-07-18T03:25:26.000Z | 2015-07-18T03:25:26.000Z | nltk/classify/naivebayes.py | caio1982/nltk | 740e5ebece193b7febcffdf8268834f2daee599e | [
"Apache-2.0"
] | null | null | null | nltk/classify/naivebayes.py | caio1982/nltk | 740e5ebece193b7febcffdf8268834f2daee599e | [
"Apache-2.0"
] | null | null | null | # Natural Language Toolkit: Naive Bayes Classifiers
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
#
# $Id: naivebayes.py 2063 2004-07-17 21:02:24Z edloper $
"""
A classifier based on the Naive Ba... | 40.757322 | 80 | 0.582281 |
79480fda51630fe5c3af76731fd81e6b211c428e | 2,925 | py | Python | cds_ils/literature/covers.py | zzacharo/cds-ils | 6816c348e209607b97583acc40fb37dea0c62418 | [
"MIT"
] | 6 | 2020-09-18T00:13:38.000Z | 2021-11-14T17:12:19.000Z | cds_ils/literature/covers.py | zzacharo/cds-ils | 6816c348e209607b97583acc40fb37dea0c62418 | [
"MIT"
] | 321 | 2020-08-28T15:42:25.000Z | 2022-03-14T15:11:50.000Z | cds_ils/literature/covers.py | zzacharo/cds-ils | 6816c348e209607b97583acc40fb37dea0c62418 | [
"MIT"
] | 8 | 2019-07-10T07:02:08.000Z | 2020-08-10T14:07:25.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019-2020 CERN.
#
# CDS-ILS is free software; you can redistribute it and/or modify it under
# the terms of the MIT License; see LICENSE file for more details.
"""Literature covers."""
import urllib
from functools import partial
from flask import current_app
from invenio_app... | 30.154639 | 76 | 0.65265 |
79481003c1fe347a44ef0a85f9937c6f7a911724 | 5,203 | py | Python | coinflow/protocol/structs/Varint.py | mariuszlitwin/coinflow | 49686e703a6edf90777eff2a154de1d732fc6b5f | [
"Apache-2.0",
"MIT"
] | 1 | 2018-06-12T23:04:11.000Z | 2018-06-12T23:04:11.000Z | coinflow/protocol/structs/Varint.py | mariuszlitwin/coinflow | 49686e703a6edf90777eff2a154de1d732fc6b5f | [
"Apache-2.0",
"MIT"
] | null | null | null | coinflow/protocol/structs/Varint.py | mariuszlitwin/coinflow | 49686e703a6edf90777eff2a154de1d732fc6b5f | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import struct
from typing import NamedTuple
from .Struct import Struct
Payload = NamedTuple('Payload', (('value', int), ('length', int)))
class Varint(int, Struct):
"""
Variable length integer structure for use in Bitcoin protocol messages
TODO: fix refer... | 28.124324 | 74 | 0.550067 |
7948110bd7c39804f99da2f242d4590f243485b5 | 16,251 | py | Python | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/4-sender_receiver_10.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/4-sender_receiver_10.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/4-sender_receiver_10.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 40.325062 | 89 | 0.568211 |
7948114477a85a1825fc212739616e608651dc1c | 7,322 | py | Python | FC/createFCMatrix.py | chidiugonna/DTI-hippo | 3215df591d80c646cd3726e36ea7783dff049ed1 | [
"MIT"
] | 1 | 2021-04-08T06:25:35.000Z | 2021-04-08T06:25:35.000Z | FC/createFCMatrix.py | chidiugonna/DTI-hippo | 3215df591d80c646cd3726e36ea7783dff049ed1 | [
"MIT"
] | 1 | 2021-05-05T22:47:02.000Z | 2021-05-05T22:47:02.000Z | FC/createFCMatrix.py | chidiugonna/DTI-hippo | 3215df591d80c646cd3726e36ea7783dff049ed1 | [
"MIT"
] | 2 | 2020-11-20T18:03:40.000Z | 2021-04-08T06:25:42.000Z | import os
import datetime
from nilearn import signal as sgl
from nilearn import image as img
from nilearn import plotting as plot
from nilearn import datasets
from nilearn import input_data
from nilearn.connectome import ConnectivityMeasure
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import b... | 38.740741 | 146 | 0.660339 |
794811d5ee943c897db51e5d11dd9843344421c4 | 6,214 | py | Python | python/cugraph/cugraph/tests/test_graph_store.py | wangxiaoyunNV/cugraph | 97f75de40362740928b45b61e713ff4dae1cbf55 | [
"Apache-2.0"
] | null | null | null | python/cugraph/cugraph/tests/test_graph_store.py | wangxiaoyunNV/cugraph | 97f75de40362740928b45b61e713ff4dae1cbf55 | [
"Apache-2.0"
] | null | null | null | python/cugraph/cugraph/tests/test_graph_store.py | wangxiaoyunNV/cugraph | 97f75de40362740928b45b61e713ff4dae1cbf55 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 29.037383 | 75 | 0.654007 |
79481208371d4f2b376f3de7f4744be417114a3b | 1,298 | py | Python | app/core/tests/test_admin.py | kfahmi/recipe-app-api | fa678005a3615bff92b94d5e852526fcb00793ed | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | kfahmi/recipe-app-api | fa678005a3615bff92b94d5e852526fcb00793ed | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | kfahmi/recipe-app-api | fa678005a3615bff92b94d5e852526fcb00793ed | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='admin@londonappdev.com',
... | 33.282051 | 68 | 0.640216 |
79481282d8747270c5ca1d77895b21b5e10d5156 | 2,443 | py | Python | PyEEA/taxation/TaxationHelper.py | ThomasJFR/PyEEA | 7927ee5ff1de8d3cf9e9654899ea4c2c0284519c | [
"MIT"
] | 1 | 2020-06-15T03:16:06.000Z | 2020-06-15T03:16:06.000Z | PyEEA/taxation/TaxationHelper.py | ThomasJFR/PyEEA | 7927ee5ff1de8d3cf9e9654899ea4c2c0284519c | [
"MIT"
] | 1 | 2020-06-19T04:56:21.000Z | 2020-06-19T04:56:21.000Z | PyEEA/taxation/TaxationHelper.py | ThomasJFR/PyEEA | 7927ee5ff1de8d3cf9e9654899ea4c2c0284519c | [
"MIT"
] | null | null | null | from ..cashflow import Cashflow, NullCashflow
from ..cashflow import Future, Perpetuity, Dynamic
from ..utilities import parse_ns, parse_d, get_final_period
from copy import deepcopy
class Tax:
def __init__(self, tag, rate, title=None):
self._tag = tag
self._rate = rate
self._title = tit... | 33.930556 | 88 | 0.631191 |
7948130a4e92c589a9e06802a3dfa5fa3e3e205a | 2,796 | py | Python | checkov/terraform/checks/resource/gcp/GoogleCloudSqlDatabasePublicallyAccessible.py | Devocean8-Official/checkov | 8ce61421fa838a97981ab3bd0ae2a12e541666b2 | [
"Apache-2.0"
] | 1 | 2022-02-15T20:46:07.000Z | 2022-02-15T20:46:07.000Z | checkov/terraform/checks/resource/gcp/GoogleCloudSqlDatabasePublicallyAccessible.py | Devocean8-Official/checkov | 8ce61421fa838a97981ab3bd0ae2a12e541666b2 | [
"Apache-2.0"
] | null | null | null | checkov/terraform/checks/resource/gcp/GoogleCloudSqlDatabasePublicallyAccessible.py | Devocean8-Official/checkov | 8ce61421fa838a97981ab3bd0ae2a12e541666b2 | [
"Apache-2.0"
] | null | null | null | from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
from checkov.common.models.enums import CheckResult, CheckCategories
class GoogleCloudSqlDatabasePublicallyAccessible(BaseResourceCheck):
def __init__(self):
name = "Ensure that Cloud SQL database Instances are not open to ... | 54.823529 | 116 | 0.57618 |
794813819f168f66c060accc9166d5dc9d35a6ef | 1,759 | py | Python | src/util.py | dmarxn/mwdblib | 8249bee222ed72590695b6010d6ee4cd4b6b12ca | [
"MIT"
] | 36 | 2018-12-16T18:59:44.000Z | 2022-03-26T21:35:07.000Z | src/util.py | dmarxn/mwdblib | 8249bee222ed72590695b6010d6ee4cd4b6b12ca | [
"MIT"
] | 26 | 2019-12-17T20:49:17.000Z | 2022-03-31T16:38:49.000Z | src/util.py | dmarxn/mwdblib | 8249bee222ed72590695b6010d6ee4cd4b6b12ca | [
"MIT"
] | 7 | 2020-05-23T00:44:46.000Z | 2022-01-17T22:43:48.000Z | import hashlib
import sys
def convert_to_utf8(obj):
"""Encodes object into utf-8 bytes (or 'str' in Py2)"""
obj = str(obj)
if sys.version_info[0] == 3:
obj = bytes(obj, "utf-8")
else:
obj = u''.join(map(unichr, map(ord, obj))).encode("utf-8") # noqa: F821 in Py3 context
return obj... | 34.490196 | 104 | 0.645821 |
7948142a715827c4bdca853567744befef12167b | 2,670 | py | Python | test/unit/filterer/test_base.py | 4degrees/mill | ba8362193fa9cbcb52e9b6d188d3060eed495038 | [
"Apache-2.0"
] | null | null | null | test/unit/filterer/test_base.py | 4degrees/mill | ba8362193fa9cbcb52e9b6d188d3060eed495038 | [
"Apache-2.0"
] | 1 | 2016-05-18T08:56:43.000Z | 2016-05-18T09:11:31.000Z | test/unit/filterer/test_base.py | 4degrees/mill | ba8362193fa9cbcb52e9b6d188d3060eed495038 | [
"Apache-2.0"
] | null | null | null | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import pytest
from sawmill.log import Log
from sawmill.filterer.base import Filterer, Any, All
class DenyAll(Filterer):
'''Filter all logs.'''
def filter(self, logs):
'''Filter all *logs*.'''
... | 22.627119 | 73 | 0.618727 |
794814c284fa57577221dfc56a1062ced75eee02 | 2,510 | py | Python | tests/components/xbox/test_config_flow.py | nibdev/core | b7e8348c306fb6af9582a04eed6058a28409dc26 | [
"Apache-2.0"
] | 5 | 2020-12-15T04:09:01.000Z | 2022-03-11T21:34:24.000Z | tests/components/xbox/test_config_flow.py | nibdev/core | b7e8348c306fb6af9582a04eed6058a28409dc26 | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | tests/components/xbox/test_config_flow.py | winning1120xx/home-assistant | 53d4c0ce2d374b5e97bbdc37742656c27adf8eea | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Test the xbox config flow."""
from unittest.mock import patch
from homeassistant import config_entries, data_entry_flow, setup
from homeassistant.components.xbox.const import DOMAIN, OAUTH2_AUTHORIZE, OAUTH2_TOKEN
from homeassistant.helpers import config_entry_oauth2_flow
from tests.common import MockConfigEntry
... | 31.772152 | 86 | 0.663347 |
794815359f7adf6ff62a5081cf302bd847bac339 | 16,221 | py | Python | spacy/tests/pipeline/test_span_ruler.py | stungkit/spaCy | a83a50119520ea8708f0ef0730f65f486556c273 | [
"MIT"
] | 1 | 2019-11-27T13:14:04.000Z | 2019-11-27T13:14:04.000Z | spacy/tests/pipeline/test_span_ruler.py | stungkit/spaCy | a83a50119520ea8708f0ef0730f65f486556c273 | [
"MIT"
] | null | null | null | spacy/tests/pipeline/test_span_ruler.py | stungkit/spaCy | a83a50119520ea8708f0ef0730f65f486556c273 | [
"MIT"
] | null | null | null | import pytest
import spacy
from spacy import registry
from spacy.errors import MatchPatternError
from spacy.tokens import Span
from spacy.training import Example
from spacy.tests.util import make_tempdir
from thinc.api import NumpyOps, get_current_ops
@pytest.fixture
@registry.misc("span_ruler_patterns")
def patter... | 34.809013 | 105 | 0.647864 |
794815b4706d6f0abb0b1add13fedc138dfe5141 | 21,756 | py | Python | modeling/fit_and_predict.py | kuleafenu/covid19-severity-prediction | ebe2e938bbeb70d3dde53c1943f0cfdc02df5098 | [
"MIT"
] | 1 | 2021-04-25T12:36:30.000Z | 2021-04-25T12:36:30.000Z | modeling/fit_and_predict.py | kuleafenu/covid19-severity-prediction | ebe2e938bbeb70d3dde53c1943f0cfdc02df5098 | [
"MIT"
] | null | null | null | modeling/fit_and_predict.py | kuleafenu/covid19-severity-prediction | ebe2e938bbeb70d3dde53c1943f0cfdc02df5098 | [
"MIT"
] | null | null | null | import copy
import numpy as np
import pandas as pd
from os.path import join as oj
import os
from collections import Counter
from models import exponential_modeling
import pmdl_weight
import datetime
from models.shared_models import SharedModel
from collections import defaultdict
import inspect
import sys
from tqdm impo... | 44.040486 | 169 | 0.557042 |
7948164552581d320272aa9e2b0a26c53ca219fb | 7,809 | py | Python | tests/www/test_security.py | Patchus/airflow | 4e0d14b70b9edd8ff1c7f228f8e57e82b3e72d1b | [
"Apache-2.0"
] | null | null | null | tests/www/test_security.py | Patchus/airflow | 4e0d14b70b9edd8ff1c7f228f8e57e82b3e72d1b | [
"Apache-2.0"
] | 1 | 2020-08-21T07:16:08.000Z | 2020-08-21T07:16:08.000Z | tests/www/test_security.py | Patchus/airflow | 4e0d14b70b9edd8ff1c7f228f8e57e82b3e72d1b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#... | 40.046154 | 90 | 0.685235 |
7948166b1eeb16bc21ba0cd21093e2cda6977806 | 54,116 | py | Python | QAMAS/_build/jupyter_execute/BuildingModel.py | ebenjaminrandall/QAMAS_book | 8a6b78fbf3564ce313380619900f2de5fcbe9035 | [
"MIT"
] | 1 | 2021-05-18T00:57:56.000Z | 2021-05-18T00:57:56.000Z | QAMAS/_build/jupyter_execute/BuildingModel.py | ebenjaminrandall/QAMAS_book | 8a6b78fbf3564ce313380619900f2de5fcbe9035 | [
"MIT"
] | null | null | null | QAMAS/_build/jupyter_execute/BuildingModel.py | ebenjaminrandall/QAMAS_book | 8a6b78fbf3564ce313380619900f2de5fcbe9035 | [
"MIT"
] | 1 | 2021-02-05T21:07:49.000Z | 2021-02-05T21:07:49.000Z | #!/usr/bin/env python
# coding: utf-8
# # Building a model of oxidative ATP synthesis from energetic components
#
# Simulations in the preceding section illustrate how matrix ATP and ADP concentrations are governed by the contributors to the proton motive force. They also show how the matrix ATP/ADP ratio must typic... | 43.961007 | 1,001 | 0.592283 |
7948167d24cc880a73c2ba363dbf18c0796d462c | 2,875 | py | Python | wsi_process/resize.py | Lornatang/Scripts | ba9bb03dc3bc4b48d6314a6bd16e3ae5e813bb24 | [
"Apache-2.0"
] | null | null | null | wsi_process/resize.py | Lornatang/Scripts | ba9bb03dc3bc4b48d6314a6bd16e3ae5e813bb24 | [
"Apache-2.0"
] | null | null | null | wsi_process/resize.py | Lornatang/Scripts | ba9bb03dc3bc4b48d6314a6bd16e3ae5e813bb24 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Dakewe Biotech Corporation. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 55.288462 | 108 | 0.653217 |
794816c3bfbb391fc360fff094bd8a46428f3f47 | 604 | py | Python | database_block/models/ir_http.py | trojikman/access-addons | 5b056b4d0928e83f687ea7978de6f96f826c28a6 | [
"MIT"
] | null | null | null | database_block/models/ir_http.py | trojikman/access-addons | 5b056b4d0928e83f687ea7978de6f96f826c28a6 | [
"MIT"
] | null | null | null | database_block/models/ir_http.py | trojikman/access-addons | 5b056b4d0928e83f687ea7978de6f96f826c28a6 | [
"MIT"
] | null | null | null | # Copyright 2020 Eugene Molotov <https://it-projects.info/team/em230418>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import SUPERUSER_ID, models
class IrHttp(models.AbstractModel):
_inherit = "ir.http"
def session_info(self):
res = super(IrHttp, self).session_info()
res[... | 26.26087 | 88 | 0.600993 |
794816df16e5c3f0b0f03d61888d12de26161c40 | 14,542 | py | Python | bitcoin/ledger.py | vanschelven/python-bitcoin | 1b80c284170fd3f547cc45f4700ce169f3f99641 | [
"MIT"
] | 8 | 2015-02-04T05:07:50.000Z | 2019-01-17T19:52:10.000Z | bitcoin/ledger.py | vanschelven/python-bitcoin | 1b80c284170fd3f547cc45f4700ce169f3f99641 | [
"MIT"
] | 2 | 2020-05-13T09:50:07.000Z | 2021-02-23T09:44:04.000Z | bitcoin/ledger.py | vanschelven/python-bitcoin | 1b80c284170fd3f547cc45f4700ce169f3f99641 | [
"MIT"
] | 9 | 2015-01-23T11:37:30.000Z | 2018-10-06T11:15:07.000Z | # -*- coding: utf-8 -*-
# Copyright © 2012-2014 by its contributors. See AUTHORS for details.
# Distributed under the MIT/X11 software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
# Python 2 and 3 compatibility utilities
import six
from blist import sorteddict
fr... | 41.430199 | 88 | 0.624948 |
79481879fa2d2f8394dc5f19bc539efa1ac76706 | 5,157 | py | Python | craid/eddb/util/dataUpdate/MakeSmolFiles.py | HausReport/ClubRaiders | 88bd64d2512302ca2b391b48979b6e88b092eb92 | [
"BSD-3-Clause"
] | null | null | null | craid/eddb/util/dataUpdate/MakeSmolFiles.py | HausReport/ClubRaiders | 88bd64d2512302ca2b391b48979b6e88b092eb92 | [
"BSD-3-Clause"
] | 2 | 2020-05-28T13:30:08.000Z | 2020-06-02T14:12:04.000Z | craid/eddb/util/dataUpdate/MakeSmolFiles.py | HausReport/ClubRaiders | 88bd64d2512302ca2b391b48979b6e88b092eb92 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Club Raiders Project
# https://github.com/HausReport/ClubRaiders
#
# SPDX-License-Identifier: BSD-3-Clause
import gzip
import logging
import os
import shutil
import tempfile
import traceback
from shutil import copyfile
from typing import Dict, List, Set
import ujson
from craid.eddb.loader.... | 32.433962 | 139 | 0.64301 |
794818a57f7b215a522fb5ce0e020ea2257e2ce6 | 3,191 | py | Python | data/migrate/__init__.py | cnobile2012/inventory | bc09ccdead39a5cd758088dbfe5c56dec43c7e29 | [
"MIT"
] | 10 | 2015-02-16T17:12:44.000Z | 2021-06-04T18:14:01.000Z | data/migrate/__init__.py | cnobile2012/inventory | bc09ccdead39a5cd758088dbfe5c56dec43c7e29 | [
"MIT"
] | 1 | 2021-09-20T01:17:38.000Z | 2021-09-20T01:17:50.000Z | data/migrate/__init__.py | cnobile2012/inventory | bc09ccdead39a5cd758088dbfe5c56dec43c7e29 | [
"MIT"
] | 5 | 2015-09-09T02:01:33.000Z | 2021-05-29T09:09:14.000Z | # -*- coding: utf-8 -*-
#
# __init__.py
#
import logging
from django.contrib.auth import get_user_model
try:
from inventory.projects.models import Project, Membership, InventoryType
except:
pass
UserModel = get_user_model()
def setup_logger(name='root', fullpath=None, fmt=None, level=logging.INFO):
FO... | 27.042373 | 76 | 0.590411 |
7948192666bb8d105d2b1ba0e08f82902f5d04a4 | 1,485 | py | Python | setup.py | timgates42/django-meta | 2fd32eab30486daeee27e8a9500045d4233996e5 | [
"BSD-4-Clause"
] | null | null | null | setup.py | timgates42/django-meta | 2fd32eab30486daeee27e8a9500045d4233996e5 | [
"BSD-4-Clause"
] | null | null | null | setup.py | timgates42/django-meta | 2fd32eab30486daeee27e8a9500045d4233996e5 | [
"BSD-4-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup
import meta
setup(
name='django-meta',
description='Pluggable app for handling webpage meta tags and OpenGraph '
'properties',
long_description=open('README.rst').read(),
version=meta.__version__,
packages=['meta', 'meta.template... | 33 | 93 | 0.580471 |
794819a5da6a61ff4abf24aec0df8f3da81d3038 | 79,379 | py | Python | pineboolib/fllegacy/systype.py | juanjosepablos/pineboo | f6ce515aec6e0139821bb9c1d62536d9fb50dae4 | [
"MIT"
] | null | null | null | pineboolib/fllegacy/systype.py | juanjosepablos/pineboo | f6ce515aec6e0139821bb9c1d62536d9fb50dae4 | [
"MIT"
] | 1 | 2017-10-30T22:00:48.000Z | 2017-11-11T19:34:32.000Z | pineboolib/fllegacy/systype.py | juanjosepablos/pineboo | f6ce515aec6e0139821bb9c1d62536d9fb50dae4 | [
"MIT"
] | 1 | 2017-10-30T20:16:38.000Z | 2017-10-30T20:16:38.000Z | """Systype module."""
import traceback
import os
import os.path
import sys
import re
from PyQt5 import QtCore, QtWidgets, QtGui, QtXml
from pineboolib.core.error_manager import error_manager
from pineboolib.core.system import System
from pineboolib.core.utils import utils_base, logging
from pineboolib.core import ... | 35.659928 | 102 | 0.537523 |
794819aba2dc129ff9c7fb65919bc100f82aae4c | 1,879 | py | Python | app.py | ohst19/ohst19.github.io | 48af75ca7dbc4002b3222ed1499250da296a6d38 | [
"MIT"
] | 1 | 2021-07-08T09:07:34.000Z | 2021-07-08T09:07:34.000Z | app.py | ohst19/ohst19.github.io | 48af75ca7dbc4002b3222ed1499250da296a6d38 | [
"MIT"
] | null | null | null | app.py | ohst19/ohst19.github.io | 48af75ca7dbc4002b3222ed1499250da296a6d38 | [
"MIT"
] | 2 | 2020-10-25T16:31:48.000Z | 2021-02-27T14:17:26.000Z | # MIT License
# Copyright (c) 2020 Shrid Pant
# 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, merge, pub... | 37.58 | 80 | 0.771687 |
79481caf788ea3b341fd5b36db204b54eb960805 | 39,754 | py | Python | tensorflow_probability/python/distributions/hidden_markov_model.py | fehiepsi/probability | 9deb067891a974ec9ee1636167b0b0fce9f44a40 | [
"Apache-2.0"
] | 1 | 2020-05-16T13:00:01.000Z | 2020-05-16T13:00:01.000Z | tensorflow_probability/python/distributions/hidden_markov_model.py | fehiepsi/probability | 9deb067891a974ec9ee1636167b0b0fce9f44a40 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/hidden_markov_model.py | fehiepsi/probability | 9deb067891a974ec9ee1636167b0b0fce9f44a40 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# 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... | 42.517647 | 80 | 0.645897 |
79481db37d6c8c5c2f2d451293ddf2b7c849798d | 4,716 | py | Python | src/yotsugi_cli.py | Nyx0uf/Yotsugi | 45ad4a87695bdb5d9d7b98ebc44a4c3161bb7952 | [
"MIT"
] | 1 | 2020-11-21T16:40:20.000Z | 2020-11-21T16:40:20.000Z | src/yotsugi_cli.py | Nyx0uf/Yotsugi | 45ad4a87695bdb5d9d7b98ebc44a4c3161bb7952 | [
"MIT"
] | null | null | null | src/yotsugi_cli.py | Nyx0uf/Yotsugi | 45ad4a87695bdb5d9d7b98ebc44a4c3161bb7952 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
"""
Client
"""
import argparse
import requests
import sys
from configparser import ConfigParser
from pathlib import Path
from typing import List, Dict
from requests.models import HTTPBasicAuth
from model import note
def load_cfg() -> ConfigParser:
"""Load the client config ... | 42.872727 | 136 | 0.646098 |
79481e83748d7667306466f94746861ce8f9803f | 4,888 | py | Python | examples/optimal_burst/optimal_burst_by_range.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | 2 | 2020-06-25T17:19:05.000Z | 2020-10-13T06:08:39.000Z | examples/optimal_burst/optimal_burst_by_range.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | null | null | null | examples/optimal_burst/optimal_burst_by_range.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | null | null | null | import logging
import os
from itertools import groupby
from typing import List, Optional
import altair
from ps2_census.enums import PlayerState
from ps2_analysis.enums import DamageLocation
from ps2_analysis.fire_groups.cone_of_fire import ConeOfFire
from ps2_analysis.fire_groups.data_files import (
update_data_f... | 28.254335 | 88 | 0.648936 |
79481f478f4e07714ee2cd9849b42f2dfe3fb2c1 | 522 | py | Python | homework-12345/homework3/network.py | easilylazy/pattern-recognition | 2b95689bb3f34e4821a0211b19b76164aa6e615f | [
"MIT"
] | 2 | 2021-03-07T14:40:23.000Z | 2021-03-08T08:51:01.000Z | homework-12345/homework3/network.py | easilylazy/pattern-recognition | 2b95689bb3f34e4821a0211b19b76164aa6e615f | [
"MIT"
] | null | null | null | homework-12345/homework3/network.py | easilylazy/pattern-recognition | 2b95689bb3f34e4821a0211b19b76164aa6e615f | [
"MIT"
] | null | null | null | """ Network Class """
class Network():
def __init__(self):
self.layerList = []
self.numLayer = 0
self.is_training = True
def add(self, layer):
self.numLayer += 1
self.layerList.append(layer)
def forward(self, x):
# forward layer by layer
for i in range(self.numLayer):
x = self.layerList[i].forwar... | 22.695652 | 65 | 0.689655 |
79482043152df3fe6c094446c1a654e2df15c89d | 2,210 | py | Python | setup.py | mauriciogtec/ml-logger | b66be0f18097456618eecfb15e425ea9bb51bfbb | [
"MIT"
] | null | null | null | setup.py | mauriciogtec/ml-logger | b66be0f18097456618eecfb15e425ea9bb51bfbb | [
"MIT"
] | null | null | null | setup.py | mauriciogtec/ml-logger | b66be0f18097456618eecfb15e425ea9bb51bfbb | [
"MIT"
] | null | null | null | import codecs
import os.path
import setuptools
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), "r") as fp:
return fp.read()
def get_version(rel_path):
# code taken from https://packaging.python.org/guides/single-sourcing-packa... | 32.5 | 90 | 0.661991 |
7948205235e3ba42220d72e5638695fd66bc4115 | 37,074 | py | Python | old_projects/eola/chapter4.py | mertyildiran/manim | db7f8320bd84e9ebbf75adfcd6dfc480881e5849 | [
"MIT"
] | 2 | 2020-12-26T05:21:23.000Z | 2022-02-22T23:00:28.000Z | old_projects/eola/chapter4.py | xiangxun/manim | 31478c523c9febb85d673219c6451ce545b5e319 | [
"MIT"
] | 4 | 2021-03-19T09:45:18.000Z | 2022-01-13T02:00:35.000Z | old_projects/eola/chapter4.py | xiangxun/manim | 31478c523c9febb85d673219c6451ce545b5e319 | [
"MIT"
] | 2 | 2021-07-21T17:49:09.000Z | 2022-01-24T11:56:17.000Z | from big_ol_pile_of_manim_imports import *
from old_projects.eola.chapter3 import MatrixVectorMultiplicationAbstract
class OpeningQuote(Scene):
def construct(self):
words = TextMobject([
"It is my experience that proofs involving",
"matrices",
"can be shortened by 50\\%... | 34.232687 | 100 | 0.574527 |
7948206db2fd8ebfbae9d97d49de873dd53f7638 | 6,288 | py | Python | module.py | dtylor/WalkAsString | 88841062b2eaa343da0661c3fe31acc4a7d1a0b8 | [
"MIT"
] | 5 | 2019-03-10T13:38:57.000Z | 2019-11-08T00:12:32.000Z | module.py | dtylor/WalkAsString | 88841062b2eaa343da0661c3fe31acc4a7d1a0b8 | [
"MIT"
] | 10 | 2019-02-25T01:16:57.000Z | 2019-03-04T03:01:16.000Z | module.py | dtylor/WalkAsString | 88841062b2eaa343da0661c3fe31acc4a7d1a0b8 | [
"MIT"
] | 1 | 2020-05-10T09:19:13.000Z | 2020-05-10T09:19:13.000Z | from n2v import node2vec
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
import networkx as nx
import pandas as pd
import numpy as np
from graphwave import graphwave
from graphwave.utils import utils
from sklearn.decomposition import PCA
from skl... | 39.54717 | 160 | 0.675254 |
794820ed3aa4128aa9e8d1a9a24dc19521fb3ede | 2,914 | py | Python | insights/parsers/postconf.py | haithcockce/insights-core | b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5 | [
"Apache-2.0"
] | 121 | 2017-05-30T20:23:25.000Z | 2022-03-23T12:52:15.000Z | insights/parsers/postconf.py | haithcockce/insights-core | b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5 | [
"Apache-2.0"
] | 1,977 | 2017-05-26T14:36:03.000Z | 2022-03-31T10:38:53.000Z | insights/parsers/postconf.py | haithcockce/insights-core | b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5 | [
"Apache-2.0"
] | 244 | 2017-05-30T20:22:57.000Z | 2022-03-26T10:09:39.000Z | """
Postconf - command ``postconf``
===============================
PostconfBuiltin - command ``postconf -C builtin``
=================================================
"""
from insights.core import CommandParser
from insights.core.plugins import parser
from insights.specs import Specs
from insights.parsers import Ski... | 28.568627 | 82 | 0.601579 |
79482145c3765c05fd812b000d67344485fe6f12 | 2,733 | py | Python | train.py | batuhan-baskurt/AICITY2020_DMT_VehicleReID | 3f18b61f0dbf1fbac1f2adb0dbb07a8b647e1747 | [
"MIT"
] | null | null | null | train.py | batuhan-baskurt/AICITY2020_DMT_VehicleReID | 3f18b61f0dbf1fbac1f2adb0dbb07a8b647e1747 | [
"MIT"
] | null | null | null | train.py | batuhan-baskurt/AICITY2020_DMT_VehicleReID | 3f18b61f0dbf1fbac1f2adb0dbb07a8b647e1747 | [
"MIT"
] | null | null | null | import os
from torch.backends import cudnn
from utils.logger import setup_logger
from datasets import make_dataloader
from model import make_model
from solver import make_optimizer, WarmupMultiStepLR
from loss import make_loss
from processor import do_train
import random
import torch
import numpy as np
import os
import... | 32.927711 | 98 | 0.681668 |
7948218f5ea7d53d79e559d4dacb8274b9d84ae5 | 1,153 | py | Python | var/spack/repos/builtin/packages/r-rcppcctz/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin/packages/r-rcppcctz/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2019-07-30T10:12:28.000Z | 2019-12-17T09:02:27.000Z | var/spack/repos/builtin/packages/r-rcppcctz/package.py | adrianjhpc/spack | 0a9e4fcee57911f2db586aa50c8873d9cca8de92 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 5 | 2019-07-30T09:42:14.000Z | 2021-01-25T05:39:20.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RRcppcctz(RPackage):
"""'Rcpp' Access to the 'CCTZ' timezone library is provided. 'CCTZ' i... | 46.12 | 95 | 0.733738 |
794821df6efe801ba51e52d361d5aa4d3c7d5dac | 25,267 | py | Python | fbcrawl/items.py | pramoth/fbcrawl | dd0ed825364f6960456a9f3a00d12a2e143f733d | [
"Apache-2.0"
] | null | null | null | fbcrawl/items.py | pramoth/fbcrawl | dd0ed825364f6960456a9f3a00d12a2e143f733d | [
"Apache-2.0"
] | null | null | null | fbcrawl/items.py | pramoth/fbcrawl | dd0ed825364f6960456a9f3a00d12a2e143f733d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from scrapy.loader.processors import TakeFirst, Join, MapCompose
from datetime import datetime, timedelta
def comments_strip(string,loader_context):... | 39.418097 | 149 | 0.450034 |
794821ea0d096b0d913925265027f21b65835d93 | 1,390 | py | Python | V2.0.0/steneografia/popups.py | ziajek444/Stenography | 4faf946065a675b995e83a15d7c2e8c4958a2192 | [
"MIT"
] | null | null | null | V2.0.0/steneografia/popups.py | ziajek444/Stenography | 4faf946065a675b995e83a15d7c2e8c4958a2192 | [
"MIT"
] | null | null | null | V2.0.0/steneografia/popups.py | ziajek444/Stenography | 4faf946065a675b995e83a15d7c2e8c4958a2192 | [
"MIT"
] | null | null | null | from kivy.uix.button import Button
from kivy.uix.popup import Popup
# content_ = Button(text='ok')
content_image_saved = Button(text='ok')
content_image_saved_m = Button(text='ok')
content_hided_data = Button(text='ok')
content_wrong_format = Button(text='ok')
content_drafted_data = Button(text='ok')
# po... | 43.4375 | 129 | 0.782734 |
7948221593e915362dcccd9939f1b2bf9546e351 | 2,763 | py | Python | darwin/exporter/formats/dataloop.py | ck37/darwin-py | a231e3844759c44a954b47126bbbf9d6afe658fc | [
"MIT"
] | null | null | null | darwin/exporter/formats/dataloop.py | ck37/darwin-py | a231e3844759c44a954b47126bbbf9d6afe658fc | [
"MIT"
] | null | null | null | darwin/exporter/formats/dataloop.py | ck37/darwin-py | a231e3844759c44a954b47126bbbf9d6afe658fc | [
"MIT"
] | null | null | null | import json
from pathlib import Path
from typing import Any, Dict, Iterable, Iterator
import numpy as np
import darwin.datatypes as dt
class NumpyEncoder(json.JSONEncoder):
def default(self, obj: Any) -> Any:
if isinstance(obj, np.integer):
return int(obj)
elif isinstance(obj, np.flo... | 35.423077 | 113 | 0.559899 |
794822445d9e5cd57d4594cf1db8fca48cbdae12 | 1,712 | py | Python | 3DGenZ/genz3d/fkaconv/lightconvpoint/knn/sampling_fps_op.py | valeoai/3DGenZ | 3368585e10f127f7a0d71af98994a6cff5235dab | [
"Apache-2.0"
] | 8 | 2021-12-10T03:21:21.000Z | 2022-03-11T06:23:30.000Z | 3DGenZ/genz3d/fkaconv/lightconvpoint/knn/sampling_fps_op.py | valeoai/3DGenZ | 3368585e10f127f7a0d71af98994a6cff5235dab | [
"Apache-2.0"
] | 1 | 2022-03-02T09:33:36.000Z | 2022-03-06T16:29:44.000Z | 3DGenZ/genz3d/fkaconv/lightconvpoint/knn/sampling_fps_op.py | valeoai/3DGenZ | 3368585e10f127f7a0d71af98994a6cff5235dab | [
"Apache-2.0"
] | 2 | 2022-01-12T17:57:13.000Z | 2022-02-22T05:22:24.000Z | import torch
import math
from torch_geometric.nn.pool import fps
from lightconvpoint.knn import knn
import importlib
knn_c_func_spec = importlib.util.find_spec('lightconvpoint.knn_c_func')
if knn_c_func_spec is not None:
knn_c_func = importlib.util.module_from_spec(knn_c_func_spec)
knn_c_func_spec.loader.exec... | 27.612903 | 100 | 0.723715 |
794822d7b29e0383e49346c81da3197a894e717b | 5,938 | py | Python | plugins/metrics/Wikipedia/Plugin.py | figshare/Total-Impact | 4b4be729a12c1f19bdb69e77614ce577a5553386 | [
"MIT"
] | 5 | 2015-11-26T20:42:32.000Z | 2018-08-08T18:37:07.000Z | plugins/metrics/Wikipedia/Plugin.py | figshare/Total-Impact | 4b4be729a12c1f19bdb69e77614ce577a5553386 | [
"MIT"
] | null | null | null | plugins/metrics/Wikipedia/Plugin.py | figshare/Total-Impact | 4b4be729a12c1f19bdb69e77614ce577a5553386 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import simplejson
import json
import urllib
import urllib2
import BeautifulSoup
from BeautifulSoup import BeautifulStoneSoup
import time
import re
import nose
from nose.tools import assert_equals
import sys
import os
# This hack is to add current path when running script from command line
sys.path... | 40.394558 | 437 | 0.66066 |
794823241dd86fc53ef1c920715777c3f4cc023e | 5,578 | py | Python | fabfile.py | digirea/HIVE | 8896b0cc858c1ad0683888b925f71c0f0d71bf9d | [
"MIT"
] | null | null | null | fabfile.py | digirea/HIVE | 8896b0cc858c1ad0683888b925f71c0f0d71bf9d | [
"MIT"
] | null | null | null | fabfile.py | digirea/HIVE | 8896b0cc858c1ad0683888b925f71c0f0d71bf9d | [
"MIT"
] | null | null | null | #
# Edit `config` line to fit in your environemnt.
#
# To install fabric and cuisne,
#
# # update setuptools
# $ sudo pip install -U setuptools
# $ sudo pip install setuptools
#
# $ sudo pip install fabric
# $ sudo pip install cuisine
#
# You may need to speicfy ARCHFLAGFS on MacOSX environemnt.
# (https://l... | 35.081761 | 125 | 0.659376 |
794823c9d01e14edf1641fe97b90f577d30dfe8c | 185 | py | Python | src/db/redis.py | arthasyou/py_frame | 35303cc1970e4a83a60c3e3d1a341a107d6b94aa | [
"MIT"
] | null | null | null | src/db/redis.py | arthasyou/py_frame | 35303cc1970e4a83a60c3e3d1a341a107d6b94aa | [
"MIT"
] | null | null | null | src/db/redis.py | arthasyou/py_frame | 35303cc1970e4a83a60c3e3d1a341a107d6b94aa | [
"MIT"
] | null | null | null | import redis
from config.database import redis as cfg
__all__:['r']
r = redis.Redis(
host=cfg['host'],
port=cfg['port'],
password=cfg['password'],
db=cfg['database']
) | 16.818182 | 40 | 0.637838 |
794824317af503e165503b8bf360a6d13cc892ec | 441 | py | Python | examples/stations/id.py | clampr/meteostat-python | d4d828ad81d60482ec50276deba7413e2ff042f5 | [
"MIT"
] | null | null | null | examples/stations/id.py | clampr/meteostat-python | d4d828ad81d60482ec50276deba7413e2ff042f5 | [
"MIT"
] | null | null | null | examples/stations/id.py | clampr/meteostat-python | d4d828ad81d60482ec50276deba7413e2ff042f5 | [
"MIT"
] | null | null | null | """
Example: Get weather stations by identifier
Meteorological data provided by Meteostat (https://dev.meteostat.net)
under the terms of the Creative Commons Attribution-NonCommercial
4.0 International Public License.
The code is licensed under the MIT license.
"""
from meteostat import Stations
# Get weather stati... | 23.210526 | 69 | 0.77551 |
794824765f2e494dd32c203a0360acd587eed748 | 12,189 | py | Python | EnlightenGAN/data/unaligned_dataset.py | chenwydj/dynamic_light_unfolding | 607371b9176e10ebfcc1f350511dae4ead260aa2 | [
"MIT"
] | null | null | null | EnlightenGAN/data/unaligned_dataset.py | chenwydj/dynamic_light_unfolding | 607371b9176e10ebfcc1f350511dae4ead260aa2 | [
"MIT"
] | null | null | null | EnlightenGAN/data/unaligned_dataset.py | chenwydj/dynamic_light_unfolding | 607371b9176e10ebfcc1f350511dae4ead260aa2 | [
"MIT"
] | null | null | null | import torch
from torch import nn
import os.path
import torchvision.transforms as transforms
from EnlightenGAN.data.base_dataset import BaseDataset, get_transform
from EnlightenGAN.data.image_folder import make_dataset
import random
from PIL import Image
import PIL
from pdb import set_trace as st
import numpy as np
fro... | 46.170455 | 161 | 0.559111 |
794824894042580e73abe3503e9fab353aff6d02 | 2,898 | py | Python | Project3/dqn_model.py | radhasaraf/ds595-rl | 3360d01da8a292358d000da2df3f2e65875fbae9 | [
"MIT"
] | null | null | null | Project3/dqn_model.py | radhasaraf/ds595-rl | 3360d01da8a292358d000da2df3f2e65875fbae9 | [
"MIT"
] | null | null | null | Project3/dqn_model.py | radhasaraf/ds595-rl | 3360d01da8a292358d000da2df3f2e65875fbae9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import torch
from torch import nn, Tensor
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class DQN(nn.Module):
"""
Initialize a deep Q-learning network
Architecture reference: Original paper for DQN
(https://storage.googleapis.com... | 34.915663 | 93 | 0.616287 |
79482490bbac752ce74aa7a6746b894b32edfe12 | 2,277 | py | Python | software/openvisualizer/openvisualizer/JRC/cojpDefines.py | pedrohenriquegomes/openwsn-sw | 24761e01dc1e8dbc351e61bd927c57facc64c155 | [
"BSD-3-Clause"
] | 26 | 2015-01-31T23:56:36.000Z | 2021-04-10T20:26:11.000Z | software/openvisualizer/openvisualizer/JRC/cojpDefines.py | pedrohenriquegomes/openwsn-sw | 24761e01dc1e8dbc351e61bd927c57facc64c155 | [
"BSD-3-Clause"
] | 33 | 2015-03-18T15:54:01.000Z | 2018-03-08T14:28:50.000Z | software/openvisualizer/openvisualizer/JRC/cojpDefines.py | pedrohenriquegomes/openwsn-sw | 24761e01dc1e8dbc351e61bd927c57facc64c155 | [
"BSD-3-Clause"
] | 80 | 2015-01-07T08:54:58.000Z | 2020-05-06T21:33:41.000Z | # constants from draft-ietf-6tisch-minimal-security-06
COJP_PARAMETERS_LABELS_ROLE = 1 # Identifies the role parameter
COJP_PARAMETERS_LABELS_LLKEYSET = 2 # Identifies the array carrying one or more link-layer cryptographic keys
COJP_PARAMETERS_LABELS_LLSHORTADDRESS = 3 # Identifies the assigned link-l... | 37.95 | 115 | 0.796223 |
794825347534fb0320706508b85dd8428d90b498 | 1,053 | py | Python | openacs/inserts/opt/ConnectionRequest/XMPP/xmpp-con-req.py | devolo/tr069 | f1a35b35e36b92ac37a33fea41d1671768b30620 | [
"MIT"
] | 18 | 2019-12-05T10:04:19.000Z | 2022-03-09T02:23:12.000Z | openacs/inserts/opt/ConnectionRequest/XMPP/xmpp-con-req.py | devolo/tr069 | f1a35b35e36b92ac37a33fea41d1671768b30620 | [
"MIT"
] | null | null | null | openacs/inserts/opt/ConnectionRequest/XMPP/xmpp-con-req.py | devolo/tr069 | f1a35b35e36b92ac37a33fea41d1671768b30620 | [
"MIT"
] | 12 | 2019-12-05T13:21:39.000Z | 2021-11-22T01:10:43.000Z | #!/usr/bin/python
import sys
import xmpp
#ACS user beim prosody
username="acs"
password="devolo"
#XMPP server is 'xmpp' in our internal network, telco0 to externals
server = ('xmpp.public', 5222)
domain="xmpp.public"
resource=""
agent="cpe@xmpp.public/my_fixed_xmpp_resource"
crs_username="Admin"
crs_password="devo... | 25.071429 | 106 | 0.7151 |
794826cbd0996a8f8763039eaed5929077074d58 | 11,630 | py | Python | sdk/python/pulumi_azure_native/storage/v20210401/blob_inventory_policy.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/storage/v20210401/blob_inventory_policy.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/storage/v20210401/blob_inventory_policy.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 50.565217 | 1,016 | 0.685039 |
794827cc54f07165e51acf11a43d4f3674ad00de | 46 | py | Python | src/constants.py | egorsimchuk/binance_bot | af1caac32f8d4804aea3af83250fd4530d9787df | [
"Unlicense"
] | 1 | 2022-03-13T01:07:08.000Z | 2022-03-13T01:07:08.000Z | src/constants.py | egorsimchuk/binance_bot | af1caac32f8d4804aea3af83250fd4530d9787df | [
"Unlicense"
] | 4 | 2022-02-20T10:33:45.000Z | 2022-03-03T22:59:24.000Z | src/constants.py | egorsimchuk/binance_bot | af1caac32f8d4804aea3af83250fd4530d9787df | [
"Unlicense"
] | null | null | null | remove_from_plots = ['USDT']
time_col = 'date' | 23 | 28 | 0.717391 |
794829866746b7481686b83814320a3920971ae1 | 6,068 | py | Python | evaluation/viapoint_environment.py | rock-learning/approxik | 877d50d4d045457593a2fafefd267339a11de20f | [
"BSD-3-Clause"
] | 1 | 2020-03-27T01:53:57.000Z | 2020-03-27T01:53:57.000Z | evaluation/viapoint_environment.py | rock-learning/approxik | 877d50d4d045457593a2fafefd267339a11de20f | [
"BSD-3-Clause"
] | null | null | null | evaluation/viapoint_environment.py | rock-learning/approxik | 877d50d4d045457593a2fafefd267339a11de20f | [
"BSD-3-Clause"
] | 1 | 2020-12-18T02:09:21.000Z | 2020-12-18T02:09:21.000Z | # Authors: Alexander Fabisch <afabisch@informatik.uni-bremen.de>
import numpy as np
from scipy.spatial.distance import cdist
from bolero.environment import Environment
from bolero.utils.log import get_logger
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from pytransform.rotations import matri... | 32.623656 | 84 | 0.585531 |
794829f0d3fa2323b3466c2ea6b5d090adf10914 | 4,159 | py | Python | base/dependency/interface/interface_dependency_extraction.py | btc-ag/revengtools | d58680ef7d6bdc8ef518860d5d13a5acc0d01758 | [
"Apache-2.0"
] | 2 | 2019-07-15T14:59:59.000Z | 2022-01-18T14:23:54.000Z | base/dependency/interface/interface_dependency_extraction.py | btc-ag/revengtools | d58680ef7d6bdc8ef518860d5d13a5acc0d01758 | [
"Apache-2.0"
] | 10 | 2018-05-03T13:25:07.000Z | 2021-06-25T15:14:55.000Z | base/dependency/interface/interface_dependency_extraction.py | btc-ag/revengtools | d58680ef7d6bdc8ef518860d5d13a5acc0d01758 | [
"Apache-2.0"
] | 1 | 2018-05-02T13:59:27.000Z | 2018-05-02T13:59:27.000Z | # -*- coding: utf-8 -*-
import collections
import json
import logging
import subprocess
TypeInformation = collections.namedtuple('TypeInformation', ['TypeName','Assembly'])
# TODO rename the module according to the naming convention to interface_dependency_extractor
class ExternalAnalyzerFailedError(Exception):
... | 40.77451 | 152 | 0.629478 |
79482ad0fa59ba562528e45d90ddc8a13bc998f1 | 2,099 | py | Python | web/web_lianxiang.py | jerryluosuper/Lensi | 3f5c8d6f3c57d58523f4fe5f5f6bcc9657b82c24 | [
"MIT"
] | 1 | 2022-03-23T00:53:56.000Z | 2022-03-23T00:53:56.000Z | web/web_lianxiang.py | jerryluosuper/Lensi | 3f5c8d6f3c57d58523f4fe5f5f6bcc9657b82c24 | [
"MIT"
] | null | null | null | web/web_lianxiang.py | jerryluosuper/Lensi | 3f5c8d6f3c57d58523f4fe5f5f6bcc9657b82c24 | [
"MIT"
] | null | null | null | '''
Author: your name
Date: 2022-02-20 21:28:15
LastEditTime: 2022-03-01 20:45:06
LastEditors: Please set LastEditors
Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
FilePath: \Work\Lensi\web_lianxiang.py
'''
import requests #导入requests包
import ... | 43.729167 | 386 | 0.707003 |
79482af939570211a1e7f30ed84dd08b9c6fa2ff | 416 | py | Python | hubspot/crm/objects/feedback_submissions/api/__init__.py | fakepop/hubspot-api-python | f04103a09f93f5c26c99991b25fa76801074f3d3 | [
"Apache-2.0"
] | null | null | null | hubspot/crm/objects/feedback_submissions/api/__init__.py | fakepop/hubspot-api-python | f04103a09f93f5c26c99991b25fa76801074f3d3 | [
"Apache-2.0"
] | null | null | null | hubspot/crm/objects/feedback_submissions/api/__init__.py | fakepop/hubspot-api-python | f04103a09f93f5c26c99991b25fa76801074f3d3 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from hubspot.crm.objects.feedback_submissions.api.associations_api import (
AssociationsApi,
)
from hubspot.crm.objects.feedback_submissions.api.basic_api import BasicApi
from hubspot.crm.objects.feedback_submissions.api.batch_ap... | 34.666667 | 77 | 0.848558 |
79482b1d8a4e500eb665725e004cf8e3a0791e4b | 889 | py | Python | conf/settings_development.py | tom523/bkapp_test | d7569219e316811c4257684598c52a1b13e67d87 | [
"Apache-2.0"
] | null | null | null | conf/settings_development.py | tom523/bkapp_test | d7569219e316811c4257684598c52a1b13e67d87 | [
"Apache-2.0"
] | null | null | null | conf/settings_development.py | tom523/bkapp_test | d7569219e316811c4257684598c52a1b13e67d87 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云(BlueKing) available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obt... | 42.333333 | 115 | 0.750281 |
79482b22685431677db04d2292ef0357ebea4625 | 2,134 | py | Python | libwinmedia/media.py | libwinmedia/libwinmedia-py | 28de70680ccef5f76381c8c8c77d30600495c6f5 | [
"MIT"
] | 1 | 2022-01-30T11:05:12.000Z | 2022-01-30T11:05:12.000Z | libwinmedia/media.py | mytja/libwinmedia-py | 28de70680ccef5f76381c8c8c77d30600495c6f5 | [
"MIT"
] | null | null | null | libwinmedia/media.py | mytja/libwinmedia-py | 28de70680ccef5f76381c8c8c77d30600495c6f5 | [
"MIT"
] | null | null | null | import os
import platform
from .library import lib
from ctypes import POINTER, c_char_p
from .tags import MusicTags, VideoTags
media_id = 0
class Media(object):
"""A class representing a media file."""
def __init__(self, uri: str, parse: bool = True):
"""Create a new Media instance.
The UR... | 32.333333 | 119 | 0.621837 |
79482bde896dbb5a879ad7eb2b569ca9dd6cf311 | 550 | py | Python | forms.py | Dev-Elie/Threaded-Nested-Replies-using-Flask-SQLAlchemy | 141c096899c190825690292e9c8f78412b5422a9 | [
"MIT"
] | 3 | 2021-10-06T07:27:25.000Z | 2022-01-31T12:22:35.000Z | forms.py | Dev-Elie/Threaded-Nested-Replies-using-Flask-SQLAlchemy | 141c096899c190825690292e9c8f78412b5422a9 | [
"MIT"
] | null | null | null | forms.py | Dev-Elie/Threaded-Nested-Replies-using-Flask-SQLAlchemy | 141c096899c190825690292e9c8f78412b5422a9 | [
"MIT"
] | null | null | null | from wtforms import (
StringField,
TextAreaField,
)
from flask_wtf import FlaskForm
from wtforms.validators import InputRequired, Length, EqualTo, Email, Regexp
from wtforms import ValidationError
from wtforms import validators
# No forms here
class CommentForm(FlaskForm):
author = StringField(validators... | 27.5 | 76 | 0.754545 |
79482bf5dd460ccb1b6c184d11912d3613eab28e | 6,821 | py | Python | loldib/getratings/models/NA/na_nocturne/na_nocturne_top.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_nocturne/na_nocturne_top.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | loldib/getratings/models/NA/na_nocturne/na_nocturne_top.py | koliupy/loldib | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | [
"Apache-2.0"
] | null | null | null | from getratings.models.ratings import Ratings
class NA_Nocturne_Top_Aatrox(Ratings):
pass
class NA_Nocturne_Top_Ahri(Ratings):
pass
class NA_Nocturne_Top_Akali(Ratings):
pass
class NA_Nocturne_Top_Alistar(Ratings):
pass
class NA_Nocturne_Top_Amumu(Ratings):
pass
class NA_Nocturne_Top_Anivia(... | 16.357314 | 46 | 0.776133 |
79482c8bfa4476f757229a7a8465c7b8e0972669 | 1,836 | py | Python | sokoapp/gallery/parser.py | Mercy-Nekesa/sokoapp | 6c7bc4c1278b7223226124a49fc33c5b8b6b617a | [
"MIT"
] | 1 | 2019-04-01T05:52:37.000Z | 2019-04-01T05:52:37.000Z | sokoapp/gallery/parser.py | Mercy-Nekesa/sokoapp | 6c7bc4c1278b7223226124a49fc33c5b8b6b617a | [
"MIT"
] | 1 | 2015-03-11T16:18:12.000Z | 2015-03-11T16:18:12.000Z | sokoapp/gallery/parser.py | Mercy-Nekesa/sokoapp | 6c7bc4c1278b7223226124a49fc33c5b8b6b617a | [
"MIT"
] | null | null | null | from django.template import TemplateSyntaxError
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.http import Http404
from django.utils.encoding import smart_unicode
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
fr... | 32.785714 | 109 | 0.680828 |
79482cf9cacbfdc7c07dd4400e4e615edab946d3 | 11,288 | py | Python | Lib/site-packages/notebook/services/contents/fileio.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/services/contents/fileio.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/services/contents/fileio.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """
Utilities for file-based Contents/Checkpoints managers.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from contextlib import contextmanager
import errno
import os
import shutil
from tornado.web import HTTPError
from notebook.utils import (
to_api_pa... | 33.102639 | 140 | 0.613395 |
79482d0c84f18091ae358d2870efb2ccdfcf1ec8 | 1,267 | py | Python | hummingbot/strategy/dev_1_get_order_book/dev_1_get_order_book_config_map.py | TritumDigitalAssets/hummingbot | 13fde61a41a0b13651117c06fc87d02a9cd55a44 | [
"Apache-2.0"
] | 2 | 2019-09-14T12:55:03.000Z | 2019-11-11T12:17:42.000Z | hummingbot/strategy/dev_1_get_order_book/dev_1_get_order_book_config_map.py | TritumDigitalAssets/hummingbot | 13fde61a41a0b13651117c06fc87d02a9cd55a44 | [
"Apache-2.0"
] | 1 | 2021-01-22T13:19:11.000Z | 2021-01-22T13:19:11.000Z | hummingbot/strategy/dev_1_get_order_book/dev_1_get_order_book_config_map.py | TritumDigitalAssets/hummingbot | 13fde61a41a0b13651117c06fc87d02a9cd55a44 | [
"Apache-2.0"
] | 2 | 2020-03-25T00:47:45.000Z | 2020-04-09T20:16:37.000Z | from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_validators import (
is_exchange,
is_valid_market_trading_pair,
)
from hummingbot.client.settings import (
required_exchanges,
EXAMPLE_PAIRS,
)
def trading_pair_prompt():
market = dev_1_get_order_book_con... | 31.675 | 80 | 0.679558 |
79482d321b71728a27694d9bdfc27142c54a9432 | 191 | py | Python | create_python_app/config.py | xuchaoqian/create-python-app | 70745432b972b96a3faf95a378d54d922b77f2be | [
"MIT"
] | null | null | null | create_python_app/config.py | xuchaoqian/create-python-app | 70745432b972b96a3faf95a378d54d922b77f2be | [
"MIT"
] | null | null | null | create_python_app/config.py | xuchaoqian/create-python-app | 70745432b972b96a3faf95a378d54d922b77f2be | [
"MIT"
] | null | null | null | import json
import os
path = os.path.join(os.path.dirname(__file__), '..', 'config', 'sys.json')
with open(path) as file:
options = json.load(file)
def get_options():
return options | 21.222222 | 74 | 0.680628 |
79482d74e2c538af850f937997d06bb4e473b9d9 | 1,194 | py | Python | fisher_py/data/business/tune_data_values.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 3 | 2021-11-03T20:55:45.000Z | 2022-02-01T10:11:47.000Z | fisher_py/data/business/tune_data_values.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 2 | 2022-01-28T02:04:21.000Z | 2022-01-29T01:29:14.000Z | fisher_py/data/business/tune_data_values.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 1 | 2022-01-26T23:30:37.000Z | 2022-01-26T23:30:37.000Z | from fisher_py.net_wrapping import NetWrapperBase, ThermoFisher
from fisher_py.utils import to_net_list
from typing import List
class TuneDataValues(NetWrapperBase):
_wrapped_type = ThermoFisher.CommonCore.Data.Business.TuneDataValues
def __init__(self):
super().__init__()
self._wrapped_obje... | 26.533333 | 72 | 0.632328 |
79482da9422bb9430757d06ef988e94bac22d774 | 372 | py | Python | detector/YOLOX/tools/__init__.py | collector-m/UniTrack | e8e56e164f2dd40ba590a19ed7a4a75d8da7e2eb | [
"MIT"
] | 240 | 2021-06-20T13:50:42.000Z | 2022-03-31T05:08:29.000Z | detector/YOLOX/tools/__init__.py | collector-m/UniTrack | e8e56e164f2dd40ba590a19ed7a4a75d8da7e2eb | [
"MIT"
] | 27 | 2021-07-12T01:19:39.000Z | 2021-12-27T08:05:08.000Z | detector/YOLOX/tools/__init__.py | collector-m/UniTrack | e8e56e164f2dd40ba590a19ed7a4a75d8da7e2eb | [
"MIT"
] | 24 | 2021-07-01T09:48:24.000Z | 2022-03-14T06:39:46.000Z | ###################################################################
# File Name: __init__.py
# Author: Zhongdao Wang
# mail: wcd17@mails.tsinghua.edu.cn
# Created Time: Sun Jul 25 17:14:12 2021
###################################################################
from __future__ import print_function
from __future__ imp... | 33.818182 | 67 | 0.508065 |
79482da99e23ce36ad25c3058513f74a4e0a6483 | 11,054 | py | Python | resolwe_bio/kb/tests/test_feature.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/kb/tests/test_feature.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/kb/tests/test_feature.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from resolwe.test import TestCase
from ..models import Feature
class FeatureTestCase(TestCase, APITestCase):
@staticmethod
def create_feature(index, source, species, feature_type):
return Fe... | 37.09396 | 87 | 0.585308 |
79482e27fabe2ba7ecf44d0568dd4d7fbfa2414e | 17,955 | py | Python | lib/tool_shed/utility_containers/__init__.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | lib/tool_shed/utility_containers/__init__.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | 6 | 2021-11-11T20:57:49.000Z | 2021-12-10T15:30:33.000Z | lib/tool_shed/utility_containers/__init__.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | import logging
import threading
from galaxy import util
from tool_shed.util import (
common_util,
container_util,
readme_util,
)
from . import utility_container_manager
log = logging.getLogger(__name__)
class FailedTest:
"""Failed tool tests object"""
def __init__(self, id=None, stderr=None, te... | 46.515544 | 125 | 0.596825 |
79482e80a92ef3d4b4eb8511e7801ab2ac27d2a8 | 47,503 | py | Python | tests/test_repository_lib.py | Ajedi32/tuf | 5733e6138a9fdb3e822ad90e920abd5520115a68 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/test_repository_lib.py | Ajedi32/tuf | 5733e6138a9fdb3e822ad90e920abd5520115a68 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/test_repository_lib.py | Ajedi32/tuf | 5733e6138a9fdb3e822ad90e920abd5520115a68 | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
<Program Name>
test_repository_lib.py
<Author>
Vladimir Diaz <vladimir.v.diaz@gmail.com>
<Started>
June 1, 2014.
<Copyright>
See LICENSE for licensing information.
<Purpose>
Unit test for 'repository_lib.py'.
"""
# Help with Python 3 compatibility, where the print statement is ... | 44.395327 | 104 | 0.728607 |
79482eb2779663d4f1f0576e3b12ffe0204dcbe0 | 3,875 | py | Python | yggdrasil/serialize/AsciiMapSerialize.py | cropsinsilico/yggdrasil | 466a4f77605a6f461d57ef7b165a6db7eec4d1fd | [
"BSD-3-Clause"
] | 22 | 2019-02-05T15:20:07.000Z | 2022-02-25T09:00:40.000Z | yggdrasil/serialize/AsciiMapSerialize.py | cropsinsilico/yggdrasil | 466a4f77605a6f461d57ef7b165a6db7eec4d1fd | [
"BSD-3-Clause"
] | 48 | 2019-02-15T20:41:24.000Z | 2022-03-16T20:52:02.000Z | yggdrasil/serialize/AsciiMapSerialize.py | cropsinsilico/yggdrasil | 466a4f77605a6f461d57ef7b165a6db7eec4d1fd | [
"BSD-3-Clause"
] | 16 | 2019-04-27T03:36:40.000Z | 2021-12-02T09:47:06.000Z | import json
from yggdrasil import tools, constants
from yggdrasil.serialize.SerializeBase import SerializeBase
from yggdrasil.metaschema.encoder import JSONReadableEncoder
class AsciiMapSerialize(SerializeBase):
r"""Class for serializing/deserializing name/value mapping.
Args:
delimiter (str, optiona... | 33.695652 | 83 | 0.536 |
79482ebbdb91eaa0dfc76e032666b290623e173a | 351 | py | Python | elcheapoais_tui/screen_syslog.py | innovationgarage/ElCheapoAIS-TUI | c54990cfd2c1f7527e55371fcf166f708f21fc14 | [
"MIT"
] | null | null | null | elcheapoais_tui/screen_syslog.py | innovationgarage/ElCheapoAIS-TUI | c54990cfd2c1f7527e55371fcf166f708f21fc14 | [
"MIT"
] | null | null | null | elcheapoais_tui/screen_syslog.py | innovationgarage/ElCheapoAIS-TUI | c54990cfd2c1f7527e55371fcf166f708f21fc14 | [
"MIT"
] | null | null | null | from . import screen
class SyslogScreen(screen.TextScroll):
def __init__(self, tui):
self.tui = tui
with open("/var/log/syslog") as f:
content = f.read()
content = content.replace(": ", ":\n")
screen.TextScroll.__init__(self, content)
def action(self, value):
... | 27 | 49 | 0.603989 |
79482ee1c81d6aea934ea410a4fe8da9c8dc0315 | 862 | py | Python | adapters/uploader.py | atnartur/backuper | 0d1831720896f82ad67234efcbd4e680382895bc | [
"MIT"
] | 2 | 2018-06-08T20:02:06.000Z | 2018-06-08T20:02:07.000Z | adapters/uploader.py | atnartur/backuper | 0d1831720896f82ad67234efcbd4e680382895bc | [
"MIT"
] | 1 | 2018-01-14T10:25:37.000Z | 2018-01-23T14:58:20.000Z | adapters/uploader.py | atnartur/backuper | 0d1831720896f82ad67234efcbd4e680382895bc | [
"MIT"
] | null | null | null | import logging
import os
import subprocess
import datetime
from app import yadisk_dir, yadisk_token
def upload(local_path, project_name):
for file in os.listdir(local_path):
logging.info(u'Uploading ' + file)
src = os.path.join(local_path, file)
today = '{:%Y-%m-%d}'.format(datetime.date.to... | 35.916667 | 102 | 0.613689 |
79482f1d276702aaccedef2048e73a23eb6792d4 | 10,704 | py | Python | src/pyexam/exam-assistant.py | monkeychen/python-tutorial | a24785da6b4d857200b819ad4d960885b1ef7a20 | [
"Apache-2.0"
] | null | null | null | src/pyexam/exam-assistant.py | monkeychen/python-tutorial | a24785da6b4d857200b819ad4d960885b1ef7a20 | [
"Apache-2.0"
] | null | null | null | src/pyexam/exam-assistant.py | monkeychen/python-tutorial | a24785da6b4d857200b819ad4d960885b1ef7a20 | [
"Apache-2.0"
] | null | null | null | import os
import argparse
import shutil
from datetime import datetime
from openpyxl import load_workbook
from unrar import rarfile
import tkinter as tk
FMT_DEFAULT = "%Y-%m-%d %H:%M:%S"
class Answer(object):
score_conf = [
{"title": "single_choice", "unit": 2},
{"title": "multi_choice", "unit": ... | 39.940299 | 159 | 0.588378 |
7948311ff3a48d660faebd0cf932166d07f7a0a1 | 4,846 | py | Python | setup.py | gcurtis79/OctoPrint-DiscordRemote | 1af667648a5161633f5484f656783cd03858e798 | [
"MIT"
] | null | null | null | setup.py | gcurtis79/OctoPrint-DiscordRemote | 1af667648a5161633f5484f656783cd03858e798 | [
"MIT"
] | null | null | null | setup.py | gcurtis79/OctoPrint-DiscordRemote | 1af667648a5161633f5484f656783cd03858e798 | [
"MIT"
] | null | null | null | # coding=utf-8
import os
from distutils.cmd import Command
class CoverageCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system("python -m coverage run --source octoprint_discordremote/ setup.py test"... | 40.722689 | 140 | 0.698308 |
7948331fbb0765637ab6421132612652e4ed63b1 | 20,709 | py | Python | setup.py | sallysyw/vision | bf073e785528970e6a1605e411e4fc382d686dc7 | [
"BSD-3-Clause"
] | null | null | null | setup.py | sallysyw/vision | bf073e785528970e6a1605e411e4fc382d686dc7 | [
"BSD-3-Clause"
] | null | null | null | setup.py | sallysyw/vision | bf073e785528970e6a1605e411e4fc382d686dc7 | [
"BSD-3-Clause"
] | null | null | null | import distutils.command.clean
import distutils.spawn
import glob
import os
import shutil
import subprocess
import sys
import torch
from pkg_resources import parse_version, get_distribution, DistributionNotFound
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CppExtens... | 38.564246 | 111 | 0.606403 |
794834b3ba1d5bda491c78920ee09c0b2c2c6101 | 2,155 | py | Python | tests/features/cache/test_file_cache.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 1,816 | 2018-02-14T01:59:51.000Z | 2022-03-31T17:09:20.000Z | tests/features/cache/test_file_cache.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 340 | 2018-02-11T00:27:26.000Z | 2022-03-21T12:00:24.000Z | tests/features/cache/test_file_cache.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 144 | 2018-03-18T00:08:16.000Z | 2022-02-26T01:51:58.000Z | from tests import TestCase
import os
import time
class TestFileCache(TestCase):
def setUp(self):
super().setUp()
self.application.make("cache")
self.driver = self.application.make("cache").store()
def test_can_get_file_driver(self):
self.driver.put("key", "value")
self... | 34.758065 | 88 | 0.610673 |
79483625adcecea4c164599a0991c727dbdc532f | 21,289 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/aio/operations/_virtual_network_peerings_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/aio/operations/_virtual_network_peerings_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/aio/operations/_virtual_network_peerings_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # 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 ... | 51.175481 | 250 | 0.684344 |
7948362f72676268b4dd45826089cf36b18b3b67 | 8,020 | py | Python | src/pdftableextract/extracttab.py | ahlusar1989/pdf-table-extractor_saran_version1 | 521e39eda459c0321a4f05a5c44e60dcbd865ec2 | [
"MIT"
] | null | null | null | src/pdftableextract/extracttab.py | ahlusar1989/pdf-table-extractor_saran_version1 | 521e39eda459c0321a4f05a5c44e60dcbd865ec2 | [
"MIT"
] | null | null | null | src/pdftableextract/extracttab.py | ahlusar1989/pdf-table-extractor_saran_version1 | 521e39eda459c0321a4f05a5c44e60dcbd865ec2 | [
"MIT"
] | null | null | null | # Description : PDF Table Extraction Utility
# Original Author : Ian McEwan, Ashima Research.
# Maintainer : ijm
# Lastmod : 20130402 (ijm)
# License : Copyright (C) 2011 Ashima Research. All rights reserved.
# Distributed under the MIT Expat License. See LICENSE file.
# https://gi... | 26.912752 | 80 | 0.470574 |
79483647122868ef53c432320aa50f4b82954a18 | 1,419 | py | Python | validator.py | Zafiyetsiz/tc-kimlilk-no-dogrulama | 4cfb2ba3656660439240cbb776dca33be37dde44 | [
"MIT"
] | 1 | 2022-02-01T19:50:00.000Z | 2022-02-01T19:50:00.000Z | validator.py | Zafiyetsiz/tc-kimlilk-no-dogrulama | 4cfb2ba3656660439240cbb776dca33be37dde44 | [
"MIT"
] | null | null | null | validator.py | Zafiyetsiz/tc-kimlilk-no-dogrulama | 4cfb2ba3656660439240cbb776dca33be37dde44 | [
"MIT"
] | null | null | null | #################################################
#PROJECT 2 : VALIDATOR
#Language :Turkish
#Turkey ID(identification) number validator
#The simplest and the easiest way for validator
#Contact me on ;
#Telegram : Zafiyetsiz0
#Instagram : Zafiyetsiz
#################################################
print("tc... | 15.766667 | 49 | 0.541226 |
794836c7e8b2eecd099044b360b17efea81f0123 | 2,367 | py | Python | ae/modeling_stack.py | snnall/temp | 7742d2efc6bd3a23377c4b865e968019891fd94a | [
"MIT"
] | 1 | 2021-08-11T17:32:54.000Z | 2021-08-11T17:32:54.000Z | ae/modeling_stack.py | snnall/temp | 7742d2efc6bd3a23377c4b865e968019891fd94a | [
"MIT"
] | null | null | null | ae/modeling_stack.py | snnall/temp | 7742d2efc6bd3a23377c4b865e968019891fd94a | [
"MIT"
] | 1 | 2021-12-08T23:20:32.000Z | 2021-12-08T23:20:32.000Z | from aws_cdk import (
aws_sagemaker as sagemaker,
aws_iam as iam,
core
)
class AeModelStack(core.Construct):
def __init__(self, scope: core.Construct, construct_id: str, bucket_name: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
self._PREFIX = construct_id
... | 43.036364 | 122 | 0.630334 |
794836daf7220e39e24f7f05864a9d7b63985306 | 740 | py | Python | HW1/linperceptron.py | miguel-mzbi/MachineLearning-DataMining | d589e89c85ccc7cba129c9a489c49f61a4298c5d | [
"MIT"
] | null | null | null | HW1/linperceptron.py | miguel-mzbi/MachineLearning-DataMining | d589e89c85ccc7cba129c9a489c49f61a4298c5d | [
"MIT"
] | null | null | null | HW1/linperceptron.py | miguel-mzbi/MachineLearning-DataMining | d589e89c85ccc7cba129c9a489c49f61a4298c5d | [
"MIT"
] | null | null | null | # Input: number of iterations L
# numpy matrix X of features, with n rows (samples), d columns (features)
# X[i,j] is the j-th feature of the i-th sample
# numpy vector y of labels, with n rows (samples), 1 column
# y[i] is the label (+1 or -1) of the i-th sample
# Output: numpy vect... | 37 | 80 | 0.536486 |
79483708853e90ac2b92fb95e35dee01fa88aa88 | 2,830 | py | Python | jobs/transforms/topic_validation_test.py | WebFlakyTest/oppia | 520e35490eae8171beb035fbafc2948983abec75 | [
"Apache-2.0"
] | 1 | 2021-08-17T20:33:12.000Z | 2021-08-17T20:33:12.000Z | jobs/transforms/topic_validation_test.py | WebFlakyTest/oppia | 520e35490eae8171beb035fbafc2948983abec75 | [
"Apache-2.0"
] | null | null | null | jobs/transforms/topic_validation_test.py | WebFlakyTest/oppia | 520e35490eae8171beb035fbafc2948983abec75 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2021 The Oppia 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 requi... | 34.096386 | 79 | 0.674205 |
7948376a29750c05e1d2620cd396330a877447cd | 15,891 | py | Python | tensorflow/sample_rnn.py | reachlin/machinelearning | eb8ba02aa0da86ccf9991fa609afa84d8c180a21 | [
"MIT"
] | 11 | 2017-12-05T17:37:18.000Z | 2020-07-01T21:47:31.000Z | tensorflow/sample_rnn.py | reachlin/machinelearning | eb8ba02aa0da86ccf9991fa609afa84d8c180a21 | [
"MIT"
] | null | null | null | tensorflow/sample_rnn.py | reachlin/machinelearning | eb8ba02aa0da86ccf9991fa609afa84d8c180a21 | [
"MIT"
] | 6 | 2017-09-11T12:31:19.000Z | 2020-12-13T16:28:48.000Z | """
Modified from: https://github.com/tensorflow/models/blob/master/tutorials/rnn/ptb/ptb_word_lm.py
RNN with LSTM cells
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import time
import numpy as np
import tensorflow as tf
import reader
import util
f... | 33.667373 | 96 | 0.672771 |
7948383eecc62f71e8f02cfc433f9d7bb88e7d71 | 26,950 | py | Python | test/functional/test_framework/test_framework.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | adgeese/gbcr | 51145945d78c588f3ec3dc8595e14b1faea1a4e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Gold BCR Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
import configparser
from enum import Enum
import logging
import argpar... | 42.241379 | 312 | 0.626716 |
794838e32a0b850ea0c89cbf88d989889fc0932a | 18,344 | py | Python | macOS/bee1.app/Contents/Resources/python/lib/python3.6/test/test_sysconfig.py | leewonmoh/macrepo1 | d8f15145fac127c1c7294f01ad39187f76b76ac2 | [
"BSD-3-Clause"
] | null | null | null | macOS/bee1.app/Contents/Resources/python/lib/python3.6/test/test_sysconfig.py | leewonmoh/macrepo1 | d8f15145fac127c1c7294f01ad39187f76b76ac2 | [
"BSD-3-Clause"
] | null | null | null | macOS/bee1.app/Contents/Resources/python/lib/python3.6/test/test_sysconfig.py | leewonmoh/macrepo1 | d8f15145fac127c1c7294f01ad39187f76b76ac2 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import sys
import os
import subprocess
import shutil
from copy import copy
from test.support import (run_unittest,
import_module, TESTFN, unlink, check_warnings,
captured_stdout, skip_unless_symlink, change_cwd)
import sysconfig
from sysconfig import... | 40.855234 | 97 | 0.576973 |
7948391e65caca57a0a7cbd6aad771064574cfd2 | 1,259 | py | Python | 2018/12-35C3/rev-boxofblink/extract_change.py | wani-hackase/wani-writeup | dd4ad0607d2f2193ad94c1ce65359294aa591681 | [
"MIT"
] | 25 | 2019-03-06T11:55:56.000Z | 2021-05-21T22:07:14.000Z | 2018/12-35C3/rev-boxofblink/extract_change.py | wani-hackase/wani-writeup | dd4ad0607d2f2193ad94c1ce65359294aa591681 | [
"MIT"
] | 1 | 2020-06-25T07:27:15.000Z | 2020-06-25T07:27:15.000Z | 2018/12-35C3/rev-boxofblink/extract_change.py | wani-hackase/wani-writeup | dd4ad0607d2f2193ad94c1ce65359294aa591681 | [
"MIT"
] | 1 | 2019-02-14T00:42:28.000Z | 2019-02-14T00:42:28.000Z | import sys
ignores = [0]
if len(sys.argv) != 2:
print("usage: %s [filename]" % (sys.argv[0]))
sys.exit(0)
fp = open(sys.argv[1])
line = fp.readline()
if line == "":
sys.exit()
items = line.split(',')
pre_values = []
for i in range(len(items)):
if i == 0:
pre_values.append(float(items[i... | 19.984127 | 60 | 0.481334 |
79483a18ade49b9e3a6aee2e2162b3123a115e42 | 536 | py | Python | python/en/_numpy/1.Quickstart_tutorial-1.The_Basics-1.An_eample.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/1.Quickstart_tutorial-1.The_Basics-1.An_eample.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/1.Quickstart_tutorial-1.The_Basics-1.An_eample.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # 1.Quickstart_tutorial-1.The_Basics-1.An_eample.py
#
# https://docs.scipy.org/doc/numpy/user/quickstart.html
# The Basics - An example
import numpy as np
a = np.arange(15).reshape(3,5)
#>>> a
#array([[ 0, 1, 2, 3, 4],
# [ 5, 6, 7, 8, 9],
# [10, 11, 12, 13, 14]])
print( a.shape )
#(3, 5)
print( ... | 14.486486 | 55 | 0.576493 |
79483a35bdc84873fcf5a12328b21093cd96f7de | 2,818 | py | Python | modules/dense_correspondence_manipulation/scripts/render_depth_images.py | masato-ka/pytorch-dense-correspondence | 89a5f87fd773b210e93ebcfeb945c95e7417d0e9 | [
"BSD-3-Clause"
] | null | null | null | modules/dense_correspondence_manipulation/scripts/render_depth_images.py | masato-ka/pytorch-dense-correspondence | 89a5f87fd773b210e93ebcfeb945c95e7417d0e9 | [
"BSD-3-Clause"
] | null | null | null | modules/dense_correspondence_manipulation/scripts/render_depth_images.py | masato-ka/pytorch-dense-correspondence | 89a5f87fd773b210e93ebcfeb945c95e7417d0e9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env directorPython
import os
import argparse
import dense_correspondence_manipulation.change_detection.change_detection as change_detection
import dense_correspondence_manipulation.utils.utils as utils
from dense_correspondence_manipulation.utils.constants import *
from director.timercallback import TimerC... | 32.767442 | 144 | 0.71895 |
79483a4f66726810a694c4724567c8f5afb59f81 | 801 | py | Python | setup.py | cosmodesi/cosmoprimo | a0d466418f6f5af80d446627109ce11bfb46f8b5 | [
"BSD-3-Clause"
] | 2 | 2022-01-07T12:20:01.000Z | 2022-01-22T20:34:03.000Z | setup.py | cosmodesi/cosmoprimo | a0d466418f6f5af80d446627109ce11bfb46f8b5 | [
"BSD-3-Clause"
] | null | null | null | setup.py | cosmodesi/cosmoprimo | a0d466418f6f5af80d446627109ce11bfb46f8b5 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
from setuptools import setup
package_basename = 'cosmoprimo'
sys.path.insert(0, os.path.join(os.path.dirname(__file__), package_basename))
import _version
version = _version.__version__
setup(name=package_basename,
version=version,
author='cosmodesi',
author_email='',
de... | 34.826087 | 166 | 0.689139 |
79483b8d34fe4614b51e1546b30fce56c91fb036 | 469 | py | Python | newsletters/migrations/0007_addemail_email.py | Juanvulcano/gci15_email | 85f7133d3b539f14a56fedf7f2fc1987844d60e5 | [
"MIT"
] | null | null | null | newsletters/migrations/0007_addemail_email.py | Juanvulcano/gci15_email | 85f7133d3b539f14a56fedf7f2fc1987844d60e5 | [
"MIT"
] | null | null | null | newsletters/migrations/0007_addemail_email.py | Juanvulcano/gci15_email | 85f7133d3b539f14a56fedf7f2fc1987844d60e5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('newsletters', '0006_auto_20151218_2026'),
]
operations = [
migrations.AddField(
model_name='addemail',
... | 22.333333 | 78 | 0.609808 |
79483bd4abdf264f0227f9a8098f52cb79513113 | 862 | py | Python | find-peak-element/Solution.17532630.py | rahul-ramadas/leetcode | 6c84c2333a613729361c5cdb63dc3fc80203b340 | [
"MIT"
] | null | null | null | find-peak-element/Solution.17532630.py | rahul-ramadas/leetcode | 6c84c2333a613729361c5cdb63dc3fc80203b340 | [
"MIT"
] | 1 | 2016-09-11T22:26:17.000Z | 2016-09-13T01:49:48.000Z | find-peak-element/Solution.17532630.py | rahul-ramadas/leetcode | 6c84c2333a613729361c5cdb63dc3fc80203b340 | [
"MIT"
] | null | null | null | class Solution:
def getElement(self, num, index):
if index < 0 or index >= len(num):
return float('-inf')
return num[index]
def findPeakElement(self, num):
lower_bound = 0
upper_bound = len(num)
while True:
middle_index = (upper_... | 29.724138 | 60 | 0.523202 |
79483cc458b21dc3623f764d8f423f9991e16bc0 | 10,789 | py | Python | projects/faster_rcnn_swin_transformer/train_net_swint_full_reso.py | cenchaojun/detectron2 | 03ca41a6873bb641764c4762d40d355f215e7ad9 | [
"Apache-2.0"
] | null | null | null | projects/faster_rcnn_swin_transformer/train_net_swint_full_reso.py | cenchaojun/detectron2 | 03ca41a6873bb641764c4762d40d355f215e7ad9 | [
"Apache-2.0"
] | null | null | null | projects/faster_rcnn_swin_transformer/train_net_swint_full_reso.py | cenchaojun/detectron2 | 03ca41a6873bb641764c4762d40d355f215e7ad9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
"""
Detection Training Script.
This scripts reads a given config file and runs the training or evaluation.
It is an entry point that is made to train standard models in detectron2.
In order to let one script support training of many models,
this s... | 41.817829 | 171 | 0.668644 |
79483d18d26a548c0be9d4b3b9470efd1cad068a | 28,287 | py | Python | pysnmp/DELL-NETWORKING-OPENFLOW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/DELL-NETWORKING-OPENFLOW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/DELL-NETWORKING-OPENFLOW-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DELL-NETWORKING-OPENFLOW-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DELL-NETWORKING-OPENFLOW-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:22:42 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python vers... | 132.182243 | 3,386 | 0.752183 |
79483da989ae5d26cd8be4940125ef867182c156 | 831 | py | Python | rpcservices.py | The-Yak-Collective/iamz1 | 52d8397abcf109cda1bb87955e1179bc6db60e56 | [
"MIT"
] | null | null | null | rpcservices.py | The-Yak-Collective/iamz1 | 52d8397abcf109cda1bb87955e1179bc6db60e56 | [
"MIT"
] | 8 | 2021-02-16T19:25:19.000Z | 2021-05-07T10:59:59.000Z | rpcservices.py | The-Yak-Collective/iamz1 | 52d8397abcf109cda1bb87955e1179bc6db60e56 | [
"MIT"
] | 1 | 2021-12-06T14:22:35.000Z | 2021-12-06T14:22:35.000Z | import servo_util
import xmlrpc.client
import json
PORTFORLOGGING=9501 # later we will make this an env variable. for now, use 9500-9550
PORTFORLEGS=9502 #position of each servo
PORTFORRAG=9503 #send rag commands here
logging = xmlrpc.client.ServerProxy('http://localhost:'+str(PORTFORLOGGING))
def log_start(command):... | 29.678571 | 107 | 0.747292 |
79483ebc1b92e758fe1437f325b3ab927cdcd0c2 | 6,267 | py | Python | netket/hilbert/homogeneous.py | pesvut/netket | 7f19574ddc567748344bb75a4ddd507578d94b0d | [
"Apache-2.0"
] | 352 | 2018-04-24T16:45:10.000Z | 2022-03-31T01:15:34.000Z | netket/hilbert/homogeneous.py | pesvut/netket | 7f19574ddc567748344bb75a4ddd507578d94b0d | [
"Apache-2.0"
] | 947 | 2018-04-24T20:16:17.000Z | 2022-03-31T17:33:52.000Z | netket/hilbert/homogeneous.py | pesvut/netket | 7f19574ddc567748344bb75a4ddd507578d94b0d | [
"Apache-2.0"
] | 148 | 2018-04-25T02:44:20.000Z | 2022-03-11T11:42:34.000Z | # Copyright 2021 The NetKet 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 ... | 32.304124 | 88 | 0.643849 |
79483efb5e8bdc54697b393be04055b339e883ec | 2,500 | py | Python | machine_learning/logistic_regression.py | devanshpratapsingh/Python | 5327f54512a35fa8c55a83499d56875abbde633c | [
"MIT"
] | null | null | null | machine_learning/logistic_regression.py | devanshpratapsingh/Python | 5327f54512a35fa8c55a83499d56875abbde633c | [
"MIT"
] | null | null | null | machine_learning/logistic_regression.py | devanshpratapsingh/Python | 5327f54512a35fa8c55a83499d56875abbde633c | [
"MIT"
] | null | null | null | #!/usr/bin/python
## Logistic Regression from scratch
# In[62]:
# In[63]:
# importing all the required libraries
""" Implementing logistic regression for classification problem
Helpful resources :
1.Coursera ML course
2.https://medium.com/@martinpella/logistic-regression-from-scratch-in-python-... | 28.735632 | 99 | 0.6212 |
79483ff64bb972c4ad5eec4c110a901d23a421b6 | 1,338 | py | Python | graph4nlp/pytorch/modules/config/graph_embedding/__init__.py | stjordanis/graph4nlp | c6ebde32bc77d3a7b78f86a93f19b1c057963ffa | [
"Apache-2.0"
] | 1 | 2021-06-06T15:23:11.000Z | 2021-06-06T15:23:11.000Z | graph4nlp/pytorch/modules/config/graph_embedding/__init__.py | stjordanis/graph4nlp | c6ebde32bc77d3a7b78f86a93f19b1c057963ffa | [
"Apache-2.0"
] | null | null | null | graph4nlp/pytorch/modules/config/graph_embedding/__init__.py | stjordanis/graph4nlp | c6ebde32bc77d3a7b78f86a93f19b1c057963ffa | [
"Apache-2.0"
] | 1 | 2021-11-01T08:41:26.000Z | 2021-11-01T08:41:26.000Z | from ....modules.utils.config_utils import get_yaml_config
import os
str2yaml = {"gat": "gat.yaml", "gcn": "gcn.yaml", "ggnn": "ggnn.yaml", "graphsage": "graphsage.yaml"}
dir_path = os.path.dirname(os.path.realpath(__file__))
def get_graph_embedding_args(graph_embedding_name):
"""
It will build the templ... | 35.210526 | 109 | 0.647235 |
7948411da0222f4375779780f0f63f498d8c6e8e | 32,242 | py | Python | 739. Daily Temperatures.py | Nriver/leetcode | e0b30fae8a31513172fcbd13d67eded8922ba785 | [
"MIT"
] | null | null | null | 739. Daily Temperatures.py | Nriver/leetcode | e0b30fae8a31513172fcbd13d67eded8922ba785 | [
"MIT"
] | null | null | null | 739. Daily Temperatures.py | Nriver/leetcode | e0b30fae8a31513172fcbd13d67eded8922ba785 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: zengjq
# @Date: 2020-03-04 14:04:58
# @Last Modified by: zengjq
# @Last Modified time: 2020-03-04 15:04:19
class Solution:
# 超时
# 应该是那个pop操作的问题
# 该怎么优化?
# def dailyTemperatures(self, T: List[int]) -> List[int]:
def dailyTemperatures1(self, T):
stack_p... | 418.727273 | 30,009 | 0.655449 |
79484234e7a1e3ea0121b4917ce180993792d5e6 | 844 | py | Python | codewars/7 kyu/disemvowel-trolls.py | sirken/coding-practice | 9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab | [
"MIT"
] | null | null | null | codewars/7 kyu/disemvowel-trolls.py | sirken/coding-practice | 9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab | [
"MIT"
] | null | null | null | codewars/7 kyu/disemvowel-trolls.py | sirken/coding-practice | 9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab | [
"MIT"
] | null | null | null | from Test import Test, Test as test
'''
Trolls are attacking your comment section!
A common way to deal with this situation is to remove all of the vowels from the trolls' comments, neutralizing the threat.
Your task is to write a function that takes a string and return a new string with all vowels removed.
For exa... | 35.166667 | 123 | 0.71564 |
794842602178d2661146025f3f1ec6da1f1c1dba | 12,738 | py | Python | neurokit2/bio/bio_analyze.py | BelleJohn/neuropsychology-NeuroKit | d01111b9b82364d28da01c002e6cbfc45d9493d9 | [
"MIT"
] | 1 | 2022-03-05T06:15:02.000Z | 2022-03-05T06:15:02.000Z | neurokit2/bio/bio_analyze.py | BelleJohn/neuropsychology-NeuroKit | d01111b9b82364d28da01c002e6cbfc45d9493d9 | [
"MIT"
] | null | null | null | neurokit2/bio/bio_analyze.py | BelleJohn/neuropsychology-NeuroKit | d01111b9b82364d28da01c002e6cbfc45d9493d9 | [
"MIT"
] | 2 | 2021-12-25T15:39:49.000Z | 2021-12-25T15:44:16.000Z | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
from ..ecg import ecg_analyze
from ..eda import eda_analyze
from ..emg import emg_analyze
from ..eog import eog_analyze
from ..hrv import hrv_rsa
from ..ppg import ppg_analyze
from ..rsp import rsp_analyze
def bio_analyze(data, sampling_rate=1000, method... | 40.310127 | 117 | 0.608808 |
794843c51557f5c5d149976c1af4105afdb96f53 | 1,682 | py | Python | typings/bpy/ops/brush.py | Argmaster/PyR3 | 6786bcb6a101fe4bd4cc50fe43767b8178504b15 | [
"MIT"
] | 2 | 2021-12-12T18:51:52.000Z | 2022-02-23T09:49:16.000Z | typings/bpy/ops/brush.py | Argmaster/PyR3 | 6786bcb6a101fe4bd4cc50fe43767b8178504b15 | [
"MIT"
] | 2 | 2021-11-08T12:09:02.000Z | 2021-12-12T23:01:12.000Z | typings/bpy/ops/brush.py | Argmaster/PyR3 | 6786bcb6a101fe4bd4cc50fe43767b8178504b15 | [
"MIT"
] | null | null | null | import sys
import typing
def add():
''' Add brush by mode type
'''
pass
def add_gpencil():
''' Add brush for Grease Pencil
'''
pass
def curve_preset(shape: typing.Union[str, int] = 'SMOOTH'):
''' Set brush shape
:param shape: Mode
:type shape: typing.Union[str, int]
''... | 19.55814 | 90 | 0.618312 |
79484555fd9df5b1c0a7cbcd38f1c440d8ee1daa | 9,997 | py | Python | src/index.py | Aquila-Network/AquilaX-CE | 9aa6b076e83892ececaa23970609ae7045aa6699 | [
"MIT"
] | null | null | null | src/index.py | Aquila-Network/AquilaX-CE | 9aa6b076e83892ececaa23970609ae7045aa6699 | [
"MIT"
] | 1 | 2021-05-13T09:28:09.000Z | 2021-05-13T09:28:09.000Z | src/index.py | Aquila-Network/AquilaX-CE | 9aa6b076e83892ececaa23970609ae7045aa6699 | [
"MIT"
] | null | null | null | import logging
from flask import Flask, request
from flask_cors import CORS
from functools import wraps
import html_cleanup as chtml
from services import logging as slog
slogging_session = slog.create_session()
from aquilapy import Wallet, DB, Hub
app = Flask(__name__, instance_relative_config=True)
# Create a wa... | 26.101828 | 222 | 0.591778 |
7948467f6893a503dcefd354cc6ca4e0f9e7dbef | 1,475 | py | Python | python/example_code/cloudwatch/delete_alarms.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 12 | 2020-07-28T01:20:15.000Z | 2021-12-10T10:52:49.000Z | python/example_code/cloudwatch/delete_alarms.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 5 | 2021-12-10T01:52:47.000Z | 2022-01-04T16:47:45.000Z | python/example_code/cloudwatch/delete_alarms.py | gabehollombe-aws/aws-doc-sdk-examples | dfc0e06ebe1762ab127f3ef5f425507644c6a99c | [
"Apache-2.0"
] | 5 | 2020-08-29T14:01:38.000Z | 2021-11-18T07:11:49.000Z | # Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license"... | 35.97561 | 133 | 0.750508 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.