hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6d8068c9364f27bb4d498f501d938a07124dbd6a | 3,984 | py | Python | tests/test_utils.py | kssim/requester | bd0974e65d7e895d8d7b50241153e13147396903 | [
"MIT"
] | 3 | 2017-09-05T06:27:40.000Z | 2017-09-05T07:09:33.000Z | tests/test_utils.py | kssim/requester | bd0974e65d7e895d8d7b50241153e13147396903 | [
"MIT"
] | null | null | null | tests/test_utils.py | kssim/requester | bd0974e65d7e895d8d7b50241153e13147396903 | [
"MIT"
] | 2 | 2018-04-13T02:11:02.000Z | 2020-08-16T01:19:25.000Z | # -*- coding: utf-8 -*-
import pytest
from requester.utils import (
make_host, make_request_url, make_dumy_body, make_ellipsis
)
class TestMakeHost(object):
@pytest.mark.parametrize("headers, dst_ip, expected", [
({}, "8.8.8.8", "8.8.8.8"),
({"Host":"http://test.com"}, "8.8.8.8", "h... | 41.072165 | 72 | 0.523092 |
a088f7c02673d8cd1aa1aa1b9a28f27ea04e8039 | 12,419 | py | Python | qa/rpc-tests/smartfees.py | anders94/mitcoin | f759d0a62cd109954488277b83d146f5d0d11562 | [
"MIT"
] | 2 | 2017-09-23T03:50:16.000Z | 2018-01-23T08:00:25.000Z | qa/rpc-tests/smartfees.py | anders94/mitcoin | f759d0a62cd109954488277b83d146f5d0d11562 | [
"MIT"
] | null | null | null | qa/rpc-tests/smartfees.py | anders94/mitcoin | f759d0a62cd109954488277b83d146f5d0d11562 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The mitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test fee estimation code
#
from test_framework.test_framework import mitcoinTestFramework
from test_... | 47.949807 | 110 | 0.648603 |
c89d46353e4e782861d02e3709d306059ad5990e | 3,200 | py | Python | selfdrive/manager/process_config.py | birdman6450/openpilot | 2429f86bed65cca163122ac9f7a0c1d53597d463 | [
"MIT"
] | 1 | 2021-01-12T01:38:25.000Z | 2021-01-12T01:38:25.000Z | selfdrive/manager/process_config.py | birdman6450/openpilot | 2429f86bed65cca163122ac9f7a0c1d53597d463 | [
"MIT"
] | null | null | null | selfdrive/manager/process_config.py | birdman6450/openpilot | 2429f86bed65cca163122ac9f7a0c1d53597d463 | [
"MIT"
] | null | null | null | import os
from selfdrive.manager.process import PythonProcess, NativeProcess, DaemonProcess
from selfdrive.hardware import EON, TICI, PC, JETSON
from common.params import Params
JETSON = JETSON or Params().get_bool('dp_jetson')
WEBCAM = os.getenv("USE_WEBCAM") is not None
MIPI = os.getenv("USE_MIPI") is not None
pro... | 60.377358 | 142 | 0.744688 |
99851df697c659c6aa694aeb591ceea52c4b28fe | 7,468 | py | Python | mdslib/_fabric.py | akshatha-s13/mdsLib-1 | 339a5fb9606d4cac85055c97a229c690b4438d42 | [
"Apache-2.0"
] | null | null | null | mdslib/_fabric.py | akshatha-s13/mdsLib-1 | 339a5fb9606d4cac85055c97a229c690b4438d42 | [
"Apache-2.0"
] | null | null | null | mdslib/_fabric.py | akshatha-s13/mdsLib-1 | 339a5fb9606d4cac85055c97a229c690b4438d42 | [
"Apache-2.0"
] | 1 | 2020-05-05T06:56:22.000Z | 2020-05-05T06:56:22.000Z | __author__ = 'Suhas Bharadwaj (subharad)'
import logging
import threading
from functools import wraps
from .switch import Switch
log = logging.getLogger(__name__)
def wait_till_connect_threads_complete(fn):
"""
Decorator which will check if all the threads are complete by doing a join
:param fn: Functi... | 39.305263 | 132 | 0.589314 |
efe5fa8ee1db432a18fe7a8a45dd2044ac490d3c | 28,457 | py | Python | object_detection/protos/losses_pb2.py | taylormcnally/AniSeg | 51f8f8a76d3667fae3a35ec2e348bbc227d77436 | [
"Apache-2.0"
] | 223 | 2018-03-25T04:40:56.000Z | 2022-03-31T12:24:38.000Z | dink/src/tf_server/src/object_detection/protos/losses_pb2.py | 920911love/DINK | d760ea99f21c4d6334ff5f517b49c4fdfca32399 | [
"BSD-3-Clause"
] | 22 | 2018-04-19T20:11:54.000Z | 2021-08-22T07:58:50.000Z | dink/src/tf_server/src/object_detection/protos/losses_pb2.py | 920911love/DINK | d760ea99f21c4d6334ff5f517b49c4fdfca32399 | [
"BSD-3-Clause"
] | 94 | 2018-04-09T07:00:15.000Z | 2022-02-13T22:35:23.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/losses.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf impo... | 43.645706 | 2,905 | 0.783147 |
f6e8ee63c5167ddd5228ca33d7467e9bf803fba3 | 590 | py | Python | rocketgram/api/web_app_data.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 16 | 2019-02-27T20:15:52.000Z | 2019-08-06T10:59:41.000Z | rocketgram/api/web_app_data.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 1 | 2019-04-27T06:51:57.000Z | 2019-05-31T18:09:16.000Z | rocketgram/api/web_app_data.py | rocketbots/rocketgram | e509dcfad85d47a2449caf6dd302ec8581f95bf6 | [
"MIT"
] | 3 | 2019-03-19T16:01:22.000Z | 2019-04-05T15:58:12.000Z | # Copyright (C) 2015-2022 by Vd.
# This file is part of Rocketgram, the modern Telegram bot framework.
# Rocketgram is released under the MIT License (see LICENSE).
from dataclasses import dataclass
from typing import Optional
@dataclass(frozen=True)
class WebAppData:
"""\
Represents WebAppData object:
... | 22.692308 | 69 | 0.676271 |
a47cf2b1d8e20a959d893e38cea9835391a975f5 | 8,799 | py | Python | applications/ShapeOptimizationApplication/python_scripts/loggers/data_logger_factory.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 778 | 2017-01-27T16:29:17.000Z | 2022-03-30T03:01:51.000Z | applications/ShapeOptimizationApplication/python_scripts/loggers/data_logger_factory.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 6,634 | 2017-01-15T22:56:13.000Z | 2022-03-31T15:03:36.000Z | applications/ShapeOptimizationApplication/python_scripts/loggers/data_logger_factory.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 224 | 2017-02-07T14:12:49.000Z | 2022-03-06T23:09:34.000Z | # ==============================================================================
# KratosShapeOptimizationApplication
#
# License: BSD License
# license: ShapeOptimizationApplication/license.txt
#
# Main authors: Baumgaertner Daniel, https://github.com/dbaumgaertner
# G... | 54.652174 | 165 | 0.631322 |
45db5a162286ff1ab7394b4389ba3313203a8b84 | 87 | py | Python | src/functions/addition.py | Parikshit-njit/Calculator--IS601 | a2a56a5bf97269fd8e480b36ff08c37136bba5b9 | [
"MIT"
] | 1 | 2021-07-07T22:49:49.000Z | 2021-07-07T22:49:49.000Z | src/functions/addition.py | Parikshit-njit/Calculator--IS601 | a2a56a5bf97269fd8e480b36ff08c37136bba5b9 | [
"MIT"
] | null | null | null | src/functions/addition.py | Parikshit-njit/Calculator--IS601 | a2a56a5bf97269fd8e480b36ff08c37136bba5b9 | [
"MIT"
] | null | null | null | class Addition:
@staticmethod
def add(a, b):
c = a + b
return c | 17.4 | 18 | 0.494253 |
fd5d68d56da654a5b80708e9b64592906281edeb | 4,045 | py | Python | src/probnum/diffeq/steprule.py | nathanaelbosch/probnum | 6a0557395da4bd83ab292904a04d09a813dc0c9d | [
"MIT"
] | null | null | null | src/probnum/diffeq/steprule.py | nathanaelbosch/probnum | 6a0557395da4bd83ab292904a04d09a813dc0c9d | [
"MIT"
] | null | null | null | src/probnum/diffeq/steprule.py | nathanaelbosch/probnum | 6a0557395da4bd83ab292904a04d09a813dc0c9d | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
import numpy as np
class StepRule(ABC):
"""(Adaptive) step size rules for ODE solvers."""
def __init__(self, firststep):
self.firststep = firststep
@abstractmethod
def suggest(self, laststep, errorest, localconvrate=None):
"""Suggest a new step h_... | 33.155738 | 114 | 0.647219 |
cf11b6096318c5e0f704d17781261a2e50ee8e85 | 196,578 | py | Python | env/lib/python3.7/site-packages/numpy/ma/tests/test_core.py | MarcoMancha/BreastCancerDetector | be0dfdcebd1ae66da6d0cf48e2525c24942ae877 | [
"Apache-2.0"
] | 99 | 2019-10-09T16:14:46.000Z | 2022-03-17T02:23:47.000Z | env/lib/python3.7/site-packages/numpy/ma/tests/test_core.py | MarcoMancha/BreastCancerDetector | be0dfdcebd1ae66da6d0cf48e2525c24942ae877 | [
"Apache-2.0"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | env/lib/python3.7/site-packages/numpy/ma/tests/test_core.py | MarcoMancha/BreastCancerDetector | be0dfdcebd1ae66da6d0cf48e2525c24942ae877 | [
"Apache-2.0"
] | 98 | 2019-10-17T14:48:28.000Z | 2022-01-21T03:33:38.000Z | # pylint: disable-msg=W0400,W0511,W0611,W0612,W0614,R0201,E1102
"""Tests suite for MaskedArray & subclassing.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
"""
from __future__ import division, absolute_import, print_function
__author__ = "Pierre GF Gerard-Marchant"
import sys
import warnings
impo... | 37.658621 | 86 | 0.518563 |
dd0f288c65fefccc8d075a77070cba099775961c | 3,305 | py | Python | python/locnet/distance_accuracy.py | luolongqiang/caffe-luolongqiang | 5ee132e4451a538d97b62039a62a59a69dc43bb9 | [
"BSD-2-Clause"
] | 2 | 2017-03-23T04:19:31.000Z | 2019-07-05T02:31:04.000Z | python/locnet/distance_accuracy.py | luolongqiang/caffe-luolongqiang | 5ee132e4451a538d97b62039a62a59a69dc43bb9 | [
"BSD-2-Clause"
] | null | null | null | python/locnet/distance_accuracy.py | luolongqiang/caffe-luolongqiang | 5ee132e4451a538d97b62039a62a59a69dc43bb9 | [
"BSD-2-Clause"
] | 1 | 2018-10-11T06:07:19.000Z | 2018-10-11T06:07:19.000Z | import sys
import os.path as osp
import numpy as np
this_dir = osp.dirname(__file__)
caffe_path = osp.join(this_dir, '..')
sys.path.insert(0, caffe_path)
import caffe
class DistanceAccuracyLayer(caffe.Layer):
def setup(self, bottom, top):
if len(bottom) != 2:
raise Exception('Need to define ... | 37.556818 | 93 | 0.601815 |
48ffc30deab76747754a516f9dcf31d07e5f540f | 6,952 | py | Python | generated-libraries/python/netapp/options/__init__.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/options/__init__.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/options/__init__.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | from netapp.connection import NaConnection
from options_modify_iter_info import OptionsModifyIterInfo # 3 properties
from option_info import OptionInfo # 8 properties
from options_modify_iter_key_td import OptionsModifyIterKeyTd # 2 properties
from options_get_iter_key_td import OptionsGetIterKeyTd # 2 properties
clas... | 46.657718 | 183 | 0.587169 |
3558860dc7f2471927f9eeae73f9d0b0a068d160 | 35,764 | py | Python | lib/rucio/web/rest/flaskapi/v1/replica.py | sahiljajodia01/rucio | e8c957953b0864c0f4e1e27678efdf3aef2b2df1 | [
"Apache-2.0"
] | 1 | 2019-03-04T09:09:42.000Z | 2019-03-04T09:09:42.000Z | lib/rucio/web/rest/flaskapi/v1/replica.py | pujanm/rucio | 355a997a5ea213c427a5d841ab151ceb01073eb4 | [
"Apache-2.0"
] | null | null | null | lib/rucio/web/rest/flaskapi/v1/replica.py | pujanm/rucio | 355a997a5ea213c427a5d841ab151ceb01073eb4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2012-2018 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
... | 42.025852 | 181 | 0.606224 |
b807a30b10ed4227a7c3e2d6ed5921bd5daaac25 | 2,153 | py | Python | __scraping__/nfl.com - requests/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | __scraping__/nfl.com - requests/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | __scraping__/nfl.com - requests/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z | #!/usr/bin/env python3
import requests
url = 'https://api.nfl.com/v3/shield/?query=%20query%20%7B%20viewer%20%7B%20standings(first%3A1%2CorderBy%3Aweek__weekValue%2CorderByDirection%3ADESC%2Cweek_seasonValue%3A2016%2Cweek_seasonType%3AREG%2C)%20%7B%20edges%20%7B%20cursor%20node%20%7B%20id%20teamRecords%20%7B%20confer... | 46.804348 | 836 | 0.735718 |
7a1d9beb3c52857be7ccdaa0f418f24ae165842e | 982 | py | Python | release/stubs.min/Autodesk/Revit/DB/__init___parts/PointOnEdgeEdgeIntersection.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/PointOnEdgeEdgeIntersection.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/PointOnEdgeEdgeIntersection.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class PointOnEdgeEdgeIntersection(PointElementReference):
"""
Define a ReferencePoint at the intersection of two
referenceable lines.
"""
def GetEdgeReference1(self):
"""
GetEdgeReference1(self: PointOnEdgeEdgeIntersection) -> Reference
Get a copy of the first edge or curve r... | 22.837209 | 80 | 0.663951 |
557a8c06632bbfa5a3e04ba7ba09db9f77632f38 | 768 | py | Python | app/migrations/0003_playlist.py | kindweb223/React-Django-M3U8 | ee3edfabcf4e4423e96591df7cf42f8d89813292 | [
"Apache-2.0"
] | 1 | 2020-12-28T07:54:05.000Z | 2020-12-28T07:54:05.000Z | app/migrations/0003_playlist.py | kindweb223/React-Django-M3U8 | ee3edfabcf4e4423e96591df7cf42f8d89813292 | [
"Apache-2.0"
] | 11 | 2020-06-05T17:35:01.000Z | 2022-02-26T07:00:16.000Z | app/migrations/0003_playlist.py | kindweb223/React-Django-M3U8 | ee3edfabcf4e4423e96591df7cf42f8d89813292 | [
"Apache-2.0"
] | 1 | 2021-11-02T11:35:45.000Z | 2021-11-02T11:35:45.000Z | # Generated by Django 2.0.1 on 2018-01-05 21:39
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('app', '0002_auto_2018010... | 30.72 | 118 | 0.640625 |
e6b939c5475f742c04eb5cb10a09c76bb57d1242 | 565 | py | Python | news/migrations/0003_news_authors.py | 18F/acquisitions.18f.gov | 7ef7091fd65b4b6797ddeb1c1f56def29522c43b | [
"CC0-1.0"
] | 3 | 2016-11-27T05:02:52.000Z | 2017-01-31T17:36:36.000Z | news/migrations/0003_news_authors.py | 18F/acquisitions.18f.gov | 7ef7091fd65b4b6797ddeb1c1f56def29522c43b | [
"CC0-1.0"
] | 61 | 2016-11-05T00:27:34.000Z | 2017-09-15T23:37:58.000Z | news/migrations/0003_news_authors.py | 18F/acquisitions.18f.gov | 7ef7091fd65b4b6797ddeb1c1f56def29522c43b | [
"CC0-1.0"
] | 2 | 2017-07-14T06:21:26.000Z | 2021-02-14T11:53:05.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-26 00:23
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | 24.565217 | 70 | 0.658407 |
0897724e0f4e57ed5f27671b034463b58245e98b | 158 | py | Python | apps/user/apps.py | wychmod/Taro-Education | 869852b33c06f6eb2c06191c4544e74db9eba8ce | [
"Apache-2.0"
] | 1 | 2020-04-14T16:50:04.000Z | 2020-04-14T16:50:04.000Z | apps/user/apps.py | wychmod/Taro-Education | 869852b33c06f6eb2c06191c4544e74db9eba8ce | [
"Apache-2.0"
] | 3 | 2021-03-10T14:51:26.000Z | 2022-02-27T03:03:10.000Z | apps/user/apps.py | wychmod/Taro-Education | 869852b33c06f6eb2c06191c4544e74db9eba8ce | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class UserConfig(AppConfig):
name = 'user'
verbose_name = "用户"
def ready(self):
import user.signals
| 14.363636 | 33 | 0.658228 |
b4989e54e6a42bc65e662564966bccce6b88a7af | 9,777 | py | Python | dali/python/nvidia/dali/plugin/batch_util.py | msr-fiddle/CoorDL | faa1bb84d99e7c0eea040182800eb250705e9fae | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2021-03-16T05:09:16.000Z | 2022-03-29T12:48:44.000Z | dali/python/nvidia/dali/plugin/batch_util.py | msr-fiddle/CoorDL | faa1bb84d99e7c0eea040182800eb250705e9fae | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | dali/python/nvidia/dali/plugin/batch_util.py | msr-fiddle/CoorDL | faa1bb84d99e7c0eea040182800eb250705e9fae | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-05-08T16:51:55.000Z | 2021-07-22T09:02:44.000Z | r""""Contains definitions of the methods used by the _DataLoaderIter to put
fetched tensors into pinned memory.
These **needs** to be in global scope since Py2 doesn't support serializing
static methods.
"""
import torch
#import Queue
from torch._six import queue, container_abcs, string_classes
#from torch._utils imp... | 45.686916 | 283 | 0.590979 |
66f6c60bb8981b2a0b588c48409968c0374a6940 | 5,767 | py | Python | models/bert/__main__.py | SurgicalAI/Docs-Class | 98634d38be427d5870e9e563b0771f7a83e23c45 | [
"Apache-2.0"
] | 512 | 2019-03-21T15:27:36.000Z | 2022-03-29T15:17:35.000Z | models/bert/__main__.py | SurgicalAI/Docs-Class | 98634d38be427d5870e9e563b0771f7a83e23c45 | [
"Apache-2.0"
] | 60 | 2019-03-21T00:22:13.000Z | 2021-11-30T13:30:10.000Z | models/bert/__main__.py | SurgicalAI/Docs-Class | 98634d38be427d5870e9e563b0771f7a83e23c45 | [
"Apache-2.0"
] | 119 | 2019-03-14T15:23:22.000Z | 2022-03-29T03:24:04.000Z | import random
import time
import numpy as np
import torch
from transformers import AdamW, BertForSequenceClassification, BertTokenizer, WarmupLinearSchedule
from common.constants import *
from common.evaluators.bert_evaluator import BertEvaluator
from common.trainers.bert_trainer import BertTrainer
from datasets.bert... | 41.489209 | 114 | 0.698283 |
602558816e9d5b24fb846a56acd91bf8514ffe50 | 11,581 | py | Python | pytimecamp/__init__.py | caspercrause/pytimecamp | 8a1ea31318519ced5e8a5e6916daa8517f14d29e | [
"MIT"
] | null | null | null | pytimecamp/__init__.py | caspercrause/pytimecamp | 8a1ea31318519ced5e8a5e6916daa8517f14d29e | [
"MIT"
] | null | null | null | pytimecamp/__init__.py | caspercrause/pytimecamp | 8a1ea31318519ced5e8a5e6916daa8517f14d29e | [
"MIT"
] | null | null | null | __author__ = 'agiletekengineering'
__version__ = '0.1.16'
import datetime as dt
import dateutil.relativedelta as rdelta
from dateutil.rrule import DAILY, rrule
from dateutil.parser import parse
import requests as http
URL_START = "https://www.timecamp.com/third_party/api"
TC_ITEM_TYPES = ['users', 'tasks', 'entries',... | 39.797251 | 93 | 0.587341 |
ec066cab112c6cf3da2c00c6754c590526a2cde3 | 11,979 | py | Python | main.py | mengjian0502/StructuredCG_RRAM | 75a7d3541e8d392bbbcafdf20af72ab75fe4de78 | [
"MIT"
] | null | null | null | main.py | mengjian0502/StructuredCG_RRAM | 75a7d3541e8d392bbbcafdf20af72ab75fe4de78 | [
"MIT"
] | null | null | null | main.py | mengjian0502/StructuredCG_RRAM | 75a7d3541e8d392bbbcafdf20af72ab75fe4de78 | [
"MIT"
] | null | null | null | """
model training
"""
import argparse
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
from torch.optim.lr_scheduler import LambdaLR
import os
import time
import models
import logging
from utils import *
from pruner impor... | 40.333333 | 197 | 0.661658 |
3aa417e926fea35224c381ec05972ff8f5fd0cbe | 5,506 | py | Python | ambassador/tests/t_shadow.py | Pluies/ambassador | 03ed4d8021df9da5634dd5bc1203d5e0fbe802bd | [
"Apache-2.0"
] | null | null | null | ambassador/tests/t_shadow.py | Pluies/ambassador | 03ed4d8021df9da5634dd5bc1203d5e0fbe802bd | [
"Apache-2.0"
] | null | null | null | ambassador/tests/t_shadow.py | Pluies/ambassador | 03ed4d8021df9da5634dd5bc1203d5e0fbe802bd | [
"Apache-2.0"
] | 1 | 2020-01-11T00:05:47.000Z | 2020-01-11T00:05:47.000Z | import json
import pytest
from typing import ClassVar, Dict, List, Sequence, Tuple, Union
from kat.harness import sanitize, variants, Query, Runner
from kat import manifests
from abstract_tests import AmbassadorTest, HTTP
from abstract_tests import assert_default_errors, MappingTest, OptionTest, ServiceType, Node, T... | 31.462857 | 125 | 0.616963 |
bd77ace4bc0a29552d139400cdad48991061f9ca | 535 | py | Python | config.py | kilonzijnr/news-bing | 74b7eca00825cb54ec45ad7695990ce6f8e4bdc7 | [
"MIT"
] | null | null | null | config.py | kilonzijnr/news-bing | 74b7eca00825cb54ec45ad7695990ce6f8e4bdc7 | [
"MIT"
] | null | null | null | config.py | kilonzijnr/news-bing | 74b7eca00825cb54ec45ad7695990ce6f8e4bdc7 | [
"MIT"
] | null | null | null | import os
class Config:
'''
General configuration parent class
'''
NEWS_API_KEY = os.environ.get('NEWS_API_KEY')
NEWS_SOURCES_BASE_URL = 'https://newsapi.org/v2/sources?language=en&category={}&apiKey={}'
ARTICLES_BASE_URL = 'https://newsapi.org/v2/everything?sources={}&apiKey={}'
... | 17.258065 | 94 | 0.654206 |
84377d271a6cd8406caee16e8fbda560cb905d3a | 10,871 | py | Python | sherpa/validation/saveToNetcdf.py | enricopisoni/SHERPA-training | f27ef7b0b69d45e3e637061023c3932c8cfff296 | [
"BSD-3-Clause"
] | 3 | 2020-07-22T12:03:00.000Z | 2021-03-14T08:31:38.000Z | sherpa/validation/saveToNetcdf.py | enricopisoni/SHERPA-training | f27ef7b0b69d45e3e637061023c3932c8cfff296 | [
"BSD-3-Clause"
] | null | null | null | sherpa/validation/saveToNetcdf.py | enricopisoni/SHERPA-training | f27ef7b0b69d45e3e637061023c3932c8cfff296 | [
"BSD-3-Clause"
] | null | null | null | '''
Created on 5-gen-2017
@author: roncolato
'''
import numpy as np
import netCDF4 as cdf
import time
#import matplotlib.pyplot as plt
#import sherpa.validation.DrawShape as ds
def saveToNetcdf(alpha,omega,flatWeight,x,y,nameDirOut,aqiFil,domain,radFull,radFlat,flagFlat,
rf, ra... | 45.485356 | 124 | 0.644835 |
6dd2b2db66e08fae6913b8597d9cc5bfc315da06 | 21,564 | py | Python | handover/vnf/hsl_layer.py | CN-UPB/sharp | fdf8691ca6efe70c47a16b74abfc4bd82e55915e | [
"Apache-2.0"
] | 2 | 2018-11-15T08:10:00.000Z | 2019-01-14T17:08:57.000Z | handover/vnf/hsl_layer.py | CN-UPB/sharp | fdf8691ca6efe70c47a16b74abfc4bd82e55915e | [
"Apache-2.0"
] | null | null | null | handover/vnf/hsl_layer.py | CN-UPB/sharp | fdf8691ca6efe70c47a16b74abfc4bd82e55915e | [
"Apache-2.0"
] | 2 | 2018-11-15T08:10:05.000Z | 2019-02-06T05:51:05.000Z | #!/usr/bin/env python
import argparse
import logging
import signal
import socket
import sys
import time
import traceback
from Queue import Queue
from pytun import TunTapDevice, IFF_TAP, IFF_NO_PI
from scapy.layers.l2 import Ether
from scapy.packet import Raw
from threading import Thread, Lock
from daemon import Daemo... | 40.457786 | 156 | 0.606752 |
1190b4121806edebeb34d12009891e8071702429 | 7,333 | py | Python | pontoon/base/tests/views/test_locale_agnostic.py | udacity/pontoon | e15a03a0c987615385b2a8c537bb18c99567f77e | [
"BSD-3-Clause"
] | 1 | 2019-05-26T04:16:47.000Z | 2019-05-26T04:16:47.000Z | pontoon/base/tests/views/test_locale_agnostic.py | udacity/pontoon | e15a03a0c987615385b2a8c537bb18c99567f77e | [
"BSD-3-Clause"
] | 9 | 2020-09-06T05:18:03.000Z | 2022-02-26T14:28:38.000Z | pontoon/base/tests/views/test_locale_agnostic.py | udacity/pontoon | e15a03a0c987615385b2a8c537bb18c99567f77e | [
"BSD-3-Clause"
] | 1 | 2019-05-25T23:24:42.000Z | 2019-05-25T23:24:42.000Z | import pytest
from mock import MagicMock, PropertyMock, patch
from django.http import HttpResponse
from django.urls import reverse
from django.contrib.auth.models import User
@patch('pontoon.base.views.get_object_or_404')
@patch('pontoon.base.views.utils.get_project_locale_from_request')
@patch('pontoon.base.views.... | 34.266355 | 79 | 0.645029 |
1296e022199dbbcf24e48fa4681b02772b53618e | 2,607 | py | Python | analysis_codes_v2/bars_pref_stim.py | zqwei/LIF_Vis_model | 16f651ac827ba5f0feb40a0e619e600f1251d009 | [
"MIT"
] | null | null | null | analysis_codes_v2/bars_pref_stim.py | zqwei/LIF_Vis_model | 16f651ac827ba5f0feb40a0e619e600f1251d009 | [
"MIT"
] | null | null | null | analysis_codes_v2/bars_pref_stim.py | zqwei/LIF_Vis_model | 16f651ac827ba5f0feb40a0e619e600f1251d009 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams.update({'font.size': 12})
sys_dict = {}
sys_dict['ll1'] = { 'cells_file': '../build/ll1.csv', 'f_1': '../simulations_ll1/bars/output_ll1_', 'f_2': '_sd278/spk.dat', 'f_3': '_sd278/tot_f_rate.dat', 'f_out': 'ba... | 43.45 | 289 | 0.619486 |
f61fd4ffaa9698f3454be5af5a913ab906caf3f7 | 3,435 | py | Python | lab7/test.py | baiyanlali/CS323-2021F | 5a0b4d086d18ec81382a0151be952f41e8b8e208 | [
"MIT"
] | null | null | null | lab7/test.py | baiyanlali/CS323-2021F | 5a0b4d086d18ec81382a0151be952f41e8b8e208 | [
"MIT"
] | null | null | null | lab7/test.py | baiyanlali/CS323-2021F | 5a0b4d086d18ec81382a0151be952f41e8b8e208 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
import ctypes
import os
import random
import string
import unittest
class SymbolTable(ctypes.Structure):
cwd = os.getcwd()
lib_path = os.path.join(cwd, 'libsymtab.so')
lib = ctypes.CDLL(lib_path)
def __init__(self):
print("Start init")
self.lib.... | 28.625 | 66 | 0.557496 |
08529280cdb4a1f178fc328daa43367ae59ab8a1 | 23 | py | Python | Lib/lib2to3/tests/data/fixers/parrot_example.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 52,316 | 2015-01-01T15:56:25.000Z | 2022-03-31T23:19:01.000Z | Lib/lib2to3/tests/data/fixers/parrot_example.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 25,286 | 2015-03-03T23:18:02.000Z | 2022-03-31T23:17:27.000Z | Lib/lib2to3/tests/data/fixers/parrot_example.py | shawwn/cpython | 0ff8a3b374286d2218fc18f47556a5ace202dad3 | [
"0BSD"
] | 31,623 | 2015-01-01T13:29:37.000Z | 2022-03-31T19:55:06.000Z | def parrot():
pass
| 7.666667 | 13 | 0.565217 |
90ab4f23b698b0a76c184f8250942d042f57be3f | 287 | py | Python | apps/myapp/urls.py | thinkAmi-sandbox/Django_pytest_sample | 8f762f749944185a7f877363ffd24bb90c611b36 | [
"Unlicense"
] | 1 | 2019-03-25T13:33:23.000Z | 2019-03-25T13:33:23.000Z | apps/myapp/urls.py | thinkAmi-sandbox/Django_pytest_sample | 8f762f749944185a7f877363ffd24bb90c611b36 | [
"Unlicense"
] | null | null | null | apps/myapp/urls.py | thinkAmi-sandbox/Django_pytest_sample | 8f762f749944185a7f877363ffd24bb90c611b36 | [
"Unlicense"
] | null | null | null | from django.conf.urls import url
from .views import ItemCreateView, ItemDetailView
from .models import Item
urlpatterns = [
url(r'^create$', ItemCreateView.as_view(), name='item-creation'),
url(r'^item/(?P<pk>[0-9]+)/$', ItemDetailView.as_view(), name='item-detail'),
] | 31.888889 | 82 | 0.682927 |
864760b8849f11ec75bb609e7035f917ab808bbc | 1,365 | py | Python | wordpress/urls.py | equalitie/django-wordpress | 285c10c4afa564e5211b5d82558baeb961de82e8 | [
"BSD-3-Clause"
] | 91 | 2016-11-05T18:27:48.000Z | 2019-09-20T07:17:49.000Z | wordpress/urls.py | equalitie/django-wordpress | 285c10c4afa564e5211b5d82558baeb961de82e8 | [
"BSD-3-Clause"
] | 7 | 2016-11-03T15:48:31.000Z | 2019-09-16T18:19:47.000Z | wordpress/urls.py | equalitie/django-wordpress | 285c10c4afa564e5211b5d82558baeb961de82e8 | [
"BSD-3-Clause"
] | 24 | 2016-11-21T18:13:46.000Z | 2019-03-17T12:36:46.000Z | from django.conf.urls import *
from wordpress.views import *
urlpatterns = patterns('wordpress.views',
url(r'^author/(?P<username>[\w-]+)/$',
AuthorArchive.as_view(), name='wp_author'),
url(r'^category/(?P<term>.+)/$',
TaxonomyArchive.as_view(), {'taxonomy': 'category'}, name='wp_taxonomy_cat... | 41.363636 | 109 | 0.572161 |
f5a5b443ae8691b1ac0a0d44fee89c28ce6a4a33 | 149 | py | Python | practica3/alg3.py | dcabezas98/IN | f61a751a2965f31b85249a95f970bd1dbcae01d0 | [
"MIT"
] | null | null | null | practica3/alg3.py | dcabezas98/IN | f61a751a2965f31b85249a95f970bd1dbcae01d0 | [
"MIT"
] | null | null | null | practica3/alg3.py | dcabezas98/IN | f61a751a2965f31b85249a95f970bd1dbcae01d0 | [
"MIT"
] | null | null | null | from sklearn.neural_network import MLPClassifier
model = MLPClassifier(hidden_layer_sizes=100, early_stopping=True, random_state=25, max_iter=1000)
| 37.25 | 98 | 0.852349 |
7702e57b319a94581900c779b3ff554946ef69ba | 6,264 | py | Python | keras_contrib/backend/tensorflow_backend.py | WiproOpenSourcePractice/keras-contrib | 3e77ba234f46b82997271996946b731bc774fb9f | [
"MIT"
] | 11 | 2019-03-23T13:23:49.000Z | 2022-01-20T07:57:56.000Z | keras_contrib/backend/tensorflow_backend.py | WiproOpenSourcePractice/keras-contrib | 3e77ba234f46b82997271996946b731bc774fb9f | [
"MIT"
] | 1 | 2021-06-18T23:07:54.000Z | 2021-07-13T21:43:51.000Z | keras_contrib/backend/tensorflow_backend.py | WiproOpenSourcePractice/keras-contrib | 3e77ba234f46b82997271996946b731bc774fb9f | [
"MIT"
] | 4 | 2019-12-28T01:19:38.000Z | 2021-04-23T19:23:16.000Z | import tensorflow as tf
import numpy as np
try:
from tensorflow.python.ops import ctc_ops as ctc
except ImportError:
import tensorflow.contrib.ctc as ctc
from keras.backend import tensorflow_backend as KTF
from keras.backend import dtype
from keras.backend.common import floatx
from keras.backend.common import ... | 32.795812 | 117 | 0.620051 |
0f996162326183f844582d63273559493cc6bd82 | 8,515 | py | Python | search_service/proxy/atlas.py | jornh/amundsensearchlibrary | 1a05eb2f063a0805d16261fcf4a6751023f502f9 | [
"Apache-2.0"
] | null | null | null | search_service/proxy/atlas.py | jornh/amundsensearchlibrary | 1a05eb2f063a0805d16261fcf4a6751023f502f9 | [
"Apache-2.0"
] | null | null | null | search_service/proxy/atlas.py | jornh/amundsensearchlibrary | 1a05eb2f063a0805d16261fcf4a6751023f502f9 | [
"Apache-2.0"
] | null | null | null | import logging
from atlasclient.client import Atlas
from atlasclient.exceptions import BadRequest
from atlasclient.models import Entity, EntityCollection
# default search page size
from flask import current_app as app
from typing import List, Dict
from search_service.models.search_result import SearchResult
from sear... | 39.976526 | 100 | 0.587199 |
bfcdf8133fa5063f8b6d163f8ace76f24e815570 | 2,932 | py | Python | submit/workers/verification.py | xavierholt/submit-cs | 70724b5dbc02d87e4b0e06c4ca4593be104919d6 | [
"BSD-2-Clause"
] | 10 | 2015-02-09T12:09:35.000Z | 2021-07-20T00:44:09.000Z | submit/workers/verification.py | xavierholt/submit-cs | 70724b5dbc02d87e4b0e06c4ca4593be104919d6 | [
"BSD-2-Clause"
] | 20 | 2015-01-31T01:16:23.000Z | 2018-02-23T19:01:26.000Z | submit/workers/verification.py | xavierholt/submit-cs | 70724b5dbc02d87e4b0e06c4ca4593be104919d6 | [
"BSD-2-Clause"
] | 6 | 2015-02-09T12:09:35.000Z | 2021-05-04T03:03:48.000Z | import amqp_worker
from sqlalchemy import engine_from_config
from .. import workers
from ..models import Submission, configure_sql
# Hack for old pickle files
# TODO: Migrate this data to not use pickle
import submit
import sys
sys.modules['nudibranch'] = submit
sys.modules['nudibranch.diff_unit'] = submit.diff_unit
s... | 38.077922 | 79 | 0.656548 |
e36c20ce664a311945f606ba4fa26b20cecfc252 | 2,725 | py | Python | LSTM/N_400/plotting_time_series.py | omersan/LSTM_Nudging | 35c8f294708336a28f33b4be93a82d80f2f3d99c | [
"Apache-2.0"
] | 3 | 2021-01-28T18:07:14.000Z | 2022-01-21T02:08:44.000Z | LSTM/N_400/plotting_time_series.py | omersan/LSTM_Nudging | 35c8f294708336a28f33b4be93a82d80f2f3d99c | [
"Apache-2.0"
] | null | null | null | LSTM/N_400/plotting_time_series.py | omersan/LSTM_Nudging | 35c8f294708336a28f33b4be93a82d80f2f3d99c | [
"Apache-2.0"
] | 2 | 2021-01-28T18:23:57.000Z | 2021-06-18T05:44:19.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 14 19:17:22 2020
@author: suraj
"""
import numpy as np
from numpy.random import seed
seed(1)
from scipy import integrate
from scipy import linalg
import matplotlib.pyplot as plt
import time as tm
import matplotlib.ticker as ticker
font = {'family... | 24.54955 | 105 | 0.595963 |
0ea8c3eb994a378ce0ebba6cb58c30d44cc2fc34 | 29,870 | py | Python | pandas/core/internals/construction.py | deepang17/pandas | ac1ad611bba02e1971903e769f777a74d8659471 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-02-25T06:10:21.000Z | 2021-02-25T06:10:21.000Z | pandas/core/internals/construction.py | nmay231/pandas | bf31347a1e82ac5e17b4d515b07e16aae738e60b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/internals/construction.py | nmay231/pandas | bf31347a1e82ac5e17b4d515b07e16aae738e60b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
Functions for preparing various inputs passed to the DataFrame or Series
constructors before passing them to a BlockManager.
"""
from __future__ import annotations
from collections import abc
from typing import (
TYPE_CHECKING,
Any,
Dict,
Hashable,
List,
Optional,
Sequence,
Tuple,
... | 32.083781 | 88 | 0.605122 |
7015ca1478759ede0e087c6c276f7f59101609f4 | 840 | py | Python | brin_parser_test.py | jli/brin-overlap | 39b3e5d23a8b5474c6f108c62a62b8db2b40e6ae | [
"MIT"
] | null | null | null | brin_parser_test.py | jli/brin-overlap | 39b3e5d23a8b5474c6f108c62a62b8db2b40e6ae | [
"MIT"
] | null | null | null | brin_parser_test.py | jli/brin-overlap | 39b3e5d23a8b5474c6f108c62a62b8db2b40e6ae | [
"MIT"
] | null | null | null | from datetime import datetime
from brin_parser import parse_datetime_tuple
def test_parse_datetime_tuple_millis_tz() -> None:
res = parse_datetime_tuple(
"{2016-11-02 05:41:14.537+00 .. 2019-01-20 22:59:06.511+00}"
)
assert res[0] == datetime(2016, 11, 2, 5, 41, 14)
assert res[1] == datetime(2... | 36.521739 | 86 | 0.655952 |
370e4f580ce527b7f1686c9e2df5d28d22420bbf | 1,083 | py | Python | pycones/attendees/migrations/0005_auto_20151104_1253.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | pycones/attendees/migrations/0005_auto_20151104_1253.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | pycones/attendees/migrations/0005_auto_20151104_1253.py | python-spain/PyConES2015 | af78ad7f1d7df747a2f5428be87a5b061457dd24 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('attendees', '0004_auto_20151101_1008'),
]
operations = [
migrations.AlterField(
model_name='attendee',
... | 36.1 | 281 | 0.646353 |
25ed7b7570be7f620fb4ec4f0538af867eb2068a | 12,941 | py | Python | Viewpoints.py | Bscout2011/Structural-Inspection-Planner | ed5888c647492a53e637546b663615627172d8b6 | [
"MIT"
] | null | null | null | Viewpoints.py | Bscout2011/Structural-Inspection-Planner | ed5888c647492a53e637546b663615627172d8b6 | [
"MIT"
] | null | null | null | Viewpoints.py | Bscout2011/Structural-Inspection-Planner | ed5888c647492a53e637546b663615627172d8b6 | [
"MIT"
] | null | null | null | """
Visual computational geometry and viewpoint path constrained optimization.
Andrew Washburn, Prateek Arora, Nikhil Khedekar
University of Nevada Reno
CS791 Special Topics (Robotics)
Instructor: Christos Papachristos
Fall 2020
"""
# Imports
from os.path import exists
import os
import numpy as np
from scipy.spatial.t... | 34.787634 | 129 | 0.640368 |
41b0a0bf21720adf62f033dcfa64b4fe70c026dd | 36,514 | py | Python | rep_graph.py | mbrcknl/graph-refine | 78c74f18127db53606f18f775a5a50de86bc6b97 | [
"BSD-2-Clause",
"MIT"
] | 6 | 2017-03-17T17:57:48.000Z | 2019-12-28T13:03:23.000Z | rep_graph.py | myuluo/graph-refine | 8924af0c61c3c863db7957e0ebac7ae1ceefad9d | [
"BSD-2-Clause",
"MIT"
] | 3 | 2020-04-07T09:15:55.000Z | 2022-03-23T01:36:26.000Z | rep_graph.py | myuluo/graph-refine | 8924af0c61c3c863db7957e0ebac7ae1ceefad9d | [
"BSD-2-Clause",
"MIT"
] | 7 | 2020-04-16T00:32:41.000Z | 2022-03-09T05:25:23.000Z | #
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
#
# SPDX-License-Identifier: BSD-2-Clause
#
from solver import Solver, merge_envs_pcs, smt_expr, mk_smt_expr, to_smt_expr
from syntax import (true_term, false_term, boolT, mk_and, mk_not, mk_implies,
builtinTs, word32T, word8T, foldr1, mk_eq, mk_plus, mk_word32, ... | 28.979365 | 77 | 0.643698 |
f82ed75cc8560e85f4561b67d4658b2ac833e237 | 18 | py | Python | psshlib/version.py | arjanvandervelde/pssh | dbae2292cafdde0d92a95b7df0c768e14f086408 | [
"BSD-3-Clause"
] | 186 | 2016-03-25T00:01:47.000Z | 2022-03-29T05:49:58.000Z | psshlib/version.py | arjanvandervelde/pssh | dbae2292cafdde0d92a95b7df0c768e14f086408 | [
"BSD-3-Clause"
] | 37 | 2016-03-10T09:52:37.000Z | 2022-03-30T20:20:45.000Z | psshlib/version.py | arjanvandervelde/pssh | dbae2292cafdde0d92a95b7df0c768e14f086408 | [
"BSD-3-Clause"
] | 52 | 2016-09-06T23:02:16.000Z | 2022-03-25T01:52:43.000Z | VERSION = '2.3.4'
| 9 | 17 | 0.555556 |
8daa65c55adbe252c724a0ed5ace47f44147c3d7 | 26,484 | py | Python | tests/test_linux_rhel_7_3_ppc64le.py | E-Tahta/python-cpuinfo | 3148c71cbd68eea1b17538a4b690dec3d54f9eb4 | [
"MIT"
] | null | null | null | tests/test_linux_rhel_7_3_ppc64le.py | E-Tahta/python-cpuinfo | 3148c71cbd68eea1b17538a4b690dec3d54f9eb4 | [
"MIT"
] | null | null | null | tests/test_linux_rhel_7_3_ppc64le.py | E-Tahta/python-cpuinfo | 3148c71cbd68eea1b17538a4b690dec3d54f9eb4 | [
"MIT"
] | null | null | null |
import unittest
from cpuinfo import *
import helpers
class MockDataSource(object):
bits = '64bit'
cpu_count = 16
is_windows = False
raw_arch_string = 'ppc64le'
can_cpuid = False
@staticmethod
def has_proc_cpuinfo():
return True
@staticmethod
def has_dmesg():
return True
@staticmethod
def has_lscpu... | 68.434109 | 132 | 0.823592 |
89ead23134890be5260f59116ec497b8e938bc3d | 868 | py | Python | model_helper.py | airaria/RNNChinesePeom | 6943eca74dbcd12747a925beb6950b097dd1ad0e | [
"MIT"
] | 1 | 2017-12-28T09:41:43.000Z | 2017-12-28T09:41:43.000Z | model_helper.py | airaria/RNNChinesePeom | 6943eca74dbcd12747a925beb6950b097dd1ad0e | [
"MIT"
] | null | null | null | model_helper.py | airaria/RNNChinesePeom | 6943eca74dbcd12747a925beb6950b097dd1ad0e | [
"MIT"
] | null | null | null | import tensorflow as tf
def _single_cell(num_units,forget_bias,dropout):
single_cell = tf.contrib.rnn.BasicLSTMCell(num_units,forget_bias=forget_bias)
single_cell = tf.contrib.rnn.DropoutWrapper(
cell=single_cell,output_keep_prob=(1.-dropout))
return single_cell
def _cell_list(num_units, num_layer... | 36.166667 | 81 | 0.697005 |
d7e466968edb7eea8026c71b108dc0b57ec7301d | 366 | py | Python | utils/archived/graph_utils.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 18 | 2020-06-02T11:21:47.000Z | 2022-03-25T08:16:57.000Z | utils/archived/graph_utils.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 4 | 2020-06-20T13:53:44.000Z | 2021-09-11T22:58:21.000Z | utils/archived/graph_utils.py | ApocalyVec/mGesf | 21e0bf37a9d11a3cdde86a8d54e2f6c6a2211ab5 | [
"MIT"
] | 6 | 2020-04-23T21:30:17.000Z | 2021-08-03T19:59:12.000Z | import numpy as np
import numpy.random
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter
def smooth_heat_scatter(x, y, s, bins=1000):
heatmap, xedges, yedges = np.histogram2d(x, y, bins=bins)
heatmap = gaussian_filter(heatmap, sigma=s)
extent = [xedges[0], xedges[-1], yedge... | 33.272727 | 61 | 0.729508 |
7787556781c4fb48d8decf87300114278e56f3d5 | 1,560 | py | Python | setup.py | dhhse/prereform2modern | b35f7d99f5a38fadf63e7d11ce0a59fed8ef80a1 | [
"MIT"
] | 1 | 2020-09-09T09:51:30.000Z | 2020-09-09T09:51:30.000Z | setup.py | dhhse/prereform2modern | b35f7d99f5a38fadf63e7d11ce0a59fed8ef80a1 | [
"MIT"
] | null | null | null | setup.py | dhhse/prereform2modern | b35f7d99f5a38fadf63e7d11ce0a59fed8ef80a1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import setuptools
from prereform2modern import __version__
# Package meta-data.
NAME = 'prereform2modern'
DESCRIPTION = 'Pre-reform to contemporary orthography convertor for the Russian language'
URL = 'https://github.com/dhhse/prereform2modern'
EMA... | 26.440678 | 89 | 0.678846 |
b89d4878ee822da6188356663ccd8e868ac84658 | 6,431 | py | Python | tin/db.py | balazsdukai/tin2stardb | efb160ba744f757c4a6d4674c7abec8bf0694415 | [
"MIT"
] | null | null | null | tin/db.py | balazsdukai/tin2stardb | efb160ba744f757c4a6d4674c7abec8bf0694415 | [
"MIT"
] | null | null | null | tin/db.py | balazsdukai/tin2stardb | efb160ba744f757c4a6d4674c7abec8bf0694415 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Database connection.
COPY from tile_processor. Might make sense to factor 'db' out from tile_processor.
"""
import logging
import re
from typing import List, Tuple
from collections import abc
from keyword import iskeyword
import psycopg2
from psycopg2 import sql, extras, extensions
log =... | 31.370732 | 82 | 0.614368 |
28fd93822ec18941e30985e9e407f77588e40357 | 23,194 | py | Python | tests/data/test_dataset.py | ShanleiMu/RecBole-1 | 9ec15faf90126dfb512901d0f2303ef3c2efb71d | [
"MIT"
] | 1 | 2021-06-02T13:26:06.000Z | 2021-06-02T13:26:06.000Z | tests/data/test_dataset.py | eagle20111/RecBole | 542857e8675d27c039f7ca2820c7f08e5d50e0c4 | [
"MIT"
] | null | null | null | tests/data/test_dataset.py | eagle20111/RecBole | 542857e8675d27c039f7ca2820c7f08e5d50e0c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2021/1/3
# @Author : Yushuo Chen
# @Email : chenyushuo@ruc.edu.cn
# UPDATE
# @Time : 2020/1/3
# @Author : Yushuo Chen
# @email : chenyushuo@ruc.edu.cn
import logging
import os
import pytest
from recbole.config import Config, EvalSetting
from recbole.data import creat... | 37.470113 | 114 | 0.543244 |
93d14f3f617fc74870d1c6747863332f8b09212f | 8,671 | py | Python | src/tools/vppapigen/vppapigen_c.py | chavit/fast-acl-plugin | 3ecac10d386edbb7d30ce8ae1facd003391b828f | [
"Apache-2.0"
] | 2 | 2019-07-31T13:44:04.000Z | 2019-08-04T14:09:38.000Z | src/tools/vppapigen/vppapigen_c.py | chavit/fast-acl-plugin | 3ecac10d386edbb7d30ce8ae1facd003391b828f | [
"Apache-2.0"
] | null | null | null | src/tools/vppapigen/vppapigen_c.py | chavit/fast-acl-plugin | 3ecac10d386edbb7d30ce8ae1facd003391b828f | [
"Apache-2.0"
] | 1 | 2019-12-06T14:29:39.000Z | 2019-12-06T14:29:39.000Z | # C generation
import datetime
import os
import time
datestring = datetime.datetime.utcfromtimestamp(
int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
input_filename = 'inputfil'
top_boilerplate = '''\
/*
* VLIB API definitions {datestring}
* Input file: {input_filename}
* Automatically generated: please ... | 27.61465 | 88 | 0.535232 |
f85413c15e489cbb07c305d022ed9f49360c4dae | 868 | py | Python | ctparse/loader.py | bharathi-srini/ctparse | f3b7ef1045fbbc566dc838c66d4a47de160cb38f | [
"MIT"
] | null | null | null | ctparse/loader.py | bharathi-srini/ctparse | f3b7ef1045fbbc566dc838c66d4a47de160cb38f | [
"MIT"
] | null | null | null | ctparse/loader.py | bharathi-srini/ctparse | f3b7ef1045fbbc566dc838c66d4a47de160cb38f | [
"MIT"
] | null | null | null | """Utility to load default model in ctparse"""
import bz2
import logging
import os
import pickle
from .scorer import Scorer, DummyScorer
from .nb_scorer import NaiveBayesScorer
logger = logging.getLogger(__name__)
# Location of the default model, included with ctparse
DEFAULT_MODEL_FILE = os.path.join(os.path.dirna... | 28 | 83 | 0.709677 |
e3b47ea68635b4c422cc3f8acd0117841829e14c | 4,214 | py | Python | pandoc_codeblock_include.py | chdemko/pandoc-codeblock-include | f66c917e5e28470607087f0563fd9ed5accf47da | [
"BSD-3-Clause"
] | 7 | 2018-03-30T03:02:34.000Z | 2021-12-05T13:54:27.000Z | pandoc_codeblock_include.py | chdemko/pandoc-codeblock-include | f66c917e5e28470607087f0563fd9ed5accf47da | [
"BSD-3-Clause"
] | 7 | 2018-10-07T04:46:03.000Z | 2021-02-22T20:37:15.000Z | pandoc_codeblock_include.py | chdemko/pandoc-codeblock-include | f66c917e5e28470607087f0563fd9ed5accf47da | [
"BSD-3-Clause"
] | 3 | 2018-11-24T20:38:53.000Z | 2020-11-23T08:30:23.000Z | #!/usr/bin/env python
"""
Pandoc filter for including file in code block
"""
from panflute import run_filter, debug, CodeBlock
def parse_include(parsed, name, value):
"""
Extract include information from attributes.
Arguments
---------
parsed:
A dictionnary of attributes
... | 22.902174 | 80 | 0.537731 |
135baa423679437313a5162d6f79f7debf721f5b | 3,199 | py | Python | sample_infrastructure/strategy_launcher.py | alexveden/yauber-executor | 22c73572332ae0068092c7a23b9b718b466db983 | [
"MIT"
] | null | null | null | sample_infrastructure/strategy_launcher.py | alexveden/yauber-executor | 22c73572332ae0068092c7a23b9b718b466db983 | [
"MIT"
] | null | null | null | sample_infrastructure/strategy_launcher.py | alexveden/yauber-executor | 22c73572332ae0068092c7a23b9b718b466db983 | [
"MIT"
] | null | null | null | """
Simple strategy calculation script, it's waiting for new quotes signals and launches strategy calculation
"""
from yauber_executor import AsyncApp, log, AsyncAppDeliveryError, AppStatus
import asyncio
import time
from datetime import datetime
import concurrent.futures
class HolyGrailStrategy:
def __init__(sel... | 35.544444 | 144 | 0.628321 |
d210b8a7da256708f11cacdd71f8ab9916c0b0df | 44 | py | Python | sample_project/appmedia/__init__.py | dokterbob/django-admin-sortable | 4e5e4af8b157cc323acbb69491f1b08b9f3e62bf | [
"MS-PL",
"Naumen",
"Condor-1.1",
"Apache-1.1"
] | null | null | null | sample_project/appmedia/__init__.py | dokterbob/django-admin-sortable | 4e5e4af8b157cc323acbb69491f1b08b9f3e62bf | [
"MS-PL",
"Naumen",
"Condor-1.1",
"Apache-1.1"
] | null | null | null | sample_project/appmedia/__init__.py | dokterbob/django-admin-sortable | 4e5e4af8b157cc323acbb69491f1b08b9f3e62bf | [
"MS-PL",
"Naumen",
"Condor-1.1",
"Apache-1.1"
] | null | null | null | VERSION = (1, 0, 1)
__version__ = '1.0.1'
| 14.666667 | 22 | 0.545455 |
9acbde15c0afbd9ccd732c1a74f12181ad30d03f | 5,037 | py | Python | scripts/fft_benchmark_TPU.py | Maxelee/flowpm | 361b07db6e7a17f6926e6e22e7710a818685b743 | [
"MIT"
] | null | null | null | scripts/fft_benchmark_TPU.py | Maxelee/flowpm | 361b07db6e7a17f6926e6e22e7710a818685b743 | [
"MIT"
] | null | null | null | scripts/fft_benchmark_TPU.py | Maxelee/flowpm | 361b07db6e7a17f6926e6e22e7710a818685b743 | [
"MIT"
] | null | null | null | """
Benchmark script for studying the scaling of distributed FFTs on Mesh Tensorflow
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import time
import tensorflow.compat.v1 as tf
import mesh_tensorflow as mtf
import flowpm.mesh_ops as mpm
from tensorfl... | 34.033784 | 125 | 0.729005 |
3d0eba65f45d0d5b36cd442402082ecfd02f4599 | 257 | py | Python | tests/farm/html/src/main.py | blueyed/coveragepy | ef21d19ca4fe3fc0c88a1135721f2dfbc60506f3 | [
"Apache-2.0"
] | null | null | null | tests/farm/html/src/main.py | blueyed/coveragepy | ef21d19ca4fe3fc0c88a1135721f2dfbc60506f3 | [
"Apache-2.0"
] | null | null | null | tests/farm/html/src/main.py | blueyed/coveragepy | ef21d19ca4fe3fc0c88a1135721f2dfbc60506f3 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
import m1
import m2
import m3
a = 5
b = 6
assert m1.m1a == 1
assert m2.m2a == 1
assert m3.m3a == 1
| 18.357143 | 79 | 0.719844 |
a4f462d1ae80199075f518cf09449b9427ec713a | 768 | py | Python | Parking lot web scraping/Scrape2.py | LizardWithHat/Misc-Collection | 0bc4eaa055ffe49903cc5a86bcd245442f67e739 | [
"Apache-2.0"
] | null | null | null | Parking lot web scraping/Scrape2.py | LizardWithHat/Misc-Collection | 0bc4eaa055ffe49903cc5a86bcd245442f67e739 | [
"Apache-2.0"
] | null | null | null | Parking lot web scraping/Scrape2.py | LizardWithHat/Misc-Collection | 0bc4eaa055ffe49903cc5a86bcd245442f67e739 | [
"Apache-2.0"
] | null | null | null | import urllib.request
from bs4 import BeautifulSoup
import time
from pathlib import Path
import csv
uri = ''
html = urllib.request.urlopen(uri).read()
soup = BeautifulSoup(html, features="html.parser")
# Es gibt nur eine Tabelle
table = soup.select("table")[0]
currentTimestamp = time.strftime("%Y-%m-%d %X")
csv_rows ... | 25.6 | 62 | 0.700521 |
8f06e5cf57f1491d59cd66c1410085003dd2384d | 1,300 | py | Python | controllers/user.py | phenmp/atassist-api | 01320c6251c5d8f65ece4e184c005d75dc680636 | [
"MIT"
] | null | null | null | controllers/user.py | phenmp/atassist-api | 01320c6251c5d8f65ece4e184c005d75dc680636 | [
"MIT"
] | null | null | null | controllers/user.py | phenmp/atassist-api | 01320c6251c5d8f65ece4e184c005d75dc680636 | [
"MIT"
] | null | null | null | from flask_restful import Resource, reqparse
class User(Resource):
users = [
{
'name': 'Alexander',
'age': '42',
'occupation': 'Network Engineer'
},
{
'name': 'Graham',
'age': '34',
'occupation': 'Doctor'
},
... | 25.490196 | 75 | 0.476154 |
303ade74b650b6176cbd7f6590cddd5dc9c0278a | 60,065 | py | Python | numba/cuda/libdevice.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | 6,620 | 2015-01-04T08:51:04.000Z | 2022-03-31T12:52:18.000Z | numba/cuda/libdevice.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | 6,457 | 2015-01-04T03:18:41.000Z | 2022-03-31T17:38:42.000Z | numba/cuda/libdevice.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | 930 | 2015-01-25T02:33:03.000Z | 2022-03-30T14:10:32.000Z | def abs(x):
"""
See https://docs.nvidia.com/cuda/libdevice-users-guide/__nv_abs.html
:param x: Argument.
:type x: int32
:rtype: int32
"""
def acos(x):
"""
See https://docs.nvidia.com/cuda/libdevice-users-guide/__nv_acos.html
:param x: Argument.
:type x: float64
:rtype: float6... | 17.754951 | 87 | 0.624124 |
4ce058fcc165778261e2062816d3b386c9f7fa1b | 4,671 | py | Python | localflavor/pt/forms.py | MehdioKhan/django-localflavor | 7cb223bf801ebc7659cc314a8a870e47e5004488 | [
"BSD-3-Clause"
] | 1 | 2018-11-28T22:08:17.000Z | 2018-11-28T22:08:17.000Z | localflavor/pt/forms.py | DalavanCloud/django-localflavor | b78df3bbfa5e07e3f6b78a09d43c45eb39fa1196 | [
"BSD-3-Clause"
] | null | null | null | localflavor/pt/forms.py | DalavanCloud/django-localflavor | b78df3bbfa5e07e3f6b78a09d43c45eb39fa1196 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
django_localflavot_pt.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contains PT-specific Django form helpers.
"""
from __future__ import unicode_literals
from re import compile as regex_compile
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.for... | 32.664336 | 117 | 0.658745 |
5318debb983fccaac31688b6ef4f62f9a3969585 | 1,921 | py | Python | docs/conf.py | pySTEPS/cookiecutter-pysteps-plugin | cbd4903951d48cef5e7b0a7379e6dc94f600b031 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | pySTEPS/cookiecutter-pysteps-plugin | cbd4903951d48cef5e7b0a7379e6dc94f600b031 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | pySTEPS/cookiecutter-pysteps-plugin | cbd4903951d48cef5e7b0a7379e6dc94f600b031 | [
"BSD-3-Clause"
] | null | null | null | # -- General configuration ------------------------------------------------
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.todo',
"numpydoc",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source f... | 29.553846 | 79 | 0.701718 |
d3bdb3a08085f2534cf957ef21b0493d244b8af0 | 936 | py | Python | python/open3d/ml/torch/__init__.py | sammo2828/Open3D | 879dcf897f8be474e8a1563fa0cf6adca3047a87 | [
"MIT"
] | 1 | 2021-03-24T10:22:36.000Z | 2021-03-24T10:22:36.000Z | python/open3d/ml/torch/__init__.py | RRDajay/Open3D | f8dae1e4b5b40624ec24dc7565d16c2c682f6589 | [
"MIT"
] | 1 | 2021-12-31T05:38:58.000Z | 2021-12-31T05:38:58.000Z | python/open3d/ml/torch/__init__.py | RRDajay/Open3D | f8dae1e4b5b40624ec24dc7565d16c2c682f6589 | [
"MIT"
] | 1 | 2021-06-10T14:53:46.000Z | 2021-06-10T14:53:46.000Z | """This module loads the op library."""
import os as _os
import sys as _sys
import torch as _torch
from open3d import _build_config
_this_dir = _os.path.dirname(__file__)
_package_root = _os.path.join(_this_dir, '..', '..')
_lib_ext = {'linux': '.so', 'darwin': '.dylib', 'win32': '.dll'}[_sys.platform]
_lib_suffix = '... | 33.428571 | 97 | 0.682692 |
d529b52168ccd70a3f8e9655f30fb000bcba00c6 | 885 | py | Python | _unittests/ut_art/test_video_noenv3_modif.py | sdpython/code_beatrix | 421101fb7460b3c23a5955e73395e6793d94e21a | [
"MIT"
] | 1 | 2017-12-01T12:43:53.000Z | 2017-12-01T12:43:53.000Z | _unittests/ut_art/test_video_noenv3_modif.py | sdpython/code_beatrix | 421101fb7460b3c23a5955e73395e6793d94e21a | [
"MIT"
] | 8 | 2018-01-07T14:41:25.000Z | 2020-02-01T18:29:51.000Z | _unittests/ut_art/test_video_noenv3_modif.py | sdpython/code_beatrix | 421101fb7460b3c23a5955e73395e6793d94e21a | [
"MIT"
] | 1 | 2019-10-27T20:40:04.000Z | 2019-10-27T20:40:04.000Z | # -*- coding: utf-8 -*-
"""
@brief test log(time=1000s)
"""
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase
from code_beatrix.art.video import video_save, video_modification, clean_video, video_load
class TestVideoModif(ExtTestCase)... | 29.5 | 90 | 0.667797 |
0f30a6d042874ed775e8cec1201c07212d00b682 | 1,192 | py | Python | setup.py | iDigBio/idq-geo | 1c9b7b7215a5ecfd23f069b36d3e6ff05323c51b | [
"MIT"
] | 1 | 2016-02-04T16:35:51.000Z | 2016-02-04T16:35:51.000Z | setup.py | iDigBio/idq-geo | 1c9b7b7215a5ecfd23f069b36d3e6ff05323c51b | [
"MIT"
] | null | null | null | setup.py | iDigBio/idq-geo | 1c9b7b7215a5ecfd23f069b36d3e6ff05323c51b | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
from codecs import open
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r', 'utf-8') as f:
return f.read()
setup(
name='idq-geo',
version='0.2.0',
description='iDigQuali... | 32.216216 | 71 | 0.626678 |
4443a87de582a3bdca76a7a9a38e370c535f131e | 8,765 | py | Python | reddit.py | HypestTeam/livestreambot | 0f284230a34d40f7c5e68c078e87a279c5a0b503 | [
"MIT"
] | 1 | 2015-11-26T00:56:34.000Z | 2015-11-26T00:56:34.000Z | reddit.py | HypestTeam/livestreambot | 0f284230a34d40f7c5e68c078e87a279c5a0b503 | [
"MIT"
] | null | null | null | reddit.py | HypestTeam/livestreambot | 0f284230a34d40f7c5e68c078e87a279c5a0b503 | [
"MIT"
] | null | null | null | import datetime
import aiohttp
import asyncio
import praw
import prawcore
import logging
import functools
import re
from errors import RetryRequestLater
log = logging.getLogger(__name__)
def retry(seconds):
def decorator(func):
@functools.wraps(func)
async def wrapped(self, *args, **kwargs):
... | 37.297872 | 119 | 0.58996 |
eb91dedd6ad963f3435c15c61ac98de3f4444142 | 94 | py | Python | zazi/apps/mpesa_loan/apps.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | zazi/apps/mpesa_loan/apps.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | 1 | 2021-08-20T06:41:57.000Z | 2021-08-20T06:41:57.000Z | zazi/apps/mpesa_loan/apps.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class MpesaLoanConfig(AppConfig):
name = 'mpesa_loan'
| 15.666667 | 33 | 0.765957 |
583064756743395c74e5dc6342455b613bc6cacd | 1,273 | py | Python | evap/evaluation/migrations/0031_add_rating_answer_counter.py | JenniferStamm/EvaP | 1d71e4efcd34d01f28e30c6026c8dcc708921193 | [
"MIT"
] | null | null | null | evap/evaluation/migrations/0031_add_rating_answer_counter.py | JenniferStamm/EvaP | 1d71e4efcd34d01f28e30c6026c8dcc708921193 | [
"MIT"
] | null | null | null | evap/evaluation/migrations/0031_add_rating_answer_counter.py | JenniferStamm/EvaP | 1d71e4efcd34d01f28e30c6026c8dcc708921193 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('evaluation', '0030_change_course_ordering'),
]
operations = [
migrations.CreateModel(
... | 37.441176 | 167 | 0.614297 |
37d62ec1b7b068f14f4e3ee2ce04a13a95b69a84 | 1,876 | py | Python | pony/orm/tests/test_entity_init.py | ProgHaj/pony | 52720af1728ab2931364be8615e18ad8714a7c9e | [
"Apache-2.0"
] | 2,628 | 2015-01-02T17:55:28.000Z | 2022-03-31T10:36:42.000Z | pony/orm/tests/test_entity_init.py | ProgHaj/pony | 52720af1728ab2931364be8615e18ad8714a7c9e | [
"Apache-2.0"
] | 525 | 2015-01-03T20:30:08.000Z | 2022-03-23T12:30:01.000Z | pony/orm/tests/test_entity_init.py | ProgHaj/pony | 52720af1728ab2931364be8615e18ad8714a7c9e | [
"Apache-2.0"
] | 256 | 2015-01-02T17:55:31.000Z | 2022-03-20T17:01:37.000Z | from __future__ import absolute_import, print_function, division
import unittest
from datetime import date, datetime
from hashlib import md5
from pony.orm.tests.testutils import raises_exception
from pony.orm import *
from pony.orm.tests import setup_database, teardown_database
db = Database()
class User(db.Entity... | 32.344828 | 91 | 0.637527 |
96d557894bedd176f2fa6132bcef40c893072b8f | 7,174 | py | Python | DipZoom.py | ooolky/DipZoom | 0b9db7a7e68d38004f457a759cc58ad25e26ead6 | [
"BSD-2-Clause"
] | null | null | null | DipZoom.py | ooolky/DipZoom | 0b9db7a7e68d38004f457a759cc58ad25e26ead6 | [
"BSD-2-Clause"
] | null | null | null | DipZoom.py | ooolky/DipZoom | 0b9db7a7e68d38004f457a759cc58ad25e26ead6 | [
"BSD-2-Clause"
] | null | null | null | from os import remove
from PyQt5.Qt import *
import sys
from PyQt5.QtWidgets import QFileDialog
import cv2
import numpy as np
from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import os
class Window(QWidget):
def __init__(self):
super().__i... | 28.244094 | 109 | 0.704349 |
9784339c1807e6ad5e0bff2f76a54a8c4b2c7db8 | 1,796 | py | Python | common.py | chrismue/tegschtuhr | 33cb52283b69e8a06bd8859fa08f47542a1b34fb | [
"MIT"
] | null | null | null | common.py | chrismue/tegschtuhr | 33cb52283b69e8a06bd8859fa08f47542a1b34fb | [
"MIT"
] | null | null | null | common.py | chrismue/tegschtuhr | 33cb52283b69e8a06bd8859fa08f47542a1b34fb | [
"MIT"
] | null | null | null | try:
from micropython import const
except:
const = lambda v: v
SUNNY = const(0)
CLOUDY = const(1)
RAINY = const(2)
SNOWY = const(3)
global _cfg
import os
try:
_cfg
except NameError:
try:
with open("cfg", "r") as f:
_cfg = eval(f.read())
except OSError:
... | 26.411765 | 82 | 0.484967 |
9fe9eb8b69b21e4e8ee50ee018a0c93ecb03e084 | 32,538 | py | Python | af_query/threat_data.py | madelinemccombe/pan-tort | d113d4febbaaaa7412cc2f0e6b78154831b0c9b6 | [
"Apache-2.0"
] | null | null | null | af_query/threat_data.py | madelinemccombe/pan-tort | d113d4febbaaaa7412cc2f0e6b78154831b0c9b6 | [
"Apache-2.0"
] | null | null | null | af_query/threat_data.py | madelinemccombe/pan-tort | d113d4febbaaaa7412cc2f0e6b78154831b0c9b6 | [
"Apache-2.0"
] | 3 | 2018-08-14T17:06:31.000Z | 2020-11-17T21:12:33.000Z | # Copyright (c) 2018, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... | 40.269802 | 199 | 0.624962 |
afdd1a746f80f49a99b06715be9d1c8bb6fc84b2 | 2,940 | py | Python | simulate_noisy_exp_growth.py | rcsmit/covid19 | 7bf654498a3c99f559f4333c2ed1480c514aa08c | [
"MIT"
] | 6 | 2020-09-27T17:21:23.000Z | 2022-02-06T11:20:48.000Z | simulate_noisy_exp_growth.py | han-kwang/covid19 | 7bf654498a3c99f559f4333c2ed1480c514aa08c | [
"MIT"
] | 3 | 2020-11-23T13:44:31.000Z | 2021-07-10T20:10:38.000Z | simulate_noisy_exp_growth.py | rcsmit/covid19 | 7bf654498a3c99f559f4333c2ed1480c514aa08c | [
"MIT"
] | 5 | 2020-11-23T13:29:59.000Z | 2021-12-25T02:23:32.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Simple simulation on fitting exponential growth on noisy discrete samples.
Background: growth of the AY.33 SARS-CoV-2 variant relative to other
lineages, in the Netherlands. So far, we have collected about 400 samples
of this lineage. Hypothesis is a logistic growth ra... | 32.666667 | 78 | 0.698639 |
799f27a48be6d4e8a473aa9d532076f4f7754466 | 863 | py | Python | app/swagger_server/models/results.py | DrSnowbird/uco-exchange-server-docker | 240fb883ee371bb634559917147a75b23bc94cc2 | [
"Apache-2.0"
] | null | null | null | app/swagger_server/models/results.py | DrSnowbird/uco-exchange-server-docker | 240fb883ee371bb634559917147a75b23bc94cc2 | [
"Apache-2.0"
] | null | null | null | app/swagger_server/models/results.py | DrSnowbird/uco-exchange-server-docker | 240fb883ee371bb634559917147a75b23bc94cc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class Results(Model):
"""NOTE: This class is auto generated by the swagger cod... | 23.324324 | 80 | 0.626883 |
c3119cd5238e6e46ee1d3b97393bf1c88051e166 | 101 | py | Python | lang/py/cookbook/v2/source/cb2_6_0_exm_7.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_6_0_exm_7.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_6_0_exm_7.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | aMix = beehive, Behave('John'), Repeater(), Behave('world')
for whatever in aMix: whatever.repeat(3)
| 33.666667 | 59 | 0.712871 |
9c7625d2b9e830fda3f5dcb6cc26e94cbe63367f | 6,219 | py | Python | eval.py | msj17thu/events-caption.pytorch | a7e37f93f48f571e552c0f1661855f3e58fe0fe5 | [
"MIT"
] | 2 | 2021-06-03T05:42:34.000Z | 2021-07-12T02:59:14.000Z | eval.py | msj17thu/events-caption.pytorch | a7e37f93f48f571e552c0f1661855f3e58fe0fe5 | [
"MIT"
] | null | null | null | eval.py | msj17thu/events-caption.pytorch | a7e37f93f48f571e552c0f1661855f3e58fe0fe5 | [
"MIT"
] | null | null | null | """
Author: Mashijie
Date: 2021-05-18
eval code for events caption
CNN Model: ResNet 50
Language Model: S2VT Attention Model
eval code corresponding to train.py
"""
import json
import os
import argparse
import torch
from torch import nn
from torch.autograd import Variable
from torch.utils.data import DataLoader
fro... | 39.611465 | 108 | 0.63097 |
fb63b9c83230ce29a6bd9748d3361ecef6aaf22c | 4,940 | py | Python | messaging/api/slack/announcement.py | kthaisociety/website | 417ead4d074fc3791fb1453c47d9e6dac0a7a7cd | [
"MIT"
] | 1 | 2020-03-19T09:44:16.000Z | 2020-03-19T09:44:16.000Z | messaging/api/slack/announcement.py | kthaisociety/website | 417ead4d074fc3791fb1453c47d9e6dac0a7a7cd | [
"MIT"
] | 43 | 2020-02-22T09:32:27.000Z | 2022-03-22T11:24:51.000Z | messaging/api/slack/announcement.py | kthaisociety/website | 417ead4d074fc3791fb1453c47d9e6dac0a7a7cd | [
"MIT"
] | 3 | 2020-03-06T13:27:12.000Z | 2022-02-07T09:01:07.000Z | from typing import List
from uuid import UUID
from django.urls import reverse
from django.utils import timezone
from app.settings import (
SL_CHANNEL_GENERAL,
APP_FULL_DOMAIN,
SL_CHANNEL_EVENTS,
SL_CHANNEL_ARTICLES,
SL_CHANNEL_JOBS,
)
from app.utils import get_full_url
from business.models import ... | 28.390805 | 141 | 0.534211 |
3da75b8fdd3ce1bcfa32abce58c51db77d0bcfa1 | 4,307 | py | Python | fe/live/projects/commands.py | egnartsms/livejs | e421fb52c5be58a4064a2238a1570e99a11ccdde | [
"MIT"
] | 2 | 2019-11-21T21:16:32.000Z | 2020-01-31T09:44:06.000Z | fe/live/projects/commands.py | egnartsms/livejs | e421fb52c5be58a4064a2238a1570e99a11ccdde | [
"MIT"
] | null | null | null | fe/live/projects/commands.py | egnartsms/livejs | e421fb52c5be58a4064a2238a1570e99a11ccdde | [
"MIT"
] | null | null | null | import os
import re
import sublime
import sublime_plugin
from collections import OrderedDict
from .datastructures import Project
from .operations import project_for_window
from live.common.method import method
from live.common.misc import file_contents
from live.common.misc import gen_uid
from live.gstate import conf... | 30.546099 | 89 | 0.631298 |
1158382096e42acda96fedcfbbe86a80e3d3c6c6 | 3,190 | py | Python | app/article/views.py | CS201826/Content-app | 752f8a390157e37dc054b4c2eea3145c568b54ce | [
"MIT"
] | 1 | 2018-02-14T17:06:37.000Z | 2018-02-14T17:06:37.000Z | app/article/views.py | CS201826/Content-app | 752f8a390157e37dc054b4c2eea3145c568b54ce | [
"MIT"
] | null | null | null | app/article/views.py | CS201826/Content-app | 752f8a390157e37dc054b4c2eea3145c568b54ce | [
"MIT"
] | null | null | null | # Import packages
from flask import flash, request, redirect, render_template, url_for
import uuid
from . import article
from .. import dynamodb
from .forms import ArticleForm
table = dynamodb.Table('articles')
@article.route('/create', methods=['GET', 'POST'])
def create():
"""
Method to create... | 29.537037 | 94 | 0.59373 |
fb266b4abba5184ac5e5a698b06d8ff74176574d | 188,696 | py | Python | pandas/core/indexes/base.py | wchen928/pandas | d5e8edcdfa0eaf6847faf95e15a607e03068eb4c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-08-04T08:29:54.000Z | 2020-08-04T08:29:54.000Z | pandas/core/indexes/base.py | wchen928/pandas | d5e8edcdfa0eaf6847faf95e15a607e03068eb4c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/base.py | wchen928/pandas | d5e8edcdfa0eaf6847faf95e15a607e03068eb4c | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | from copy import copy as copy_func
from datetime import datetime
import operator
from textwrap import dedent
from typing import TYPE_CHECKING, Any, Callable, FrozenSet, Hashable, Optional, Union
import warnings
import numpy as np
from pandas._libs import algos as libalgos, index as libindex, lib
import pandas._libs.j... | 32.261241 | 88 | 0.559964 |
6f144f5d571acbcb16ff0bdf7ec78716d7395d12 | 77,170 | py | Python | Cython/Compiler/Code.py | seberg/cython | 3a6b9856187d7e490e0827ac0357283bf3dbd79c | [
"Apache-2.0"
] | 12 | 2015-11-10T03:21:22.000Z | 2021-12-12T00:29:28.000Z | Cython/Compiler/Code.py | seberg/cython | 3a6b9856187d7e490e0827ac0357283bf3dbd79c | [
"Apache-2.0"
] | 1 | 2015-10-23T11:23:05.000Z | 2015-10-23T19:30:45.000Z | Cython/Compiler/Code.py | seberg/cython | 3a6b9856187d7e490e0827ac0357283bf3dbd79c | [
"Apache-2.0"
] | 4 | 2015-11-10T04:24:23.000Z | 2019-02-03T23:35:33.000Z | # cython: language_level = 2
#
# Code output module
#
import cython
cython.declare(os=object, re=object, operator=object,
Naming=object, Options=object, StringEncoding=object,
Utils=object, SourceDescriptor=object, StringIOTree=object,
DebugFlags=object, basestring=object... | 36.298213 | 210 | 0.588324 |
7be8066d7237f2cbc91bac7d57f6481188d8b88c | 1,646 | py | Python | python/readgpu.py | opteroncx/MoePhoto | 8e60803c02cbba0d1445cdb7570df1f836c9dff2 | [
"Apache-2.0"
] | 192 | 2018-09-09T15:57:02.000Z | 2022-03-30T06:40:09.000Z | python/readgpu.py | lotress/MoePhoto | 6f47515d2cf236773a46413f57839565fa665796 | [
"Apache-2.0"
] | 10 | 2019-02-14T18:52:53.000Z | 2021-10-15T01:41:56.000Z | python/readgpu.py | opteroncx/MoePhoto | 8e60803c02cbba0d1445cdb7570df1f836c9dff2 | [
"Apache-2.0"
] | 28 | 2018-10-04T13:52:16.000Z | 2022-03-18T03:26:55.000Z | import sys
import torch
ss = lambda f: lambda *args: str(f(*args), encoding='ascii')
def init():
global devices, getGPUName, pynvml
if not 'pynvml' in globals():
sys.path.append('site-packages/nvidia-ml-py')
import pynvml # pylint: disable=E0401
sys.path.pop()
pynvml.nvmlInit()
devices = [pynv... | 36.577778 | 143 | 0.709599 |
af5fa1e4c49a22321843ad98a4c491c4347cb05f | 10,251 | py | Python | app.py | brenopoggiali/UfmgLeaks | aff99a813588208cfca5386b419a2297125d8eef | [
"MIT"
] | 3 | 2020-04-13T03:50:28.000Z | 2020-06-25T16:39:14.000Z | app.py | brenopoggiali/UfmgLeaks | aff99a813588208cfca5386b419a2297125d8eef | [
"MIT"
] | null | null | null | app.py | brenopoggiali/UfmgLeaks | aff99a813588208cfca5386b419a2297125d8eef | [
"MIT"
] | null | null | null | from models import User
from flask_bcrypt import Bcrypt
import db
import os
import sqlite3
import datetime
import pandas as pd
from flask import Flask, request, render_template, redirect, url_for
from flask_login import LoginManager, login_user, logout_user, \
login_required, current_user
app =... | 34.867347 | 79 | 0.596625 |
9fc1e0465e211705add5ebf2e42bfc636d420787 | 327 | py | Python | src/680B.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 2 | 2016-08-19T09:47:03.000Z | 2016-10-01T10:15:03.000Z | src/680B.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | null | null | null | src/680B.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 1 | 2015-07-01T23:57:32.000Z | 2015-07-01T23:57:32.000Z | n, a = map(int, input().split(" "))
t = list(map(int, input().split(" ")))
result = t[a-1]
for i in range(1, n):
if a-1-i >= 0 and t[a-1-i] and a-1+i < n and t[a-1+i]:
result += 2;
if a-1-i < 0 and a-1+i < n:
result += t[a-1+i]
if a-1-i >= 0 and a-1+i >= n:
result += t[a-1-i]
print(r... | 27.25 | 58 | 0.464832 |
58c229cb1e5de3749e41b8bb012a5649e152c70a | 2,006 | py | Python | aws_status/feed.py | PierreF/aws-status | 3d7e96bcc80b7db06f70b959089ceb3292ac989c | [
"MIT"
] | null | null | null | aws_status/feed.py | PierreF/aws-status | 3d7e96bcc80b7db06f70b959089ceb3292ac989c | [
"MIT"
] | null | null | null | aws_status/feed.py | PierreF/aws-status | 3d7e96bcc80b7db06f70b959089ceb3292ac989c | [
"MIT"
] | null | null | null | import feedparser
import re
STATUS_OK = 0
STATUS_WARNING = 1
STATUS_CRITICAL = 2
STATUS_UNKNOWN = 3
def get_status(title, description):
if title.startswith("Service is operating normally") \
or title.startswith("Informational message: [RESOLVED]") \
or title.startswith("Informational message: [Res... | 32.885246 | 92 | 0.610169 |
f9abbedd9c474cb9169669045beb72dc8d6586c0 | 3,277 | py | Python | colorer/__main__.py | kiddae/colorer | 5f3221b2ca0f77b4329c8b668ca9cecf8c50563e | [
"MIT"
] | 11 | 2021-08-04T22:00:50.000Z | 2022-01-15T10:01:15.000Z | colorer/__main__.py | kiddae/colorer | 5f3221b2ca0f77b4329c8b668ca9cecf8c50563e | [
"MIT"
] | 1 | 2021-12-23T02:40:27.000Z | 2021-12-30T22:12:58.000Z | colorer/__main__.py | kiddae/colorer | 5f3221b2ca0f77b4329c8b668ca9cecf8c50563e | [
"MIT"
] | 2 | 2022-01-05T06:31:29.000Z | 2022-02-23T05:06:20.000Z | #!/usr/bin/env python3
import os
import subprocess
import sys
import glob
import re
import argparse
HOME = os.path.expanduser('~') + '/'
COMMANDS = HOME + '.config/colorer/commands'
def init_parser():
parser = argparse.ArgumentParser()
parser.add_argument(
'colorscheme', nargs='?', help='Path to the ... | 33.10101 | 113 | 0.58224 |
fff262e26a21132b9158d25844e938680c9bf2c6 | 9,033 | py | Python | cryptoapis/model/get_block_details_by_block_height_response_item_blockchain_specific_bitcoin_cash.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | cryptoapis/model/get_block_details_by_block_height_response_item_blockchain_specific_bitcoin_cash.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | null | null | null | cryptoapis/model/get_block_details_by_block_height_response_item_blockchain_specific_bitcoin_cash.py | xan187/Crypto_APIs_2.0_SDK_Python | a56c75df54ef037b39be1315ed6e54de35bed55b | [
"MIT"
] | 1 | 2021-07-21T03:35:18.000Z | 2021-07-21T03:35:18.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 45.39196 | 484 | 0.61065 |
5cdeacfbcdb24b32e8e7eb132a839ac279bce0bf | 1,438 | py | Python | src/sentry/mediators/token_exchange/validator.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | src/sentry/mediators/token_exchange/validator.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/mediators/token_exchange/validator.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import six
from sentry.coreapi import APIUnauthorized
from sentry.mediators import Mediator, Param
from sentry.models import ApiApplication, SentryApp
from sentry.utils.cache import memoize
class Validator(Mediator):
"""
Validates general authorization params for all t... | 28.196078 | 76 | 0.701669 |
feb0d99726b5be646591b24e919e5253539ad2e7 | 8,572 | py | Python | bme280.py | jwlauer/PressureToGoogleSheets | 60a4ffe1e27482f5d3c9a10fc60a71ca72e5ca64 | [
"MIT"
] | null | null | null | bme280.py | jwlauer/PressureToGoogleSheets | 60a4ffe1e27482f5d3c9a10fc60a71ca72e5ca64 | [
"MIT"
] | null | null | null | bme280.py | jwlauer/PressureToGoogleSheets | 60a4ffe1e27482f5d3c9a10fc60a71ca72e5ca64 | [
"MIT"
] | 1 | 2021-08-31T17:27:34.000Z | 2021-08-31T17:27:34.000Z | ## Authors: Paul Cunnane 2016, Peter Dahlebrg 2016
#
# This module borrows from the Adafruit BME280 Python library. Original
# Copyright notices are reproduced below.
#
# Those libraries were written for the Raspberry Pi. This modification is
# intended for the MicroPython and esp8266 boards.
#
# Copyright (c) ... | 39.141553 | 81 | 0.563929 |
30813fe317a8e9153fd5fe453c493a995896e68d | 22,201 | py | Python | src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py | diberry/azure-cli | 302999245cbb13b890b0a74f03443c577bd4bfae | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py | diberry/azure-cli | 302999245cbb13b890b0a74f03443c577bd4bfae | [
"MIT"
] | 4 | 2018-08-08T20:01:17.000Z | 2018-09-17T15:20:06.000Z | src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/latest/test_vm_actions.py | diberry/azure-cli | 302999245cbb13b890b0a74f03443c577bd4bfae | [
"MIT"
] | 1 | 2018-04-14T01:46:00.000Z | 2018-04-14T01:46:00.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 47.438034 | 173 | 0.65934 |
d3167ded68efe91deaf1a656e0940e985c564aff | 369 | py | Python | profile_playground.py | anki-code/xunter | 15eb021b9367a4e0d8879f0b6eeb97efd4087a95 | [
"MIT"
] | 3 | 2021-03-20T16:18:09.000Z | 2022-01-01T22:48:38.000Z | profile_playground.py | anki-code/xunter | 15eb021b9367a4e0d8879f0b6eeb97efd4087a95 | [
"MIT"
] | null | null | null | profile_playground.py | anki-code/xunter | 15eb021b9367a4e0d8879f0b6eeb97efd4087a95 | [
"MIT"
] | 1 | 2022-03-18T20:45:41.000Z | 2022-03-18T20:45:41.000Z | import os
from hunter import trace, StackPrinter
from xunter import CallPrinterProfile, StackPrinterProfile
trace(
depth_lt=int(os.environ.get('XUNTER_DEPTH_LT', 20)),
stdlib=False,
#action=CallPrinterProfile
action=StackPrinterProfile
)
a = 1
def c():
import time
time.sleep(3)
def b(cnt):
... | 15.375 | 58 | 0.696477 |
0f0d24e17b02e9bcf2605b065039b56ec5880119 | 543 | py | Python | accounts/migrations/0013_auto_20190705_2145.py | RoosDaniel/Fadderjobb | 2333be793930c4b45e8c05bde6ae29044fdc900c | [
"MIT"
] | 2 | 2018-11-16T12:38:24.000Z | 2019-07-15T05:18:31.000Z | accounts/migrations/0013_auto_20190705_2145.py | RoosDaniel/Fadderjobb | 2333be793930c4b45e8c05bde6ae29044fdc900c | [
"MIT"
] | 8 | 2020-02-11T23:17:26.000Z | 2022-02-10T09:33:44.000Z | accounts/migrations/0013_auto_20190705_2145.py | RoosDaniel/Fadderjobb | 2333be793930c4b45e8c05bde6ae29044fdc900c | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-05 19:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0012_auto_20190528_2022'),
]
operations = [
migrations.AddField(
model_name='user',
name='placing',
... | 22.625 | 61 | 0.570902 |
90c47e592681eb7a81873a5531ff9291d03f59a9 | 2,383 | py | Python | nefct/geometry/scanner_config.py | bill52547/CT-NEF | f8b29452ab376069218284f95603a0cc6c7e96ac | [
"Apache-2.0"
] | null | null | null | nefct/geometry/scanner_config.py | bill52547/CT-NEF | f8b29452ab376069218284f95603a0cc6c7e96ac | [
"Apache-2.0"
] | null | null | null | nefct/geometry/scanner_config.py | bill52547/CT-NEF | f8b29452ab376069218284f95603a0cc6c7e96ac | [
"Apache-2.0"
] | null | null | null | from nefct import nef_class
import numpy as np
from .detector_config import DetectorDirectAConfig, DetectorDirectBConfig
__all__ = ('ScannerConfig2D', 'ScannerConfig3D')
class ScannerConfig:
pass
'''
Source(S) --> Axis(A) --> Detector Isocenter(I)
'''
@nef_class
class ScannerConfig2D(ScannerConfig):
mode: ... | 30.551282 | 102 | 0.573227 |
aed7347a045a334f3aea66709aa3d9c7a8853684 | 5,241 | py | Python | templates/spatialdb/UniformVelModel.py | rwalkerlewis/spatialdata | 515c8d9dec21d261d0d654b5c30e6759565268d2 | [
"MIT"
] | 6 | 2017-09-19T11:05:33.000Z | 2019-09-26T08:18:30.000Z | templates/spatialdb/UniformVelModel.py | rwalkerlewis/spatialdata | 515c8d9dec21d261d0d654b5c30e6759565268d2 | [
"MIT"
] | 38 | 2017-06-28T15:44:50.000Z | 2022-02-17T04:04:02.000Z | templates/spatialdb/UniformVelModel.py | rwalkerlewis/spatialdata | 515c8d9dec21d261d0d654b5c30e6759565268d2 | [
"MIT"
] | 11 | 2015-11-09T06:29:35.000Z | 2021-06-02T14:13:59.000Z | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2017 University of California, Davis
#
#... | 36.908451 | 91 | 0.620874 |
73c8fa682b1471b2a23dfad0fb0f9a74a92ba08c | 955 | py | Python | train_multimodel_results.py | vgliner/Chlng_20_Sub | 169d098e5315510df83ad988c7e2067317cef4cf | [
"BSD-2-Clause"
] | null | null | null | train_multimodel_results.py | vgliner/Chlng_20_Sub | 169d098e5315510df83ad988c7e2067317cef4cf | [
"BSD-2-Clause"
] | null | null | null | train_multimodel_results.py | vgliner/Chlng_20_Sub | 169d098e5315510df83ad988c7e2067317cef4cf | [
"BSD-2-Clause"
] | null | null | null | from typing import NamedTuple, List
class BatchResult(NamedTuple):
"""
Represents the result of training for a single batch: the loss
and number of correct classifications.
"""
loss: float
num_correct: int
sum_of_challenge_score: float
class EpochResult(NamedTuple):
"""
Represent... | 24.487179 | 76 | 0.699476 |
c81599721a2457b1d51df6f3cf947aa7b3de8aae | 1,129 | py | Python | Projects/Online Workouts/w3resource/List/program-7.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | 1 | 2019-09-23T15:51:45.000Z | 2019-09-23T15:51:45.000Z | Projects/Online Workouts/w3resource/List/program-7.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | 5 | 2021-02-08T20:47:19.000Z | 2022-03-12T00:35:44.000Z | Projects/Online Workouts/w3resource/List/program-7.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | null | null | null | #!/usr/bin/env python 3
############################################################################################
# #
# Program purpose: Removes duplicate items for list of integer data. #
# Program... | 49.086957 | 92 | 0.406554 |
a55b0a3415b2a4dc55ef3274990a235086a09f50 | 5,241 | py | Python | mudparser/profile.py | elmiomar/mudparser | 7bae239fe2e7e82746ef88150f62673793872973 | [
"MIT"
] | null | null | null | mudparser/profile.py | elmiomar/mudparser | 7bae239fe2e7e82746ef88150f62673793872973 | [
"MIT"
] | null | null | null | mudparser/profile.py | elmiomar/mudparser | 7bae239fe2e7e82746ef88150f62673793872973 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Profile object representing the mud file profile.
Reads a json formatted file and returns an object.
"""
import json
import os
from mudparser.acl import AccessList
__all__ = ['Profile']
class Profile:
def __init__(self, file, autoparse=True):
self._file = file
self.vers... | 37.978261 | 91 | 0.613433 |
93110fd23ced0c430eeb9c2ce599d36d4ce9b20a | 1,709 | py | Python | app/core/migrations/0001_initial.py | DevendraBAJAJ/recipe-app-api | ae6aa3ea4f94d7bd1a3762ebeb9652a70e46bd48 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | DevendraBAJAJ/recipe-app-api | ae6aa3ea4f94d7bd1a3762ebeb9652a70e46bd48 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | DevendraBAJAJ/recipe-app-api | ae6aa3ea4f94d7bd1a3762ebeb9652a70e46bd48 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-04-17 11:26
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 50.264706 | 266 | 0.63897 |
8c16778bdb62b5f0d17c251ee857b9b4bd9c9221 | 6,657 | py | Python | libnessus/test/test_reportitem.py | bmx0r/python-libnessus | bc4ed69bf4c2f6bab2f4c3be7e38613f8c344a62 | [
"CC-BY-3.0"
] | 13 | 2015-12-12T23:23:24.000Z | 2022-01-21T01:50:05.000Z | libnessus/test/test_reportitem.py | bmx0r/python-libnessus | bc4ed69bf4c2f6bab2f4c3be7e38613f8c344a62 | [
"CC-BY-3.0"
] | 5 | 2015-08-26T16:00:34.000Z | 2019-09-25T18:55:12.000Z | libnessus/test/test_reportitem.py | bmx0r/python-libnessus | bc4ed69bf4c2f6bab2f4c3be7e38613f8c344a62 | [
"CC-BY-3.0"
] | 12 | 2015-02-16T01:41:55.000Z | 2022-01-21T01:50:07.000Z | #!/usr/bin/env python
from .test_nessus import TestNessus
from libnessus.objects.reportitem import NessusReportItem
class TestVuln(TestNessus):
"""Unit test of vuln object"""
def test_port(self):
"""test the port return"""
i = 0
for vuln in self.VulnList:
value = vuln.port... | 31.400943 | 76 | 0.543188 |
2ac4d13ed74045fe43dff31a2dc0d1707aed44f8 | 130 | py | Python | src/cfnlint/version.py | AleksaC/cfn-lint | 36cb46192ad1be8c88715c16b4854048f49b18a2 | [
"MIT-0"
] | null | null | null | src/cfnlint/version.py | AleksaC/cfn-lint | 36cb46192ad1be8c88715c16b4854048f49b18a2 | [
"MIT-0"
] | null | null | null | src/cfnlint/version.py | AleksaC/cfn-lint | 36cb46192ad1be8c88715c16b4854048f49b18a2 | [
"MIT-0"
] | null | null | null | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
__version__ = '0.53.0'
| 18.571429 | 66 | 0.715385 |
2aac6fe0447c83ce3d53b9659c70632f61586d42 | 1,241 | py | Python | tests/harness/python/requirements_test.py | johnrichardrinehart/protoc-gen-validate | e13243160377fa537a003e241ebebb22e41aac21 | [
"Apache-2.0"
] | 1,765 | 2019-04-04T18:48:05.000Z | 2022-03-29T18:55:46.000Z | tests/harness/python/requirements_test.py | johnrichardrinehart/protoc-gen-validate | e13243160377fa537a003e241ebebb22e41aac21 | [
"Apache-2.0"
] | 382 | 2019-04-04T18:37:14.000Z | 2022-03-30T23:14:41.000Z | tests/harness/python/requirements_test.py | johnrichardrinehart/protoc-gen-validate | e13243160377fa537a003e241ebebb22e41aac21 | [
"Apache-2.0"
] | 370 | 2019-04-05T15:15:44.000Z | 2022-03-25T16:34:32.000Z | import configparser
# There's two sets of requirements relevant for python. The first set in requirements.txt is installed
# during the Docker build and is used for linting, building, and uploading the PGV python package to PyPI.
#
# The other set is in the install_requires section of setup.cfg. This is what's needed ... | 49.64 | 114 | 0.767929 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.