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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0f7d3be907c8537b54ac65503c0416859a566628 | 5,739 | py | Python | tests/unit/minio_test.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | 1 | 2021-01-06T21:13:01.000Z | 2021-01-06T21:13:01.000Z | tests/unit/minio_test.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | null | null | null | tests/unit/minio_test.py | neuneck/minio-py | a964d8c92a2533c3dcd01530308577e7864928de | [
"Apache-2.0"
] | 1 | 2019-04-02T16:13:36.000Z | 2019-04-02T16:13:36.000Z | # -*- coding: utf-8 -*-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
# (C) 2015, 2016, 2017 MinIO, 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.ap... | 32.982759 | 77 | 0.597317 |
d044e22515a5af1ee37bda2795687c8e3783f35f | 964 | py | Python | setup.py | jamesremuscat/upnpy | 40235c0cd1e095702a22bc678dd62d4f810400c0 | [
"MIT"
] | null | null | null | setup.py | jamesremuscat/upnpy | 40235c0cd1e095702a22bc678dd62d4f810400c0 | [
"MIT"
] | null | null | null | setup.py | jamesremuscat/upnpy | 40235c0cd1e095702a22bc678dd62d4f810400c0 | [
"MIT"
] | null | null | null | from setuptools import setup
from upnpy import __author__, __author_email__, __project_url__, __version__, __description__
from os import path
current_directory = path.abspath(path.dirname(__file__))
with open(path.join(current_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
... | 33.241379 | 93 | 0.689834 |
47b7bfa9fc9e8f10098d68c85777182a00183754 | 7,405 | py | Python | server/depect_ca_server.py | JinyuanSun/DEPECT | b4cdb37995f9c6267a539b50af340a43f7b88fc9 | [
"MIT"
] | 2 | 2019-08-22T02:21:58.000Z | 2019-10-27T12:40:56.000Z | server/depect_ca_server.py | JinyuanSun/DEPECT | b4cdb37995f9c6267a539b50af340a43f7b88fc9 | [
"MIT"
] | null | null | null | server/depect_ca_server.py | JinyuanSun/DEPECT | b4cdb37995f9c6267a539b50af340a43f7b88fc9 | [
"MIT"
] | null | null | null | import argparse
import os
import math
import time
def get_parser():
parser = argparse.ArgumentParser(description='consensus analysis based on relative entropy score')
#parser.parse_args()
parser.add_argument("-s", "--sequence", help="target sequence which must be provided")
parser.add_argument("-db", ... | 39.811828 | 158 | 0.562053 |
161dfa7e08aba8bd61ce1c6cec8c9a64e1fdf838 | 4,395 | py | Python | transcode/filters/video/hsladjust/qhsladjust.py | shersonb/python-transcode | db42e82f019ef4c3b7f59f34587576205e19eb96 | [
"MIT"
] | 1 | 2020-06-25T01:00:15.000Z | 2020-06-25T01:00:15.000Z | transcode/filters/video/hsladjust/qhsladjust.py | shersonb/python-transcode | db42e82f019ef4c3b7f59f34587576205e19eb96 | [
"MIT"
] | null | null | null | transcode/filters/video/hsladjust/qhsladjust.py | shersonb/python-transcode | db42e82f019ef4c3b7f59f34587576205e19eb96 | [
"MIT"
] | null | null | null | from PyQt5.QtCore import pyqtSlot, QTime
from PyQt5.QtWidgets import (QLabel, QSpinBox, QDoubleSpinBox,
QVBoxLayout, QHBoxLayout, QWidget)
from transcode.pyqtgui.qfilterconfig import QFilterConfig
from transcode.pyqtgui.qframeselect import QFrameSelect
from transcode.pyqtgui.qimageview imp... | 34.069767 | 77 | 0.677588 |
19d32b00524b808413bfd882e9e38a005afc45e9 | 12,869 | py | Python | playframework-dist/play-1.1/python/Lib/poplib.py | ericlink/adms-server | 245f6d38197f195fd0cae8b93718f9ffcffb206a | [
"MIT"
] | 1 | 2015-05-21T20:00:12.000Z | 2015-05-21T20:00:12.000Z | playframework-dist/play-1.1/python/Lib/poplib.py | ericlink/adms-server | 245f6d38197f195fd0cae8b93718f9ffcffb206a | [
"MIT"
] | 1 | 2019-08-16T12:59:01.000Z | 2019-08-18T06:36:47.000Z | playframework-dist/play-1.1/python/Lib/poplib.py | ericlink/adms-server | 245f6d38197f195fd0cae8b93718f9ffcffb206a | [
"MIT"
] | 1 | 2016-12-13T21:08:58.000Z | 2016-12-13T21:08:58.000Z | """A POP3 client class.
Based on the J. Myers POP3 draft, Jan. 96
"""
# Author: David Ascher <david_ascher@brown.edu>
# [heavily stealing from nntplib.py]
# Updated: Piers Lauder <piers@cs.su.oz.au> [Jul '97]
# String method conversion and test jig improvements by ESR, February 2001.
# Added the POP3... | 30.351415 | 108 | 0.539436 |
b677bc89e34f9ed285bcb3f2d226fb3e62cd3fa6 | 14,173 | py | Python | hail/python/hail/context.py | GreatBrando/hail | 9c8d183f57775ca1073f9f821c78e48474114a42 | [
"MIT"
] | null | null | null | hail/python/hail/context.py | GreatBrando/hail | 9c8d183f57775ca1073f9f821c78e48474114a42 | [
"MIT"
] | null | null | null | hail/python/hail/context.py | GreatBrando/hail | 9c8d183f57775ca1073f9f821c78e48474114a42 | [
"MIT"
] | null | null | null | import pkg_resources
from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
import hail
from hail.genetics.reference_genome import ReferenceGenome
from hail.typecheck import nullable, typecheck, typecheck_method, enumeration
from hail.utils import get_env_or_default
from hail.utils.java impor... | 34.568293 | 124 | 0.611797 |
0260e871c99db53f5f741d70aeb5362afb262487 | 2,106 | py | Python | cli/src/pcluster/api/models/not_found_exception_response_content.py | enrico-usai/cfncluster | acf083776c301d4f2a03ce5cd6fc79f9b88c74e0 | [
"Apache-2.0"
] | 415 | 2018-11-13T15:02:15.000Z | 2022-03-31T15:26:06.000Z | cli/src/pcluster/api/models/not_found_exception_response_content.py | enrico-usai/cfncluster | acf083776c301d4f2a03ce5cd6fc79f9b88c74e0 | [
"Apache-2.0"
] | 2,522 | 2018-11-13T16:16:27.000Z | 2022-03-31T13:57:10.000Z | cli/src/pcluster/api/models/not_found_exception_response_content.py | yuleiwan/aws-parallelcluster | aad2a3019ef4ad08d702f5acf41b152b3f7a0b46 | [
"Apache-2.0"
] | 164 | 2018-11-14T22:47:46.000Z | 2022-03-22T11:33:22.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
# with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/
# or in the "LICENSE.txt" file accompanyin... | 32.4 | 119 | 0.696106 |
1884c1b28617686871f8e7a88a63f93cfd9b48f4 | 10,020 | py | Python | tests/e2e/test_messages_add.py | slawekp/smtpc | 4580f16a0a18ac601e0601e3b617406b65e21f29 | [
"MIT"
] | null | null | null | tests/e2e/test_messages_add.py | slawekp/smtpc | 4580f16a0a18ac601e0601e3b617406b65e21f29 | [
"MIT"
] | null | null | null | tests/e2e/test_messages_add.py | slawekp/smtpc | 4580f16a0a18ac601e0601e3b617406b65e21f29 | [
"MIT"
] | null | null | null | import pytest
from smtpc import config
from smtpc.enums import ExitCodes, ContentType
from . import *
@pytest.mark.parametrize('params, expected',
[
[
['--from', 'smtpc@smtpc.net', '--to', 'receiver@smtpc.net'],
{'address_from': 'smtpc@smtpc.net', 'address_to': ['receiver@smtpc.n... | 38.988327 | 147 | 0.509581 |
82814259d18cc0bfa2bfb15b2a0fea9d942da6ba | 411 | py | Python | 02_EstruturasDecisao/13_dia_semana.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 02_EstruturasDecisao/13_dia_semana.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 02_EstruturasDecisao/13_dia_semana.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | numero_dia = int(raw_input('Informe um numero para saber o dia da semana: '))
if (numero_dia == 1):
print 'Domingo'
elif (numero_dia == 2):
print 'Segunda'
elif (numero_dia == 3):
print 'Terca'
elif (numero_dia == 4):
print 'Quarta'
elif (numero_dia == 5):
print 'Quinta'
elif (numero_dia == 6):
... | 21.631579 | 77 | 0.632603 |
5e6fbd9e492711856e252048634285fbd9415802 | 13,182 | py | Python | package/cloudshell/cp/vcenter/network/vnic/vnic_service.py | DYeag/vCenterShell | e2e24cd938a92a68f4a8e6a860810d3ef72aae6d | [
"Apache-2.0"
] | 20 | 2015-12-06T10:19:27.000Z | 2020-08-05T06:19:46.000Z | package/cloudshell/cp/vcenter/network/vnic/vnic_service.py | DYeag/vCenterShell | e2e24cd938a92a68f4a8e6a860810d3ef72aae6d | [
"Apache-2.0"
] | 956 | 2015-12-06T13:00:17.000Z | 2021-03-31T23:54:51.000Z | package/cloudshell/cp/vcenter/network/vnic/vnic_service.py | DYeag/vCenterShell | e2e24cd938a92a68f4a8e6a860810d3ef72aae6d | [
"Apache-2.0"
] | 26 | 2015-12-06T15:24:17.000Z | 2020-09-16T09:27:03.000Z | # -*- coding: utf-8 -*-
from pyVmomi import vim
from cloudshell.cp.vcenter.common.vcenter.vmomi_service import pyVmomiService
from cloudshell.cp.vcenter.network.network_specifications import network_is_standard, network_is_portgroup
class VNicService(object):
def __init__(self):
super(VNicService, self).... | 40.937888 | 121 | 0.642695 |
f74d88adf09d00adf6cba9384c4aebea799b78f2 | 165 | py | Python | d3ct/plugins/out_pprint.py | metro-nom/d3ct | 2d619b46fac7de29c031a3737570ca62e33d8c2f | [
"BSD-3-Clause"
] | null | null | null | d3ct/plugins/out_pprint.py | metro-nom/d3ct | 2d619b46fac7de29c031a3737570ca62e33d8c2f | [
"BSD-3-Clause"
] | null | null | null | d3ct/plugins/out_pprint.py | metro-nom/d3ct | 2d619b46fac7de29c031a3737570ca62e33d8c2f | [
"BSD-3-Clause"
] | null | null | null | import pprint
from d3ct.plugins.base import PluginBase
class Generator(PluginBase):
@staticmethod
def output(py_obj):
pprint.pprint(py_obj.data)
| 15 | 40 | 0.727273 |
4bb9a64c2e091691587404fad8cc9ea7014fa28d | 1,141 | py | Python | scripts/vqDemo.py | vipavlovic/pyprobml | 59a2edc682d0163955db5e2f27491ad772b60141 | [
"MIT"
] | 4,895 | 2016-08-17T22:28:34.000Z | 2022-03-31T17:07:15.000Z | scripts/vqDemo.py | vipavlovic/pyprobml | 59a2edc682d0163955db5e2f27491ad772b60141 | [
"MIT"
] | 446 | 2016-09-17T14:35:29.000Z | 2022-03-31T19:59:33.000Z | scripts/vqDemo.py | vipavlovic/pyprobml | 59a2edc682d0163955db5e2f27491ad772b60141 | [
"MIT"
] | 1,160 | 2016-08-18T23:19:27.000Z | 2022-03-31T12:44:07.000Z | # Vector Quantization Demo
# Author: Animesh Gupta
# Use racoon face image
# https://docs.scipy.org/doc/scipy/reference/generated/scipy.misc.face.html
import superimport
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
from sklearn import cluster
try: # SciPy >= 0.16 have face in misc
fr... | 25.931818 | 75 | 0.699387 |
474704bfb9f4495d560d996d0d0978f1b30041be | 9,351 | py | Python | tests/providers/apache/pinot/hooks/test_pinot.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 8 | 2017-04-20T16:15:44.000Z | 2020-10-11T13:44:10.000Z | tests/providers/apache/pinot/hooks/test_pinot.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 219 | 2017-03-15T18:40:16.000Z | 2022-02-28T22:52:43.000Z | tests/providers/apache/pinot/hooks/test_pinot.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 3 | 2016-07-14T21:51:10.000Z | 2020-10-12T13:26:36.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... | 39.961538 | 85 | 0.57673 |
7f9818c75db32729d8199399e9a31721909eeafc | 14,364 | py | Python | Reservation Management System Backend/tests/test_main.py | ntdai95/Resume-Projects | 001dc6f6171c53ec9543234fd5d1c3f8481435e8 | [
"MIT"
] | 1 | 2021-09-14T18:00:18.000Z | 2021-09-14T18:00:18.000Z | Reservation Management System Backend/tests/test_main.py | ntdai95/Resume-Projects | 001dc6f6171c53ec9543234fd5d1c3f8481435e8 | [
"MIT"
] | null | null | null | Reservation Management System Backend/tests/test_main.py | ntdai95/Resume-Projects | 001dc6f6171c53ec9543234fd5d1c3f8481435e8 | [
"MIT"
] | null | null | null | import json
import pytest
import main
from datetime import datetime
from uuid import uuid4
from fastapi.testclient import TestClient
client = TestClient(main.app)
# inject manager session for testing
t_session = str(uuid4())
main.sessions[t_session] = [datetime.today(), 'manager']
def test_load_config():
assert... | 33.797647 | 140 | 0.626079 |
ab501f4a36132ce078128e15042ae984a188012b | 12,667 | py | Python | cinder/volume/volume_types.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-08-25T13:11:18.000Z | 2020-10-15T11:29:20.000Z | cinder/volume/volume_types.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 5 | 2018-01-25T11:31:56.000Z | 2019-05-06T23:13:35.000Z | cinder/volume/volume_types.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-02-20T18:48:24.000Z | 2021-01-30T20:26:18.000Z | # Copyright (c) 2011 Zadara Storage Inc.
# Copyright (c) 2011 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2011 Ken Pepple
#
# Licensed under the Apache ... | 37.146628 | 78 | 0.606458 |
af676a1686cb3fe002b943f54a2fcbcc4e4de6f9 | 29,331 | py | Python | bin/ADFRsuite/CCSBpckgs/DejaVu2/glfLabels.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/DejaVu2/glfLabels.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/DejaVu2/glfLabels.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | ################################################################################
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your op... | 39.26506 | 109 | 0.524701 |
19bf17bf39e64b139c9bb68bcb08c752d3945b87 | 9,056 | py | Python | components/matrix_viability.py | CancerRxGene/gdscmatrixexplorer | 834fc255b5d011bf2017aee519cfb32d6ed16065 | [
"MIT"
] | 5 | 2019-01-15T14:43:05.000Z | 2020-10-02T16:41:26.000Z | components/matrix_viability.py | CancerRxGene/gdscmatrixexplorer | 834fc255b5d011bf2017aee519cfb32d6ed16065 | [
"MIT"
] | 68 | 2018-11-22T10:33:06.000Z | 2019-10-16T17:26:34.000Z | components/matrix_viability.py | CancerRxGene/gdscmatrixexplorer | 834fc255b5d011bf2017aee519cfb32d6ed16065 | [
"MIT"
] | null | null | null | from functools import lru_cache
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import numpy as np
import plotly.graph_objs as go
from app import app
from db import session
from models import SingleAgentWellResult, WellResu... | 36.079681 | 145 | 0.527496 |
03f44f35ba3d7a03160fbabd2ddc4291546091b5 | 4,567 | py | Python | mnefun/_sss_legacy.py | nordme/mnefun | c24630ba853df6bd0c200a7c52a216d34c0b05aa | [
"BSD-3-Clause"
] | 7 | 2015-06-11T23:21:00.000Z | 2022-03-24T18:16:18.000Z | mnefun/_sss_legacy.py | nordme/mnefun | c24630ba853df6bd0c200a7c52a216d34c0b05aa | [
"BSD-3-Clause"
] | 253 | 2015-05-21T17:05:16.000Z | 2022-02-08T22:39:16.000Z | mnefun/_sss_legacy.py | nordme/mnefun | c24630ba853df6bd0c200a7c52a216d34c0b05aa | [
"BSD-3-Clause"
] | 23 | 2015-05-15T21:59:14.000Z | 2021-04-29T23:14:10.000Z | """Legacy code for running SSS remotely."""
import os.path as op
import shutil
import subprocess
import numpy as np
from mne.bem import fit_sphere_to_headshape
from mne.io import read_info
from mne.io.constants import FIFF
from mne.utils import run_subprocess
from ._paths import _prebad, get_raw_fnames, safe_inserter... | 43.084906 | 78 | 0.560105 |
30ebacd762aac4c8e93bbd06c222921f59ea9275 | 1,437 | py | Python | logparser/MoLFI/test/org/core/operators/test_mutation.py | Pad0y/logparser | fd605e02f59810cf0d583540a41c0f16e60620be | [
"MIT"
] | null | null | null | logparser/MoLFI/test/org/core/operators/test_mutation.py | Pad0y/logparser | fd605e02f59810cf0d583540a41c0f16e60620be | [
"MIT"
] | null | null | null | logparser/MoLFI/test/org/core/operators/test_mutation.py | Pad0y/logparser | fd605e02f59810cf0d583540a41c0f16e60620be | [
"MIT"
] | null | null | null | import unittest
from definitions import ROOT_DIR
from main.org.core.operators.mutation import *
class Test(unittest.TestCase):
def test_constructor(self):
logfile = ROOT_DIR + "/test/resources/File.log"
chrom_gen = ChromosomeGenerator(logfile, 0, "\n", [])
chrom_mutator = Chromoso... | 42.264706 | 109 | 0.641614 |
6230c9af1178abcca0e404708d195474742475d5 | 3,560 | py | Python | config/settings/local.py | sebastianocostanzo/MetaCI | a880a8b1caa7cf1445f220b6c2e4f83fe8d38312 | [
"BSD-3-Clause"
] | null | null | null | config/settings/local.py | sebastianocostanzo/MetaCI | a880a8b1caa7cf1445f220b6c2e4f83fe8d38312 | [
"BSD-3-Clause"
] | null | null | null | config/settings/local.py | sebastianocostanzo/MetaCI | a880a8b1caa7cf1445f220b6c2e4f83fe8d38312 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
"""
import socket
import os
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bo... | 33.584906 | 117 | 0.604775 |
00c3d6dcc370b22ab710c54051b99d1ed3263049 | 676 | py | Python | build_xml/insert_t1_ch15.py | DCCouncil/dc-law-tools | 3f016a206d92b7722b8c7638a7b638391f67ab20 | [
"CC0-1.0"
] | 3 | 2015-12-11T17:48:13.000Z | 2016-01-21T18:34:47.000Z | build_xml/insert_t1_ch15.py | DCCouncil/dc-law-tools | 3f016a206d92b7722b8c7638a7b638391f67ab20 | [
"CC0-1.0"
] | 5 | 2016-01-04T17:28:07.000Z | 2016-07-28T19:21:10.000Z | build_xml/insert_t1_ch15.py | DCCouncil/dc-law-tools | 3f016a206d92b7722b8c7638a7b638391f67ab20 | [
"CC0-1.0"
] | 9 | 2016-03-15T01:04:18.000Z | 2021-01-08T04:33:05.000Z | import os.path
import lxml.etree as et
DIR = os.path.abspath(os.path.dirname(__file__))
src_file = DIR + '/../working_files/dccode.xml'
ch15_path = DIR + '/t1_ch15.xml'
dst_file = DIR + '/../working_files/dccode-t1-ch15.xml'
def insert_t1_ch15():
parser = et.XMLParser(remove_blank_text=True)
print('insertin... | 28.166667 | 70 | 0.66716 |
38c29205492b02591b20e6e7a57717b5fe5eff02 | 648 | py | Python | dwmpproblems.py | belenox/dmwp | b584e289a1ef9e27838d051f94793a8046c5e54b | [
"Unlicense"
] | 1 | 2017-10-05T17:03:14.000Z | 2017-10-05T17:03:14.000Z | dwmpproblems.py | belenox/dmwp | b584e289a1ef9e27838d051f94793a8046c5e54b | [
"Unlicense"
] | null | null | null | dwmpproblems.py | belenox/dmwp | b584e289a1ef9e27838d051f94793a8046c5e54b | [
"Unlicense"
] | null | null | null | import matplotlib.pyplot as p
def quadgraph():
print 'equation format: ax^2 + bx + c'
a = float(raw_input("pls type 'a' value: "))
b = float(raw_input("pls type 'b' value: "))
c = float(raw_input("pls type 'c' value: "))
x_values = range(int(-1*b / 2*a - 40), int(-1*b / 2*a + 40))
y_values = []
... | 36 | 89 | 0.515432 |
66f5cadf98c093c0acee41d750ab09a5fc2d9b4e | 3,929 | py | Python | tensorflow_datasets/text/esnli.py | f1recracker/tensorflow-datasets | b25c53b6bd10e77fc772449f2abb643a36def34f | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/text/esnli.py | f1recracker/tensorflow-datasets | b25c53b6bd10e77fc772449f2abb643a36def34f | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/text/esnli.py | f1recracker/tensorflow-datasets | b25c53b6bd10e77fc772449f2abb643a36def34f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 33.581197 | 113 | 0.651565 |
2a8573b11c7f403df42b813ffd452857183a1c8d | 852 | py | Python | matrevy/accounts/models.py | matrevy/matrevy.dk | abaf6bc328adf55d522a5cf0c83092949a8f7a20 | [
"MIT"
] | null | null | null | matrevy/accounts/models.py | matrevy/matrevy.dk | abaf6bc328adf55d522a5cf0c83092949a8f7a20 | [
"MIT"
] | null | null | null | matrevy/accounts/models.py | matrevy/matrevy.dk | abaf6bc328adf55d522a5cf0c83092949a8f7a20 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
class AccountManager():
use_in_migration = True
class Account(PermissionsMixin, AbstractBaseUser):
"""
Users within the Django authentication system are represented by this
model.
... | 23.027027 | 74 | 0.649061 |
53028fb7ec4bf78037b0e5153d1a526f98f4445b | 572 | py | Python | noteKeeper/main/migrations/0001_initial.py | Aryan284/Note-Keeper | d97253fc2720d723afd0b5751a67bfc533bca8ee | [
"MIT"
] | 8 | 2020-06-27T17:41:11.000Z | 2022-02-08T06:49:20.000Z | noteKeeper/main/migrations/0001_initial.py | Aryan284/Note-Keeper | d97253fc2720d723afd0b5751a67bfc533bca8ee | [
"MIT"
] | 5 | 2021-06-02T02:17:23.000Z | 2022-03-02T15:02:33.000Z | noteKeeper/main/migrations/0001_initial.py | Aryan284/Note-Keeper | d97253fc2720d723afd0b5751a67bfc533bca8ee | [
"MIT"
] | 4 | 2020-06-21T05:31:04.000Z | 2021-11-07T04:01:35.000Z | # Generated by Django 3.0.6 on 2020-06-08 03:50
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='department',
fields=[
('id', models.AutoFie... | 24.869565 | 114 | 0.589161 |
60b74b6baabc040e63b9a721d107d4b1f7e26c03 | 254 | py | Python | django-users/users/models.py | mehran-rahmanzadeh/first-microservice | fa8914fc4e27fab6bfcc6e31bef88db9c3250bd6 | [
"MIT"
] | null | null | null | django-users/users/models.py | mehran-rahmanzadeh/first-microservice | fa8914fc4e27fab6bfcc6e31bef88db9c3250bd6 | [
"MIT"
] | null | null | null | django-users/users/models.py | mehran-rahmanzadeh/first-microservice | fa8914fc4e27fab6bfcc6e31bef88db9c3250bd6 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
class User(AbstractUser):
"""User model class"""
class Meta:
verbose_name = _('User')
verbose_name_plural = _('Users')
| 23.090909 | 55 | 0.704724 |
439ce2eb585965b90475a393d2a9ee55869033cc | 1,144 | py | Python | xos/nose2-plugins/exclude.py | cachengo/vsg-hw | 2934bf2c77fc4263eb4a938c17d6ad73c7b60113 | [
"Apache-2.0"
] | null | null | null | xos/nose2-plugins/exclude.py | cachengo/vsg-hw | 2934bf2c77fc4263eb4a938c17d6ad73c7b60113 | [
"Apache-2.0"
] | null | null | null | xos/nose2-plugins/exclude.py | cachengo/vsg-hw | 2934bf2c77fc4263eb4a938c17d6ad73c7b60113 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-present Open Networking Foundation
#
# 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 agr... | 35.75 | 96 | 0.707168 |
f3d241cfc2e0acf2b3b968711d4530b87b631616 | 331 | py | Python | entity/cards/LETL_028H/LETL_446.py | x014/lushi_script | edab2b88e3f0de8139de2541ab2daa331f777c0e | [
"MIT"
] | 102 | 2021-10-20T09:06:39.000Z | 2022-03-28T13:35:11.000Z | entity/cards/LETL_028H/LETL_446.py | x014/lushi_script | edab2b88e3f0de8139de2541ab2daa331f777c0e | [
"MIT"
] | 98 | 2021-10-19T16:13:27.000Z | 2022-03-27T13:27:49.000Z | entity/cards/LETL_028H/LETL_446.py | x014/lushi_script | edab2b88e3f0de8139de2541ab2daa331f777c0e | [
"MIT"
] | 55 | 2021-10-19T03:56:50.000Z | 2022-03-25T08:25:26.000Z | # -*- coding: utf-8 -*-
from hearthstone.entities import Entity
from entity.spell_entity import SpellEntity
class LETL_446(SpellEntity):
"""
炽烧符文4
<b>被动:</b><b>+3火焰伤害</b>。
"""
def __init__(self, entity: Entity):
super().__init__(entity)
def equip(self, hero):
pass
... | 17.421053 | 43 | 0.574018 |
726ff7845c21747e55df2ceabb0b122f655e4f1d | 6,870 | py | Python | nereid/contrib/locale.py | advocatetax/nereid-1 | ee7ae345e3e7e46b3e13cd6e3b94c388d38a0efa | [
"BSD-3-Clause"
] | null | null | null | nereid/contrib/locale.py | advocatetax/nereid-1 | ee7ae345e3e7e46b3e13cd6e3b94c388d38a0efa | [
"BSD-3-Clause"
] | null | null | null | nereid/contrib/locale.py | advocatetax/nereid-1 | ee7ae345e3e7e46b3e13cd6e3b94c388d38a0efa | [
"BSD-3-Clause"
] | 1 | 2021-06-04T13:02:29.000Z | 2021-06-04T13:02:29.000Z | # This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import gettext
import flask.ext.babel
from speaklater import is_lazy_string, make_lazy_string
from flask.ext.babel import Babel # noqa
from babel import Locale
from p... | 31.227273 | 80 | 0.649927 |
4c964ec201f153d6c8293d3bf93bc231ff8f751d | 7,754 | py | Python | tensorflow/contrib/rnn/python/ops/gru_ops.py | harunpehlivan/tensorflow | 376e2cfdab31f4da251ea2e50992a9bf97fd171b | [
"Apache-2.0"
] | 24 | 2018-02-01T15:49:22.000Z | 2021-01-11T16:31:18.000Z | tensorflow/contrib/rnn/python/ops/gru_ops.py | hamzabekkouri/tensorflow | d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f | [
"Apache-2.0"
] | 2 | 2018-09-09T07:29:07.000Z | 2019-03-11T07:14:45.000Z | tensorflow/contrib/rnn/python/ops/gru_ops.py | hamzabekkouri/tensorflow | d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f | [
"Apache-2.0"
] | 4 | 2018-10-29T18:43:22.000Z | 2020-09-28T07:19:52.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.308333 | 91 | 0.69332 |
6cf5e633f119ef14fa77944e08572276482b60c2 | 3,007 | py | Python | androguard-master/elsim/tests/example_text_sim.py | rpanah/AndrODet | 684e0232846303a1c5a35c093027f2c568f72942 | [
"MIT"
] | 24 | 2018-10-09T02:08:17.000Z | 2021-08-03T21:39:16.000Z | androguard-master/elsim/tests/example_text_sim.py | rpanah/AndrODet | 684e0232846303a1c5a35c093027f2c568f72942 | [
"MIT"
] | 3 | 2019-06-21T12:05:39.000Z | 2021-11-09T07:23:37.000Z | androguard-master/elsim/tests/example_text_sim.py | rpanah/AndrODet | 684e0232846303a1c5a35c093027f2c568f72942 | [
"MIT"
] | 4 | 2018-12-12T21:34:37.000Z | 2021-09-03T19:42:10.000Z | #!/usr/bin/env python
# This file is part of Elsim.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Elsim is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either ve... | 35.376471 | 117 | 0.608913 |
abcd4a17dec66b439811887df51419277d51c730 | 31,414 | py | Python | fig/packages/docker/client.py | heroku/fig | 38776504e597230428dab4422ac0a1b47b834e05 | [
"Apache-2.0"
] | 1 | 2016-04-25T08:43:35.000Z | 2016-04-25T08:43:35.000Z | fig/packages/docker/client.py | ryanbrainard/fig | 9a825c5c35128b0b49eb255966f7a93b4093459a | [
"Apache-2.0"
] | null | null | null | fig/packages/docker/client.py | ryanbrainard/fig | 9a825c5c35128b0b49eb255966f7a93b4093459a | [
"Apache-2.0"
] | 1 | 2019-10-08T17:31:23.000Z | 2019-10-08T17:31:23.000Z | # Copyright 2013 dotCloud 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 t... | 36.485482 | 79 | 0.559814 |
f1ceb10d81350d1246df9e8760239ea493773a7e | 6,033 | py | Python | pbgpp/BGP/Update/Route.py | cmoeller-dx/pbgp-parser | 7db344298c94dc11a86cdd448aa455f188f6362e | [
"Apache-2.0"
] | null | null | null | pbgpp/BGP/Update/Route.py | cmoeller-dx/pbgp-parser | 7db344298c94dc11a86cdd448aa455f188f6362e | [
"Apache-2.0"
] | null | null | null | pbgpp/BGP/Update/Route.py | cmoeller-dx/pbgp-parser | 7db344298c94dc11a86cdd448aa455f188f6362e | [
"Apache-2.0"
] | null | null | null | #
# This file is part of PCAP BGP Parser (pbgpp)
#
# Copyright 2016-2017 DE-CIX Management GmbH
# Author: Tobias Hannaske <tobias.hannaske@de-cix.net>
#
# 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 Lic... | 40.763514 | 154 | 0.587104 |
e6d7c20c9132da8004a39af4061cae59fb3cae55 | 570 | py | Python | api_server_django/category_management/urls.py | tuktarov9898/Django_React | 8a17bbfecaa48076358cb968ea4698ddc46cbd01 | [
"MIT"
] | null | null | null | api_server_django/category_management/urls.py | tuktarov9898/Django_React | 8a17bbfecaa48076358cb968ea4698ddc46cbd01 | [
"MIT"
] | null | null | null | api_server_django/category_management/urls.py | tuktarov9898/Django_React | 8a17bbfecaa48076358cb968ea4698ddc46cbd01 | [
"MIT"
] | 1 | 2021-11-07T16:09:43.000Z | 2021-11-07T16:09:43.000Z | from django.urls import path
from . import api_views as category_api
urlpatterns = [
path('proposeCategory', category_api.proposeCategory, name="proposeCategory"),
path('updateCategory', category_api.updateCategory, name="updateCategory"),
path('proposeScrape', category_api.proposeScrape, name="proposeScra... | 51.818182 | 82 | 0.777193 |
64b191bc722dc8f1baefc19729cdf64b988d0360 | 3,017 | py | Python | markdown_embed_code/__main__.py | mkapra/markdown-embed-code | 3e439966d10dcf9764e058d8522c8de9eab9f710 | [
"MIT"
] | null | null | null | markdown_embed_code/__main__.py | mkapra/markdown-embed-code | 3e439966d10dcf9764e058d8522c8de9eab9f710 | [
"MIT"
] | null | null | null | markdown_embed_code/__main__.py | mkapra/markdown-embed-code | 3e439966d10dcf9764e058d8522c8de9eab9f710 | [
"MIT"
] | null | null | null | import subprocess
import sys
from pathlib import Path
from typing import Optional
import json
from github import Github
from pydantic import BaseModel, BaseSettings, SecretStr
from markdown_embed_code import get_code_emb
class Settings(BaseSettings):
input_markdown: Path = Path("README.md")
input_message: ... | 27.678899 | 134 | 0.701028 |
78edd5a2181ad9d4f1e557352cae829d7b364376 | 4,989 | py | Python | ask-smapi-model/ask_smapi_model/v1/audit_logs/request_pagination_context.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-smapi-model/ask_smapi_model/v1/audit_logs/request_pagination_context.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-smapi-model/ask_smapi_model/v1/audit_logs/request_pagination_context.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 43.008621 | 451 | 0.650231 |
affaf2224a67524c287c0e2f30bc6a31e1e89582 | 1,666 | py | Python | pythonlib/bin/rk4a.py | johnkerl/scripts-math | 71b6c6617728290ce9643c80a75a402707ad1134 | [
"BSD-2-Clause"
] | 3 | 2019-01-11T20:56:22.000Z | 2020-02-22T10:32:59.000Z | pythonlib/bin/rk4a.py | johnkerl/scripts-math | 71b6c6617728290ce9643c80a75a402707ad1134 | [
"BSD-2-Clause"
] | null | null | null | pythonlib/bin/rk4a.py | johnkerl/scripts-math | 71b6c6617728290ce9643c80a75a402707ad1134 | [
"BSD-2-Clause"
] | 3 | 2018-01-12T00:55:16.000Z | 2020-02-22T10:33:03.000Z | #!/usr/bin/python -Wall
# ================================================================
# John Kerl
# kerl.john.r@gmail.com
# 2008-02-08
# ================================================================
from __future__ import division # 1/2 = 0.5, not 0.
from math import *
# -------------------------------------... | 21.358974 | 66 | 0.339736 |
8222cc9489c34a2fcee6f868a2eb5ea44de1cdf6 | 1,408 | py | Python | python__mp-mt/csfd_get_user_ratings__multiprocessing.py | SonGokussj4/experiments | ff090067254e10526c95180f7bd9fd8aea3f19cb | [
"MIT"
] | null | null | null | python__mp-mt/csfd_get_user_ratings__multiprocessing.py | SonGokussj4/experiments | ff090067254e10526c95180f7bd9fd8aea3f19cb | [
"MIT"
] | null | null | null | python__mp-mt/csfd_get_user_ratings__multiprocessing.py | SonGokussj4/experiments | ff090067254e10526c95180f7bd9fd8aea3f19cb | [
"MIT"
] | null | null | null | from pprint import pprint
import requests
from bs4 import BeautifulSoup as bs
import time
from multiprocessing import Pool, cpu_count
from csfd_functions import get_csfd_ratings, get_csfd_max_page
BASE_URL = "https://www.csfd.cz"
UZIVATEL_URL = BASE_URL + "/uzivatel/"
CPU_COUNT = cpu_count()
pool = Pool(processes=2)... | 23.081967 | 95 | 0.68892 |
75a1d3c8804f7c32a82e7b6e0761cd1905c2e25b | 1,221 | py | Python | easy/search insert position/solution.py | ilya-sokolov/leetcode | ad421111d0d7c5ec5245f33552e94a373b6fd426 | [
"MIT"
] | 4 | 2021-06-03T22:19:13.000Z | 2021-10-05T18:14:12.000Z | easy/search insert position/solution.py | ilya-sokolov/leetcode | ad421111d0d7c5ec5245f33552e94a373b6fd426 | [
"MIT"
] | null | null | null | easy/search insert position/solution.py | ilya-sokolov/leetcode | ad421111d0d7c5ec5245f33552e94a373b6fd426 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def searchInsert(self, nums: List[int], target: int) -> int:
result = self.binarySearch(nums, target)
if result == -1:
n = len(nums)
if target > max(nums):
return n
elif target < min(nums):
... | 28.395349 | 64 | 0.494676 |
3b554812752d41641223edf00919c87c462f4a0c | 432 | py | Python | predict.py | Bryce-HJ/yolov3_pytorch | 933d359128d078dadabd200bc1ba4d7e99882b67 | [
"MIT"
] | 3 | 2021-01-03T04:24:23.000Z | 2021-12-16T14:44:48.000Z | predict.py | Bryce-HJ/yolov3_pytorch | 933d359128d078dadabd200bc1ba4d7e99882b67 | [
"MIT"
] | null | null | null | predict.py | Bryce-HJ/yolov3_pytorch | 933d359128d078dadabd200bc1ba4d7e99882b67 | [
"MIT"
] | null | null | null | #-------------------------------------#
# 对单张图片进行预测
#-------------------------------------#
from yolo import YOLO
from PIL import Image
yolo = YOLO()
while True:
img = input('Input image filename:')
try:
image = Image.open(img)
except:
print('Open Error! Try again!')
continue... | 21.6 | 42 | 0.479167 |
66af6c1d573145a06497df5e437fcea0daf279ed | 25,002 | py | Python | sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2022_01_01_preview/operations/_certificates_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2022_01_01_preview/operations/_certificates_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2022_01_01_preview/operations/_certificates_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.557491 | 218 | 0.676106 |
7af35271dae142c1cf29b203fbcde0fcfa664b4a | 2,821 | py | Python | artikel/views.py | harmonica-pacil/invid19 | b4986f3375721deb02c9b9b8c982cd4e426c423c | [
"Unlicense"
] | 1 | 2021-12-27T12:50:05.000Z | 2021-12-27T12:50:05.000Z | artikel/views.py | harmonica-pacil/invid19 | b4986f3375721deb02c9b9b8c982cd4e426c423c | [
"Unlicense"
] | null | null | null | artikel/views.py | harmonica-pacil/invid19 | b4986f3375721deb02c9b9b8c982cd4e426c423c | [
"Unlicense"
] | null | null | null | from django.shortcuts import render
from .models import Artikel
from .forms import ArtikelForm
from django.http.response import HttpResponse, HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.core import serializers
from django.http import JsonResponse
from django.core.paginator... | 32.802326 | 69 | 0.653314 |
5f79786b213db83313a50fc3d7ca49d372a54689 | 7,338 | py | Python | talk_about_random_splits/probing/probing_utils_test.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | talk_about_random_splits/probing/probing_utils_test.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | talk_about_random_splits/probing/probing_utils_test.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 38.825397 | 80 | 0.677841 |
be1f7b0d4643f4d1b42b5399b8b92dc60760f55d | 6,668 | py | Python | parsers/file_name_validators_test.py | zeendeploy/dsrf | e6ff85a27346422140013d5241fcb6d93dd9b6dd | [
"Apache-2.0"
] | null | null | null | parsers/file_name_validators_test.py | zeendeploy/dsrf | e6ff85a27346422140013d5241fcb6d93dd9b6dd | [
"Apache-2.0"
] | null | null | null | parsers/file_name_validators_test.py | zeendeploy/dsrf | e6ff85a27346422140013d5241fcb6d93dd9b6dd | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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... | 43.019355 | 80 | 0.692262 |
0f8fbe158a7dd2de6e8110bba90a1c5df02df786 | 487 | py | Python | src/courses/migrations/0001_initial.py | pv45412/Try-Django | f266d05849b1924c2616ba03641626356e0e0c82 | [
"MIT"
] | 1,110 | 2018-07-02T21:28:21.000Z | 2022-03-29T11:28:23.000Z | src/courses/migrations/0001_initial.py | pv45412/Try-Django | f266d05849b1924c2616ba03641626356e0e0c82 | [
"MIT"
] | 5 | 2018-11-06T20:54:44.000Z | 2021-08-07T08:37:51.000Z | src/courses/migrations/0001_initial.py | pv45412/Try-Django | f266d05849b1924c2616ba03641626356e0e0c82 | [
"MIT"
] | 876 | 2018-07-04T08:50:47.000Z | 2022-03-31T03:50:47.000Z | # Generated by Django 2.0.7 on 2018-07-15 23:27
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', models.AutoField(a... | 22.136364 | 114 | 0.574949 |
d09a2a79104d764fc0c29183459430fabb2db363 | 21,389 | py | Python | test/test_progress.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 36 | 2016-06-06T03:57:19.000Z | 2022-03-01T05:11:26.000Z | test/test_progress.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 9 | 2017-05-30T19:30:33.000Z | 2019-12-13T22:51:55.000Z | test/test_progress.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 7 | 2017-03-16T10:28:15.000Z | 2021-11-16T17:28:16.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" test_progress.py
Unit tests for colr/progress.py.
-Christopher Welborn 3-16-2017
"""
import sys
import unittest
from ctypes import c_bool, c_double
from multiprocessing import Lock, Queue, Value
from multiprocessing.queues import Empty
from time import sleep... | 30.210452 | 78 | 0.488195 |
ae6f84dcbfee72b00a39ba3be2e93c4cbe7d6aeb | 616 | py | Python | back/apps/worker/migrations/0022_auto_20200930_1903.py | 8area8/work-calendar | f51fc1b81e434953bb41d13b466fc764d70cdb1f | [
"MIT"
] | 1 | 2020-09-16T22:54:33.000Z | 2020-09-16T22:54:33.000Z | back/apps/worker/migrations/0022_auto_20200930_1903.py | 8area8/work-calendar | f51fc1b81e434953bb41d13b466fc764d70cdb1f | [
"MIT"
] | 2 | 2020-09-30T16:44:53.000Z | 2020-09-30T16:45:41.000Z | back/apps/worker/migrations/0022_auto_20200930_1903.py | 8area8/work-calendar | f51fc1b81e434953bb41d13b466fc764d70cdb1f | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-09-30 17:03
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('worker', '0021_employee_off'),
]
operations = [
migrations.AlterField(
model_name='employee'... | 30.8 | 252 | 0.625 |
4a51062fed5dcad2381270c60fbdb7b337e86275 | 38,583 | py | Python | openstackclient/image/v2/image.py | adgeese/python-openstackclient | 06263bd5852aad9cd03a76f50140fbbb2d0751ba | [
"Apache-2.0"
] | 1 | 2018-04-23T20:59:31.000Z | 2018-04-23T20:59:31.000Z | openstackclient/image/v2/image.py | adgeese/python-openstackclient | 06263bd5852aad9cd03a76f50140fbbb2d0751ba | [
"Apache-2.0"
] | null | null | null | openstackclient/image/v2/image.py | adgeese/python-openstackclient | 06263bd5852aad9cd03a76f50140fbbb2d0751ba | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2013 OpenStack Foundation
#
# 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 la... | 35.332418 | 79 | 0.53718 |
7400908371e65aec50d9d179d3374225303a80a2 | 2,303 | py | Python | strategy/tests/test_run_screener.py | spectrum-dev/django-orchestration | 3b3257a00cbb086bc6a3b367e76de1081f751cc9 | [
"MIT"
] | null | null | null | strategy/tests/test_run_screener.py | spectrum-dev/django-orchestration | 3b3257a00cbb086bc6a3b367e76de1081f751cc9 | [
"MIT"
] | null | null | null | strategy/tests/test_run_screener.py | spectrum-dev/django-orchestration | 3b3257a00cbb086bc6a3b367e76de1081f751cc9 | [
"MIT"
] | null | null | null | from django.test import TestCase
from strategy.tasks import run_screener
class SpectrumFlowRunScreener(TestCase):
def test_debug(self):
node_list = {
1: {
"blockId": 1,
"blockType": "BULK_DATA_BLOCK",
"candlestick": {"value": "1day", "options": ... | 34.893939 | 83 | 0.413808 |
b3c5fd2a3aecd3f583d5a5a3cd4b010d106cb3e1 | 18,217 | py | Python | blueoil/post_processor.py | Joeper214/blueoil | 5aeb6634770011753b8d5ae283b91b7a0050101e | [
"Apache-2.0"
] | null | null | null | blueoil/post_processor.py | Joeper214/blueoil | 5aeb6634770011753b8d5ae283b91b7a0050101e | [
"Apache-2.0"
] | null | null | null | blueoil/post_processor.py | Joeper214/blueoil | 5aeb6634770011753b8d5ae283b91b7a0050101e | [
"Apache-2.0"
] | 1 | 2018-12-21T05:21:04.000Z | 2018-12-21T05:21:04.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... | 37.253579 | 232 | 0.59966 |
d89a539406ba433051bf42e87f643a501456d5be | 8,363 | py | Python | gitrevise/todo.py | aureliojargas/git-revise | 6f9b02afb46d17fd52bcdd8599026bf167f74628 | [
"MIT"
] | null | null | null | gitrevise/todo.py | aureliojargas/git-revise | 6f9b02afb46d17fd52bcdd8599026bf167f74628 | [
"MIT"
] | null | null | null | gitrevise/todo.py | aureliojargas/git-revise | 6f9b02afb46d17fd52bcdd8599026bf167f74628 | [
"MIT"
] | null | null | null | import re
from enum import Enum
from typing import List, Optional
from .odb import Commit, Repository
from .utils import run_editor, edit_commit_message, cut_commit
class StepKind(Enum):
PICK = "pick"
FIXUP = "fixup"
SQUASH = "squash"
REWORD = "reword"
CUT = "cut"
INDEX = "index"
def __s... | 32.796078 | 93 | 0.611503 |
0266da1336153325fe66ff44b8e0e2b4f7feab8a | 26,818 | py | Python | imperative/python/megengine/functional/tensor.py | Neutron3529/MegEngine | 91a3580f751ed5ca4d17f1305f8614cec438b87e | [
"Apache-2.0"
] | 1 | 2021-03-25T01:13:24.000Z | 2021-03-25T01:13:24.000Z | imperative/python/megengine/functional/tensor.py | Neutron3529/MegEngine | 91a3580f751ed5ca4d17f1305f8614cec438b87e | [
"Apache-2.0"
] | null | null | null | imperative/python/megengine/functional/tensor.py | Neutron3529/MegEngine | 91a3580f751ed5ca4d17f1305f8614cec438b87e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | 26.952764 | 109 | 0.581214 |
0ac5640e58ef442e2cea053a8c131eef1b650071 | 9,656 | py | Python | python/opae.admin/opae/admin/utils/database.py | OPAE/opae-sdk | 7140533d5383e144aeedda9e8cf63fe24854af33 | [
"BSD-3-Clause"
] | 220 | 2017-09-02T20:07:11.000Z | 2022-03-01T03:53:35.000Z | python/opae.admin/opae/admin/utils/database.py | OPAE/opae-sdk | 7140533d5383e144aeedda9e8cf63fe24854af33 | [
"BSD-3-Clause"
] | 1,335 | 2017-11-05T03:02:55.000Z | 2022-03-29T23:14:06.000Z | python/opae.admin/opae/admin/utils/database.py | OPAE/opae-sdk | 7140533d5383e144aeedda9e8cf63fe24854af33 | [
"BSD-3-Clause"
] | 80 | 2017-09-01T21:28:16.000Z | 2022-03-09T08:04:05.000Z | # Copyright(c) 2019-2021, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the fo... | 34.241135 | 83 | 0.633078 |
0daa9bdd62f174153470653c99f32c0f3fe8190d | 16,763 | py | Python | qiskit/aqua/operators/state_fns/circuit_state_fn.py | johannes-weidenfeller/qiskit-aqua | 7775410f4dabf09ec9f933bf411ead434550accf | [
"Apache-2.0"
] | null | null | null | qiskit/aqua/operators/state_fns/circuit_state_fn.py | johannes-weidenfeller/qiskit-aqua | 7775410f4dabf09ec9f933bf411ead434550accf | [
"Apache-2.0"
] | 2 | 2020-10-07T17:11:48.000Z | 2020-10-14T16:51:22.000Z | qiskit/aqua/operators/state_fns/circuit_state_fn.py | johannes-weidenfeller/qiskit-aqua | 7775410f4dabf09ec9f933bf411ead434550accf | [
"Apache-2.0"
] | 1 | 2020-03-27T19:38:14.000Z | 2020-03-27T19:38:14.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 46.052198 | 100 | 0.632763 |
d065e78142c0fb63f41dcde41c01f7dc894f1afd | 2,271 | py | Python | utils/elontwitter.py | defCoding/s.p.i.d.e.r. | d2c50a675910b3dce31447897220a7ef28387c1e | [
"MIT"
] | 2 | 2022-03-26T23:13:29.000Z | 2022-03-26T23:15:24.000Z | utils/elontwitter.py | defCoding/s.p.i.d.e.r. | d2c50a675910b3dce31447897220a7ef28387c1e | [
"MIT"
] | null | null | null | utils/elontwitter.py | defCoding/s.p.i.d.e.r. | d2c50a675910b3dce31447897220a7ef28387c1e | [
"MIT"
] | 1 | 2022-01-14T02:06:59.000Z | 2022-01-14T02:06:59.000Z | import requests
class ElonTwitter:
"""
Connects to Elon Musk's Twitter account and reads his tweets.
"""
def __init__(self, key, secret, token):
"""
Initializes the ElonTwitter object.
Params:
- key (string) : Consumer API Key from Twitter.
- secret (string) : ... | 29.881579 | 103 | 0.593131 |
c6ed445a899ed138ed08a3fcd3d8a4b793ce87e7 | 25,365 | py | Python | nfv/nfv-vim/nfv_vim/rpc/_rpc_message_instance.py | SidneyAn/nfv | 5f0262a5b6ea4be59f977b9c587c483cbe0e373d | [
"Apache-2.0"
] | 2 | 2020-02-07T19:01:36.000Z | 2022-02-23T01:41:46.000Z | nfv/nfv-vim/nfv_vim/rpc/_rpc_message_instance.py | SidneyAn/nfv | 5f0262a5b6ea4be59f977b9c587c483cbe0e373d | [
"Apache-2.0"
] | 1 | 2021-01-14T12:02:25.000Z | 2021-01-14T12:02:25.000Z | nfv/nfv-vim/nfv_vim/rpc/_rpc_message_instance.py | SidneyAn/nfv | 5f0262a5b6ea4be59f977b9c587c483cbe0e373d | [
"Apache-2.0"
] | 2 | 2021-01-13T08:39:21.000Z | 2022-02-09T00:21:55.000Z | #
# Copyright (c) 2015-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from nfv_common import debug
from nfv_vim.rpc._rpc_defs import RPC_MSG_RESULT
from nfv_vim.rpc._rpc_defs import RPC_MSG_TYPE
from nfv_vim.rpc._rpc_defs import RPC_MSG_VERSION
from nfv_vim.rpc._rpc_message import RPCMessage
... | 33.955823 | 79 | 0.612695 |
29b2ec095dc7433da4a5ead45aebd39eb60139ea | 1,434 | py | Python | twitter_api_v2/Poll.py | OldBigBuddha/twitter-api-v2-py | e64185e85725a7ca41a5b8cf6b4bff114e17a98f | [
"MIT"
] | 1 | 2020-11-05T14:29:37.000Z | 2020-11-05T14:29:37.000Z | twitter_api_v2/Poll.py | OldBigBuddha/twitter-api-v2-py | e64185e85725a7ca41a5b8cf6b4bff114e17a98f | [
"MIT"
] | null | null | null | twitter_api_v2/Poll.py | OldBigBuddha/twitter-api-v2-py | e64185e85725a7ca41a5b8cf6b4bff114e17a98f | [
"MIT"
] | null | null | null | from datetime import datetime
from enum import Enum
from typing import Dict, List, Optional
from twitter_api_v2.util import get_additional_field
class Status(Enum):
OPEN: str = "open"
CLOSED: str = "closed"
def __str__(self) -> str:
return self.value
class Option:
def __init__(self, data:... | 26.555556 | 84 | 0.619247 |
18f810299fa5f21a935fcfbff5da9da129c8f1b2 | 15,877 | py | Python | pypureclient/flasharray/FA_2_11/api/offloads_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_11/api/offloads_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_11/api/offloads_api.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.11
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re
# pyt... | 46.834808 | 671 | 0.641494 |
7cb2cb1983e1d36963d399aa2def7dba3946672e | 2,524 | py | Python | graphics/northpolar.py | SDRAST/support | ebe081692fc8c892c1389156e979d5baa7f8f0e6 | [
"Apache-2.0"
] | null | null | null | graphics/northpolar.py | SDRAST/support | ebe081692fc8c892c1389156e979d5baa7f8f0e6 | [
"Apache-2.0"
] | null | null | null | graphics/northpolar.py | SDRAST/support | ebe081692fc8c892c1389156e979d5baa7f8f0e6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
from http://stackoverflow.com/questions/2417794/how-to-make-the-angles-in-a-matplotlib-polar-plot-go-clockwise-with-0-at-the-top
"""
import numpy as N
import matplotlib.pyplot as P
from matplotlib.projections import PolarAxes, register_projection
from matplotlib.transforms import Affine2D,... | 31.55 | 128 | 0.59588 |
35a85099413db77ecb30582fe8664f9f0e8bcf58 | 258 | py | Python | test_package_installer/conanfile.py | madebr/conan-vulkan_lunarg | d805ad7c8628587033140dd8bf458c798f355165 | [
"MIT"
] | 4 | 2019-06-08T23:54:02.000Z | 2020-11-10T20:57:54.000Z | test_package_installer/conanfile.py | madebr/conan-lunarg_vulkan_sdk | d805ad7c8628587033140dd8bf458c798f355165 | [
"MIT"
] | 1 | 2019-08-16T13:27:59.000Z | 2019-08-16T13:27:59.000Z | test_package_installer/conanfile.py | madebr/conan-lunarg_vulkan_sdk | d805ad7c8628587033140dd8bf458c798f355165 | [
"MIT"
] | 2 | 2019-07-30T20:52:50.000Z | 2020-06-26T11:00:52.000Z | # -*- coding: utf-8 -*-
from conans import ConanFile, tools, RunEnvironment
class VulkanTestConan(ConanFile):
exports_sources = ['shader.frag', ]
def test(self):
self.run('glslangValidator -V "{}/shader.frag"'.format(self.source_folder))
| 23.454545 | 83 | 0.682171 |
aad0f6749555b0d7434b43a2f241c2561739f564 | 5,851 | py | Python | evaluation/registry/first_run_gear_images.py | seveirbian/gear-old | 8d3529a9bf42e652a9d7475c9d14e9a6afc69a76 | [
"Apache-2.0"
] | null | null | null | evaluation/registry/first_run_gear_images.py | seveirbian/gear-old | 8d3529a9bf42e652a9d7475c9d14e9a6afc69a76 | [
"Apache-2.0"
] | null | null | null | evaluation/registry/first_run_gear_images.py | seveirbian/gear-old | 8d3529a9bf42e652a9d7475c9d14e9a6afc69a76 | [
"Apache-2.0"
] | null | null | null | import sys
# package need to be installed, pip install docker
import docker
import time
import yaml
import os
import random
import subprocess
import signal
import urllib2
import shutil
import xlwt
# package need to be installed, apt-get install python-mysqldb
import MySQLdb
auto = False
private_registry = "202.114.1... | 29.109453 | 109 | 0.495471 |
5fe13e07af4b61975b93dcef89a86f91387072a2 | 19,105 | py | Python | nemo/collections/nlp/models/text_normalization_as_tagging/thutmose_tagger.py | gkucsko/NeMo | c1ae0a7744d9a0ac206f61b2883ce00c9b8339b9 | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/models/text_normalization_as_tagging/thutmose_tagger.py | gkucsko/NeMo | c1ae0a7744d9a0ac206f61b2883ce00c9b8339b9 | [
"Apache-2.0"
] | 1 | 2022-03-06T14:09:02.000Z | 2022-03-06T14:09:02.000Z | nemo/collections/nlp/models/text_normalization_as_tagging/thutmose_tagger.py | gkucsko/NeMo | c1ae0a7744d9a0ac206f61b2883ce00c9b8339b9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022, NVIDIA CORPORATION & 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 45.596659 | 144 | 0.651348 |
f6d6c1fa73e75e63aaa3e42e28e77bb0317e5b51 | 4,875 | py | Python | src/tinerator/meshing/triangulation.py | lanl/tinerator | b34112f01d64801b6539650af2e40edff33f9f9b | [
"BSD-3-Clause"
] | 2 | 2021-09-13T17:10:25.000Z | 2021-09-17T18:36:21.000Z | src/tinerator/meshing/triangulation.py | lanl/tinerator | b34112f01d64801b6539650af2e40edff33f9f9b | [
"BSD-3-Clause"
] | 15 | 2021-08-16T18:23:58.000Z | 2022-02-03T04:38:24.000Z | src/tinerator/meshing/triangulation.py | lanl/tinerator | b34112f01d64801b6539650af2e40edff33f9f9b | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from typing import Union, List
from .mesh import Mesh
from .triangulation_jigsaw import triangulation_jigsaw
from .triangulation_meshpy import triangulation_meshpy
from ..logging import warn, debug, log
from ..gis import Raster, Geometry
TRIANGULATION_METHODS = {
"default": triangulation_meshpy,... | 40.289256 | 126 | 0.690462 |
05870b75b5f282e32d574b68e15acd3333a98884 | 4,865 | py | Python | Lab1_News_Parser/main.py | PVSemk/NLPLabs | eda94a54f9f74f36a222bd1ac00cbd972760ad17 | [
"MIT"
] | null | null | null | Lab1_News_Parser/main.py | PVSemk/NLPLabs | eda94a54f9f74f36a222bd1ac00cbd972760ad17 | [
"MIT"
] | null | null | null | Lab1_News_Parser/main.py | PVSemk/NLPLabs | eda94a54f9f74f36a222bd1ac00cbd972760ad17 | [
"MIT"
] | null | null | null | from selenium import webdriver
import time
from selenium.webdriver.chrome.options import Options
import json
from argparse import ArgumentParser
import os
def parse_args():
parser = ArgumentParser("Scrapper for bbc.com")
parser.add_argument(
"--driver-path",
"-dp",
type=str,
de... | 38.007813 | 152 | 0.55334 |
05934bce3902223f0adbc195f83ed5343003b19c | 1,257 | bzl | Python | src/test/java/com/google/devtools/build/skydoc/testdata/providers_for_attributes_test/input.bzl | kjlubick/bazel | 6f0913e6e75477ec297430102a8213333a12967e | [
"Apache-2.0"
] | 16,989 | 2015-09-01T19:57:15.000Z | 2022-03-31T23:54:00.000Z | src/test/java/com/google/devtools/build/skydoc/testdata/providers_for_attributes_test/input.bzl | FreyaVPN/bazel | b4cc44c978bc0e25b6652b66018b6aad12bff820 | [
"Apache-2.0"
] | 12,562 | 2015-09-01T09:06:01.000Z | 2022-03-31T22:26:20.000Z | src/test/java/com/google/devtools/build/skydoc/testdata/providers_for_attributes_test/input.bzl | FreyaVPN/bazel | b4cc44c978bc0e25b6652b66018b6aad12bff820 | [
"Apache-2.0"
] | 3,707 | 2015-09-02T19:20:01.000Z | 2022-03-31T17:06:14.000Z | """The input file for the providers for attributes test"""
load(":testdata/providers_for_attributes_test/dep.bzl", "DepProviderInfo")
def my_rule_impl(ctx):
return []
MyProviderInfo = provider(
fields = {
"foo": "Something foo-related.",
"bar": "Something bar-related.",
},
)
OtherProvide... | 29.232558 | 104 | 0.59825 |
d780339d313d1f2c142f93760ad4fc67dd3676d2 | 12,769 | py | Python | dexapi/__init__.py | kayrauygun/dexapi | 06da6a47bc76b296938be77bc915cdb89a0efbc0 | [
"MIT"
] | 1 | 2022-03-16T16:26:58.000Z | 2022-03-16T16:26:58.000Z | dexapi/__init__.py | kayrauygun/dexapi | 06da6a47bc76b296938be77bc915cdb89a0efbc0 | [
"MIT"
] | null | null | null | dexapi/__init__.py | kayrauygun/dexapi | 06da6a47bc76b296938be77bc915cdb89a0efbc0 | [
"MIT"
] | null | null | null | import pandas as pd
import requests
import datetime
class dexAPI:
def __init__(self, api_key, network="ethereum"):
"""
A Python wrapper class for bitquery.io DEX API.
:param api_key: str, API key provided by bitquery.io
:param network: str, optional, default = "ethereum", Ethereum... | 39.778816 | 120 | 0.54366 |
f5707589f2ceab998de41f8cb11aea1c25fe451f | 9,209 | py | Python | src/fi_parliament_tools/postprocessing.py | aalto-speech/fi-parliament-tools | c40ab81a23c661765c380238cbf10acf733d94d4 | [
"MIT"
] | 5 | 2021-05-19T22:56:40.000Z | 2022-03-29T15:25:03.000Z | src/fi_parliament_tools/postprocessing.py | aalto-speech/fi-parliament-tools | c40ab81a23c661765c380238cbf10acf733d94d4 | [
"MIT"
] | 32 | 2021-05-10T07:58:57.000Z | 2022-03-01T08:02:11.000Z | src/fi_parliament_tools/postprocessing.py | aalto-speech/fi-parliament-tools | c40ab81a23c661765c380238cbf10acf733d94d4 | [
"MIT"
] | null | null | null | """Command line client logic for postprocessing Finnish parliament data."""
import json
import re
from datetime import date
from logging import Logger
from pathlib import Path
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
import pandas as pd... | 42.437788 | 104 | 0.611467 |
5655753c37e8fa498dfd90cb737f9f7541191f70 | 55,848 | py | Python | src/transformers/models/electra/modeling_electra.py | Askinkaty/transformers | 8c0e1c974a8bedbfbc1a02b185ba4731b6ec0a27 | [
"Apache-2.0"
] | 1 | 2021-04-22T02:04:10.000Z | 2021-04-22T02:04:10.000Z | src/transformers/models/electra/modeling_electra.py | Askinkaty/transformers | 8c0e1c974a8bedbfbc1a02b185ba4731b6ec0a27 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/electra/modeling_electra.py | Askinkaty/transformers | 8c0e1c974a8bedbfbc1a02b185ba4731b6ec0a27 | [
"Apache-2.0"
] | 1 | 2021-10-10T21:13:00.000Z | 2021-10-10T21:13:00.000Z | # coding=utf-8
# Copyright 2019 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# 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/LICEN... | 41.522677 | 168 | 0.664984 |
499ded9ad86dc421b347552e80090b43c1979b44 | 4,233 | py | Python | model.py | Chinmayrane16/DeepRecommender | cce620dc5d5abafc3a8e6607e1a7ac4fa7dbe3e4 | [
"MIT"
] | 21 | 2019-06-07T07:35:52.000Z | 2021-03-11T09:39:22.000Z | model.py | Chinmayrane16/DeepRecommender | cce620dc5d5abafc3a8e6607e1a7ac4fa7dbe3e4 | [
"MIT"
] | 1 | 2021-02-25T06:36:02.000Z | 2021-02-25T08:53:32.000Z | model.py | Chinmayrane16/DeepRecommender | cce620dc5d5abafc3a8e6607e1a7ac4fa7dbe3e4 | [
"MIT"
] | 3 | 2019-08-26T13:33:00.000Z | 2021-01-13T05:00:34.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from loss import MSEloss_with_Mask
def activation(input, type):
if type.lower()=='selu':
return F.selu(input)
elif type.lower()=='elu':
return F.elu(input)
elif type.lower()=='relu':
... | 36.179487 | 177 | 0.637373 |
18b5593ab0984d2cf7f4d51584fc34f7e5983505 | 1,724 | py | Python | gunicorn_config.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 41 | 2019-11-28T16:58:41.000Z | 2022-01-28T21:11:16.000Z | gunicorn_config.py | cds-snc/notification-api | b1c1064f291eb860b494c3fa65ac256ad70bf47c | [
"MIT"
] | 1,083 | 2019-07-08T12:57:24.000Z | 2022-03-08T18:53:40.000Z | gunicorn_config.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 9 | 2020-01-24T19:56:43.000Z | 2022-01-27T21:36:53.000Z | import os
import sys
import traceback
import newrelic.agent # See https://bit.ly/2xBVKBH
newrelic.agent.initialize() # noqa: E402
workers = 4
worker_class = "eventlet"
worker_connections = 256
bind = "0.0.0.0:{}".format(os.getenv("PORT"))
accesslog = "-"
on_aws = os.environ.get("NOTIFY_ENVIRONMENT", "") in ["prod... | 33.153846 | 129 | 0.726218 |
bcf572d79dca464b8c0b54b008e70caa33f75425 | 1,537 | py | Python | afrikpay_pip_sdk/Account.py | Georges-Ngandeu/AfrikpayPythonSdk | 346061ca08a10f2a185359ff589e0d4e9adb16da | [
"MIT"
] | null | null | null | afrikpay_pip_sdk/Account.py | Georges-Ngandeu/AfrikpayPythonSdk | 346061ca08a10f2a185359ff589e0d4e9adb16da | [
"MIT"
] | null | null | null | afrikpay_pip_sdk/Account.py | Georges-Ngandeu/AfrikpayPythonSdk | 346061ca08a10f2a185359ff589e0d4e9adb16da | [
"MIT"
] | null | null | null | import requests, hashlib
class Account:
def __init__(
self,
agentId,
agentPlatform,
apiKey,
transactionStatusUrl = 'http://35.204.26.22:8086/api/account/transaction/status/',
balanceUrl = 'http://35.204.26.22:8086/api/account/agent/balance/v2/',
changeKeyUrl ... | 32.020833 | 90 | 0.603774 |
2755d2de265c72df6fd528c22556dea573def952 | 5,450 | py | Python | linebot/models/actions.py | 4rkans/arkan | 033e1b12e45c2bc73c9c0f8a19bc1541f76370f1 | [
"Apache-2.0"
] | null | null | null | linebot/models/actions.py | 4rkans/arkan | 033e1b12e45c2bc73c9c0f8a19bc1541f76370f1 | [
"Apache-2.0"
] | null | null | null | linebot/models/actions.py | 4rkans/arkan | 033e1b12e45c2bc73c9c0f8a19bc1541f76370f1 | [
"Apache-2.0"
] | 1 | 2018-07-22T14:58:29.000Z | 2018-07-22T14:58:29.000Z | # -*- coding: utf-8 -*-
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 30.446927 | 94 | 0.644771 |
6caa5346279249f2302b7a99c43ee4d45556a405 | 15,282 | py | Python | lib/python3.5/site-packages/twilio/rest/ip_messaging/v1/credential.py | karvindass/shiny-broccoli | afe20be1ef12e8533185b48ab0f08313eec3ba26 | [
"MIT"
] | 1 | 2017-12-29T10:20:51.000Z | 2017-12-29T10:20:51.000Z | lib/python3.5/site-packages/twilio/rest/ip_messaging/v1/credential.py | karvindass/shiny-broccoli | afe20be1ef12e8533185b48ab0f08313eec3ba26 | [
"MIT"
] | 2 | 2021-03-31T18:31:06.000Z | 2021-12-13T19:46:40.000Z | lib/python3.5/site-packages/twilio/rest/ip_messaging/v1/credential.py | karvindass/shiny-broccoli | afe20be1ef12e8533185b48ab0f08313eec3ba26 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.... | 30.261386 | 92 | 0.595603 |
98e18e63a19bc800a7000df3141e16311e4af7a5 | 2,160 | py | Python | epytope/Data/pssms/tepitopepan/mat/DRB1_0467_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:11:28.000Z | 2022-01-31T19:14:07.000Z | epytope/Data/pssms/tepitopepan/mat/DRB1_0467_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 22 | 2021-01-02T15:25:23.000Z | 2022-03-14T11:32:53.000Z | epytope/Data/pssms/tepitopepan/mat/DRB1_0467_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 4 | 2021-05-28T08:50:38.000Z | 2022-03-14T11:45:32.000Z | DRB1_0467_9 = {0: {'A': -999.0, 'E': -999.0, 'D': -999.0, 'G': -999.0, 'F': -0.98558, 'I': -0.014418, 'H': -999.0, 'K': -999.0, 'M': -0.014418, 'L': -0.014418, 'N': -999.0, 'Q': -999.0, 'P': -999.0, 'S': -999.0, 'R': -999.0, 'T': -999.0, 'W': -0.98558, 'V': -0.014418, 'Y': -0.98558}, 1: {'A': 0.0, 'E': 0.1, 'D': -1.3, ... | 2,160 | 2,160 | 0.394907 |
7c89403699f18a4b73ff877dc526ef79f4ad7d7c | 2,584 | py | Python | templates/jumpscale/deployerbot/actions.py | Jumpscale/ays_jumpscale8 | 4ff4a2fb3b95de6f46ea494bd5b5a2a0fb9ecdb1 | [
"Apache-2.0"
] | null | null | null | templates/jumpscale/deployerbot/actions.py | Jumpscale/ays_jumpscale8 | 4ff4a2fb3b95de6f46ea494bd5b5a2a0fb9ecdb1 | [
"Apache-2.0"
] | 148 | 2016-03-21T08:45:34.000Z | 2021-09-08T12:28:55.000Z | templates/jumpscale/deployerbot/actions.py | Jumpscale/ays_jumpscale8 | 4ff4a2fb3b95de6f46ea494bd5b5a2a0fb9ecdb1 | [
"Apache-2.0"
] | null | null | null | def install(job):
import os
import yaml
service = job.service
cuisine = service.executor.cuisine
args = service.model.data
# Install dependencies
cuisine.development.js8.install()
cuisine.apps.redis.build(reset=True)
cuisine.apps.redis.start(maxram="200mb")
cuisine.solutions.co... | 34 | 117 | 0.601393 |
fa9fb5fc6055f7e1268e3385530983c6ce4c4cf9 | 1,548 | py | Python | ckanext/dalrrd_emc_dcpr/cli/_bootstrap_data.py | Fanevanjanahary/ckanext-dalrrd-emc-dcpr | f95bd512ddfb4d06609090c9b5c5b99fdae4d37b | [
"MIT"
] | null | null | null | ckanext/dalrrd_emc_dcpr/cli/_bootstrap_data.py | Fanevanjanahary/ckanext-dalrrd-emc-dcpr | f95bd512ddfb4d06609090c9b5c5b99fdae4d37b | [
"MIT"
] | null | null | null | ckanext/dalrrd_emc_dcpr/cli/_bootstrap_data.py | Fanevanjanahary/ckanext-dalrrd-emc-dcpr | f95bd512ddfb4d06609090c9b5c5b99fdae4d37b | [
"MIT"
] | null | null | null | import typing
from . import _CkanBootstrapOrganization
SASDI_ORGANIZATIONS: typing.Final[typing.List[_CkanBootstrapOrganization]] = [
_CkanBootstrapOrganization(
title="NSIF",
description=(
"The National Spatial Information Framework (NSIF) is a directorate "
"established ... | 45.529412 | 83 | 0.653101 |
15dadac13359a5d1bf54da4f92ab1d7a1fb3a6cb | 6,649 | py | Python | tests/v2/test_models.py | benchuang11046/afs2-model | c821f078a2c1379b16273dc34d5d488a3d032f06 | [
"Apache-2.0"
] | 2 | 2019-05-27T06:19:33.000Z | 2021-01-24T14:39:25.000Z | tests/v2/test_models.py | benchuang11046/afs2-model | c821f078a2c1379b16273dc34d5d488a3d032f06 | [
"Apache-2.0"
] | 24 | 2019-04-26T02:02:02.000Z | 2020-05-14T10:18:55.000Z | tests/v2/test_models.py | benchuang11046/afs2-model | c821f078a2c1379b16273dc34d5d488a3d032f06 | [
"Apache-2.0"
] | null | null | null | from uuid import UUID
import pytest
def test_create_model(test_env, afs_models, clean_mr, delete_mr_and_model, model_file, model_repository_name):
resp = afs_models.upload_model(
model_path="unit_test_model",
accuracy=1.0,
loss=1.0,
tags={"tag_key": "tag_value"},
extra_eval... | 34.630208 | 133 | 0.689878 |
a19b6926580a80ea0e4a517670e5c70a68ec050d | 318 | py | Python | project_name/settings/prod.py | hotbaby/django-project-skeleton | 41ee89fa96e0df26157d5aea92ce9bcf731c0e13 | [
"MIT"
] | 1 | 2019-01-11T10:10:43.000Z | 2019-01-11T10:10:43.000Z | project_name/settings/prod.py | hotbaby/django-project-skeleton | 41ee89fa96e0df26157d5aea92ce9bcf731c0e13 | [
"MIT"
] | 3 | 2018-12-18T12:15:28.000Z | 2020-06-05T19:38:46.000Z | project_name/settings/prod.py | hotbaby/django-project-skeleton | 41ee89fa96e0df26157d5aea92ce9bcf731c0e13 | [
"MIT"
] | null | null | null | # encoding: utf8
import os
from .base import * # NOQA
from .base import DEFAULT_APPS, PROJECT_ROOT
DEBUG = False
ALLOWED_HOSTS = []
INSTALLED_APPS = DEFAULT_APPS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(PROJECT_ROOT, 'prod.sqlite3'),
}
}
| 16.736842 | 59 | 0.650943 |
214913fb9c2a5506980b9fdd3b40d20b97b80170 | 40,421 | py | Python | tests/blockchain/test_blockchain_transactions.py | Tad-Network/tad-blockchain | 2e80d4197b05f167de67e80241176ffc6ac4ca69 | [
"Apache-2.0"
] | 13 | 2021-07-20T15:21:54.000Z | 2022-02-09T04:32:56.000Z | tests/blockchain/test_blockchain_transactions.py | Tad-Network/tad-blockchain | 2e80d4197b05f167de67e80241176ffc6ac4ca69 | [
"Apache-2.0"
] | 8 | 2021-07-21T17:22:59.000Z | 2021-09-18T23:01:59.000Z | tests/blockchain/test_blockchain_transactions.py | Tad-Network/tad-blockchain | 2e80d4197b05f167de67e80241176ffc6ac4ca69 | [
"Apache-2.0"
] | 1 | 2021-07-20T18:14:02.000Z | 2021-07-20T18:14:02.000Z | import asyncio
import logging
import pytest
from clvm.casts import int_to_bytes
from tad.consensus.blockchain import ReceiveBlockResult
from tad.protocols import full_node_protocol
from tad.types.announcement import Announcement
from tad.types.condition_opcodes import ConditionOpcode
from tad.types.condition_with_arg... | 39.745329 | 115 | 0.678855 |
d463c8087889eac0eca42eb2dbd8bb4f81e4293c | 1,175 | py | Python | desietcimg/scripts/webserve.py | dkirkby/desietcimg | c46c5df2020d7d2cb6712a64aaca9283ec9cd5e2 | [
"MIT"
] | 1 | 2021-01-06T19:43:10.000Z | 2021-01-06T19:43:10.000Z | desietcimg/scripts/webserve.py | dkirkby/desietcimg | c46c5df2020d7d2cb6712a64aaca9283ec9cd5e2 | [
"MIT"
] | null | null | null | desietcimg/scripts/webserve.py | dkirkby/desietcimg | c46c5df2020d7d2cb6712a64aaca9283ec9cd5e2 | [
"MIT"
] | 1 | 2021-01-06T19:43:15.000Z | 2021-01-06T19:43:15.000Z | import argparse
import logging
from http.server import HTTPServer, SimpleHTTPRequestHandler
from socketserver import TCPServer
class LoggingHandler(SimpleHTTPRequestHandler):
def log_message(self, format, *args):
logging.info(format % args)
def webserve():
parser = argparse.ArgumentParser(
d... | 37.903226 | 103 | 0.700426 |
61db34df78c4bed48926b7c425f95e1192ac9249 | 3,363 | py | Python | kalliope/neurons/script/tests/test_script.py | G10DRAS/kalliope | 4c6586bd4c5ff0ca2b51cbf02f042d9ed0c9742d | [
"MIT"
] | null | null | null | kalliope/neurons/script/tests/test_script.py | G10DRAS/kalliope | 4c6586bd4c5ff0ca2b51cbf02f042d9ed0c9742d | [
"MIT"
] | null | null | null | kalliope/neurons/script/tests/test_script.py | G10DRAS/kalliope | 4c6586bd4c5ff0ca2b51cbf02f042d9ed0c9742d | [
"MIT"
] | null | null | null | import os
import time
import unittest
from kalliope.core.NeuronModule import MissingParameterException, InvalidParameterException
from kalliope.neurons.script.script import Script
class TestScript(unittest.TestCase):
def setUp(self):
self.path = "path"
self.random = "random"
self.test_fi... | 28.991379 | 91 | 0.608385 |
c07e070d7f97896ff86da14378fa946b84df1fa8 | 5,737 | py | Python | autoencoder.py | Phoenix-Chen/butterflies | 06abf393c69f7a7c54d4e8a8775de81de7908285 | [
"MIT"
] | 45 | 2019-12-26T10:36:47.000Z | 2022-03-30T12:17:45.000Z | autoencoder.py | Phoenix-Chen/butterflies | 06abf393c69f7a7c54d4e8a8775de81de7908285 | [
"MIT"
] | 1 | 2022-02-04T02:54:05.000Z | 2022-02-04T02:54:05.000Z | autoencoder.py | Phoenix-Chen/butterflies | 06abf393c69f7a7c54d4e8a8775de81de7908285 | [
"MIT"
] | 8 | 2019-12-27T08:51:40.000Z | 2022-02-04T01:29:23.000Z | import torch
import torch.nn as nn
standard_normal_distribution = torch.distributions.normal.Normal(0, 1)
class Lambda(nn.Module):
def __init__(self, function):
super(Lambda, self).__init__()
self.function = function
def forward(self, x):
return self.function(x)
class PrintShape(nn.M... | 33.549708 | 171 | 0.595956 |
8ab1f914b3767466c8a8d9cfcf0ab805d24d0c8c | 2,124 | py | Python | ui/Rhino/RV2/dev/__temp/RV2cloud_cmd.py | tkmmark/compas-RV2 | bc18f4dada9c1e31a0f7df4ef981934c6d2b05b3 | [
"MIT"
] | null | null | null | ui/Rhino/RV2/dev/__temp/RV2cloud_cmd.py | tkmmark/compas-RV2 | bc18f4dada9c1e31a0f7df4ef981934c6d2b05b3 | [
"MIT"
] | null | null | null | ui/Rhino/RV2/dev/__temp/RV2cloud_cmd.py | tkmmark/compas-RV2 | bc18f4dada9c1e31a0f7df4ef981934c6d2b05b3 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas_rhino.ui import CommandMenu
from compas_rv2.rhino import get_proxy
__commandname__ = "RV2cloud"
def shutdown():
p = get_proxy()
p.shutdown()
def restart():
config = {
"nam... | 20.621359 | 80 | 0.416196 |
43db4550dde941c56a6068f65ab9d2fc9ed07c2c | 3,606 | py | Python | preprocess/rsvqa_resize_images.py | bgmartins/MBERT-VQA | 4cfaade5720f9f7850883ffca7dcfab651a5a56e | [
"MIT"
] | null | null | null | preprocess/rsvqa_resize_images.py | bgmartins/MBERT-VQA | 4cfaade5720f9f7850883ffca7dcfab651a5a56e | [
"MIT"
] | null | null | null | preprocess/rsvqa_resize_images.py | bgmartins/MBERT-VQA | 4cfaade5720f9f7850883ffca7dcfab651a5a56e | [
"MIT"
] | null | null | null | import os
import glob
import cv2
from PIL import Image
from torchvision import transforms
import h5py
from tqdm import tqdm
import numpy as np
LR = {'data_dir': 'Remote_Sensing_Datasets/RSVQA_LR',
'image_dir': 'Images',
'resize_dir': 'Images_Resized',
'extension': 'jpg'}
HR = {'dat... | 27.318182 | 102 | 0.587077 |
f24a83bd4c5b27734650debe1463cdabaf5f5d37 | 4,109 | py | Python | cmdb-cmdb/biz/handlers/aws_ebs_handler.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null | cmdb-cmdb/biz/handlers/aws_ebs_handler.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | 1 | 2022-01-04T13:53:16.000Z | 2022-01-04T13:53:16.000Z | cmdb-cmdb/biz/handlers/aws_ebs_handler.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null |
from libs.aws.tags import get_configs
from websdk.web_logs import ins_log
import boto3
from sqlalchemy import or_,exc
from websdk.db_context import DBContext
from models.db import Unattach_Ebs
from models.db import DBTag, DB, model_to_dict
from opssdk.operate import MyCryptV2
from libs.base_handler import BaseHandler
... | 45.655556 | 133 | 0.549769 |
73147115931f7adf31e46c82461862e155bcfd86 | 5,634 | py | Python | source/nonimage/defense/vanilla.py | DingfanChen/RelaxLoss | d21c82dee7016cd0cb6688a408104eeb0d832790 | [
"MIT"
] | 4 | 2022-02-08T06:39:13.000Z | 2022-03-27T13:57:13.000Z | source/nonimage/defense/vanilla.py | DingfanChen/RelaxLoss | d21c82dee7016cd0cb6688a408104eeb0d832790 | [
"MIT"
] | 1 | 2022-02-22T10:17:49.000Z | 2022-02-22T22:10:52.000Z | source/nonimage/defense/vanilla.py | DingfanChen/RelaxLoss | d21c82dee7016cd0cb6688a408104eeb0d832790 | [
"MIT"
] | null | null | null | import os
import sys
import argparse
import random
import shutil
import numpy as np
import torch
import torch.optim as optim
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(FILE_DIR, '../'))
sys.path.append(os.path.join(FILE_DIR, '../../'))
SAVE_ROOT = os.path.join(FILE_DIR, '../../.... | 44.362205 | 113 | 0.620696 |
5d6f69a929ac0bbecf22ead5c1638b37bd316505 | 2,364 | py | Python | Contrib/Fastcluster/fastcluster.py | kazuyaujihara/rdkit | 06027dcd05674787b61f27ba46ec0d42a6037540 | [
"BSD-3-Clause"
] | 1,609 | 2015-01-05T02:41:13.000Z | 2022-03-30T21:57:24.000Z | Contrib/Fastcluster/fastcluster.py | kazuyaujihara/rdkit | 06027dcd05674787b61f27ba46ec0d42a6037540 | [
"BSD-3-Clause"
] | 3,412 | 2015-01-06T12:13:33.000Z | 2022-03-31T17:25:41.000Z | Contrib/Fastcluster/fastcluster.py | bp-kelley/rdkit | e0de7c9622ce73894b1e7d9568532f6d5638058a | [
"BSD-3-Clause"
] | 811 | 2015-01-11T03:33:48.000Z | 2022-03-28T11:57:49.000Z | # Original Author: iwatobipen
#
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
"""
This script performs fast clustering of SMILES
Clustering method is repeated bi section, the m... | 34.764706 | 145 | 0.65736 |
4d8f3caf3f0af30b335c1bab25c4b9760c7bee8e | 6,117 | py | Python | pysnmp/RBN-ENVMON-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/RBN-ENVMON-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/RBN-ENVMON-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module RBN-ENVMON-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RBN-ENVMON-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:44:20 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 105.465517 | 876 | 0.754618 |
f9a25e204e18a75ea833d0713bb1a1b3f464e0c8 | 999 | py | Python | tests/test_jlse.py | buildtesters/buildtes | 0713d707185934b441502b54f4ba35f36f1d38bd | [
"MIT"
] | 29 | 2017-10-20T02:47:10.000Z | 2020-03-26T17:24:03.000Z | tests/test_jlse.py | shahzebsiddiqui/testgen-HPC | e69d9334cf2939af4fca59e75f397b0b1edbbfaf | [
"MIT"
] | 219 | 2017-08-25T13:21:53.000Z | 2020-04-18T19:07:05.000Z | tests/test_jlse.py | shahzebsiddiqui/BuildTest | 5a04641f37ba588c906112b3848249b241061a9c | [
"MIT"
] | 5 | 2017-08-24T11:20:30.000Z | 2020-02-21T04:28:40.000Z | import os
import socket
import pytest
from buildtest.cli.build import BuildTest
from buildtest.cli.compilers import BuildtestCompilers
from buildtest.config import SiteConfiguration
from buildtest.system import BuildTestSystem
from buildtest.utils.file import walk_tree
hostname = socket.getfqdn()
def test_jlse():
... | 27 | 87 | 0.738739 |
2d33c949e43aa1486cd25afbb123b9104c26eeae | 5,376 | py | Python | doc/conf.py | chrisjbremner/pyads | e9f525fd53783ee96d94f74d223d231f2bf189e2 | [
"MIT"
] | null | null | null | doc/conf.py | chrisjbremner/pyads | e9f525fd53783ee96d94f74d223d231f2bf189e2 | [
"MIT"
] | null | null | null | doc/conf.py | chrisjbremner/pyads | e9f525fd53783ee96d94f74d223d231f2bf189e2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pyads documentation build configuration file, created by
# sphinx-quickstart on Sat Jul 15 09:35:19 2017.
#
# 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
# auto... | 29.059459 | 79 | 0.679501 |
e5d1011a0ec768bca1b62103e20a5bbb3d845e1d | 2,516 | py | Python | bot/drifter_main.py | IUNetSci/DrifterBot | 05c502fcf9a626321ca20ff83c7c7e5e03cd221d | [
"MIT"
] | 13 | 2020-05-28T21:18:26.000Z | 2022-02-21T09:19:23.000Z | bot/drifter_main.py | IUNetSci/DrifterBot | 05c502fcf9a626321ca20ff83c7c7e5e03cd221d | [
"MIT"
] | 5 | 2020-05-20T23:15:49.000Z | 2020-05-27T00:32:36.000Z | bot/drifter_main.py | IUNetSci/DrifterBot | 05c502fcf9a626321ca20ff83c7c7e5e03cd221d | [
"MIT"
] | 8 | 2020-08-17T10:52:12.000Z | 2022-01-20T15:48:15.000Z | from bot import Bot
from config_stat import activation_time
from datetime import datetime
from datetime import timedelta
import debug
import numpy as np
import os
import time
import random
import subprocess
import sys
def RandomizeTime(g=0.1, mmin=0, mmax=420, noise=True):
"""Sampled from a distribution."""
mins =... | 25.938144 | 133 | 0.661367 |
47141240790d1c95e9dc40ce5b968ff140d10999 | 1,503 | py | Python | python/core.py | dargkonide/pykins | 4bbdd799ca15cf8e92f80340a2899f770a05bdb0 | [
"MIT"
] | null | null | null | python/core.py | dargkonide/pykins | 4bbdd799ca15cf8e92f80340a2899f770a05bdb0 | [
"MIT"
] | null | null | null | python/core.py | dargkonide/pykins | 4bbdd799ca15cf8e92f80340a2899f770a05bdb0 | [
"MIT"
] | null | null | null | from importlib import import_module
from threading import Thread
# from multiprocessing import Process,Queue
from os.path import dirname
from socket import gethostname,gethostbyname,getfqdn
from queue import Queue
from time import time
from os import listdir
import os
target_path=os.path.abspath(dirname(__file__))
o... | 31.978723 | 108 | 0.602794 |
92fd66ff2010fd159673437a9b2249630096f02e | 480 | py | Python | leads/migrations/0010_lead_category.py | cashconnor/djangocrm | 635d3df4ee4be8e536ffcc828fe23627bca9ab8c | [
"MIT"
] | null | null | null | leads/migrations/0010_lead_category.py | cashconnor/djangocrm | 635d3df4ee4be8e536ffcc828fe23627bca9ab8c | [
"MIT"
] | 1 | 2021-12-30T16:18:49.000Z | 2021-12-30T16:18:49.000Z | leads/migrations/0010_lead_category.py | cashconnor/djangocrm | 635d3df4ee4be8e536ffcc828fe23627bca9ab8c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-07 20:28
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('leads', '0009_category'),
]
operations = [
migrations.AddField(
model_name='lead',
... | 24 | 125 | 0.633333 |
7426f240537de352facfc101230123c2cb70f8ae | 1,229 | py | Python | kale/wallet/wallet_action.py | grayfallstown/kale-blockchain | 1c426a15967813ece30f77b9b7584f2dc5ed554a | [
"Apache-2.0"
] | 23 | 2021-07-05T00:55:47.000Z | 2022-02-09T04:30:08.000Z | kale/wallet/wallet_action.py | grayfallstown/kale-blockchain | 1c426a15967813ece30f77b9b7584f2dc5ed554a | [
"Apache-2.0"
] | 14 | 2021-07-05T13:08:25.000Z | 2021-08-23T18:57:02.000Z | kale/wallet/wallet_action.py | grayfallstown/kale-blockchain | 1c426a15967813ece30f77b9b7584f2dc5ed554a | [
"Apache-2.0"
] | 5 | 2021-07-06T23:24:39.000Z | 2022-03-15T08:43:03.000Z | from dataclasses import dataclass
from typing import Optional
from kale.util.ints import uint32
from kale.wallet.util.wallet_types import WalletType
@dataclass(frozen=True)
class WalletAction:
"""
This object represents the wallet action as it is stored in the database.
Purpose:
Some wallets require... | 35.114286 | 111 | 0.747762 |
11d55daf4436dbf27b3b389690e4c04b7a183cc1 | 6,475 | py | Python | avwan_agent.py | facebookresearch/soundspaces-challenge | 8613c58683c34cad19b78adb30923805001521bb | [
"MIT"
] | 11 | 2021-02-17T06:20:16.000Z | 2022-03-21T02:37:56.000Z | avwan_agent.py | facebookresearch/soundspaces-challenge | 8613c58683c34cad19b78adb30923805001521bb | [
"MIT"
] | 4 | 2021-03-01T14:35:06.000Z | 2021-03-23T01:39:01.000Z | avwan_agent.py | facebookresearch/soundspaces-challenge | 8613c58683c34cad19b78adb30923805001521bb | [
"MIT"
] | 4 | 2021-04-13T20:38:13.000Z | 2021-11-06T13:58:31.000Z | #!/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 argparse
import os
import random
from collections import OrderedDict
import logging
import sys
import time
impor... | 31.896552 | 93 | 0.581776 |
5cc55d20f0975842b78390f802e98ea6418b7512 | 8,515 | py | Python | test/functional/assumevalid.py | yasirmx/Megacoin | f5066e2af768f1d8a4db84e47e1d095a0324570a | [
"MIT"
] | null | null | null | test/functional/assumevalid.py | yasirmx/Megacoin | f5066e2af768f1d8a4db84e47e1d095a0324570a | [
"MIT"
] | null | null | null | test/functional/assumevalid.py | yasirmx/Megacoin | f5066e2af768f1d8a4db84e47e1d095a0324570a | [
"MIT"
] | 1 | 2019-09-01T11:20:29.000Z | 2019-09-01T11:20:29.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 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 logic for skipping signature validation on old blocks.
Test logic for skipping signature validati... | 41.945813 | 107 | 0.624897 |
25c889a2c40b79ec8082189beb8ab6996a44600d | 21,276 | py | Python | tests/integration-tests/tests/common/schedulers_common.py | Takuya-Miyazaki/aws-parallelcluster | ef3393fe6430f9a6232cf0368b1d3177f1304b82 | [
"Apache-2.0"
] | 1 | 2021-02-28T13:12:09.000Z | 2021-02-28T13:12:09.000Z | tests/integration-tests/tests/common/schedulers_common.py | Takuya-Miyazaki/aws-parallelcluster | ef3393fe6430f9a6232cf0368b1d3177f1304b82 | [
"Apache-2.0"
] | null | null | null | tests/integration-tests/tests/common/schedulers_common.py | Takuya-Miyazaki/aws-parallelcluster | ef3393fe6430f9a6232cf0368b1d3177f1304b82 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
# with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file accom... | 37.391916 | 119 | 0.642649 |
3ff51c091e52bcff1e220adbf729178e4bc60525 | 508 | py | Python | day19/python/part_2/process.py | jabbalaci/AdventOfCode2019 | 893d1c8c6da9c3213cdb0e43c77f0f9a92406a48 | [
"MIT"
] | 2 | 2019-12-02T13:46:22.000Z | 2019-12-06T19:09:10.000Z | day19/python/part_2/process.py | jabbalaci/AdventOfCode2019 | 893d1c8c6da9c3213cdb0e43c77f0f9a92406a48 | [
"MIT"
] | null | null | null | day19/python/part_2/process.py | jabbalaci/AdventOfCode2019 | 893d1c8c6da9c3213cdb0e43c77f0f9a92406a48 | [
"MIT"
] | 1 | 2019-12-07T23:51:57.000Z | 2019-12-07T23:51:57.000Z | #!/usr/bin/env python3
INPUT = "p2.txt"
def print_header(size: int) -> None:
text = f"""
P1
# AoC 2019, Day 19, Part 2
{size} {size}
""".strip()
print(text)
def main() -> None:
with open(INPUT) as f:
lines = f.read().splitlines()
size = len(lines[0])
print_header(size)
for line i... | 16.387097 | 78 | 0.470472 |
e828652fa39420e9a0dee87f84d6839a5db8fc65 | 4,228 | py | Python | typo/typo_core.py | wojciech-gancza/typo | d7d9ca9016628f5b953deda731524ce5c20c21c0 | [
"MIT"
] | null | null | null | typo/typo_core.py | wojciech-gancza/typo | d7d9ca9016628f5b953deda731524ce5c20c21c0 | [
"MIT"
] | null | null | null | typo/typo_core.py | wojciech-gancza/typo | d7d9ca9016628f5b953deda731524ce5c20c21c0 | [
"MIT"
] | null | null | null | # (c) TYPO by WGan 2021
from typo_base import typo_error
from typo_tools import placeholders_info, gen_timestamp, gen_typo_version, \
gen_user_code, conv_CAPITALIZE_ALL, conv_lowercase_with_underscores, \
conv_UppercaseCamel, conv_lowercaseCamel
""" error - identifier not found when tranlating value """
cla... | 32.775194 | 101 | 0.596263 |
f6d8529a697ed93be360c924679156746f4a7c69 | 6,708 | py | Python | kvirt/k3s/__init__.py | eranco74/kcli | 666fe8343eef2d87ea8cd5d54984c4426f7fb96b | [
"Apache-2.0"
] | null | null | null | kvirt/k3s/__init__.py | eranco74/kcli | 666fe8343eef2d87ea8cd5d54984c4426f7fb96b | [
"Apache-2.0"
] | null | null | null | kvirt/k3s/__init__.py | eranco74/kcli | 666fe8343eef2d87ea8cd5d54984c4426f7fb96b | [
"Apache-2.0"
] | 1 | 2021-11-15T15:28:18.000Z | 2021-11-15T15:28:18.000Z | #!/usr/bin/env python
from distutils.spawn import find_executable
from kvirt.common import success, pprint, error, warning, get_kubectl, scp, _ssh_credentials, info2
import os
import sys
import yaml
cloudplatforms = ['aws', 'gcp']
def scale(config, plandir, cluster, overrides):
plan = cluster
data = {'clust... | 46.909091 | 115 | 0.621646 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.