hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
58ee81b6216af85f7d5be706eaed9b6829571a8b | 10,495 | py | Python | ble2mqtt/devices/kettle_redmond.py | e-minguez/ble2mqtt | ff729dc6b259b00fc2295bebd73265dcbb27c60d | [
"MIT"
] | null | null | null | ble2mqtt/devices/kettle_redmond.py | e-minguez/ble2mqtt | ff729dc6b259b00fc2295bebd73265dcbb27c60d | [
"MIT"
] | null | null | null | ble2mqtt/devices/kettle_redmond.py | e-minguez/ble2mqtt | ff729dc6b259b00fc2295bebd73265dcbb27c60d | [
"MIT"
] | null | null | null | import asyncio as aio
import json
import logging
import uuid
from ..protocols.redmond import (ColorTarget, Kettle200State, Mode,
RedmondKettle200Protocol, RunState)
from .base import Device
from .uuids import DEVICE_NAME
logger = logging.getLogger(__name__)
UUID_NORDIC_TX = uuid.UUID... | 35.941781 | 79 | 0.495569 |
e21d73d4f841d3d2fb41a6ebe2ae668e863c21cd | 2,272 | py | Python | sky/tools/webkitpy/layout_tests/reftests/extract_reference_link.py | domenic/mojo | 53dda76fed90a47c35ed6e06baf833a0d44495b8 | [
"BSD-3-Clause"
] | 5,964 | 2016-09-27T03:46:29.000Z | 2022-03-31T16:25:27.000Z | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 459 | 2016-09-29T00:51:38.000Z | 2022-03-07T14:37:46.000Z | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link.py | w4454962/miniblink49 | b294b6eacb3333659bf7b94d670d96edeeba14c0 | [
"Apache-2.0"
] | 1,006 | 2016-09-27T05:17:27.000Z | 2022-03-30T02:46:51.000Z | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 35.5 | 72 | 0.709507 |
b7e830ac23fcac3a40813eef2cc5607852c23d4a | 4,623 | py | Python | tests/regressiontests/middleware/tests.py | Yuanoung/djg-master | 40413f268dd7dc3ca2d48f51c9327928b0b922de | [
"BSD-3-Clause"
] | 23 | 2015-01-26T12:16:59.000Z | 2022-02-10T10:58:40.000Z | tests/regressiontests/middleware/tests.py | joetyson/django | c3699190186561d5c216b2a77ecbfc487d42a734 | [
"BSD-3-Clause"
] | 1 | 2021-08-20T19:02:08.000Z | 2021-08-20T19:02:08.000Z | tests/regressiontests/middleware/tests.py | joetyson/django | c3699190186561d5c216b2a77ecbfc487d42a734 | [
"BSD-3-Clause"
] | 11 | 2016-04-15T06:22:58.000Z | 2022-02-10T10:58:41.000Z | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.http import HttpRequest
from django.middleware.common import CommonMiddleware
from django.conf import settings
class CommonMiddlewareTest(TestCase):
def setUp(self):
self.slash = settings.APPEND_SLASH
self.www = settings.PREPEND_... | 36.117188 | 79 | 0.640926 |
9db98688b23356fca3ce2d595167d9afb4ff0b7e | 25,758 | py | Python | src/cryptoadvance/specter/specter.py | abitmore/specter-desktop | c4d992c8ea31f20cfa80e210ff967128f9623799 | [
"MIT"
] | 1 | 2021-09-06T16:58:30.000Z | 2021-09-06T16:58:30.000Z | src/cryptoadvance/specter/specter.py | abitmore/specter-desktop | c4d992c8ea31f20cfa80e210ff967128f9623799 | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/specter.py | abitmore/specter-desktop | c4d992c8ea31f20cfa80e210ff967128f9623799 | [
"MIT"
] | null | null | null | import copy
import json
import logging
import os
import platform
import random
import secrets
import signal
import threading
import time
import traceback
import zipfile
from io import BytesIO
from sys import exit
from urllib.parse import urlparse
import requests
from requests.exceptions import ConnectionError
from ste... | 33.71466 | 98 | 0.630445 |
a074f944ce154268484d0f6e3f10e2ea9a0da5a2 | 4,227 | py | Python | spark_auto_mapper_fhir/backbone_elements/claim_related.py | imranq2/SparkAutoMapper.FHIR | dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2 | [
"Apache-2.0"
] | 1 | 2020-10-31T23:25:07.000Z | 2020-10-31T23:25:07.000Z | spark_auto_mapper_fhir/backbone_elements/claim_related.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | spark_auto_mapper_fhir/backbone_elements/claim_related.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import Optional, TYPE_CHECKING
from spark_auto_mapper_fhir.fhir_types.list import FhirList
from spark_auto_mapper_fhir.fhir_types.string import FhirString
from spark_auto_mapper_fhir.extensions.extension_base import ExtensionBase
from spark_auto_mapper_fhir.base_types.fh... | 44.494737 | 177 | 0.723918 |
141d1e4fa3b41530c5e1438ff7ff18d230370354 | 11,840 | py | Python | selfdrive/car/volvo/carcontroller.py | xirtam531us/openpilot | 5b0a8da36e45c743bbbbba3bdb8057950f64dfaf | [
"MIT"
] | 1 | 2020-12-15T08:53:56.000Z | 2020-12-15T08:53:56.000Z | selfdrive/car/volvo/carcontroller.py | xirtam531us/openpilot | 5b0a8da36e45c743bbbbba3bdb8057950f64dfaf | [
"MIT"
] | null | null | null | selfdrive/car/volvo/carcontroller.py | xirtam531us/openpilot | 5b0a8da36e45c743bbbbba3bdb8057950f64dfaf | [
"MIT"
] | 2 | 2020-12-07T18:28:13.000Z | 2021-02-08T11:57:56.000Z | from common.numpy_fast import clip, interp
from selfdrive.car.volvo.values import CAR, PLATFORM, DBC, CarControllerParams as CCP
from selfdrive.car.volvo import volvocan
from opendbc.can.packer import CANPacker
from collections import deque
class SteerCommand:
angle_request = 0
steer_direction = 0
trqlim = 0
... | 42.589928 | 180 | 0.680321 |
9966374aafb18aed2871e8b0ad2d97aab8b80a12 | 3,643 | py | Python | pymit/mutualinformation.py | tud-zih-energy/pymit | 773bab8c66254738eee3fb90bc02b4515d551150 | [
"BSD-3-Clause"
] | 4 | 2019-05-29T13:07:54.000Z | 2022-01-18T16:52:48.000Z | pymit/mutualinformation.py | tud-zih-energy/pymit | 773bab8c66254738eee3fb90bc02b4515d551150 | [
"BSD-3-Clause"
] | 2 | 2020-10-30T11:48:33.000Z | 2020-12-14T20:20:51.000Z | pymit/mutualinformation.py | tud-zih-energy/pymit | 773bab8c66254738eee3fb90bc02b4515d551150 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T05:54:50.000Z | 2020-10-27T05:54:50.000Z | import math
import numpy as np
import pymit
LOG_BASE = 2
def I(X, Y, bins):
"""
Calculates the mutual information of X and Y.
If X and Y are already discretised, set \ref bins to the amount of bins, aka states of X and Y.
If X and Y are not discretised, \ref bins will be used, to diskretise X and Y i... | 36.79798 | 206 | 0.607741 |
1f5507c9bd12dc367738d818bde71e13fca7ddaa | 4,952 | py | Python | zihu_clone/qa/views.py | Kelvinson/zhihu_clone | 8347ffbc3578f88f27c37dc6c04884ef20225d63 | [
"MIT"
] | null | null | null | zihu_clone/qa/views.py | Kelvinson/zhihu_clone | 8347ffbc3578f88f27c37dc6c04884ef20225d63 | [
"MIT"
] | null | null | null | zihu_clone/qa/views.py | Kelvinson/zhihu_clone | 8347ffbc3578f88f27c37dc6c04884ef20225d63 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from django.urls import reverse_lazy
from django.contrib import messages
from django.http import JsonResponse
from django.core.exceptions import PermissionDenied
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.decor... | 35.884058 | 92 | 0.732633 |
01037f136df8446ca4405e048539230209845e93 | 2,432 | py | Python | bnw/handlers/base.py | l29ah/bnw | d03db025e12c96de42c9a7a4ede329d7c9d216c5 | [
"BSD-2-Clause"
] | 23 | 2015-01-14T13:22:37.000Z | 2022-01-11T11:38:43.000Z | bnw/handlers/base.py | l29ah/bnw | d03db025e12c96de42c9a7a4ede329d7c9d216c5 | [
"BSD-2-Clause"
] | 31 | 2015-01-27T19:57:45.000Z | 2018-10-04T22:35:22.000Z | bnw/handlers/base.py | l29ah/bnw | d03db025e12c96de42c9a7a4ede329d7c9d216c5 | [
"BSD-2-Clause"
] | 11 | 2015-01-02T10:29:14.000Z | 2018-06-28T13:09:53.000Z | # -*- coding: utf-8 -*-
import re
from twisted.internet import defer, reactor
import bnw.core.base
# please don't remove the group from the regexp - it is used in
# bnw/xmpp/parser_simplified.py
USER_RE = ur'@?([0-9A-Za-z_-]+)'
MESSAGE_RE = r'#?([0-9A-Za-z]+)'
COMMENT_RE = r'#?([0-9A-Za-z]+(?:#|/)[0-9A-Za-z]+)'
MESSA... | 27.325843 | 85 | 0.571135 |
173be1aa247246b7fa01898a58e6fd1c44156ffd | 841 | py | Python | task_manager/users/models.py | Sidarth-V/task_manager | 01b7d2ea1d43c74ecf7d4afd8b3e4a1b9e799deb | [
"MIT"
] | null | null | null | task_manager/users/models.py | Sidarth-V/task_manager | 01b7d2ea1d43c74ecf7d4afd8b3e4a1b9e799deb | [
"MIT"
] | 4 | 2022-03-14T23:35:40.000Z | 2022-03-24T23:30:25.000Z | task_manager/users/models.py | Sidarth-V/task_manager | 01b7d2ea1d43c74ecf7d4afd8b3e4a1b9e799deb | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db.models import CharField
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
class User(AbstractUser):
"""
Default custom user model for sidarth-task-manager.
If adding fields that need to be filled at use... | 31.148148 | 74 | 0.694411 |
ca77c0e8b9232f7abbcdc675d61ad1e88f347424 | 4,208 | py | Python | .history/run_update_20220328124717.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220328124717.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220328124717.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | from asyncio.subprocess import STDOUT
from fileinput import filename
from genericpath import exists
import subprocess
from pathlib import Path
from os import remove, rename, path
import yaml
def removeFileIfExists(file_path):
if path.exists(file_path):
remove(file_path)
def checkExistence(path_to_check)... | 30.057143 | 100 | 0.650903 |
b6a9f15b151d2b54ccb901e6b81ca2ea4b754f21 | 60 | py | Python | lights/__main__.py | fwcd/lights | 8a7d338d5d5aaa2206d3adbbddf2e132cc1c9b76 | [
"MIT"
] | null | null | null | lights/__main__.py | fwcd/lights | 8a7d338d5d5aaa2206d3adbbddf2e132cc1c9b76 | [
"MIT"
] | 3 | 2022-02-24T04:21:48.000Z | 2022-03-23T17:43:43.000Z | lights/__main__.py | fwcd/lights | 8a7d338d5d5aaa2206d3adbbddf2e132cc1c9b76 | [
"MIT"
] | null | null | null | import lights
if __name__ == "__main__":
lights.main()
| 12 | 26 | 0.666667 |
55a2d059b4fa7f4f0fc0f277a5616f3311a281a0 | 1,881 | py | Python | objectModel/Python/cdm/persistence/cdmfolder/e2e_relationship_persistence.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 884 | 2019-05-10T02:09:10.000Z | 2022-03-31T14:02:00.000Z | objectModel/Python/cdm/persistence/cdmfolder/e2e_relationship_persistence.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 171 | 2019-06-10T11:34:37.000Z | 2022-03-31T22:50:12.000Z | objectModel/Python/cdm/persistence/cdmfolder/e2e_relationship_persistence.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 340 | 2019-05-07T18:00:16.000Z | 2022-03-31T12:00:15.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
from cdm.enums import CdmObjectType
from cdm.objectmodel import CdmCorpusContext, CdmE2ERelationship
from cdm.utilities import CopyOptions, ResolveOptions, copy_da... | 47.025 | 114 | 0.760766 |
9776691f1fc6b9ad2172d3cdd1152dac1c124950 | 8,879 | py | Python | port_range/tests/test_port_range.py | online-labs/port-range | 43b80312f841cc932a4e0ddd7063fa47b17bd4aa | [
"BSD-2-Clause"
] | 3 | 2016-05-08T20:15:24.000Z | 2020-01-07T20:21:17.000Z | port_range/tests/test_port_range.py | online-labs/port-range | 43b80312f841cc932a4e0ddd7063fa47b17bd4aa | [
"BSD-2-Clause"
] | 7 | 2017-08-02T04:59:09.000Z | 2020-04-02T09:16:11.000Z | port_range/tests/test_port_range.py | online-labs/port-range | 43b80312f841cc932a4e0ddd7063fa47b17bd4aa | [
"BSD-2-Clause"
] | 6 | 2016-05-08T20:15:26.000Z | 2022-03-08T20:54:36.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2016 Scaleway and Contributors. All Rights Reserved.
# Kevin Deldycke <kdeldycke@scaleway.com>
#
# Licensed under the BSD 2-Clause License (the "License"); you may not use this
# file except in compliance with the License. You may obtain a copy of t... | 43.101942 | 79 | 0.63622 |
fb46e6061d8e9f4c79332225ecbc920c127cffec | 1,708 | py | Python | app/oauth_office365/urls.py | ricardojba/PwnAuth | 875c4689bb0e35abdfa5ddda7fe89d15d1e52c1f | [
"Apache-2.0"
] | null | null | null | app/oauth_office365/urls.py | ricardojba/PwnAuth | 875c4689bb0e35abdfa5ddda7fe89d15d1e52c1f | [
"Apache-2.0"
] | null | null | null | app/oauth_office365/urls.py | ricardojba/PwnAuth | 875c4689bb0e35abdfa5ddda7fe89d15d1e52c1f | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
from django.views.generic.base import TemplateView
from django.contrib.auth.decorators import login_required
app_name = 'office365'
ID_REGEX = '[a-zA-Z0-9\-\=\_]+'
#TODO fix that URL param needs to be hardcoded in
urlpatterns = [
url(r'^schema$', login_requir... | 65.692308 | 200 | 0.699649 |
2d57492086a15983f7d3ae9c2ff6938af9209524 | 10,187 | py | Python | test/functional/feature_llmq_is_retroactive.py | luckycoinblu/luckycoinoro | 40524d4143ab67def698ccbd87ad6a3885d5720e | [
"MIT"
] | null | null | null | test/functional/feature_llmq_is_retroactive.py | luckycoinblu/luckycoinoro | 40524d4143ab67def698ccbd87ad6a3885d5720e | [
"MIT"
] | 1 | 2022-01-27T01:34:48.000Z | 2022-01-27T01:59:47.000Z | test/functional/feature_llmq_is_retroactive.py | luckycoinblu/luckycoinoro | 40524d4143ab67def698ccbd87ad6a3885d5720e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2021 The Dash Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import LuckyCoinOROTestFramework
fr... | 50.935 | 167 | 0.68342 |
de1a52cad96fdb35b7f0ac6ada0267276b31a686 | 325 | py | Python | qs_techtest/config.py | greener2/qs_techtest | 7974c4d9c6a5e2d0668826cd783f4f66d076d605 | [
"MIT"
] | null | null | null | qs_techtest/config.py | greener2/qs_techtest | 7974c4d9c6a5e2d0668826cd783f4f66d076d605 | [
"MIT"
] | null | null | null | qs_techtest/config.py | greener2/qs_techtest | 7974c4d9c6a5e2d0668826cd783f4f66d076d605 | [
"MIT"
] | null | null | null | """QS Tech Test config objects"""
import os
class BaseConfig:
SECRET_KEY = os.getenv("SECRET_KEY") or "ohsosecret"
SQLALCHEMY_TRACK_MODIFICATIONS = False
class Development(BaseConfig):
SQLALCHEMY_DATABASE_URI = os.getenv("DATABASE_URI")
class Testing(BaseConfig):
SQLALCHEMY_DATABASE_URI = "sqlite... | 19.117647 | 56 | 0.741538 |
9808ff4ea22152c600631d16d31e9ed7c53e0c7a | 1,889 | bzl | Python | javascript/tink_javascript_deps.bzl | yfung/tink | e6792c3b57986623c536af1161ec6dad4f6159e4 | [
"Apache-2.0"
] | 1 | 2022-03-15T03:21:44.000Z | 2022-03-15T03:21:44.000Z | javascript/tink_javascript_deps.bzl | yfung/tink | e6792c3b57986623c536af1161ec6dad4f6159e4 | [
"Apache-2.0"
] | 1 | 2022-03-02T13:25:38.000Z | 2022-03-02T13:25:38.000Z | javascript/tink_javascript_deps.bzl | yfung/tink | e6792c3b57986623c536af1161ec6dad4f6159e4 | [
"Apache-2.0"
] | null | null | null | """Dependencies of TypeScript/JavaScript Tink."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def tink_javascript_deps():
"""Load dependencies of TypeScript/JavaScript Tink."""
if not native.existing_rule("build_bazel_rules_nodejs"):
# Release from 2021-10-11
http_arch... | 44.97619 | 130 | 0.661196 |
a4a9ce08c7b8ae8b0afa64d7d52dff184522e4b9 | 799 | py | Python | apps/article/search_indexes.py | PyCN/BlogBackendProject | 144ea98d54c624cf93a69816779e4f3483ab80a2 | [
"Apache-2.0"
] | 335 | 2018-02-06T11:40:44.000Z | 2022-02-01T07:55:24.000Z | apps/article/search_indexes.py | PyCN/BlogBackendProject | 144ea98d54c624cf93a69816779e4f3483ab80a2 | [
"Apache-2.0"
] | 18 | 2018-03-11T05:02:27.000Z | 2022-03-11T23:18:34.000Z | apps/article/search_indexes.py | PyCN/BlogBackendProject | 144ea98d54c624cf93a69816779e4f3483ab80a2 | [
"Apache-2.0"
] | 83 | 2018-03-02T03:24:06.000Z | 2021-12-15T05:04:09.000Z | from haystack import indexes
from .models import ArticleDetail
class ArticleDetailIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
title = indexes.CharField(model_attr='article_info__title')
author = indexes.CharField(model_attr='article_info__autho... | 36.318182 | 73 | 0.753442 |
9ad3ab05c77905b1d7a63e40a3292ec7c8204a06 | 9,649 | py | Python | examples/train_pattern_imagenet.py | rtygbwwwerr/innvestigate | de6d9a191d969a542ab1f7ab3fb615ede10c7362 | [
"MIT"
] | 2 | 2019-12-19T08:07:28.000Z | 2020-03-12T02:57:55.000Z | examples/train_pattern_imagenet.py | rtygbwwwerr/innvestigate | de6d9a191d969a542ab1f7ab3fb615ede10c7362 | [
"MIT"
] | null | null | null | examples/train_pattern_imagenet.py | rtygbwwwerr/innvestigate | de6d9a191d969a542ab1f7ab3fb615ede10c7362 | [
"MIT"
] | 1 | 2020-11-06T01:52:28.000Z | 2020-11-06T01:52:28.000Z | # Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | 37.254826 | 98 | 0.500466 |
c806742e80254b963146b42d1133c8046e69a668 | 1,133 | py | Python | stubs.min/System/Windows/Forms/__init___parts/SecurityIDType.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Forms/__init___parts/SecurityIDType.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Forms/__init___parts/SecurityIDType.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class SecurityIDType(Enum,IComparable,IFormattable,IConvertible):
"""
This enumeration is not used.
enum SecurityIDType,values: Alias (4),Computer (9),DeletedAccount (6),Domain (3),Group (2),Invalid (7),Unknown (8),User (1),WellKnownGroup (5)
"""
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq... | 27.634146 | 215 | 0.670786 |
f2caf84ab6ea9c1b04852b35415e15563df46988 | 1,372 | py | Python | pyclesperanto_prototype/_tier1/_not_equal_constant.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 64 | 2020-03-18T12:11:22.000Z | 2022-03-31T08:19:18.000Z | pyclesperanto_prototype/_tier1/_not_equal_constant.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 148 | 2020-05-14T06:14:11.000Z | 2022-03-26T15:02:31.000Z | pyclesperanto_prototype/_tier1/_not_equal_constant.py | elsandal/pyclesperanto_prototype | 7bda828813b86b44b63d73d5e8f466d9769cded1 | [
"BSD-3-Clause"
] | 16 | 2020-05-31T00:53:44.000Z | 2022-03-23T13:20:57.000Z | from .._tier0 import execute, create_binary_like
from .._tier0 import plugin_function
from .._tier0 import Image
@plugin_function(categories=['binarize', 'in assistant'], output_creator=create_binary_like)
def not_equal_constant(source : Image, destination : Image = None, constant : float = 0):
"""Determines if tw... | 31.906977 | 206 | 0.658163 |
06b65fdeb52139885ab0dd249b180fa95ba923aa | 8,224 | py | Python | tests/test_formal_sram.py | StanfordAHA/lake | 9a17e86a3c80fbc2d5adfb8c0734a9c93d74458d | [
"BSD-3-Clause"
] | 11 | 2019-10-14T02:05:38.000Z | 2022-03-10T14:10:22.000Z | tests/test_formal_sram.py | StanfordAHA/lake | 9a17e86a3c80fbc2d5adfb8c0734a9c93d74458d | [
"BSD-3-Clause"
] | 29 | 2019-09-02T05:49:40.000Z | 2022-02-26T00:57:54.000Z | tests/test_formal_sram.py | StanfordAHA/lake | 9a17e86a3c80fbc2d5adfb8c0734a9c93d74458d | [
"BSD-3-Clause"
] | 1 | 2021-04-16T20:26:13.000Z | 2021-04-16T20:26:13.000Z | from lake.top.lake_top import *
import fault
import pytest
import tempfile
@pytest.mark.skip
def test_formal_sram():
lt_dut, n, u, t = get_formal_module("sram")
magma_dut = kts.util.to_magma(lt_dut,
flatten_array=True,
check_multiple_driver=... | 56.717241 | 91 | 0.793531 |
c29dc1b8b95238e1cb4039ce6ab9c1a9f78b295b | 1,306 | py | Python | bin/pathed.py | pgreze/dotfiles | eff9226421ff3bdfbba131f6f10527bb206a25ca | [
"Apache-2.0"
] | 1 | 2021-01-07T02:46:17.000Z | 2021-01-07T02:46:17.000Z | bin/pathed.py | pgreze/dotfiles | eff9226421ff3bdfbba131f6f10527bb206a25ca | [
"Apache-2.0"
] | 15 | 2019-09-22T04:31:01.000Z | 2021-03-13T03:47:42.000Z | bin/pathed.py | pgreze/dotfiles | eff9226421ff3bdfbba131f6f10527bb206a25ca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import os.path
import sys
import typer
from typing import List
paths = lambda: (v.rstrip("/") for v in os.environ["PATH"].split(":"))
app = typer.Typer(help="""PATH editor utility.
Expected usages:
if {cli} exists /usr/local/bin; then TODO; fi
export PATH="$... | 27.208333 | 103 | 0.661562 |
505d914a04adc35160331ede7f00cdcdd3df0299 | 37,334 | py | Python | netbox/ipam/tests/test_api.py | 0xAalaoui/netbox | 07364abf9e9ff193bad49b790e657382cf186f0c | [
"Apache-2.0"
] | 1 | 2018-07-31T06:54:02.000Z | 2018-07-31T06:54:02.000Z | netbox/ipam/tests/test_api.py | 0xAalaoui/netbox | 07364abf9e9ff193bad49b790e657382cf186f0c | [
"Apache-2.0"
] | null | null | null | netbox/ipam/tests/test_api.py | 0xAalaoui/netbox | 07364abf9e9ff193bad49b790e657382cf186f0c | [
"Apache-2.0"
] | 1 | 2018-07-31T06:54:11.000Z | 2018-07-31T06:54:11.000Z | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.urls import reverse
from netaddr import IPNetwork
from rest_framework import status
from rest_framework.test import APITestCase
from dcim.models import Device, DeviceRole, DeviceType, Manufacturer, Site
from ipam.constants... | 36.782266 | 106 | 0.601864 |
efdf607e2e75baa2446cfb851ee6565aa0db6bd3 | 6,356 | py | Python | tests/commands/mc-1.13/test_scoreboard.py | Le0Developer/mcast | bdabd897e399ff17c734b9e02d3e1e5099674a1c | [
"MIT"
] | 2 | 2021-12-28T14:10:13.000Z | 2022-01-12T16:59:20.000Z | tests/commands/mc-1.13/test_scoreboard.py | Le0Developer/mcast | bdabd897e399ff17c734b9e02d3e1e5099674a1c | [
"MIT"
] | 11 | 2021-01-18T09:00:23.000Z | 2021-01-29T09:29:04.000Z | tests/commands/mc-1.13/test_scoreboard.py | Le0Developer/mcast | bdabd897e399ff17c734b9e02d3e1e5099674a1c | [
"MIT"
] | null | null | null |
from mcfunction.versions.mc_1_13.scoreboard import (
scoreboard, ParsedScoreboardCommand
)
from mcfunction.nodes import EntityNode
def test_scoreboard_objectives_add():
parsed = scoreboard.parse('scoreboard objectives add testobjective dummy')
parsed: ParsedScoreboardCommand
assert parsed.category.v... | 34.356757 | 79 | 0.711454 |
17349559f5717ff3f76c9b9bafeb8655285be306 | 3,509 | py | Python | packages/v8env/vendor/whatwg-streams/reference-implementation/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py | GagnDeep/v8-isolates | b9fa6b88fc029fadf5a8eef71b803589959c4da5 | [
"Apache-2.0"
] | null | null | null | packages/v8env/vendor/whatwg-streams/reference-implementation/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py | GagnDeep/v8-isolates | b9fa6b88fc029fadf5a8eef71b803589959c4da5 | [
"Apache-2.0"
] | null | null | null | packages/v8env/vendor/whatwg-streams/reference-implementation/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py | GagnDeep/v8-isolates | b9fa6b88fc029fadf5a8eef71b803589959c4da5 | [
"Apache-2.0"
] | null | null | null | from .base import Browser, ExecutorBrowser, require_arg
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401
SeleniumRefTestExecutor) # noqa: F401
from ..executors.executorwebkit im... | 34.742574 | 84 | 0.618695 |
99df1e94aefbfc9e2ca02726bd1aab50e9df9159 | 784 | py | Python | glhe/profiles/flow_factory.py | stianchris/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 2 | 2018-11-06T08:04:04.000Z | 2020-10-09T14:52:36.000Z | glhe/profiles/flow_factory.py | stianchris/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 68 | 2018-03-27T01:43:22.000Z | 2019-09-09T12:05:44.000Z | glhe/profiles/flow_factory.py | mitchute/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 4 | 2018-05-24T03:02:44.000Z | 2021-08-16T13:54:09.000Z | from typing import Union
from glhe.input_processor.input_processor import InputProcessor
from glhe.output_processor.output_processor import OutputProcessor
from glhe.profiles.constant_flow import ConstantFlow
from glhe.profiles.external_flow import ExternalFlow
def make_flow_profile(inputs: dict, ip: InputProcessor,... | 43.555556 | 100 | 0.6875 |
d4d337261f363a75e929fcb01560e55d57e338bd | 374 | py | Python | News-Notices-PressRelease-Tenders.py | vinaysomawat/NITW-event-updates | 5e58a023c8e326e0cfe25410e6c9781752dec433 | [
"Apache-2.0"
] | 1 | 2019-08-30T16:42:05.000Z | 2019-08-30T16:42:05.000Z | News-Notices-PressRelease-Tenders.py | vinaysomawat/NITW-event-updates | 5e58a023c8e326e0cfe25410e6c9781752dec433 | [
"Apache-2.0"
] | null | null | null | News-Notices-PressRelease-Tenders.py | vinaysomawat/NITW-event-updates | 5e58a023c8e326e0cfe25410e6c9781752dec433 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, render_template
from flask_ask import Ask, statement, question
import bs4 as bs
import urllib.request
source = urllib.request.urlopen('https://www.nitw.ac.in/main/update/News/Notices/Press%20Release/Tenders/').read()
soup = bs.BeautifulSoup(source,'lxml')
events = []
for event in soup.find_all... | 28.769231 | 114 | 0.762032 |
30c94181c7aa07712dca68250baa559ce68207ad | 3,479 | py | Python | src/olympia/translations/forms.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10 | 2018-08-16T04:55:06.000Z | 2022-01-08T16:09:39.000Z | src/olympia/translations/forms.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/translations/forms.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 12 | 2018-08-01T16:46:09.000Z | 2022-01-08T16:09:46.000Z | from django.conf import settings
from django.db import models
from django.forms import ValidationError
from django.forms.utils import ErrorList
from django.utils.encoding import force_text
from django.utils.html import conditional_escape, format_html, format_html_join
from django.utils.safestring import mark_safe
from ... | 35.141414 | 79 | 0.631503 |
4dfd460ff998df414d05fba43fe202b38a0fca0f | 4,615 | py | Python | release/nightly_tests/dataset/sort.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 22 | 2018-05-08T05:52:34.000Z | 2020-04-01T10:09:55.000Z | release/nightly_tests/dataset/sort.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 73 | 2021-09-25T07:11:39.000Z | 2022-03-26T07:10:59.000Z | release/nightly_tests/dataset/sort.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 10 | 2018-04-27T10:50:59.000Z | 2020-02-24T02:41:43.000Z | import ray
import numpy as np
import time
import os
import psutil
import resource
import json
from typing import List
from ray.data.impl.arrow_block import ArrowRow
from ray.data.impl.util import _check_pyarrow_version
from ray.data.block import Block, BlockMetadata
from ray.data.datasource import Datasource, ReadTas... | 29.025157 | 85 | 0.565764 |
e7fcd26e55e0f04576a2db9b6ea17f1a9558f35c | 1,284 | py | Python | KnowledgeMapping/PIL_OpenCV_Exp/other/dtcExp.py | nickliqian/ralph_doc_to_chinese | be120ce2bb94a8e8395630218985f5e51ae087d9 | [
"MIT"
] | 8 | 2018-05-22T01:11:33.000Z | 2020-03-19T01:44:55.000Z | KnowledgeMapping/PIL_OpenCV_Exp/other/dtcExp.py | yangliangguang/keep_learning | 47ab39c726cb28713ad22bf4cf39d6b146715910 | [
"MIT"
] | null | null | null | KnowledgeMapping/PIL_OpenCV_Exp/other/dtcExp.py | yangliangguang/keep_learning | 47ab39c726cb28713ad22bf4cf39d6b146715910 | [
"MIT"
] | 3 | 2018-07-25T09:31:53.000Z | 2019-09-14T14:05:31.000Z | # 二维图像的离散变余弦换(DCT)
# Python3.5
# 库:cv2+numpy+matplotlib
# 作者:James_Ray_Murphy
import cv2
import numpy as np
import matplotlib.pyplot as plt
img = cv2.imread('timg.jpg', 0)
img1 = img.astype('float')
C_temp = np.zeros(img.shape)
dst = np.zeros(img.shape)
m, n = img.shape
N = n
C_temp[0, :] = 1 * np.sqrt(1 / N)
for... | 18.882353 | 81 | 0.666667 |
8d2838e7cd29a501a3abc4128bb77f7e453546e1 | 888 | py | Python | CAIL2020/znwd/prepare.py | ShenDezhou/CAIL | c4cfa98ab4ecedbce34a7a5a186830486047540c | [
"Apache-2.0"
] | 71 | 2020-07-16T01:49:27.000Z | 2022-03-27T16:55:00.000Z | CAIL2020/lbwjx/prepare.py | ShenDezhou/CAIL | c4cfa98ab4ecedbce34a7a5a186830486047540c | [
"Apache-2.0"
] | 11 | 2020-09-18T14:26:25.000Z | 2022-02-09T23:49:33.000Z | CAIL2020/znwd/prepare.py | ShenDezhou/CAIL | c4cfa98ab4ecedbce34a7a5a186830486047540c | [
"Apache-2.0"
] | 16 | 2020-07-15T07:24:30.000Z | 2022-03-19T05:41:11.000Z | """Separate train and valid set for train file.
Author: Tsinghuaboy tsinghua9boy@sina.com
Usage:
python prepare.py --train_in 'data/SMP-CAIL2020-train.csv' \
--train_out 'data/train.csv' \
--valid_out 'data/valid.csv'
"""
import fire
import pandas as pd
def main(train... | 26.909091 | 69 | 0.635135 |
1e2d897d7093cfb1f4ae6eac194d57080fa89fbc | 4,382 | py | Python | datasets/cc_news/cc_news.py | WojciechKusa/datasets | 1406a04c3e911cec2680d8bc513653e0cafcaaa4 | [
"Apache-2.0"
] | 10,608 | 2020-09-10T15:47:50.000Z | 2022-03-31T22:51:47.000Z | datasets/cc_news/cc_news.py | realChainLife/datasets | 98261e8b0b7be4dbaaa71ae188b950f7fbe51bbd | [
"Apache-2.0"
] | 2,396 | 2020-09-10T14:55:31.000Z | 2022-03-31T19:41:04.000Z | datasets/cc_news/cc_news.py | realChainLife/datasets | 98261e8b0b7be4dbaaa71ae188b950f7fbe51bbd | [
"Apache-2.0"
] | 1,530 | 2020-09-10T21:43:10.000Z | 2022-03-31T01:59:12.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets 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/LI... | 38.104348 | 119 | 0.626883 |
a63c9116c9339ce51e48ca23a17801653ab1985c | 9,772 | py | Python | tests/build_feedstock_test.py | nkalband/open-ce | 1cda678df13ccdb2e0fc10a0877df5337e37fa1a | [
"Apache-2.0"
] | null | null | null | tests/build_feedstock_test.py | nkalband/open-ce | 1cda678df13ccdb2e0fc10a0877df5337e37fa1a | [
"Apache-2.0"
] | null | null | null | tests/build_feedstock_test.py | nkalband/open-ce | 1cda678df13ccdb2e0fc10a0877df5337e37fa1a | [
"Apache-2.0"
] | null | null | null | # *****************************************************************
# (C) Copyright IBM Corp. 2020, 2021. 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://w... | 38.321569 | 179 | 0.668236 |
8d0dd4e0c18b974e06afa1a347ff5d8ec8393474 | 344 | py | Python | mmdet/models/roi_heads/sar_modules/__init__.py | DatDoc/mmdetection | 697966f84901587627799e84c98c6e0a6df427b4 | [
"Apache-2.0"
] | null | null | null | mmdet/models/roi_heads/sar_modules/__init__.py | DatDoc/mmdetection | 697966f84901587627799e84c98c6e0a6df427b4 | [
"Apache-2.0"
] | null | null | null | mmdet/models/roi_heads/sar_modules/__init__.py | DatDoc/mmdetection | 697966f84901587627799e84c98c6e0a6df427b4 | [
"Apache-2.0"
] | null | null | null | from .spatial_relation_module import SpatialRelationModule
# from .diseases_relation_module import DiseasesRelationModule
from .contextual_relation_module import ContextualRelationModule
__all__ = ['SpatialRelationModule', 'ContextualRelationModule']
# __all__ = ['SpatialRelationModule', 'DiseasesRelationModule', 'Co... | 49.142857 | 91 | 0.860465 |
a50060d1e28d17813fba602a4aeb64b106ae646f | 615 | py | Python | flask-aws/lib/python2.7/site-packages/ebcli/__init__.py | AccelAI/accel.ai | c380a6473ce30cbbb22f59e6e860fb2854f8d2b4 | [
"MIT"
] | 1 | 2017-11-08T08:15:45.000Z | 2017-11-08T08:15:45.000Z | flask-aws/lib/python2.7/site-packages/ebcli/__init__.py | AccelAI/accel.ai | c380a6473ce30cbbb22f59e6e860fb2854f8d2b4 | [
"MIT"
] | null | null | null | flask-aws/lib/python2.7/site-packages/ebcli/__init__.py | AccelAI/accel.ai | c380a6473ce30cbbb22f59e6e860fb2854f8d2b4 | [
"MIT"
] | 4 | 2016-10-12T23:54:55.000Z | 2020-07-25T23:28:25.000Z | #!/usr/bin/env python
# Copyright 2012-2013 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/
#
# ... | 41 | 79 | 0.744715 |
78b5dd418431435a3e0fdb35a3029a09e8bceeeb | 2,896 | py | Python | variantcall/call/snake/helpers/utils.py | owensgl/haploblocks_2019 | 1b59b2ed8a3c512270cd6e0aec23cedca868d778 | [
"MIT"
] | null | null | null | variantcall/call/snake/helpers/utils.py | owensgl/haploblocks_2019 | 1b59b2ed8a3c512270cd6e0aec23cedca868d778 | [
"MIT"
] | null | null | null | variantcall/call/snake/helpers/utils.py | owensgl/haploblocks_2019 | 1b59b2ed8a3c512270cd6e0aec23cedca868d778 | [
"MIT"
] | null | null | null |
import os, os.path
import errno
import tempfile
import hashlib
import io
import traceback
class Cas(object):
""" Content Addressible Storage.
Storage device/directory where all files are stored under their content address (hash).
put(file) -> key
get(key) -> file
two files with... | 31.824176 | 109 | 0.615677 |
8a0f0509873a984f071605a47e2050f6cee62799 | 2,789 | py | Python | iast/views/project_detail.py | zu1kbackup/DongTai-webapi | ef8df93386e010e0113d0c307f0a8146b55a2fdb | [
"Apache-2.0"
] | null | null | null | iast/views/project_detail.py | zu1kbackup/DongTai-webapi | ef8df93386e010e0113d0c307f0a8146b55a2fdb | [
"Apache-2.0"
] | null | null | null | iast/views/project_detail.py | zu1kbackup/DongTai-webapi | ef8df93386e010e0113d0c307f0a8146b55a2fdb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:owefsad
# software: PyCharm
# project: lingzhi-webapi
from dongtai.endpoint import R
from dongtai.endpoint import UserEndPoint
from dongtai.models.agent import IastAgent
from dongtai.models.project import IastProject
from dongtai.utils import const
from django.util... | 37.186667 | 108 | 0.661886 |
27d86b6cff56fba8ce9310f669fbe17415f0e792 | 1,055 | py | Python | test/test_api.py | CjwRiver/apiAutoTest | 35f1c2475e76dd34089e2cee33b351a1ca97c168 | [
"MIT"
] | null | null | null | test/test_api.py | CjwRiver/apiAutoTest | 35f1c2475e76dd34089e2cee33b351a1ca97c168 | [
"MIT"
] | null | null | null | test/test_api.py | CjwRiver/apiAutoTest | 35f1c2475e76dd34089e2cee33b351a1ca97c168 | [
"MIT"
] | null | null | null | #!/usr/bin/env/ python3
# -*- coding:utf-8 -*-
"""
@project: apiAutoTest
@author: cjw
@file: test_api.py
@ide: PyCharm
@time: 2020/11/22
@desc: 测试方法
"""
from .conftest import pytest
from api.base_requests import BaseRequest
from tools.data_process import DataProcess
from time import sleep
# https://www.cnblogs.com/s... | 27.051282 | 77 | 0.708057 |
c4e57be74596254afd172b2a9fa931bcebd90598 | 1,460 | py | Python | planet/management/commands/syncrss.py | nakagami/planetplanet | c2148166b41260ca00c5a917d9923bde44c3c5c6 | [
"MIT"
] | 4 | 2018-02-05T16:08:59.000Z | 2021-05-16T15:17:35.000Z | planet/management/commands/syncrss.py | nakagami/planetplanet | c2148166b41260ca00c5a917d9923bde44c3c5c6 | [
"MIT"
] | null | null | null | planet/management/commands/syncrss.py | nakagami/planetplanet | c2148166b41260ca00c5a917d9923bde44c3c5c6 | [
"MIT"
] | 1 | 2020-01-19T17:15:10.000Z | 2020-01-19T17:15:10.000Z | ##############################################################################
# Copyright (c) 2011 Hajime Nakagami <nakagami@gmail.com>
#
# 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 with... | 50.344828 | 79 | 0.733562 |
3d8f32af658c1c1aef87d42019ac4693da86b8b4 | 2,032 | py | Python | tests/core/vm/test_modexp_precompile.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | tests/core/vm/test_modexp_precompile.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | tests/core/vm/test_modexp_precompile.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2019-01-29T21:09:31.000Z | 2019-01-29T21:09:31.000Z | import pytest
from eth.precompiles.modexp import (
_modexp,
_compute_modexp_gas_fee,
)
from eth.utils.hexadecimal import (
decode_hex,
)
EIP198_VECTOR_A = decode_hex(
"0000000000000000000000000000000000000000000000000000000000000001"
"00000000000000000000000000000000000000000000000000000000000000... | 31.75 | 182 | 0.801673 |
f339fc3c43f25075cdac5dc94e2801f35ec5a1cd | 2,352 | py | Python | python/o80_pam/o80_robot_mirroring.py | intelligent-soft-robots/o80_pam | 3491dcdace61f58e0cf31149184593da3cd2f017 | [
"BSD-3-Clause"
] | null | null | null | python/o80_pam/o80_robot_mirroring.py | intelligent-soft-robots/o80_pam | 3491dcdace61f58e0cf31149184593da3cd2f017 | [
"BSD-3-Clause"
] | 2 | 2021-02-17T12:55:44.000Z | 2021-05-27T14:10:57.000Z | python/o80_pam/o80_robot_mirroring.py | intelligent-soft-robots/o80_pam | 3491dcdace61f58e0cf31149184593da3cd2f017 | [
"BSD-3-Clause"
] | null | null | null | import o80
import o80_pam
# convenience class for sending mirroring
# (i.e. imposing joint positions and velocities)
# to a robot
class o80RobotMirroring:
def __init__(self, segment_id, frontend=None, burster=None):
if frontend is None:
self._frontend = o80_pam.MirrorRobotFrontEnd(segment_id)
... | 28.337349 | 79 | 0.582908 |
6cab32ff64248f56a312b98dfa01b3bbef7a15a9 | 2,040 | py | Python | 064_Dense_Depth/nyu/01_float32/20_tensorrt_inf_test.py | IgiArdiyanto/PINTO_model_zoo | 9247b56a7dff37f28a8a7822a7ef4dd9adf7234d | [
"MIT"
] | 1,529 | 2019-12-11T13:36:23.000Z | 2022-03-31T18:38:27.000Z | 064_Dense_Depth/nyu/01_float32/20_tensorrt_inf_test.py | IgiArdiyanto/PINTO_model_zoo | 9247b56a7dff37f28a8a7822a7ef4dd9adf7234d | [
"MIT"
] | 200 | 2020-01-06T09:24:42.000Z | 2022-03-31T17:29:08.000Z | 064_Dense_Depth/nyu/01_float32/20_tensorrt_inf_test.py | IgiArdiyanto/PINTO_model_zoo | 9247b56a7dff37f28a8a7822a7ef4dd9adf7234d | [
"MIT"
] | 288 | 2020-02-21T14:56:02.000Z | 2022-03-30T03:00:35.000Z | ### tensorflow==2.3.1
### https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/6.0/GA_6.0.1.5/local_repos/nv-tensorrt-repo-ubuntu1804-cuda10.1-trt6.0.1.5-ga-20190913_1-1_amd64.deb
# os="ubuntu1804"
# tag="cuda10.1-trt6.0.1.5-ga-20190913"
# sudo dpkg -i nv-tensorrt-repo-${os}-${tag}_1-1_amd64.deb
# su... | 36.428571 | 174 | 0.779412 |
b2d7e7e6978d0150b5238100b0b8157e5f082d10 | 1,455 | py | Python | pcat2py/class/25006946-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/25006946-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/25006946-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
################################################################################
# 25006946-5cc5-11e4-af55-00155d01fe08
#
# Justin Dierking
# justindierking@hardbitsolutions.com
# phnomcobra@gmail.com
#
# 10/24/2014 Original Construction
################################################################... | 38.289474 | 154 | 0.600687 |
63d823f07d55925665898cdeb4de77acd990a3eb | 61 | py | Python | dist/js/credentials.py | Cookie419/html5-boilerplate | 1b3efe90f95d053573d604eb53409c7dfbb2d68b | [
"MIT"
] | null | null | null | dist/js/credentials.py | Cookie419/html5-boilerplate | 1b3efe90f95d053573d604eb53409c7dfbb2d68b | [
"MIT"
] | 116 | 2020-08-31T03:12:55.000Z | 2022-03-15T03:04:56.000Z | dist/js/credentials.py | Cookie419/html5-boilerplate | 1b3efe90f95d053573d604eb53409c7dfbb2d68b | [
"MIT"
] | null | null | null | user = "eduardo@10daysofxamarin.blog"
password = "password_1" | 30.5 | 37 | 0.786885 |
fa9de039caa0bd7820c888bad8aa7f503e3888ff | 307 | py | Python | setup.py | ctgk/bayes | 96eab9305eaeecc5a5b032cdf92a8285de4f60bf | [
"MIT"
] | 21 | 2019-01-08T05:58:41.000Z | 2021-11-26T14:24:11.000Z | setup.py | ctgk/bayes | 96eab9305eaeecc5a5b032cdf92a8285de4f60bf | [
"MIT"
] | null | null | null | setup.py | ctgk/bayes | 96eab9305eaeecc5a5b032cdf92a8285de4f60bf | [
"MIT"
] | 11 | 2019-05-04T13:44:19.000Z | 2021-08-05T04:26:19.000Z | from setuptools import setup, find_packages
setup(
name="bayesnet",
version="0.0.1",
description="Bayesian method library",
author="ctgk",
python_requires=">=3.6",
install_requires=["numpy", "scipy"],
packages=find_packages(exclude=["test", "test.*"]),
test_suite="test"
)
| 21.928571 | 55 | 0.651466 |
8a67fcfbf12577c3ead694ab77d224584cd69b98 | 5,575 | py | Python | torch_geometric/datasets/pcpnet_dataset.py | lsj2408/pytorch_geometric | 21cc1efd7c3b2912f4c2c98ddd5e9065a9aef6d4 | [
"MIT"
] | null | null | null | torch_geometric/datasets/pcpnet_dataset.py | lsj2408/pytorch_geometric | 21cc1efd7c3b2912f4c2c98ddd5e9065a9aef6d4 | [
"MIT"
] | null | null | null | torch_geometric/datasets/pcpnet_dataset.py | lsj2408/pytorch_geometric | 21cc1efd7c3b2912f4c2c98ddd5e9065a9aef6d4 | [
"MIT"
] | null | null | null | import os
import os.path as osp
import torch
from torch_geometric.data import (Data, InMemoryDataset, download_url,
extract_zip)
from torch_geometric.io import read_txt_array
class PCPNetDataset(InMemoryDataset):
r"""The PCPNet dataset from the `"PCPNet: Learning Local Shape Pro... | 41.917293 | 79 | 0.624036 |
107edab9aca25f41df4396b7c3042658aec5c2c8 | 4,415 | py | Python | kubic_user.py | cinxdy/TIBigdataOpenAPI_server | 8691ca0feb9ca259730f1fc2144b7e29beb95ca6 | [
"MIT"
] | null | null | null | kubic_user.py | cinxdy/TIBigdataOpenAPI_server | 8691ca0feb9ca259730f1fc2144b7e29beb95ca6 | [
"MIT"
] | null | null | null | kubic_user.py | cinxdy/TIBigdataOpenAPI_server | 8691ca0feb9ca259730f1fc2144b7e29beb95ca6 | [
"MIT"
] | null | null | null | from flask import session
from pymongo import MongoClient
from bson.objectid import ObjectId
from secrets import token_urlsafe
from passlib.hash import pbkdf2_sha512
from datetime import datetime
from dateutil.relativedelta import relativedelta
#import logging
client = MongoClient('localhost',27017)
db = client.user
... | 27.253086 | 74 | 0.629672 |
904c5c7776a90125c8a3c96c27ba781c2f0da3ed | 1,198 | py | Python | conanfile.py | extcpp/base | 26b1384cbbd5cb3171e4cd22c8eb5f09ec0c5732 | [
"MIT"
] | null | null | null | conanfile.py | extcpp/base | 26b1384cbbd5cb3171e4cd22c8eb5f09ec0c5732 | [
"MIT"
] | 22 | 2019-10-15T20:47:02.000Z | 2020-01-26T20:26:19.000Z | conanfile.py | extcpp/base | 26b1384cbbd5cb3171e4cd22c8eb5f09ec0c5732 | [
"MIT"
] | 1 | 2020-09-24T08:53:15.000Z | 2020-09-24T08:53:15.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake, tools
class ExtbaseConan(ConanFile):
name = "ext-basics"
version = "0.0.1"
license = "MIT"
author = "Jan Christoph Uhde <jan@uhdejc.com>"
url = "https://github.com/extcpp/basics"
description = "Extended C++ - b... | 29.219512 | 103 | 0.610184 |
1fb9384f1c71b14c6a090ca3f56ac163bb98c8eb | 1,456 | py | Python | resources/usleep_dataset_prep/convert_dod_datasets.py | learning310/U-Time | f7c8e3f1368f43226872a69b0fbb8c29990e4bd9 | [
"MIT"
] | 138 | 2019-11-20T02:31:17.000Z | 2022-03-23T04:31:51.000Z | resources/usleep_dataset_prep/convert_dod_datasets.py | amiyapatanaik/U-Time | a9ed4892da77d165a71dbfef1d069d782c909757 | [
"MIT"
] | 46 | 2019-12-04T03:13:28.000Z | 2022-03-31T13:10:48.000Z | resources/usleep_dataset_prep/convert_dod_datasets.py | amiyapatanaik/U-Time | a9ed4892da77d165a71dbfef1d069d782c909757 | [
"MIT"
] | 42 | 2019-11-26T16:02:26.000Z | 2022-01-06T11:01:32.000Z | import os
import h5py
from glob import glob
import json
import numpy as np
from utime.utils.scriptutils.extract import to_h5_file
def convert_h5_file(h5_path):
out_dir = h5_path.replace(".h5", "")
if not os.path.exists(out_dir):
os.mkdir(out_dir)
out_h5_path = os.path.join(out_dir, "signals.h5")
... | 27.471698 | 82 | 0.607143 |
449875ae8bc5427f34a8427b6fe513fb9dc54a83 | 789 | py | Python | models/modules/se.py | vuiseng9/CalibTIP | 69077c92611b079234706784c344e8c9156f3283 | [
"MIT"
] | 61 | 2020-06-14T20:00:05.000Z | 2022-03-08T10:18:41.000Z | models/modules/se.py | vuiseng9/CalibTIP | 69077c92611b079234706784c344e8c9156f3283 | [
"MIT"
] | 5 | 2020-09-01T06:53:41.000Z | 2022-01-28T07:40:45.000Z | models/modules/se.py | vuiseng9/CalibTIP | 69077c92611b079234706784c344e8c9156f3283 | [
"MIT"
] | 18 | 2020-06-28T10:30:58.000Z | 2022-02-28T02:04:15.000Z | import torch
import torch.nn as nn
class SEBlock(nn.Module):
def __init__(self, in_channels, out_channels=None, ratio=16):
super(SEBlock, self).__init__()
self.in_channels = in_channels
if out_channels is None:
out_channels = in_channels
self.ratio = ratio
self.r... | 31.56 | 65 | 0.598226 |
9f6067a06f527a967de6caf245653ff70a5b069a | 51,589 | py | Python | tensorflow/python/ipu/ipu_estimator.py | chenzhengda/tensorflow | 8debb698097670458b5f21d728bc6f734a7b5a53 | [
"Apache-2.0"
] | 74 | 2020-07-06T17:11:39.000Z | 2022-01-28T06:31:28.000Z | tensorflow/python/ipu/ipu_estimator.py | chenzhengda/tensorflow | 8debb698097670458b5f21d728bc6f734a7b5a53 | [
"Apache-2.0"
] | 9 | 2020-10-13T23:25:29.000Z | 2022-02-10T06:54:48.000Z | tensorflow/python/ipu/ipu_estimator.py | chenzhengda/tensorflow | 8debb698097670458b5f21d728bc6f734a7b5a53 | [
"Apache-2.0"
] | 12 | 2020-07-08T07:27:17.000Z | 2021-12-27T08:54:27.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.604032 | 113 | 0.69162 |
e4c5d6ca1d9c0b827dc238f0e8a3d31b74bb84fc | 3,458 | py | Python | sonnet/src/conformance/distribute_test.py | chentingpc/sonnet | adae0b2e1700037bab289437f778ec4192b9881e | [
"Apache-2.0"
] | 1 | 2021-05-03T20:22:20.000Z | 2021-05-03T20:22:20.000Z | sonnet/src/conformance/distribute_test.py | chentingpc/sonnet | adae0b2e1700037bab289437f778ec4192b9881e | [
"Apache-2.0"
] | null | null | null | sonnet/src/conformance/distribute_test.py | chentingpc/sonnet | adae0b2e1700037bab289437f778ec4192b9881e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Sonnet Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 36.787234 | 78 | 0.716599 |
a1e40a7e0222a9506bc22818eb00744f41ac156f | 207 | py | Python | src/snowflake/connector/feature.py | stevebeck89/snowflake-connector-python | 739f9c2604116e1060268c437c1696c4e38862e2 | [
"Apache-2.0"
] | null | null | null | src/snowflake/connector/feature.py | stevebeck89/snowflake-connector-python | 739f9c2604116e1060268c437c1696c4e38862e2 | [
"Apache-2.0"
] | 4 | 2021-11-22T17:24:18.000Z | 2022-01-31T17:22:21.000Z | src/snowflake/connector/feature.py | stevebeck89/snowflake-connector-python | 739f9c2604116e1060268c437c1696c4e38862e2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2021 Snowflake Computing Inc. All right reserved.
#
# Feature flags
feature_use_pyopenssl = True # use pyopenssl API or openssl command
| 23 | 70 | 0.714976 |
4e19ba370e7fffb78aed7a3e554710f88d65498a | 41,648 | py | Python | pysnmp-with-texts/H3C-STORAGE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/H3C-STORAGE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/H3C-STORAGE-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 H3C-STORAGE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/H3C-STORAGE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:23:53 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 149.275986 | 4,660 | 0.799054 |
113746225da4f1ba8c46dd591c7557e380d51a1d | 11,153 | py | Python | models/networks.py | BynaryCobweb/joliGAN | a712b540b61f09691bb99406a49646dc8746cb7f | [
"MIT"
] | null | null | null | models/networks.py | BynaryCobweb/joliGAN | a712b540b61f09691bb99406a49646dc8746cb7f | [
"MIT"
] | null | null | null | models/networks.py | BynaryCobweb/joliGAN | a712b540b61f09691bb99406a49646dc8746cb7f | [
"MIT"
] | null | null | null | import torch.nn as nn
import functools
from torch.optim import lr_scheduler
import math
import torchvision.models as models
from .modules.utils import spectral_norm,init_net,init_weights,get_norm_layer
from .modules.resnet_architecture.resnet_generator import ResnetGenerator
from .modules.resnet_architecture.mobile_r... | 59.010582 | 296 | 0.722586 |
15cb51d43aaa5d81ba623bdf391eadda23ca03a2 | 989 | py | Python | Spider/ButterBetter/searchText.py | GWU-CS2021/CS6221-ButterBetter | 4a5ef3dede059c245eee2c6e6fba2336ea74dc85 | [
"MIT"
] | null | null | null | Spider/ButterBetter/searchText.py | GWU-CS2021/CS6221-ButterBetter | 4a5ef3dede059c245eee2c6e6fba2336ea74dc85 | [
"MIT"
] | null | null | null | Spider/ButterBetter/searchText.py | GWU-CS2021/CS6221-ButterBetter | 4a5ef3dede059c245eee2c6e6fba2336ea74dc85 | [
"MIT"
] | null | null | null | import requests
import tools
import json
def search_by_text_to_json(API_KEY, text, out_file, r = None):
head = 'https://maps.googleapis.com/maps/api/place/textsearch/json?query='
text = text.replace(' ','%20')
if r:
radius = '&radius='+ str(r)
else:
radius =''
tail = '&key=' + API_K... | 26.026316 | 82 | 0.629929 |
17de18897e413317a15d427ab745a0e2bbe4cdcc | 5,978 | py | Python | Robocop.py | leo60228/everestbot | 53bbf6a5b42a71889ed3de02cc65f22fedddf313 | [
"MIT"
] | 1 | 2020-08-30T22:16:13.000Z | 2020-08-30T22:16:13.000Z | Robocop.py | leo60228/everestbot | 53bbf6a5b42a71889ed3de02cc65f22fedddf313 | [
"MIT"
] | null | null | null | Robocop.py | leo60228/everestbot | 53bbf6a5b42a71889ed3de02cc65f22fedddf313 | [
"MIT"
] | null | null | null | import os
import asyncio
import sys
import logging
import logging.handlers
import traceback
import aiohttp
import config
import discord
from discord.ext import commands
script_name = os.path.basename(__file__).split('.')[0]
log_file_name = f"{script_name}.log"
# Limit of discord (non-nitro) is 8MB (not MiB)
max_fil... | 35.583333 | 84 | 0.623118 |
acee2165f4e9de57208a3aef2ca7e8fc1b042b5b | 51,276 | py | Python | scripts/runtests.py | msakai/chainer-compiler | 77190561408911b33904a20c47f734f38790cfdf | [
"MIT"
] | null | null | null | scripts/runtests.py | msakai/chainer-compiler | 77190561408911b33904a20c47f734f38790cfdf | [
"MIT"
] | null | null | null | scripts/runtests.py | msakai/chainer-compiler | 77190561408911b33904a20c47f734f38790cfdf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import copy
import glob
import multiprocessing
import os
import re
import sys
import subprocess
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(project_root)
import ch2o_tests
import elichika_tests
import gen_backprop_tests_oc
import g... | 47.83209 | 104 | 0.729211 |
8358025f44deefc0a0672046d8e61c3fa4cd94ea | 703 | py | Python | detectron2/evaluation/__init__.py | MargeryLab/BMaskR-CNN | 41f63d301d6be7fa30ba281a5a0f727fbca6ad2a | [
"Apache-2.0"
] | null | null | null | detectron2/evaluation/__init__.py | MargeryLab/BMaskR-CNN | 41f63d301d6be7fa30ba281a5a0f727fbca6ad2a | [
"Apache-2.0"
] | null | null | null | detectron2/evaluation/__init__.py | MargeryLab/BMaskR-CNN | 41f63d301d6be7fa30ba281a5a0f727fbca6ad2a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .cityscapes_evaluation import CityscapesInstanceEvaluator, CityscapesSemSegEvaluator
from .coco_evaluation import COCOEvaluator
from .rotated_coco_evaluation import RotatedCOCOEvaluator
from .evaluator import DatasetEvaluator, DatasetEvalua... | 54.076923 | 100 | 0.846373 |
618c9c463fdd10e3847017004d70ddf007108f6e | 13,367 | py | Python | code/fusion_training_data_maker.py | tafseer-nayeem/CSL-Journal2019 | 1af3cec14b313397703f3e8e3d3e616c9a99b895 | [
"MIT"
] | 2 | 2020-01-15T09:28:19.000Z | 2021-01-24T10:54:52.000Z | code/fusion_training_data_maker.py | tafseer-nayeem/CSL-Journal2019 | 1af3cec14b313397703f3e8e3d3e616c9a99b895 | [
"MIT"
] | null | null | null | code/fusion_training_data_maker.py | tafseer-nayeem/CSL-Journal2019 | 1af3cec14b313397703f3e8e3d3e616c9a99b895 | [
"MIT"
] | 1 | 2021-03-07T12:36:06.000Z | 2021-03-07T12:36:06.000Z | import sys
import os
import shutil
import errno
import numpy as np
import nltk
import string
import re
import codecs
from sklearn.metrics import jaccard_similarity_score
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
from nltk.stem import WordNetLemmatizer
reload(sys)
sys.setdefaultencodi... | 29.638581 | 202 | 0.678163 |
547d85936142da49fca8cacb81438f560e7eea49 | 259 | py | Python | frappe_training/frappe_training/doctype/check8/check8.py | sivaranjanipalanivel/training | b177c56a319c07dc3467ce3113e332ecee9b81fa | [
"MIT"
] | null | null | null | frappe_training/frappe_training/doctype/check8/check8.py | sivaranjanipalanivel/training | b177c56a319c07dc3467ce3113e332ecee9b81fa | [
"MIT"
] | null | null | null | frappe_training/frappe_training/doctype/check8/check8.py | sivaranjanipalanivel/training | b177c56a319c07dc3467ce3113e332ecee9b81fa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, valiantsystems and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class Check8(Document):
pass
| 23.545455 | 53 | 0.776062 |
48d5d7a6e363f58564c31890adc012846ad9e88c | 2,676 | py | Python | env/lib/python2.7/site-packages/django/contrib/gis/gdal/__init__.py | diego-d5000/MisValesMd | b641782bc2546776e9f55f452ec7fb48100dc482 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/django/contrib/gis/gdal/__init__.py | diego-d5000/MisValesMd | b641782bc2546776e9f55f452ec7fb48100dc482 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/django/contrib/gis/gdal/__init__.py | diego-d5000/MisValesMd | b641782bc2546776e9f55f452ec7fb48100dc482 | [
"MIT"
] | null | null | null | """
This module houses ctypes interfaces for GDAL objects. The following GDAL
objects are supported:
CoordTransform: Used for coordinate transformations from one spatial
reference system to another.
Driver: Wraps an OGR data source driver.
DataSource: Wrapper for the OGR data source object, supports... | 39.940299 | 102 | 0.738416 |
347c406f342d4898e61fbd42882c3113a85e2302 | 13,102 | py | Python | dosagelib/cmd.py | frater/dosage | 8a2537055a9c14d5bdd0aa7fafdb5c9f757c7bc7 | [
"MIT"
] | 98 | 2015-04-14T02:11:36.000Z | 2022-02-02T03:32:58.000Z | dosagelib/cmd.py | frater/dosage | 8a2537055a9c14d5bdd0aa7fafdb5c9f757c7bc7 | [
"MIT"
] | 199 | 2015-04-09T01:09:42.000Z | 2022-03-25T14:28:51.000Z | dosagelib/cmd.py | frater/dosage | 8a2537055a9c14d5bdd0aa7fafdb5c9f757c7bc7 | [
"MIT"
] | 68 | 2015-04-11T17:15:54.000Z | 2022-03-20T17:45:43.000Z | # SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2020 Tobias Gruetzmacher
import argparse
import contextlib
import os
import platform
from pathlib import Path
import appdirs
from . import events, configurat... | 35.22043 | 94 | 0.637613 |
28aa67c4149f1e781eb6fa7dde087d92514c1c20 | 21,239 | py | Python | keylime/elchecking/tests.py | utkarsh2102/keylime | a2a8ef810d35f29a39fc43e9a7e8ff2e6b9fffd5 | [
"Apache-2.0"
] | null | null | null | keylime/elchecking/tests.py | utkarsh2102/keylime | a2a8ef810d35f29a39fc43e9a7e8ff2e6b9fffd5 | [
"Apache-2.0"
] | null | null | null | keylime/elchecking/tests.py | utkarsh2102/keylime | a2a8ef810d35f29a39fc43e9a7e8ff2e6b9fffd5 | [
"Apache-2.0"
] | null | null | null | import abc
import re
import typing
# This module defines the abstraction of a Test (of JSON data)
# and several specific test classes.
# A Test can be used multiple times, even concurrently.
# Data is the type of Python data that corresponds to JSON values.
Data = typing.Union[int, float, str, bool, typing.Tuple['Dat... | 35.695798 | 147 | 0.6247 |
124c66bfdeee2d79b2637a40a0d2f27b133fc43e | 449 | py | Python | vehicles/views/tools.py | kackey0-1/drf-sample | 914907320bc317240b4d7c07968b6d4ea80b4511 | [
"MIT"
] | null | null | null | vehicles/views/tools.py | kackey0-1/drf-sample | 914907320bc317240b4d7c07968b6d4ea80b4511 | [
"MIT"
] | 6 | 2021-03-30T12:05:07.000Z | 2021-04-05T14:21:46.000Z | vehicles/views/tools.py | kackey0-1/drf-sample | 914907320bc317240b4d7c07968b6d4ea80b4511 | [
"MIT"
] | null | null | null | from rest_framework.decorators import api_view
from rest_framework.response import Response
from vehicles.models import Tool
from vehicles.serializers import ToolSerializer
@api_view(['GET'])
def list_tools(request):
tools = [
Tool('hammer', 'Mastercraft'),
Tool('wrench', 'Husky'),
]
ser... | 21.380952 | 49 | 0.688196 |
32426589939455553d2c076a8c116fb01d312728 | 233 | py | Python | tests/test_wikipedia.py | simplythebex/hypermodern-python-practice | 48d3cce5e100bc57dfa894d3afbfc69e55ec9ab2 | [
"MIT"
] | null | null | null | tests/test_wikipedia.py | simplythebex/hypermodern-python-practice | 48d3cce5e100bc57dfa894d3afbfc69e55ec9ab2 | [
"MIT"
] | null | null | null | tests/test_wikipedia.py | simplythebex/hypermodern-python-practice | 48d3cce5e100bc57dfa894d3afbfc69e55ec9ab2 | [
"MIT"
] | null | null | null | from src.hypermodern_python_practice import wikipedia
def test_random_page_uses_given_language(mock_requests_get):
wikipedia.random_page(language="de")
args, _ = mock_requests_get.call_args
assert "de.wikipedia.org" in args[0] | 38.833333 | 60 | 0.828326 |
0a788b5f5f88047e86e644cc6873409598dc4c7d | 7,719 | py | Python | qiskit_machine_learning/datasets/dataset_helper.py | declanmillar/qiskit-machine-learning | 3bf98b67618885bd09f4abbff7e381537a646fac | [
"Apache-2.0"
] | null | null | null | qiskit_machine_learning/datasets/dataset_helper.py | declanmillar/qiskit-machine-learning | 3bf98b67618885bd09f4abbff7e381537a646fac | [
"Apache-2.0"
] | null | null | null | qiskit_machine_learning/datasets/dataset_helper.py | declanmillar/qiskit-machine-learning | 3bf98b67618885bd09f4abbff7e381537a646fac | [
"Apache-2.0"
] | 1 | 2022-01-24T15:26:13.000Z | 2022-01-24T15:26:13.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 40.203125 | 100 | 0.629615 |
53f68cdc695b4885dd12aa02bcfdf9c854a29fcb | 367 | py | Python | profit-loss.py | TheVishwajeetJagtap/Python-Day-3-04-03-21- | af790c3b97863dcd1d06ed9af43890a40ff6e0f0 | [
"MIT"
] | null | null | null | profit-loss.py | TheVishwajeetJagtap/Python-Day-3-04-03-21- | af790c3b97863dcd1d06ed9af43890a40ff6e0f0 | [
"MIT"
] | null | null | null | profit-loss.py | TheVishwajeetJagtap/Python-Day-3-04-03-21- | af790c3b97863dcd1d06ed9af43890a40ff6e0f0 | [
"MIT"
] | null | null | null | actual_cost=float(input("Enter Actual Cost of Product: "))
selling_cost=float(input("Enter Selling Cost of Product: "))
if actual_cost > selling_cost:
amt = actual_cost - selling_cost
print("Total Loss is : ",amt)
elif actual_cost < selling_cost:
amt = selling_cost - actual_cost
print("Total Profit is ... | 30.583333 | 60 | 0.705722 |
0e61b9ad878606b3ae550d5c68286c4fd6c79c04 | 39 | py | Python | demo/m3_ext_demo/m3_ext_demo/routes.py | barsgroup/m3-ext | 15cd6772a5e664431e363ee9755c5fbf9a535c21 | [
"MIT"
] | 1 | 2020-06-03T18:26:16.000Z | 2020-06-03T18:26:16.000Z | demo/m3_ext_demo/m3_ext_demo/routes.py | barsgroup/m3-ext | 15cd6772a5e664431e363ee9755c5fbf9a535c21 | [
"MIT"
] | null | null | null | demo/m3_ext_demo/m3_ext_demo/routes.py | barsgroup/m3-ext | 15cd6772a5e664431e363ee9755c5fbf9a535c21 | [
"MIT"
] | 1 | 2018-04-21T12:13:58.000Z | 2018-04-21T12:13:58.000Z | #coding: utf-8
__author__ = 'prefer'
| 7.8 | 21 | 0.666667 |
fb3e0e286ea720ae84b56599ea622fc06ae73463 | 400 | py | Python | src/bindings/python/src/compatibility/ngraph/exceptions.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 1,127 | 2018-10-15T14:36:58.000Z | 2020-04-20T09:29:44.000Z | src/bindings/python/src/compatibility/ngraph/exceptions.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 439 | 2018-10-20T04:40:35.000Z | 2020-04-19T05:56:25.000Z | src/bindings/python/src/compatibility/ngraph/exceptions.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 414 | 2018-10-17T05:53:46.000Z | 2020-04-16T17:29:53.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""ngraph exceptions hierarchy. All exceptions are descendants of NgraphError."""
class NgraphError(Exception):
"""Base class for Ngraph exceptions."""
class UserInputError(NgraphError):
"""User provided unexpected input."""
... | 23.529412 | 81 | 0.7375 |
bd7417f92d58af8c9998e34eac47716bb270748c | 1,467 | py | Python | Testes com Pygame/ex_pygame04_sprites.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | Testes com Pygame/ex_pygame04_sprites.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | Testes com Pygame/ex_pygame04_sprites.py | fotavio16/PycharmProjects | f5be49db941de69159ec543e8a6dde61f9f94d86 | [
"MIT"
] | null | null | null | import pygame
import pygame.gfxdraw
pygame.init()
FONT = pygame.font.SysFont('Arial', 20)
FONT_COLOR = pygame.Color('black')
ATOM_IMG = pygame.Surface((30, 30), pygame.SRCALPHA)
pygame.gfxdraw.aacircle(ATOM_IMG, 15, 15, 14, (0, 255, 0))
pygame.gfxdraw.filled_circle(ATOM_IMG, 15, 15, 14, (0, 255, 0))
class Atom(py... | 27.679245 | 76 | 0.630539 |
1b24599ec653ca178785c3c57a1cc6f85312875a | 661 | py | Python | agua/comparators.py | CompileInc/agua | d1b7508b50ca0a53a430cdea4fb745f02377d594 | [
"MIT"
] | 1 | 2017-03-22T10:51:23.000Z | 2017-03-22T10:51:23.000Z | agua/comparators.py | CompileInc/agua | d1b7508b50ca0a53a430cdea4fb745f02377d594 | [
"MIT"
] | 18 | 2017-12-18T16:41:27.000Z | 2021-03-25T21:47:51.000Z | agua/comparators.py | CompileInc/agua | d1b7508b50ca0a53a430cdea4fb745f02377d594 | [
"MIT"
] | null | null | null | CHECK_FUNCTIONS = {}
def register(fn):
CHECK_FUNCTIONS[fn.func_name] = fn
return fn
@register
def exact(value, test_value):
return value == test_value or value is test_value
@register
def approximate(value, test_value, delta):
min_value = float(value) * (1 - delta)
max_value = float(value) * (... | 23.607143 | 73 | 0.701967 |
9f2b35fb4227089ba0c44f33436f3c8fe3a11dd2 | 4,805 | py | Python | ffbinaries/api.py | tropicoo/ffbinaries-api-client | a1d0d60d3b4adbac296044c15d36ec5a1f0fb693 | [
"MIT"
] | 1 | 2019-10-26T14:38:46.000Z | 2019-10-26T14:38:46.000Z | ffbinaries/api.py | tropicoo/ffbinaries-api-client | a1d0d60d3b4adbac296044c15d36ec5a1f0fb693 | [
"MIT"
] | null | null | null | ffbinaries/api.py | tropicoo/ffbinaries-api-client | a1d0d60d3b4adbac296044c15d36ec5a1f0fb693 | [
"MIT"
] | null | null | null | """ffbinaries API Client Module."""
import logging
import posixpath
from multiprocessing import Lock as proc_lock
from threading import Lock as thread_lock
import requests
from ffbinaries.cache import SimpleCache
from ffbinaries.const import HTTP
from ffbinaries.errors import (FFBinariesAPIClientError, NoCacheDataEr... | 38.44 | 79 | 0.63871 |
b9041d23df17f7411b6ea005380ca163d756e881 | 227,499 | py | Python | tensorflow/python/ops/image_ops_impl.py | onepick/tensorflow | b44dd5e97df2f9aec5ad71e8122be98a59a35057 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/image_ops_impl.py | onepick/tensorflow | b44dd5e97df2f9aec5ad71e8122be98a59a35057 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/image_ops_impl.py | onepick/tensorflow | b44dd5e97df2f9aec5ad71e8122be98a59a35057 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.510073 | 88 | 0.665572 |
095f1b4d8ee44f1fa9df45ec8595fa573518b243 | 1,461 | py | Python | gkmerge/data_tools/util.py | ISCOTTYI/gk-merge | d12421c23ea2d28f5f2bf7985c54b1e3f062cdbc | [
"MIT"
] | null | null | null | gkmerge/data_tools/util.py | ISCOTTYI/gk-merge | d12421c23ea2d28f5f2bf7985c54b1e3f062cdbc | [
"MIT"
] | null | null | null | gkmerge/data_tools/util.py | ISCOTTYI/gk-merge | d12421c23ea2d28f5f2bf7985c54b1e3f062cdbc | [
"MIT"
] | null | null | null | import numpy as np
def mean(lst):
"""
Clears the given list of None and calculates the mean
"""
lst = [elem for elem in lst if elem is not None]
return np.mean(np.array(lst)) if len(lst) > 0 else 0
def std(lst):
return np.std(np.array(lst)) if len(lst) > 0 else 0
def greater_than(val, cond... | 29.22 | 93 | 0.652977 |
259f07627a0fa55fa6f511d4d654167da98662ff | 3,513 | py | Python | .scripts/arch-update.py | WesterWest/tomatorice | 9ffca44c985565d6087ac985d587a0e3b3f8bf9a | [
"MIT"
] | 5 | 2019-02-17T20:02:51.000Z | 2021-02-11T20:41:18.000Z | .scripts/arch-update.py | WesterWest/tomatorice | 9ffca44c985565d6087ac985d587a0e3b3f8bf9a | [
"MIT"
] | null | null | null | .scripts/arch-update.py | WesterWest/tomatorice | 9ffca44c985565d6087ac985d587a0e3b3f8bf9a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (C) 2017 Marcel Patzwahl
# Licensed under the terms of the GNU GPL v3 only.
#
# i3blocks blocklet script to see the available updates of pacman and the AUR
import subprocess
from subprocess import check_output
import argparse
import os
import re
def create_argparse():
def _def... | 28.104 | 78 | 0.605181 |
aea5ff1bc2b7a21dd8511ad3846921bdf357243d | 515 | py | Python | examples/show_i_q.py | quyensy/pyrf | a133d97239aec53962b506d09e45f60238094582 | [
"BSD-3-Clause"
] | null | null | null | examples/show_i_q.py | quyensy/pyrf | a133d97239aec53962b506d09e45f60238094582 | [
"BSD-3-Clause"
] | null | null | null | examples/show_i_q.py | quyensy/pyrf | a133d97239aec53962b506d09e45f60238094582 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
from pyrf.devices.thinkrf import WSA4000
# connect to wsa
dut = WSA4000()
dut.connect(sys.argv[1])
# setup test conditions
dut.reset()
dut.request_read_perm()
dut.ifgain(0)
dut.freq(2450e6)
dut.gain('low')
dut.fshift(0)
dut.decimation(0)
# capture 1 packet
dut.capture(1024, 1)
# re... | 16.09375 | 40 | 0.673786 |
b50b5ed98fba207699fed127915efdf1e8ce1ca1 | 1,953 | py | Python | tools/SeeDot/faceDetection/scale_image.py | Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML | ef9f8a77f096acbdeb941014791f8eda1c1bc35b | [
"MIT"
] | 719 | 2019-05-10T00:31:30.000Z | 2022-03-30T23:04:23.000Z | tools/SeeDot/faceDetection/scale_image.py | Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML | ef9f8a77f096acbdeb941014791f8eda1c1bc35b | [
"MIT"
] | 119 | 2019-05-14T10:50:15.000Z | 2022-03-01T22:01:09.000Z | tools/SeeDot/faceDetection/scale_image.py | Shenzhen-Cloudatawalk-Technology-Co-Ltd/EdgeML | ef9f8a77f096acbdeb941014791f8eda1c1bc35b | [
"MIT"
] | 235 | 2019-05-07T13:55:37.000Z | 2022-03-20T04:07:38.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
import torch
import argparse
import cv2
import numpy as np
from PIL import Image
import os
os.environ['IS_QVGA_MONO'] = '1'
from data.choose_config import cfg
cfg = cfg.cfg
parser = argparse.ArgumentParser(description='G... | 27.9 | 99 | 0.606759 |
3418594c82340531577540ebc29f14b7d9916255 | 376 | py | Python | ch03/step_function.py | Kobe10/Deep-learning-scratch | 4f9172a8ddf4a7424241e8255aafba6f5ed650fd | [
"MIT"
] | null | null | null | ch03/step_function.py | Kobe10/Deep-learning-scratch | 4f9172a8ddf4a7424241e8255aafba6f5ed650fd | [
"MIT"
] | null | null | null | ch03/step_function.py | Kobe10/Deep-learning-scratch | 4f9172a8ddf4a7424241e8255aafba6f5ed650fd | [
"MIT"
] | null | null | null | # coding: utf-8
import numpy as np
import matplotlib.pylab as plt
def step_function(x):
# 这里对数组做了一个特殊处理:如果大于0的x 都是true, 然后利用dtype=int 将true转换为1
# :如果小于0的x 都是false, 然后利用dtype=int 将true转换为0
return np.array(x > 0, dtype=np.int)
X = np.arange(-5.0, 5.0, 0.1)
Y = step_function(X)
plt.pl... | 23.5 | 69 | 0.648936 |
6bf42a822ce0ca0e7e789afeb7050ee769273b4e | 182 | py | Python | RL/TicTacToe/agent/AlphaZero/__init__.py | tsubame-mz/reinforcement_learning | b69cce573deed11676f60653b41e036d8e79aedc | [
"MIT"
] | null | null | null | RL/TicTacToe/agent/AlphaZero/__init__.py | tsubame-mz/reinforcement_learning | b69cce573deed11676f60653b41e036d8e79aedc | [
"MIT"
] | null | null | null | RL/TicTacToe/agent/AlphaZero/__init__.py | tsubame-mz/reinforcement_learning | b69cce573deed11676f60653b41e036d8e79aedc | [
"MIT"
] | null | null | null | from .config import AlphaZeroConfig # NOQA
from .network import AlphaZeroNetwork # NOQA
from .AlphaZeroAgent import AlphaZeroAgent # NOQA
from .alphazero import AlphaZero # NOQA
| 36.4 | 50 | 0.802198 |
ec1a4817764fe6c8c2b881e4ff1823d29643716d | 6,683 | py | Python | UpdatedCarRentalSystem/projectver1/Carrentsystem/rental_car/migrations/0001_initial.py | hklhfong/Car-Rental-System | 3a4844eea8e9dbf85f4ce62b5115772f48277240 | [
"Apache-2.0"
] | null | null | null | UpdatedCarRentalSystem/projectver1/Carrentsystem/rental_car/migrations/0001_initial.py | hklhfong/Car-Rental-System | 3a4844eea8e9dbf85f4ce62b5115772f48277240 | [
"Apache-2.0"
] | null | null | null | UpdatedCarRentalSystem/projectver1/Carrentsystem/rental_car/migrations/0001_initial.py | hklhfong/Car-Rental-System | 3a4844eea8e9dbf85f4ce62b5115772f48277240 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.1 on 2018-10-10 06:28
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Car',
fields=[
... | 48.427536 | 520 | 0.55095 |
7dcb25ecf475928ed63ce384e37bebbe5c76cf08 | 10,558 | py | Python | deepxde/nn/tensorflow_compat_v1/fnn.py | matth86/deepxde | 457cad03903792d9d107d60f2b639b87361805d0 | [
"Apache-2.0"
] | 955 | 2019-06-21T21:56:02.000Z | 2022-03-31T03:44:45.000Z | deepxde/nn/tensorflow_compat_v1/fnn.py | matth86/deepxde | 457cad03903792d9d107d60f2b639b87361805d0 | [
"Apache-2.0"
] | 517 | 2019-07-25T16:47:44.000Z | 2022-03-31T17:37:58.000Z | deepxde/nn/tensorflow_compat_v1/fnn.py | matth86/deepxde | 457cad03903792d9d107d60f2b639b87361805d0 | [
"Apache-2.0"
] | 374 | 2019-06-24T00:44:16.000Z | 2022-03-30T08:17:36.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
from .nn import NN
from .. import activations
from .. import initializers
from .. import regularizers
from ... import config
from ...backend import tf
from ...utils import timing
class FNN(NN):
... | 37.842294 | 95 | 0.571415 |
408fbd5fca3ec9fcc6057c732c73d61f347e09eb | 2,428 | py | Python | ghettoq/messaging.py | ask/ghettoq | 22a0fcd865b618cbbbfd102efd88a7983507c24e | [
"BSD-3-Clause"
] | 5 | 2015-01-13T14:36:52.000Z | 2021-05-07T15:45:55.000Z | ghettoq/messaging.py | ask/ghettoq | 22a0fcd865b618cbbbfd102efd88a7983507c24e | [
"BSD-3-Clause"
] | null | null | null | ghettoq/messaging.py | ask/ghettoq | 22a0fcd865b618cbbbfd102efd88a7983507c24e | [
"BSD-3-Clause"
] | null | null | null | from Queue import Empty
from itertools import cycle
class Queue(object):
def __init__(self, backend, name):
self.name = name
self.backend = backend
def put(self, payload, priority=0):
self.backend.put(self.name, payload, priority=priority)
def get(self):
payload = self.b... | 28.564706 | 77 | 0.580725 |
c83b4e8d07c7890b2783da5ca922985c575b5890 | 2,723 | py | Python | autokeras/gui/resnet_gui.py | Huiqing666/autokeras | 8c6ff435f82e8a7bf1cdd0fc8fdb499fab88c991 | [
"MIT"
] | null | null | null | autokeras/gui/resnet_gui.py | Huiqing666/autokeras | 8c6ff435f82e8a7bf1cdd0fc8fdb499fab88c991 | [
"MIT"
] | null | null | null | autokeras/gui/resnet_gui.py | Huiqing666/autokeras | 8c6ff435f82e8a7bf1cdd0fc8fdb499fab88c991 | [
"MIT"
] | null | null | null | from tkinter import *
class resnet_gui:
def __init__(self):
root = Tk()
theGui = gui(root)
root.geometry("600x400") # You want the size of the app to be 500x500
root.resizable(0, 0) # Don't allow resizing in the x or y direction
root.title('Gui for resnet')
root.m... | 34.468354 | 120 | 0.607418 |
8154ba91a10e61ef10080cc2daae47b7f07cb644 | 3,240 | py | Python | openpose.py | Muskan-Malhotra/Pose-Detection-for-YOGA | 98045020af9e66fe1167699a1a8f5725b27fe676 | [
"Apache-2.0"
] | null | null | null | openpose.py | Muskan-Malhotra/Pose-Detection-for-YOGA | 98045020af9e66fe1167699a1a8f5725b27fe676 | [
"Apache-2.0"
] | null | null | null | openpose.py | Muskan-Malhotra/Pose-Detection-for-YOGA | 98045020af9e66fe1167699a1a8f5725b27fe676 | [
"Apache-2.0"
] | null | null | null |
import cv2 as cv
import numpy as np
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--input', help='Path to image or video. Skip to capture frames from camera')
parser.add_argument('--thr', default=0.2, type=float, help='Threshold value for pose parts heat map')
parser.add_argument('--width', ... | 41.012658 | 119 | 0.591667 |
5846de10cf4bfa24ca8d8d7bbbfc041e65e605a7 | 3,052 | py | Python | model.py | zhengyangb/NLU2019 | 690ad35e8028d6547ca1d5f71641fb02c377369c | [
"BSD-3-Clause"
] | null | null | null | model.py | zhengyangb/NLU2019 | 690ad35e8028d6547ca1d5f71641fb02c377369c | [
"BSD-3-Clause"
] | null | null | null | model.py | zhengyangb/NLU2019 | 690ad35e8028d6547ca1d5f71641fb02c377369c | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
from embed_regularize import embedded_dropout
from locked_dropout import LockedDropout
from weight_drop import WeightDrop
from ON_LSTM import ONLSTMStack
class RNNModel(nn.Module):
"""Container module with an encoder, a recurrent module, and a decoder."""
def __init__(self,... | 35.488372 | 115 | 0.629423 |
35350298ef26bce632b955532d13abc3a4c1faff | 19,270 | py | Python | se/vendor/kindleunpack/mobi_split.py | vr8hub/tools | 345a3b34ee29094f938d59ee809e44f17cd3d940 | [
"CC0-1.0"
] | 985 | 2015-03-30T22:44:49.000Z | 2022-03-26T00:43:53.000Z | se/vendor/kindleunpack/mobi_split.py | vr8hub/tools | 345a3b34ee29094f938d59ee809e44f17cd3d940 | [
"CC0-1.0"
] | 483 | 2015-11-27T22:06:36.000Z | 2022-03-23T20:13:44.000Z | se/vendor/kindleunpack/mobi_split.py | vr8hub/tools | 345a3b34ee29094f938d59ee809e44f17cd3d940 | [
"CC0-1.0"
] | 148 | 2017-02-23T16:26:08.000Z | 2022-03-04T12:48:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
from __future__ import unicode_literals, division, absolute_import, print_function
import struct
# note: struct pack, unpack, unpack_from all require bytestring format
# data all the way up to at least python 2.7.5, python... | 43.895216 | 170 | 0.656253 |
efeb9e4f53a5d0eeba7d5fa4c91f57add1392269 | 9,427 | py | Python | connector.py | haje01/pypbac | 6c1b78293767dd08039f98c7af1d7813c285e03b | [
"MIT"
] | null | null | null | connector.py | haje01/pypbac | 6c1b78293767dd08039f98c7af1d7813c285e03b | [
"MIT"
] | 8 | 2019-10-18T01:48:37.000Z | 2019-12-10T07:46:38.000Z | connector.py | haje01/pypbac | 6c1b78293767dd08039f98c7af1d7813c285e03b | [
"MIT"
] | null | null | null | """AWS에서 데이터 가져오기."""
# Power Bi에 경고 없이 빠르게 파이썬 버전을 반환
import warnings
warnings.filterwarnings('ignore') # disable warning for dist binary.
import sys
import platform
if len(sys.argv) > 1 and sys.argv[1] == '-V':
print("Python {}".format(platform.python_version()))
sys.exit()
# 여기서 부터 시작 --------------------... | 31.318937 | 108 | 0.57208 |
d4ca66dc01af1ded6159f94d64b2e38e6d1f2702 | 27,592 | py | Python | sqlite_web/sqlite_web.py | ITMO-lab/sqlite-web | 7a1dc0a292e19dc45a96914e7c0c5c3f7b6a01cd | [
"MIT"
] | null | null | null | sqlite_web/sqlite_web.py | ITMO-lab/sqlite-web | 7a1dc0a292e19dc45a96914e7c0c5c3f7b6a01cd | [
"MIT"
] | null | null | null | sqlite_web/sqlite_web.py | ITMO-lab/sqlite-web | 7a1dc0a292e19dc45a96914e7c0c5c3f7b6a01cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import datetime
import math
import operator
import optparse
import os
import re
import sys
import threading
import time
import webbrowser
import hashlib
import random
import string
from collections import namedtuple, OrderedDict
from functools import wraps
from getpass import getpass
from io impo... | 31.788018 | 90 | 0.612823 |
b5e304d77fd325764f2cf81f3db727dbe107836e | 5,747 | py | Python | src/calibrate_laser_camera.py | hushunda/CameraLaserCalibrate | 1576a49f2aab1214f58b97ea2cda2f460fd69751 | [
"MIT"
] | 11 | 2021-01-05T06:45:16.000Z | 2021-12-30T13:16:43.000Z | src/calibrate_laser_camera.py | hushunda/CameraLaserCalibrate | 1576a49f2aab1214f58b97ea2cda2f460fd69751 | [
"MIT"
] | 3 | 2021-03-10T03:08:50.000Z | 2021-04-20T08:48:28.000Z | src/calibrate_laser_camera.py | hushunda/CameraLaserCalibrate | 1576a49f2aab1214f58b97ea2cda2f460fd69751 | [
"MIT"
] | 2 | 2021-05-17T09:52:36.000Z | 2022-01-16T09:47:30.000Z | # coding:utf-8
'''
相机和单线激光标定:
上一步已经相机和标定板的坐标变换
相机坐标和激光时间完全统一
当前:
1. 找出标定板对应的激光点
2. 拟合标定板的直线,
3. 求解最优化
方法1 SVD
方法2 http://people.csail.mit.edu/bkph/articles/Nearest_Orthonormal_Matrix.pdf
https://home.deec.uc.pt/~jpbar/Publication_Source/pami20... | 29.321429 | 125 | 0.511049 |
502d8313b1d834cd4f764d561e3fabaeb7c89441 | 1,269 | py | Python | eynnyd/internal/plan_execution/error_handlers.py | cbefus/Eynnyd | 1b25281af98c1360794806db21f52ddbe0bd2cad | [
"MIT"
] | 3 | 2019-08-24T19:01:52.000Z | 2020-01-21T00:39:07.000Z | eynnyd/internal/plan_execution/error_handlers.py | cbefus/Eynnyd | 1b25281af98c1360794806db21f52ddbe0bd2cad | [
"MIT"
] | null | null | null | eynnyd/internal/plan_execution/error_handlers.py | cbefus/Eynnyd | 1b25281af98c1360794806db21f52ddbe0bd2cad | [
"MIT"
] | null | null | null | import logging
from eynnyd.exceptions import NoGenericErrorHandlerException
LOG = logging.getLogger("error_handlers")
class ErrorHandlers:
def __init__(
self,
pre_response_error_handlers,
post_response_error_handlers):
self._pre_response_error_handlers = pre_response... | 32.538462 | 107 | 0.719464 |
8d0abef9b43e9a2dd7a4947bd7230cf36383dd32 | 5,467 | py | Python | tests/test_exceptions.py | parkerclayton/jira | 87e68994bcc980981934908f7cbff0b7ade52934 | [
"BSD-2-Clause"
] | null | null | null | tests/test_exceptions.py | parkerclayton/jira | 87e68994bcc980981934908f7cbff0b7ade52934 | [
"BSD-2-Clause"
] | 54 | 2021-06-02T06:40:21.000Z | 2022-03-28T23:17:24.000Z | tests/test_exceptions.py | parkerclayton/jira | 87e68994bcc980981934908f7cbff0b7ade52934 | [
"BSD-2-Clause"
] | 1 | 2020-04-23T15:18:49.000Z | 2020-04-23T15:18:49.000Z | import unittest
from pathlib import Path
from unittest.mock import mock_open, patch
from requests import Response
from requests.structures import CaseInsensitiveDict
from jira.exceptions import JIRAError
DUMMY_HEADERS = {"h": "nice headers"}
DUMMY_TEXT = "nice text"
DUMMY_URL = "https://nice.jira.tests"
DUMMY_STATUS... | 36.939189 | 82 | 0.644229 |
981ea979649e3a04e00837bba80b52589ed0eccc | 2,445 | py | Python | src/crawl/unicrawl/spiders/hech_programs.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 4 | 2021-09-24T16:17:57.000Z | 2022-01-31T17:32:16.000Z | src/crawl/unicrawl/spiders/hech_programs.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 23 | 2021-08-02T07:38:47.000Z | 2022-02-11T14:16:56.000Z | src/crawl/unicrawl/spiders/hech_programs.py | VictorLeP/Education4Climate | 7d419c96c759da2215504ac9051dd6f61d940b96 | [
"MIT"
] | 3 | 2021-11-20T06:06:44.000Z | 2022-03-11T07:44:43.000Z | # -*- coding: utf-8 -*-
from abc import ABC
from pathlib import Path
import scrapy
from settings import YEAR, CRAWLING_OUTPUT_FOLDER
BASE_URL = "http://progcours.hech.be/cocoon/fac/fac{}"
DEPARTMENTS_CODES = {
"A": "Département Agronomique",
"E": "Département Economique",
"M": "Département Paramédicale",... | 31.346154 | 116 | 0.574233 |
9a0fc576162f686eafbdd4189c4cf8f7b32cae78 | 40,259 | py | Python | src/olympia/versions/models.py | ankushduacodes/addons-server | 5ff2fd40dbe28852ad53caa42ce804cc64a4bbdc | [
"BSD-3-Clause"
] | null | null | null | src/olympia/versions/models.py | ankushduacodes/addons-server | 5ff2fd40dbe28852ad53caa42ce804cc64a4bbdc | [
"BSD-3-Clause"
] | null | null | null | src/olympia/versions/models.py | ankushduacodes/addons-server | 5ff2fd40dbe28852ad53caa42ce804cc64a4bbdc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import os
from base64 import b64encode
import django.dispatch
from django.core.exceptions import ObjectDoesNotExist
from django.core.files.storage import default_storage as storage
from django.db import models, transaction
from django.db.models import Q
from django.utils.encod... | 35.945536 | 98 | 0.643508 |
fbee5ccca144a025307e8333f1b238dd249c815e | 423 | py | Python | paper_admin/apps.py | dldevinc/paper_admin | ef90605cabdbd2bf966a7b11d5a0a69b72a3dd87 | [
"BSD-3-Clause"
] | 8 | 2021-03-01T00:12:01.000Z | 2022-01-18T10:54:20.000Z | paper_admin/apps.py | dldevinc/paper_admin | ef90605cabdbd2bf966a7b11d5a0a69b72a3dd87 | [
"BSD-3-Clause"
] | 7 | 2020-02-11T21:54:07.000Z | 2022-03-16T15:22:35.000Z | paper_admin/apps.py | dldevinc/paper_admin | ef90605cabdbd2bf966a7b11d5a0a69b72a3dd87 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class Config(AppConfig):
name = "paper_admin"
verbose_name = _("Paper Admin")
def ready(self):
from .patches import django
from django.contrib.auth.views import PasswordResetView
PasswordRes... | 24.882353 | 63 | 0.706856 |
c94fe0833d1b092c80c7dd0259bfc40293b8ddb4 | 112,143 | py | Python | test/orm/test_mapper.py | pje1740/sqlalchemy | 28138ee6fbc1273f1bf16699927e09db81ae7870 | [
"MIT"
] | null | null | null | test/orm/test_mapper.py | pje1740/sqlalchemy | 28138ee6fbc1273f1bf16699927e09db81ae7870 | [
"MIT"
] | null | null | null | test/orm/test_mapper.py | pje1740/sqlalchemy | 28138ee6fbc1273f1bf16699927e09db81ae7870 | [
"MIT"
] | null | null | null | """General mapper operations with an emphasis on selecting/loading."""
import logging
import logging.handlers
import sqlalchemy as sa
from sqlalchemy import ForeignKey
from sqlalchemy import func
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import select
from sqlalchemy import String... | 28.441035 | 79 | 0.517125 |
dde7a612b2a58c31fb1e2c694e39a0cdf992cf90 | 2,798 | py | Python | examples/PointNet/Classification/model_env.py | Obarads/torch_point_cloud | 86e19cc5c1196f22f609f2d98504b913272cbba8 | [
"MIT"
] | 1 | 2021-04-28T13:01:30.000Z | 2021-04-28T13:01:30.000Z | examples/PointNet/Classification/model_env.py | Obarads/torchpcp | 86e19cc5c1196f22f609f2d98504b913272cbba8 | [
"MIT"
] | null | null | null | examples/PointNet/Classification/model_env.py | Obarads/torchpcp | 86e19cc5c1196f22f609f2d98504b913272cbba8 | [
"MIT"
] | null | null | null | import omegaconf
import torch
from torch import optim
from torch import nn
from torch.optim import lr_scheduler
# dataset
from torchpcp.datasets.PointNet.ModelNet import (
ModelNet40, rotation_and_jitter)
# model
from torchpcp.models.PointNet import PointNetClassification
# loss
from torchpcp.losses.feature_tra... | 31.795455 | 86 | 0.700858 |
6a858b602172977520ebdce135b45eb817b8f8d8 | 3,744 | py | Python | py/escher/tests/test_plots.py | lukaw3d/escher | d315efa8727f7c7d5179bbe3a7be64a9c4103e8f | [
"MIT"
] | null | null | null | py/escher/tests/test_plots.py | lukaw3d/escher | d315efa8727f7c7d5179bbe3a7be64a9c4103e8f | [
"MIT"
] | null | null | null | py/escher/tests/test_plots.py | lukaw3d/escher | d315efa8727f7c7d5179bbe3a7be64a9c4103e8f | [
"MIT"
] | null | null | null | from escher import __schema_version__, __map_model_version__
from escher import Builder
from escher.plots import (
_load_resource,
server_index,
model_json_for_name,
map_json_for_name,
)
from escher.urls import get_url
import base64
import os
import sys
from os.path import join, basename
import json
fr... | 27.130435 | 76 | 0.648504 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.