hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7d24ad5d42826d6ca6b720e6b6c9c837eca5a60b | 122 | py | Python | formatternum.py | niLeche19/Hbio2019 | aff4fd534b2b0e06d3b65697cfca7c999a825f7b | [
"MIT"
] | null | null | null | formatternum.py | niLeche19/Hbio2019 | aff4fd534b2b0e06d3b65697cfca7c999a825f7b | [
"MIT"
] | null | null | null | formatternum.py | niLeche19/Hbio2019 | aff4fd534b2b0e06d3b65697cfca7c999a825f7b | [
"MIT"
] | null | null | null | from pyautogui import hotkey
from time import sleep
sleep(2)
for i in range(108):
hotkey('home','backspace',',')
| 20.333333 | 35 | 0.680328 |
5c0b041db074a37c45e2163d8475940473e007ad | 27,901 | py | Python | libcloud/test/dns/test_durabledns.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | null | null | null | libcloud/test/dns/test_durabledns.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | null | null | null | libcloud/test/dns/test_durabledns.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 49.557726 | 79 | 0.602452 |
564574a5d0414c7d490004e4787fd06112adcd5a | 1,556 | py | Python | test/test_application_user.py | My-Data-My-Consent/python-sdk | 414640bcda6350e6f5e74e42442737eb8d5b7447 | [
"Apache-2.0"
] | null | null | null | test/test_application_user.py | My-Data-My-Consent/python-sdk | 414640bcda6350e6f5e74e42442737eb8d5b7447 | [
"Apache-2.0"
] | 5 | 2021-12-19T10:29:43.000Z | 2022-03-31T22:15:37.000Z | test/test_application_user.py | mydatamyconsent/python-sdk | 414640bcda6350e6f5e74e42442737eb8d5b7447 | [
"Apache-2.0"
] | null | null | null | """
My Data My Consent - Developer API
Unleashing the power of data consent by establishing trust. The Platform Core Developer API defines a set of capabilities that can be used to request, issue, manage and update data, documents and credentials by organizations. The API can be used to request, manage and upd... | 34.577778 | 469 | 0.751285 |
7b54e1f2303ed2dc97daa6f55029fd228e26eeb9 | 9,877 | py | Python | tests/lock_test.py | qyl2021/certbot | 60a91eb688ab3329dcc8af17cedd5921c887c0ea | [
"Apache-2.0"
] | 1 | 2021-11-04T21:29:20.000Z | 2021-11-04T21:29:20.000Z | tests/lock_test.py | qyl2021/certbot | 60a91eb688ab3329dcc8af17cedd5921c887c0ea | [
"Apache-2.0"
] | 5 | 2021-03-15T21:43:04.000Z | 2021-07-22T20:31:43.000Z | tests/lock_test.py | qyl2021/certbot | 60a91eb688ab3329dcc8af17cedd5921c887c0ea | [
"Apache-2.0"
] | null | null | null | """Tests to ensure the lock order is preserved."""
import atexit
import datetime
import functools
import logging
import os
import re
import shutil
import subprocess
import sys
import tempfile
from cryptography import x509
from cryptography.hazmat.backends import default_backend
# TODO: once mypy has cryptography types... | 33.255892 | 98 | 0.690696 |
cebd281e412a2ccae9973947beebde7f06f36733 | 1,062 | py | Python | src/python/dart/engine/es/actions/force_merge_index.py | RetailMeNotSandbox/dart | 58a05f56c04fadd6741501262d92aeb143cd2f2e | [
"MIT"
] | 18 | 2016-03-03T19:10:21.000Z | 2021-07-14T22:37:35.000Z | src/python/dart/engine/es/actions/force_merge_index.py | RetailMeNotSandbox/dart | 58a05f56c04fadd6741501262d92aeb143cd2f2e | [
"MIT"
] | 62 | 2016-04-11T15:17:23.000Z | 2017-09-08T17:18:53.000Z | src/python/dart/engine/es/actions/force_merge_index.py | RetailMeNotSandbox/dart | 58a05f56c04fadd6741501262d92aeb143cd2f2e | [
"MIT"
] | 15 | 2016-03-03T15:38:34.000Z | 2019-03-27T19:33:08.000Z | import logging
import traceback
import elasticsearch
from dart.engine.es.admin.cluster import ElasticsearchCluster
_logger = logging.getLogger(__name__)
def force_merge_index(elasticsearch_engine, datastore, action):
"""
:type elasticsearch_engine: dart.engine.es.es.ElasticsearchEngine
:type datastore: ... | 31.235294 | 113 | 0.672316 |
30cb0683bf1676825dec12c24ef8cfc4823c8927 | 610 | py | Python | build/lib/Py_FS/wrapper/nature_inspired/_transfer_functions.py | consigliere19/Py-FS | 6d97fb0649da8eb10003f9f261aef56d7604897e | [
"MIT"
] | 1 | 2020-12-26T11:16:42.000Z | 2020-12-26T11:16:42.000Z | build/lib/Py_FS/wrapper/nature_inspired/_transfer_functions.py | consigliere19/Py-FS | 6d97fb0649da8eb10003f9f261aef56d7604897e | [
"MIT"
] | null | null | null | build/lib/Py_FS/wrapper/nature_inspired/_transfer_functions.py | consigliere19/Py-FS | 6d97fb0649da8eb10003f9f261aef56d7604897e | [
"MIT"
] | null | null | null | import numpy as np
def sigmoid(val):
if val < 0:
return 1 - 1/(1 + np.exp(val))
else:
return 1/(1 + np.exp(-val))
def v_func(val):
return val/(np.sqrt(1 + val*val))
def u_func(val):
alpha, beta = 2, 1.5
return alpha * np.power(abs(val), beta)
def get_trans_function(shape):
i... | 21.034483 | 103 | 0.557377 |
a62870d47c5d06761845a0158cfed73f689f3882 | 1,192 | py | Python | functions.py | circlelq/lonpos-3D | 8fbe2ad7cee017eeaeb245b8a0ff2ffb2fc1ffb7 | [
"MIT"
] | null | null | null | functions.py | circlelq/lonpos-3D | 8fbe2ad7cee017eeaeb245b8a0ff2ffb2fc1ffb7 | [
"MIT"
] | null | null | null | functions.py | circlelq/lonpos-3D | 8fbe2ad7cee017eeaeb245b8a0ff2ffb2fc1ffb7 | [
"MIT"
] | null | null | null | from math import *
import numpy as np
def Rotate1(subject):
"""绕(0,sqrt(2)/2,sqrt(2)/2)旋转90度"""
rot = [
[0,-sqrt(2)/2,sqrt(2)/2],
[sqrt(2)/2,1/2,1/2],
[-sqrt(2)/2,1/2,1/2]
]
temp =[]
for i in subject:
temp.append(np.dot(rot,i).tolist())
return temp
def Rotate2(subject):
"""绕(1,0,0)旋转90度"""
rot = [
[1,0,... | 18.625 | 53 | 0.57047 |
493706f6d9245c8a1c62ba73929dbe504ab111a0 | 6,005 | py | Python | parsl/providers/pbspro/pbspro.py | vkhodygo/parsl | ce2552caed9d223c3d8a84c16f830abc5f926331 | [
"Apache-2.0"
] | 323 | 2017-07-28T21:31:27.000Z | 2022-03-05T13:06:05.000Z | parsl/providers/pbspro/pbspro.py | vkhodygo/parsl | ce2552caed9d223c3d8a84c16f830abc5f926331 | [
"Apache-2.0"
] | 1,286 | 2017-06-01T16:50:00.000Z | 2022-03-31T16:45:14.000Z | parsl/providers/pbspro/pbspro.py | vkhodygo/parsl | ce2552caed9d223c3d8a84c16f830abc5f926331 | [
"Apache-2.0"
] | 113 | 2017-06-03T11:38:40.000Z | 2022-03-26T16:43:05.000Z | import logging
import os
import time
from parsl.channels import LocalChannel
from parsl.launchers import SingleNodeLauncher
from parsl.providers.pbspro.template import template_string
from parsl.providers import TorqueProvider
from parsl.providers.provider_base import JobState, JobStatus
logger = logging.getLogger(__... | 37.067901 | 104 | 0.593172 |
e3f32a9203be14396479de133a86448287bed1d0 | 3,597 | py | Python | txros/src/txros/test/util.py | uf-mil/txros | 616ca3101ee4d2f89d5b3df1c3981a9371b85399 | [
"BSD-3-Clause"
] | 5 | 2015-11-10T18:24:58.000Z | 2021-01-10T19:13:24.000Z | txros/src/txros/test/util.py | uf-mil/txros | 616ca3101ee4d2f89d5b3df1c3981a9371b85399 | [
"BSD-3-Clause"
] | 23 | 2016-03-09T04:01:44.000Z | 2018-09-09T00:01:47.000Z | txros/src/txros/test/util.py | uf-mil/txros | 616ca3101ee4d2f89d5b3df1c3981a9371b85399 | [
"BSD-3-Clause"
] | 8 | 2016-04-25T00:19:03.000Z | 2022-03-01T18:27:47.000Z | from __future__ import division
import os
import tempfile
import shutil
import subprocess
import traceback
from twisted.internet import defer, threads
import genpy
from rosgraph_msgs.msg import Clock
from txros import NodeHandle, util
@defer.inlineCallbacks
def start_rosmaster():
tmpd = tempfile.mkdtemp()
... | 33 | 116 | 0.461774 |
8d50ad6fbbc57af81c789d797a389211ff8f9b8a | 5,101 | py | Python | data/p3BR/R2/benchmark/startQiskit2.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit2.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit2.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=4
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from ... | 28.497207 | 140 | 0.62674 |
6577b4dd403423de2c7768e9ddf3621a69a13146 | 125,726 | py | Python | tests/unit/gapic/dialogflow_v2beta1/test_intents.py | googleapis/dialogflow-python-client-v2 | 069c71e296c94b5e1bcfb9be2abeadd7c44dcf3d | [
"Apache-2.0"
] | 171 | 2018-09-19T21:16:18.000Z | 2020-12-07T17:41:10.000Z | tests/unit/gapic/dialogflow_v2beta1/test_intents.py | googleapis/dialogflow-python-client-v2 | 069c71e296c94b5e1bcfb9be2abeadd7c44dcf3d | [
"Apache-2.0"
] | 150 | 2018-09-25T14:04:28.000Z | 2020-12-09T21:45:43.000Z | tests/unit/gapic/dialogflow_v2beta1/test_intents.py | googleapis/dialogflow-python-client-v2 | 069c71e296c94b5e1bcfb9be2abeadd7c44dcf3d | [
"Apache-2.0"
] | 75 | 2018-09-22T14:12:18.000Z | 2020-12-08T07:12:12.000Z | # -*- coding: utf-8 -*-
# Copyright 2022 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 36.138546 | 109 | 0.668406 |
8f6ca983d7638896883cc4a4f0cc681f0d8a3f77 | 9,699 | py | Python | sdk/python/pulumi_azure_native/storsimple/v20161001/file_share.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/storsimple/v20161001/file_share.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/storsimple/v20161001/file_share.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 43.689189 | 365 | 0.644603 |
e1e849d778f376c9ead4293a78fc27ff2ee523f2 | 1,834 | py | Python | osu/local/hitobject/std/std_spinner_hitobject.py | abraker95/ultimate_osu_analyzer | bea58c997d13c3f461ccbe682f52799f0f88fdea | [
"MIT"
] | 23 | 2019-02-27T06:20:15.000Z | 2022-03-31T22:54:11.000Z | osu/local/hitobject/std/std_spinner_hitobject.py | abraker95/ultimate_osu_analyzer | bea58c997d13c3f461ccbe682f52799f0f88fdea | [
"MIT"
] | 38 | 2019-03-03T17:35:39.000Z | 2021-08-23T20:43:34.000Z | osu/local/hitobject/std/std_spinner_hitobject.py | abraker95/ultimate_osu_analyzer | bea58c997d13c3f461ccbe682f52799f0f88fdea | [
"MIT"
] | 4 | 2020-03-30T20:43:14.000Z | 2022-03-06T19:40:15.000Z | from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from osu.local.hitobject.hitobject import Hitobject
from osu.local.hitobject.std.std import Std
from misc.frozen_cls import FrozenCls
from misc.math_utils import value_to_percent
"""
Visualizes the osu!std spinner
Input:
beatm... | 27.373134 | 103 | 0.686478 |
94f7c8356f7cc8cc911b3e9e13b94872b32ffece | 3,778 | py | Python | 02_EL_Zero[ mastering python ]/Zero_2.py | Magdyedwar1996/python-level-one-codes | 066086672f43488bc8b32c620b5e2f94cedfe3da | [
"MIT"
] | 1 | 2021-11-16T14:14:38.000Z | 2021-11-16T14:14:38.000Z | 02_EL_Zero[ mastering python ]/Zero_2.py | Magdyedwar1996/python-level-one-codes | 066086672f43488bc8b32c620b5e2f94cedfe3da | [
"MIT"
] | null | null | null | 02_EL_Zero[ mastering python ]/Zero_2.py | Magdyedwar1996/python-level-one-codes | 066086672f43488bc8b32c620b5e2f94cedfe3da | [
"MIT"
] | null | null | null | # dictionary
# dictionary one
user = {
"name" : "magdy" ,
"age" : 23 ,
"country" : 'egypt' ,
"skills" : { ' html ' , ' css ' , ' python '} ,
"name " : " kero "
}
print(user)
print(user["name"])
print(user["skills"])
print(user.get("country")) # get( )
... | 29.748031 | 61 | 0.214929 |
141ff64e1f88ce3917d3c79aacaa0a4a59847432 | 46,932 | py | Python | zerver/tests/test_home.py | sayamsamal/zulip | d26a15b14dea5a5b1a93a14a91352798c074dc5e | [
"Apache-2.0"
] | 3 | 2021-09-12T05:05:28.000Z | 2021-12-30T09:45:20.000Z | zerver/tests/test_home.py | sayamsamal/zulip | d26a15b14dea5a5b1a93a14a91352798c074dc5e | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_home.py | sayamsamal/zulip | d26a15b14dea5a5b1a93a14a91352798c074dc5e | [
"Apache-2.0"
] | 1 | 2022-02-04T05:15:12.000Z | 2022-02-04T05:15:12.000Z | import calendar
import datetime
import urllib
from datetime import timedelta
from typing import Any
from unittest.mock import patch
import orjson
import pytz
from django.conf import settings
from django.http import HttpResponse
from django.test import override_settings
from django.utils.timezone import now as timezone... | 40.493529 | 109 | 0.640586 |
8b0b7e86c6e70b2398393d29f4d8b05be87a245e | 118 | py | Python | web.py | Phosphorescentt/EsportsFixturesEmailer | cf8fc6ed346fd8f8d202087f5b2afc56e25eb56a | [
"MIT"
] | null | null | null | web.py | Phosphorescentt/EsportsFixturesEmailer | cf8fc6ed346fd8f8d202087f5b2afc56e25eb56a | [
"MIT"
] | null | null | null | web.py | Phosphorescentt/EsportsFixturesEmailer | cf8fc6ed346fd8f8d202087f5b2afc56e25eb56a | [
"MIT"
] | null | null | null | from flask import Flask
import render
app = Flask(__name__)
@app.route("/")
def index():
return render.main()
| 10.727273 | 24 | 0.677966 |
220db6f28054d2564334652c38cd536aa4feafa4 | 6,301 | py | Python | spotisync.py | SmBe19/SpotifyPlaylistSync | c9166cf2b517c93aebb3341741300d308070e121 | [
"MIT"
] | 1 | 2020-12-04T07:08:27.000Z | 2020-12-04T07:08:27.000Z | spotisync.py | SmBe19/SpotifyPlaylistSync | c9166cf2b517c93aebb3341741300d308070e121 | [
"MIT"
] | null | null | null | spotisync.py | SmBe19/SpotifyPlaylistSync | c9166cf2b517c93aebb3341741300d308070e121 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import base64
import configparser
import json
import os
import re
import requests
import urllib
import webbrowser
os.chdir(os.path.dirname(os.path.abspath(__file__)))
class Spotify:
def __init__(self):
self.config = configparser.ConfigParser()
self.config.r... | 34.244565 | 109 | 0.58213 |
853255aca6aea20c5baccff6076d95f830864c51 | 1,264 | py | Python | newton.py | chuchienshu/Optimization-Assignments | c8212ef80d6fd264537aebcf4cf55cd32fc5ca44 | [
"Apache-2.0"
] | null | null | null | newton.py | chuchienshu/Optimization-Assignments | c8212ef80d6fd264537aebcf4cf55cd32fc5ca44 | [
"Apache-2.0"
] | null | null | null | newton.py | chuchienshu/Optimization-Assignments | c8212ef80d6fd264537aebcf4cf55cd32fc5ca44 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy
from sympy import *
#阻尼牛顿法
THRESHOLD = 1e-6
u,v=symbols('u v')
a,b=symbols('a b')
z = a - b + 2*a ** 2+ 2*a*b + b**2
form = z.diff(a)
form_1 = z.diff(b)
hession_11 = form.diff(a)
hession_12 = form.diff(b)
hession_21 = form_1.diff(a)
hession_22 = form_1.diff(b)
#print hession_11,... | 25.28 | 107 | 0.564082 |
30277e77c77be0df5814257315f9dea868fd9ca1 | 1,484 | py | Python | tests/chunk_test.py | k4rth33k/pyMR | 6d5caab73b7712e719716cf14c24c92c41d7c347 | [
"MIT"
] | 2 | 2020-07-19T05:37:26.000Z | 2021-09-03T10:36:01.000Z | tests/chunk_test.py | k4rth33k/pyMR | 6d5caab73b7712e719716cf14c24c92c41d7c347 | [
"MIT"
] | null | null | null | tests/chunk_test.py | k4rth33k/pyMR | 6d5caab73b7712e719716cf14c24c92c41d7c347 | [
"MIT"
] | null | null | null | from pyMR import Chunks
def test_chunk_list():
list_ = [i for i in range(1, 103)]
chunks_first = Chunks(list_, 5, overflow='first').get_chunks()
chunks_last = Chunks(list_, 5, overflow='last').get_chunks()
assert ([len(_) for _ in chunks_last] == [20, 20, 20, 20, 22])
assert ([len(_) for _ in chu... | 27.481481 | 71 | 0.6031 |
f1009f181a637e409507fe9656b16da682ba3845 | 270 | py | Python | orbit/utilities.py | wiredlab/orbit | c8a7cee54ae15548aa7c7ed8f6702acb2aaa18ec | [
"MIT"
] | 8 | 2016-01-27T22:29:07.000Z | 2019-06-05T13:16:13.000Z | orbit/utilities.py | wiredlab/orbit | c8a7cee54ae15548aa7c7ed8f6702acb2aaa18ec | [
"MIT"
] | 1 | 2018-08-24T11:31:06.000Z | 2018-08-24T11:31:06.000Z | orbit/utilities.py | wiredlab/orbit | c8a7cee54ae15548aa7c7ed8f6702acb2aaa18ec | [
"MIT"
] | 5 | 2015-06-12T00:45:58.000Z | 2022-02-14T17:33:43.000Z | def calc_year(year):
twentieth = ('6', '7', '8', '9')
twenty_first = ('0', '1', '2', '3', '4', '5')
if year.startswith(twentieth):
return "19%s" % year
elif year.startswith(twenty_first):
return "20%s" % year
else:
return year | 30 | 49 | 0.525926 |
b72832c054e6d7b5cfebb2264dc4501d205c1ba4 | 1,438 | py | Python | test_image.py | YoadTew/SRGAN | a1baf40ab6b925ed757bb4fb4440a6250324754f | [
"MIT"
] | null | null | null | test_image.py | YoadTew/SRGAN | a1baf40ab6b925ed757bb4fb4440a6250324754f | [
"MIT"
] | null | null | null | test_image.py | YoadTew/SRGAN | a1baf40ab6b925ed757bb4fb4440a6250324754f | [
"MIT"
] | null | null | null | import argparse
import time
import torch
from PIL import Image
from torch.autograd import Variable
from torchvision.transforms import ToTensor, ToPILImage
from models.model import Generator
parser = argparse.ArgumentParser(description='Test Single Image')
parser.add_argument('--upscale_factor', default=4, type=int, ... | 35.073171 | 112 | 0.750348 |
70d959b7be1d24ae34b852d153a78829f24dafe8 | 160 | py | Python | python/testData/debug/test_exceptbreak.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/debug/test_exceptbreak.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/debug/test_exceptbreak.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def foo(x):
t = [0, 1]
try:
print(t[2])
except:
pass
return 1 / x
def zoo(x):
res = foo(x)
return res
print(zoo(0))
| 10 | 19 | 0.4375 |
17b90082e3a63356e56c1afe441dfd4edb1ffeda | 3,138 | py | Python | setup.py | ssuffian/eeweather | 4581714e69839b64a22a5aa9ab682b26631cbb99 | [
"Apache-2.0"
] | 41 | 2018-02-01T22:10:49.000Z | 2022-03-22T17:47:21.000Z | setup.py | ssuffian/eeweather | 4581714e69839b64a22a5aa9ab682b26631cbb99 | [
"Apache-2.0"
] | 61 | 2018-02-02T14:55:04.000Z | 2022-02-10T19:25:53.000Z | setup.py | ssuffian/eeweather | 4581714e69839b64a22a5aa9ab682b26631cbb99 | [
"Apache-2.0"
] | 14 | 2018-09-08T05:48:59.000Z | 2022-01-26T20:23:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright 2018 Open Energy Efficiency, 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/LICE... | 29.603774 | 86 | 0.663161 |
ec1c22e07f635fe00eba931fdd7eac3804e17841 | 150 | py | Python | iterables_iterators_generators/practice/generator_with_for_loop.py | Rorima/exercicios-python | ca78e2d2402c2aa90efd95ccaa620c0a8b42444f | [
"MIT"
] | null | null | null | iterables_iterators_generators/practice/generator_with_for_loop.py | Rorima/exercicios-python | ca78e2d2402c2aa90efd95ccaa620c0a8b42444f | [
"MIT"
] | null | null | null | iterables_iterators_generators/practice/generator_with_for_loop.py | Rorima/exercicios-python | ca78e2d2402c2aa90efd95ccaa620c0a8b42444f | [
"MIT"
] | null | null | null | def divisible(the_list):
for x in the_list:
if not x % 3:
yield x
my_list = list(range(1, 30))
for x in divisible(my_list):
print(x)
| 13.636364 | 28 | 0.626667 |
9f08218a69bf47ecb1550d5024c63c733d0680c2 | 943 | py | Python | 2. dynamically-inserting-sqlite-example.py | PythonProgramming/SQLite-tutorial-basics | 4762814b46b4dfc14050a28777c6833507f397f5 | [
"MIT"
] | 6 | 2017-06-09T14:14:52.000Z | 2022-02-17T09:51:15.000Z | 2. dynamically-inserting-sqlite-example.py | PythonProgramming/SQLite-tutorial-basics | 4762814b46b4dfc14050a28777c6833507f397f5 | [
"MIT"
] | null | null | null | 2. dynamically-inserting-sqlite-example.py | PythonProgramming/SQLite-tutorial-basics | 4762814b46b4dfc14050a28777c6833507f397f5 | [
"MIT"
] | 6 | 2017-01-26T04:08:44.000Z | 2019-01-19T10:20:43.000Z | import sqlite3
import datetime
import time
conn = sqlite3.connect('tutorial.db')
c = conn.cursor()
def tableCreate():
c.execute("CREATE TABLE stuffToPlot(ID INT, unix REAL, datestamp TEXT, keyword TEXT, value REAL)")
def dataEntry():
c.execute("INSERT INTO stuffToPlot VALUES(1, 1365952181.288,'2013-04-14 ... | 32.517241 | 109 | 0.676564 |
d99aeebaee0f9a5285bbd9f822b0af682baba8e0 | 20,321 | py | Python | examples/dstc6/create_raw_data.py | koso019003/AM-FM-PM | bffbbc8f3c3ce82ff22235b999836bd34f63250d | [
"Apache-2.0"
] | null | null | null | examples/dstc6/create_raw_data.py | koso019003/AM-FM-PM | bffbbc8f3c3ce82ff22235b999836bd34f63250d | [
"Apache-2.0"
] | null | null | null | examples/dstc6/create_raw_data.py | koso019003/AM-FM-PM | bffbbc8f3c3ce82ff22235b999836bd34f63250d | [
"Apache-2.0"
] | null | null | null | import codecs
import argparse
import logging
import random
import emoji
import re
import string
from tqdm import tqdm
random.seed(2020)
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s')
parser = argparse.Argum... | 32.617978 | 110 | 0.491462 |
ca079a9230888615fcf82a38baf6786fda5c6bf8 | 98,695 | py | Python | src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py | major/azure-cli | 13c46f6e1d94a2eddf31539a0bbf1d5f2f28f63a | [
"MIT"
] | 1 | 2019-12-18T06:22:08.000Z | 2019-12-18T06:22:08.000Z | src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py | major/azure-cli | 13c46f6e1d94a2eddf31539a0bbf1d5f2f28f63a | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py | major/azure-cli | 13c46f6e1d94a2eddf31539a0bbf1d5f2f28f63a | [
"MIT"
] | 2 | 2020-07-16T09:56:27.000Z | 2021-07-09T00:52:51.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 48.356198 | 199 | 0.585774 |
03df677a5dc605703514536e4cd94bc99beb09de | 6,830 | py | Python | RetinaNet/BoundingBox.py | JoshVarty/SorghumHeadDetection | 000b5b97be425181b2613d6ef711c95eef3d4520 | [
"MIT"
] | 3 | 2019-06-13T04:07:30.000Z | 2019-08-12T15:30:05.000Z | RetinaNet/BoundingBox.py | JoshVarty/SorghumHeadDetection | 000b5b97be425181b2613d6ef711c95eef3d4520 | [
"MIT"
] | 12 | 2019-06-12T19:32:16.000Z | 2019-06-28T18:11:52.000Z | RetinaNet/BoundingBox.py | JoshVarty/SorghumHeadDetection | 000b5b97be425181b2613d6ef711c95eef3d4520 | [
"MIT"
] | 2 | 2019-06-27T05:06:30.000Z | 2021-11-13T10:03:20.000Z | from RetinaNet.utils import *
class BoundingBox:
def __init__(self,
imageName,
classId,
x,
y,
w,
h,
typeCoordinates=CoordinatesType.Absolute,
imgSize=None,
bbTyp... | 41.90184 | 100 | 0.582577 |
005ea2b74d9347208b4c612a5ee4fde04518a8c1 | 10,524 | py | Python | perceptron/zoo/retinanet_resnet_50/utils/transform.py | jiayunhan/perceptron-benchmark | 39958a15e9f8bfa82938a3f81d4f216457744b22 | [
"Apache-2.0"
] | 38 | 2019-06-10T04:19:42.000Z | 2022-02-15T05:21:23.000Z | perceptron/zoo/retinanet_resnet_50/utils/transform.py | jiayunhan/perceptron-benchmark | 39958a15e9f8bfa82938a3f81d4f216457744b22 | [
"Apache-2.0"
] | 4 | 2019-07-30T19:00:23.000Z | 2019-09-26T01:35:05.000Z | perceptron/zoo/retinanet_resnet_50/utils/transform.py | jiayunhan/perceptron-benchmark | 39958a15e9f8bfa82938a3f81d4f216457744b22 | [
"Apache-2.0"
] | 10 | 2019-06-10T05:45:33.000Z | 2021-04-22T08:33:28.000Z | """transform"""
import numpy as np
DEFAULT_PRNG = np.random
def colvec(*args):
""" Create a numpy array representing a column vector. """
return np.array([args]).T
def transform_aabb(transform, aabb):
""" Apply a transformation to an axis aligned bounding box.
The result is a new AABB in the same ... | 33.515924 | 78 | 0.623907 |
f011f8aae80434a2056d63db05235c510391bd96 | 12,707 | py | Python | python/kserve/kserve/storage.py | adriangonz/kserve | a400bd7f6a3b4d40cc0257e55fb20bb4c8967c9f | [
"Apache-2.0"
] | null | null | null | python/kserve/kserve/storage.py | adriangonz/kserve | a400bd7f6a3b4d40cc0257e55fb20bb4c8967c9f | [
"Apache-2.0"
] | null | null | null | python/kserve/kserve/storage.py | adriangonz/kserve | a400bd7f6a3b4d40cc0257e55fb20bb4c8967c9f | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 42.498328 | 117 | 0.60447 |
cd9c459a3cff12887dbc2c7c4684e6e88530a10b | 1,790 | py | Python | simple_rsa/__init__.py | christophevg/py-simple-rsa | c5df630622089e8fa8f022b4fa6d715d2c35af3d | [
"MIT"
] | null | null | null | simple_rsa/__init__.py | christophevg/py-simple-rsa | c5df630622089e8fa8f022b4fa6d715d2c35af3d | [
"MIT"
] | null | null | null | simple_rsa/__init__.py | christophevg/py-simple-rsa | c5df630622089e8fa8f022b4fa6d715d2c35af3d | [
"MIT"
] | null | null | null | """ A straightforward API to perform basic RSA-based operations.
.. moduleauthor:: Christophe VG <contact@christophe.vg>
"""
__version__ = "1.0.0"
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization
fro... | 23.246753 | 64 | 0.711173 |
39a2854b22b897b078c9a3f7e967032f78b99c62 | 4,188 | py | Python | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/vendored_sdks/usersfunctions/operations/_users_calendar_events_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/vendored_sdks/usersfunctions/operations/_users_calendar_events_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersfunctions_v1_0/azext_usersfunctions_v1_0/vendored_sdks/usersfunctions/operations/_users_calendar_events_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"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 ... | 41.465347 | 133 | 0.670248 |
e84fc770fc649fef802bd411dc55a7c207a9b6f1 | 1,981 | py | Python | tests/links_tests/model_tests/yolo_tests/test_yolo_v3.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 1,600 | 2017-06-01T15:37:52.000Z | 2022-03-09T08:39:09.000Z | tests/links_tests/model_tests/yolo_tests/test_yolo_v3.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 547 | 2017-06-01T06:43:16.000Z | 2021-05-28T17:14:05.000Z | tests/links_tests/model_tests/yolo_tests/test_yolo_v3.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 376 | 2017-06-02T01:29:10.000Z | 2022-03-13T11:19:59.000Z | import numpy as np
import unittest
import chainer
from chainer import testing
from chainer.testing import attr
from chainercv.links import YOLOv3
@testing.parameterize(*testing.product({
'n_fg_class': [1, 5, 20],
}))
class TestYOLOv3(unittest.TestCase):
def setUp(self):
self.link = YOLOv3(n_fg_clas... | 26.413333 | 76 | 0.631499 |
ac6ddbe34155c8d3bade8c9505174e3d1b1b6420 | 7,739 | py | Python | xnu-4903.241.1/tools/lldbmacros/ktrace.py | DogeCoding/iOSCompiledRuntime | 81bada7472a3470d3424f2d0bbcc414d755c3620 | [
"MIT"
] | 672 | 2019-10-09T11:15:13.000Z | 2021-09-21T10:02:33.000Z | xnu-4903.221.2/tools/lldbmacros/ktrace.py | KaiserFeng/KFAppleOpenSource | 7ea6ab19f1492a2da262d3554f90882393f975a4 | [
"MIT"
] | 19 | 2019-11-05T03:32:31.000Z | 2021-07-15T11:16:25.000Z | xnu-4903.221.2/tools/lldbmacros/ktrace.py | KaiserFeng/KFAppleOpenSource | 7ea6ab19f1492a2da262d3554f90882393f975a4 | [
"MIT"
] | 216 | 2019-10-10T01:47:36.000Z | 2021-09-23T07:56:54.000Z | from xnu import *
from utils import *
# From the defines in bsd/sys/kdebug.h:
KdebugClassNames = {
1: "MACH",
2: "NETWORK",
3: "FSYSTEM",
4: "BSD",
5: "IOKIT",
6: "DRIVERS",
7: "TRACE",
8: "DLIL",
9: "WORKQUEUE",
10: "CORESTORAGE",
11: "CG",
20: "MISC",
30: "SECURIT... | 30.710317 | 139 | 0.612611 |
480c8981ecb56fc13b4e6fc01282c4256757e2a9 | 25,489 | py | Python | vendor/packages/nose/nose/loader.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 26 | 2018-02-14T23:52:58.000Z | 2021-08-16T13:50:03.000Z | vendor/packages/nose/nose/loader.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | vendor/packages/nose/nose/loader.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 10 | 2018-08-13T19:38:39.000Z | 2020-04-19T03:02:00.000Z | """
Test Loader
-----------
nose's test loader implements the same basic functionality as its
superclass, unittest.TestLoader, but extends it by more liberal
interpretations of what may be a test and how a test may be named.
"""
from __future__ import generators
import logging
import os
import sys
import unittest
imp... | 41.177706 | 83 | 0.555102 |
123bc4afcdd4c74acac6aea364036c0d204db2dd | 3,775 | py | Python | contrib/macdeploy/custom_dsstore.py | PayQ/bitmoney | d1d29589cbe8429c775f4d88bdb2cfa5cc65337d | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | PayQ/bitmoney | d1d29589cbe8429c775f4d88bdb2cfa5cc65337d | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | PayQ/bitmoney | d1d29589cbe8429c775f4d88bdb2cfa5cc65337d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013-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.
from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStore... | 61.885246 | 1,817 | 0.727417 |
b57ce60d67fe484ba24eae8caf20cf90ad945d11 | 5,130 | py | Python | nova/tests/unit/fake_policy.py | microgle/nova | 731bd40d2f8e6b3d68351ff2997ebad6ffac00a4 | [
"Apache-2.0"
] | 1 | 2019-11-07T03:11:37.000Z | 2019-11-07T03:11:37.000Z | nova/tests/unit/fake_policy.py | microgle/nova | 731bd40d2f8e6b3d68351ff2997ebad6ffac00a4 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/fake_policy.py | microgle/nova | 731bd40d2f8e6b3d68351ff2997ebad6ffac00a4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2012 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 law or agreed t... | 45 | 75 | 0.690448 |
8e68e489d134fe3b8b525e7c92e529e2b3f3b5b6 | 1,474 | py | Python | nimare/workflows/peaks2maps.py | koudyk/NiMARE | 5bbc6bc2cbd2083bea450ce67047e69f75b70d28 | [
"MIT"
] | null | null | null | nimare/workflows/peaks2maps.py | koudyk/NiMARE | 5bbc6bc2cbd2083bea450ce67047e69f75b70d28 | [
"MIT"
] | 1 | 2020-12-20T18:44:03.000Z | 2020-12-20T18:44:03.000Z | nimare/workflows/peaks2maps.py | jdkent/NiMARE | 5bbc6bc2cbd2083bea450ce67047e69f75b70d28 | [
"MIT"
] | null | null | null | """
Workflow for contrast permutation meta-analysis on images constructed from
coordinates using the Peaks2Maps kernel.
"""
import logging
import os
import pathlib
from nilearn.image import resample_to_img
from nilearn.masking import apply_mask
from ..base import MetaResult
from ..io import convert_sleuth_to_dataset
... | 30.708333 | 82 | 0.729308 |
99d7931c0f183c5ef8ef32b7896cace636187a19 | 3,290 | py | Python | sympy/matrices/expressions/tests/test_matmul.py | ojengwa/sympy | f90e7a8e4fd8fa9e7d6c6fecb4c7efe8f987ec60 | [
"BSD-3-Clause"
] | 1 | 2016-02-13T15:46:16.000Z | 2016-02-13T15:46:16.000Z | sympy/matrices/expressions/tests/test_matmul.py | ojengwa/sympy | f90e7a8e4fd8fa9e7d6c6fecb4c7efe8f987ec60 | [
"BSD-3-Clause"
] | null | null | null | sympy/matrices/expressions/tests/test_matmul.py | ojengwa/sympy | f90e7a8e4fd8fa9e7d6c6fecb4c7efe8f987ec60 | [
"BSD-3-Clause"
] | null | null | null | from sympy.core import I, symbols, Basic
from sympy.functions import adjoint, transpose
from sympy.matrices import (Identity, Inverse, Matrix, MatrixSymbol, ZeroMatrix,
eye, zeros, ImmutableMatrix)
from sympy.matrices.expressions import Adjoint, Transpose, det
from sympy.matrices.expressions.matmul import (fact... | 32.574257 | 80 | 0.595441 |
df86edfb0c8245435f700446b01960d51412bef9 | 946 | py | Python | CONTENT/DS-n-Algos/ALGO/_LEETCODE/015_three_sum/15.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 13 | 2021-03-11T00:25:22.000Z | 2022-03-19T00:19:23.000Z | CONTENT/DS-n-Algos/ALGO/_LEETCODE/015_three_sum/15.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 162 | 2021-03-09T01:52:11.000Z | 2022-03-12T01:09:07.000Z | CONTENT/DS-n-Algos/ALGO/_LEETCODE/015_three_sum/15.py | impastasyndrome/DS-ALGO-OFFICIAL | c85ec9cf0af0009f038b7a571a7ac1fb466b7f3a | [
"Apache-2.0"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | class Solution(object):
def threeSum(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
nums.sort()
result = []
for i in range(len(nums) - 2):
if i > 0 and nums[i] == nums[i - 1]:
continue
left, right = i... | 35.037037 | 74 | 0.386892 |
19b1a405f6abc89462ea39560b4716c0777696e0 | 535 | py | Python | src/day7/main.py | lundholmx/advent-of-code-2021 | 5ed3a2b5552098cc16aa4f546932423abaaad412 | [
"MIT"
] | 1 | 2021-12-10T16:50:07.000Z | 2021-12-10T16:50:07.000Z | src/day7/main.py | lundholmx/advent-of-code-2021 | 5ed3a2b5552098cc16aa4f546932423abaaad412 | [
"MIT"
] | null | null | null | src/day7/main.py | lundholmx/advent-of-code-2021 | 5ed3a2b5552098cc16aa4f546932423abaaad412 | [
"MIT"
] | null | null | null | import statistics
import math
def part1(input: list[int]) -> int:
weight = int(statistics.median(input))
return sum([
abs(n-weight)
for n in input
])
def part2(input: list[int]) -> int:
mean = math.floor(statistics.mean(input))
return sum([
sum(range(abs(n-mean)+1))
... | 20.576923 | 53 | 0.570093 |
ce78a03a8b0bb554051cf5458b348c68c682eb84 | 22,031 | py | Python | dr2/seaming.py | rraddi/iphas-dr2 | 3637b1f7b091f24c58e7d2e700d1039bf9d44e88 | [
"MIT"
] | 1 | 2017-11-27T21:28:39.000Z | 2017-11-27T21:28:39.000Z | dr2/seaming.py | barentsen/iphas-dr2 | e2e47c6964df6bb5fe9909e317ef18f0913698db | [
"MIT"
] | null | null | null | dr2/seaming.py | barentsen/iphas-dr2 | e2e47c6964df6bb5fe9909e317ef18f0913698db | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Identify duplicate detections in the IPHAS catalogue.
This script will identify all the detections for a single astrophysical source
amongst the IPHAS observations using stilts crossmatching.
Using this information. the script will decide on the 'primary' (best)
detecti... | 40.722736 | 85 | 0.508692 |
216228c5edc9473d93bc7fd14648b76479b46639 | 28,851 | py | Python | GM2AUTOSAR_MM/merge_inter_layer_rules/models/move_one_output_repeated_indirect_match_diff_rules_MDL.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 3 | 2017-06-02T19:26:27.000Z | 2021-06-14T04:25:45.000Z | UMLRT2Kiltera_MM/merge_preprocess_rules/models/move_one_output_repeated_indirect_match_diff_rules_MDL.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 8 | 2016-08-24T07:04:07.000Z | 2017-05-26T16:22:47.000Z | GM2AUTOSAR_MM/merge_inter_layer_rules/models/move_one_output_repeated_indirect_match_diff_rules_MDL.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 1 | 2019-10-31T06:00:23.000Z | 2019-10-31T06:00:23.000Z | """
__move_one_output_repeated_indirect_match_diff_rules_MDL.py_____________________________________________________
Automatically generated AToM3 Model File (Do not modify directly)
Author: levi
Modified: Tue Aug 20 19:43:02 2013
________________________________________________________________________________________... | 57.933735 | 747 | 0.663235 |
6ca7e564fda4140d42e3de31e2cf66a4aa768789 | 6,821 | py | Python | ai_flow/test/cli/test_cli_parser.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | null | null | null | ai_flow/test/cli/test_cli_parser.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | null | null | null | ai_flow/test/cli/test_cli_parser.py | SteNicholas/ai-flow | 2c70547981f1516f0e37bbe6936a1b7cccd31822 | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.888889 | 110 | 0.591116 |
ce0070428c867d93923ef9a719b935199fabe261 | 12,818 | py | Python | gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in.py | hkad98/gooddata-python-sdk | 64942080ecb44c2d8e914e57f7a591daa6cca205 | [
"MIT"
] | null | null | null | gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in.py | hkad98/gooddata-python-sdk | 64942080ecb44c2d8e914e57f7a591daa6cca205 | [
"MIT"
] | null | null | null | gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in.py | hkad98/gooddata-python-sdk | 64942080ecb44c2d8e914e57f7a591daa6cca205 | [
"MIT"
] | null | null | null | """
OpenAPI definition
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0
Contact: support@gooddata.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sy... | 43.158249 | 124 | 0.562256 |
38068ce8de6d099dd0ed83aa585d763d3e47e62d | 2,857 | py | Python | _doc/examples/set_jenkins_jobs.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 18 | 2015-11-10T08:09:23.000Z | 2022-02-16T11:46:45.000Z | _doc/examples/set_jenkins_jobs.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 321 | 2015-06-14T21:34:28.000Z | 2021-11-28T17:10:03.000Z | _doc/examples/set_jenkins_jobs.py | Pandinosaurus/pyquickhelper | 326276f656cf88989e4d0fcd006ada0d3735bd9e | [
"MIT"
] | 10 | 2015-06-20T01:35:00.000Z | 2022-01-19T15:54:32.000Z | """
================
Set Jenkins Jobs
================
This jobs is used to add jobs to a :epkg:`Jenkins` server in order
to build packages on Windows. The :epkg:`YAML` definition is located
at `pymyinstall/whl <https://github.com/sdpython/pymyinstall/tree/master/whl>`_
and it defines the jobs in this folder
`pymyinst... | 32.465909 | 93 | 0.584179 |
d3d2b6350962d905c7ef26c064fd6da3a525573d | 1,598 | py | Python | Lendo_um_Botao/button.py | LeandroTeodoroRJ/RaspberryPiExemplos | eba4f5851202d2a00bb2f577b22fbbcdc223581c | [
"MIT"
] | 1 | 2021-12-24T20:46:35.000Z | 2021-12-24T20:46:35.000Z | Lendo_um_Botao/button.py | LeandroTeodoroRJ/RaspberryPiExemplos | eba4f5851202d2a00bb2f577b22fbbcdc223581c | [
"MIT"
] | null | null | null | Lendo_um_Botao/button.py | LeandroTeodoroRJ/RaspberryPiExemplos | eba4f5851202d2a00bb2f577b22fbbcdc223581c | [
"MIT"
] | 1 | 2021-12-24T20:46:24.000Z | 2021-12-24T20:46:24.000Z | #****************************************************************
# LENDO UM BOTÃO
#****************************************************************
#!/usr/bin/python3
#************************* MÓDULOS ******************************
import RPi.GPIO as GPIO #Módulo da porta GPIO
import t... | 37.162791 | 71 | 0.35607 |
4bcd9e0b6de2079f363f2f2f26dbc79f4189751d | 5,028 | py | Python | hummingbot/client/ui/parser.py | dietzam/hummingbot | 40d11a7bb604af8a3e0d22b8baefe45356e08419 | [
"Apache-2.0"
] | 5 | 2021-02-12T17:19:09.000Z | 2021-12-02T08:32:40.000Z | hummingbot/client/ui/parser.py | dietzam/hummingbot | 40d11a7bb604af8a3e0d22b8baefe45356e08419 | [
"Apache-2.0"
] | null | null | null | hummingbot/client/ui/parser.py | dietzam/hummingbot | 40d11a7bb604af8a3e0d22b8baefe45356e08419 | [
"Apache-2.0"
] | 6 | 2020-10-24T11:40:16.000Z | 2022-03-19T10:39:37.000Z | import argparse
from typing import (
List,
)
from hummingbot.client.errors import ArgumentParserError
from hummingbot.client.command.connect_command import OPTIONS as CONNECT_OPTIONS
class ThrowingArgumentParser(argparse.ArgumentParser):
def error(self, message):
raise ArgumentParserError(message)
... | 49.782178 | 131 | 0.732498 |
6a54e52834fc99d983f8d2a5afbd6362d6182933 | 14,381 | py | Python | ssd_model.py | weian312/ssd_detectors | 0eb88f06eb94b6c4a5f0058e55116a331b128da8 | [
"MIT"
] | 316 | 2018-06-11T07:29:01.000Z | 2022-02-12T12:26:26.000Z | ssd_model.py | weian312/ssd_detectors | 0eb88f06eb94b6c4a5f0058e55116a331b128da8 | [
"MIT"
] | 60 | 2018-08-25T23:11:14.000Z | 2021-08-30T16:57:55.000Z | ssd_model.py | weian312/ssd_detectors | 0eb88f06eb94b6c4a5f0058e55116a331b128da8 | [
"MIT"
] | 97 | 2018-08-22T12:26:12.000Z | 2021-12-03T04:25:29.000Z | """Keras implementation of SSD."""
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Input
from tensorflow.keras.layers import MaxPool2D
from tensorflow.kera... | 42.297059 | 144 | 0.641541 |
53f1c7221a01c6d26c41d10645de62b8c9dce7f0 | 399 | py | Python | index/change_img.py | importer/widen | ef035013b3c4636e3c006e77942f5c653d1e63bc | [
"CC0-1.0"
] | null | null | null | index/change_img.py | importer/widen | ef035013b3c4636e3c006e77942f5c653d1e63bc | [
"CC0-1.0"
] | null | null | null | index/change_img.py | importer/widen | ef035013b3c4636e3c006e77942f5c653d1e63bc | [
"CC0-1.0"
] | null | null | null | #coding=utf-8
from PIL import Image
infile = 'D:\\original_img.jpg'
outfile = 'D:\\adjust_img.jpg'
im = Image.open(infile)
(x,y) = im.size #read image size
x_s = 250 #define standard width
y_s = y * x_s / x #calc height based on standard width
out = im.resize((x_s,y_s),Image.ANTIALIAS) #resize image with high-qualit... | 24.9375 | 74 | 0.709273 |
d63cf944cd7f3440860afe42edbe7662cb70e4df | 2,254 | py | Python | common/log.py | mengfanShi/SpiderMan | 679b3b5b64e8e6883eca0a22ddeec23a7a9d61bb | [
"MIT"
] | null | null | null | common/log.py | mengfanShi/SpiderMan | 679b3b5b64e8e6883eca0a22ddeec23a7a9d61bb | [
"MIT"
] | null | null | null | common/log.py | mengfanShi/SpiderMan | 679b3b5b64e8e6883eca0a22ddeec23a7a9d61bb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Log for Debug
Usage:
>> logger = Logger()
>> log.warn('这是一条警告')
>> log.info('这是一条正常log信息')
>> log.error('这是一条错误信息')
"""
import logging
# import common
from common import common
STYLE = {
'fore':
{
'black': 30,
'red': 31,
... | 22.54 | 70 | 0.464951 |
30501ec7dbef6b7374d6c08145e49194b4cae5f7 | 1,102 | py | Python | setup.py | kocsob/syncipy | 84667506e1368ed53b41c6ab040f89f07bbc9c5a | [
"Apache-2.0"
] | 1 | 2019-03-23T00:42:19.000Z | 2019-03-23T00:42:19.000Z | setup.py | kocsob/syncipy | 84667506e1368ed53b41c6ab040f89f07bbc9c5a | [
"Apache-2.0"
] | null | null | null | setup.py | kocsob/syncipy | 84667506e1368ed53b41c6ab040f89f07bbc9c5a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from setuptools import setup
from syncipy.version import __version__
setup(
name='syncipy',
version=__version__,
description='Python package to synchronize IP address with dynamic DNS services',
author='Balazs Kocso',
author_email='kocsob@users.noreply.github.com',
pack... | 28.25641 | 85 | 0.582577 |
60e5c70bc580dbc49620c83d742368b04e0d7065 | 706 | py | Python | tests/data/transforms/realization/pad.py | ZJCV/PyCls | 1ef59301646b6134f2ffcc009b4fd76550fa4089 | [
"Apache-2.0"
] | 110 | 2021-02-04T14:32:57.000Z | 2022-03-30T01:51:56.000Z | tests/data/transforms/realization/pad.py | ZJCV/PyCls | 1ef59301646b6134f2ffcc009b4fd76550fa4089 | [
"Apache-2.0"
] | 8 | 2021-04-11T02:46:57.000Z | 2021-12-14T19:30:58.000Z | tests/data/transforms/realization/pad.py | ZJCV/PyCls | 1ef59301646b6134f2ffcc009b4fd76550fa4089 | [
"Apache-2.0"
] | 20 | 2021-02-07T14:17:07.000Z | 2022-03-22T05:20:40.000Z | # -*- coding: utf-8 -*-
"""
@date: 2021/10/3 上午10:55
@file: pad.py
@author: zj
@description:
"""
import numpy as np
from zcls.data.transforms.realization.square_pad import SquarePad
def square_pad():
m = SquarePad()
a = np.ones((3, 8))
print(a)
# [[1. 1. 1. 1. 1. 1. 1. 1.]
# [1. 1. 1. 1. 1. ... | 18.578947 | 65 | 0.417847 |
648561ff4edc4db1c644515ed643f5d862a173dc | 6,672 | py | Python | BenchmarkScripts/convert2panoptic.py | Skywalker666666/scannet_dataset_prep | 0cda8c360512eda8c2ade892c5f23ed21320cc69 | [
"MIT"
] | null | null | null | BenchmarkScripts/convert2panoptic.py | Skywalker666666/scannet_dataset_prep | 0cda8c360512eda8c2ade892c5f23ed21320cc69 | [
"MIT"
] | null | null | null | BenchmarkScripts/convert2panoptic.py | Skywalker666666/scannet_dataset_prep | 0cda8c360512eda8c2ade892c5f23ed21320cc69 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Convert to COCO-style panoptic segmentation format (http://cocodataset.org/#format-data).
#
# python imports
from __future__ import print_function, absolute_import, division, unicode_literals
import os
import glob
import sys
import argparse
import json
import numpy as np
# Image processing
from ... | 38.566474 | 348 | 0.561451 |
3ed6475b51a2af0bfca0b6864d71e8e3b70b8aaf | 6,042 | py | Python | Scaffold_Code/test scripts/test10.py | tzortzispanagiotis/nbc-blockchain-python | 4e59bfd3f8aa6fb72ce89f430909a1d5c90629e2 | [
"MIT"
] | null | null | null | Scaffold_Code/test scripts/test10.py | tzortzispanagiotis/nbc-blockchain-python | 4e59bfd3f8aa6fb72ce89f430909a1d5c90629e2 | [
"MIT"
] | null | null | null | Scaffold_Code/test scripts/test10.py | tzortzispanagiotis/nbc-blockchain-python | 4e59bfd3f8aa6fb72ce89f430909a1d5c90629e2 | [
"MIT"
] | 1 | 2021-03-20T20:18:40.000Z | 2021-03-20T20:18:40.000Z | import requests, json, time
from multiprocessing.dummy import Pool
pool = Pool(100)
transactions0 = []
transactions1 = []
transactions2 = []
transactions3 = []
transactions4 = []
transactions5 = []
transactions6 = []
transactions7 = []
transactions8 = []
transactions9 = []
nodeid = {
'id0': 0,
'id1': 1,
... | 34.924855 | 80 | 0.614201 |
20798dc9370ae9a359d06cf5c9800054c2533aad | 784 | py | Python | examples/gauss.pyre/tests/unit/ball.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | null | null | null | examples/gauss.pyre/tests/unit/ball.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:42:13.000Z | 2021-06-10T23:42:13.000Z | examples/gauss.pyre/tests/unit/ball.py | jlmaurer/pyre | 6af38a83621d7d6228d147b4bb94f97fbb10f6e2 | [
"BSD-3-Clause"
] | 2 | 2020-08-31T18:07:52.000Z | 2021-12-10T08:54:39.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2020 all rights reserved
#
"""
Sanity check: verify that the ball shape behaves as expected
"""
def test():
import gauss
from math import pi as π
# instantiate
ball = gauss.shapes.ball(name="ball")
b... | 17.818182 | 62 | 0.591837 |
e2ea0c52950fcfabf788333f99c72d247a3a331b | 2,797 | py | Python | create_python_project/scripts/yml.py | nmvalera/create-python-project | 40237c569009ae3532bf07dd32c23786c3569fae | [
"BSD-3-Clause"
] | null | null | null | create_python_project/scripts/yml.py | nmvalera/create-python-project | 40237c569009ae3532bf07dd32c23786c3569fae | [
"BSD-3-Clause"
] | null | null | null | create_python_project/scripts/yml.py | nmvalera/create-python-project | 40237c569009ae3532bf07dd32c23786c3569fae | [
"BSD-3-Clause"
] | null | null | null | """
create_python_project.scripts.yml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Base class for .yml script manipulation
:copyright: Copyright 2017 by Nicolas Maurice, see AUTHORS.rst for more details.
:license: BSD, see :ref:`license` for more details.
"""
import re
from functools import partial
import ... | 35.858974 | 112 | 0.61423 |
9ebdc5c418f25a82c269df86f120ad1b0533fc13 | 23,419 | py | Python | tidecv/quantify.py | XiwuChen/tide | 4f20204e6ea383e671feae07143d19cb2564e351 | [
"MIT"
] | 1 | 2020-10-13T14:37:41.000Z | 2020-10-13T14:37:41.000Z | tidecv/quantify.py | XiwuChen/tide | 4f20204e6ea383e671feae07143d19cb2564e351 | [
"MIT"
] | null | null | null | tidecv/quantify.py | XiwuChen/tide | 4f20204e6ea383e671feae07143d19cb2564e351 | [
"MIT"
] | null | null | null | from .data import Data
from .ap import ClassedAPDataObject
from .errors.main_errors import *
from .errors.qualifiers import Qualifier, AREA
from . import functions as f
from . import plotting as P
from pycocotools import mask as mask_utils
from collections import defaultdict, OrderedDict
import numpy as np
from typing... | 33.599713 | 144 | 0.677569 |
672194002d435cd6e93751e583d8bed238211518 | 1,454 | py | Python | test/TestEvaluationUtils.py | ryanfeather/parsimony | 0d3bbe247b47234a0c15962e538b2f04609c4a33 | [
"MIT"
] | 1 | 2018-07-02T11:08:29.000Z | 2018-07-02T11:08:29.000Z | test/TestEvaluationUtils.py | ryanfeather/parsimony | 0d3bbe247b47234a0c15962e538b2f04609c4a33 | [
"MIT"
] | 5 | 2015-03-19T13:29:29.000Z | 2015-04-04T19:47:01.000Z | test/TestEvaluationUtils.py | ryanfeather/parsimony | 0d3bbe247b47234a0c15962e538b2f04609c4a33 | [
"MIT"
] | null | null | null | import os
STRING1 = "A STRING ONE"
STRING2 = "TWO DUCKS WALK INTO A BAR"
PARAM_VAL1 = 5
PARAM_VAL2 = 6
DATA_FILE_NAME_1 = 'datafile1.txt'
RESULT1 = 'FOO'
RESULT2 = 'BAR'
RESULT3 = 'BAZ'
RESULT4 = 'BIF'
RESULT5 = 'DUCK'
def create_data_file(filename, content):
with open(filename, 'w') as fileToCreate:
fi... | 22.030303 | 99 | 0.641678 |
ed0dd0f1bb34f9c14b6d81dd4d246b6aaa582a15 | 564 | py | Python | hackerearth/Algorithms/Gudi trapped in the Room/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerearth/Algorithms/Gudi trapped in the Room/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerearth/Algorithms/Gudi trapped in the Room/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | import io
import unittest
from contextlib import redirect_stdout
from unittest.mock import patch
class TestQ(unittest.TestCase):
@patch('builtins.input', side_effect=[
'2',
'31',
'4 1',
'160',
'9 2',
])
def test_case_0(self, input_mock=None):
text_trap = io.... | 21.692308 | 46 | 0.551418 |
00f0c5fed1343e845993f183033a2bb76ba205cf | 3,096 | py | Python | test/vanilla/low-level/AcceptanceTests/test_extensible_enums.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/AcceptanceTests/test_extensible_enums.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/AcceptanceTests/test_extensible_enums.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 41.837838 | 129 | 0.710271 |
1e6fff3c370c275377d6b53d09f97ff26a94ad52 | 785 | py | Python | titan/react_module_pkg/extendspectypes/__init__.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_module_pkg/extendspectypes/__init__.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_module_pkg/extendspectypes/__init__.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | from moonleap import Prop, extend
from titan.api_pkg.item.resources import Item
from titan.api_pkg.itemlist.resources import ItemList
from titan.api_pkg.itemtype.resources import ItemType
from titan.react_state_pkg.state.resources import State
from . import props
@extend(Item)
class ExtendItem:
ts_type = Prop(pr... | 24.53125 | 67 | 0.791083 |
5c0a2229c41ab4965b76cbcbfbf3f15e20708cdd | 749 | py | Python | lab-1/exercise-1/dags/travel_reviews_uci_download.py | mohamedakelportfolio/Data-Pipeline-With-Apache-Airflow-Youtube-Course | 3988d18c71c85251d4cd9f32fb907c71aedd91f4 | [
"MIT"
] | null | null | null | lab-1/exercise-1/dags/travel_reviews_uci_download.py | mohamedakelportfolio/Data-Pipeline-With-Apache-Airflow-Youtube-Course | 3988d18c71c85251d4cd9f32fb907c71aedd91f4 | [
"MIT"
] | null | null | null | lab-1/exercise-1/dags/travel_reviews_uci_download.py | mohamedakelportfolio/Data-Pipeline-With-Apache-Airflow-Youtube-Course | 3988d18c71c85251d4cd9f32fb907c71aedd91f4 | [
"MIT"
] | null | null | null | import airflow.utils.dates as dates
from airflow import DAG
from airflow.operators.bash import BashOperator
# travel dag
travel_dag = DAG(
dag_id="travel_reviews_uci",
description="Download travel reviews from UCI ml repo",
start_date=dates.days_ago(14),
schedule_interval="@daily"
)
# bash operato... | 24.966667 | 145 | 0.747664 |
a0faaf687aa7c0f0ac7792324a31cd273a804513 | 17,205 | py | Python | ooobuild/cssdyn/drawing/__init__.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/cssdyn/drawing/__init__.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/cssdyn/drawing/__init__.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 78.561644 | 143 | 0.862075 |
8e8a5bd9a34827f5ad61b0733ad91e4773624df8 | 793 | py | Python | teams/migrations/0008_remove_student_team_team_students.py | gennadis/dvmn_teams | f760780e634efe7cdddf669ae42f168917d5c8d1 | [
"MIT"
] | null | null | null | teams/migrations/0008_remove_student_team_team_students.py | gennadis/dvmn_teams | f760780e634efe7cdddf669ae42f168917d5c8d1 | [
"MIT"
] | null | null | null | teams/migrations/0008_remove_student_team_team_students.py | gennadis/dvmn_teams | f760780e634efe7cdddf669ae42f168917d5c8d1 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-28 21:02
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("teams", "0007_student_team_student_time_slot_alter_team_pm_and_more"),
]
operations = [
migrations.RemoveFi... | 25.580645 | 80 | 0.553594 |
39873d954cb20a93fec04ac6275b73aaed542528 | 4,443 | py | Python | test/system/auto/simple/wal.py | jatrost/accumulo | 6be40f2f3711aaa7d0b68b5b6852b79304af3cff | [
"Apache-2.0"
] | 3 | 2021-11-11T05:18:23.000Z | 2021-11-11T05:18:43.000Z | test/system/auto/simple/wal.py | jatrost/accumulo | 6be40f2f3711aaa7d0b68b5b6852b79304af3cff | [
"Apache-2.0"
] | null | null | null | test/system/auto/simple/wal.py | jatrost/accumulo | 6be40f2f3711aaa7d0b68b5b6852b79304af3cff | [
"Apache-2.0"
] | 1 | 2021-11-09T05:32:32.000Z | 2021-11-09T05:32:32.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 use ... | 35.544 | 78 | 0.607247 |
5b05bc51741d3abb9ba0d3c21597c58bc25d212c | 6,471 | py | Python | geoviews/data/geopandas.py | scaine1/geoviews | 787e5d68bc8afaa7a799f7189c8f7e6e929b7694 | [
"BSD-3-Clause"
] | null | null | null | geoviews/data/geopandas.py | scaine1/geoviews | 787e5d68bc8afaa7a799f7189c8f7e6e929b7694 | [
"BSD-3-Clause"
] | null | null | null | geoviews/data/geopandas.py | scaine1/geoviews | 787e5d68bc8afaa7a799f7189c8f7e6e929b7694 | [
"BSD-3-Clause"
] | 1 | 2019-10-29T12:22:39.000Z | 2019-10-29T12:22:39.000Z | from __future__ import absolute_import
import numpy as np
from geopandas import GeoDataFrame
from holoviews.core.data import Interface, MultiInterface
from holoviews.core.data.interface import DataError
from holoviews.core.util import max_range
from holoviews.element import Path
from ..util import geom_to_array
c... | 35.554945 | 85 | 0.585535 |
632fecb7400b644b6526b4dfcbf9405c81386813 | 2,412 | py | Python | scripts/parse_groot-report.py | alexmsalmeida/amr-profiler | 91b94adec566bc122daeadeaac8315eb7de56ac4 | [
"MIT"
] | 2 | 2021-09-22T04:16:42.000Z | 2021-09-30T13:07:22.000Z | scripts/parse_groot-report.py | alexmsalmeida/amr-profiler | 91b94adec566bc122daeadeaac8315eb7de56ac4 | [
"MIT"
] | null | null | null | scripts/parse_groot-report.py | alexmsalmeida/amr-profiler | 91b94adec566bc122daeadeaac8315eb7de56ac4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import os
if len(sys.argv) < 2:
print("usage: script.py res_classes.tsv groot.report")
sys.exit(1)
bla = ["CTX", "TEM", "OXA", "SHV", "OXY", "LEN",
"MIR", "DHA", "CMY", "PDC", "OKP", "CBL"]
arg = {"AGL": "Aminoglycoside", "MLS": "MLS",
"TMT": "Trimethoprim", "... | 30.923077 | 95 | 0.481758 |
1f48161075e3fdef0d9b94ab7d8e06ef2232390e | 1,792 | py | Python | src/utils.py | Saduras/SAT-solver | 5255aeab14da0f0ccc3777ecd496ff35f0fb6290 | [
"MIT"
] | null | null | null | src/utils.py | Saduras/SAT-solver | 5255aeab14da0f0ccc3777ecd496ff35f0fb6290 | [
"MIT"
] | null | null | null | src/utils.py | Saduras/SAT-solver | 5255aeab14da0f0ccc3777ecd496ff35f0fb6290 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
def saveSS(cnf, assignment, path = '../data/SSplits.csv' ):
"""Saves the sudoku state in the file SSplits.csv
"""
#maps the assignment to a position in the sudoku vector.
#It over-generates, but that is fine for now.
ass2sud = {x + (i+1)*10: i for i in ... | 29.866667 | 80 | 0.565848 |
193012774a8d17d6bd2f73c792e7bccbcaa5fe98 | 928 | py | Python | Assignments/Assignment2/FindMismatch.py | chars32/edx_python | 1d351e7ec804b97fdff6796d7578d4a91e503c26 | [
"MIT"
] | null | null | null | Assignments/Assignment2/FindMismatch.py | chars32/edx_python | 1d351e7ec804b97fdff6796d7578d4a91e503c26 | [
"MIT"
] | null | null | null | Assignments/Assignment2/FindMismatch.py | chars32/edx_python | 1d351e7ec804b97fdff6796d7578d4a91e503c26 | [
"MIT"
] | null | null | null | #Write a function named find_mismatch that accepts two strings as input arguments and returns:
#0 if the two strings match exactly.
#1 if the two strings have the same length and mismatch in only one character.
#2 if the two strings do not have the same length or mismatch in two or more characters.
def find_mismatch(... | 23.2 | 94 | 0.58944 |
5fe7e31666a41aae1074e2ebd35ce527456ffd2c | 2,886 | py | Python | examples/control/lp_svg0_locomotion.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 2,650 | 2020-06-01T16:31:25.000Z | 2022-03-31T07:32:41.000Z | examples/control/lp_svg0_locomotion.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 199 | 2020-06-02T01:09:09.000Z | 2022-03-31T17:11:20.000Z | examples/control/lp_svg0_locomotion.py | Tsaousis/acme | 14278693bcc5fef0839ac60792d452d3d80acfd7 | [
"Apache-2.0"
] | 344 | 2020-06-01T16:45:21.000Z | 2022-03-30T11:15:09.000Z | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 28.574257 | 77 | 0.732155 |
43491bb1a8bea0cc0ab3fb1dea4dde81843f7537 | 1,602 | py | Python | napari/utils/history.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/history.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/history.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | import os
from pathlib import Path
from ..utils.settings import get_settings
def update_open_history(filename):
"""Updates open history of files in settings.
Parameters
----------
filename : str
New file being added to open history.
"""
settings = get_settings()
folders = setting... | 26.262295 | 62 | 0.67166 |
14c62f941ffa456bc7a4c52ab36831eecd6d3573 | 2,743 | py | Python | pulsar/managers/base/external.py | mvdbeek/pulsar | 0ae163325868c575e23ca71e559904d2de981b78 | [
"Apache-2.0"
] | null | null | null | pulsar/managers/base/external.py | mvdbeek/pulsar | 0ae163325868c575e23ca71e559904d2de981b78 | [
"Apache-2.0"
] | null | null | null | pulsar/managers/base/external.py | mvdbeek/pulsar | 0ae163325868c575e23ca71e559904d2de981b78 | [
"Apache-2.0"
] | null | null | null | import logging
from string import Template
from pulsar.managers import status
from .directory import DirectoryBaseManager
from six import binary_type
DEFAULT_JOB_NAME_TEMPLATE = "pulsar_$job_id"
JOB_FILE_EXTERNAL_ID = "external_id"
FAILED_TO_LOAD_EXTERNAL_ID = object()
log = logging.getLogger(__name__)
class Exte... | 36.092105 | 113 | 0.704338 |
8169209bd5568ff87f92b4555b339eeb5dfe9b67 | 1,020 | py | Python | anchore_engine/services/policy_engine/engine/policy/gates/always.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 1 | 2020-06-22T07:27:41.000Z | 2020-06-22T07:27:41.000Z | anchore_engine/services/policy_engine/engine/policy/gates/always.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 4 | 2020-11-07T00:16:02.000Z | 2020-11-08T20:52:06.000Z | anchore_engine/services/policy_engine/engine/policy/gates/always.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | null | null | null | from anchore_engine.services.policy_engine.engine.policy.gate import BaseTrigger, Gate
class AlwaysFireTrigger(BaseTrigger):
"""
Trigger always fires if invoked. This is intended for implementing things like short-circuits or blacklist/whitelist of images
"""
__trigger_name__ = 'always'
__trigger... | 32.903226 | 211 | 0.72451 |
435021c31c8fb93c2d18ff931486ac81a652fd31 | 29,562 | py | Python | test/functional/test_runner.py | EMCoin/Eloncoin | b19c698ac7d2c4313914f47dc43e26a7b4f323d9 | [
"MIT"
] | 1 | 2021-06-25T07:42:32.000Z | 2021-06-25T07:42:32.000Z | test/functional/test_runner.py | EMCoin/Eloncoin | b19c698ac7d2c4313914f47dc43e26a7b4f323d9 | [
"MIT"
] | 3 | 2021-06-28T19:19:18.000Z | 2021-06-29T21:10:18.000Z | test/functional/test_runner.py | EMCoin/Eloncoin | b19c698ac7d2c4313914f47dc43e26a7b4f323d9 | [
"MIT"
] | 1 | 2021-07-12T21:19:12.000Z | 2021-07-12T21:19:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-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.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... | 42.90566 | 195 | 0.596678 |
6efbc06ebd71fb68e70dab5a0cdc0b4d911207b8 | 364 | py | Python | CTFd/api/v1/statistics/__init__.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | null | null | null | CTFd/api/v1/statistics/__init__.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | null | null | null | CTFd/api/v1/statistics/__init__.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | 1 | 2021-12-23T14:11:15.000Z | 2021-12-23T14:11:15.000Z | from flask_restplus import Namespace
statistics_namespace = Namespace('statistics', description="Endpoint to retrieve Statistics")
from CTFd.api.v1.statistics import challenges # noqa: F401
from CTFd.api.v1.statistics import teams # noqa: F401
from CTFd.api.v1.statistics import users # noqa: F401
from CTFd.api.v1.... | 40.444444 | 93 | 0.796703 |
39cf6ddd1f100842ced47d9bd7548aad872e56da | 13,653 | py | Python | gtdynamics/jumpingrobot/src/jumping_robot.py | varunagrawal/GTDynamics | 1f48112a5ffd273c74c5ce2ddda4166e2fae7dff | [
"BSD-2-Clause"
] | 6 | 2021-08-09T23:43:52.000Z | 2021-11-11T16:16:37.000Z | gtdynamics/jumpingrobot/src/jumping_robot.py | varunagrawal/GTDynamics | 1f48112a5ffd273c74c5ce2ddda4166e2fae7dff | [
"BSD-2-Clause"
] | 104 | 2021-08-03T14:15:28.000Z | 2022-03-26T08:18:09.000Z | gtdynamics/jumpingrobot/src/jumping_robot.py | varunagrawal/GTDynamics | 1f48112a5ffd273c74c5ce2ddda4166e2fae7dff | [
"BSD-2-Clause"
] | 4 | 2021-08-02T17:42:28.000Z | 2021-12-24T00:43:17.000Z | """
* GTDynamics Copyright 2020, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* See LICENSE for the license information
*
* @file jumping_robot.py
* @brief Create jumping robot from yaml specificaiton file.
* @author Yetong Zhang
"""
import yaml
import numpy as np
im... | 41 | 109 | 0.601626 |
55571efed5179978e15976dbf9cc8e975396017a | 1,768 | py | Python | src/genie/libs/parser/iosxr/tests/markup.py | nujo/genieparser | 083b01efc46afc32abe1a1858729578beab50cd3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxr/tests/markup.py | nujo/genieparser | 083b01efc46afc32abe1a1858729578beab50cd3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxr/tests/markup.py | nujo/genieparser | 083b01efc46afc32abe1a1858729578beab50cd3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | from genie import parsergen as pg
from genie.libs.parsergen import extend_markup
from textwrap import dedent
marked_up_show_bgp_all_all_all_instance = '''\
OS: iosxr
CMD: show_bgp_instance_all_all_all_<WORD>
SHOWCMD: show bgp instance all all all {address_family}
PREFIX: show.bgp.instance.all.all.all
ACTUAL:
Wed ... | 28.063492 | 123 | 0.660068 |
53a42e66beb80840ee37b2f6266a0820e30bdf95 | 10,703 | py | Python | tests/test_sequence_tagger.py | thomashallam/flair | bb345bfa917b499d976f1b966776ce0a3349097a | [
"MIT"
] | 1 | 2022-02-06T04:04:27.000Z | 2022-02-06T04:04:27.000Z | tests/test_sequence_tagger.py | thomashallam/flair | bb345bfa917b499d976f1b966776ce0a3349097a | [
"MIT"
] | null | null | null | tests/test_sequence_tagger.py | thomashallam/flair | bb345bfa917b499d976f1b966776ce0a3349097a | [
"MIT"
] | null | null | null | import pytest
from torch.optim import SGD
from torch.optim.adam import Adam
import flair.datasets
from flair.data import MultiCorpus, Sentence
from flair.embeddings import FlairEmbeddings, WordEmbeddings
from flair.models import SequenceTagger
from flair.trainers import ModelTrainer
turian_embeddings = WordEmbeddings... | 29.648199 | 120 | 0.709147 |
bd6aec660f0605fc1f4fe719467c57f2ca1ce3e2 | 2,207 | py | Python | rudra/utils/validation.py | grikbi/adapters | e8fa01722464c98aa91ab9a3d7a633322b99b9cd | [
"Apache-2.0"
] | 3 | 2019-03-29T09:56:07.000Z | 2019-11-01T18:29:28.000Z | rudra/utils/validation.py | grikbi/adapters | e8fa01722464c98aa91ab9a3d7a633322b99b9cd | [
"Apache-2.0"
] | 75 | 2019-02-04T08:52:36.000Z | 2021-12-13T19:57:36.000Z | rudra/utils/validation.py | grikbi/adapters | e8fa01722464c98aa91ab9a3d7a633322b99b9cd | [
"Apache-2.0"
] | 11 | 2019-02-12T09:57:57.000Z | 2021-02-08T05:37:49.000Z | """Validation Utility module."""
import urllib.request as request
import xmlrpc.client as xmlrpclib
from rudra import logger
import re
_canonicalize_regex = re.compile(r"[-_.]+")
def nn(name):
"""Return a normalized name."""
# This is taken from PEP 503.
return _canonicalize_regex.sub("-", name).lower()
... | 31.985507 | 84 | 0.631627 |
051a13624ec5f10dae03dc0cad9dd6ab19672ee6 | 1,311 | py | Python | conans/test/unittests/client/tools/net_test.py | matthiasng/conan | 634eadc319da928084633a344d42785edccb8d6c | [
"MIT"
] | 2 | 2019-01-09T10:01:29.000Z | 2019-01-09T10:01:31.000Z | conans/test/unittests/client/tools/net_test.py | matthiasng/conan | 634eadc319da928084633a344d42785edccb8d6c | [
"MIT"
] | 1 | 2019-01-09T10:09:41.000Z | 2019-01-09T10:09:41.000Z | conans/test/unittests/client/tools/net_test.py | matthiasng/conan | 634eadc319da928084633a344d42785edccb8d6c | [
"MIT"
] | null | null | null | # coding=utf-8
import os
import platform
import shutil
import tempfile
import unittest
import six
from conans.client.tools import chdir
from conans.client.tools import net
from conans.errors import ConanException
class ToolsNetTest(unittest.TestCase):
def run(self, *args, **kwargs):
self.tmp_folder = ... | 31.97561 | 85 | 0.658276 |
91563df71da743a911cac8e4cc672856aa294063 | 6,455 | py | Python | ffb6d/utils/dataset_tools/pyrender_sift_kp3ds.py | StannisZhou/FFB6D | 5e7534805cd2e397427886d9a2a8ecfbb4f6cdfe | [
"MIT"
] | null | null | null | ffb6d/utils/dataset_tools/pyrender_sift_kp3ds.py | StannisZhou/FFB6D | 5e7534805cd2e397427886d9a2a8ecfbb4f6cdfe | [
"MIT"
] | null | null | null | ffb6d/utils/dataset_tools/pyrender_sift_kp3ds.py | StannisZhou/FFB6D | 5e7534805cd2e397427886d9a2a8ecfbb4f6cdfe | [
"MIT"
] | null | null | null | #!/usr/bin/env mdl
import json
import math
import os
import pickle as pkl
from glob import glob
import cv2
import numpy as np
import pyrender
import trimesh
from scipy import stats
from tqdm import tqdm
from fps.fps_utils import farthest_point_sampling
from utils import ImgPcldUtils, MeshUtils, PoseUtils, SysUtils
p... | 29.474886 | 85 | 0.624322 |
f12a82594cb0d40b8568ec170fea8cf1578c7a10 | 510 | py | Python | website/oauth/forms.py | abhijo89/abhilashjosephc.com | eb6676a434eb4543d0d617af870082fdd2cfe7a4 | [
"MIT"
] | null | null | null | website/oauth/forms.py | abhijo89/abhilashjosephc.com | eb6676a434eb4543d0d617af870082fdd2cfe7a4 | [
"MIT"
] | null | null | null | website/oauth/forms.py | abhijo89/abhilashjosephc.com | eb6676a434eb4543d0d617af870082fdd2cfe7a4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from django.contrib.auth.forms import forms
from django.forms import widgets
class RequireEmailForm(forms.Form):
email = forms.EmailField(label='电子邮箱', required=True)
oauthid = forms.IntegerField(widget=forms.HiddenInput, required=False)
def __init__(self, *args,... | 31.875 | 113 | 0.715686 |
089661ec6f9ca453e1bc8ee37cd4d023d4c27bde | 18,849 | py | Python | Synthetic_Code/SyntheticRun.py | raminaghods/NATS | 175e2a495fffac4161bbee5501053068e3391885 | [
"MIT"
] | 1 | 2021-10-08T15:44:10.000Z | 2021-10-08T15:44:10.000Z | Synthetic_Code/SyntheticRun.py | raminaghods/NATS | 175e2a495fffac4161bbee5501053068e3391885 | [
"MIT"
] | null | null | null | Synthetic_Code/SyntheticRun.py | raminaghods/NATS | 175e2a495fffac4161bbee5501053068e3391885 | [
"MIT"
] | 1 | 2022-03-03T13:41:25.000Z | 2022-03-03T13:41:25.000Z | '''
Code for the work:
``Multi Agent Active Search using Realistic Depth-Aware Noise Model'', Ramina Ghods, William J Durkin and Jeff Schneider
(C) Ramina Ghods 2020 (rghods@cs.cmu.edu)
Please cite the following paper to use the code:
@article{ghods2020multi,
title={Multi-Agent Active Search using Realistic Depth-... | 55.27566 | 159 | 0.642209 |
7929fc2bfb930fb43082c83b6f1ecced1246f46f | 2,744 | py | Python | team_9/cocos/samples/tetrico/gamectrl.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | 1 | 2019-09-15T18:59:49.000Z | 2019-09-15T18:59:49.000Z | team_9/cocos/samples/tetrico/gamectrl.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | team_9/cocos/samples/tetrico/gamectrl.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, print_function, unicode_literals
# This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../..'))
# stdlib
import copy
import random
# pyglet related
import pyglet
from pyglet.window imp... | 25.64486 | 74 | 0.581997 |
5dad69208704218b14539771e29aaff3a3a071e6 | 2,826 | py | Python | mac/v3.6.4/lib/python3.6/test/test_json/test_speedups.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | mac/v3.6.4/lib/python3.6/test/test_json/test_speedups.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | mac/v3.6.4/lib/python3.6/test/test_json/test_speedups.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | from test.test_json import CTest
class BadBool:
def __bool__(self):
1/0
class TestSpeedups(CTest):
def test_scanstring(self):
self.assertEqual(self.json.decoder.scanstring.__module__, "_json")
self.assertIs(self.json.decoder.scanstring, self.json.decoder.c_scanstring)
def test_e... | 39.25 | 92 | 0.609342 |
4d05b75a5b2171ad30a95efcee3a22e31c44d90c | 1,490 | py | Python | components/alibi-explain-server/setup.py | MichaelXcc/seldon-core | e304ba28b9ef14bbda4f357bb145db2732a9e0a5 | [
"Apache-2.0"
] | 3,049 | 2017-12-21T14:50:09.000Z | 2022-03-30T18:14:15.000Z | components/alibi-explain-server/setup.py | MichaelXcc/seldon-core | e304ba28b9ef14bbda4f357bb145db2732a9e0a5 | [
"Apache-2.0"
] | 3,678 | 2017-12-22T16:21:30.000Z | 2022-03-31T20:32:31.000Z | components/alibi-explain-server/setup.py | MichaelXcc/seldon-core | e304ba28b9ef14bbda4f357bb145db2732a9e0a5 | [
"Apache-2.0"
] | 714 | 2018-01-03T11:29:49.000Z | 2022-03-31T03:49:59.000Z | # Copyright 2019 kubeflow.org.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 32.391304 | 94 | 0.655705 |
42516bd2d733a3b7ce3bf8b857a35c2a857321c5 | 436 | py | Python | resources/twitter_creds.py | wyn/strep-bot | 507ec87a0b4d05c1ebbc1b35c063be1820e465c2 | [
"MIT"
] | null | null | null | resources/twitter_creds.py | wyn/strep-bot | 507ec87a0b4d05c1ebbc1b35c063be1820e465c2 | [
"MIT"
] | null | null | null | resources/twitter_creds.py | wyn/strep-bot | 507ec87a0b4d05c1ebbc1b35c063be1820e465c2 | [
"MIT"
] | null | null | null | import json
# Enter your keys/secrets as strings in the following fields
credentials = {}
credentials['CONSUMER_KEY'] = "CONSUMER_KEY"
credentials['CONSUMER_SECRET'] = "CONSUMER_SECRET"
credentials['ACCESS_TOKEN'] = "ACCESS_TOKEN"
credentials['ACCESS_SECRET'] = "ACCESS_SECRET"
if __name__ == '__main__':
# Save th... | 31.142857 | 60 | 0.736239 |
3364f62ba218467115d65a0d5b6afca4b8569db9 | 18,322 | py | Python | tests/integration_test.py | davidt99/spotipy | a2dd379bda5daa442955b43f688357fdbc3fa94c | [
"MIT"
] | 1 | 2019-10-06T16:37:35.000Z | 2019-10-06T16:37:35.000Z | tests/integration_test.py | davidt99/spotipy | a2dd379bda5daa442955b43f688357fdbc3fa94c | [
"MIT"
] | null | null | null | tests/integration_test.py | davidt99/spotipy | a2dd379bda5daa442955b43f688357fdbc3fa94c | [
"MIT"
] | null | null | null | import unittest
from http import HTTPStatus
import spotipy
from spotipy import auth
from spotipy import exceptions
USER_ID = "thetufik"
class BaseSpec(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.auth_provider = auth.AuthorizationCode.load(".cache")
def setUp(self) -> None:... | 30.036066 | 112 | 0.640487 |
6ff04dd70f44e91fca0792d18ff484e68aae54fb | 484 | py | Python | standard_library/process/process_pool.py | 2581676612/python | b309564a05838b23044bb8112fd4ef71307266b6 | [
"MIT"
] | 112 | 2017-09-19T17:38:38.000Z | 2020-05-27T18:00:27.000Z | standard_library/process/process_pool.py | tomoncle/Python-notes | ce675486290c3d1c7c2e4890b57e3d0c8a1228cc | [
"MIT"
] | null | null | null | standard_library/process/process_pool.py | tomoncle/Python-notes | ce675486290c3d1c7c2e4890b57e3d0c8a1228cc | [
"MIT"
] | 56 | 2017-09-20T01:24:12.000Z | 2020-04-16T06:19:31.000Z | # coding:utf-8
import random
from time import sleep
import sys
import multiprocessing
import os
lock = multiprocessing.Lock() # 一个锁
def a(x):
lock.acquire()
print '开始进程:', os.getpid(), '模拟进程时间:', x
lock.release()
sleep(x) # 模拟执行操作
lock.acquire()
print '结束进程:', os.getpid(), '预测下一个进程启动会使用该进程号... | 18.615385 | 53 | 0.661157 |
4d49508456ca8cca5f5e54983d1975f5cdae7eac | 6,500 | py | Python | oc_ocdm/graph/test/test_graph_set.py | arcangelo7/oc_ocdm | 128d062ce9d858024aafd26d7d238c7a26cc8914 | [
"0BSD"
] | 1 | 2020-12-17T15:33:01.000Z | 2020-12-17T15:33:01.000Z | oc_ocdm/graph/test/test_graph_set.py | arcangelo7/oc_ocdm | 128d062ce9d858024aafd26d7d238c7a26cc8914 | [
"0BSD"
] | 26 | 2021-01-08T08:32:23.000Z | 2022-03-29T10:01:40.000Z | oc_ocdm/graph/test/test_graph_set.py | arcangelo7/oc_ocdm | 128d062ce9d858024aafd26d7d238c7a26cc8914 | [
"0BSD"
] | 3 | 2021-04-16T08:44:44.000Z | 2022-02-15T11:09:22.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2016, Silvio Peroni <essepuntato@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any purpose
# with or without fee is hereby granted, provided that the above copyright notice
# and this permission notice appear in all copies.
... | 36.931818 | 95 | 0.703385 |
d55c54181a5599cf59c7d79de21318cebb808030 | 37,110 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_06_01/operations/virtual_network_gateway_connections_operations.py | wawon-msft/azure-sdk-for-python | 8004d3ac11f4b5d7a43a955c79527d21ebd68850 | [
"MIT"
] | null | null | null | azure-mgmt-network/azure/mgmt/network/v2018_06_01/operations/virtual_network_gateway_connections_operations.py | wawon-msft/azure-sdk-for-python | 8004d3ac11f4b5d7a43a955c79527d21ebd68850 | [
"MIT"
] | null | null | null | azure-mgmt-network/azure/mgmt/network/v2018_06_01/operations/virtual_network_gateway_connections_operations.py | wawon-msft/azure-sdk-for-python | 8004d3ac11f4b5d7a43a955c79527d21ebd68850 | [
"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 ... | 49.348404 | 203 | 0.695554 |
f719eeae51beeb20ebbfea489acc9d5269a4d2a2 | 397 | py | Python | simpleblog/asgi.py | itsmusa/simpleblog | fceef520684a8249e119c337898b945689515957 | [
"MIT"
] | null | null | null | simpleblog/asgi.py | itsmusa/simpleblog | fceef520684a8249e119c337898b945689515957 | [
"MIT"
] | null | null | null | simpleblog/asgi.py | itsmusa/simpleblog | fceef520684a8249e119c337898b945689515957 | [
"MIT"
] | null | null | null | """
ASGI config for simpleblog project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
0f1a789dc0bdc78f3e707129d913529cfa2ffd44 | 124 | py | Python | gummi/constants.py | seboschtion/gummi | 60e8a915d7a542a7b4aa200589cf3d30f04323d6 | [
"MIT"
] | 6 | 2019-01-21T21:07:44.000Z | 2022-01-05T12:23:52.000Z | gummi/constants.py | seboschtion/gummi | 60e8a915d7a542a7b4aa200589cf3d30f04323d6 | [
"MIT"
] | 5 | 2019-12-09T15:01:07.000Z | 2021-06-02T00:44:49.000Z | gummi/constants.py | seboschtion/gummi | 60e8a915d7a542a7b4aa200589cf3d30f04323d6 | [
"MIT"
] | null | null | null | PROGRAM_NAME = 'gummi'
BINARY_NAME = 'gummi'
PROGRAM_VERSION = '1.3.3'
MANAGED_FOLDER = '.gummi'
TEMPLATE_FOLDER = 'gummi'
| 17.714286 | 25 | 0.725806 |
93d5144ea5be2a2dcd721408279e443a036c2ca4 | 5,670 | py | Python | numpy/random/setup.py | Ceka-83/numpy | 12340c7570936a4362597021c96e0fd72f96d03c | [
"BSD-3-Clause"
] | null | null | null | numpy/random/setup.py | Ceka-83/numpy | 12340c7570936a4362597021c96e0fd72f96d03c | [
"BSD-3-Clause"
] | null | null | null | numpy/random/setup.py | Ceka-83/numpy | 12340c7570936a4362597021c96e0fd72f96d03c | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, print_function
import os
import platform
import sys
from os.path import join
from numpy.distutils.system_info import platform_bits
is_msvc = (platform.platform().startswith('Windows') and
platform.python_compiler().startswith('MS'))
def configuration(parent_package='', t... | 42 | 75 | 0.512346 |
a2b9afc0a159e99e764cf4e23cd0a3b44ed68a76 | 5,160 | py | Python | xcp_abcd/interfaces/report.py | PennLINC/xcp-abcd | 408d26eb6c84bea3fd0419faefd67082af57806a | [
"MIT"
] | null | null | null | xcp_abcd/interfaces/report.py | PennLINC/xcp-abcd | 408d26eb6c84bea3fd0419faefd67082af57806a | [
"MIT"
] | null | null | null | xcp_abcd/interfaces/report.py | PennLINC/xcp-abcd | 408d26eb6c84bea3fd0419faefd67082af57806a | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Interfaces to generate reportlets."""
import os
import time
import re
import pandas as pd
from nipype.interfaces.base import (
traits, TraitedSpec, BaseInterfaceInputSpec,
File, InputMultiObjec... | 32.658228 | 90 | 0.640504 |
fc0f57b5802d0751da681c78ae8641a59621f102 | 14,174 | py | Python | mmcls/models/backbones/vision_transformer.py | JiYuanFeng/mmclassification | b337ef1f11b85148cca4b6fb0c4da3f8cc2eede6 | [
"Apache-2.0"
] | 1 | 2022-03-07T13:55:57.000Z | 2022-03-07T13:55:57.000Z | mmcls/models/backbones/vision_transformer.py | JiYuanFeng/mmclassification | b337ef1f11b85148cca4b6fb0c4da3f8cc2eede6 | [
"Apache-2.0"
] | 5 | 2022-03-02T02:58:56.000Z | 2022-03-23T05:51:53.000Z | mmcls/models/backbones/vision_transformer.py | JiYuanFeng/mmclassification | b337ef1f11b85148cca4b6fb0c4da3f8cc2eede6 | [
"Apache-2.0"
] | 1 | 2022-01-04T03:19:50.000Z | 2022-01-04T03:19:50.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from typing import Sequence
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import build_norm_layer
from mmcv.cnn.bricks.transformer import FFN
from mmcv.cnn.utils.weight_init import trunc_normal_
from mmcv.runner.base_... | 37.696809 | 79 | 0.565966 |
7563f9620be25c97f1794d38776e1b13c048aa54 | 5,702 | py | Python | tests/test_coercion.py | kremrik/coercion | 44b59cba9ff8444ffe61c2dbbbdaedab7678937a | [
"MIT"
] | null | null | null | tests/test_coercion.py | kremrik/coercion | 44b59cba9ff8444ffe61c2dbbbdaedab7678937a | [
"MIT"
] | 3 | 2020-11-07T22:29:01.000Z | 2020-11-12T19:43:24.000Z | tests/test_coercion.py | kremrik/coercion | 44b59cba9ff8444ffe61c2dbbbdaedab7678937a | [
"MIT"
] | null | null | null | from coercion.coercion import coerce
import unittest
class test_coerce(unittest.TestCase):
def test_falsy_both(self):
schema = {}
record = {}
gold = {}
output = coerce(schema, record)
self.assertEqual(gold, output)
def test_falsy_schema(self):
schema = {}
... | 30.821622 | 56 | 0.502631 |
e899ec22be66838032d7fd033692fd1f20507dfb | 25 | py | Python | gluestick/__init__.py | hotgluexyz/gluegun | 835ee33f9b8b48c41022f3d8e5180af9786b30e4 | [
"MIT"
] | 1 | 2021-11-24T16:37:41.000Z | 2021-11-24T16:37:41.000Z | gluestick/__init__.py | hotgluexyz/gluegun | 835ee33f9b8b48c41022f3d8e5180af9786b30e4 | [
"MIT"
] | null | null | null | gluestick/__init__.py | hotgluexyz/gluegun | 835ee33f9b8b48c41022f3d8e5180af9786b30e4 | [
"MIT"
] | null | null | null | from .gluestick import *
| 12.5 | 24 | 0.76 |
67816b8721e32ed709e5024a3330e53b0f299de6 | 3,847 | py | Python | pygments/lexers/gsql.py | DanBarkus/pygments | 5d59ce4cadd3d817fd515444493a6143694f4a56 | [
"BSD-2-Clause"
] | null | null | null | pygments/lexers/gsql.py | DanBarkus/pygments | 5d59ce4cadd3d817fd515444493a6143694f4a56 | [
"BSD-2-Clause"
] | null | null | null | pygments/lexers/gsql.py | DanBarkus/pygments | 5d59ce4cadd3d817fd515444493a6143694f4a56 | [
"BSD-2-Clause"
] | 1 | 2021-09-06T11:08:18.000Z | 2021-09-06T11:08:18.000Z | """
pygments.lexers.gsql
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for TigerGraph GSQL graph query language
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, using, this, words
f... | 41.365591 | 170 | 0.471016 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.