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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b674bd637a73cb01f4ac5b970788f18a3d517d5a | 1,937 | py | Python | internal/notes/builtin-SAVE/packages/cups/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/cups/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/cups/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 43.044444 | 91 | 0.681982 |
5b5be4a587d8b148bfbe0932a95778ad1731336c | 10,037 | py | Python | tests/components/sensor/test_dyson.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 2 | 2020-08-29T07:24:56.000Z | 2020-10-27T21:47:35.000Z | tests/components/sensor/test_dyson.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 6 | 2021-02-08T20:25:50.000Z | 2022-03-11T23:27:53.000Z | tests/components/sensor/test_dyson.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 3 | 2018-09-14T07:34:09.000Z | 2018-09-29T12:57:10.000Z | """Test the Dyson sensor(s) component."""
import unittest
from unittest import mock
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT, \
STATE_OFF
from homeassistant.components.sensor import dyson
from tests.common import get_test_home_assistant
from libpurecoollink.dyson_pure_cool_link import DysonPur... | 44.411504 | 79 | 0.662549 |
f5f66f45028ef509d9fdb192292fca7655c555ea | 1,074 | py | Python | src/main/tools/dbpy/FotechUtils/dbHelper.py | inqwell/inq | 31ce4cd6b9b123b1ec4462905ccbcf7c00d6efc3 | [
"BSD-3-Clause"
] | 1 | 2016-09-25T16:41:57.000Z | 2016-09-25T16:41:57.000Z | src/main/tools/dbpy/FotechUtils/dbHelper.py | inqwell/inq | 31ce4cd6b9b123b1ec4462905ccbcf7c00d6efc3 | [
"BSD-3-Clause"
] | null | null | null | src/main/tools/dbpy/FotechUtils/dbHelper.py | inqwell/inq | 31ce4cd6b9b123b1ec4462905ccbcf7c00d6efc3 | [
"BSD-3-Clause"
] | 2 | 2016-09-25T16:48:49.000Z | 2020-05-26T20:00:33.000Z | #
# $Header: /home/inqwell/cvsroot/dev/scripts/python/FotechUtils/dbHelper.py,v 1.1 2009/05/22 22:16:31 sanderst Exp $
#
import os
import KBC.fotech
from Util import db
from FotechUtils import LogHelper
from FotechUtils import dbUtils
from FotechUtils.FotechRoot import FOTechRoot
from FotechUtils.pwHelper import ge... | 27.538462 | 116 | 0.735568 |
e9866122e9d000e996b74af5f485f1b23689321e | 769 | py | Python | tools/win32build/doall.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | tools/win32build/doall.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | tools/win32build/doall.py | ivanov/numpy | 6d2665626e40f346bb5af8d780579f5a429ff9ba | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division
import subprocess
import os
if __name__ == '__main__':
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-p", "--pyver", dest="pyver",
help = "Python version (2.4, 2.5, etc...)")
opts, args = parser.parse_args()
pyve... | 27.464286 | 74 | 0.583875 |
71f6803ba986621dd3026d83437940305673349b | 6,473 | py | Python | devel/.private/hector_uav_msgs/lib/python2.7/dist-packages/hector_uav_msgs/msg/_VelocityXYCommand.py | arijitnoobstar/UAVProjectileCatcher | 3c1bed80df167192cb4b971b58c891187628142e | [
"Apache-2.0"
] | 10 | 2021-03-15T03:58:06.000Z | 2021-12-30T15:33:38.000Z | Chapter_7_code/devel/.private/hector_uav_msgs/lib/python2.7/dist-packages/hector_uav_msgs/msg/_VelocityXYCommand.py | crepuscularlight/ROSbyExample | fa7b1a60cacca9b1034e318a2ac16ce4c8530d7c | [
"MIT"
] | 1 | 2021-09-09T15:29:31.000Z | 2021-09-09T15:29:31.000Z | Chapter_7_code/devel/.private/hector_uav_msgs/lib/python2.7/dist-packages/hector_uav_msgs/msg/_VelocityXYCommand.py | crepuscularlight/ROSbyExample | fa7b1a60cacca9b1034e318a2ac16ce4c8530d7c | [
"MIT"
] | 4 | 2021-03-06T09:35:58.000Z | 2021-05-24T14:34:11.000Z | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from hector_uav_msgs/VelocityXYCommand.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import std_msgs.msg
class VelocityXYCommand(genpy.Message):
_md5sum... | 33.890052 | 145 | 0.641588 |
46e28ab8405eab40b70bec6310aa483a1d96e3ba | 9,065 | py | Python | utils.py | ZRunner/ZBot-test | 6b1b906807405ab73c721aa92cd7230a8636e61c | [
"MIT"
] | null | null | null | utils.py | ZRunner/ZBot-test | 6b1b906807405ab73c721aa92cd7230a8636e61c | [
"MIT"
] | null | null | null | utils.py | ZRunner/ZBot-test | 6b1b906807405ab73c721aa92cd7230a8636e61c | [
"MIT"
] | null | null | null | import argparse
import glob
import logging
import os
import sys
from logging.handlers import RotatingFileHandler
from typing import TYPE_CHECKING
import discord
import mysql
from discord.ext import commands
from fcts import cryptage, tokens # pylint: disable=no-name-in-module
if TYPE_CHECKING:
from libs.classes... | 42.359813 | 258 | 0.609156 |
988c8aaf033c0c5e15f6254e5acc10faf07e566b | 199 | py | Python | application/__init__.py | Naoto-Ida/PiStats-Server | 67bc7224ccf77a3e46bc07a9781bf989d4631849 | [
"MIT"
] | null | null | null | application/__init__.py | Naoto-Ida/PiStats-Server | 67bc7224ccf77a3e46bc07a9781bf989d4631849 | [
"MIT"
] | null | null | null | application/__init__.py | Naoto-Ida/PiStats-Server | 67bc7224ccf77a3e46bc07a9781bf989d4631849 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
app = Flask(__name__)
Bootstrap(app)
import application.index
import application.cpu
import application.disk
import application.memory
| 18.090909 | 37 | 0.844221 |
64325f603e48b2e1f18f8addfaaf255e3fde410f | 4,067 | py | Python | Solid/StochasticHillClimb.py | Yamp/Solid | 96e7f5de2e7a481aadef93add9cfa3a8270705b3 | [
"MIT"
] | null | null | null | Solid/StochasticHillClimb.py | Yamp/Solid | 96e7f5de2e7a481aadef93add9cfa3a8270705b3 | [
"MIT"
] | null | null | null | Solid/StochasticHillClimb.py | Yamp/Solid | 96e7f5de2e7a481aadef93add9cfa3a8270705b3 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
from copy import deepcopy
from math import exp
from random import random
class StochasticHillClimb(metaclass=ABCMeta):
"""
Conducts stochastic hill climb
"""
initial_state = None
current_state = None
best_state = None
cur_steps = 0
max_steps = ... | 30.810606 | 111 | 0.605606 |
e98f7f518eb25c1a0e126b0bb4c5d0c8ff489f2d | 212 | py | Python | admin_list_controls/tests/utils.py | murray3k/wagtail-admin-list-controls | ad162fe70b9795937777b2dd6a01261deb394fdb | [
"MIT"
] | 30 | 2020-03-11T06:45:31.000Z | 2022-01-24T13:54:17.000Z | admin_list_controls/tests/utils.py | murray3k/wagtail-admin-list-controls | ad162fe70b9795937777b2dd6a01261deb394fdb | [
"MIT"
] | 14 | 2020-03-09T20:54:27.000Z | 2021-09-03T00:42:05.000Z | admin_list_controls/tests/utils.py | murray3k/wagtail-admin-list-controls | ad162fe70b9795937777b2dd6a01261deb394fdb | [
"MIT"
] | 3 | 2020-03-09T14:17:38.000Z | 2021-05-18T09:16:50.000Z | from django.test import TestCase
class BaseTestCase(TestCase):
def assertObjectSerializesTo(self, obj, subset):
serialized = obj.serialize()
self.assertDictContainsSubset(subset, serialized) | 30.285714 | 57 | 0.75 |
d870f62103cdbfee9479b651ca7889f215baeabc | 105,050 | py | Python | core/domain/user_services_test.py | EishaMazhar/oppia | ab4f3cf20764b27f567798e4b1184471aaf7f73b | [
"Apache-2.0"
] | null | null | null | core/domain/user_services_test.py | EishaMazhar/oppia | ab4f3cf20764b27f567798e4b1184471aaf7f73b | [
"Apache-2.0"
] | 1 | 2020-05-27T06:08:17.000Z | 2020-05-27T06:08:17.000Z | core/domain/user_services_test.py | EishaMazhar/oppia | ab4f3cf20764b27f567798e4b1184471aaf7f73b | [
"Apache-2.0"
] | 1 | 2018-03-20T14:12:31.000Z | 2018-03-20T14:12:31.000Z | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 42.08734 | 113 | 0.676259 |
7c9bd027e5a58bbe95f56291ecb0bab88985b99e | 146,605 | py | Python | dask/dataframe/tests/test_dataframe.py | celsiustx/dask | b1e2948a553d60f901a1e475a55dd1566d8eb7e7 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/tests/test_dataframe.py | celsiustx/dask | b1e2948a553d60f901a1e475a55dd1566d8eb7e7 | [
"BSD-3-Clause"
] | 3 | 2020-05-15T23:06:48.000Z | 2020-07-30T09:37:05.000Z | dask/dataframe/tests/test_dataframe.py | celsiustx/dask | b1e2948a553d60f901a1e475a55dd1566d8eb7e7 | [
"BSD-3-Clause"
] | null | null | null | import warnings
from itertools import product
from operator import add
from unittest import TestCase
import pytest
import numpy as np
import pandas as pd
from pandas.io.formats import format as pandas_format
from pandas.testing import assert_frame_equal, assert_series_equal
import dask
import dask.array as da
from da... | 30.87071 | 109 | 0.586733 |
e93c7b86a135e517911b5fdc162ee4d382e9ebb0 | 377 | py | Python | tools/Polygraphy/tests/tools/test_polygraphy.py | hwkyai/TensorRT | d04182cd0086c70db4a8ad30e0d7675c4eb33782 | [
"Apache-2.0"
] | null | null | null | tools/Polygraphy/tests/tools/test_polygraphy.py | hwkyai/TensorRT | d04182cd0086c70db4a8ad30e0d7675c4eb33782 | [
"Apache-2.0"
] | null | null | null | tools/Polygraphy/tests/tools/test_polygraphy.py | hwkyai/TensorRT | d04182cd0086c70db4a8ad30e0d7675c4eb33782 | [
"Apache-2.0"
] | null | null | null | import os
import polygraphy
from tests.tools.common import run_polygraphy
class TestPolygraphyBin(object):
def test_version(self):
status = run_polygraphy(["-v"])
assert status.stdout.strip().replace("\n", " ").replace(" ", " ") == "Polygraphy | Version: {:} | Path: {:}".format(polygraphy.__vers... | 34.272727 | 198 | 0.681698 |
25b20eb9aec333f80811658e262aa707a14b5d58 | 887 | py | Python | userbot/plugins/alive.py | Azharjacx/NandiOXbot | c1ee9162123d4ecda1da79124ae1219d79e148a0 | [
"MIT"
] | null | null | null | userbot/plugins/alive.py | Azharjacx/NandiOXbot | c1ee9162123d4ecda1da79124ae1219d79e148a0 | [
"MIT"
] | null | null | null | userbot/plugins/alive.py | Azharjacx/NandiOXbot | c1ee9162123d4ecda1da79124ae1219d79e148a0 | [
"MIT"
] | null | null | null | """Check if userbot alive."""
import asyncio
from telethon import events
from telethon.tl.types import ChannelParticipantsAdmins
from platform import uname
from userbot import ALIVE_NAME
from userbot.utils import admin_cmd
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "No name set yet nibba, check pinned in... | 44.35 | 101 | 0.632469 |
01d646e8d30dabc9d7cbb9dff0286a25f2d2903e | 901 | py | Python | django/helpdesk_deploy_old/helpdesk/base/managers/user.py | Netromnik/python | 630a9df63b1cade9af38de07bb9cd0c3b8694c93 | [
"Apache-2.0"
] | null | null | null | django/helpdesk_deploy_old/helpdesk/base/managers/user.py | Netromnik/python | 630a9df63b1cade9af38de07bb9cd0c3b8694c93 | [
"Apache-2.0"
] | null | null | null | django/helpdesk_deploy_old/helpdesk/base/managers/user.py | Netromnik/python | 630a9df63b1cade9af38de07bb9cd0c3b8694c93 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import reverse
from base.models_i.file import CollectMedia
from django.shortcuts import reverse
from base.models_i.file import CollectMedia
class UserModelCustomManeger():
def get_view_type_url(self,q,s):
## table
return reverse("view:router:router_table",kwargs={"slug_quer... | 29.064516 | 96 | 0.580466 |
621becfe68f4065655f72f0008f7e6bdd5340f3d | 754 | py | Python | var/spack/repos/builtin/packages/py-snowballstemmer/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/py-snowballstemmer/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/py-snowballstemmer/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PySnowballstemmer(PythonPackage):
"""This package provides 16 stemmer algorithms (15 + Poe... | 37.7 | 95 | 0.763926 |
f20e92770dc13448e8302823145eb6169bac2627 | 2,546 | py | Python | pipe-cli/src/model/cluster_node_model.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 126 | 2019-03-22T19:40:38.000Z | 2022-02-16T13:01:44.000Z | pipe-cli/src/model/cluster_node_model.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 1,189 | 2019-03-25T10:39:27.000Z | 2022-03-31T12:50:33.000Z | pipe-cli/src/model/cluster_node_model.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 62 | 2019-03-22T22:09:49.000Z | 2022-03-08T12:05:56.000Z | # Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/)
#
# 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 appli... | 39.78125 | 102 | 0.615868 |
ba3280c74e142ee18b6ef041b3aff4f88df5c35b | 5,081 | py | Python | try_to_import_package_and_modules.py | eda-ricercatore/scienza_dei_dati | 999972b2cbfb52e802143b13651438723898b53d | [
"MIT"
] | null | null | null | try_to_import_package_and_modules.py | eda-ricercatore/scienza_dei_dati | 999972b2cbfb52e802143b13651438723898b53d | [
"MIT"
] | null | null | null | try_to_import_package_and_modules.py | eda-ricercatore/scienza_dei_dati | 999972b2cbfb52e802143b13651438723898b53d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""try_to_import_package_and_modules.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Q4ig5YLEjnEWee61SazViyGvkqpPgaAZ
"""
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
### /usr/bin/python
### /Library/Fr... | 31.75625 | 462 | 0.696516 |
f8c25b89604291903dc921710140b14dee87c4f3 | 7,646 | py | Python | scripts/opengl/src_util.py | karolherbst/VK-GL-CTS | bb088fddd8673dc4f37e5956c42890645ab31577 | [
"Apache-2.0"
] | null | null | null | scripts/opengl/src_util.py | karolherbst/VK-GL-CTS | bb088fddd8673dc4f37e5956c42890645ab31577 | [
"Apache-2.0"
] | null | null | null | scripts/opengl/src_util.py | karolherbst/VK-GL-CTS | bb088fddd8673dc4f37e5956c42890645ab31577 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015-2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not ... | 32.956897 | 105 | 0.760005 |
c926c99a999bb88388c77d859e54c8973417b9db | 22,087 | py | Python | youtube_dl/extractor/twitch.py | aalvarito68/https-github.com-rg3-youtube-dl | dfc80bdd2e4ef3d30f161a93f99f3050537944ab | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/twitch.py | aalvarito68/https-github.com-rg3-youtube-dl | dfc80bdd2e4ef3d30f161a93f99f3050537944ab | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/twitch.py | aalvarito68/https-github.com-rg3-youtube-dl | dfc80bdd2e4ef3d30f161a93f99f3050537944ab | [
"Unlicense"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import itertools
import re
import random
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_parse_qs,
compat_str,
compat_urllib_parse_urlencode,
compat_urllib_parse_urlparse,
)
from ..utils import (
clean_ht... | 34.727987 | 101 | 0.543759 |
97e21dd1bccdee7f36bbd780487aa19ea7819d01 | 4,710 | py | Python | AWS/check_reserved_instances_ec2.py | borkit/scriptdump | 86c622e7a5ce48c75efa9eceeac58b8c69e24973 | [
"MIT"
] | 4 | 2019-02-01T22:50:24.000Z | 2020-10-22T15:50:04.000Z | AWS/check_reserved_instances_ec2.py | borkit/scriptdump | 86c622e7a5ce48c75efa9eceeac58b8c69e24973 | [
"MIT"
] | null | null | null | AWS/check_reserved_instances_ec2.py | borkit/scriptdump | 86c622e7a5ce48c75efa9eceeac58b8c69e24973 | [
"MIT"
] | 2 | 2019-01-27T09:30:56.000Z | 2020-10-22T15:50:28.000Z | #!/usr/bin/python
import boto3
import logging
import argparse
from pprint import pformat,pprint
parser = argparse.ArgumentParser(description='Cross reference existing ec2 reservations to current instances.')
parser.add_argument('--log', default="WARN", help='Change log level (default: WARN)')
parser.add_argume... | 45.728155 | 158 | 0.635881 |
406d75c1bbdd0a3a8947d69ef9f39f580ed500b2 | 2,666 | py | Python | Pimoroni/sgp30_simpletest.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | 1 | 2021-03-22T18:38:43.000Z | 2021-03-22T18:38:43.000Z | Pimoroni/sgp30_simpletest.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | null | null | null | Pimoroni/sgp30_simpletest.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | 1 | 2021-02-06T10:07:36.000Z | 2021-02-06T10:07:36.000Z | # sgp30_simpletest.py
# https://github.com/alexmrqt/micropython-sgp30
# adaption to the I2C bus of Raspberry Pi Pico by
# 2021-03-11 Claus Kühnel info@ckuehnel.ch
"""
Example for using the SGP30 with MicroPython and the Adafruit library.
Uses instructions from "SGP30 Driver Integration (for Software I²C)" to handle
s... | 28.666667 | 82 | 0.685296 |
3a3bc6214834229cbe6bae6f721f8789dbc17f85 | 6,866 | py | Python | neutron/db/extraroute_db.py | iiscsahoo/Neutron | 2bf91b2f1036e62a6d76bb0f7a82304f15dce1f3 | [
"Apache-2.0"
] | null | null | null | neutron/db/extraroute_db.py | iiscsahoo/Neutron | 2bf91b2f1036e62a6d76bb0f7a82304f15dce1f3 | [
"Apache-2.0"
] | null | null | null | neutron/db/extraroute_db.py | iiscsahoo/Neutron | 2bf91b2f1036e62a6d76bb0f7a82304f15dce1f3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013, Nachi Ueno, NTT MCL, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | 40.869048 | 78 | 0.641421 |
8091c0a59396a0e5bdc8ee46c4541e81f14adcf9 | 61 | py | Python | speedtest_servers/extensions.py | Nearata/speedtest-servers | 21f835be724afffc47b7f3eb1c5bda909063aa15 | [
"MIT"
] | null | null | null | speedtest_servers/extensions.py | Nearata/speedtest-servers | 21f835be724afffc47b7f3eb1c5bda909063aa15 | [
"MIT"
] | null | null | null | speedtest_servers/extensions.py | Nearata/speedtest-servers | 21f835be724afffc47b7f3eb1c5bda909063aa15 | [
"MIT"
] | null | null | null | from flask_assets import Environment
assets = Environment() | 15.25 | 36 | 0.819672 |
70e99c893b0158fde73adf1d68be485ac035ac1a | 25,407 | gyp | Python | gpu/gpu.gyp | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | gpu/gpu.gyp | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | gpu/gpu.gyp | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-04-04T13:34:56.000Z | 2020-11-04T07:17:52.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'nacl_win64_target': 0,
},
'includes': [
'gpu_common.gypi',
],
'targets': [
{
# Library emulates GLES2 using... | 35.584034 | 94 | 0.582399 |
535a378abb76d7d35bfbce9262745ab62b54ac5c | 3,637 | py | Python | openpeerpower/components/speedtestdotnet/config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/components/speedtestdotnet/config_flow.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/components/speedtestdotnet/config_flow.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Config flow for Speedtest.net."""
import voluptuous as vol
from openpeerpower import config_entries
from openpeerpower.const import CONF_MONITORED_CONDITIONS, CONF_SCAN_INTERVAL
from openpeerpower.core import callback
from . import server_id_valid
from .const import (
CONF_MANUAL,
CONF_SERVER_ID,
CONF_... | 32.185841 | 86 | 0.630465 |
78f1c3ca6a0e1b43b42bb7df860cb0277a492f62 | 1,334 | py | Python | src/pykeen/datasets/db100k.py | nhutnamhcmus/pykeen | 62d4f075fbd39135d6a5c8677d95e1ac46f8318f | [
"MIT"
] | 750 | 2020-06-23T08:36:34.000Z | 2022-03-30T22:53:18.000Z | src/pykeen/datasets/db100k.py | nhutnamhcmus/pykeen | 62d4f075fbd39135d6a5c8677d95e1ac46f8318f | [
"MIT"
] | 691 | 2020-06-22T11:56:28.000Z | 2022-03-31T16:07:32.000Z | src/pykeen/datasets/db100k.py | nhutnamhcmus/pykeen | 62d4f075fbd39135d6a5c8677d95e1ac46f8318f | [
"MIT"
] | 122 | 2020-06-26T14:37:56.000Z | 2022-03-23T08:25:22.000Z | # -*- coding: utf-8 -*-
"""The DB100K dataset."""
from docdata import parse_docdata
from .base import UnpackedRemoteDataset
BASE_URL = "https://raw.githubusercontent.com/iieir-km/ComplEx-NNE_AER/master/datasets/DB100K"
__all__ = [
"DB100K",
]
@parse_docdata
class DB100K(UnpackedRemoteDataset):
"""The DB1... | 25.169811 | 103 | 0.636432 |
d751fb661305e11553f163240ea881d3254a5beb | 4,422 | py | Python | test/test_container_authenticator.py | IBM/python-sdk-core | 8bbeca9480a022c9f2f752a2a3ca4e22779aebe9 | [
"Apache-2.0"
] | 14 | 2019-03-13T19:13:48.000Z | 2021-11-16T11:05:30.000Z | test/test_container_authenticator.py | IBM/python-sdk-core | 8bbeca9480a022c9f2f752a2a3ca4e22779aebe9 | [
"Apache-2.0"
] | 140 | 2019-03-14T19:49:40.000Z | 2022-03-21T11:14:03.000Z | test/test_container_authenticator.py | IBM/python-sdk-core | 8bbeca9480a022c9f2f752a2a3ca4e22779aebe9 | [
"Apache-2.0"
] | 22 | 2019-05-08T14:50:08.000Z | 2022-01-13T10:32:06.000Z | # pylint: disable=missing-docstring
import pytest
from ibm_cloud_sdk_core.authenticators import ContainerAuthenticator, Authenticator
def test_container_authenticator():
authenticator = ContainerAuthenticator(iam_profile_name='iam-user-123')
assert authenticator is not None
assert authenticator.authentic... | 41.716981 | 93 | 0.758254 |
e823bd50d6fc17b28e60615fc95c33360669b6a8 | 16,805 | py | Python | corehq/apps/reports/filters/users.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/reports/filters/users.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/reports/filters/users.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | from django.core.exceptions import PermissionDenied
from django.urls import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy, ugettext_noop
from memoized import memoized
from corehq.apps.commtrack.models import ... | 37.595078 | 114 | 0.660458 |
4d68a97367bfa24b2b32f42773eb76752ac2bc68 | 2,700 | py | Python | tests/storage/sqlite/merge_reader.py | SamuelePilleri/plaso | f5687f12a89c7309797ccc285da78e855c120579 | [
"Apache-2.0"
] | null | null | null | tests/storage/sqlite/merge_reader.py | SamuelePilleri/plaso | f5687f12a89c7309797ccc285da78e855c120579 | [
"Apache-2.0"
] | null | null | null | tests/storage/sqlite/merge_reader.py | SamuelePilleri/plaso | f5687f12a89c7309797ccc285da78e855c120579 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the merge reader for SQLite storage files."""
from __future__ import unicode_literals
import os
import unittest
from plaso.containers import sessions
from plaso.containers import tasks
from plaso.lib import definitions
from plaso.storage.sqlite import merge_... | 30 | 77 | 0.742222 |
b003ed4bdca432ceee1b619212cc3d99b62bf468 | 3,707 | py | Python | software/multifluids_icferst/tests/prescribed_normal_flow_landslide/slide_movement.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | 2 | 2020-05-11T02:39:46.000Z | 2020-05-11T03:08:38.000Z | software/multifluids_icferst/tests/prescribed_normal_flow_landslide/slide_movement.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | null | null | null | software/multifluids_icferst/tests/prescribed_normal_flow_landslide/slide_movement.py | msc-acse/acse-9-independent-research-project-Wade003 | cfcba990d52ccf535171cf54c0a91b184db6f276 | [
"MIT"
] | 2 | 2020-05-21T22:50:19.000Z | 2020-10-28T17:16:31.000Z | #!/usr/bin/nv python
import numpy as np
import math
import argparse
import pylab
import fileinput
slide_start_x = 112500
R = 150000 # slide total runout
U_max = 35.0
T = (math.pi / 2.0) * ( R / U_max)
max_h = 144.0
L = 223000
S = 1000
Ra = 75000
Rc = 0
Rd = 75000
Ta = math.pi*Ra / (2.0 * U_max)
Tc = Rc / U_max
Td = m... | 21.427746 | 113 | 0.530078 |
4b3a790c44b092ec973ac73c9831061f6994d14a | 55 | py | Python | adapters/__init__.py | JVGC/MyFinancesPython | 5e4ac02ea00c4ddab688dd0093eed3f3fb2ad826 | [
"MIT"
] | null | null | null | adapters/__init__.py | JVGC/MyFinancesPython | 5e4ac02ea00c4ddab688dd0093eed3f3fb2ad826 | [
"MIT"
] | null | null | null | adapters/__init__.py | JVGC/MyFinancesPython | 5e4ac02ea00c4ddab688dd0093eed3f3fb2ad826 | [
"MIT"
] | null | null | null | from .DebtAdapter import *
from .FlaskAdapter import *
| 18.333333 | 27 | 0.781818 |
ec144731dd4bd53b05a17764dcbe7bbde11a77d7 | 376 | py | Python | profiles/mono-mac-release/mono-mac-release.py | mhutch/bockbuild | 0d989e2d0259d17d41a195f8d28b3844a4652e7b | [
"MIT"
] | null | null | null | profiles/mono-mac-release/mono-mac-release.py | mhutch/bockbuild | 0d989e2d0259d17d41a195f8d28b3844a4652e7b | [
"MIT"
] | null | null | null | profiles/mono-mac-release/mono-mac-release.py | mhutch/bockbuild | 0d989e2d0259d17d41a195f8d28b3844a4652e7b | [
"MIT"
] | null | null | null | #!/usr/bin/python -B -u
import sys
import traceback
sys.path.append('../..')
from MonoReleaseProfile import MonoReleaseProfile
from bockbuild.util.util import *
try:
MonoReleaseProfile().build()
except Exception as e:
exc_type, exc_value, exc_traceback = sys.exc_info()
error ('%s\n%s' % (str(e), "\n".join (repr(... | 25.066667 | 99 | 0.718085 |
03e84e5f15b4a1324c2f55c0fa68d22fb569e076 | 5,202 | py | Python | onsets_frames_transcription_create_dataset_maps.py | treeson-li/onsets_frames_transcription | 2cebfe738ea23258b3223094ab25d4e130ac2caf | [
"Apache-2.0"
] | null | null | null | onsets_frames_transcription_create_dataset_maps.py | treeson-li/onsets_frames_transcription | 2cebfe738ea23258b3223094ab25d4e130ac2caf | [
"Apache-2.0"
] | null | null | null | onsets_frames_transcription_create_dataset_maps.py | treeson-li/onsets_frames_transcription | 2cebfe738ea23258b3223094ab25d4e130ac2caf | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 35.630137 | 80 | 0.705498 |
0a3a7e94805d530b5c984c150106a393926e112f | 841 | py | Python | test/functional/rpc_uptime.py | bitcoinlimitededition/bitcoinlimitededition | befc25e21abf8e02f260474210bd074a4f0b07b2 | [
"MIT"
] | null | null | null | test/functional/rpc_uptime.py | bitcoinlimitededition/bitcoinlimitededition | befc25e21abf8e02f260474210bd074a4f0b07b2 | [
"MIT"
] | null | null | null | test/functional/rpc_uptime.py | bitcoinlimitededition/bitcoinlimitededition | befc25e21abf8e02f260474210bd074a4f0b07b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoinlimitededition Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC call related to the uptime command.
Test corresponds to code in rpc/server.cpp.
... | 27.129032 | 76 | 0.722949 |
d1b00503efb287ca5464c6ea31ada1b429e7d66f | 4,628 | py | Python | nets/classifier.py | LuckyXie0427/myFasterRCNN | 0603a6dfdde32be7cec44cf314c3d5b2c5f97add | [
"MIT"
] | null | null | null | nets/classifier.py | LuckyXie0427/myFasterRCNN | 0603a6dfdde32be7cec44cf314c3d5b2c5f97add | [
"MIT"
] | null | null | null | nets/classifier.py | LuckyXie0427/myFasterRCNN | 0603a6dfdde32be7cec44cf314c3d5b2c5f97add | [
"MIT"
] | 1 | 2022-03-14T05:29:42.000Z | 2022-03-14T05:29:42.000Z | import warnings
import torch
from torch import nn
from torchvision.ops import RoIPool
warnings.filterwarnings("ignore")
class VGG16RoIHead(nn.Module):
def __init__(self, n_class, roi_size, spatial_scale, classifier):
super(VGG16RoIHead, self).__init__()
self.classifier = classifier
#-----... | 39.896552 | 95 | 0.446845 |
e8f87aecc5c5b1b3aa0ee070ecf039e0478dc25e | 2,694 | py | Python | scitbx/math/tests/tst_uniform_rotation_matrix.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/math/tests/tst_uniform_rotation_matrix.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/math/tests/tst_uniform_rotation_matrix.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
import math, random
from scitbx import matrix
from scitbx.array_family import flex
# -----------------------------------------------------------------------------
# simplified form of surface integral for spherical harmonic (l = m)
# http://en.wikipedia.org/wiki/Table_of_spherical_harmo... | 31.325581 | 79 | 0.580921 |
c23269dd2045c4aba08f46fd0e27d20bb62e97f7 | 3,517 | py | Python | visual/assets/racko.py | lhr-solar/DataAcquisition | ff257396e92eb76d1b4050d41c3c0dc8e7afbf7b | [
"MIT"
] | 1 | 2021-09-04T15:26:43.000Z | 2021-09-04T15:26:43.000Z | visual/assets/racko.py | lhr-solar/DataAcquisition | ff257396e92eb76d1b4050d41c3c0dc8e7afbf7b | [
"MIT"
] | 5 | 2020-07-24T21:19:59.000Z | 2021-05-31T17:16:48.000Z | visual/assets/racko.py | lhr-solar/DataAcquisition | ff257396e92eb76d1b4050d41c3c0dc8e7afbf7b | [
"MIT"
] | 1 | 2020-07-16T19:46:56.000Z | 2020-07-16T19:46:56.000Z | # File: racko.py
# Description: A program that simulates the card and number game
# Rack-O. Players use the keyboard and take turns.
# Assignment Number: 10
#
# Name: <YOUR NAME>
# EID: <YOUR EID>
# Email: <YOUR EMAIL>
# Grader: <YOUR GRADER'S NAME Irena OR Noah OR Skyler OR Tyler>
#
# On my honor, <YOUR NAME>, this p... | 35.525253 | 79 | 0.680409 |
c1ebf0ce0e354c1328f3d8804daa4155b0856218 | 3,799 | py | Python | docugen/changelog.py | adsfgg/LazarusMod | 47525094eaf175fe1f11c624c1536581ded8cfa8 | [
"MIT"
] | 3 | 2019-10-27T14:10:30.000Z | 2021-01-13T18:29:51.000Z | docugen/changelog.py | adsfgg/LazarusMod | 47525094eaf175fe1f11c624c1536581ded8cfa8 | [
"MIT"
] | 2 | 2019-10-07T22:11:47.000Z | 2019-10-10T00:14:33.000Z | docugen/changelog.py | adsfgg/LazarusMod | 47525094eaf175fe1f11c624c1536581ded8cfa8 | [
"MIT"
] | 9 | 2019-10-03T17:44:59.000Z | 2021-12-20T18:01:38.000Z | class ChangeLogTree:
def __init__(self, raw_changelog):
self.root_node = ChangeLogNode("root")
for key,value in raw_changelog:
self.injestkey(self.root_node, key, value)
def injestkey(self, root, key, value):
if "." in key:
subkeys = key.split(".")
ro... | 33.619469 | 107 | 0.564622 |
dfe1334669248a003a4ef2d23f0f2effa5b9313a | 3,247 | py | Python | seniorProjectApp/views.py | mpreyes/SeniorProject | cbcfb132dc24c63c0bb4c43cc2817309c9ea0d2b | [
"MIT"
] | 1 | 2019-02-08T21:15:15.000Z | 2019-02-08T21:15:15.000Z | seniorProjectApp/views.py | mpreyes/SeniorProject | cbcfb132dc24c63c0bb4c43cc2817309c9ea0d2b | [
"MIT"
] | null | null | null | seniorProjectApp/views.py | mpreyes/SeniorProject | cbcfb132dc24c63c0bb4c43cc2817309c9ea0d2b | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.http import HttpResponse,HttpResponseRedirect
from django.core.cache import caches
from django.shortcuts import render, get_object_or_404
from django.urls import reverse_lazy
from django.views import generic
from .forms import CustomUserCreationForm, ProgressFor... | 32.148515 | 127 | 0.695103 |
896d29075ce3ce1505523f55764103afa8355b2c | 15,637 | py | Python | REMARKs/GanongNoelUI/code/estimate_models.py | ngkratts/REMARK | 92c057a93a7d10a890696db55f874d5fde394b91 | [
"Apache-2.0"
] | 18 | 2019-01-28T13:17:39.000Z | 2021-09-10T16:29:55.000Z | REMARKs/GanongNoelUI/code/estimate_models.py | ngkratts/REMARK | 92c057a93a7d10a890696db55f874d5fde394b91 | [
"Apache-2.0"
] | 89 | 2019-01-06T19:32:34.000Z | 2021-08-30T13:30:48.000Z | REMARKs/GanongNoelUI/code/estimate_models.py | ngkratts/REMARK | 92c057a93a7d10a890696db55f874d5fde394b91 | [
"Apache-2.0"
] | 50 | 2018-08-01T16:33:06.000Z | 2021-10-05T20:20:26.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 16 08:48:22 2018
@author: Xian_Work
"""
import scipy
from scipy.optimize import fmin, brute
from model_plotting import norm , compute_dist,gen_evolve_share_series, mk_mix_agent
#Import parameters and other UI modules
param_path="../Parameters/params_ui.json"
execfile("... | 37.498801 | 137 | 0.483724 |
278a311c09b050885b75e32e99d072cafb3b59a1 | 1,708 | py | Python | python/tvm/relay/op/contrib/register.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 4,640 | 2017-08-17T19:22:15.000Z | 2019-11-04T15:29:46.000Z | python/tvm/relay/op/contrib/register.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 3,022 | 2020-11-24T14:02:31.000Z | 2022-03-31T23:55:31.000Z | python/tvm/relay/op/contrib/register.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 1,352 | 2017-08-17T19:30:38.000Z | 2019-11-04T16:09:29.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.846154 | 80 | 0.720726 |
384d3180a9ec40eb66beba3c5322e55df3ca0d35 | 9,154 | py | Python | workflows/pipe-templates/__SYSTEM/data_loader/src/sys-data-upload.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 126 | 2019-03-22T19:40:38.000Z | 2022-02-16T13:01:44.000Z | workflows/pipe-templates/__SYSTEM/data_loader/src/sys-data-upload.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 1,189 | 2019-03-25T10:39:27.000Z | 2022-03-31T12:50:33.000Z | workflows/pipe-templates/__SYSTEM/data_loader/src/sys-data-upload.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 62 | 2019-03-22T22:09:49.000Z | 2022-03-08T12:05:56.000Z | # Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/)
#
# 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 appli... | 48.951872 | 205 | 0.629342 |
5793e9e40749d896a72fc834c79370f6c8a5390d | 5,076 | py | Python | pychron/hardware/gauges/mks/base_mks_gauge.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/hardware/gauges/mks/base_mks_gauge.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/hardware/gauges/mks/base_mks_gauge.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2011 Jake Ross
#
# 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/licens... | 30.214286 | 81 | 0.48227 |
36585b8e103ed8c7adbe70e9f48f8dc616fbaead | 22,344 | py | Python | homeassistant/components/sensor/buienradar.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 4 | 2019-01-10T14:47:54.000Z | 2021-04-22T02:06:27.000Z | homeassistant/components/sensor/buienradar.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 6 | 2021-02-08T21:02:40.000Z | 2022-03-12T00:52:16.000Z | homeassistant/components/sensor/buienradar.py | dauden1184/home-assistant | f4c6d389b77d0efa86644e76604eaea5d21abdb5 | [
"Apache-2.0"
] | 3 | 2018-08-29T19:26:20.000Z | 2020-01-19T11:58:22.000Z | """
Support for Buienradar.nl weather service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.buienradar/
"""
import asyncio
from datetime import datetime, timedelta
import logging
import async_timeout
import aiohttp
import voluptuous as vol
imp... | 39.338028 | 79 | 0.595641 |
e5800524522c3c4476faf2637092e0bc17a3cc04 | 81 | py | Python | quad_ws/src/quad_simulation/quad_simulation/urdf/__init__.py | reubenstr/zuko | 0d6733c1dce6ec16236323b0a2fdbd2a3b488b29 | [
"MIT"
] | 1 | 2022-03-09T00:37:09.000Z | 2022-03-09T00:37:09.000Z | quad_ws/src/quad_simulation/quad_simulation/urdf/__init__.py | reubenstr/zuko | 0d6733c1dce6ec16236323b0a2fdbd2a3b488b29 | [
"MIT"
] | null | null | null | quad_ws/src/quad_simulation/quad_simulation/urdf/__init__.py | reubenstr/zuko | 0d6733c1dce6ec16236323b0a2fdbd2a3b488b29 | [
"MIT"
] | null | null | null | import os
def getDataPath():
return os.path.join(os.path.dirname(__file__))
| 16.2 | 50 | 0.728395 |
d016d8895445bc84489daa6747daa419c2b1b433 | 2,501 | py | Python | tests/api-rate-limit-test.py | caltechlibrary/pindu | 61a8407a706cfed425d797b9533ec703c5040c09 | [
"BSD-3-Clause"
] | 16 | 2019-03-15T15:45:00.000Z | 2022-01-17T18:40:02.000Z | tests/api-rate-limit-test.py | caltechlibrary/pindu | 61a8407a706cfed425d797b9533ec703c5040c09 | [
"BSD-3-Clause"
] | 5 | 2019-03-16T20:39:15.000Z | 2019-03-17T03:17:27.000Z | tests/api-rate-limit-test.py | caltechlibrary/pindu | 61a8407a706cfed425d797b9533ec703c5040c09 | [
"BSD-3-Clause"
] | 1 | 2019-04-08T15:56:15.000Z | 2019-04-08T15:56:15.000Z | #!/usr/bin/env python3
# =============================================================================
# @file test-api-rate-limit.py
# @brief Test the raw rate limit, without Sidewall
# @author Michael Hucka <mhucka@caltech.edu>
# @license Please see the file named LICENSE in the project directory
# @website htt... | 31.2625 | 96 | 0.534986 |
f8e3c880e21c01baa2276781b6728c345478e137 | 4,843 | py | Python | brewerslab-orig-master/fakeheat.py | allena29/brewerslabng | f47e671971436b7af806b54f6019c5b185d7d194 | [
"Apache-2.0"
] | 1 | 2020-04-12T10:08:10.000Z | 2020-04-12T10:08:10.000Z | brewerslab-orig-master/fakeheat.py | allena29/brewerslabng | f47e671971436b7af806b54f6019c5b185d7d194 | [
"Apache-2.0"
] | 2 | 2021-12-13T20:09:45.000Z | 2022-03-08T21:09:57.000Z | brewerslab-orig-master/fakeheat.py | allena29/brewerslabng | f47e671971436b7af806b54f6019c5b185d7d194 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import os
import sys
import time
print "starting fake heater"
tempc={'hltSetTemp': False,'mashSetTemp':False,'boilSetTemp':False,'fermSetTemp':False}
tempx={'hltSetTemp': 0,'mashSetTemp':0,'boilSetTemp':0,'fermSetTemp':19.2}
def handleTemp(probeId):
global tempx
if os.path.exists("ipc/fakeelement... | 31.044872 | 122 | 0.683874 |
70d0e39ee30bfbcf2a75c9146ab02618069b136b | 1,914 | py | Python | pyNastran/dev/h5/h5_nastran_io.py | luzpaz/pyNastran | 939e9eefdc87a3bf67939a23dc09f155b93969a0 | [
"BSD-3-Clause"
] | 293 | 2015-03-22T20:22:01.000Z | 2022-03-14T20:28:24.000Z | pyNastran/dev/h5/h5_nastran_io.py | luzpaz/pyNastran | 939e9eefdc87a3bf67939a23dc09f155b93969a0 | [
"BSD-3-Clause"
] | 512 | 2015-03-14T18:39:27.000Z | 2022-03-31T16:15:43.000Z | pyNastran/dev/h5/h5_nastran_io.py | luzpaz/pyNastran | 939e9eefdc87a3bf67939a23dc09f155b93969a0 | [
"BSD-3-Clause"
] | 136 | 2015-03-19T03:26:06.000Z | 2022-03-25T22:14:54.000Z | from collections import OrderedDict
from pyNastran.dev.h5.h5_nastran2 import get_gui_nastran_ugrid
from pyNastran.gui.gui_objects.gui_result import GuiResult
from pyNastran.gui.qt_files.colors import (
RED_FLOAT, BLUE_FLOAT, GREEN_FLOAT, LIGHT_GREEN_FLOAT, PINK_FLOAT, PURPLE_FLOAT,
YELLOW_FLOAT, ORANGE_FLOAT)
... | 36.113208 | 87 | 0.631139 |
a05b0f7b06f2b6826d9ee1964f5fd42da3edd2e4 | 11,917 | py | Python | main.py | FightingFranky/PKUAutoSubmit | 012712f299efeac8d65f60ec51e288da0d2cce99 | [
"Apache-2.0"
] | null | null | null | main.py | FightingFranky/PKUAutoSubmit | 012712f299efeac8d65f60ec51e288da0d2cce99 | [
"Apache-2.0"
] | null | null | null | main.py | FightingFranky/PKUAutoSubmit | 012712f299efeac8d65f60ec51e288da0d2cce99 | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver import Firefox, Chrome
from seleni... | 30.634961 | 99 | 0.652178 |
88180399d81cc7a74c19afedd76112c4a9f87cfb | 17,456 | py | Python | venv/lib/python3.6/site-packages/alembic/testing/plugin/plugin_base.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/alembic/testing/plugin/plugin_base.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | 1 | 2021-06-01T23:32:38.000Z | 2021-06-01T23:32:38.000Z | venv/lib/python3.6/site-packages/alembic/testing/plugin/plugin_base.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | # plugin/plugin_base.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Testing extensions.
this module is designed to work as a testing-framework-... | 28.337662 | 96 | 0.610907 |
e6813863dc09412eb63ac6859e7b165769171c28 | 142 | py | Python | Code/odooerp/odoo-8.0/openerp/addons/test_impex/tests/__init__.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | 1 | 2019-12-29T11:53:56.000Z | 2019-12-29T11:53:56.000Z | odoo/openerp/addons/test_impex/tests/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | odoo/openerp/addons/test_impex/tests/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | # -*- coding: utf-8 -*-
from . import test_export, test_import, test_load
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
| 23.666667 | 65 | 0.739437 |
dcf99296809e0cfce7fd722a47d82fa664197090 | 1,440 | py | Python | pythonbox.py | slacke/red-text | 2e9a492b67392e7379550b336ae9559c4f63c824 | [
"MIT"
] | 3 | 2021-01-16T15:07:41.000Z | 2022-03-09T09:24:17.000Z | pythonbox.py | slacke/pythonbox | 64bb30a6efa8a28c7eacc919395d8be9ea26942d | [
"MIT"
] | null | null | null | pythonbox.py | slacke/pythonbox | 64bb30a6efa8a28c7eacc919395d8be9ea26942d | [
"MIT"
] | null | null | null | import sys,os
# get current path
pythonbox_path = os.path.dirname(__file__)
customs_path = pythonbox_path + r"\customs"
packages_path = pythonbox_path + r"\packages"
# add path to python sys path
sys.path.append(customs_path)
sys.path.append(packages_path)
print("Modify PYTHONPATH...")
# read pythonbox.i... | 34.285714 | 90 | 0.5875 |
9b9d2e70d145a7dd8c06d8dcc58b5f5b66068cfa | 3,958 | py | Python | src/tests/fidl/source_compatibility/gen/scaffolding.py | liexusong/fuchsia | 81897680af92a1848a063e3c20ff3a4892ccff07 | [
"BSD-2-Clause"
] | 3 | 2021-09-02T07:21:06.000Z | 2022-03-12T03:20:10.000Z | src/tests/fidl/source_compatibility/gen/scaffolding.py | liexusong/fuchsia | 81897680af92a1848a063e3c20ff3a4892ccff07 | [
"BSD-2-Clause"
] | 56 | 2021-06-03T03:16:25.000Z | 2022-03-20T01:07:44.000Z | src/tests/fidl/source_compatibility/gen/scaffolding.py | liexusong/fuchsia | 81897680af92a1848a063e3c20ff3a4892ccff07 | [
"BSD-2-Clause"
] | 2 | 2022-02-25T12:22:49.000Z | 2022-03-12T03:20:10.000Z | # Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Functions responsible for actually writing out source files, driven by the
generate_test.py code.
"""
import datetime
import os
from pathlib import Path
... | 22.617143 | 84 | 0.683931 |
efe826f9128f5e9ba85859ea625e6cd154f25d7e | 224 | py | Python | submissions/arc024/a.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 1 | 2021-05-10T01:16:28.000Z | 2021-05-10T01:16:28.000Z | submissions/arc024/a.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 3 | 2021-05-11T06:14:15.000Z | 2021-06-19T08:18:36.000Z | submissions/arc024/a.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | null | null | null | import sys
input = sys.stdin.readline
L, R= map(int, input().split())
l = list(map(int, input().split()))
r = list(map(int, input().split()))
ans = 0
for i in l:
if i in r:
r.remove(i)
ans += 1
print(ans)
| 14.933333 | 35 | 0.566964 |
7f40af94eed4c69feac235dac0359f4933bd827e | 630 | py | Python | huobi/service/wallet/get_account_withdraw_address.py | xujunhuii/huobi_Python | 958df8b22ce774329c7e15a1ecf2f52eea5f6af8 | [
"Apache-2.0"
] | null | null | null | huobi/service/wallet/get_account_withdraw_address.py | xujunhuii/huobi_Python | 958df8b22ce774329c7e15a1ecf2f52eea5f6af8 | [
"Apache-2.0"
] | null | null | null | huobi/service/wallet/get_account_withdraw_address.py | xujunhuii/huobi_Python | 958df8b22ce774329c7e15a1ecf2f52eea5f6af8 | [
"Apache-2.0"
] | null | null | null | from huobi.connection.restapi_sync_client import RestApiSyncClient
from huobi.constant import *
from huobi.model.wallet import *
from huobi.utils import *
class GetAccountWithdrawAddressService:
def __init__(self, params):
self.params = params
def request(self, **kwargs):
channel = "/v2/accou... | 30 | 75 | 0.696825 |
0f5f568e55cfa4aa27360728d9e6b15a02e059d2 | 39,098 | py | Python | vtgs/v1.1/vtgs_trx_file.py | vt-rocksat-2017/waveforms | a44638ad79744007cf58aaf54f5d9517742004cc | [
"MIT"
] | null | null | null | vtgs/v1.1/vtgs_trx_file.py | vt-rocksat-2017/waveforms | a44638ad79744007cf58aaf54f5d9517742004cc | [
"MIT"
] | null | null | null | vtgs/v1.1/vtgs_trx_file.py | vt-rocksat-2017/waveforms | a44638ad79744007cf58aaf54f5d9517742004cc | [
"MIT"
] | 1 | 2020-04-30T05:03:34.000Z | 2020-04-30T05:03:34.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: VTGS Rocksat-X 2017 Transceiver v2.0
# Generated: Sat Aug 12 12:10:38 2017
##################################################
if __name__ == '__main__':
import ctypes
import ... | 45.304751 | 255 | 0.640877 |
c790b97615e2a41170f1dfe1d138d73030454665 | 2,367 | py | Python | tests/test_visitors/test_ast/test_exceptions/test_duplicate_exceptions.py | cdhiraj40/wemake-python-styleguide | 7cef9be081d594c30045b7a98cae77a9be46e1aa | [
"MIT"
] | 1,931 | 2018-03-17T13:52:45.000Z | 2022-03-27T09:39:17.000Z | tests/test_visitors/test_ast/test_exceptions/test_duplicate_exceptions.py | amansr02/wemake-python-styleguide | 681035ed21fbe28ebfb32b8807b98e8de76b64aa | [
"MIT"
] | 2,231 | 2018-03-09T21:19:05.000Z | 2022-03-31T08:35:37.000Z | tests/test_visitors/test_ast/test_exceptions/test_duplicate_exceptions.py | amansr02/wemake-python-styleguide | 681035ed21fbe28ebfb32b8807b98e8de76b64aa | [
"MIT"
] | 492 | 2018-05-18T21:20:28.000Z | 2022-03-20T14:11:50.000Z | import pytest
from wemake_python_styleguide.violations.best_practices import (
DuplicateExceptionViolation,
)
from wemake_python_styleguide.visitors.ast.exceptions import (
WrongTryExceptVisitor,
)
# Correct:
correct_bare_except = """
try:
...
except:
...
"""
correct_simple_except = """
try:
...... | 16.324138 | 64 | 0.666244 |
0dac5ba15c7a842fc7b191ecf676879c24c43fbd | 1,478 | py | Python | Code/tcga_normalizedDataToPickle.py | HalforcNull/Research_PatternRecognition | e9cbe8df75ae775e0ed813ac4956973b4e857979 | [
"MIT"
] | null | null | null | Code/tcga_normalizedDataToPickle.py | HalforcNull/Research_PatternRecognition | e9cbe8df75ae775e0ed813ac4956973b4e857979 | [
"MIT"
] | null | null | null | Code/tcga_normalizedDataToPickle.py | HalforcNull/Research_PatternRecognition | e9cbe8df75ae775e0ed813ac4956973b4e857979 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Dec 06 15:36:31 2017
@author: runan.yao
"""
import csv
import pickle
import numpy as np
def __loadData(dataFile, isNumericData = False):
data = []
with open(dataFile, 'rt') as csvfile:
datas = csv.reader(csvfile, delimiter = ',')
for row in datas:
... | 25.929825 | 77 | 0.577131 |
1e2ff05b6031910294b63cb8e0e4e15add184a2f | 9,845 | py | Python | airflow/providers/opsgenie/operators/opsgenie.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2017-08-06T23:19:48.000Z | 2018-05-11T05:50:25.000Z | airflow/providers/opsgenie/operators/opsgenie.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 20 | 2016-11-21T22:54:28.000Z | 2018-10-28T20:03:13.000Z | airflow/providers/opsgenie/operators/opsgenie.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2016-10-13T09:59:18.000Z | 2017-02-22T11:29:09.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 37.291667 | 102 | 0.653834 |
d2cca1eac96d2fdcbea1a96bf2232aca7392fc91 | 4,437 | py | Python | aws-functions/HttpTriggerApiUsersUseridTasks/lambda_function.py | jaguiniga/ad440-winter2021-thursday-repo | d099b06488e7a866af5f4bf4f776b32807233994 | [
"Apache-2.0"
] | 4 | 2021-01-08T02:01:53.000Z | 2021-01-09T23:06:55.000Z | aws-functions/HttpTriggerApiUsersUseridTasks/lambda_function.py | jaguiniga/ad440-winter2021-thursday-repo | d099b06488e7a866af5f4bf4f776b32807233994 | [
"Apache-2.0"
] | 242 | 2021-01-08T02:41:43.000Z | 2021-03-28T20:18:43.000Z | aws-functions/HttpTriggerApiUsersUseridTasks/lambda_function.py | jaguiniga/ad440-winter2021-thursday-repo | d099b06488e7a866af5f4bf4f776b32807233994 | [
"Apache-2.0"
] | 45 | 2021-01-08T02:44:21.000Z | 2021-03-26T01:36:53.000Z | import os
import json
import logging
import pymysql
import datetime
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def default(dateHandle):
if isinstance(dateHandle, (datetime.datetime, datetime.date)):
return dateHandle.isoformat()
def lambda_handler(event, context):
logger.i... | 32.152174 | 119 | 0.577868 |
a23fafe4fdff351e2562841a3066cbefb75ed74d | 106 | py | Python | tests/integration/client/__init__.py | jaebradley/draftkings_client | 8db4484f293df3c65c48d62d972b71df95f5ea3d | [
"MIT"
] | 111 | 2017-01-07T13:32:00.000Z | 2022-03-07T22:58:11.000Z | tests/integration/client/__init__.py | jaebradley/draftkings_client | 8db4484f293df3c65c48d62d972b71df95f5ea3d | [
"MIT"
] | 56 | 2016-11-14T05:50:44.000Z | 2022-01-18T23:27:44.000Z | tests/integration/client/__init__.py | jaebradley/draftkings_client | 8db4484f293df3c65c48d62d972b71df95f5ea3d | [
"MIT"
] | 39 | 2017-01-25T01:57:09.000Z | 2021-12-29T06:57:31.000Z | """
Represents "end-to-end" tests that test the public API definition of the draft_kings.client file.
"""
| 26.5 | 97 | 0.745283 |
0fbcdf471d64d6d8bbccb514788b32e8dd14f8f7 | 45,068 | py | Python | tencent-fusai/src/utils.py | tangaqi/tencent2019-rank88 | 9b2295e6405fc0958527c509bf1623ea5b67e6b7 | [
"Apache-2.0"
] | null | null | null | tencent-fusai/src/utils.py | tangaqi/tencent2019-rank88 | 9b2295e6405fc0958527c509bf1623ea5b67e6b7 | [
"Apache-2.0"
] | null | null | null | tencent-fusai/src/utils.py | tangaqi/tencent2019-rank88 | 9b2295e6405fc0958527c509bf1623ea5b67e6b7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@file:utils.py
@time:2019/6/1 21:57
@author:Tangj
@software:Pycharm
@Desc
"""
import os
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.metrics import roc_auc_score
from time import time
import random
import pandas as pd
def frame_to_dict(train):
... | 36.5515 | 115 | 0.558844 |
76b4ff3525a608bb25570d13663084bd0939dc93 | 3,165 | py | Python | data_preprocess.py | William-Zhanng/Protein_affinity | 8abd12073b182274bf464ff23fd3be406c4e39ac | [
"MIT"
] | 1 | 2022-01-09T12:23:16.000Z | 2022-01-09T12:23:16.000Z | data_preprocess.py | William-Zhanng/Protein_affinity | 8abd12073b182274bf464ff23fd3be406c4e39ac | [
"MIT"
] | null | null | null | data_preprocess.py | William-Zhanng/Protein_affinity | 8abd12073b182274bf464ff23fd3be406c4e39ac | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import tqdm
import argparse
import random
import os
def create_data(protein_idx,all_data,pseq_dict,out_path,sample_ratio=100):
# Postive sample
items = all_data[all_data['item_id_a'] == protein_idx]
df_out = pd.DataFrame(columns = ['item_id_a','item_id_b','seque... | 40.063291 | 127 | 0.671722 |
0aabc1e47715692927742952898209806e93ecb1 | 115,487 | py | Python | snmp/tests/test_profiles.py | flowcommerce/integrations-core | c562b0d423ec1a5dd4073b703d6a8d3a9ab23c72 | [
"BSD-3-Clause"
] | null | null | null | snmp/tests/test_profiles.py | flowcommerce/integrations-core | c562b0d423ec1a5dd4073b703d6a8d3a9ab23c72 | [
"BSD-3-Clause"
] | null | null | null | snmp/tests/test_profiles.py | flowcommerce/integrations-core | c562b0d423ec1a5dd4073b703d6a8d3a9ab23c72 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import logging
import pytest
from datadog_checks.base import ConfigurationError
from datadog_checks.dev.utils import get_metadata_metrics
from datadog_checks.snmp import SnmpCheck
from datadog_checks.snmp.util... | 41.631939 | 120 | 0.66372 |
220ad28a66f95935015a64890be020a67d2f058a | 96 | py | Python | github/methods/auth/__init__.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:33:37.000Z | 2022-03-16T21:33:37.000Z | github/methods/auth/__init__.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | null | null | null | github/methods/auth/__init__.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:28:06.000Z | 2022-03-16T21:28:06.000Z | from .authenticate_user import AuthenticateUser
class Auth(
AuthenticateUser,
):
pass
| 12 | 47 | 0.75 |
5131e1ed4eb223cf86d82dd18d494cecd799c7df | 796 | py | Python | gallary/urls.py | israelwangila/gallery | 9bd799a498e556274bd3518ad047183180463bb7 | [
"MIT"
] | null | null | null | gallary/urls.py | israelwangila/gallery | 9bd799a498e556274bd3518ad047183180463bb7 | [
"MIT"
] | null | null | null | gallary/urls.py | israelwangila/gallery | 9bd799a498e556274bd3518ad047183180463bb7 | [
"MIT"
] | null | null | null | """gallary URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 36.181818 | 77 | 0.704774 |
149e1b969b2a6358de3052612b2af8decb56ae0a | 7,496 | py | Python | saleor/csv/tests/export/products_data/test_prepare_headers.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | null | null | null | saleor/csv/tests/export/products_data/test_prepare_headers.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | 4 | 2021-09-06T03:55:32.000Z | 2021-10-15T08:47:58.000Z | saleor/csv/tests/export/products_data/test_prepare_headers.py | hoangtuananh97/saleor | 94ad493ef61302fb458822868fc2b4a884ec2065 | [
"CC-BY-4.0"
] | null | null | null | from .....attribute.models import Attribute
from .....channel.models import Channel
from .....graphql.csv.enums import ProductFieldEnum
from ....utils.export import product_max_min_filter_to_export_headers
from ....utils.product_headers import (
get_attributes_headers,
get_channels_headers,
get_export_field... | 27.970149 | 87 | 0.657551 |
d7807010f7959f3cd3dd3b4e65f3e4c0b837e7ab | 3,467 | py | Python | aaron_crackingV1.py | awharkrider/CPSC3320_Lab_Password_Cracking | 593ee5efda5dca92360c892b6bb694362ff7e499 | [
"MIT"
] | 1 | 2018-12-05T15:30:52.000Z | 2018-12-05T15:30:52.000Z | aaron_crackingV1.py | awharkrider/CPSC3320_Lab_Password_Cracking | 593ee5efda5dca92360c892b6bb694362ff7e499 | [
"MIT"
] | null | null | null | aaron_crackingV1.py | awharkrider/CPSC3320_Lab_Password_Cracking | 593ee5efda5dca92360c892b6bb694362ff7e499 | [
"MIT"
] | null | null | null | """
Version one of my cracking.py
"""
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.hazmat.backends import default_backend
import argparse
import time
def main():
parser = argparse.ArgumentParser()
parser.add_argument("di... | 34.67 | 112 | 0.614076 |
65997a764e7fd48ee588009f688e2d152a8c422f | 123 | py | Python | src/core/models/__init__.py | ablil/meistertask-cli | 6c90802ac5dc7e5ac016e5c61c0e68db043e5784 | [
"MIT"
] | 3 | 2020-11-03T22:27:18.000Z | 2021-12-11T23:13:55.000Z | src/core/models/__init__.py | ablil/meistertask-cli | 6c90802ac5dc7e5ac016e5c61c0e68db043e5784 | [
"MIT"
] | 1 | 2021-09-12T13:28:13.000Z | 2021-09-12T13:28:13.000Z | src/core/models/__init__.py | ablil/meistertask-cli | 6c90802ac5dc7e5ac016e5c61c0e68db043e5784 | [
"MIT"
] | null | null | null | from .project import Project
from .task import Task
from .section import Section
__all__ = ["Project", "Section", "Task"]
| 20.5 | 40 | 0.739837 |
066f0856199f4b238e6c3a17ba7014f9d3f8e27a | 2,372 | py | Python | source/applications/advanced/hand_eye_calibration/ur_hand_eye_calibration/3rdParty/rtde-2.3.6/rtde/rtde_config.py | ebruun/python-samples | 746e5090f45659c60f01bf831a0308966d713b21 | [
"BSD-3-Clause"
] | 19 | 2018-07-24T22:44:22.000Z | 2022-03-26T09:37:08.000Z | source/applications/advanced/hand_eye_calibration/ur_hand_eye_calibration/3rdParty/rtde-2.3.6/rtde/rtde_config.py | ebruun/python-samples | 746e5090f45659c60f01bf831a0308966d713b21 | [
"BSD-3-Clause"
] | 4 | 2018-05-02T12:52:35.000Z | 2021-02-15T22:59:54.000Z | source/applications/advanced/hand_eye_calibration/ur_hand_eye_calibration/3rdParty/rtde-2.3.6/rtde/rtde_config.py | ebruun/python-samples | 746e5090f45659c60f01bf831a0308966d713b21 | [
"BSD-3-Clause"
] | 4 | 2018-01-22T11:06:28.000Z | 2020-03-17T08:37:24.000Z | # Copyright (c) 2016, Universal Robots A/S,
# 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 conditio... | 46.509804 | 81 | 0.713322 |
b5aaccafa497a39f70914bc860ceb940951c5b37 | 3,776 | py | Python | venv/lib/python3.7/site-packages/rinoh/frontend/rst/__init__.py | rodrez/jobpy | 02da7ed62a5f057ce66f7b3c0a5f13223363af9a | [
"MIT"
] | 3 | 2020-05-16T01:54:47.000Z | 2021-04-27T01:37:08.000Z | venv/lib/python3.7/site-packages/rinoh/frontend/rst/__init__.py | rodrez/jobpy | 02da7ed62a5f057ce66f7b3c0a5f13223363af9a | [
"MIT"
] | 7 | 2020-05-11T01:45:45.000Z | 2022-03-02T14:58:30.000Z | venv/lib/python3.7/site-packages/rinoh/frontend/rst/__init__.py | rodrez/jobpy | 02da7ed62a5f057ce66f7b3c0a5f13223363af9a | [
"MIT"
] | 1 | 2020-07-19T04:31:01.000Z | 2020-07-19T04:31:01.000Z | # This file is part of rinohtype, the Python document preparation system.
#
# Copyright (c) Brecht Machiels.
#
# Use of this source code is subject to the terms of the GNU Affero General
# Public License v3. See the LICENSE file or http://www.gnu.org/licenses/.
from pathlib import Path
from docutils.core import publi... | 28.606061 | 77 | 0.652278 |
6d36fda52180852e80eeb7ec15ab1bb6c10c765d | 17,579 | py | Python | test/core/test_operator.py | snyxan/Mephisto | a48ab19edf25b359379f4d31a990dfe2a3791f37 | [
"MIT"
] | null | null | null | test/core/test_operator.py | snyxan/Mephisto | a48ab19edf25b359379f4d31a990dfe2a3791f37 | [
"MIT"
] | null | null | null | test/core/test_operator.py | snyxan/Mephisto | a48ab19edf25b359379f4d31a990dfe2a3791f37 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
import shutil
import shlex
import os
import tempfile
import time
import threading
from mephisto.abstra... | 42.564165 | 84 | 0.680073 |
eeb2319cc3449e13e65880ac53113114937ff6e5 | 1,328 | py | Python | picmodels/migrations/0004_auto_20170117_1047.py | bbcawodu/careadvisors-backend | 5ebd3c0fc189b2486cea92b2a13c0bd8a0ee3838 | [
"MIT"
] | null | null | null | picmodels/migrations/0004_auto_20170117_1047.py | bbcawodu/careadvisors-backend | 5ebd3c0fc189b2486cea92b2a13c0bd8a0ee3838 | [
"MIT"
] | null | null | null | picmodels/migrations/0004_auto_20170117_1047.py | bbcawodu/careadvisors-backend | 5ebd3c0fc189b2486cea92b2a13c0bd8a0ee3838 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-17 10:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('picmodels', '0003_auto_20170117_0843'),
]
operations = [
migrations.AddFiel... | 32.390244 | 186 | 0.601657 |
6347ff10ab5e4a2b24c7a484b4913e466a351dcc | 2,318 | py | Python | jython-protolib/src/test/resources/com/streamsets/pipeline/stage/origin/jython/MultiGeneratorOriginScript.py | klaxman/datacollector | 6ebf079dcf7cadc55ded87fe0c9bc2e6b527a319 | [
"Apache-2.0"
] | null | null | null | jython-protolib/src/test/resources/com/streamsets/pipeline/stage/origin/jython/MultiGeneratorOriginScript.py | klaxman/datacollector | 6ebf079dcf7cadc55ded87fe0c9bc2e6b527a319 | [
"Apache-2.0"
] | null | null | null | jython-protolib/src/test/resources/com/streamsets/pipeline/stage/origin/jython/MultiGeneratorOriginScript.py | klaxman/datacollector | 6ebf079dcf7cadc55ded87fe0c9bc2e6b527a319 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 StreamSets Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 30.5 | 74 | 0.622519 |
87bebce15b5181922e5dfbcf2df04ea5c835a797 | 7,845 | py | Python | openpype/hosts/nuke/plugins/load/load_gizmo_ip.py | jonclothcat/OpenPype | d1208cbebc0a7f378de0062ccd653295c6399195 | [
"MIT"
] | null | null | null | openpype/hosts/nuke/plugins/load/load_gizmo_ip.py | jonclothcat/OpenPype | d1208cbebc0a7f378de0062ccd653295c6399195 | [
"MIT"
] | null | null | null | openpype/hosts/nuke/plugins/load/load_gizmo_ip.py | jonclothcat/OpenPype | d1208cbebc0a7f378de0062ccd653295c6399195 | [
"MIT"
] | null | null | null | import nuke
from avalon import io
from openpype.pipeline import (
load,
get_representation_path,
)
from openpype.hosts.nuke.api.lib import (
maintained_selection,
create_backdrop,
get_avalon_knob_data,
set_avalon_knob_data
)
from openpype.hosts.nuke.api import (
containerise,
update_co... | 30.406977 | 79 | 0.562141 |
d41aaa2c6144636a4e08b6fd88d0f754ca26ef74 | 30,633 | py | Python | emscripten.py | jslhs/emscripten | 8408257cd66435af849f493c10c7f0e8d1d5fa3b | [
"MIT"
] | 1 | 2015-11-08T06:57:01.000Z | 2015-11-08T06:57:01.000Z | emscripten.py | jslhs/emscripten | 8408257cd66435af849f493c10c7f0e8d1d5fa3b | [
"MIT"
] | null | null | null | emscripten.py | jslhs/emscripten | 8408257cd66435af849f493c10c7f0e8d1d5fa3b | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
'''
You should normally never use this! Use emcc instead.
This is a small wrapper script around the core JS compiler. This calls that
compiler with the settings given to it. It can also read data from C/C++
header files (so that the JS compiler can see the constants in those
headers, for the li... | 42.078297 | 344 | 0.629746 |
814ff6688754eec0216e342ebfb43af3b2e1bd8d | 730 | py | Python | app/main/form.py | Ryan-GM/Pitchy | ca90741c251b98434ccdaf21593beb964d83e937 | [
"MIT"
] | null | null | null | app/main/form.py | Ryan-GM/Pitchy | ca90741c251b98434ccdaf21593beb964d83e937 | [
"MIT"
] | null | null | null | app/main/form.py | Ryan-GM/Pitchy | ca90741c251b98434ccdaf21593beb964d83e937 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField,TextAreaField,SubmitField,SelectField
from wtforms.validators import Required
class PitchyForm(FlaskForm):
title = StringField('Title',validators=[Required()])
post = TextAreaField('Pitch it', validators=[Required()])
category = SelectField('C... | 42.941176 | 124 | 0.735616 |
61efd941e81bae4c638b7f184ab519b978403736 | 1,797 | py | Python | streaming_server.py | BenevolentPista/NP-Assignment | 2217986e71332912b6b64f138f7e5c7234877389 | [
"MIT"
] | null | null | null | streaming_server.py | BenevolentPista/NP-Assignment | 2217986e71332912b6b64f138f7e5c7234877389 | [
"MIT"
] | null | null | null | streaming_server.py | BenevolentPista/NP-Assignment | 2217986e71332912b6b64f138f7e5c7234877389 | [
"MIT"
] | null | null | null | import socket
import tqdm
import os
import ffmpeg
# device's IP address
SERVER_HOST = "192.169.1.104"
SERVER_PORT = 5001
width = 10
height = 10
# receive 4096 bytes each time
BUFFER_SIZE = 4096
SEPARATOR = "<SEPARATOR>"
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, sock... | 28.078125 | 112 | 0.648303 |
2623bd30c65c418836c75689ca29c625a8ef19a6 | 6,271 | py | Python | straxen/bokeh_utils.py | FaroutYLq/straxen | 4741b8e61895da85b593903ea55dacdaeae65b2f | [
"BSD-3-Clause"
] | null | null | null | straxen/bokeh_utils.py | FaroutYLq/straxen | 4741b8e61895da85b593903ea55dacdaeae65b2f | [
"BSD-3-Clause"
] | 2 | 2021-12-20T08:10:59.000Z | 2022-03-14T08:08:00.000Z | straxen/bokeh_utils.py | ershockley/straxen | 881c52571dba28aa2130587f39a6ced45059fde9 | [
"BSD-3-Clause"
] | null | null | null | import bokeh.plotting as bklt
import bokeh
import numpy as np
import strax
export, __all__ = strax.exporter()
@export
def bokeh_to_wiki(fig, outputfile=None):
"""
Function which converts bokeh HTML code to a wiki readable code.
:param fig: Figure to be conerted
:param outputfile: String of absolute ... | 35.630682 | 108 | 0.538032 |
0a3c64cfec651e85acd25be509f609a94ef5b23a | 10,183 | py | Python | tests/test_thermostat.py | swingerman/ha-dual-climate | 3e863eb1ad57021ba4d93decc3720d9cae91f607 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-09-15T15:32:12.000Z | 2020-09-15T15:32:12.000Z | tests/test_thermostat.py | swingerman/ha-dual-climate | 3e863eb1ad57021ba4d93decc3720d9cae91f607 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/test_thermostat.py | swingerman/ha-dual-climate | 3e863eb1ad57021ba4d93decc3720d9cae91f607 | [
"Apache-2.0",
"MIT"
] | null | null | null | """The tests for the dual_smart_thermostat."""
from datetime import datetime, timezone, date
import logging
import pytest
from typing import Final
from homeassistant.core import HomeAssistant
from homeassistant.components import input_boolean, input_number
from homeassistant.util import dt
from homeassistant.compone... | 28.207756 | 87 | 0.646077 |
08d6bcea50bd0845304c14dcceacc0c8d341627c | 3,225 | py | Python | gpytorch/kernels/product_structure_kernel.py | pierocor/gpytorch | c58dc3a77c7be7ee4434484e359a0bbc1c2d27f6 | [
"MIT"
] | null | null | null | gpytorch/kernels/product_structure_kernel.py | pierocor/gpytorch | c58dc3a77c7be7ee4434484e359a0bbc1c2d27f6 | [
"MIT"
] | null | null | null | gpytorch/kernels/product_structure_kernel.py | pierocor/gpytorch | c58dc3a77c7be7ee4434484e359a0bbc1c2d27f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from typing import Optional, Tuple
from ..lazy import lazify
from .kernel import Kernel
class ProductStructureKernel(Kernel):
r"""
A Kernel decorator for kernels with product structure. If a kernel decomposes
multiplicatively, then this module will be much more computationally eff... | 38.855422 | 104 | 0.672248 |
aebf2ebd8fe9408e72ffa8037a467570120bf4e8 | 6,330 | py | Python | securetea/lib/log_monitor/system_log/failed_login.py | neerajv18/SecureTea-Project | e999cbe7c8e497c69b76b4c886de0d063169ea03 | [
"MIT"
] | 257 | 2018-03-28T12:43:20.000Z | 2022-03-29T07:07:23.000Z | securetea/lib/log_monitor/system_log/failed_login.py | neerajv18/SecureTea-Project | e999cbe7c8e497c69b76b4c886de0d063169ea03 | [
"MIT"
] | 155 | 2018-03-31T14:57:46.000Z | 2022-03-17T18:12:41.000Z | securetea/lib/log_monitor/system_log/failed_login.py | neerajv18/SecureTea-Project | e999cbe7c8e497c69b76b4c886de0d063169ea03 | [
"MIT"
] | 132 | 2018-03-27T06:25:20.000Z | 2022-03-28T11:32:45.000Z | # -*- coding: utf-8 -*-
u"""Failed login module for SecureTea.
Project:
╔═╗┌─┐┌─┐┬ ┬┬─┐┌─┐╔╦╗┌─┐┌─┐
╚═╗├┤ │ │ │├┬┘├┤ ║ ├┤ ├─┤
╚═╝└─┘└─┘└─┘┴└─└─┘ ╩ └─┘┴ ┴
Author: Abhishek Sharma <abhishek_official@hotmail.com> , Jun 1 2019
Version: 1.3
Module: SecureTea
"""
import re
import time
from secur... | 29.44186 | 77 | 0.514534 |
952c6c77ce81e631b2c50cd2e43405411512a0c3 | 99,778 | py | Python | keras/layers/recurrent.py | bklebel/keras | af804d0a5db9a8f20fbb083b48655b2687ce89d9 | [
"MIT"
] | 95 | 2018-04-13T03:34:51.000Z | 2022-03-30T10:10:28.000Z | _bak/v0.5/StudyTensroFlow/keras/keras/layers/recurrent.py | Dlaiven/DeepLearning_Wavelet-LSTM | 1606c16005a5338333b4943f782f57311c6b5e49 | [
"MIT"
] | 3 | 2019-07-18T11:19:53.000Z | 2020-12-28T05:45:19.000Z | _bak/v0.5/StudyTensroFlow/keras/keras/layers/recurrent.py | Dlaiven/DeepLearning_Wavelet-LSTM | 1606c16005a5338333b4943f782f57311c6b5e49 | [
"MIT"
] | 35 | 2018-07-27T09:21:18.000Z | 2021-11-30T02:13:01.000Z | # -*- coding: utf-8 -*-
"""Recurrent layers and their base classes.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import warnings
from .. import backend as K
from .. import activations
from .. import initializers
from .. import regu... | 43.858462 | 138 | 0.584888 |
600351c607f78535763f781810fa2fc29740ea79 | 5,532 | py | Python | docs/conf.py | edaniszewski/sanic-healthcheck | 25acc8c7fe71a9802ad83f95c5ed01354fc868fb | [
"MIT"
] | 3 | 2020-07-17T05:19:17.000Z | 2022-02-20T04:16:48.000Z | docs/conf.py | edaniszewski/sanic-healthcheck | 25acc8c7fe71a9802ad83f95c5ed01354fc868fb | [
"MIT"
] | null | null | null | docs/conf.py | edaniszewski/sanic-healthcheck | 25acc8c7fe71a9802ad83f95c5ed01354fc868fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.065217 | 79 | 0.656182 |
34fb8851360b5329fca319a7e14fa92489db13e8 | 3,458 | py | Python | Algorithm.Framework/Alphas/InterestReleaseAlphaModel.py | QilongChan/Lean | 9950634cff67c415045219db4d2f7db5e1ca1e1e | [
"Apache-2.0"
] | null | null | null | Algorithm.Framework/Alphas/InterestReleaseAlphaModel.py | QilongChan/Lean | 9950634cff67c415045219db4d2f7db5e1ca1e1e | [
"Apache-2.0"
] | null | null | null | Algorithm.Framework/Alphas/InterestReleaseAlphaModel.py | QilongChan/Lean | 9950634cff67c415045219db4d2f7db5e1ca1e1e | [
"Apache-2.0"
] | null | null | null | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licen... | 42.170732 | 127 | 0.686813 |
f9e033c8ded1c547a6e004156845774f11740277 | 7,427 | py | Python | test/test_places.py | lamantin/google-maps-services-python | 396e03ce3ffc7d1d98634c9932408272cfc20c18 | [
"Apache-2.0"
] | 1 | 2021-08-18T18:01:14.000Z | 2021-08-18T18:01:14.000Z | test/test_places.py | lamantin/google-maps-services-python | 396e03ce3ffc7d1d98634c9932408272cfc20c18 | [
"Apache-2.0"
] | null | null | null | test/test_places.py | lamantin/google-maps-services-python | 396e03ce3ffc7d1d98634c9932408272cfc20c18 | [
"Apache-2.0"
] | null | null | null | # This Python file uses the following encoding: utf-8
#
# Copyright 2016 Google Inc. All rights reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licen... | 45.845679 | 227 | 0.593106 |
b846261f696abb46328f6acabd0392792442d62a | 57,373 | py | Python | vyper/functions/functions.py | erdnaag/vyper | 22bef3a4b4161db18c7831041e20b917984cff83 | [
"Apache-2.0"
] | 1 | 2020-07-04T01:47:26.000Z | 2020-07-04T01:47:26.000Z | vyper/functions/functions.py | erdnaag/vyper | 22bef3a4b4161db18c7831041e20b917984cff83 | [
"Apache-2.0"
] | null | null | null | vyper/functions/functions.py | erdnaag/vyper | 22bef3a4b4161db18c7831041e20b917984cff83 | [
"Apache-2.0"
] | null | null | null | import hashlib
import math
import operator
from decimal import Decimal
from vyper import ast as vy_ast
from vyper.ast.validation import validate_call_args
from vyper.context.types.abstract import (
ArrayValueAbstractType,
BytesAbstractType,
IntegerAbstractType,
NumericAbstractType,
)
from vyper.context... | 34.252537 | 100 | 0.541771 |
cf4f63b23ffc80a6b4338ddef351edf4708ef429 | 6,272 | py | Python | deepxde/geometry/geometry_nd.py | Anilith/deepxde | d3a411a8023dba176b1489567ebab549ac6e7ea2 | [
"Apache-2.0"
] | null | null | null | deepxde/geometry/geometry_nd.py | Anilith/deepxde | d3a411a8023dba176b1489567ebab549ac6e7ea2 | [
"Apache-2.0"
] | null | null | null | deepxde/geometry/geometry_nd.py | Anilith/deepxde | d3a411a8023dba176b1489567ebab549ac6e7ea2 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import numpy as np
from scipy import stats
from sklearn import preprocessing
from .geometry import Geometry
from .sampler import sample
from .. import config
class Hypercube(Geometry):
... | 36.465116 | 131 | 0.558992 |
e45558d613fb6b83c513fbc22974928656422990 | 1,748 | py | Python | backend/home/models.py | crowdbotics-apps/jonathan-kim-teenge-33637 | be6c1dabd7534d41d7f0b776fff0b12d66924955 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/models.py | crowdbotics-apps/jonathan-kim-teenge-33637 | be6c1dabd7534d41d7f0b776fff0b12d66924955 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/models.py | crowdbotics-apps/jonathan-kim-teenge-33637 | be6c1dabd7534d41d7f0b776fff0b12d66924955 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from users.models import User
class BaseModel(models.Model):
created = models.DateTimeField(auto_now_add=True, help_text='Date Created')
class Meta:
abstract = True
ordering... | 40.651163 | 108 | 0.739703 |
cef4c833ffa86075777c45e23730d2ec13ae240f | 1,886 | py | Python | ormar/exceptions.py | naterenegar/ormar | ef3edd4594867569a2fd72971fde9666cff42395 | [
"MIT"
] | null | null | null | ormar/exceptions.py | naterenegar/ormar | ef3edd4594867569a2fd72971fde9666cff42395 | [
"MIT"
] | null | null | null | ormar/exceptions.py | naterenegar/ormar | ef3edd4594867569a2fd72971fde9666cff42395 | [
"MIT"
] | null | null | null | """
Gathers all exceptions thrown by ormar.
"""
class AsyncOrmException(Exception):
"""
Base ormar Exception
"""
pass
class ModelDefinitionError(AsyncOrmException):
"""
Raised for errors related to the model definition itself:
* setting @property_field on method with argume... | 22.452381 | 87 | 0.678155 |
f4ee59fe1d8c16455def9c810e17ea17559a11d2 | 383 | py | Python | polls/migrations/0002_question_author.py | codermahiuddin/Azure | 6f2c7d695807e9f9ee51cd297a744350148b0987 | [
"MIT"
] | null | null | null | polls/migrations/0002_question_author.py | codermahiuddin/Azure | 6f2c7d695807e9f9ee51cd297a744350148b0987 | [
"MIT"
] | null | null | null | polls/migrations/0002_question_author.py | codermahiuddin/Azure | 6f2c7d695807e9f9ee51cd297a744350148b0987 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-06-19 02:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='question',
name='author',
field... | 20.157895 | 62 | 0.584856 |
2888107e369e410e4ac04c657ce44a44991aae62 | 870 | py | Python | sdks/python/apache_beam/version.py | h4rr21/beam | e5bb291f95bd8cbb7942ed2a3b007df70eaf71be | [
"Apache-2.0"
] | 1 | 2018-08-11T14:06:57.000Z | 2018-08-11T14:06:57.000Z | sdks/python/apache_beam/version.py | h4rr21/beam | e5bb291f95bd8cbb7942ed2a3b007df70eaf71be | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/version.py | h4rr21/beam | e5bb291f95bd8cbb7942ed2a3b007df70eaf71be | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 39.545455 | 74 | 0.766667 |
687b8c32e10697c1c06bc9c1d20a0f64723c6890 | 485 | py | Python | Exercise/ExerciseTools.py | Mihai925/EduCoding-Legacy | 7c6de105deb186c3442f8d7f9f1b9f99708f8fb6 | [
"MIT"
] | null | null | null | Exercise/ExerciseTools.py | Mihai925/EduCoding-Legacy | 7c6de105deb186c3442f8d7f9f1b9f99708f8fb6 | [
"MIT"
] | null | null | null | Exercise/ExerciseTools.py | Mihai925/EduCoding-Legacy | 7c6de105deb186c3442f8d7f9f1b9f99708f8fb6 | [
"MIT"
] | null | null | null | from models import Exercise
class ExerciseTools():
def __init__(self):
pass
def submit_exercise(self, title, description, content):
exercise = Exercise(title=title, description=description, content=content)
exercise.save()
return True
def get_exercise_by_id(self, ex_id):
... | 25.526316 | 82 | 0.63299 |
171587089721140d33c4364e96d05171bd9cdac5 | 388 | py | Python | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/farm/FarmFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 1 | 2020-10-05T08:53:57.000Z | 2020-10-05T08:53:57.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/farm/FarmFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 17 | 2019-11-14T08:41:37.000Z | 2020-05-27T09:23:51.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/farm/FarmFactory.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | from Jumpscale import j
JSBASE = j.baseclasses.object
from .Farm import Farm
class FarmFactory(JSBASE):
__jslocation__ = "j.sal_zos.farm"
def get(self, farmer_iyo_org):
"""
Get sal for farm
Arguments:
farmer_iyo_org: the farmer iyo organisation
Returns:
... | 16.869565 | 55 | 0.608247 |
d1004ac49b05b1a76c802adad90b763487fc89b0 | 2,884 | py | Python | is_core/forms/generic.py | zzuzzy/django-is-core | 3f87ec56a814738683c732dce5f07e0328c2300d | [
"BSD-3-Clause"
] | null | null | null | is_core/forms/generic.py | zzuzzy/django-is-core | 3f87ec56a814738683c732dce5f07e0328c2300d | [
"BSD-3-Clause"
] | null | null | null | is_core/forms/generic.py | zzuzzy/django-is-core | 3f87ec56a814738683c732dce5f07e0328c2300d | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.forms.models import ModelForm
from django.contrib.contenttypes.forms import BaseGenericInlineFormSet as OriginBaseGenericInlineFormSet
from is_core.forms.models import smartmodelformset_factory
from is_core.forms.formse... | 43.044776 | 119 | 0.664702 |
263a0c363f242ed08103117d68a53920b69d6be1 | 1,878 | py | Python | electrum/plot.py | padenmoss/electrum-ftc | dfa3f33350225590db8afb391cd9005bf70253e4 | [
"MIT"
] | 11 | 2018-03-27T06:35:30.000Z | 2021-05-14T19:32:36.000Z | electrum/plot.py | padenmoss/electrum-ftc | dfa3f33350225590db8afb391cd9005bf70253e4 | [
"MIT"
] | 108 | 2018-03-13T10:43:26.000Z | 2021-05-14T21:26:06.000Z | electrum/plot.py | padenmoss/electrum-ftc | dfa3f33350225590db8afb391cd9005bf70253e4 | [
"MIT"
] | 15 | 2018-02-24T18:37:17.000Z | 2021-08-23T18:17:23.000Z | import datetime
from collections import defaultdict
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
import matplotlib.dates as md
from .i18n import _
from .bitcoin import COIN
class NothingToPlotException(Exception):
def __str__(self):
return _("Nothing to plot.")
def plot_h... | 29.34375 | 76 | 0.633653 |
d4b3e525c750bc489eddc2ac60f9cb79b13e8ffc | 332 | py | Python | tests/test_docs.py | LaggAt/hovercraft | 617bd6102ef5e6fc8ed2942bbd4d514e15715fdf | [
"MIT"
] | 1 | 2017-12-20T07:20:11.000Z | 2017-12-20T07:20:11.000Z | tests/test_docs.py | LaggAt/hovercraft | 617bd6102ef5e6fc8ed2942bbd4d514e15715fdf | [
"MIT"
] | 1 | 2020-07-11T01:05:08.000Z | 2020-07-11T01:05:08.000Z | tests/test_docs.py | wearypossum4770/hovercraft | d9f63bfdfe1519c4d7a81697ee066e49dc26a30b | [
"MIT"
] | null | null | null | import manuel.doctest
import manuel.codeblock
import manuel.testing
import unittest
def additional_tests():
m = manuel.doctest.Manuel()
m += manuel.codeblock.Manuel()
return manuel.testing.TestSuite(m, r'../docs/examples/tutorial.rst')
if __name__ == '__main__':
unittest.TextTestRunner().run(addition... | 23.714286 | 72 | 0.740964 |
c9ca0e175b53adb9d441b53580e90c0f2f11e2b6 | 100,313 | py | Python | pyNastran/bdf/cards/test/test_aero.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | 1 | 2021-08-02T09:49:24.000Z | 2021-08-02T09:49:24.000Z | pyNastran/bdf/cards/test/test_aero.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/bdf/cards/test/test_aero.py | ACea15/pyNastran | 5ffc37d784b52c882ea207f832bceb6b5eb0e6d4 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# pylint: disable=R0914
"""tests aero cards"""
import os
from collections import defaultdict
import unittest
from io import StringIO
from typing import Tuple, Optional, Any
import numpy as np
from cpylog import SimpleLogger
import pyNastran
from pyNastran.bdf.bdf import BDF, CORD2R, BDFCard, SET1, rea... | 34.638467 | 158 | 0.511828 |
b2f10df34ec3b9e4e1fba234802b5bde5cc44087 | 3,523 | py | Python | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_upload_helper.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 3 | 2019-02-21T20:46:26.000Z | 2021-06-22T15:35:52.000Z | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_upload_helper.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_upload_helper.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 15 | 2017-10-02T18:48:20.000Z | 2022-03-03T14:03:49.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# pylint: ... | 40.494253 | 109 | 0.619075 |
38a340975f42f7845b9377275929364265bfb0f1 | 2,642 | py | Python | oqtans_tools/GFFtools/0.2/gtf_to_gff.py | vipints/oqtans | af8119a73f6023deca57aedb9b090f7378a1a6c6 | [
"BSD-3-Clause"
] | 3 | 2015-11-20T19:40:29.000Z | 2019-07-25T15:34:24.000Z | oqtans_tools/GFFtools/0.2/gtf_to_gff.py | vipints/oqtans | af8119a73f6023deca57aedb9b090f7378a1a6c6 | [
"BSD-3-Clause"
] | null | null | null | oqtans_tools/GFFtools/0.2/gtf_to_gff.py | vipints/oqtans | af8119a73f6023deca57aedb9b090f7378a1a6c6 | [
"BSD-3-Clause"
] | 2 | 2018-09-20T08:28:36.000Z | 2019-03-06T06:26:52.000Z | #!/usr/bin/env python
"""
Convert Gene Transfer Format [GTF] to Generic Feature Format Version 3 [GFF3].
Usage: python gtf_to_gff.py in.gtf > out.gff3
Requirement:
GFFParser.py: https://github.com/vipints/GFFtools-GX/blob/master/GFFParser.py
helper.py : https://github.com/vipints/GFFtools-GX/blob/ma... | 32.617284 | 136 | 0.595004 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.