hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794846e46e6531ec69b94830ceff280a92bc4e6d | 511 | py | Python | Lib/site-packages/plotly/validators/histogram/marker/line/_reversescale.py | tytanya/my-first-blog | 2b40adb0816c3546e90ad6ca1e7fb50d924c1536 | [
"bzip2-1.0.6"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/histogram/marker/line/_reversescale.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/histogram/marker/line/_reversescale.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self,
plotly_name='reversescale',
parent_name='histogram.marker.line',
**kwargs
):
super(ReversescaleValidator, self).__init__(
plo... | 26.894737 | 75 | 0.620352 |
79484759270586212bbf1b6aebe1d1168aae1382 | 1,189 | py | Python | FavoriteFilesLib/file_strip/json.py | jasondavis/FavoriteFiles | be088259ac36383399eebe85d8d5b35e235d25b0 | [
"MIT",
"Unlicense"
] | 1 | 2019-04-27T20:13:19.000Z | 2019-04-27T20:13:19.000Z | FavoriteFilesLib/file_strip/json.py | jasondavis/FavoriteFiles | be088259ac36383399eebe85d8d5b35e235d25b0 | [
"MIT",
"Unlicense"
] | null | null | null | FavoriteFilesLib/file_strip/json.py | jasondavis/FavoriteFiles | be088259ac36383399eebe85d8d5b35e235d25b0 | [
"MIT",
"Unlicense"
] | null | null | null | '''
Favorite Files
Licensed under MIT
Copyright (c) 2012 Isaac Muse <isaacmuse@gmail.com>
'''
import re
from comments import Comments
def strip_dangling_commas(text, preserve_lines=False):
regex = re.compile(
# ([1st group] dangling commas) | ([8th group] everything else)
r"""((,([\s\r\n]*)(\]))|... | 28.309524 | 102 | 0.552565 |
794847f22d9b011e7fce5e58e89a0a07ff42ed68 | 205 | py | Python | src/python/paperetl/file/__main__.py | Abhimalya/paperetl | 99a76ab1c9267fe44b9e56739545cbd831d0dce4 | [
"Apache-2.0"
] | 95 | 2020-07-10T17:51:14.000Z | 2022-03-30T21:03:59.000Z | src/python/paperetl/file/__main__.py | Abhimalya/paperetl | 99a76ab1c9267fe44b9e56739545cbd831d0dce4 | [
"Apache-2.0"
] | 40 | 2020-07-24T20:07:44.000Z | 2021-12-17T18:09:53.000Z | src/python/paperetl/file/__main__.py | Abhimalya/paperetl | 99a76ab1c9267fe44b9e56739545cbd831d0dce4 | [
"Apache-2.0"
] | 12 | 2020-07-16T01:16:51.000Z | 2022-02-19T19:01:48.000Z | """
Defines main entry point for ETL process.
"""
import sys
from .execute import Execute
if __name__ == "__main__":
if len(sys.argv) > 3:
Execute.run(sys.argv[1], sys.argv[2], sys.argv[3])
| 17.083333 | 58 | 0.643902 |
794848183302c39cde630c6c86f0d09293f854b8 | 2,650 | py | Python | moldesign/_tests/test_qmmm.py | Autodesk/molecular-design-toolkit | 5f45a47fea21d3603899a6366cb163024f0e2ec4 | [
"Apache-2.0"
] | 147 | 2016-07-15T18:53:55.000Z | 2022-01-30T04:36:39.000Z | moldesign/_tests/test_qmmm.py | cherishyli/molecular-design-toolkit | 5f45a47fea21d3603899a6366cb163024f0e2ec4 | [
"Apache-2.0"
] | 151 | 2016-07-15T21:35:11.000Z | 2019-10-10T08:57:29.000Z | moldesign/_tests/test_qmmm.py | cherishyli/molecular-design-toolkit | 5f45a47fea21d3603899a6366cb163024f0e2ec4 | [
"Apache-2.0"
] | 33 | 2016-08-02T00:04:51.000Z | 2021-09-02T10:05:04.000Z | import pytest
import moldesign as mdt
from moldesign import units as u
from . import helpers
# Tests:
# 1. internal bonds on QM region are removed in all cases
# 2. wavefunction is perturbed for electrostatic embedding
# 3.
@pytest.fixture
def h2params():
mol = mdt.from_smiles('[H][H]')
mol.atoms[0].na... | 25.728155 | 86 | 0.688679 |
7948485e6fa9776c962180094d82469ba0f55c4e | 8,149 | py | Python | close_crawl/modules/cleaner.py | kug3lblitz/maryland-foreclosure-scraper | d1b8851efb4f82bc305f5d23c079b1f83ef73be4 | [
"MIT"
] | 6 | 2018-04-24T05:35:38.000Z | 2021-04-03T23:53:24.000Z | close_crawl/modules/cleaner.py | kug3lblitz/maryland-foreclosure-scraper | d1b8851efb4f82bc305f5d23c079b1f83ef73be4 | [
"MIT"
] | 22 | 2016-12-27T16:58:01.000Z | 2017-04-14T15:15:46.000Z | close_crawl/modules/cleaner.py | BNIA/maryland-foreclosure-scraper | d1b8851efb4f82bc305f5d23c079b1f83ef73be4 | [
"MIT"
] | 4 | 2016-12-22T22:07:18.000Z | 2020-01-03T04:31:08.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Cleaner
This module implements post-scraping cleaning processes on the raw initial
dataset. Processes include stripping excess strings off Address values,
removing Zip Code and Partial Cost values mislabeled as Address, and merging
rows containing blank values in alter... | 28.393728 | 79 | 0.53344 |
79484907978ebd8618833a7e02f8bf39e168c71e | 614 | py | Python | utils/get_discount_sum_15.py | Cratosart/test_disc | 565a86c0f0da15208b4822c5157d655ffaa86451 | [
"MIT"
] | null | null | null | utils/get_discount_sum_15.py | Cratosart/test_disc | 565a86c0f0da15208b4822c5157d655ffaa86451 | [
"MIT"
] | null | null | null | utils/get_discount_sum_15.py | Cratosart/test_disc | 565a86c0f0da15208b4822c5157d655ffaa86451 | [
"MIT"
] | null | null | null | def get_discount_sum_15(state, price):
if state['what_to_store'] == 'season_things':
thing = state['thing']
final_sum = price[thing]['week'] * state['weeks_amount'] + \
price[thing]['month'] * state['month_amount']
final_sum = final_sum * 0.85
else:
first_mon... | 40.933333 | 75 | 0.594463 |
7948497338aa016c7400850d6cec327f8a251279 | 3,571 | py | Python | ironic/conf/opts.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | 2 | 2019-06-17T21:37:53.000Z | 2020-07-11T03:58:39.000Z | ironic/conf/opts.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | ironic/conf/opts.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | 6 | 2019-06-13T12:49:33.000Z | 2021-04-17T16:33:19.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 34.009524 | 77 | 0.672641 |
79484baceacf87b4181d697ae171edcfb66776e7 | 6,243 | py | Python | route/login_check_key.py | norhu1130/openNAMU | 332ffd4d571cc1f28de427761ef926a015ea3862 | [
"BSD-3-Clause"
] | null | null | null | route/login_check_key.py | norhu1130/openNAMU | 332ffd4d571cc1f28de427761ef926a015ea3862 | [
"BSD-3-Clause"
] | null | null | null | route/login_check_key.py | norhu1130/openNAMU | 332ffd4d571cc1f28de427761ef926a015ea3862 | [
"BSD-3-Clause"
] | null | null | null | from .tool.func import *
def login_check_key_2(conn, tool):
curs = conn.cursor()
if flask.request.method == 'POST' or \
('c_key' in flask.session and flask.session['c_key'] == 'email_pass'):
re_set_list = ['c_id', 'c_pw', 'c_ans', 'c_que', 'c_key', 'c_type', 'c_email']
ip = ip_check()
... | 45.23913 | 135 | 0.480218 |
79484bcff99111edf0a6adabf1c6dbbc5518d8b9 | 593 | bzl | Python | tensorflow/core/platform/default/build_config_root.bzl | jingjunLi/tensorflow-multi-stream | d3b75ab179e1a62300739084b48816d2467b0cee | [
"Apache-2.0"
] | null | null | null | tensorflow/core/platform/default/build_config_root.bzl | jingjunLi/tensorflow-multi-stream | d3b75ab179e1a62300739084b48816d2467b0cee | [
"Apache-2.0"
] | null | null | null | tensorflow/core/platform/default/build_config_root.bzl | jingjunLi/tensorflow-multi-stream | d3b75ab179e1a62300739084b48816d2467b0cee | [
"Apache-2.0"
] | 1 | 2020-02-11T10:29:06.000Z | 2020-02-11T10:29:06.000Z | # Lower-level functionality for build config.
# The functions in this file might be referred by tensorflow.bzl. They have to
# be separate to avoid cyclic references.
WITH_XLA_SUPPORT = True
def tf_cuda_tests_tags():
return ["local"]
def tf_sycl_tests_tags():
return ["local"]
def tf_additional_plugin_deps():
... | 21.962963 | 78 | 0.738617 |
79484c5a1b374dcefde83d7298e30e0030c47886 | 1,651 | py | Python | scripts/Alec/7ghz/7ghz_pyEPR.py | nikosavola/pyEPR | fb9eac3eae5522da80d9ea112bc39ae025000afb | [
"BSD-3-Clause"
] | 1 | 2020-03-02T22:09:44.000Z | 2020-03-02T22:09:44.000Z | scripts/Alec/7ghz/7ghz_pyEPR.py | nikosavola/pyEPR | fb9eac3eae5522da80d9ea112bc39ae025000afb | [
"BSD-3-Clause"
] | null | null | null | scripts/Alec/7ghz/7ghz_pyEPR.py | nikosavola/pyEPR | fb9eac3eae5522da80d9ea112bc39ae025000afb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 23 10:34:00 2017
@author: alec-eickbusch
"""
from pyEPR import *
if 1:
# Specify the HFSS project to be analyzed
project_info = ProjectInfo(r"C:\Users\awe4\Documents\Simulations\HFSS\11ghz\\")
project_info.project_name = '2017_08_Zlatko_Shyam_AutStab' # Na... | 47.171429 | 141 | 0.705027 |
79484c7872b7d42736d3b5bbb4b26e72b09145e2 | 1,398 | py | Python | integration/combination/test_state_machine_with_cwe_dlq_and_retry_policy.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | null | null | null | integration/combination/test_state_machine_with_cwe_dlq_and_retry_policy.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | 1 | 2020-03-03T01:46:46.000Z | 2020-03-03T01:46:46.000Z | integration/combination/test_state_machine_with_cwe_dlq_and_retry_policy.py | hawflau/serverless-application-model | d2cf4b7e23d26cdf677c564d53bb58e6a5b6cac2 | [
"Apache-2.0"
] | null | null | null | from unittest.case import skipIf
from integration.helpers.base_test import BaseTest
from integration.helpers.resource import current_region_does_not_support
from integration.config.service_names import CWE_CWS_DLQ
@skipIf(current_region_does_not_support([CWE_CWS_DLQ]), "CweCwsDlq is not supported in this testing reg... | 46.6 | 108 | 0.771102 |
79484cb2eeb577394002a8f1a4c401d78e490202 | 778 | py | Python | tests/denoise/test_nlm.py | gmazzamuto/gputools | 73a4dee76a119f94d8163781a85b691fd080d506 | [
"BSD-3-Clause"
] | 89 | 2015-08-28T14:17:33.000Z | 2022-01-20T16:19:34.000Z | tests/denoise/test_nlm.py | gmazzamuto/gputools | 73a4dee76a119f94d8163781a85b691fd080d506 | [
"BSD-3-Clause"
] | 24 | 2015-08-28T19:06:22.000Z | 2022-02-21T21:10:13.000Z | tests/denoise/test_nlm.py | gmazzamuto/gputools | 73a4dee76a119f94d8163781a85b691fd080d506 | [
"BSD-3-Clause"
] | 17 | 2015-08-28T18:56:43.000Z | 2021-09-15T23:15:36.000Z | from __future__ import print_function, unicode_literals, absolute_import, division
from gputools.denoise import nlm2, nlm3
import numpy as np
def test_2d(fac = .3):
from scipy.misc import ascent
d = ascent().astype(np.float32)
d = d[:,:-10]
sig = .2*np.amax(d)
y = d+sig*np.random.uniform(0,1... | 18.97561 | 82 | 0.609254 |
79484d2a2b8e3aff4522eb9bd7a71da9d7f75f91 | 7,492 | py | Python | tests/test_colormap.py | kevinyu/inspec | 28e7fd224fdeae50fb1ce0e74eb02d940c1eab5a | [
"MIT"
] | 1 | 2021-03-01T07:37:13.000Z | 2021-03-01T07:37:13.000Z | tests/test_colormap.py | kevinyu/inspec | 28e7fd224fdeae50fb1ce0e74eb02d940c1eab5a | [
"MIT"
] | null | null | null | tests/test_colormap.py | kevinyu/inspec | 28e7fd224fdeae50fb1ce0e74eb02d940c1eab5a | [
"MIT"
] | null | null | null | import unittest
from unittest import mock
import numpy as np
from inspec.colormap import (
_registered_colormaps,
Colormap,
ColormapNotFound,
CursesColormapSingleton,
PairedColormap,
VALID_CMAPS,
curses_cmap,
load_cmap,
)
class TestPairedColormap(unittest.TestCase):
def test_ini... | 33.297778 | 97 | 0.60598 |
79484d5f64bf398eaca009197c9d37cb83594838 | 4,346 | py | Python | sympy/geometry/tests/test_curve.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/geometry/tests/test_curve.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/geometry/tests/test_curve.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | from sympy import Symbol, pi, symbols, Tuple, S, sqrt, asinh, Rational
from sympy.geometry import (
Curve,
Line,
Point,
Ellipse,
Ray,
Segment,
Circle,
Polygon,
RegularPolygon,
)
from sympy.testing.pytest import raises, slow
def test_curve():
x = Symbol("x", real=True)
s = S... | 33.175573 | 84 | 0.518408 |
79484e29b73f55be596b08d46cfd75eed61e3a7e | 2,796 | py | Python | integrationtest/vm/hybrid/test_sync_delete_vpc_vpn_gateway_local.py | bgerxx/woodpecker | fdc51245945cc9be4d1f028988079213eb99b2ad | [
"Apache-2.0"
] | null | null | null | integrationtest/vm/hybrid/test_sync_delete_vpc_vpn_gateway_local.py | bgerxx/woodpecker | fdc51245945cc9be4d1f028988079213eb99b2ad | [
"Apache-2.0"
] | null | null | null | integrationtest/vm/hybrid/test_sync_delete_vpc_vpn_gateway_local.py | bgerxx/woodpecker | fdc51245945cc9be4d1f028988079213eb99b2ad | [
"Apache-2.0"
] | null | null | null | '''
New Integration Test for hybrid.
@author: Legion
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.operations.hybrid_operations as hyb_ops
import zstackwoodpecker.operations.resource_operations ... | 36.789474 | 131 | 0.731044 |
7948503824e4fb456500aa275c6ffc26a2e1bdc0 | 10,071 | py | Python | test/model/test_models.py | strawberrypie/gluon-ts | 1d27423478f1dc4621f81c4659d8ba78f88ee89b | [
"Apache-2.0"
] | 1 | 2019-11-10T03:56:28.000Z | 2019-11-10T03:56:28.000Z | test/model/test_models.py | strawberrypie/gluon-ts | 1d27423478f1dc4621f81c4659d8ba78f88ee89b | [
"Apache-2.0"
] | null | null | null | test/model/test_models.py | strawberrypie/gluon-ts | 1d27423478f1dc4621f81c4659d8ba78f88ee89b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 32.592233 | 111 | 0.665972 |
794851b6177836b786383d5bc09a5f570367a71b | 659 | py | Python | flatpage_main/migrations/0002_auto_20210622_1405.py | davidkartuzinski/ellieplatformsite | 63a41cb2a15ae81a7cd3cdf68d783398b3205ce2 | [
"MIT"
] | null | null | null | flatpage_main/migrations/0002_auto_20210622_1405.py | davidkartuzinski/ellieplatformsite | 63a41cb2a15ae81a7cd3cdf68d783398b3205ce2 | [
"MIT"
] | 2 | 2021-06-25T15:30:34.000Z | 2021-06-29T13:55:02.000Z | flatpage_main/migrations/0002_auto_20210622_1405.py | davidkartuzinski/ellieplatformsite | 63a41cb2a15ae81a7cd3cdf68d783398b3205ce2 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-22 12:05
import ckeditor_uploader.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('flatpage_main', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='newflatpage',
... | 23.535714 | 78 | 0.588771 |
794852b648e68112e8bbdebb48f095c51dc307d2 | 1,043 | py | Python | app/core/migrations/0004_recipe.py | Saurav-Shrivastav/recipe-app-api | bbb024828784ca91c34b81cdf1aacfd5a3021f30 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | Saurav-Shrivastav/recipe-app-api | bbb024828784ca91c34b81cdf1aacfd5a3021f30 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | Saurav-Shrivastav/recipe-app-api | bbb024828784ca91c34b81cdf1aacfd5a3021f30 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-10-09 05:25
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_ingredient'),
]
operations = [
migrations.CreateModel(
... | 35.965517 | 118 | 0.604027 |
794853da5596187ea115fba1a7d868665ad671b3 | 4,331 | py | Python | prepare_trainset.py | bond005/runne_contrastive_ner | ec94cdde296ca4b394f65b206fdc0d9877a025ba | [
"Apache-2.0"
] | null | null | null | prepare_trainset.py | bond005/runne_contrastive_ner | ec94cdde296ca4b394f65b206fdc0d9877a025ba | [
"Apache-2.0"
] | null | null | null | prepare_trainset.py | bond005/runne_contrastive_ner | ec94cdde296ca4b394f65b206fdc0d9877a025ba | [
"Apache-2.0"
] | null | null | null | import codecs
import os
import pickle
import random
import sys
from transformers import BertTokenizer
from io_utils.io_utils import load_data
from trainset_building.trainset_building import build_trainset_for_siam
from trainset_building.trainset_building import build_trainset_for_ner
def main():
random.seed(42)... | 34.102362 | 78 | 0.611175 |
7948548d1317c0fa4341dc312be9a5949cb8f656 | 248 | py | Python | features_extraction/regular_features.py | eyalho/NetML-Competition2020 | cdf7b21642a8ce1ff8cc4c3ba7ed7fc6e1a91a81 | [
"BSD-2-Clause"
] | null | null | null | features_extraction/regular_features.py | eyalho/NetML-Competition2020 | cdf7b21642a8ce1ff8cc4c3ba7ed7fc6e1a91a81 | [
"BSD-2-Clause"
] | null | null | null | features_extraction/regular_features.py | eyalho/NetML-Competition2020 | cdf7b21642a8ce1ff8cc4c3ba7ed7fc6e1a91a81 | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
from pandas import DataFrame
from features_extraction.abs_features_extraction import ABSFeatureExtraction
class RegularFeatures(ABSFeatureExtraction):
def extract(self, df: DataFrame) -> np.array:
return df.values
| 24.8 | 76 | 0.798387 |
794854dc90f2d4e1c72a532492b9adbecbe551cd | 470 | py | Python | IWESEP2016/kousatsu2/bug_ranking.py | hideshis/scripts_for_research | f633bdef0f9b959d7b18c8b95f169306eb8bb50d | [
"MIT"
] | null | null | null | IWESEP2016/kousatsu2/bug_ranking.py | hideshis/scripts_for_research | f633bdef0f9b959d7b18c8b95f169306eb8bb50d | [
"MIT"
] | null | null | null | IWESEP2016/kousatsu2/bug_ranking.py | hideshis/scripts_for_research | f633bdef0f9b959d7b18c8b95f169306eb8bb50d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
import subprocess
import csv
os.chdir("./evolution_info")
csv_list = os.listdir("./")
rank = []
for csv_file in csv_list:
result = subprocess.check_output('grep "bug" ' + csv_file + " | wc -l", shell=True)
result = result.replace('\r', '')
result = result.replace('\n', ... | 22.380952 | 84 | 0.648936 |
794855d07b967464fa463b2ba9dd7683a00f2311 | 3,466 | py | Python | kw3pan/pancakeswap/factory/core/pancakeswap_factory.py | kkristof200/py_web3_pancakeswap | ae9dc7021b7da2365ce675f29f89e103fe44d77f | [
"MIT"
] | 6 | 2021-05-09T12:43:37.000Z | 2021-12-07T01:56:02.000Z | kw3pan/pancakeswap/factory/core/pancakeswap_factory.py | kkristof200/py_web3_pancakeswap | ae9dc7021b7da2365ce675f29f89e103fe44d77f | [
"MIT"
] | null | null | null | kw3pan/pancakeswap/factory/core/pancakeswap_factory.py | kkristof200/py_web3_pancakeswap | ae9dc7021b7da2365ce675f29f89e103fe44d77f | [
"MIT"
] | null | null | null | # ------------------------------------------------------------ Imports ----------------------------------------------------------- #
# System
from typing import Optional
# Pip
from kw3 import WrappedContract, Web3
from kw3.constants import Constants as KW3Constants
# Local
from ._abi import pancakeswap_factory_abi
... | 28.409836 | 132 | 0.467398 |
79485621667c6770026cf4bc4d62b13ae4f28526 | 47,272 | py | Python | scripts/old_scripts/analyze_results_by_classification.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | 3 | 2019-07-11T05:32:13.000Z | 2021-03-12T01:10:21.000Z | scripts/old_scripts/analyze_results_by_classification.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | null | null | null | scripts/old_scripts/analyze_results_by_classification.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | null | null | null | import argparse
import copy
import cPickle
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pylab
#from pylab import plot, show, savefig, xlim, figure, hold, ylim, legend, boxplot, setp, axes, xlabel, ylabel
import scipy
import time
import sys, os, re
from sklearn.decomposition import PCA
... | 43.170776 | 243 | 0.609684 |
794856cdab68d2694768924e6f6d61a8baf7891d | 563 | py | Python | tests/pyre/schemata/decimals.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | tests/pyre/schemata/decimals.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | tests/pyre/schemata/decimals.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2018 all rights reserved
#
"""
Verify that decimal conversions work as expected
"""
def test():
import decimal
import pyre.schemata
# create a descriptor
descriptor = pyre.schemata.decimal()
# check... | 15.216216 | 67 | 0.639432 |
794856f275f3e101f28ef1bfae2eddf8d9ab52e9 | 16,447 | py | Python | dev-files/targets/RP2040/generators-service/svc-dual-core-v2/service_generator.py | pierremolinaro/real-time-kernel-pi-pico | 581360dd1135e17fe0c4ddabbe74052a366de7d6 | [
"MIT"
] | 3 | 2021-05-05T19:40:01.000Z | 2021-05-08T06:40:35.000Z | dev-files/targets/RP2040/generators-service/svc-dual-core-v2/service_generator.py | pierremolinaro/real-time-kernel-pi-pico | 581360dd1135e17fe0c4ddabbe74052a366de7d6 | [
"MIT"
] | null | null | null | dev-files/targets/RP2040/generators-service/svc-dual-core-v2/service_generator.py | pierremolinaro/real-time-kernel-pi-pico | 581360dd1135e17fe0c4ddabbe74052a366de7d6 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: UTF-8 -*-
#---------------------------------------------------------------------------------------------------
def asSeparator () :
return "//" + ("-" * 78) + "\n"
#---------------------------------------------------------------------------------------------------
def generate... | 56.910035 | 101 | 0.407977 |
7948575250c4618b719d86f58b3c04c98641b623 | 1,809 | py | Python | sqlalchemy_utils/types/locale.py | jarkkorantala/sqlalchemy-utils | 7cee65f0a3074245b853425e19a732aa274bfa3e | [
"BSD-3-Clause"
] | 11 | 2016-09-14T21:59:55.000Z | 2019-01-28T21:58:31.000Z | sqlalchemy_utils/types/locale.py | jarkkorantala/sqlalchemy-utils | 7cee65f0a3074245b853425e19a732aa274bfa3e | [
"BSD-3-Clause"
] | 11 | 2019-12-26T17:21:03.000Z | 2022-03-21T22:17:07.000Z | sqlalchemy_utils/types/locale.py | jarkkorantala/sqlalchemy-utils | 7cee65f0a3074245b853425e19a732aa274bfa3e | [
"BSD-3-Clause"
] | 3 | 2021-03-22T14:24:40.000Z | 2021-04-02T08:05:27.000Z | import six
from sqlalchemy import types
from ..exceptions import ImproperlyConfigured
from .scalar_coercible import ScalarCoercible
babel = None
try:
import babel
except ImportError:
pass
class LocaleType(types.TypeDecorator, ScalarCoercible):
"""
LocaleType saves Babel_ Locale objects into database... | 23.802632 | 76 | 0.632946 |
794857d1ce05cbb50b4b476265d374584128148b | 998 | py | Python | doc/examples/box.py | djkool/OcempGUI3 | 43a68033cb0dbad10654231299cb762cd18b7c25 | [
"BSD-2-Clause"
] | null | null | null | doc/examples/box.py | djkool/OcempGUI3 | 43a68033cb0dbad10654231299cb762cd18b7c25 | [
"BSD-2-Clause"
] | null | null | null | doc/examples/box.py | djkool/OcempGUI3 | 43a68033cb0dbad10654231299cb762cd18b7c25 | [
"BSD-2-Clause"
] | null | null | null | # Box examples.
from ocempgui.widgets import *
from ocempgui.widgets.Constants import *
def create_box_view ():
frame = VFrame (Label ("Box example"))
frame.topleft = 10, 10
# The Box with 200x200 pixels in size.
box = Box (200, 200)
# Widgets to place into it.
label = ImageLabel ("image.... | 24.341463 | 52 | 0.634269 |
79485ae75eab2d18044d9795502f67c41838d1b6 | 2,572 | py | Python | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/UpdateVsPullStreamInfoConfigRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/UpdateVsPullStreamInfoConfigRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/UpdateVsPullStreamInfoConfigRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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.15 | 80 | 0.756998 |
79485b6d052bcafbb5dad4d3b8993f92574c2554 | 331 | py | Python | appmode/__init__.py | KathyaFigueroa/Indifference-curves | ecf2fdc8adbfb745c09621b77e51080152b158d9 | [
"MIT"
] | 408 | 2017-11-09T12:06:31.000Z | 2022-03-30T23:13:37.000Z | appmode/__init__.py | KathyaFigueroa/Indifference-curves | ecf2fdc8adbfb745c09621b77e51080152b158d9 | [
"MIT"
] | 54 | 2017-11-09T12:20:54.000Z | 2021-07-22T16:38:56.000Z | appmode/__init__.py | KathyaFigueroa/Indifference-curves | ecf2fdc8adbfb745c09621b77e51080152b158d9 | [
"MIT"
] | 83 | 2017-11-09T10:49:20.000Z | 2022-02-27T23:59:29.000Z | # -*- coding: utf-8 -*-
__version__ = '0.8.0'
# Jupyter Extension points
def _jupyter_nbextension_paths():
return [dict(
section="notebook",
src="static",
dest="appmode",
require="appmode/main")]
def _jupyter_server_extension_paths():
return [{"module":"appmode.server_extensio... | 19.470588 | 50 | 0.634441 |
79485b96bb876adb845a2fe839881a7c53ea1c1d | 9,069 | py | Python | mmdet/apis/train.py | AndreasKriegler/mmdetection | ce1d418f520ddeeb9bcb0fabbee48e76439ef6ec | [
"Apache-2.0"
] | 483 | 2019-09-04T01:01:26.000Z | 2022-03-30T06:28:16.000Z | mmdet/apis/train.py | AndreasKriegler/mmdetection | ce1d418f520ddeeb9bcb0fabbee48e76439ef6ec | [
"Apache-2.0"
] | 47 | 2019-09-07T07:04:45.000Z | 2022-03-08T08:22:21.000Z | mmdet/apis/train.py | AndreasKriegler/mmdetection | ce1d418f520ddeeb9bcb0fabbee48e76439ef6ec | [
"Apache-2.0"
] | 94 | 2019-09-04T04:56:29.000Z | 2022-03-19T05:45:07.000Z | from __future__ import division
import re
from collections import OrderedDict
import torch
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import DistSamplerSeedHook, Runner, obj_from_dict
from mmdet import datasets
from mmdet.core import (CocoDistEvalmAPHook, CocoDistEvalRecallHo... | 38.922747 | 78 | 0.626971 |
79485ca92f3adf8a4a21885885e1babf8b74a66c | 6,271 | py | Python | tools_webrtc/autoroller/unittests/roll_deps_test.py | lianhuaren/webrtc | 096f18c11d8acb0d92820f75fdf934607f424cfc | [
"DOC",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools_webrtc/autoroller/unittests/roll_deps_test.py | lianhuaren/webrtc | 096f18c11d8acb0d92820f75fdf934607f424cfc | [
"DOC",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools_webrtc/autoroller/unittests/roll_deps_test.py | lianhuaren/webrtc | 096f18c11d8acb0d92820f75fdf934607f424cfc | [
"DOC",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All c... | 36.888235 | 80 | 0.73513 |
79485e57fbce5cd8c3453807e54303cbe75b2bd0 | 19,547 | py | Python | Python/libraries/recognizers-number/recognizers_number/resources/french_numeric.py | vijayraavi/Recognizers-Text | bfdd32440ef033c969839332d8be75162d1b241a | [
"MIT"
] | null | null | null | Python/libraries/recognizers-number/recognizers_number/resources/french_numeric.py | vijayraavi/Recognizers-Text | bfdd32440ef033c969839332d8be75162d1b241a | [
"MIT"
] | null | null | null | Python/libraries/recognizers-number/recognizers_number/resources/french_numeric.py | vijayraavi/Recognizers-Text | bfdd32440ef033c969839332d8be75162d1b241a | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# <auto-generated>
# This code was generated by a tool.
# Changes to this file may cause incorrect behavior and will be lost if
# the code is regenerated.
# </auto-generated>
# --------------------------------------------... | 60.517028 | 208 | 0.383742 |
79485f6dcc5ecb2c2cb69418d49a7b55ff9bdf80 | 205 | py | Python | big_o_notation/space_complexity/constant_space.py | LauraBeatris/algorithms-and-data-structures | fe8c2f096bf409a6ac7bfbc55c63a023a3f3ce60 | [
"MIT"
] | 11 | 2021-04-09T15:51:00.000Z | 2021-07-18T11:40:07.000Z | big_o_notation/space_complexity/constant_space.py | LauraBeatris/algorithms-and-data-structures | fe8c2f096bf409a6ac7bfbc55c63a023a3f3ce60 | [
"MIT"
] | null | null | null | big_o_notation/space_complexity/constant_space.py | LauraBeatris/algorithms-and-data-structures | fe8c2f096bf409a6ac7bfbc55c63a023a3f3ce60 | [
"MIT"
] | 2 | 2021-04-13T03:00:09.000Z | 2022-01-03T22:37:00.000Z | def constant_space(numbers_list): # Big O => O(1) => The space allocated is always constant doesn't matter the input size
unused_variable = 1 # O(1)
for number in numbers_list: # O(1)
print(number) | 51.25 | 121 | 0.712195 |
79485fb7358e03d727a23837e8da701ed1630813 | 4,961 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/models/node_state.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/node_state.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/node_state.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_1.models.node_dr... | 28.511494 | 142 | 0.581334 |
7948601946d027fc723aa0bbfd1da9aa6b09c634 | 417 | py | Python | pyspedas/stereo/config.py | pulupa/pyspedas | 7228199cf16eca2a27d130f1e4985ef1e69462ea | [
"MIT"
] | 75 | 2019-02-22T12:59:33.000Z | 2022-02-26T15:33:20.000Z | pyspedas/stereo/config.py | pulupa/pyspedas | 7228199cf16eca2a27d130f1e4985ef1e69462ea | [
"MIT"
] | 40 | 2019-07-02T07:46:34.000Z | 2022-02-23T21:48:50.000Z | pyspedas/stereo/config.py | pulupa/pyspedas | 7228199cf16eca2a27d130f1e4985ef1e69462ea | [
"MIT"
] | 43 | 2019-02-22T13:03:41.000Z | 2022-01-24T19:26:59.000Z | import os
CONFIG = {'local_data_dir': 'stereo_data/',
'remote_data_dir': 'http://sprg.ssl.berkeley.edu/data/misc/stereo/'}
# override local data directory with environment variables
if os.environ.get('SPEDAS_DATA_DIR'):
CONFIG['local_data_dir'] = os.sep.join([os.environ['SPEDAS_DATA_DIR'], 'stereo'])
i... | 37.909091 | 85 | 0.721823 |
79486077ddd1bbd31f60ff896632cd92ff8b50e9 | 16,990 | py | Python | python/ccxt/cex.py | flexycode/ccxt | bb3500f921d2a2fc23d61ab31e8cf1645a5102c3 | [
"MIT"
] | 1 | 2019-03-12T09:30:24.000Z | 2019-03-12T09:30:24.000Z | python/ccxt/cex.py | flexycode/ccxt | bb3500f921d2a2fc23d61ab31e8cf1645a5102c3 | [
"MIT"
] | null | null | null | python/ccxt/cex.py | flexycode/ccxt | bb3500f921d2a2fc23d61ab31e8cf1645a5102c3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import math
import json
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Inv... | 37.340659 | 210 | 0.459211 |
794860e302dff64adc78e1b68f55e1be887d053a | 6,361 | py | Python | serotonin_inference/tasks/_iblrig_tasks_passive_opto_long/session_params.py | int-brain-lab/personal_project_protocols | c20f923c1596384ba585164d65c3a40d58d8cbb1 | [
"MIT"
] | null | null | null | serotonin_inference/tasks/_iblrig_tasks_passive_opto_long/session_params.py | int-brain-lab/personal_project_protocols | c20f923c1596384ba585164d65c3a40d58d8cbb1 | [
"MIT"
] | null | null | null | serotonin_inference/tasks/_iblrig_tasks_passive_opto_long/session_params.py | int-brain-lab/personal_project_protocols | c20f923c1596384ba585164d65c3a40d58d8cbb1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Niccolò Bonacchi
# @Date: 2018-02-02 17:19:09
import logging
import os
import tkinter as tk
from pathlib import Path
from sys import platform
from tkinter import messagebox
from pythonosc import udp_client
import iblrig.adaptive as adaptive
impo... | 38.08982 | 87 | 0.519101 |
794861a89e2a72904301f0eb55ad249cc5cfddfb | 1,268 | py | Python | migrations/versions/d9fde69982c2_first_migration.py | SophieO1970/Personal-Blog | 24c5906a6420004206f889379fd89392f37884a6 | [
"MIT"
] | null | null | null | migrations/versions/d9fde69982c2_first_migration.py | SophieO1970/Personal-Blog | 24c5906a6420004206f889379fd89392f37884a6 | [
"MIT"
] | null | null | null | migrations/versions/d9fde69982c2_first_migration.py | SophieO1970/Personal-Blog | 24c5906a6420004206f889379fd89392f37884a6 | [
"MIT"
] | null | null | null | """first migration
Revision ID: d9fde69982c2
Revises:
Create Date: 2020-10-30 22:24:40.554718
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd9fde69982c2'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto ge... | 30.926829 | 83 | 0.682177 |
7948637ad48acbaeddba8a2cc37343184dc4bda7 | 5,662 | py | Python | B1B0_fuel.py | Mrluo123/rooster | 871af75d1847f5a21776178fba09e186afa58837 | [
"MIT"
] | 2 | 2022-02-21T10:10:55.000Z | 2022-02-21T10:11:00.000Z | B1B0_fuel.py | Mrluo123/rooster | 871af75d1847f5a21776178fba09e186afa58837 | [
"MIT"
] | null | null | null | B1B0_fuel.py | Mrluo123/rooster | 871af75d1847f5a21776178fba09e186afa58837 | [
"MIT"
] | null | null | null | from B1B0A_fuelgrain import FuelGrain
import math
import sys
#--------------------------------------------------------------------------------------------------
class Fuel:
#----------------------------------------------------------------------------------------------
# constructor: self is a 'fuel'... | 46.793388 | 171 | 0.532851 |
7948641b8c98eecefe70e7e53b102c4c48d4ea5e | 5,526 | py | Python | mmdet/core/evaluation/class_names.py | jodistiara/mmdetection | e0ad079832ea51210f557959c51f2f6e146c75bc | [
"Apache-2.0"
] | null | null | null | mmdet/core/evaluation/class_names.py | jodistiara/mmdetection | e0ad079832ea51210f557959c51f2f6e146c75bc | [
"Apache-2.0"
] | null | null | null | mmdet/core/evaluation/class_names.py | jodistiara/mmdetection | e0ad079832ea51210f557959c51f2f6e146c75bc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import mmcv
def wider_face_classes():
return ['face']
def voc_classes():
return [
'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat',
'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person',
'pottedplant'... | 46.436975 | 80 | 0.5789 |
79486429bb9d22cd84a6996dc271bfc9858a2762 | 4,401 | py | Python | data/celeba_cropped.py | Gerryflap/master_thesis | 5dc16e21b23837fee8a4532679bb5cb961af0b7c | [
"MIT"
] | null | null | null | data/celeba_cropped.py | Gerryflap/master_thesis | 5dc16e21b23837fee8a4532679bb5cb961af0b7c | [
"MIT"
] | null | null | null | data/celeba_cropped.py | Gerryflap/master_thesis | 5dc16e21b23837fee8a4532679bb5cb961af0b7c | [
"MIT"
] | null | null | null | # This loader contains code from https://github.com/pytorch/vision/blob/master/torchvision/datasets/celeba.py
from functools import partial
import PIL
import pandas
import torch
from torchvision.datasets import VisionDataset, CelebA
import os
from torchvision.datasets.utils import verify_str_arg
import data.data_pr... | 37.29661 | 165 | 0.623949 |
79486493dee3ec7bc27e043d0a43144435c1d66a | 30,783 | py | Python | theano/compile/ops.py | jych/Theano | d7d722faa96aac95c19f460bf60e8e8654ff58df | [
"BSD-3-Clause"
] | 1 | 2021-07-01T02:51:08.000Z | 2021-07-01T02:51:08.000Z | theano/compile/ops.py | mayunpeng/Theano | c74da33de3768e231ffa0d92d9d11667a2a5aedb | [
"BSD-3-Clause"
] | null | null | null | theano/compile/ops.py | mayunpeng/Theano | c74da33de3768e231ffa0d92d9d11667a2a5aedb | [
"BSD-3-Clause"
] | null | null | null | """This file contains auxiliary Ops, used during the compilation phase
and Ops building class (:class:`FromFunctionOp`) and decorator
(:func:`as_op`) that help make new Ops more rapidly.
"""
import copy
import six.moves.cPickle as pickle
import warnings
import theano
from theano import gof
from six import iteritems
f... | 35.180571 | 79 | 0.586947 |
7948657f750ba2e2397af79069b01666fb0b00e7 | 5,392 | py | Python | third_party/virtualbox/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/OptRomInfStatement.py | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 521 | 2019-03-29T15:44:08.000Z | 2022-03-22T09:46:19.000Z | third_party/virtualbox/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/OptRomInfStatement.py | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 30 | 2019-06-04T17:00:49.000Z | 2021-09-08T20:44:19.000Z | third_party/virtualbox/src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/OptRomInfStatement.py | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 99 | 2019-03-29T16:04:13.000Z | 2022-03-28T16:59:34.000Z | ## @file
# process OptionROM generation from INF statement
#
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of ... | 34.787097 | 115 | 0.648182 |
7948659d614246078f34235e52dcb4383d957696 | 1,385 | py | Python | ooobuild/dyn/xml/crypto/x_cipher_context.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/xml/crypto/x_cipher_context.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/xml/crypto/x_cipher_context.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 37.432432 | 88 | 0.768231 |
7948669e41fe1e35880eb66642e79f1f66bb1e75 | 10,449 | py | Python | doc/conf.py | dburkhardt/slalom | 547a56316e5c3ccc63e592eb907dc53b00212466 | [
"Apache-2.0"
] | 24 | 2017-10-30T13:58:51.000Z | 2021-08-14T17:07:46.000Z | doc/conf.py | dburkhardt/slalom | 547a56316e5c3ccc63e592eb907dc53b00212466 | [
"Apache-2.0"
] | 6 | 2017-11-11T04:49:01.000Z | 2019-12-24T13:24:50.000Z | doc/conf.py | dburkhardt/slalom | 547a56316e5c3ccc63e592eb907dc53b00212466 | [
"Apache-2.0"
] | 5 | 2018-01-09T12:19:31.000Z | 2019-11-26T17:01:57.000Z | # -*- coding: utf-8 -*-
#
# slalom documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 1 14:32:47 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 28.944598 | 80 | 0.702172 |
794866da9ceb005f8956225f710b22b28a1cd5e3 | 7,990 | py | Python | qa/rpc-tests/txn_clone.py | boItcurrency/BOLT | 09b7263fbf4b3f30f106c0f1ee36ba89c8eb8d94 | [
"MIT"
] | 4 | 2018-01-21T14:27:51.000Z | 2020-02-13T16:52:21.000Z | qa/rpc-tests/txn_clone.py | boItcurrency/BOLT | 09b7263fbf4b3f30f106c0f1ee36ba89c8eb8d94 | [
"MIT"
] | 1 | 2018-02-01T11:53:40.000Z | 2018-02-02T01:29:57.000Z | qa/rpc-tests/txn_clone.py | boItcurrency/BOLT | 09b7263fbf4b3f30f106c0f1ee36ba89c8eb8d94 | [
"MIT"
] | 4 | 2018-01-26T02:23:40.000Z | 2020-03-05T13:32:10.000Z | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test proper accounting with an equivalent malleability clone
#
from test_framework.test_framework im... | 48.13253 | 115 | 0.609387 |
794867ff0188dd7325ed263b2adc119dca41cd98 | 67 | py | Python | Chapter 09/Chap09_Example9.50.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 09/Chap09_Example9.50.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 09/Chap09_Example9.50.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | #TypeError
from datetime import time
mytime = time(hour = '23')
| 16.75 | 27 | 0.701493 |
79486808f028fbb96a41218757f575977ed80f5c | 390 | py | Python | Alexio/wsgi.py | MonkeyAndres/AlexioProject | 561fdbbfb561bb2ee40c6e90696ba4759029959d | [
"MIT"
] | null | null | null | Alexio/wsgi.py | MonkeyAndres/AlexioProject | 561fdbbfb561bb2ee40c6e90696ba4759029959d | [
"MIT"
] | null | null | null | Alexio/wsgi.py | MonkeyAndres/AlexioProject | 561fdbbfb561bb2ee40c6e90696ba4759029959d | [
"MIT"
] | null | null | null | """
WSGI config for Alexio project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTI... | 22.941176 | 78 | 0.784615 |
7948687308a5e04d65c5bf8c18d13bcf7139029b | 10,519 | py | Python | doc/conf.py | dhuppenkothen/altair | 6846d79418145e91c69fd183cbebd1a321b6a969 | [
"BSD-3-Clause"
] | 1,134 | 2015-09-19T05:38:36.000Z | 2021-09-21T15:15:11.000Z | doc/conf.py | dhuppenkothen/altair | 6846d79418145e91c69fd183cbebd1a321b6a969 | [
"BSD-3-Clause"
] | 165 | 2015-09-19T05:09:33.000Z | 2018-10-08T19:42:28.000Z | doc/conf.py | dhuppenkothen/altair | 6846d79418145e91c69fd183cbebd1a321b6a969 | [
"BSD-3-Clause"
] | 75 | 2015-09-19T03:30:25.000Z | 2018-11-19T05:37:38.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# altair documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 7 12:52:48 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# aut... | 32.974922 | 80 | 0.720221 |
794868922a6d9deb7a050e48be8d0c5f2b5c804e | 204 | py | Python | migration/20210727_01_Lim9D-add-new-event-type-uuid.py | randomicu/database | 42e42f52c70297332e12ded243a7cac8660d5825 | [
"Unlicense"
] | null | null | null | migration/20210727_01_Lim9D-add-new-event-type-uuid.py | randomicu/database | 42e42f52c70297332e12ded243a7cac8660d5825 | [
"Unlicense"
] | 9 | 2020-10-27T19:13:10.000Z | 2021-07-19T04:16:11.000Z | migration/20210727_01_Lim9D-add-new-event-type-uuid.py | randomicu/database | 42e42f52c70297332e12ded243a7cac8660d5825 | [
"Unlicense"
] | null | null | null | """
Add new event type: uuid
"""
from yoyo import step
__depends__ = {'20210718_01_E6H4i-add-view-with-event-summary'}
steps = [
step("ALTER TYPE \"event_type\" ADD VALUE IF NOT EXISTS 'uuid';")
]
| 17 | 69 | 0.681373 |
7948693d15c647f2c5ce8a02e951b4bde6b6bb66 | 379,876 | py | Python | vistrails/db/versions/v1_0_3/persistence/sql/auto_gen.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/db/versions/v1_0_3/persistence/sql/auto_gen.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/db/versions/v1_0_3/persistence/sql/auto_gen.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | ###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | 47.555834 | 229 | 0.568141 |
794869dc40acd2cd56a451ac4fe0be0c41f55476 | 1,884 | py | Python | tests/test_ops/test_upfirdn2d.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | 1 | 2022-03-18T02:41:11.000Z | 2022-03-18T02:41:11.000Z | tests/test_ops/test_upfirdn2d.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | null | null | null | tests/test_ops/test_upfirdn2d.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch
_USING_PARROTS = True
try:
from parrots.autograd import gradcheck
except ImportError:
from torch.autograd import gradcheck, gradgradcheck
_USING_PARROTS = False
class TestUpFirDn2d(object):
"""Unit test for UpFirDn2d.
Her... | 31.932203 | 78 | 0.556794 |
79486b01aa4a0dcf22f8695a93e058bbbac8f077 | 25 | py | Python | pylib/pymex/uniprot/__init__.py | IMExConsortium/pymex | 5fb1d155f630c6225a3e635a402fbe9feebc1c15 | [
"MIT"
] | 2 | 2020-09-26T08:17:00.000Z | 2021-03-25T16:02:15.000Z | pylib/pymex/uniprot/__init__.py | IMExConsortium/pymex | 5fb1d155f630c6225a3e635a402fbe9feebc1c15 | [
"MIT"
] | 6 | 2020-09-21T01:09:35.000Z | 2021-06-04T06:06:56.000Z | pylib/pymex/uniprot/__init__.py | IMExConsortium/pymex | 5fb1d155f630c6225a3e635a402fbe9feebc1c15 | [
"MIT"
] | 2 | 2020-05-14T06:41:21.000Z | 2020-06-30T04:58:54.000Z | from .unirecord import *
| 12.5 | 24 | 0.76 |
79486b428a48226fd9426a2be2928f0aef7d0b79 | 3,715 | py | Python | tests/json_model_diff_test.py | adamknox-wf/json-regex-difftool | cc59ccd8f41f94955bfb516ec4a7d86b7572e675 | [
"Apache-2.0"
] | 9 | 2015-10-22T14:19:23.000Z | 2021-04-19T06:45:36.000Z | tests/json_model_diff_test.py | adamknox-wf/json-regex-difftool | cc59ccd8f41f94955bfb516ec4a7d86b7572e675 | [
"Apache-2.0"
] | 4 | 2015-03-06T21:04:58.000Z | 2016-11-30T19:44:20.000Z | tests/json_model_diff_test.py | adamknox-wf/json-regex-difftool | cc59ccd8f41f94955bfb516ec4a7d86b7572e675 | [
"Apache-2.0"
] | 7 | 2015-03-20T20:23:33.000Z | 2021-06-30T02:59:59.000Z | import sys
from .test_helper import TestHelper
from json_regex_diff.jsondiff import JsonDiff
class JsonModelDiffTest(TestHelper):
def test_simple_regex_no_difference(self):
"""
With no difference we should have an empty list
"""
new_file = self.write_string_to_file('["test"]', "i... | 41.741573 | 78 | 0.597308 |
79486b8fade8ff7a785f1df72b680ff0950fd407 | 1,237 | py | Python | diagrams/ibm/security.py | ryancheley/diagrams | 8188b4d1ea47e0da832b95cd8a27adf52b26fac1 | [
"MIT"
] | 1 | 2021-07-08T19:42:39.000Z | 2021-07-08T19:42:39.000Z | diagrams/ibm/security.py | ryancheley/diagrams | 8188b4d1ea47e0da832b95cd8a27adf52b26fac1 | [
"MIT"
] | 1 | 2020-12-28T19:55:10.000Z | 2020-12-29T18:29:53.000Z | diagrams/ibm/security.py | ryancheley/diagrams | 8188b4d1ea47e0da832b95cd8a27adf52b26fac1 | [
"MIT"
] | null | null | null | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _IBM
class _Security(_IBM):
_type = "security"
_icon_dir = "resources/ibm/security"
class ApiSecurity(_Security):
_icon = "api-security.png"
class BlockchainSecurityService(_Security):
_icon = "blockchain-security-... | 17.927536 | 68 | 0.736459 |
79486c6088334168d96fd0402f0b155991bb5f32 | 9,987 | py | Python | test/rlai/gpi/monte_carlo/iteration_test.py | MatthewGerber/rlai | f390433c3adc285e1e9cc113deed7009b2e6dd5a | [
"MIT"
] | 9 | 2021-05-09T22:30:42.000Z | 2021-12-27T19:42:56.000Z | test/rlai/gpi/monte_carlo/iteration_test.py | MatthewGerber/rlai | f390433c3adc285e1e9cc113deed7009b2e6dd5a | [
"MIT"
] | 13 | 2020-11-18T03:30:39.000Z | 2021-12-12T04:19:16.000Z | test/rlai/gpi/monte_carlo/iteration_test.py | MatthewGerber/rlai | f390433c3adc285e1e9cc113deed7009b2e6dd5a | [
"MIT"
] | 1 | 2021-06-24T16:48:59.000Z | 2021-06-24T16:48:59.000Z | import os
import pickle
import tempfile
import time
from threading import Thread
import pytest
from numpy.random import RandomState
from rlai.agents.mdp import StochasticMdpAgent
from rlai.environments.gridworld import Gridworld, GridworldFeatureExtractor
from rlai.environments.mdp import TrajectorySamplingMdpPlannin... | 31.30721 | 136 | 0.705717 |
79486c6e45022e1d6d75239d4b1e58f9e1ef45bf | 2,035 | py | Python | dedomeno/houses/migrations/0084_room.py | ginopalazzo/dedomeno | e43df365849102016c8819b2082d2cde9109360f | [
"MIT"
] | 38 | 2018-03-19T12:52:17.000Z | 2022-02-17T14:45:57.000Z | dedomeno/houses/migrations/0084_room.py | ginopalazzo/dedomeno | e43df365849102016c8819b2082d2cde9109360f | [
"MIT"
] | 7 | 2020-02-11T23:01:40.000Z | 2020-08-06T13:30:58.000Z | dedomeno/houses/migrations/0084_room.py | ginopalazzo/dedomeno | e43df365849102016c8819b2082d2cde9109360f | [
"MIT"
] | 12 | 2019-02-23T22:10:34.000Z | 2022-03-24T12:01:38.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-08 17:34
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('houses', '0083_auto_20170108_1208'),
]
operations ... | 47.325581 | 194 | 0.606388 |
79486de21fd08e9dfa2b2a725aca619153eefb17 | 330 | py | Python | jd/api/rest/KplOpenKeplerCartUncheckskuRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 5 | 2019-10-30T01:16:30.000Z | 2020-06-14T03:32:19.000Z | jd/api/rest/KplOpenKeplerCartUncheckskuRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 2 | 2020-10-12T07:12:48.000Z | 2021-06-02T03:15:47.000Z | jd/api/rest/KplOpenKeplerCartUncheckskuRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 3 | 2019-12-06T17:33:49.000Z | 2021-03-01T13:24:22.000Z | from jd.api.base import RestApi
class KplOpenKeplerCartUncheckskuRequest(RestApi):
def __init__(self,domain='gw.api.360buy.com',port=80):
RestApi.__init__(self,domain, port)
self.commlist = None
self.userid = None
self.locationid = None
def getapiname(self):
return 'jd.kpl.open.kepler.cart.unchecks... | 18.333333 | 56 | 0.733333 |
79486f972430e6e4954e4cba8de54e5a7dc5340d | 14,474 | py | Python | blender/arm/exporter_opt.py | ValtoGameEngines/Armory | ad3d3c63e64e9225e62b414b7ec4dd9fb93fab32 | [
"Zlib"
] | 1 | 2020-09-08T08:38:04.000Z | 2020-09-08T08:38:04.000Z | blender/arm/exporter_opt.py | ValtoGameEngines/Armory | ad3d3c63e64e9225e62b414b7ec4dd9fb93fab32 | [
"Zlib"
] | null | null | null | blender/arm/exporter_opt.py | ValtoGameEngines/Armory | ad3d3c63e64e9225e62b414b7ec4dd9fb93fab32 | [
"Zlib"
] | 1 | 2020-06-29T07:54:21.000Z | 2020-06-29T07:54:21.000Z | import bpy
import numpy as np
from mathutils import *
import arm.utils
# Exports smaller geometry but is slower
# To be replaced with https://github.com/zeux/meshoptimizer
class Vertex:
__slots__ = ("co", "normal", "uvs", "col", "loop_indices", "index", "bone_weights", "bone_indices", "bone_count", "vert... | 38.80429 | 198 | 0.529778 |
794870e5d6c6b435787fecefa77587db9259f304 | 10,245 | py | Python | gluoncv/model_zoo/shufflenet.py | RafLit/gluon-cv | dae504a4de8fff1421fd4fe398accbe396c504cc | [
"Apache-2.0"
] | 1 | 2022-03-29T12:59:51.000Z | 2022-03-29T12:59:51.000Z | gluoncv/model_zoo/shufflenet.py | RafLit/gluon-cv | dae504a4de8fff1421fd4fe398accbe396c504cc | [
"Apache-2.0"
] | null | null | null | gluoncv/model_zoo/shufflenet.py | RafLit/gluon-cv | dae504a4de8fff1421fd4fe398accbe396c504cc | [
"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 u... | 44.543478 | 181 | 0.652904 |
7948716cac2b5ca107e700ec1400b82288fa2deb | 536 | py | Python | setup.py | csullivannet/buffer | caa2b5e16dc21623fd52735cc79e0f45d63fdead | [
"MIT"
] | null | null | null | setup.py | csullivannet/buffer | caa2b5e16dc21623fd52735cc79e0f45d63fdead | [
"MIT"
] | 8 | 2021-04-10T00:33:46.000Z | 2021-04-12T00:16:55.000Z | setup.py | csullivannet/buffer | caa2b5e16dc21623fd52735cc79e0f45d63fdead | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(
name="diagnose",
version="1.0",
author="Christopher Sullivan",
author_email="csullivannet@users.noreply.github.com",
description="Diagnoses issues with pods running on a kubernetes cluster",
packages=setuptools.find_packages(),
entry_points={"console_scri... | 31.529412 | 77 | 0.675373 |
794871a0c5099f775a131f1f0e20f60da7a98e8f | 93 | py | Python | refex/errors.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | null | null | null | refex/errors.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | null | null | null | refex/errors.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | null | null | null | class RefExError(ValueError):
pass
class AmbiguousReferenceError(RefExError):
pass
| 13.285714 | 42 | 0.763441 |
794871ba5c1c0b5057e0a8ec77ce36bb03851754 | 6,335 | py | Python | python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_bf16_mkldnn_op.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_bf16_mkldnn_op.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/mkldnn/test_pool2d_bf16_mkldnn_op.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-09-24T11:23:36.000Z | 2021-09-24T11:23:36.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 31.994949 | 110 | 0.623678 |
7948720e84b78526e5e70515d37bbf49ee5ce19a | 2,101 | py | Python | py2jdbc/__init__.py | swstephe/py2jdbc | 515d06a48e54ca9f690f94fd795e49ba7758fcd4 | [
"MIT-0"
] | 9 | 2018-12-28T12:42:21.000Z | 2021-11-10T10:55:48.000Z | py2jdbc/__init__.py | swstephe/py2jdbc | 515d06a48e54ca9f690f94fd795e49ba7758fcd4 | [
"MIT-0"
] | 8 | 2018-12-26T10:01:51.000Z | 2021-11-25T01:52:11.000Z | py2jdbc/__init__.py | swstephe/py2jdbc | 515d06a48e54ca9f690f94fd795e49ba7758fcd4 | [
"MIT-0"
] | 1 | 2019-09-24T15:12:35.000Z | 2019-09-24T15:12:35.000Z | # -*- coding: utf8 -*-
from py2jdbc.dbi import (
apilevel,
threadsafety,
paramstyle,
ARRAY,
BIGINT,
BINARY,
BIT,
BLOB,
BOOLEAN,
CHAR,
CLOB,
DATALINK,
DATE,
DECIMAL,
DISTINCT,
DOUBLE,
FLOAT,
INTEGER,
JAVA_OBJECT,
LONGNVARCHAR,
LONGVARBI... | 14.900709 | 38 | 0.553546 |
79487284c043e31677621fc3e79ac1555ae43c8c | 150 | py | Python | flask_oauthlib/contrib/client/exceptions.py | PCMan/flask-oauthlib | 3735210211ac0e50c4d32b887bbd61722dd175c7 | [
"BSD-3-Clause"
] | 1,292 | 2015-01-04T03:20:35.000Z | 2022-03-23T11:08:15.000Z | flask_oauthlib/contrib/client/exceptions.py | PCMan/flask-oauthlib | 3735210211ac0e50c4d32b887bbd61722dd175c7 | [
"BSD-3-Clause"
] | 217 | 2015-01-05T09:51:41.000Z | 2020-09-05T04:41:52.000Z | flask_oauthlib/contrib/client/exceptions.py | PCMan/flask-oauthlib | 3735210211ac0e50c4d32b887bbd61722dd175c7 | [
"BSD-3-Clause"
] | 496 | 2015-01-04T03:20:35.000Z | 2022-03-19T08:31:42.000Z | __all__ = ['OAuthException', 'AccessTokenNotFound']
class OAuthException(Exception):
pass
class AccessTokenNotFound(OAuthException):
pass
| 15 | 51 | 0.76 |
7948730671953d1af6efd33761dfe6dffe6f8bf6 | 13,999 | py | Python | tests/strings_test.py | mathdan/vaex | 16e91add76d2570f2f976e5936d8e4721ea3dd16 | [
"MIT"
] | 1 | 2019-06-05T00:10:36.000Z | 2019-06-05T00:10:36.000Z | tests/strings_test.py | alimcmaster1/vaex | 7043df824cd8915b2cca773854023bb10b5ef538 | [
"MIT"
] | 1 | 2019-06-03T21:25:01.000Z | 2019-06-03T21:25:01.000Z | tests/strings_test.py | mathdan/vaex | 16e91add76d2570f2f976e5936d8e4721ea3dd16 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import re
import vaex
import numpy as np
import pytest
try:
unicode
str_kind = 'S'
except:
str_kind = 'U'
@pytest.mark.skipif(sys.version_info < (3,3),
reason="requires python3.4 or higher")
def test_dtype_object_string(tmpdir):
x = np.arange(8,12)
s = np.... | 40.111748 | 280 | 0.688978 |
7948737c85f3ca06ee4c0ab28b541197bee0405c | 17,737 | py | Python | src/multihead_attention.py | a414351664/TRAB-IKE | 3dd07221e1854c974127d7f6d0d95779a25166c0 | [
"MIT"
] | 1 | 2021-06-03T10:22:07.000Z | 2021-06-03T10:22:07.000Z | src/multihead_attention.py | LibertFan/EKI-BART | b822384cf9d4aa9adda46f7f306c024782fa5f15 | [
"MIT"
] | null | null | null | src/multihead_attention.py | LibertFan/EKI-BART | b822384cf9d4aa9adda46f7f306c024782fa5f15 | [
"MIT"
] | null | null | null | import math
import torch
from torch import nn
from torch.nn import Parameter
import torch.nn.functional as F
from fairseq import utils
def Embedding(num_embeddings, embedding_dim, padding_idx=None, init_scale=None):
m = nn.Embedding(num_embeddings, embedding_dim, padding_idx=padding_idx)
nn.init.normal_(m.we... | 44.677582 | 140 | 0.611208 |
794873c8b74607ff71092388f155d5b0e53c1eca | 5,028 | py | Python | src/PlotGrids.py | LukeMcCulloch/PyCFD | 6720e6575e25f8c274ef591d6c215de90a740935 | [
"MIT"
] | 1 | 2020-07-04T15:42:15.000Z | 2020-07-04T15:42:15.000Z | src/PlotGrids.py | LukeMcCulloch/PyCFD | 6720e6575e25f8c274ef591d6c215de90a740935 | [
"MIT"
] | null | null | null | src/PlotGrids.py | LukeMcCulloch/PyCFD | 6720e6575e25f8c274ef591d6c215de90a740935 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 5 16:04:47 2020
@author: lukemcculloch
"""
import numpy as np
# imports for plotting:
import matplotlib.pyplot as plt
class PlotGrid(object):
def __init__(self, grid):
self.grid = grid
def plot_cells(self, canva... | 29.063584 | 73 | 0.380072 |
794873d4278049da9787f828b1a122a0907f6cf0 | 32,014 | py | Python | glance/tests/unit/common/test_wsgi.py | petrutlucian94/glance | fb2c2e7de1bc4fd4eead3632de9358d1a7037c9f | [
"Apache-2.0"
] | null | null | null | glance/tests/unit/common/test_wsgi.py | petrutlucian94/glance | fb2c2e7de1bc4fd4eead3632de9358d1a7037c9f | [
"Apache-2.0"
] | null | null | null | glance/tests/unit/common/test_wsgi.py | petrutlucian94/glance | fb2c2e7de1bc4fd4eead3632de9358d1a7037c9f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2010-2011 OpenStack Foundation
# Copyright 2014 IBM Corp.
# 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:... | 39.572311 | 80 | 0.614231 |
7948776eb00a77a3ee28880d53d84f3c919dd023 | 631 | py | Python | api/topic.py | qianbin01/lagou_python_api | 84c0d21cd6a2296efb974dbf7c07cc074106d799 | [
"MIT"
] | 8 | 2018-09-10T06:30:56.000Z | 2021-03-11T19:16:32.000Z | api/topic.py | qianbin01/lagou_python_api | 84c0d21cd6a2296efb974dbf7c07cc074106d799 | [
"MIT"
] | null | null | null | api/topic.py | qianbin01/lagou_python_api | 84c0d21cd6a2296efb974dbf7c07cc074106d799 | [
"MIT"
] | 5 | 2018-10-12T12:37:16.000Z | 2020-05-16T03:17:40.000Z | import models.topic as topic
from flask import Blueprint, jsonify, request
topic_blue_print = Blueprint('topic', __name__)
status = {
'msg': '请求成功',
'code': 1000
}
topic_doc = topic.get_topic_count()
@topic_blue_print.route('/lists')
def lists():
page = request.args.get('page')
topic_doc['index'] = p... | 23.37037 | 77 | 0.654517 |
7948782479b7f6cb8e90694b8c1f1d59fd2263a9 | 15,683 | py | Python | homeassistant/components/template/light.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 4 | 2016-12-23T10:36:36.000Z | 2021-04-22T12:38:16.000Z | homeassistant/components/template/light.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/template/light.py | jasperro/core | 26d7b2164e8a971506790ae5af06f31abdf278b5 | [
"Apache-2.0"
] | 1 | 2020-03-07T10:43:50.000Z | 2020-03-07T10:43:50.000Z | """Support for Template lights."""
import logging
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_HS_COLOR,
ENTITY_ID_FORMAT,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_COLOR_TEMP,
Light,
)
from homeassistant.const import (
... | 33.945887 | 86 | 0.603583 |
794878bb92267289cfea7181bfd87ed03e684ab0 | 258 | py | Python | doc/groktut/a_view_for_a_model2/src/sample/app.py | zopefoundation/groktoolkit | 6d295997510139b0588b2401d5f54fca8234a15e | [
"ZPL-2.1"
] | 2 | 2015-12-05T05:46:55.000Z | 2017-07-03T17:39:32.000Z | doc/groktut/a_view_for_a_model2/src/sample/app.py | zopefoundation/groktoolkit | 6d295997510139b0588b2401d5f54fca8234a15e | [
"ZPL-2.1"
] | 7 | 2017-07-06T15:07:31.000Z | 2021-04-20T14:38:21.000Z | doc/groktut/a_view_for_a_model2/src/sample/app.py | zopefoundation/groktoolkit | 6d295997510139b0588b2401d5f54fca8234a15e | [
"ZPL-2.1"
] | 2 | 2016-03-20T18:03:15.000Z | 2018-01-11T04:33:40.000Z | import grok
class Sample(grok.Application, grok.Container):
def information(self):
return "This is important information!"
class Index(grok.View):
def reversed_information(self):
return ''.join(reversed(self.context.information()))
| 25.8 | 60 | 0.713178 |
794878e99fe131c991195ea18fc24da22367f6bb | 28,923 | py | Python | cloudvolume/frontends/precomputed.py | SridharJagannathan/cloud-volume | ae4e5d8f245aacf451404e91f75e6da5182ac090 | [
"BSD-3-Clause"
] | 1 | 2021-02-12T12:15:33.000Z | 2021-02-12T12:15:33.000Z | cloudvolume/frontends/precomputed.py | SridharJagannathan/cloud-volume | ae4e5d8f245aacf451404e91f75e6da5182ac090 | [
"BSD-3-Clause"
] | null | null | null | cloudvolume/frontends/precomputed.py | SridharJagannathan/cloud-volume | ae4e5d8f245aacf451404e91f75e6da5182ac090 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import itertools
import gevent.socket
import json
import os
import sys
import uuid
import socket
import fastremap
from six.moves import range
import numpy as np
from tqdm import tqdm
from six import string_types
import multiprocessing as mp
from .. import lib
from ..cacheservice... | 30.834755 | 98 | 0.685095 |
794878eb395b07b22b3fa9104adfcb208ec0f2f0 | 5,235 | py | Python | third_party/gsutil/gslib/commands/setcors.py | bdero/depot_tools | 685577439cbf9cb8c660e3da39bdcbb64c197c95 | [
"BSD-3-Clause"
] | 45 | 2015-10-12T10:02:11.000Z | 2021-12-14T07:10:47.000Z | third_party/gsutil/gslib/commands/setcors.py | bdero/depot_tools | 685577439cbf9cb8c660e3da39bdcbb64c197c95 | [
"BSD-3-Clause"
] | 1 | 2019-01-14T00:36:35.000Z | 2019-01-14T00:36:35.000Z | third_party/gsutil/gslib/commands/setcors.py | bdero/depot_tools | 685577439cbf9cb8c660e3da39bdcbb64c197c95 | [
"BSD-3-Clause"
] | 38 | 2016-06-25T05:57:35.000Z | 2021-12-30T04:58:10.000Z | # Copyright 2012 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.856164 | 79 | 0.696657 |
79487929ec8acb89278a89ad1e58d8fb20b83249 | 2,799 | py | Python | pdf/utils/utils.py | nightohl/phoneypdf | 5edf945f33d8d775409dfea89462b5cb8bbddeff | [
"BSD-3-Clause"
] | 16 | 2015-03-04T15:27:21.000Z | 2021-08-10T01:22:13.000Z | pdf/utils/utils.py | nightohl/phoneypdf | 5edf945f33d8d775409dfea89462b5cb8bbddeff | [
"BSD-3-Clause"
] | null | null | null | pdf/utils/utils.py | nightohl/phoneypdf | 5edf945f33d8d775409dfea89462b5cb8bbddeff | [
"BSD-3-Clause"
] | 5 | 2015-10-12T08:52:11.000Z | 2021-09-15T06:38:13.000Z | import re
from constants import *
def CopyWithoutWhiteSpace(content):
result = []
for token in content:
if token[0] != CHAR_WHITESPACE:
result.append(token)
return result
def Obj2Str(content):
return ''.join(map(lambda x: repr(x[1])[1:-1], CopyWithoutWhiteSpace(content)))
def IsNu... | 28.272727 | 96 | 0.582351 |
79487a100202f038a5808f0bc28a8dc24080f807 | 13,572 | py | Python | cdna-detector.py | rheinbaylab/cDNA-detector | 72c9415cea8568c11edf696542b8baa967e392ec | [
"BSD-3-Clause"
] | 1 | 2021-07-30T06:42:23.000Z | 2021-07-30T06:42:23.000Z | cdna-detector.py | rheinbaylab/cDNA-detector | 72c9415cea8568c11edf696542b8baa967e392ec | [
"BSD-3-Clause"
] | null | null | null | cdna-detector.py | rheinbaylab/cDNA-detector | 72c9415cea8568c11edf696542b8baa967e392ec | [
"BSD-3-Clause"
] | 1 | 2021-08-23T20:33:07.000Z | 2021-08-23T20:33:07.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import argparse
import os
import sys
import re
from argparse import RawTextHelpFormatter
def get_script_path():
return os.path.dirname(os.path.realpath(sys.argv[0]))
def prepare(args):
from scripts.prepare import step1
from scripts.prepare import global_para
global... | 75.821229 | 411 | 0.768273 |
79487b1f6bfd3027a29821b3732ea0a323e2c785 | 314 | py | Python | flavorsync/parser/xml/xml_parser.py | Fiware/ops.Flavor-sync | d4f3eb1ff3a76eb824b327f5b23632f09ebf2cda | [
"Apache-2.0"
] | null | null | null | flavorsync/parser/xml/xml_parser.py | Fiware/ops.Flavor-sync | d4f3eb1ff3a76eb824b327f5b23632f09ebf2cda | [
"Apache-2.0"
] | null | null | null | flavorsync/parser/xml/xml_parser.py | Fiware/ops.Flavor-sync | d4f3eb1ff3a76eb824b327f5b23632f09ebf2cda | [
"Apache-2.0"
] | null | null | null | from flavorsync.parser.parser import Parser
from lxml import etree
from lxml import objectify
class XMLParser(Parser):
def __init__(self):
self.xml = ""
self.dict = {}
def _remove_xml_namespaces(self):
objectify.deannotate(self.xml)
etree.cleanup_namespaces(self.xml) | 24.153846 | 43 | 0.684713 |
79487b2a7975d4287682db99438c41888d9dc4e2 | 10,187 | py | Python | test/ext/test_horizontal_shard.py | lgo/sqlalchemy | eea048ff28751d4a3553c4c8e0bcca005065dcfc | [
"MIT"
] | null | null | null | test/ext/test_horizontal_shard.py | lgo/sqlalchemy | eea048ff28751d4a3553c4c8e0bcca005065dcfc | [
"MIT"
] | null | null | null | test/ext/test_horizontal_shard.py | lgo/sqlalchemy | eea048ff28751d4a3553c4c8e0bcca005065dcfc | [
"MIT"
] | null | null | null | import datetime
import os
from sqlalchemy import *
from sqlalchemy import event
from sqlalchemy import sql, util
from sqlalchemy.orm import *
from sqlalchemy.ext.horizontal_shard import ShardedSession
from sqlalchemy.sql import operators
from sqlalchemy.testing import fixtures
from sqlalchemy.testing.engines import tes... | 33.843854 | 76 | 0.579268 |
79487b7c7daf01fb4706740beeff1602391efe90 | 706 | py | Python | setup.py | cyber-raskolnikov/bertviz | 4f4b170c17a2e63b46c73be7ee729e9dcce54ec1 | [
"Apache-2.0"
] | null | null | null | setup.py | cyber-raskolnikov/bertviz | 4f4b170c17a2e63b46c73be7ee729e9dcce54ec1 | [
"Apache-2.0"
] | null | null | null | setup.py | cyber-raskolnikov/bertviz | 4f4b170c17a2e63b46c73be7ee729e9dcce54ec1 | [
"Apache-2.0"
] | null | null | null | import pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup(
name="bertviz",
version="1.4.0",
description="Attention visualizati... | 30.695652 | 112 | 0.70255 |
79487c38c8ae934612d4a06df21192d727ed8774 | 1,270 | py | Python | thefuck/rules/whois.py | Archstacker/thefuck | ebe53f0d181c28ec2f7a86f46d7d51a7d48bbd9e | [
"MIT"
] | 1 | 2021-05-08T23:24:17.000Z | 2021-05-08T23:24:17.000Z | thefuck/rules/whois.py | Archstacker/thefuck | ebe53f0d181c28ec2f7a86f46d7d51a7d48bbd9e | [
"MIT"
] | null | null | null | thefuck/rules/whois.py | Archstacker/thefuck | ebe53f0d181c28ec2f7a86f46d7d51a7d48bbd9e | [
"MIT"
] | 1 | 2021-06-21T09:01:08.000Z | 2021-06-21T09:01:08.000Z | # -*- encoding: utf-8 -*-
from six.moves.urllib.parse import urlparse
def match(command, settings):
"""
What the `whois` command returns depends on the 'Whois server' it contacted
and is not consistent through different servers. But there can be only two
types of errors I can think of with `whois`:
... | 38.484848 | 79 | 0.643307 |
79487ce616bcbd6376870598ff35408df1b72e26 | 11,373 | py | Python | src/handler.py | ManyRaptors/lykos | 1359b7435b070fd8ecab32ccc5b92722098165f2 | [
"BSD-2-Clause"
] | null | null | null | src/handler.py | ManyRaptors/lykos | 1359b7435b070fd8ecab32ccc5b92722098165f2 | [
"BSD-2-Clause"
] | null | null | null | src/handler.py | ManyRaptors/lykos | 1359b7435b070fd8ecab32ccc5b92722098165f2 | [
"BSD-2-Clause"
] | null | null | null | # The bot commands implemented in here are present no matter which module is loaded
import base64
import socket
import sys
import threading
import time
import traceback
import functools
import botconfig
import src.settings as var
from src import decorators, wolfgame, events, channels, hooks, users, errlog as log, str... | 38.292929 | 131 | 0.621736 |
79487cebe6f17d3be0cc2debe1c694640e3d3f56 | 5,952 | py | Python | zvmsdk/tests/unit/test_networkops.py | jichenjc/python-zvm-sdk | c081805c6079107b4823af898babdf92cf5577ee | [
"Apache-2.0"
] | null | null | null | zvmsdk/tests/unit/test_networkops.py | jichenjc/python-zvm-sdk | c081805c6079107b4823af898babdf92cf5577ee | [
"Apache-2.0"
] | null | null | null | zvmsdk/tests/unit/test_networkops.py | jichenjc/python-zvm-sdk | c081805c6079107b4823af898babdf92cf5577ee | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 IBM Corp.
#
# 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 ... | 50.440678 | 80 | 0.579637 |
79487cef795b3b05a7ec6da869b93b6ed4124c30 | 6,430 | py | Python | deprecated_nets/net_focal.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | 1 | 2022-02-24T20:39:46.000Z | 2022-02-24T20:39:46.000Z | deprecated_nets/net_focal.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | deprecated_nets/net_focal.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | 4 | 2020-02-18T09:25:20.000Z | 2021-11-20T23:52:29.000Z | # -*- coding: utf-8 -*-
"""
This module implements the class StandardNetwork.
StandardNetwork creates a ring network as defined in Santhakumar et al. 2005
with some changes as in Yim et al. 2015.
See StandardNetwork docstring for details.
Created on Tue Nov 28 13:01:38 2017
@author: DanielM
"""
from neuron import h, ... | 45.928571 | 98 | 0.494712 |
79487ea03abce6670e8d67a0190d2b23885b6b09 | 484 | py | Python | apps/controllerx/cx_core/action_type/scene_action_type.py | xaviml/z2m_ikea_controller | e612af5a913e8b4784dcaa23ea5319115427d083 | [
"MIT"
] | 19 | 2019-11-21T19:51:40.000Z | 2020-01-14T09:24:33.000Z | apps/controllerx/cx_core/action_type/scene_action_type.py | xaviml/z2m_ikea_controller | e612af5a913e8b4784dcaa23ea5319115427d083 | [
"MIT"
] | 11 | 2019-11-20T16:43:35.000Z | 2020-01-17T16:23:06.000Z | apps/controllerx/cx_core/action_type/scene_action_type.py | xaviml/z2m_ikea_controller | e612af5a913e8b4784dcaa23ea5319115427d083 | [
"MIT"
] | 5 | 2019-12-20T21:31:07.000Z | 2020-01-06T18:49:52.000Z | from typing import Any, Optional
from cx_core.action_type.base import ActionType
from cx_core.integration import EventData
class SceneActionType(ActionType):
scene: str
def initialize(self, **kwargs: Any) -> None:
self.scene = kwargs["scene"]
async def run(self, extra: Optional[EventData] = Non... | 26.888889 | 81 | 0.698347 |
79487fb0bbd3bbc063df9ae6b52c149cf2402698 | 2,448 | py | Python | userbot/utils/tools.py | techyminati/ProjectFizilion | 2a7a63519b93fb9e424377500cf4fdded6408bfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 77 | 2020-02-09T19:23:30.000Z | 2021-12-21T16:13:43.000Z | userbot/utils/tools.py | techyminati/ProjectFizilion | 2a7a63519b93fb9e424377500cf4fdded6408bfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 20 | 2020-03-23T15:22:09.000Z | 2021-09-28T09:30:54.000Z | userbot/utils/tools.py | techyminati/ProjectFizilion | 2a7a63519b93fb9e424377500cf4fdded6408bfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1,011 | 2020-02-01T10:04:35.000Z | 2022-03-26T13:08:07.000Z | # Copyright (C) 2019 Adek Maulana
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
import re
import hashlib
from telethon.tl.types import DocumentAttributeFilename
async def md5(fname: str) -> str:
hash_md5 = ha... | 27.818182 | 78 | 0.557598 |
79488020c71ba7a0abc2a63cef22c737c0d48e0c | 752 | py | Python | opencanary/iphelper.py | p1r473/opencanary | 516cd80e1f21179e87f114356215a1df6ecf9774 | [
"BSD-3-Clause"
] | 1,412 | 2015-08-06T03:54:37.000Z | 2022-03-29T07:30:54.000Z | opencanary/iphelper.py | p1r473/opencanary | 516cd80e1f21179e87f114356215a1df6ecf9774 | [
"BSD-3-Clause"
] | 170 | 2015-08-11T00:33:06.000Z | 2022-03-30T05:11:38.000Z | opencanary/iphelper.py | p1r473/opencanary | 516cd80e1f21179e87f114356215a1df6ecf9774 | [
"BSD-3-Clause"
] | 297 | 2015-08-17T09:25:41.000Z | 2022-03-31T08:25:41.000Z | import struct
import socket
def ip2int(addr):
"""
Convert an IP in string format to decimal format
"""
return struct.unpack("!I", socket.inet_aton(addr))[0]
def check_ip(ip, network_range):
"""
Test if the IP is in range
Range is expected to be in CIDR notation format. If no MASK is
... | 22.117647 | 73 | 0.599734 |
7948805f24dc955c83b98f705e15daa05cb1126c | 676 | py | Python | users/forms.py | Syntaxii/Sosa-local | 7c9ed939c11cae92cb78028c06b51682f1cf50e6 | [
"MIT"
] | 3 | 2018-11-15T00:47:31.000Z | 2018-11-27T20:57:57.000Z | users/forms.py | Syntaxii/Sosa-local | 7c9ed939c11cae92cb78028c06b51682f1cf50e6 | [
"MIT"
] | 7 | 2020-06-06T02:01:59.000Z | 2022-02-10T15:09:16.000Z | users/forms.py | Syntaxii/Sosa-local | 7c9ed939c11cae92cb78028c06b51682f1cf50e6 | [
"MIT"
] | null | null | null | from django import forms
from pages import models
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from .models import CustomUser
class CustomUserCreationForm(UserCreationForm):
class Meta(UserCreationForm.Meta):
model = CustomUser
fields = ('email', 'username',)
class Cust... | 28.166667 | 110 | 0.680473 |
794880624067d3f2afb6326fed151a7683b316a1 | 5,655 | py | Python | experiment/code - old/rsft-gain-loss-experiment-master/mpl/config.py | JanaJarecki/Goals-and-experience | 4946999f971abb6b7986eedafed4bb29e36f1d0e | [
"MIT"
] | 1 | 2021-11-02T10:21:16.000Z | 2021-11-02T10:21:16.000Z | experiment/code - old/rsft-gain-loss-experiment-master/mpl/config.py | JanaJarecki/Goals-and-experience | 4946999f971abb6b7986eedafed4bb29e36f1d0e | [
"MIT"
] | null | null | null | experiment/code - old/rsft-gain-loss-experiment-master/mpl/config.py | JanaJarecki/Goals-and-experience | 4946999f971abb6b7986eedafed4bb29e36f1d0e | [
"MIT"
] | 1 | 2021-11-02T10:21:22.000Z | 2021-11-02T10:21:22.000Z | # <imports>
from otree.api import Currency as c
from otree.constants import BaseConstants
# </imports>
# ******************************************************************************************************************** #
# *** CLASS CONSTANTS *** #
# ****************************************************************... | 55.441176 | 120 | 0.586914 |
794880bd7c9d1bfe5ce13943dcf142a965006f31 | 5,316 | py | Python | jtnn/jtmpn.py | alvin-hsu/icml18-jtnn | da024c7fe6d56d61ec4e0fa30ad175f4e54ef1e5 | [
"MIT"
] | 5 | 2018-04-09T03:02:28.000Z | 2019-03-20T06:08:28.000Z | jtnn/jtmpn.py | cyclone923/jtvae | 0292265bb97c31a925a03b18a3d3b38c560c89c6 | [
"MIT"
] | 1 | 2021-03-31T08:30:23.000Z | 2021-03-31T08:30:23.000Z | jtnn/jtmpn.py | kamikaze0923/jtvae | 0292265bb97c31a925a03b18a3d3b38c560c89c6 | [
"MIT"
] | 2 | 2020-02-29T05:15:08.000Z | 2020-02-29T19:23:38.000Z | import torch
import torch.nn as nn
from .nnutils import create_var, index_select_ND
from .chemutils import get_mol
#from mpn import atom_features, bond_features, ATOM_FDIM, BOND_FDIM
import rdkit.Chem as Chem
ELEM_LIST = ['C', 'N', 'O', 'S', 'F', 'Si', 'P', 'Cl', 'Br', 'Mg', 'Na', 'Ca', 'Fe', 'Al', 'I', 'B', 'K', 'Se'... | 38.244604 | 184 | 0.569037 |
794880c6b08068f326ee6775f22957e220bd764c | 2,482 | py | Python | Python Games/Colour Game in python Gui.py | lazydinoz/HackFest21 | 84bfbfbb2c75a6511226a87d2e947984db878ba1 | [
"MIT"
] | 6 | 2022-01-01T17:12:32.000Z | 2022-02-22T07:42:57.000Z | Python Games/Colour Game in python Gui.py | lazydinoz/HackFest21 | 84bfbfbb2c75a6511226a87d2e947984db878ba1 | [
"MIT"
] | 95 | 2021-10-21T21:16:28.000Z | 2021-11-02T13:32:00.000Z | Python Games/Colour Game in python Gui.py | lazydinoz/HackFest21 | 84bfbfbb2c75a6511226a87d2e947984db878ba1 | [
"MIT"
] | 25 | 2021-10-03T07:21:58.000Z | 2021-10-31T15:31:18.000Z | # import the modules
import tkinter
import random
# list of possible colour.
colours = ['Red','Blue','Green','Pink','Black',
'Yellow','Orange','White','Purple','Brown']
score = 0
# the game time left, initially 30 seconds.
timeleft = 30
# function that will start the game.
def startGame(event):
if timeleft == 3... | 20.016129 | 63 | 0.67083 |
794880f14a683e629c74c76f09884b014cbc846d | 6,210 | py | Python | test/server_tests.py | pmandera/snaut | 19f32b204e6fbaf5162f5f788d2128e769bccdb2 | [
"Apache-2.0"
] | 2 | 2016-04-27T14:00:23.000Z | 2019-06-24T16:08:43.000Z | test/server_tests.py | pmandera/snaut | 19f32b204e6fbaf5162f5f788d2128e769bccdb2 | [
"Apache-2.0"
] | null | null | null | test/server_tests.py | pmandera/snaut | 19f32b204e6fbaf5162f5f788d2128e769bccdb2 | [
"Apache-2.0"
] | 1 | 2019-06-25T20:15:02.000Z | 2019-06-25T20:15:02.000Z | from configparser import RawConfigParser
import snaut.snaut as snaut
import unittest
import json
import csv
import io
from example_space import example_semspace
class SnautTestCase(unittest.TestCase):
def setUp(self):
conf = RawConfigParser()
conf.add_section('semantic_space')
conf.set('... | 37.409639 | 78 | 0.571014 |
7948814ac614bf86596f3c8684099ea1804c1be9 | 1,807 | py | Python | self_supervision/embedding_reducer.py | Viole-Grace/AdNAN | b21fb781b363f03d49b0de5744f732e0d5c4c42e | [
"Apache-2.0"
] | 1 | 2020-02-02T11:21:49.000Z | 2020-02-02T11:21:49.000Z | self_supervision/embedding_reducer.py | Viole-Grace/AdNAN | b21fb781b363f03d49b0de5744f732e0d5c4c42e | [
"Apache-2.0"
] | null | null | null | self_supervision/embedding_reducer.py | Viole-Grace/AdNAN | b21fb781b363f03d49b0de5744f732e0d5c4c42e | [
"Apache-2.0"
] | null | null | null | import umap
class EmbeddingReducer:
"""
Class to convert high dimensional embeddings into lower dimensional embeddings.
Current implementation uses only UMAP to do so
@TODO:
- add t-SNE mode
- add isomap mode
- add locally linear embedding mode
"""
... | 36.14 | 176 | 0.614831 |
794881c75a86937d68af0dcac474af498222b631 | 294 | py | Python | socket/echo_client.py | LaurenceYang/learn-python | 819994039abd3af298f73b1a73976eaa95071096 | [
"Apache-2.0"
] | 12 | 2017-10-01T00:20:37.000Z | 2017-10-02T10:42:18.000Z | socket/echo_client.py | LaurenceYang/learn-python | 819994039abd3af298f73b1a73976eaa95071096 | [
"Apache-2.0"
] | null | null | null | socket/echo_client.py | LaurenceYang/learn-python | 819994039abd3af298f73b1a73976eaa95071096 | [
"Apache-2.0"
] | null | null | null | import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# 建立连接:
s.connect(('127.0.0.1', 9999))
# 接收欢迎消息:
print(s.recv(1024).decode('utf-8'))
for data in [b'Michael', b'Tracy', b'Sarah']:
# 发送数据:
s.send(data)
print(s.recv(1024).decode('utf-8'))
s.send(b'exit')
s.close() | 22.615385 | 53 | 0.642857 |
794885b67a539c8b02a13d477e425428aed33209 | 3,587 | py | Python | lib/invoke_tasks.py | thesmarthomeninja/Video_Gaming_ML | e9c147f33a790a9cd3e4ee631ddbf6bbf91c3921 | [
"MIT"
] | null | null | null | lib/invoke_tasks.py | thesmarthomeninja/Video_Gaming_ML | e9c147f33a790a9cd3e4ee631ddbf6bbf91c3921 | [
"MIT"
] | 4 | 2020-09-25T22:39:46.000Z | 2022-02-09T23:39:43.000Z | lib/invoke_tasks.py | AsimKhan2019/Serpent-AI | e9c147f33a790a9cd3e4ee631ddbf6bbf91c3921 | [
"MIT"
] | null | null | null | from invoke import task
from lib.frame_grabber import FrameGrabber
from lib.games import *
import lib.datasets
from lib.machine_learning.context_classification.context_classifiers import SVMContextClassifier
from lib.machine_learning.context_classification.context_classifiers import CNNInceptionV3ContextClassifier
... | 26.375 | 107 | 0.706719 |
794886d947c77a5b1c014a6465a523d9bc3ae40e | 168 | py | Python | helloworld/stock.py | SeungmanLee/pythonPractice | 791b41471167b22108e5fb8a0f06489f85a12da2 | [
"MIT"
] | null | null | null | helloworld/stock.py | SeungmanLee/pythonPractice | 791b41471167b22108e5fb8a0f06489f85a12da2 | [
"MIT"
] | null | null | null | helloworld/stock.py | SeungmanLee/pythonPractice | 791b41471167b22108e5fb8a0f06489f85a12da2 | [
"MIT"
] | null | null | null | def cal_upper(price):
offset = price * 0.3
return price + offset
def cal_lower(price):
offset = price * 0.3
return price - offset
author = "Pystock"
| 15.272727 | 25 | 0.636905 |
7948874b4f51aea3922d8601e9bdaf9cdce889ce | 5,045 | py | Python | dictionary.py | flav-io/flavio-eos | 98fd95c0599c924feb7155feb3fb8505623bee65 | [
"MIT"
] | null | null | null | dictionary.py | flav-io/flavio-eos | 98fd95c0599c924feb7155feb3fb8505623bee65 | [
"MIT"
] | null | null | null | dictionary.py | flav-io/flavio-eos | 98fd95c0599c924feb7155feb3fb8505623bee65 | [
"MIT"
] | null | null | null | # this is written as a list of tuples as 1 parameter in code A
# could map to 2 parameters in code B. Dictionaries are constructed below
eos_flavio_parameters = [
("GSW::sin^2(theta)", "s2w"),
# ("CKM::A", "A"),
# ("CKM::lambda", "laC"),
# ("CKM::rhobar", "rhobar"),
# ("CKM::etabar", "etabar"),
... | 48.980583 | 79 | 0.582359 |
794888539fdcbdb32b68c8470c276961419ec0ed | 11,344 | py | Python | sdk/python/pulumi_azure_native/network/v20181001/get_public_ip_address.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181001/get_public_ip_address.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181001/get_public_ip_address.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 38.982818 | 354 | 0.657616 |
79488855d312791738451399c8be216398dba2ff | 24,668 | py | Python | contrib/xclasses/xclasses.py | forthinspired/ficl | 5e8b8c233302a5c02b8c2d77ebcabc95c1833bea | [
"BSD-2-Clause"
] | 6 | 2017-04-27T10:52:30.000Z | 2021-07-10T22:45:01.000Z | contrib/xclasses/xclasses.py | forthinspired/ficl | 5e8b8c233302a5c02b8c2d77ebcabc95c1833bea | [
"BSD-2-Clause"
] | null | null | null | contrib/xclasses/xclasses.py | forthinspired/ficl | 5e8b8c233302a5c02b8c2d77ebcabc95c1833bea | [
"BSD-2-Clause"
] | null | null | null | import copy
import string
import sys
import time
import types
def capitalize(s):
return string.upper(s[0]) + s[1:]
def fprint(f, s):
print >> f, s
def fprintHeader(f, comment = "//"):
fprint(f, comment)
fprint(f, comment + " Generated by xclasses.py at " + time.strftime("%Y/%m/%d %H:%M:%S"))
... | 28.32147 | 232 | 0.634871 |
7948886a1c03efbf449794ff9b3fb7745751acd9 | 3,832 | py | Python | pybridair/objects.py | netmanchris/pybrid | 3f38b3047c3e1d8f4e5e57a603110f645ac78a0d | [
"Apache-2.0"
] | null | null | null | pybridair/objects.py | netmanchris/pybrid | 3f38b3047c3e1d8f4e5e57a603110f645ac78a0d | [
"Apache-2.0"
] | 1 | 2018-10-23T19:32:04.000Z | 2018-10-23T19:32:04.000Z | pybridair/objects.py | netmanchris/pybrid | 3f38b3047c3e1d8f4e5e57a603110f645ac78a0d | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/env python3
# coding=utf-8
# author: @netmanchris
# -*- coding: utf-8 -*-
import pybrid.data
from pybrid.auth import BridAuth
import datetime
class BridDev:
def __init__(self, ip_address: str, auth: BridAuth, cache_time: float = 15,
aggregate_type='15-minute'):
"""
In... | 36.150943 | 127 | 0.612213 |
794888adea59a6543f953931d32c64d80ec8f9db | 3,663 | py | Python | ev3sim/robots/demo.py | scottwedge/ev3sim | 751c9902e7615d27d52e4b45b34e6acb47c06d24 | [
"BSD-3-Clause"
] | null | null | null | ev3sim/robots/demo.py | scottwedge/ev3sim | 751c9902e7615d27d52e4b45b34e6acb47c06d24 | [
"BSD-3-Clause"
] | null | null | null | ev3sim/robots/demo.py | scottwedge/ev3sim | 751c9902e7615d27d52e4b45b34e6acb47c06d24 | [
"BSD-3-Clause"
] | null | null | null | """
Some demo code for the ev3dev simulator.
This code will:
* print sensor values
* randomly move the motors every few seconds
* correct itself if it goes over the white line.
"""
from ev3dev2.motor import LargeMotor
from ev3dev2.sensor.lego import ColorSensor, UltrasonicSensor
from ev3dev2.sensor import Sensor
from... | 35.563107 | 94 | 0.657112 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.