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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
64b762b58172911616e280b85678c26dceabe66d | 2,782 | py | Python | mundiapi/models/update_pricing_scheme_request.py | hugocpolos/MundiAPI-PYTHON | 164545cc58bf18c946d5456e9ba4d55a378a339a | [
"MIT"
] | 10 | 2017-08-30T15:53:00.000Z | 2021-02-11T18:06:56.000Z | mundiapi/models/update_pricing_scheme_request.py | hugocpolos/MundiAPI-PYTHON | 164545cc58bf18c946d5456e9ba4d55a378a339a | [
"MIT"
] | 3 | 2020-02-20T08:24:05.000Z | 2021-07-22T14:18:33.000Z | mundiapi/models/update_pricing_scheme_request.py | hugocpolos/MundiAPI-PYTHON | 164545cc58bf18c946d5456e9ba4d55a378a339a | [
"MIT"
] | 7 | 2017-04-27T13:46:52.000Z | 2021-04-14T13:44:23.000Z | # -*- coding: utf-8 -*-
"""
mundiapi
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""
import mundiapi.models.update_price_bracket_request
class UpdatePricingSchemeRequest(object):
"""Implementation of the 'UpdatePricingSchemeRequest' model.
Request ... | 31.977011 | 137 | 0.604242 |
681a1d923545f802976d4bcf18a4febdb34ddf34 | 1,830 | py | Python | lr_for_the_masses/rr_mlm/mlm.py | samuel-velez/-533_lab_4_KatheVelez | d4d9b7ea7cd3d0ae896d9aee9ca3b316bd4166b2 | [
"MIT"
] | null | null | null | lr_for_the_masses/rr_mlm/mlm.py | samuel-velez/-533_lab_4_KatheVelez | d4d9b7ea7cd3d0ae896d9aee9ca3b316bd4166b2 | [
"MIT"
] | null | null | null | lr_for_the_masses/rr_mlm/mlm.py | samuel-velez/-533_lab_4_KatheVelez | d4d9b7ea7cd3d0ae896d9aee9ca3b316bd4166b2 | [
"MIT"
] | null | null | null | class linearmixedeffects():
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from statsmodels.regression import mixed_linear_model
import sklearn as sk
from math import sqrt
import statsmodels.api as sm
def __init__(self, respons... | 43.571429 | 176 | 0.660109 |
3942962e7ee40b2bf1df43a03e223da1c1e5707e | 1,037 | py | Python | tests/helpers.py | TheMOOCAgency/figures | 4f991ed32626c25b4d67300c9b8019a36c5db297 | [
"MIT"
] | 1 | 2020-07-27T19:50:53.000Z | 2020-07-27T19:50:53.000Z | tests/helpers.py | TheMOOCAgency/figures | 4f991ed32626c25b4d67300c9b8019a36c5db297 | [
"MIT"
] | 3 | 2020-06-05T21:19:02.000Z | 2022-02-10T18:09:04.000Z | tests/helpers.py | TheMOOCAgency/figures | 4f991ed32626c25b4d67300c9b8019a36c5db297 | [
"MIT"
] | null | null | null | '''Helper methods for Figures testing
'''
from dateutil.rrule import rrule, DAILY
from packaging import version
import organizations
def make_course_key_str(org, number, run='test-run', **kwargs):
'''
Helper method to create a string representation of a CourseKey
'''
return 'course-v1:{}+{}+{}'.form... | 27.289474 | 79 | 0.719383 |
7bce96eec91113f058c24e88820c97f2d2dc2fc2 | 2,607 | py | Python | selectable/tests/test_forms.py | affan2/django-selectable | 00a3c3b9eddb706e1b113d1b4cea706a7bf26a44 | [
"BSD-2-Clause"
] | null | null | null | selectable/tests/test_forms.py | affan2/django-selectable | 00a3c3b9eddb706e1b113d1b4cea706a7bf26a44 | [
"BSD-2-Clause"
] | null | null | null | selectable/tests/test_forms.py | affan2/django-selectable | 00a3c3b9eddb706e1b113d1b4cea706a7bf26a44 | [
"BSD-2-Clause"
] | 1 | 2020-01-08T09:08:21.000Z | 2020-01-08T09:08:21.000Z | from django.conf import settings
from ..forms import BaseLookupForm
from .base import BaseSelectableTestCase, PatchSettingsMixin
__all__ = (
'BaseLookupFormTestCase',
)
class BaseLookupFormTestCase(PatchSettingsMixin, BaseSelectableTestCase):
def get_valid_data(self):
data = {
'term': ... | 29.965517 | 83 | 0.618719 |
ac41c6b6522930ef696a7a121609414f94dd2b4e | 1,051 | py | Python | src/pycropml/transpiler/generators/sticsGenerator.py | brichet/PyCrop2ML | 7177996f72a8d95fdbabb772a16f1fd87b1d033e | [
"MIT"
] | null | null | null | src/pycropml/transpiler/generators/sticsGenerator.py | brichet/PyCrop2ML | 7177996f72a8d95fdbabb772a16f1fd87b1d033e | [
"MIT"
] | null | null | null | src/pycropml/transpiler/generators/sticsGenerator.py | brichet/PyCrop2ML | 7177996f72a8d95fdbabb772a16f1fd87b1d033e | [
"MIT"
] | null | null | null |
from pycropml.transpiler.generators.fortranGenerator import FortranGenerator, FortranCompo
import os
from pycropml.transpiler import lib
from path import Path
class SticsGenerator(FortranGenerator):
""" This class contains the specific properties of
Apsim and use the NodeVisitor to generate a csharp
code ... | 33.903226 | 90 | 0.679353 |
7c5271cd2ccc591942d33a357a88f8af16fa2102 | 1,053 | py | Python | soc_site/discussions/migrations/0001_initial.py | nathanielCherian/socSite | e13ea1be15fde3511b46070038906930250e7f76 | [
"MIT"
] | null | null | null | soc_site/discussions/migrations/0001_initial.py | nathanielCherian/socSite | e13ea1be15fde3511b46070038906930250e7f76 | [
"MIT"
] | 8 | 2020-07-16T23:37:06.000Z | 2022-03-12T00:35:18.000Z | soc_site/discussions/migrations/0001_initial.py | nathanielCherian/socSite | e13ea1be15fde3511b46070038906930250e7f76 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-21 21:28
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 33.967742 | 123 | 0.631529 |
a33be66a133d7f31597a91f727670ef025e4fb53 | 4,846 | py | Python | Connector/wsutils/broker.py | swapper-pegasus/NodeChain | e1f7c6b372b1e5032fbeb2767503c1d2e878aa9c | [
"MIT"
] | 4 | 2021-05-05T18:34:03.000Z | 2022-01-05T06:41:02.000Z | Connector/wsutils/broker.py | swapper-pegasus/NodeChain | e1f7c6b372b1e5032fbeb2767503c1d2e878aa9c | [
"MIT"
] | 94 | 2021-05-05T18:38:10.000Z | 2022-03-31T23:00:59.000Z | Connector/wsutils/broker.py | swapper-pegasus/NodeChain | e1f7c6b372b1e5032fbeb2767503c1d2e878aa9c | [
"MIT"
] | 4 | 2021-05-03T14:44:43.000Z | 2022-01-21T19:56:04.000Z | #!/usr/bin/python3
import threading
from logger import logger
from .singleton import Singleton
from .subscribers import SubscriberInterface
from .constants import *
class Broker(object, metaclass=Singleton):
def __init__(self):
self.topicSubscriptions = {} # Topic -> {"Subs":[Sub1, Sub2], "ClosingFunc"... | 38.460317 | 144 | 0.656624 |
6370b10fc327bc88784fa563f63f9d561b2619a9 | 757 | py | Python | examples/Python3/demo.py | NaohiroTamura/snowboy | 1aca51b23bddf4b941cb400e8202eeba193bc00e | [
"Apache-2.0"
] | null | null | null | examples/Python3/demo.py | NaohiroTamura/snowboy | 1aca51b23bddf4b941cb400e8202eeba193bc00e | [
"Apache-2.0"
] | null | null | null | examples/Python3/demo.py | NaohiroTamura/snowboy | 1aca51b23bddf4b941cb400e8202eeba193bc00e | [
"Apache-2.0"
] | null | null | null | import snowboydecoder
import sys
import signal
interrupted = False
def signal_handler(signal, frame):
global interrupted
interrupted = True
def interrupt_callback():
global interrupted
return interrupted
if len(sys.argv) == 1:
print("Error: need to specify model name")
print("Usage: python... | 21.027778 | 65 | 0.72391 |
4dff57e7f8b9bc4f0e043c5fadd5fcd0994128b4 | 2,694 | py | Python | functest/run_all.py | Luvideria/lightmetrica-v3 | 3e83db59998e79648047bac29c37d8eb18d7600d | [
"MIT"
] | 101 | 2019-05-31T21:27:58.000Z | 2022-02-03T18:54:16.000Z | functest/run_all.py | Luvideria/lightmetrica-v3 | 3e83db59998e79648047bac29c37d8eb18d7600d | [
"MIT"
] | 11 | 2019-09-19T16:03:09.000Z | 2020-12-05T18:37:54.000Z | functest/run_all.py | Luvideria/lightmetrica-v3 | 3e83db59998e79648047bac29c37d8eb18d7600d | [
"MIT"
] | 14 | 2019-06-05T03:06:09.000Z | 2022-01-15T06:36:24.000Z | """Run all functional tests"""
import os
import sys
from colorama import Fore, Back, Style
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
import argparse
import jupytext
import nbmerge
from shutil import copyfile
def run_functests(output_dir, lmenv_path):
# Output directory of executed not... | 34.101266 | 136 | 0.659985 |
565f49629159ceaeba26dfa8da682f4bc4b7c10f | 4,643 | bzl | Python | tensorflow/core/platform/build_config.bzl | nicolas-harraudeau-sonarsource/tensorflow | f42f57b814b82a217943f621967036a08bb95e88 | [
"Apache-2.0"
] | 2 | 2020-10-28T20:24:19.000Z | 2021-02-08T21:24:15.000Z | tensorflow/core/platform/build_config.bzl | nicolas-harraudeau-sonarsource/tensorflow | f42f57b814b82a217943f621967036a08bb95e88 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:14:20.000Z | 2022-02-10T02:27:45.000Z | tensorflow/core/platform/build_config.bzl | nicolas-harraudeau-sonarsource/tensorflow | f42f57b814b82a217943f621967036a08bb95e88 | [
"Apache-2.0"
] | 1 | 2020-12-03T21:23:29.000Z | 2020-12-03T21:23:29.000Z | """Provides a redirection point for platform specific implementations of starlark utilities."""
load(
"//tensorflow/core/platform/default:build_config.bzl",
_if_llvm_aarch64_available = "if_llvm_aarch64_available",
_if_llvm_system_z_available = "if_llvm_system_z_available",
_pyx_library = "pyx_library"... | 51.021978 | 95 | 0.855912 |
02fc36056d37603f7be9820f58470a9641af8aae | 19,976 | py | Python | pysnmp/DVMRP-STD-MIB-UNI.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/DVMRP-STD-MIB-UNI.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/DVMRP-STD-MIB-UNI.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 DVMRP-STD-MIB-UNI (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DVMRP-STD-MIB-UNI
# Produced by pysmi-0.3.4 at Mon Apr 29 18:40:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | 126.43038 | 2,921 | 0.743793 |
a16d5b49250da7ede6b55b1d8540b546bc13b27d | 1,056 | py | Python | app/urls.py | hamzabell/Realtor | 8787f1e2cf05fb165f4cb8e8ae95cdcba1aaf7a0 | [
"MIT"
] | null | null | null | app/urls.py | hamzabell/Realtor | 8787f1e2cf05fb165f4cb8e8ae95cdcba1aaf7a0 | [
"MIT"
] | null | null | null | app/urls.py | hamzabell/Realtor | 8787f1e2cf05fb165f4cb8e8ae95cdcba1aaf7a0 | [
"MIT"
] | null | null | null | """app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 37.714286 | 77 | 0.717803 |
9330254eeace87c12a8d2a5f8e6d8b009be2a421 | 1,332 | py | Python | pennylane/numpy/__init__.py | theRoughCode/pennylane | 317f82ef00c752beeef7d2412b88119a753467b4 | [
"Apache-2.0"
] | 1 | 2020-10-28T11:08:37.000Z | 2020-10-28T11:08:37.000Z | pennylane/numpy/__init__.py | markhop20/pennylane | 8792f0f88178f70a04d6f7afbbb9dd90d2e758b3 | [
"Apache-2.0"
] | 1 | 2020-10-04T22:45:45.000Z | 2020-10-04T22:45:45.000Z | pennylane/numpy/__init__.py | markhop20/pennylane | 8792f0f88178f70a04d6f7afbbb9dd90d2e758b3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Xanadu Quantum Technologies 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 applicabl... | 34.153846 | 94 | 0.758258 |
34c2149af459ddcc1b2d51293b9d821028a813eb | 26,862 | py | Python | nova/tests/virt/libvirt/test_imagebackend.py | bopopescu/nova-35 | c32c01e08dccad921b4af6fc03d971d6e74c990f | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_imagebackend.py | bopopescu/nova-35 | c32c01e08dccad921b4af6fc03d971d6e74c990f | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_imagebackend.py | bopopescu/nova-35 | c32c01e08dccad921b4af6fc03d971d6e74c990f | [
"Apache-2.0"
] | 1 | 2020-07-24T09:13:22.000Z | 2020-07-24T09:13:22.000Z | # Copyright 2012 Grid Dynamics
# 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... | 38.210526 | 78 | 0.643772 |
ef22e69c104ba4b41e4dd4ccd58db94f69792a2b | 1,310 | py | Python | setup.py | Robbybp/pymumps | 698339dc249f4014f0688d521f316a3da6165e10 | [
"BSD-3-Clause"
] | null | null | null | setup.py | Robbybp/pymumps | 698339dc249f4014f0688d521f316a3da6165e10 | [
"BSD-3-Clause"
] | null | null | null | setup.py | Robbybp/pymumps | 698339dc249f4014f0688d521f316a3da6165e10 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, Extension
try:
import Cython
except ImportError:
raise ImportError('''
Cython is required for building this package. Please install using
pip install cython
or upgrade to a recent PIP release.
''')
with open('README.md') as f:
long_description = ... | 25.686275 | 77 | 0.637405 |
ce88e8913f294ec0b92e1900509b315ec4d5af23 | 3,299 | py | Python | client/verta/tests/test_versioning/test_configuration.py | fool-sec-review/modeldb | 44e7f3c1af6768c4c23a2d134f9a322fcf0320b5 | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/tests/test_versioning/test_configuration.py | fool-sec-review/modeldb | 44e7f3c1af6768c4c23a2d134f9a322fcf0320b5 | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/tests/test_versioning/test_configuration.py | fool-sec-review/modeldb | 44e7f3c1af6768c4c23a2d134f9a322fcf0320b5 | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | import pytest
import verta.configuration
class TestInternalFunctions:
def test_value_to_msg(self):
fn = verta.configuration.Hyperparameters._value_to_msg
assert fn(0)
assert fn(0.3)
assert fn("coconut")
def test_hyperparameter_to_msg(self):
fn = verta.configuration.H... | 34.010309 | 78 | 0.636557 |
1898b714c19856abb8d724f8ea87b54f43567a81 | 339 | py | Python | Algorithms/Easy/561. Array Partition I/answer.py | KenWoo/Algorithm | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | [
"Apache-2.0"
] | null | null | null | Algorithms/Easy/561. Array Partition I/answer.py | KenWoo/Algorithm | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | [
"Apache-2.0"
] | null | null | null | Algorithms/Easy/561. Array Partition I/answer.py | KenWoo/Algorithm | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | [
"Apache-2.0"
] | null | null | null | from typing import List
class Solution:
def arrayPairSum(self, nums: List[int]) -> int:
nums.sort()
n = len(nums)
sum = 0
for i in range(0, n, 2):
sum += nums[i]
return sum
if __name__ == "__main__":
s = Solution()
result = s.arrayPairSum([1, 4, 3, 2])... | 18.833333 | 51 | 0.525074 |
f17b6580026608b3a72c2a42c1266585b81fd7d1 | 14,044 | py | Python | main.py | abhijit-buet/Learning-to-Detect-Pedestrian-Flow-inTraffic-Intersections-from-Synthetic-Data | c30334f29749dde01f998c7b648c9a8b3aa38650 | [
"MIT"
] | 1 | 2020-11-26T17:01:24.000Z | 2020-11-26T17:01:24.000Z | main.py | abhijit-buet/Learning-to-Detect-Pedestrian-Flow-inTraffic-Intersections-from-Synthetic-Data | c30334f29749dde01f998c7b648c9a8b3aa38650 | [
"MIT"
] | null | null | null | main.py | abhijit-buet/Learning-to-Detect-Pedestrian-Flow-inTraffic-Intersections-from-Synthetic-Data | c30334f29749dde01f998c7b648c9a8b3aa38650 | [
"MIT"
] | null | null | null | from __future__ import division
import argparse
import os
import shutil
import time
import numpy as np
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import torch.distributed as dist
import torch.optim
import torch.utils.data
import... | 36.195876 | 128 | 0.590857 |
4e130adaa858cb8e66f593db4966ed0c0318c5d0 | 531 | py | Python | vddb_async/src/task_manager/tests/clear_hbase.py | dlf412/thunderCopyright | c736c9eefc7c934cc830d9d6f27a00cf147e02aa | [
"MIT"
] | 1 | 2021-06-10T02:56:43.000Z | 2021-06-10T02:56:43.000Z | vddb_async/src/task_manager/tests/clear_hbase.py | dlf412/thunderCopyright | c736c9eefc7c934cc830d9d6f27a00cf147e02aa | [
"MIT"
] | null | null | null | vddb_async/src/task_manager/tests/clear_hbase.py | dlf412/thunderCopyright | c736c9eefc7c934cc830d9d6f27a00cf147e02aa | [
"MIT"
] | 1 | 2020-03-25T23:55:58.000Z | 2020-03-25T23:55:58.000Z | #!/usr/bin/python
import happybase
import uuid
import sys
hbpool = happybase.ConnectionPool(1,host="master",port=9090)
if len(sys.argv) < 2:
print "usage: python %s table" % sys.argv[0]
sys.exit(1)
table = sys.argv[1]
print table
with hbpool.connection() as conn:
if table == 'all':
for x in ['crr'... | 24.136364 | 78 | 0.581921 |
b4324d9fde7233a6a3311e6b24cd7b3d3098f6ec | 9,235 | py | Python | hazelcast/protocol/client_message.py | SaitTalhaNisanci/hazelcast-python-client | af382081da02a360e826163b1026aa0f68b6e9b8 | [
"Apache-2.0"
] | null | null | null | hazelcast/protocol/client_message.py | SaitTalhaNisanci/hazelcast-python-client | af382081da02a360e826163b1026aa0f68b6e9b8 | [
"Apache-2.0"
] | null | null | null | hazelcast/protocol/client_message.py | SaitTalhaNisanci/hazelcast-python-client | af382081da02a360e826163b1026aa0f68b6e9b8 | [
"Apache-2.0"
] | null | null | null | """
Client Message is the carrier framed data as defined below.
Any request parameter, response or event data will be carried in the payload.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... | 35.383142 | 108 | 0.585815 |
f45dd4ecb9da591671a70c4b6210a4fce324773b | 700 | py | Python | bin/run_psql.py | jfeser/castor-opt | b377c589707fcba68f74d85eba6c4eb394ac2c05 | [
"MIT"
] | null | null | null | bin/run_psql.py | jfeser/castor-opt | b377c589707fcba68f74d85eba6c4eb394ac2c05 | [
"MIT"
] | null | null | null | bin/run_psql.py | jfeser/castor-opt | b377c589707fcba68f74d85eba6c4eb394ac2c05 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
import os
import re
from subprocess import Popen, PIPE
import sys
def run_sql(db, sql_file, params):
# Substitute parameters into sql query.
with open(sql_file, "r") as f:
sql_query = f.read()
for i, param_value in enumerate(params):
sql_query = re.sub(":... | 28 | 82 | 0.617143 |
16487cf844b83c1ebc7dd7c01089e627fb8ecefd | 331 | py | Python | HackerEarth/Basic Programming/Basics of Implementation/the_great_kian.py | nsudhanva/Competetive | d9e93fdeefaa4e422a2101db41a7ab0a5676e9da | [
"Unlicense"
] | null | null | null | HackerEarth/Basic Programming/Basics of Implementation/the_great_kian.py | nsudhanva/Competetive | d9e93fdeefaa4e422a2101db41a7ab0a5676e9da | [
"Unlicense"
] | null | null | null | HackerEarth/Basic Programming/Basics of Implementation/the_great_kian.py | nsudhanva/Competetive | d9e93fdeefaa4e422a2101db41a7ab0a5676e9da | [
"Unlicense"
] | null | null | null | n = raw_input()
x = raw_input().split()
#print x
sum1 = 0
sum2 = 0
sum3 = 0
for i in range(int(n)):
if int(x[i]) % 3 == 1:
sum1 = sum1 + int(x[i])
if int(x[i]) % 3 == 2:
sum2 = sum2 + int(x[i])
if int(x[i]) % 3 == 0:
sum3 = sum3 + int(x[i])
print str(sum1) + " " + str(sum2) + " " +... | 19.470588 | 51 | 0.462236 |
5b6519fab19592b5d708aab835834c2316f52e19 | 215 | py | Python | applications/utopianIdentificationNumber.py | silvioedu/HackerRank-Regex-Practice | dc2f2719385626375eb719b38baf6315ff23cad4 | [
"MIT"
] | null | null | null | applications/utopianIdentificationNumber.py | silvioedu/HackerRank-Regex-Practice | dc2f2719385626375eb719b38baf6315ff23cad4 | [
"MIT"
] | null | null | null | applications/utopianIdentificationNumber.py | silvioedu/HackerRank-Regex-Practice | dc2f2719385626375eb719b38baf6315ff23cad4 | [
"MIT"
] | null | null | null | import re
if __name__ == '__main__':
regex = r'^[a-z]{0,3}\d{2,8}[A-Z]{3,}$'
dict = {True: "VALID", False: "INVALID"}
for _ in range(int(input())):
print(dict[bool(re.search(regex, input()))])
| 23.888889 | 52 | 0.544186 |
ca64e3d83ab8437d2c7ec27168bdd1c5b480d8a7 | 46,124 | py | Python | tests/test_tf_converter.py | susemeee/tf-coreml | 244a7705dc6653d22751b6583a9a89c5fb7c1e3b | [
"Apache-2.0"
] | null | null | null | tests/test_tf_converter.py | susemeee/tf-coreml | 244a7705dc6653d22751b6583a9a89c5fb7c1e3b | [
"Apache-2.0"
] | null | null | null | tests/test_tf_converter.py | susemeee/tf-coreml | 244a7705dc6653d22751b6583a9a89c5fb7c1e3b | [
"Apache-2.0"
] | null | null | null | import unittest
import shutil
import tempfile
import os
import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
from coremltools.proto import NeuralNetwork_pb2
from tensorflow.python.tools.freeze_graph import freeze_graph
from tensorflow.tools.graph_transforms import TransformGraph
import tfc... | 38.923207 | 93 | 0.643158 |
8e3a4bf28409d75b784cbfb3af8c89052b95fdd1 | 3,000 | py | Python | test/azure/low-level/Expected/AcceptanceTests/HeadLowLevel/headlowlevel/_configuration.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/headversiontolerant/_configuration.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/azure/legacy/Expected/AcceptanceTests/Head/head/_configuration.py | Azure/autorest.python | c36f5c1a2d614a1eeba6fec6a2c02517f2d1cce7 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # 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 ... | 45.454545 | 107 | 0.686333 |
101c6558c815f29471902457f0569a399aed0a71 | 895 | py | Python | test/test_ezsignfolder_reorder_v1_request.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsignfolder_reorder_v1_request.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_ezsignfolder_reorder_v1_request.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | """
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import eZmaxApi
from... | 24.189189 | 97 | 0.719553 |
fe6aaf572146bcf151542b348b03d777fc1cbebb | 1,231 | py | Python | pySDC/projects/parallelSDC/Van_der_Pol_implicit_Jac.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 20 | 2015-03-21T09:02:55.000Z | 2022-02-26T20:22:21.000Z | pySDC/projects/parallelSDC/Van_der_Pol_implicit_Jac.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 61 | 2015-03-02T09:35:55.000Z | 2022-03-17T12:42:48.000Z | pySDC/projects/parallelSDC/Van_der_Pol_implicit_Jac.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 19 | 2015-02-20T11:52:33.000Z | 2022-02-02T10:46:27.000Z | import numpy as np
import scipy.sparse as sp
from scipy.sparse.linalg import spsolve
from pySDC.implementations.problem_classes.Van_der_Pol_implicit import vanderpol
# noinspection PyUnusedLocal
class vanderpol_jac(vanderpol):
def eval_jacobian(self, u):
"""
Evaluation of the Jacobian of the rig... | 26.191489 | 102 | 0.582453 |
153a7394598bad5db23d4c5d3798a4194bff3120 | 544 | py | Python | os_detector.py | cswpy/Head_position_orientation | 6b1a10393a4e73fa02ee14382d5e6c997a45574a | [
"MIT"
] | null | null | null | os_detector.py | cswpy/Head_position_orientation | 6b1a10393a4e73fa02ee14382d5e6c997a45574a | [
"MIT"
] | null | null | null | os_detector.py | cswpy/Head_position_orientation | 6b1a10393a4e73fa02ee14382d5e6c997a45574a | [
"MIT"
] | null | null | null | """Detect OS"""
from platform import system
def detect_os(bypass=False):
"""Check OS, as multiprocessing may not work properly on Windows and macOS"""
if bypass is True:
return
os_name = system()
if os_name in ['Windows']:
print("It seems that you are running this code from {}, on wh... | 30.222222 | 177 | 0.661765 |
7ccbf87e037e64c4bd4725b64dc53eaeda818089 | 1,161 | py | Python | spanner/google/cloud/spanner_admin_database_v1/gapic/enums.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | 1 | 2019-01-23T21:54:51.000Z | 2019-01-23T21:54:51.000Z | spanner/google/cloud/spanner_admin_database_v1/gapic/enums.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | 1 | 2018-04-06T19:51:23.000Z | 2018-04-06T19:51:23.000Z | spanner/google/cloud/spanner_admin_database_v1/gapic/enums.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# 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... | 32.25 | 98 | 0.686477 |
cce13f0852a62cfeffdde976838b907e2e22aae4 | 805 | py | Python | reclib/nn/regularizers/regularizers.py | tingkai-zhang/reclib | 3c56dd7f811ab4d4f9f692efd0ee5e171a5f818b | [
"Apache-2.0"
] | 4 | 2019-09-16T08:33:19.000Z | 2020-12-15T09:06:38.000Z | reclib/nn/regularizers/regularizers.py | tingkai-zhang/reclib | 3c56dd7f811ab4d4f9f692efd0ee5e171a5f818b | [
"Apache-2.0"
] | null | null | null | reclib/nn/regularizers/regularizers.py | tingkai-zhang/reclib | 3c56dd7f811ab4d4f9f692efd0ee5e171a5f818b | [
"Apache-2.0"
] | 1 | 2020-03-04T21:33:44.000Z | 2020-03-04T21:33:44.000Z | import torch
from reclib.nn.regularizers.regularizer import Regularizer
@Regularizer.register("l1")
class L1Regularizer(Regularizer):
"""Represents a penalty proportional to the sum of the absolute values of the parameters"""
def __init__(self, alpha: float = 0.01) -> None:
self.alpha = alpha
d... | 30.961538 | 95 | 0.70559 |
cce3b9de994fc14f5b11219083bc77b54b81929f | 15,771 | py | Python | django/db/backends/mysql/base.py | christianbundy/django | f2ff1b2fabbe26d5e61d690c4c5a47f9582f9300 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/backends/mysql/base.py | christianbundy/django | f2ff1b2fabbe26d5e61d690c4c5a47f9582f9300 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/backends/mysql/base.py | christianbundy/django | f2ff1b2fabbe26d5e61d690c4c5a47f9582f9300 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | """
MySQL database backend for Django.
Requires mysqlclient: https://pypi.python.org/pypi/mysqlclient/
MySQLdb is supported for Python 2 only: http://sourceforge.net/projects/mysql-python
"""
from __future__ import unicode_literals
import datetime
import re
import sys
import warnings
from django.conf import settings... | 42.395161 | 117 | 0.641557 |
1fd2913dd99613b9dc8f2442c61ef034da1097a4 | 110 | py | Python | python/timer_test.py | tbedford/code-snippets | 9afe36c2726829f14fa5ec11acb8214bed704938 | [
"MIT"
] | null | null | null | python/timer_test.py | tbedford/code-snippets | 9afe36c2726829f14fa5ec11acb8214bed704938 | [
"MIT"
] | null | null | null | python/timer_test.py | tbedford/code-snippets | 9afe36c2726829f14fa5ec11acb8214bed704938 | [
"MIT"
] | 1 | 2018-10-09T02:03:12.000Z | 2018-10-09T02:03:12.000Z | import threading
def printit():
threading.Timer(1.0, printit).start()
print ("Hello, World!")
printit()
| 13.75 | 39 | 0.681818 |
08f7452f91737ccea888796c9f0016990ce6c4a5 | 41 | py | Python | pylie/__init__.py | Ostoic/pylie | d568fda94ce4b0e249fcf9ffad83860aed5771a5 | [
"MIT"
] | null | null | null | pylie/__init__.py | Ostoic/pylie | d568fda94ce4b0e249fcf9ffad83860aed5771a5 | [
"MIT"
] | null | null | null | pylie/__init__.py | Ostoic/pylie | d568fda94ce4b0e249fcf9ffad83860aed5771a5 | [
"MIT"
] | null | null | null | import sl2
from constant import constants | 20.5 | 30 | 0.878049 |
8bcea9c095553d0f4fa5b7eb7ae79632735b10cc | 6,308 | py | Python | PSD/finetune.py | zychen-ustc/PSD-Principled-Synthetic-to-Real-Dehazing-Guided-by-Physical-Priors | f200c202d08ecf8c8ef31d7821307b242e5767a0 | [
"MIT"
] | 52 | 2021-06-14T07:59:08.000Z | 2022-03-30T03:13:27.000Z | PSD/finetune.py | zychen-ustc/PSD-Principled-Synthetic-to-Real-Dehazing-Guided-by-Physical-Priors | f200c202d08ecf8c8ef31d7821307b242e5767a0 | [
"MIT"
] | 16 | 2021-07-17T07:20:12.000Z | 2022-03-28T09:04:31.000Z | PSD/finetune.py | zychen-ustc/PSD-Principled-Synthetic-to-Real-Dehazing-Guided-by-Physical-Priors | f200c202d08ecf8c8ef31d7821307b242e5767a0 | [
"MIT"
] | 11 | 2021-06-22T08:09:27.000Z | 2022-03-28T11:19:59.000Z | import os
import argparse
import time
import copy
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torchvision.models import vgg16
import torchvision.utils as vutils
from datasets.pretrain_datasets import *
from datasets.finetune_datasets import *
from da... | 37.772455 | 152 | 0.675491 |
466e800a421ac009f0d81562ca0ff4ac1685b0f8 | 834 | py | Python | detector/settings.py | gleseur/room-status | f6804618b83a96d85dbc6bf92e4a8f4efa48003e | [
"MIT"
] | null | null | null | detector/settings.py | gleseur/room-status | f6804618b83a96d85dbc6bf92e4a8f4efa48003e | [
"MIT"
] | null | null | null | detector/settings.py | gleseur/room-status | f6804618b83a96d85dbc6bf92e4a8f4efa48003e | [
"MIT"
] | null | null | null | u"""
Here we define the settings for the detection
"""
from __future__ import unicode_literals
import local_settings
DETECTION_PAIRS = {
"male": {
"room_id": 1, # To communicate with Meteor API
"pir": 7,
"light": 17,
"free_time": 30, # time in seconds after which we deem the roo... | 29.785714 | 101 | 0.639089 |
f16b84cb4b2c268bcb742db09aa83e3e165a9c8c | 4,610 | py | Python | src/spn/algorithms/CnetStructureLearning.py | felixdivo/SPFlow | 682f044751145915680c6c82f0aa347e464620de | [
"Apache-2.0"
] | null | null | null | src/spn/algorithms/CnetStructureLearning.py | felixdivo/SPFlow | 682f044751145915680c6c82f0aa347e464620de | [
"Apache-2.0"
] | null | null | null | src/spn/algorithms/CnetStructureLearning.py | felixdivo/SPFlow | 682f044751145915680c6c82f0aa347e464620de | [
"Apache-2.0"
] | null | null | null | """
Created on Ocotber 27, 2018
@author: Nicola Di Mauro
"""
import logging
from collections import deque
from spn.algorithms.StructureLearning import Operation, default_slicer
import logging
logger = logging.getLogger(__name__)
try:
from time import perf_counter
except:
from time import time
perf_count... | 31.360544 | 116 | 0.634707 |
e2a9da298a21566d7596e287cf46cfe9590b22a5 | 3,744 | py | Python | examples/tensorflow2_keras_mnist.py | hcyang99/horovod | 825cc197468548da47dcd38872d5b4ba6e6a125b | [
"Apache-2.0"
] | 2 | 2020-08-31T18:52:20.000Z | 2020-09-01T00:13:41.000Z | examples/tensorflow2_keras_mnist.py | kyocen/horovod | e9b1e228ff92eb7f65d9aea2d36f23b327df28bd | [
"Apache-2.0"
] | null | null | null | examples/tensorflow2_keras_mnist.py | kyocen/horovod | e9b1e228ff92eb7f65d9aea2d36f23b327df28bd | [
"Apache-2.0"
] | 3 | 2021-05-29T06:12:49.000Z | 2022-02-24T06:34:59.000Z | # Copyright 2019 Uber Technologies, 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 applica... | 41.142857 | 108 | 0.710203 |
0555019766ae773c3ea9c6c4009bd9ff9f064d74 | 460 | py | Python | project-master/proj01/proj01/proj01.py | dstingley22/project | 6557409ae149d24791c8f2da4f8d7b9be62c8012 | [
"MIT"
] | null | null | null | project-master/proj01/proj01/proj01.py | dstingley22/project | 6557409ae149d24791c8f2da4f8d7b9be62c8012 | [
"MIT"
] | null | null | null | project-master/proj01/proj01/proj01.py | dstingley22/project | 6557409ae149d24791c8f2da4f8d7b9be62c8012 | [
"MIT"
] | null | null | null | # Name:Damian Stingley
# Date:6/19/17
# proj01: A Simple Program
# This program asks the user for his/her name and age.
# Then, it prints a sentence that says when the user will turn 100.
# If you complete extensions, describe your extensions here!
name=raw_input('Enter your name ')
age = int(raw_input('How old are ... | 25.555556 | 67 | 0.693478 |
d746bc226f2b6e97930b078db84a7d27ad3e8ba4 | 3,131 | py | Python | cellular_automata.py | ferakon/elementary-cellular-automata-py | 4dc14ef635c8ffd7faab741a65ea6a633c351f30 | [
"MIT"
] | null | null | null | cellular_automata.py | ferakon/elementary-cellular-automata-py | 4dc14ef635c8ffd7faab741a65ea6a633c351f30 | [
"MIT"
] | null | null | null | cellular_automata.py | ferakon/elementary-cellular-automata-py | 4dc14ef635c8ffd7faab741a65ea6a633c351f30 | [
"MIT"
] | null | null | null | """Simple code for a Wolfram elementary cellular automata in python"""
import os
import time
import numpy as np
from skimage.io import imsave
def define_rule_sets(set_size):
"""Find every possible rule for given set size"""
rule_sets = []
for n in range(1<<set_size):
s = bin(n)[2:]
s = ... | 24.084615 | 86 | 0.547429 |
2aa3848cec961bd31440d2a74cc81278c17bdfd9 | 2,955 | py | Python | paramak/parametric_components/port_cutters_rectangular.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | 9 | 2019-12-28T16:48:49.000Z | 2020-05-20T13:38:49.000Z | paramak/parametric_components/port_cutters_rectangular.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | 8 | 2019-08-23T10:17:19.000Z | 2020-05-21T18:47:22.000Z | paramak/parametric_components/port_cutters_rectangular.py | zmarkan/paramak | ecf9a46394adb4d6bb5744000ec6e2f74c30f2ba | [
"MIT"
] | 1 | 2020-05-07T16:14:26.000Z | 2020-05-07T16:14:26.000Z |
from typing import Optional
from paramak import ExtrudeStraightShape
class PortCutterRectangular(ExtrudeStraightShape):
"""Creates an extruded shape with a rectangular section that is used to cut
other components (eg. blanket, vessel,..) in order to create ports.
Args:
height: height (cm) of th... | 33.965517 | 79 | 0.595939 |
19a58188c483d65481b9bd9e03b914c4366122c2 | 291 | py | Python | contact_app/contact_app/doctype/booking/booking.py | victor-abz/app-mis-with-frappe | 2b4a08606244368c16f980e88e5c6fdb4903d9dc | [
"MIT"
] | null | null | null | contact_app/contact_app/doctype/booking/booking.py | victor-abz/app-mis-with-frappe | 2b4a08606244368c16f980e88e5c6fdb4903d9dc | [
"MIT"
] | null | null | null | contact_app/contact_app/doctype/booking/booking.py | victor-abz/app-mis-with-frappe | 2b4a08606244368c16f980e88e5c6fdb4903d9dc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Abizeyimana Victor and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.website.website_generator import WebsiteGenerator
class Booking(WebsiteGenerator):
pass
| 26.454545 | 61 | 0.797251 |
87036694ccdac0fff5114da35b65ea9bc64dc633 | 1,283 | py | Python | djangocms_teaser/models.py | sbahri81/djangocms-teaser | b3aa0e635244b7a0e3b19ce544c04f818cb24fd0 | [
"BSD-3-Clause"
] | 5 | 2015-08-23T05:09:10.000Z | 2018-05-07T07:28:38.000Z | djangocms_teaser/models.py | sbahri81/djangocms-teaser | b3aa0e635244b7a0e3b19ce544c04f818cb24fd0 | [
"BSD-3-Clause"
] | 6 | 2015-07-08T10:02:55.000Z | 2018-05-18T19:01:18.000Z | djangocms_teaser/models.py | sbahri81/djangocms-teaser | b3aa0e635244b7a0e3b19ce544c04f818cb24fd0 | [
"BSD-3-Clause"
] | 19 | 2015-02-26T12:34:22.000Z | 2021-09-03T14:00:58.000Z | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin, Page
try:
from cms.models import get_plugin_media_path
except ImportError:
def get_plugin_media_path(instance, filename):
"""
See cms.models.pluginmode... | 29.159091 | 77 | 0.687451 |
99144518cfcd0350e9b8ea8454f9a074ca985cdd | 7,505 | py | Python | ex4_part1.py | arkushin/MIP5 | 38b5d660087d7b7762d6f311801495c20e85c0a3 | [
"MIT"
] | null | null | null | ex4_part1.py | arkushin/MIP5 | 38b5d660087d7b7762d6f311801495c20e85c0a3 | [
"MIT"
] | null | null | null | ex4_part1.py | arkushin/MIP5 | 38b5d660087d7b7762d6f311801495c20e85c0a3 | [
"MIT"
] | null | null | null | from PIL import Image
import matplotlib.pyplot as plt
from utils import *
from skimage import transform as tf
import copy
########################################################################################################################
# USER GUIDE:
# The given images should be in the same directory a... | 42.40113 | 121 | 0.602265 |
24e85555790f65c2bfac1335348a0c18fb0f985b | 20,551 | py | Python | log_complete_bcl2/model_629.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_complete_bcl2/model_629.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_complete_bcl2/model_629.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.143519 | 798 | 0.804146 |
91328bfd5e049e074b14c8949cfef8ac0eb4a1ad | 15,170 | py | Python | lib/exchange_rate.py | argentumproject/electrum | e76622bc95b7ace5be3a7e54ed2416001a41bc20 | [
"MIT"
] | 5 | 2017-06-17T16:50:49.000Z | 2021-03-16T14:19:27.000Z | lib/exchange_rate.py | argentumproject/electrum | e76622bc95b7ace5be3a7e54ed2416001a41bc20 | [
"MIT"
] | 1 | 2017-02-19T23:10:56.000Z | 2017-02-19T23:10:56.000Z | lib/exchange_rate.py | argentumproject/electrum | e76622bc95b7ace5be3a7e54ed2416001a41bc20 | [
"MIT"
] | 15 | 2017-04-02T17:25:55.000Z | 2021-03-16T14:19:27.000Z | from datetime import datetime
import inspect
import requests
import sys
from threading import Thread
import time
import traceback
import csv
from decimal import Decimal
from bitcoin import COIN
from i18n import _
from util import PrintError, ThreadJob
from util import format_satoshis
# See https://en.wikipedia.org/w... | 34.555809 | 121 | 0.594133 |
b450cc5e99cb9cbd0cbaf831b2d7fe7bc918c2ce | 2,352 | py | Python | components/expat/expat/expat/tests/udiffer.py | ebertn/esp-idf-nes | 9dc7e9a258fd378d36408a1348253b373974b431 | [
"Apache-2.0"
] | 2 | 2020-06-23T08:05:58.000Z | 2020-06-24T01:25:51.000Z | components/expat/expat/expat/tests/udiffer.py | ebertn/esp-idf-nes | 9dc7e9a258fd378d36408a1348253b373974b431 | [
"Apache-2.0"
] | 2 | 2022-03-29T05:16:50.000Z | 2022-03-29T05:16:50.000Z | vendors/espressif/esp-idf/components/expat/expat/expat/tests/udiffer.py | ictk-solution-dev/amazon-freertos | cc76512292ddfb70bba3030dbcb740ef3c6ead8b | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parse... | 37.333333 | 76 | 0.610969 |
62f31b609370a153a68a12d00d6e66391859a5a5 | 8,298 | py | Python | labml_nn/diffusion/ddpm/vqvae.py | gqkc/annotated_deep_learning_paper_implementations | 677a6e9dfa626ba825b5a123adb6c60d947b6a92 | [
"MIT"
] | null | null | null | labml_nn/diffusion/ddpm/vqvae.py | gqkc/annotated_deep_learning_paper_implementations | 677a6e9dfa626ba825b5a123adb6c60d947b6a92 | [
"MIT"
] | null | null | null | labml_nn/diffusion/ddpm/vqvae.py | gqkc/annotated_deep_learning_paper_implementations | 677a6e9dfa626ba825b5a123adb6c60d947b6a92 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Categorical, RelaxedOneHotCategorical
import math
class VQEmbeddingEMA(nn.Module):
def __init__(self, latent_dim, num_embeddings, embedding_dim, commitment_cost=0.25, decay=0.999, epsilon=1e-5):
super(VQEmbe... | 37.547511 | 115 | 0.591106 |
b6f01f36eeb3fc8152629687e30eb1f2de09ffe6 | 4,658 | py | Python | llvm/tools/clang/tools/scan-build-py/tests/unit/test_intercept.py | vusec/typesan | 831ca2af1a629e8ea93bb8c5b4215f12247b595c | [
"Apache-2.0"
] | 30 | 2016-09-06T06:58:43.000Z | 2021-12-23T11:59:38.000Z | llvm/tools/clang/tools/scan-build-py/tests/unit/test_intercept.py | vusec/typesan | 831ca2af1a629e8ea93bb8c5b4215f12247b595c | [
"Apache-2.0"
] | 1 | 2018-05-15T00:55:37.000Z | 2018-05-15T00:55:37.000Z | llvm/tools/clang/tools/scan-build-py/tests/unit/test_intercept.py | vusec/typesan | 831ca2af1a629e8ea93bb8c5b4215f12247b595c | [
"Apache-2.0"
] | 17 | 2016-10-24T06:08:16.000Z | 2022-02-18T17:27:14.000Z | # -*- coding: utf-8 -*-
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
import libscanbuild.intercept as sut
from . import fixtures
import os.path
class InterceptUtilTest(fixtures.TestCase):
... | 37.564516 | 78 | 0.546801 |
d2f8aa917a6a90c0b7125e2ffccdc982061e0a97 | 10,232 | py | Python | owtf/db/models.py | Lonewolf-Information-systems/owtf | 65355ce8bf4a4ea0177e24ee106f77e2f87c17fa | [
"BSD-3-Clause"
] | 1 | 2018-02-05T12:10:28.000Z | 2018-02-05T12:10:28.000Z | owtf/db/models.py | Lonewolf-Information-systems/owtf | 65355ce8bf4a4ea0177e24ee106f77e2f87c17fa | [
"BSD-3-Clause"
] | 2 | 2021-03-11T03:35:23.000Z | 2022-02-10T23:40:23.000Z | owtf/db/models.py | Lonewolf-Information-systems/owtf | 65355ce8bf4a4ea0177e24ee106f77e2f87c17fa | [
"BSD-3-Clause"
] | null | null | null | """
owtf.db.models
~~~~~~~~~~~~~~
The SQLAlchemy models for every table in the OWTF DB.
"""
import datetime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy import Table, Column, Integer, String, Boolean, Float, DateTime, ForeignKey, Text, Index... | 32.48254 | 105 | 0.678069 |
bc83afb8c23b476f4a8b00d0c7192bcd4dc9e7f9 | 946 | py | Python | engine/src/hopeit/server/version.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | null | null | null | engine/src/hopeit/server/version.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | null | null | null | engine/src/hopeit/server/version.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | null | null | null | """
Engine version constants.
Increment on release
To ensure configuration files from example apps and plugins have same version as engine,
environment variables `HOPEIT_ENGINE_VERSION` and `HOPEIT_APPS_API_VERSION` are set.
"""
import os
import sys
ENGINE_NAME = "hopeit.engine"
ENGINE_VERSION = "0.12.1"
# Major.Mino... | 33.785714 | 88 | 0.748414 |
7990150def023dad3e39bf904e671169e9c81ce1 | 2,924 | py | Python | day23/code/main.py | JoseTomasTocino/AdventOfCode2020 | 19b22c3f9ef2331f08c2ad78f49f200a5f4adfc9 | [
"MIT"
] | null | null | null | day23/code/main.py | JoseTomasTocino/AdventOfCode2020 | 19b22c3f9ef2331f08c2ad78f49f200a5f4adfc9 | [
"MIT"
] | null | null | null | day23/code/main.py | JoseTomasTocino/AdventOfCode2020 | 19b22c3f9ef2331f08c2ad78f49f200a5f4adfc9 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
def play_cups_game(inp, max_moves=100, use_extended_rules=False):
labels = [int(x) for x in inp]
# Map where the key is the label, and the value is the next element
next_map = {}
for i in range(len(labels)):
# The next of the last element i... | 35.658537 | 119 | 0.629617 |
d663520666817edfd4c03096c8b80b976ad2d182 | 50 | py | Python | rpc/consts.py | ryanrain2016/rpc | 6988ad6a26312e27270fc4439c0392751670c1cc | [
"MIT"
] | null | null | null | rpc/consts.py | ryanrain2016/rpc | 6988ad6a26312e27270fc4439c0392751670c1cc | [
"MIT"
] | null | null | null | rpc/consts.py | ryanrain2016/rpc | 6988ad6a26312e27270fc4439c0392751670c1cc | [
"MIT"
] | null | null | null |
MAX_PAYLOAD_LENGTH = 1024 * 1024 * 5
TIMEOUT = 60 | 16.666667 | 36 | 0.72 |
749498c888733cdda4529c37f89cf2b99a5a5b58 | 2,562 | py | Python | Dinos/BoaFrill/BoaFrill_Character_BP.BoaFrill_Character_BP.py | cutec-chris/sce-PrimalEarth | 4e7a45acffc57a455a7668af1a954004668c3085 | [
"MIT"
] | null | null | null | Dinos/BoaFrill/BoaFrill_Character_BP.BoaFrill_Character_BP.py | cutec-chris/sce-PrimalEarth | 4e7a45acffc57a455a7668af1a954004668c3085 | [
"MIT"
] | null | null | null | Dinos/BoaFrill/BoaFrill_Character_BP.BoaFrill_Character_BP.py | cutec-chris/sce-PrimalEarth | 4e7a45acffc57a455a7668af1a954004668c3085 | [
"MIT"
] | null | null | null | import sys,sce
class BoaFrill_Character_BP(sce.Dinos):
def __init__(self):
super().__init__(self)
name = 'Titanoboa'
blueprintPath = '/Game/PrimalEarth/Dinos/BoaFrill/BoaFrill_Character_BP.BoaFrill_Character_BP'
fullStatsRaw = [[170, 0.2, 0.27, 0.5, 0], [150, 0.1, 0.1, 0, 0], [175, 0.06, ... | 160.125 | 1,603 | 0.648322 |
2740520fa124a060bc32be056577159164b41067 | 3,351 | py | Python | strategies/bank_put_kamas.py | ProjectBlackFalcon/BlackFalconCore | 23af1829224738c06092e3e513a0bf2753b4c35f | [
"MIT"
] | 8 | 2019-05-26T19:44:28.000Z | 2021-01-31T14:53:17.000Z | strategies/bank_put_kamas.py | ProjectBlackFalcon/BlackFalconCore | 23af1829224738c06092e3e513a0bf2753b4c35f | [
"MIT"
] | 8 | 2019-07-17T21:19:47.000Z | 2019-09-28T12:52:39.000Z | strategies/bank_put_kamas.py | ProjectBlackFalcon/BlackFalconCore | 23af1829224738c06092e3e513a0bf2753b4c35f | [
"MIT"
] | null | null | null | import json
import time
from tools import logger as log
import strategies
def bank_put_kamas(**kwargs):
"""
A strategy to put kamas into the bank
:param kwargs: strategy, listener, and orders_queue
:return: the input strategy with a report
"""
strategy = kwargs['strategy']
listener = kwa... | 34.546392 | 183 | 0.622202 |
d090e571a8b970e21c3efd18099e7361dbb4b3ef | 11,503 | py | Python | homeassistant/helpers/device_registry.py | thecrazymonkey/home-assistant | 348b347ed165c88559b40ce04feb5720e91253bf | [
"Apache-2.0"
] | 1 | 2019-12-06T23:19:51.000Z | 2019-12-06T23:19:51.000Z | homeassistant/helpers/device_registry.py | ljmerza/home-assistant | 7fd2e67d1121dfa026f37b30c84ce8ae2ce2e1ba | [
"Apache-2.0"
] | 4 | 2021-03-19T01:22:18.000Z | 2022-01-13T01:19:34.000Z | homeassistant/helpers/device_registry.py | ljmerza/home-assistant | 7fd2e67d1121dfa026f37b30c84ce8ae2ce2e1ba | [
"Apache-2.0"
] | 1 | 2020-11-15T17:46:09.000Z | 2020-11-15T17:46:09.000Z | """Provide a way to connect entities belonging to one device."""
import logging
import uuid
from asyncio import Event
from collections import OrderedDict
from typing import List, Optional, cast
import attr
from homeassistant.core import callback
from homeassistant.loader import bind_hass
from .typing import HomeAssi... | 34.235119 | 78 | 0.587499 |
96626016f3fe2470827b49e356f8eb4569fd1ade | 1,934 | py | Python | src/config/helper.py | moraisaugusto/schedule_backup | 00fb3117508ea0493cb5dab1122e1ceaba129245 | [
"BSD-3-Clause"
] | 1 | 2021-03-06T01:24:02.000Z | 2021-03-06T01:24:02.000Z | src/config/helper.py | moraisaugusto/schedule_backup | 00fb3117508ea0493cb5dab1122e1ceaba129245 | [
"BSD-3-Clause"
] | null | null | null | src/config/helper.py | moraisaugusto/schedule_backup | 00fb3117508ea0493cb5dab1122e1ceaba129245 | [
"BSD-3-Clause"
] | null | null | null | import os
import re
import subprocess
from loguru import logger
def ask_question(question, default_answer=None):
"""Ask a question to the user
@param question: question to be displayed
@type question: string
@param default_answer: default answer for the question
@type default_answer: bool... | 23.301205 | 75 | 0.630817 |
90f8284494b46b630a86e00bb63ce01db77dbe88 | 1,325 | py | Python | test/test_issue363.py | gromgull/rdflib | 7c90f646e3734ee6d3081b5d3f699f0f501f6a39 | [
"BSD-3-Clause"
] | 4 | 2019-01-07T06:55:58.000Z | 2021-07-16T13:34:58.000Z | test/test_issue363.py | gromgull/rdflib | 7c90f646e3734ee6d3081b5d3f699f0f501f6a39 | [
"BSD-3-Clause"
] | null | null | null | test/test_issue363.py | gromgull/rdflib | 7c90f646e3734ee6d3081b5d3f699f0f501f6a39 | [
"BSD-3-Clause"
] | 2 | 2018-05-01T13:18:13.000Z | 2018-11-15T04:58:05.000Z | import rdflib
from nose import SkipTest
from nose.tools import assert_raises
data = '''<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:http="http://www.w3.org/2011/http#">
<http:HeaderElement rdf:about="#he0">
<http:params>
<htt... | 28.804348 | 85 | 0.642264 |
259f23ec406b66330a85500e16d61e3721f5184e | 833 | py | Python | 201-300/227.basic-calculator-ii.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 201-300/227.basic-calculator-ii.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 201-300/227.basic-calculator-ii.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=227 lang=python3
#
# [227] Basic Calculator II
#
# @lc code=start
class Solution:
def calculate(self, s: str) -> int:
res, prev, cur, operator = 0, 0, 0, "+"
for ch in s + "+":
if ch == " ":
continue
if ch.isdigit():
cu... | 27.766667 | 91 | 0.42617 |
e8a990994a3f31c160e6a38a24ecb298e15467b8 | 3,855 | py | Python | scienz/sport/nfl_2020_pbp.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 16 | 2021-08-14T10:20:16.000Z | 2022-03-31T04:19:26.000Z | hub/sport/nfl_2020_pbp.py | scie-nz/aorist | ac1e31251af7d851c4491a310b417de880b79d09 | [
"MIT"
] | 5 | 2021-08-15T23:19:10.000Z | 2021-09-26T20:50:41.000Z | scienz/sport/nfl_2020_pbp.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 1 | 2022-01-06T01:26:24.000Z | 2022-01-06T01:26:24.000Z | from aorist import (
Attribute,
NaturalNumber,
StringIdentifier,
DateString,
Year,
POSIXTimestamp,
PositiveFloat,
default_tabular_schema,
RowStruct,
StaticDataTable,
DataSchema,
StorageSetup,
RemoteStorageSetup,
Storage,
RemoteStorage,
RemoteLocation,
... | 30.595238 | 84 | 0.64332 |
28246d9d7476ce91dcbbd13f7681030d3c1f825c | 5,506 | py | Python | corehq/tests/test_middleware.py | andyasne/commcare-hq | c59a24e57bdd4d2536493f9ecdcc9906f4ae1b88 | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/tests/test_middleware.py | andyasne/commcare-hq | c59a24e57bdd4d2536493f9ecdcc9906f4ae1b88 | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/tests/test_middleware.py | andyasne/commcare-hq | c59a24e57bdd4d2536493f9ecdcc9906f4ae1b88 | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | import time
import mock
from django.http import HttpResponse
from django.test import override_settings, SimpleTestCase, TestCase
from django.urls import path, include
from django.views import View
from testil import Regex
from corehq.apps.domain.models import Domain
from corehq.apps.reports.dispatcher import ReportDi... | 30.087432 | 102 | 0.715946 |
4b0db1fe8e58ec6b9ce2d189d6e2544aa1b2608a | 2,702 | py | Python | cfgov/ask_cfpb/migrations/0037_recreated.py | hkeeler/cfgov-refresh | 33977186a8e9cb972e63cc22baa357d381316aec | [
"CC0-1.0"
] | null | null | null | cfgov/ask_cfpb/migrations/0037_recreated.py | hkeeler/cfgov-refresh | 33977186a8e9cb972e63cc22baa357d381316aec | [
"CC0-1.0"
] | null | null | null | cfgov/ask_cfpb/migrations/0037_recreated.py | hkeeler/cfgov-refresh | 33977186a8e9cb972e63cc22baa357d381316aec | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.25 on 2019-12-20 16:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
replaces = [
('ask_cfpb', '0001_initial'),
('ask_cfpb', '0002_answeraudiencepage'),
('ask_cfpb... | 41.569231 | 114 | 0.642857 |
02b32ff1637fdba1dad275cca3755a4d8ba5e14c | 41,085 | py | Python | lib/doconce/sphinx.py | aless80/doconce_hplgit_fork | 23fb3a7206fccafb7ef829a9a37bea2298b3ddb9 | [
"BSD-3-Clause"
] | 305 | 2015-01-07T06:57:14.000Z | 2022-02-16T01:45:25.000Z | lib/doconce/sphinx.py | aless80/doconce-1 | 23fb3a7206fccafb7ef829a9a37bea2298b3ddb9 | [
"BSD-3-Clause"
] | 163 | 2015-01-08T11:03:26.000Z | 2020-12-17T12:54:46.000Z | lib/doconce/sphinx.py | aless80/doconce-1 | 23fb3a7206fccafb7ef829a9a37bea2298b3ddb9 | [
"BSD-3-Clause"
] | 91 | 2015-03-19T17:17:34.000Z | 2022-01-02T15:45:20.000Z | from __future__ import print_function
from __future__ import absolute_import
from builtins import range
# http://sphinx.pocoo.org/ext/math.html#
# can reuse most of rst module:
from .rst import *
from .common import align2equations, online_python_tutor, \
get_legal_pygments_lexers, has_custom_pygments_lexer
from ... | 41.25 | 170 | 0.531605 |
aac4eabfd085825de699c46b43c72cbf1178a03e | 7,545 | py | Python | scannet/scannet_dataset_sw_rgb.py | MatteoPerotto/pointconv | 204a0d534c4d75e80bde7722c075a78365a64929 | [
"MIT"
] | 471 | 2019-03-26T02:01:55.000Z | 2022-03-10T03:09:10.000Z | scannet/scannet_dataset_sw_rgb.py | MatteoPerotto/pointconv | 204a0d534c4d75e80bde7722c075a78365a64929 | [
"MIT"
] | 35 | 2019-03-28T05:28:17.000Z | 2021-08-19T10:22:47.000Z | scannet/scannet_dataset_sw_rgb.py | MatteoPerotto/pointconv | 204a0d534c4d75e80bde7722c075a78365a64929 | [
"MIT"
] | 115 | 2019-04-21T07:33:00.000Z | 2022-03-04T07:21:12.000Z | """ ScanNet Class From Charles R. Qi, Hao Su.
Modiyied to support point-wise evaluation in ScanNet v2.
Author: Wenxuan Wu
Date: July 2018
"""
import pickle
import os
import sys
import numpy as np
class ScannetDatasetWholeScene_evaluation():
#prepare to give prediction on each points
def __init__(self, root, ... | 45.727273 | 127 | 0.625845 |
6e2f4ebf65ca2f4cfc420698f04a1867c7461f1b | 2,454 | py | Python | setup.py | ColinDuquesnoy/pyqode.rst | b94078193e597633db6220e498d738f4abbb8f52 | [
"MIT"
] | null | null | null | setup.py | ColinDuquesnoy/pyqode.rst | b94078193e597633db6220e498d738f4abbb8f52 | [
"MIT"
] | null | null | null | setup.py | ColinDuquesnoy/pyqode.rst | b94078193e597633db6220e498d738f4abbb8f52 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for pyqode.rst
"""
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from pyqode.rst import __version__
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to... | 33.162162 | 79 | 0.632029 |
be46cca8d2c9bcb02807280deaf0c07ea11d7174 | 3,361 | py | Python | tests/parsers/custom_destinations.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | 1,253 | 2015-01-02T13:58:02.000Z | 2022-03-31T08:43:39.000Z | tests/parsers/custom_destinations.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | 3,388 | 2015-01-02T11:17:58.000Z | 2022-03-30T10:21:45.000Z | tests/parsers/custom_destinations.py | roshanmaskey/plaso | 637856f578eb4bc81f62b97d7f483f69314e7f47 | [
"Apache-2.0"
] | 376 | 2015-01-20T07:04:54.000Z | 2022-03-04T23:53:00.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the .customDestinations-ms file parser."""
import unittest
from plaso.lib import definitions
from plaso.parsers import custom_destinations
from tests.parsers import test_lib
class CustomDestinationsParserTest(test_lib.ParserTestCase):
"""Tests for the .... | 37.344444 | 77 | 0.689081 |
f9a70f74983463938c5ec58e048cbbb9eaeca1e5 | 2,666 | py | Python | pymunk-pymunk-4.0.0/build/lib/pymunk/_chipmunk_ffi.py | adrienchevrier/FollE_ML | 56d39bcbafa33d336255d21379c4fa3b7268fe20 | [
"MIT"
] | 1 | 2017-04-05T13:00:51.000Z | 2017-04-05T13:00:51.000Z | pymunk-pymunk-4.0.0/pymunk/_chipmunk_ffi.py | adrienchevrier/FollE_ML | 56d39bcbafa33d336255d21379c4fa3b7268fe20 | [
"MIT"
] | null | null | null | pymunk-pymunk-4.0.0/pymunk/_chipmunk_ffi.py | adrienchevrier/FollE_ML | 56d39bcbafa33d336255d21379c4fa3b7268fe20 | [
"MIT"
] | null | null | null | """
Contains low level wrapper around the chipmunk_ffi methods exported by
chipmunk_ffi.h as those methods are not automatically generated by the wrapper
generator.
You usually dont need to use this module directly, instead use the high level binding in pymunk
"""
from ctypes import *
from .vec2d import Vec2d
from .... | 60.590909 | 163 | 0.803826 |
32065c60f833b07b4cc1f1a03b9708c6471069e3 | 7,544 | py | Python | tests/components/deconz/test_services.py | pawelka/home-assistant | df6c7b97f5a6df962114ef1a07676ef11d8757cd | [
"Apache-2.0"
] | null | null | null | tests/components/deconz/test_services.py | pawelka/home-assistant | df6c7b97f5a6df962114ef1a07676ef11d8757cd | [
"Apache-2.0"
] | null | null | null | tests/components/deconz/test_services.py | pawelka/home-assistant | df6c7b97f5a6df962114ef1a07676ef11d8757cd | [
"Apache-2.0"
] | null | null | null | """deCONZ service tests."""
from copy import deepcopy
from asynctest import Mock, patch
import pytest
import voluptuous as vol
from homeassistant.components import deconz
from homeassistant.components.deconz.const import CONF_BRIDGEID
from .test_gateway import (
BRIDGEID,
DECONZ_WEB_REQUEST,
ENTRY_CONFIG... | 33.678571 | 87 | 0.666357 |
150ac11554b97f7b967f92ba46148391bdd2abfd | 856 | py | Python | thingsboard_gateway/connectors/opcua/opcua_converter.py | eric-erki/thingsboard-gateway | 8522f6d63903475f4212b5af843c7ad98c5b855f | [
"Apache-2.0"
] | 1 | 2020-04-30T01:37:44.000Z | 2020-04-30T01:37:44.000Z | thingsboard_gateway/connectors/opcua/opcua_converter.py | xinge-ok/thingsboard-gateway | 6dab6030a6becf0ce9d34bc95a3a1f1e0838cb14 | [
"Apache-2.0"
] | null | null | null | thingsboard_gateway/connectors/opcua/opcua_converter.py | xinge-ok/thingsboard-gateway | 6dab6030a6becf0ce9d34bc95a3a1f1e0838cb14 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019. ThingsBoard
#
# 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 ... | 35.666667 | 88 | 0.728972 |
6207600e91571f4fe045ad84dae965f73274179c | 12,018 | py | Python | scantools/.history/scanbak/scanbackup_20210224144804.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2019-05-19T11:54:26.000Z | 2019-05-19T12:03:49.000Z | scantools/.history/scanbak/scanbackup_20210224144804.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 1 | 2020-11-27T07:55:15.000Z | 2020-11-27T07:55:15.000Z | scantools/.history/scanbak/scanbackup_20210224144804.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2021-09-06T18:06:12.000Z | 2021-12-31T07:44:43.000Z | """
1、文件到这里
一份给ES 一份给自己
新增ES旧索引入库
在继承原有功能的基础上
重构备份程序,按照数据内的
国家-当前时间(年-月-日)
如果按照数据内的时间的话也会面临和按国家端口备份的问题
不用再分端口了
create by judy 20201217
"""
from pathlib import Path
import threading
import json
from queue import Queue
import traceback
import datetime
import time
from shutil import copyfile
import zipfile
import shutil
... | 36.865031 | 93 | 0.525628 |
1b045ae3f3bd1daaecd3461015ade90edea9354c | 5,476 | py | Python | obsolete files/linux_int/python_int.py | uwacits4419/DSR | 208fcb37a4b5b2e10e7f96585d1eb10a932457a8 | [
"Unlicense"
] | null | null | null | obsolete files/linux_int/python_int.py | uwacits4419/DSR | 208fcb37a4b5b2e10e7f96585d1eb10a932457a8 | [
"Unlicense"
] | null | null | null | obsolete files/linux_int/python_int.py | uwacits4419/DSR | 208fcb37a4b5b2e10e7f96585d1eb10a932457a8 | [
"Unlicense"
] | 4 | 2020-02-20T08:54:10.000Z | 2022-03-29T07:45:12.000Z | #!/usr/bin/env python
import socket
import threading
import Packet
import Route
import PacketBuffer
import time
buffer = None
defaultSocket = None
rreqList= []
HOST = "localhost"
DSR_PORT = 60000
ACT_PORT = 61000
PROM_PORT = 62000
PROTOCOL_VALUE = 60000
EXPIRE_REQ_TIMER = 30
#def testFunction() :
# rawSocket = ... | 24.230088 | 127 | 0.68718 |
2c7e57f8f91a6d651a732a5ccf3736d4db5716e5 | 3,644 | py | Python | task_manager/task_manager/settings.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | task_manager/task_manager/settings.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | task_manager/task_manager/settings.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: keep the se... | 24.13245 | 91 | 0.656696 |
25bde7ce2b0617c1e396504acf7db319db900202 | 3,040 | py | Python | scenes/flip03_gen.py | BrianKmdy/mantaflow | 273d6c148374316e4d04cae4f46fed56a630e183 | [
"Apache-2.0"
] | null | null | null | scenes/flip03_gen.py | BrianKmdy/mantaflow | 273d6c148374316e4d04cae4f46fed56a630e183 | [
"Apache-2.0"
] | null | null | null | scenes/flip03_gen.py | BrianKmdy/mantaflow | 273d6c148374316e4d04cae4f46fed56a630e183 | [
"Apache-2.0"
] | null | null | null | #
# Flip surface mesh creation scene, note - saves & loads (ie plays back) meshes in UI mode
#
from manta import *
import os
mantaMsg( "\nNote - this scene reads in particle data generated by, e.g., flip02_surface.py (set saveParts=True there). It does not perform any fluid simulation, only generate a nicer surfac... | 25.546218 | 197 | 0.682566 |
425b910abdd035b89689130c2aa3847998c6e0bf | 974 | py | Python | entity/cards/LETL_030H/LETL_030P4.py | x014/lushi_script | edab2b88e3f0de8139de2541ab2daa331f777c0e | [
"MIT"
] | 102 | 2021-10-20T09:06:39.000Z | 2022-03-28T13:35:11.000Z | entity/cards/LETL_030H/LETL_030P4.py | x014/lushi_script | edab2b88e3f0de8139de2541ab2daa331f777c0e | [
"MIT"
] | 98 | 2021-10-19T16:13:27.000Z | 2022-03-27T13:27:49.000Z | entity/cards/LETL_030H/LETL_030P4.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 hearthstone.enums import GameTag, SpellSchool
from entity.spell_entity import SpellEntity
class LETL_030P4(SpellEntity):
"""
地狱火
对所有敌人造成8点伤害。火焰连击:再造成8点伤害。
"""
def __init__(self, entity: Entity):
super().__init__... | 31.419355 | 111 | 0.645791 |
6c2952d486f4337d507c7473de91420df60b5e56 | 6,170 | py | Python | tests/scripts/thread-cert/Cert_5_1_13_RouterReset.py | JeffreyHayes/openthread | 0dde90edcb0aafef5f4b5fc3d30e19f756e27ee4 | [
"BSD-3-Clause"
] | 2 | 2018-08-24T05:14:27.000Z | 2018-09-25T03:02:36.000Z | tests/scripts/thread-cert/Cert_5_1_13_RouterReset.py | JeffreyHayes/openthread | 0dde90edcb0aafef5f4b5fc3d30e19f756e27ee4 | [
"BSD-3-Clause"
] | 4 | 2016-09-09T17:10:04.000Z | 2016-09-29T05:18:09.000Z | tests/scripts/thread-cert/Cert_5_1_13_RouterReset.py | turon/openthread | 20145cb42fca90d791c4918475db28b7b91290d6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 40.064935 | 78 | 0.718963 |
af3d578205b51bec84e5cea7a331648456ce0fa7 | 17,082 | py | Python | snmp_cmds/commands.py | alextremblay/snmpcmd | 77245e6a2dc761397f2cbed0d1b41b8c279a4c82 | [
"MIT"
] | 7 | 2019-06-12T08:43:54.000Z | 2021-12-16T15:12:38.000Z | snmp_cmds/commands.py | alextremblay/snmpcmd | 77245e6a2dc761397f2cbed0d1b41b8c279a4c82 | [
"MIT"
] | 3 | 2019-10-22T08:28:33.000Z | 2021-10-04T21:15:42.000Z | snmp_cmds/commands.py | alextremblay/snmpcmd | 77245e6a2dc761397f2cbed0d1b41b8c279a4c82 | [
"MIT"
] | 5 | 2019-08-13T13:44:09.000Z | 2021-12-16T15:10:24.000Z | """
This module provides the individual SNMP commands for use in one-off
situations, or situations where you would need to make a single SNMP request
to many devices. If you plan on making multiple calls to the same device, you
might want to check out api.py instead.
"""
# Standard Library imports
import csv
from s... | 43.8 | 80 | 0.629552 |
3574d5ffd6b021573f43735e5a66e0680ecc0450 | 1,406 | py | Python | active_campaign_api/resources/custom_field_value.py | selfdecode/active-campaign | 1f085b304d9014ebba69d85164c9a5036b32f501 | [
"MIT"
] | null | null | null | active_campaign_api/resources/custom_field_value.py | selfdecode/active-campaign | 1f085b304d9014ebba69d85164c9a5036b32f501 | [
"MIT"
] | null | null | null | active_campaign_api/resources/custom_field_value.py | selfdecode/active-campaign | 1f085b304d9014ebba69d85164c9a5036b32f501 | [
"MIT"
] | 1 | 2021-06-03T12:00:25.000Z | 2021-06-03T12:00:25.000Z | """FieldValue resource for Active Campaign """
import typing
from ..base_resource import Resource
class CustomFieldValue(Resource):
"""An ActiveCampaign CustomFieldValue. Allows to:
- Create a CustomFieldValue
- Update a CustomFieldValue
- Delete a CustomFieldValue
"""
def __init__(
... | 27.038462 | 82 | 0.586771 |
3bd64aaa47c817711c5080a5604ea0617bc90397 | 16,760 | py | Python | test/functional/test_framework/mininode.py | altecoin-altc/altecoin | 913678a298eb7eb9157cd2be184b927cfbb429a9 | [
"MIT"
] | null | null | null | test/functional/test_framework/mininode.py | altecoin-altc/altecoin | 913678a298eb7eb9157cd2be184b927cfbb429a9 | [
"MIT"
] | null | null | null | test/functional/test_framework/mininode.py | altecoin-altc/altecoin | 913678a298eb7eb9157cd2be184b927cfbb429a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Bitcoin P2P ... | 37.662921 | 182 | 0.633532 |
d4a31b03db3a9f9ef49f6feda829dfbcfcd1e122 | 147 | py | Python | controls/admin.py | rossm6/accounts | 74633ce4038806222048d85ef9dfe97a957a6a71 | [
"MIT"
] | 11 | 2021-01-23T01:09:54.000Z | 2021-01-25T07:16:30.000Z | controls/admin.py | rossm6/accounts | 74633ce4038806222048d85ef9dfe97a957a6a71 | [
"MIT"
] | 7 | 2021-04-06T18:19:10.000Z | 2021-09-22T19:45:03.000Z | controls/admin.py | rossm6/accounts | 74633ce4038806222048d85ef9dfe97a957a6a71 | [
"MIT"
] | 3 | 2021-01-23T18:55:32.000Z | 2021-02-16T17:47:59.000Z | from django.contrib import admin
from controls.models import FinancialYear, Period
admin.site.register(FinancialYear)
admin.site.register(Period) | 24.5 | 49 | 0.843537 |
66bfe87e28747d7fcd3b0fc483a7904bee57dd56 | 1,061 | py | Python | pymagnitude/third_party/allennlp/tests/modules/attention/bilinear_attention_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 1,520 | 2018-03-01T13:37:49.000Z | 2022-03-25T11:40:20.000Z | pymagnitude/third_party/allennlp/tests/modules/attention/bilinear_attention_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 87 | 2018-03-03T15:12:50.000Z | 2022-02-21T15:24:12.000Z | pymagnitude/third_party/allennlp/tests/modules/attention/bilinear_attention_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 121 | 2018-03-03T08:40:53.000Z | 2022-03-16T05:19:38.000Z | # pylint: disable=no-self-use,invalid-name,protected-access
from __future__ import absolute_import
from numpy.testing import assert_almost_equal
import torch
from torch.nn.parameter import Parameter
from allennlp.common import Params
from allennlp.modules.attention import BilinearAttention
from allennlp.common.testin... | 39.296296 | 88 | 0.67295 |
6e3863db078bdb288990742523586afc47cd118f | 6,725 | py | Python | configs/_base_/models/cascade_mask_rcnn_r50_fpn_fashion_spinet.py | jireh-father/mmdetection | b797e4d5b81c5a3d7d868ee2dc9aa27dbab23e7d | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/cascade_mask_rcnn_r50_fpn_fashion_spinet.py | jireh-father/mmdetection | b797e4d5b81c5a3d7d868ee2dc9aa27dbab23e7d | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/cascade_mask_rcnn_r50_fpn_fashion_spinet.py | jireh-father/mmdetection | b797e4d5b81c5a3d7d868ee2dc9aa27dbab23e7d | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='CascadeRCNN',
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_generator=dict(
t... | 32.645631 | 79 | 0.472862 |
2f1f79dd25fc9a0632afc18a1a954f100d2266b9 | 504 | py | Python | angr/angr/procedures/definitions/glibc.py | Ruide/angr-dev | 964dc80c758e25c698c2cbcc454ef5954c5fa0a0 | [
"BSD-2-Clause"
] | null | null | null | angr/angr/procedures/definitions/glibc.py | Ruide/angr-dev | 964dc80c758e25c698c2cbcc454ef5954c5fa0a0 | [
"BSD-2-Clause"
] | null | null | null | angr/angr/procedures/definitions/glibc.py | Ruide/angr-dev | 964dc80c758e25c698c2cbcc454ef5954c5fa0a0 | [
"BSD-2-Clause"
] | null | null | null | from . import SimLibrary
from .. import SIM_PROCEDURES as P
libc = SimLibrary()
libc.set_library_names('libc.so.6', 'libc.so.0', 'libc.so')
libc.add_all_from_dict(P['libc'])
libc.add_all_from_dict(P['posix'])
libc.add_all_from_dict(P['glibc'])
libc.add_alias('abort', '__assert_fail', '__stack_chk_fail')
libc.add_alias... | 38.769231 | 86 | 0.736111 |
f9e4b3a1e3737dee017683d53c9cd59ba1ecf4dd | 6,696 | py | Python | src/datasets/voc2012.py | paulwarkentin/tf-ssd-vgg | f48e3ccbb8eb092d3cb82a9d90164c7328880477 | [
"MIT"
] | 5 | 2021-09-26T07:19:42.000Z | 2022-03-11T23:25:36.000Z | ssd/src/datasets/voc2012.py | bharatmahaur/ComparativeStudy | 2e3b6de882acc2a465e1b7c8bcd23cc9c8181d3d | [
"Apache-2.0"
] | null | null | null | ssd/src/datasets/voc2012.py | bharatmahaur/ComparativeStudy | 2e3b6de882acc2a465e1b7c8bcd23cc9c8181d3d | [
"Apache-2.0"
] | null | null | null | ##
## /src/datasets/voc2012.py
##
## Created by Paul Warkentin <paul@warkentin.email> on 13/07/2018.
## Updated by Paul Warkentin <paul@warkentin.email> on 15/07/2018.
##
import argparse
import os
import sys
import tensorflow as tf
import xml.etree.ElementTree
from datetime import datetime
from tqdm import tqdm
__exe... | 29.76 | 105 | 0.705645 |
422cb700c27ca9942124e02ee61a2c5cd2309c79 | 592 | py | Python | intro/part07-02_special_characters/src/special_characters.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | intro/part07-02_special_characters/src/special_characters.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | intro/part07-02_special_characters/src/special_characters.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | # Write your solution here
import string
def separate_characters(my_string: str):
ascii_ltr = ""
punc_ltr = ""
others = ""
for i in my_string:
if i in string.ascii_letters:
ascii_ltr += i
if i in string.punctuation:
punc_ltr += i
if i not in string.ascii_l... | 28.190476 | 73 | 0.616554 |
872d7df74a21fec2db7d53179d7c966524a81327 | 33,084 | py | Python | preql/core/evaluate.py | manor/Preql | f1c294b7893843ef77f3c81410e315c573b5a5ef | [
"MIT"
] | null | null | null | preql/core/evaluate.py | manor/Preql | f1c294b7893843ef77f3c81410e315c573b5a5ef | [
"MIT"
] | null | null | null | preql/core/evaluate.py | manor/Preql | f1c294b7893843ef77f3c81410e315c573b5a5ef | [
"MIT"
] | null | null | null | from typing import List, Optional
import logging
from pathlib import Path
from preql.utils import safezip, dataclass, SafeDict, listgen
from preql import settings
from .interp_common import assert_type, exclude_fields, call_builtin_func, is_global_scope, cast_to_python_string, cast_to_python_int
from .exceptions impo... | 32.05814 | 137 | 0.654002 |
aefc522314fb7a549eff6a18be9fe6cdaeaaef41 | 35 | py | Python | mcproxy.py | felixbade/minecraft-proxy | 3b040cda4f06a1c7711fd7aea1158b33ca8640f7 | [
"Artistic-2.0"
] | 1 | 2015-02-17T08:43:12.000Z | 2015-02-17T08:43:12.000Z | mcproxy.py | felixbade/minecraft-proxy | 3b040cda4f06a1c7711fd7aea1158b33ca8640f7 | [
"Artistic-2.0"
] | null | null | null | mcproxy.py | felixbade/minecraft-proxy | 3b040cda4f06a1c7711fd7aea1158b33ca8640f7 | [
"Artistic-2.0"
] | null | null | null | from app import proxy
proxy.run()
| 8.75 | 21 | 0.742857 |
43ff7fa597f1bc570bff198e6443b39de6ab886f | 110,899 | py | Python | python/ccxt/bybit.py | red-eagle-eye/ccxt | 56260c9f00d8eadbb23c9505c224d7f82a0d4f35 | [
"MIT"
] | 2 | 2021-10-08T23:05:57.000Z | 2022-01-22T15:03:40.000Z | python/ccxt/bybit.py | ReWard0101/ccxt | be730006aeef31ff5b533ad93a8f098645665d6d | [
"MIT"
] | null | null | null | python/ccxt/bybit.py | ReWard0101/ccxt | be730006aeef31ff5b533ad93a8f098645665d6d | [
"MIT"
] | 3 | 2021-08-14T18:53:01.000Z | 2021-12-21T22:36:42.000Z | # -*- 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
# -----------------------------------------------------------------------------
try:
basestri... | 43.781682 | 340 | 0.464928 |
b32aa637a7ea6dcb432b655b25e16f4e94548efe | 2,682 | py | Python | org/geo/utils/Generator.py | haiming-97/Conflict1227 | c40f8fef17b59cbdc372405a6559f18d4f91c32b | [
"MIT"
] | null | null | null | org/geo/utils/Generator.py | haiming-97/Conflict1227 | c40f8fef17b59cbdc372405a6559f18d4f91c32b | [
"MIT"
] | null | null | null | org/geo/utils/Generator.py | haiming-97/Conflict1227 | c40f8fef17b59cbdc372405a6559f18d4f91c32b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding=utf-8
import os
import xlwt
import numpy as np
import random
import xlrd
def satisfied(prob):
return random.random() < prob
def rand():
return random.random()
def select(a, b):
return random.randint(a, b)
def normal(mu, sigma):
return random.normalvariate(mu=mu, sigma=si... | 25.065421 | 113 | 0.63572 |
0bc7c40da8940e30ddda98c1f2cfaf581b50454c | 4,437 | py | Python | pdfSplitter/pdf2htmlEX/test/test_remote_browser.py | mackymiro/primo-tpccr | a0db409bb7e72911cffc59e771fa0d98c978d3b3 | [
"MIT"
] | null | null | null | pdfSplitter/pdf2htmlEX/test/test_remote_browser.py | mackymiro/primo-tpccr | a0db409bb7e72911cffc59e771fa0d98c978d3b3 | [
"MIT"
] | null | null | null | pdfSplitter/pdf2htmlEX/test/test_remote_browser.py | mackymiro/primo-tpccr | a0db409bb7e72911cffc59e771fa0d98c978d3b3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Run browser tests through Sauce Labs
import unittest
import sys
import os
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from sauceclient import Sauce... | 31.920863 | 124 | 0.62407 |
7216fd3970c95b89547005638bec6539830063a2 | 947 | py | Python | softhub/rest_api/serializers.py | davcri/softhub | 5a932da36d1393c361b1940283d468692fe57d9d | [
"MIT"
] | 1 | 2018-05-05T20:01:15.000Z | 2018-05-05T20:01:15.000Z | softhub/rest_api/serializers.py | davcri/softhub | 5a932da36d1393c361b1940283d468692fe57d9d | [
"MIT"
] | 2 | 2021-03-18T20:16:53.000Z | 2021-06-08T19:09:15.000Z | softhub/rest_api/serializers.py | davcri/softhub | 5a932da36d1393c361b1940283d468692fe57d9d | [
"MIT"
] | 2 | 2017-05-10T22:33:39.000Z | 2018-01-30T14:05:06.000Z | from rest_framework.serializers import ModelSerializer
from softhub.models.OperatingSystem import OperatingSystem
from softhub.models.Application import Application
from softhub.models.Executable import Executable
from softhub.models.Developer import Developer
from softhub.models.Version import Version
class Operati... | 24.282051 | 58 | 0.724393 |
5a2f783d69aca9839b2fb6dda89263f44666c37b | 1,157 | py | Python | TopQuarkAnalysis/TopJetCombination/python/TtSemiLepHypKinFit_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | TopQuarkAnalysis/TopJetCombination/python/TtSemiLepHypKinFit_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | TopQuarkAnalysis/TopJetCombination/python/TtSemiLepHypKinFit_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
#
# module to make the kinematic fit hypothesis
#
ttSemiLepHypKinFit = cms.EDProducer("TtSemiLepHypKinFit",
## met input
mets = cms.InputTag("patMETs"),
## jet input
jets = cms.InputTag("selectedPatJets"),
## lepton input
leps = cm... | 42.851852 | 113 | 0.699222 |
2785ad9ea682590b60d84262d4e69687d346f52c | 1,277 | py | Python | app/streamflow/sherlock/sh_Q90_EcoB.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/streamflow/sherlock/sh_Q90_EcoB.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/streamflow/sherlock/sh_Q90_EcoB.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | 2 | 2021-04-04T02:45:59.000Z | 2022-03-19T09:41:39.000Z | from hydroDL import kPath
from hydroDL.data import usgs, gageII, gridMET, ntn
from hydroDL.master import slurm
from hydroDL.master import basinFull
varX = gridMET.varLst
varY = ['runoff']
varXC = gageII.lstWaterQuality
varYC = None
dataName = 'Q90'
sd = '1979-01-01'
ed = '2010-01-01'
l3Lst = ['080304',
'05... | 26.604167 | 90 | 0.614722 |
04a15c8517477127a002f98dd92591b9653a7a6b | 13,552 | py | Python | carp_fastapi/api/routers/services/carp_deployments_datapoints_consents.py | almaxdtu/carp.client-fastAPI | 867394b0d43292abb42edfe38462a8ebe304ac57 | [
"MIT"
] | 1 | 2022-03-26T04:45:58.000Z | 2022-03-26T04:45:58.000Z | carp_fastapi/api/routers/services/carp_deployments_datapoints_consents.py | cph-cachet/carp.client-fastAPI | 867394b0d43292abb42edfe38462a8ebe304ac57 | [
"MIT"
] | null | null | null | carp_fastapi/api/routers/services/carp_deployments_datapoints_consents.py | cph-cachet/carp.client-fastAPI | 867394b0d43292abb42edfe38462a8ebe304ac57 | [
"MIT"
] | null | null | null | """
Copyright 2018 Copenhagen Center for Health Technology (CACHET) at the Technical University of Denmark (DTU).
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ”Software”), to deal in the Software without restriction, including wit... | 47.384615 | 460 | 0.63142 |
91c7c605e2e900ad5999099c615b54bddd48045d | 177 | py | Python | backup_scripts/exceptions.py | markliederbach/backup-scripts | 5c70b786d4c5303e4b78b02ed4649b5972f9ae5d | [
"MIT"
] | null | null | null | backup_scripts/exceptions.py | markliederbach/backup-scripts | 5c70b786d4c5303e4b78b02ed4649b5972f9ae5d | [
"MIT"
] | null | null | null | backup_scripts/exceptions.py | markliederbach/backup-scripts | 5c70b786d4c5303e4b78b02ed4649b5972f9ae5d | [
"MIT"
] | null | null | null |
class BackupsException(Exception):
pass
class NextCloudBackupsException(BackupsException):
pass
class NextCloudClientException(NextCloudBackupsException):
pass | 14.75 | 58 | 0.80226 |
da5f835de5c155e7478cc5ea92b06b2d8e65870b | 2,542 | py | Python | src/isle/evolver/transform/constantShift.py | chelseajohn/isle | f610b55a1e8b6d2584896eb649092b0524cc1f8c | [
"MIT"
] | 2 | 2021-01-14T17:47:01.000Z | 2021-07-16T22:31:25.000Z | src/isle/evolver/transform/constantShift.py | chelseajohn/isle | f610b55a1e8b6d2584896eb649092b0524cc1f8c | [
"MIT"
] | 21 | 2018-06-04T07:09:02.000Z | 2020-12-11T09:37:08.000Z | src/isle/evolver/transform/constantShift.py | chelseajohn/isle | f610b55a1e8b6d2584896eb649092b0524cc1f8c | [
"MIT"
] | 3 | 2021-01-18T19:18:29.000Z | 2021-03-26T03:27:15.000Z | r"""!\file
\ingroup evolvers
Transform to shift configurations by a constant.
"""
import numpy as np
from .transform import Transform
from ... import CDVector
class ConstantShift(Transform):
r"""! \ingroup evolvers
Transform that shifts configurations by a constant.
"""
def __init__(self, shift, a... | 34.821918 | 88 | 0.614477 |
d0aa9899a6ca4f1a53def7ab2771989ffce2b0f6 | 539 | py | Python | cython/profiling.py | Chiel92/evolutionary-computing | 12a77a9d0504d55141ac8f8b02213d58a5a39d2b | [
"MIT"
] | null | null | null | cython/profiling.py | Chiel92/evolutionary-computing | 12a77a9d0504d55141ac8f8b02213d58a5a39d2b | [
"MIT"
] | null | null | null | cython/profiling.py | Chiel92/evolutionary-computing | 12a77a9d0504d55141ac8f8b02213d58a5a39d2b | [
"MIT"
] | null | null | null | # encoding: utf-8
# filename: profile.py
"""
Profiling utilities.
"""
# Import profile tools
import pstats, cProfile
def profile(function, filename='Profile.prof'):
"""Evaluate and profile given string."""
cProfile.runctx('print(function())', globals(), locals(), filename)
report = pstats.Stats(filename)... | 24.5 | 71 | 0.695733 |
8b0efb1a924e24b9f13f5ae09f0ac3edd64a05a5 | 25,044 | py | Python | delphin/ace.py | arademaker/pydelphin | 3ebcce48c4edcb4e797fc8e447a80e38e8fef53a | [
"MIT"
] | null | null | null | delphin/ace.py | arademaker/pydelphin | 3ebcce48c4edcb4e797fc8e447a80e38e8fef53a | [
"MIT"
] | null | null | null | delphin/ace.py | arademaker/pydelphin | 3ebcce48c4edcb4e797fc8e447a80e38e8fef53a | [
"MIT"
] | null | null | null |
"""
An interface for the ACE processor.
"""
from typing import (
Any, Iterator, Iterable, Mapping, Dict, List, Tuple, Pattern, IO)
import logging
import os
from pathlib import Path
import argparse
import re
from subprocess import (
check_call,
check_output,
CalledProcessError,
Popen,
PIPE
)
fr... | 34.880223 | 79 | 0.586807 |
fed168295183d3301861825c3cea75da189a0516 | 441 | py | Python | Python Fundamentals/Functions/More Exr/Task02.py | DonikaChervenkova/SoftUni | bff579c037ec48f39ed193b34bc3502a32e90732 | [
"MIT"
] | null | null | null | Python Fundamentals/Functions/More Exr/Task02.py | DonikaChervenkova/SoftUni | bff579c037ec48f39ed193b34bc3502a32e90732 | [
"MIT"
] | null | null | null | Python Fundamentals/Functions/More Exr/Task02.py | DonikaChervenkova/SoftUni | bff579c037ec48f39ed193b34bc3502a32e90732 | [
"MIT"
] | 1 | 2021-12-04T12:30:57.000Z | 2021-12-04T12:30:57.000Z | import math
x1 = float(input())
y1 = float(input())
x2 = float(input())
y2 = float(input())
def get_distance(num1, num2):
x = math.pow(num1, 2)
y = math.pow(num2, 2)
return math.sqrt(x + y)
double_distance_1 = get_distance(x1, y1)
double_distance_2 = get_distance(x2, y2)
if double_distance_1 <= double... | 20.045455 | 50 | 0.646259 |
230b9ea7323f2b255f57864bef93e4f5c1a8aef3 | 250 | py | Python | pdtable/io/__init__.py | startable/pdtable | 693af4f4d49a27f54c79887a42a0b1a1b68d77a9 | [
"BSD-3-Clause"
] | 5 | 2020-11-11T10:15:04.000Z | 2021-08-19T07:45:12.000Z | pdtable/io/__init__.py | startable/pdtable | 693af4f4d49a27f54c79887a42a0b1a1b68d77a9 | [
"BSD-3-Clause"
] | 63 | 2020-09-02T12:40:14.000Z | 2021-07-14T19:52:33.000Z | pdtable/io/__init__.py | startable/pdtable | 693af4f4d49a27f54c79887a42a0b1a1b68d77a9 | [
"BSD-3-Clause"
] | 4 | 2021-01-04T12:44:45.000Z | 2022-03-02T00:38:01.000Z | # flake8: noqa
from .csv import read_csv, write_csv
from .excel import read_excel, write_excel
from .json import table_to_json_data, json_data_to_table
from .parsers.fixer import ParseFixer
from .parsers.blocks import parse_blocks
from . import load | 31.25 | 56 | 0.828 |
86ec6b6c179ac48e0eed82400e5041a05ababd77 | 3,102 | py | Python | lib/governance_class.py | lifetioncoin/sentinel | a895cf671424261a60174386939391ea07c3a6d6 | [
"MIT"
] | null | null | null | lib/governance_class.py | lifetioncoin/sentinel | a895cf671424261a60174386939391ea07c3a6d6 | [
"MIT"
] | null | null | null | lib/governance_class.py | lifetioncoin/sentinel | a895cf671424261a60174386939391ea07c3a6d6 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib'))
import models
from bitcoinrpc.authproxy import JSONRPCException
import misc
import re
from misc import printdbg
import time
# mixin for GovObj composed classes like proposal and superblock, etc.
class GovernanceClass(object):
... | 33.354839 | 114 | 0.657318 |
f9e43300cbe464e0fe339e2196a8f1de802f049d | 12,633 | py | Python | BaseTools/Source/Python/Common/EdkIIWorkspace.py | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | 6 | 2020-01-10T05:16:15.000Z | 2022-01-06T17:41:58.000Z | BaseTools/Source/Python/Common/EdkIIWorkspace.py | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Source/Python/Common/EdkIIWorkspace.py | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | 3 | 2018-04-21T07:59:33.000Z | 2018-04-23T02:06:01.000Z | ## @file
# This is the base class for applications that operate on an EDK II Workspace
#
# Copyright (c) 2007 - 2014, 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 di... | 39.478125 | 158 | 0.643394 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.