hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f4ca05cea716eae78e2ddcccbf2a7cbd279073
2,812
py
Python
setup.py
jameschristopher/pyfolio
774174ecdfe4011845ae1ca40ca162c26cb70233
[ "Apache-2.0" ]
1
2021-08-31T09:18:57.000Z
2021-08-31T09:18:57.000Z
setup.py
vikram-narayan/pyfolio
774174ecdfe4011845ae1ca40ca162c26cb70233
[ "Apache-2.0" ]
null
null
null
setup.py
vikram-narayan/pyfolio
774174ecdfe4011845ae1ca40ca162c26cb70233
[ "Apache-2.0" ]
1
2016-11-14T04:53:02.000Z
2016-11-14T04:53:02.000Z
#!/usr/bin/env python import sys from setuptools import setup import versioneer DISTNAME = 'pyfolio' DESCRIPTION = "pyfolio is a Python library for performance and risk analysis of financial portfolios" LONG_DESCRIPTION = """pyfolio is a Python library for performance and risk analysis of financial portfolios develo...
32.321839
101
0.647226
import sys from setuptools import setup import versioneer DISTNAME = 'pyfolio' DESCRIPTION = "pyfolio is a Python library for performance and risk analysis of financial portfolios" LONG_DESCRIPTION = """pyfolio is a Python library for performance and risk analysis of financial portfolios developed by `Quantopian Inc...
true
true
08f4ca542c29fd2e8b70d39c7c17a9582d451730
20,710
py
Python
serveradmin/serverdb/tests/test_ip_addr_type.py
innogames/serveradmin
665cbe4144ffdcb882af58db72a0e6e80a16bbb9
[ "MIT" ]
43
2017-02-23T17:30:54.000Z
2021-04-14T06:25:51.000Z
serveradmin/serverdb/tests/test_ip_addr_type.py
innogames/serveradmin
665cbe4144ffdcb882af58db72a0e6e80a16bbb9
[ "MIT" ]
55
2017-08-16T16:52:39.000Z
2022-03-30T08:48:06.000Z
serveradmin/serverdb/tests/test_ip_addr_type.py
innogames/serveradmin
665cbe4144ffdcb882af58db72a0e6e80a16bbb9
[ "MIT" ]
15
2017-10-04T18:02:33.000Z
2022-03-25T10:15:12.000Z
"""Serveradmin - ip_addr_type validation tests Copyright (c) 2021 InnoGames GmbH """ import logging from ipaddress import IPv4Network from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.test.testcases import TransactionTestCase from faker import Faker from faker...
38.782772
75
0.648769
import logging from ipaddress import IPv4Network from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.test.testcases import TransactionTestCase from faker import Faker from faker.providers import internet from serveradmin.dataset import Query, DatasetObject from ...
true
true
08f4ca5b78b25b6dee50eff84d8e92e7816adb16
15,999
py
Python
diofant/functions/elementary/miscellaneous.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
null
null
null
diofant/functions/elementary/miscellaneous.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
null
null
null
diofant/functions/elementary/miscellaneous.py
rajkk1/diofant
6b361334569e4ec2e8c7d30dc324387a4ad417c2
[ "BSD-3-Clause" ]
null
null
null
from ...core import (Add, Dummy, Equality, Expr, Integer, Lambda, Mul, Pow, Rational, Tuple, oo, zoo) from ...core.compatibility import as_int from ...core.function import Application, ArgumentIndexError from ...core.logic import fuzzy_and from ...core.operations import LatticeOp, ShortCircuit from...
27.395548
94
0.55741
from ...core import (Add, Dummy, Equality, Expr, Integer, Lambda, Mul, Pow, Rational, Tuple, oo, zoo) from ...core.compatibility import as_int from ...core.function import Application, ArgumentIndexError from ...core.logic import fuzzy_and from ...core.operations import LatticeOp, ShortCircuit from...
true
true
08f4cb452ac88dc28be396cbe25d3b5aad9585f9
4,621
py
Python
gibson2/robots/fetch_robot.py
i-m-vivek/iGibson
c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648
[ "MIT" ]
3
2021-02-07T14:00:38.000Z
2021-07-03T19:40:59.000Z
gibson2/robots/fetch_robot.py
i-m-vivek/iGibson
c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648
[ "MIT" ]
null
null
null
gibson2/robots/fetch_robot.py
i-m-vivek/iGibson
c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648
[ "MIT" ]
2
2021-04-01T12:14:59.000Z
2021-06-18T13:04:39.000Z
import gym import numpy as np import pybullet as p from gibson2.external.pybullet_tools.utils import joints_from_names, set_joint_positions from gibson2.robots.robot_locomotor import LocomotorRobot class Fetch(LocomotorRobot): """ Fetch Robot Reference: https://fetchrobotics.com/robotics-platforms/fetch-...
39.836207
95
0.529323
import gym import numpy as np import pybullet as p from gibson2.external.pybullet_tools.utils import joints_from_names, set_joint_positions from gibson2.robots.robot_locomotor import LocomotorRobot class Fetch(LocomotorRobot): def __init__(self, config): self.config = config self.wheel_velocity ...
true
true
08f4cba824220033d41f0e1a75f62b1cce5b2f6d
18,966
py
Python
rpi/adafruit_pn532/adafruit_pn532.py
Keunmo/jaram-attendance
082c920cc856a5bfa9ee48c4e8221ecabe0d685e
[ "Apache-2.0" ]
4
2019-03-23T12:14:30.000Z
2020-03-18T10:39:03.000Z
rpi/adafruit_pn532/adafruit_pn532.py
Keunmo/jaram-attendance
082c920cc856a5bfa9ee48c4e8221ecabe0d685e
[ "Apache-2.0" ]
11
2019-05-27T14:55:27.000Z
2022-03-11T23:50:34.000Z
rpi/adafruit_pn532/adafruit_pn532.py
Keunmo/jaram-attendance
082c920cc856a5bfa9ee48c4e8221ecabe0d685e
[ "Apache-2.0" ]
2
2019-03-23T12:14:33.000Z
2020-04-24T02:25:38.000Z
# Adafruit PN532 NFC/RFID control library. # Author: Tony DiCola # # The MIT License (MIT) # # Copyright (c) 2015-2018 Adafruit Industries # # 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 wi...
42.42953
120
0.62438
import time from digitalio import Direction from micropython import const __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PN532.git" _PREAMBLE = const(0x00) _STARTCODE1 = const(0x00) _STARTCODE2 = const(0xFF) _POS...
true
true
08f4ccb60a69753d72dfb3ca03429f806920642f
3,241
py
Python
obsdata/indaaf_config.py
pauleckhardt/obsdata
f65168694b76a7e70c56d50ef515d7d5a64f581d
[ "MIT" ]
null
null
null
obsdata/indaaf_config.py
pauleckhardt/obsdata
f65168694b76a7e70c56d50ef515d7d5a64f581d
[ "MIT" ]
2
2021-12-08T11:45:34.000Z
2021-12-08T11:45:50.000Z
obsdata/indaaf_config.py
pauleckhardt/obsdata
f65168694b76a7e70c56d50ef515d7d5a64f581d
[ "MIT" ]
1
2021-11-26T08:40:04.000Z
2021-11-26T08:40:04.000Z
import os import pandas as pd from collections import namedtuple DATADIR = os.path.join( os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data" ) DATASETS = [ { "name": "Precipitation", "href": "/catalog/dataset/1", "id": 1, "time_interval": "daily", ...
23.830882
64
0.543968
import os import pandas as pd from collections import namedtuple DATADIR = os.path.join( os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data" ) DATASETS = [ { "name": "Precipitation", "href": "/catalog/dataset/1", "id": 1, "time_interval": "daily", ...
true
true
08f4ccc60783ff7cd0696ee4ed68585bd054d9ff
1,136
py
Python
leetcode174.py
aquadrop/leetcode
683599bcb330687cdc33ebc38aeb453f86f5edd7
[ "MIT" ]
null
null
null
leetcode174.py
aquadrop/leetcode
683599bcb330687cdc33ebc38aeb453f86f5edd7
[ "MIT" ]
null
null
null
leetcode174.py
aquadrop/leetcode
683599bcb330687cdc33ebc38aeb453f86f5edd7
[ "MIT" ]
null
null
null
class Solution: def calculateMinimumHP(self, dungeon): """ :type dungeon: List[List[int]] :rtype: int """ m = len(dungeon) n = len(dungeon[0]) dp = [[0 for _ in range(n)] for _ in range(m)] dp[m - 1][n - 1] = max(1, 1 - dungeon[m - 1][n - 1]) ...
32.457143
71
0.412852
class Solution: def calculateMinimumHP(self, dungeon): m = len(dungeon) n = len(dungeon[0]) dp = [[0 for _ in range(n)] for _ in range(m)] dp[m - 1][n - 1] = max(1, 1 - dungeon[m - 1][n - 1]) for i in range(m - 2, -1, -1): dp[i][n - 1] = max(1, dp[i + 1][n - 1] -...
true
true
08f4cd45b49d433f0811a610ab4c0a20d98af256
1,578
py
Python
zerver/management/commands/bankrupt_users.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
1
2021-02-13T20:43:29.000Z
2021-02-13T20:43:29.000Z
zerver/management/commands/bankrupt_users.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
9
2021-02-08T20:22:39.000Z
2022-02-11T03:40:19.000Z
zerver/management/commands/bankrupt_users.py
tobby2002/zulip
66e7c455759f9368bae16b9a604cf63f8e3524cd
[ "Apache-2.0" ]
1
2021-06-10T15:12:52.000Z
2021-06-10T15:12:52.000Z
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_update_message_flags from zerver.models import UserProfile, Message, get_user_profile_by_email ...
38.487805
88
0.618504
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_update_message_flags from zerver.models import UserProfile, Message, get_user_profile_by_email ...
true
true
08f4cdf5e7dc2e63d41ec6452a6b5e6f3188685b
356
py
Python
Python/Programming Basics/Advanced Loops/17.Magic Numbers.py
teodoramilcheva/softuni-software-engineering
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
[ "MIT" ]
null
null
null
Python/Programming Basics/Advanced Loops/17.Magic Numbers.py
teodoramilcheva/softuni-software-engineering
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
[ "MIT" ]
null
null
null
Python/Programming Basics/Advanced Loops/17.Magic Numbers.py
teodoramilcheva/softuni-software-engineering
98dc9faa66f42570f6538fd7ef186d2bd1d39bff
[ "MIT" ]
null
null
null
n = int(input()) for d1 in range(1, 10): for d2 in range(1, 10): for d3 in range(1, 10): for d4 in range(1, 10): for d5 in range(1, 10): for d6 in range(1, 10): if d1 * d2 * d3 * d4 * d5 * d6 == n: print(f'...
29.666667
71
0.379213
n = int(input()) for d1 in range(1, 10): for d2 in range(1, 10): for d3 in range(1, 10): for d4 in range(1, 10): for d5 in range(1, 10): for d6 in range(1, 10): if d1 * d2 * d3 * d4 * d5 * d6 == n: print(f'...
true
true
08f4cfde5c0a2ee4e9aeed10e1fbfb73994d37c6
1,356
py
Python
remo/featuredrep/models.py
glogiotatidis/remo
1c4f55c63c8d03cbee776b60af042b8068d9f297
[ "BSD-3-Clause" ]
null
null
null
remo/featuredrep/models.py
glogiotatidis/remo
1c4f55c63c8d03cbee776b60af042b8068d9f297
[ "BSD-3-Clause" ]
null
null
null
remo/featuredrep/models.py
glogiotatidis/remo
1c4f55c63c8d03cbee776b60af042b8068d9f297
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver from south.signals import post_migrate from remo.base.utils import add_permissions_to_groups class FeaturedRep(models.Model): """Featured Rep model. Featured Rep -or Rep of the Month- relates exist...
33.9
75
0.710914
from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver from south.signals import post_migrate from remo.base.utils import add_permissions_to_groups class FeaturedRep(models.Model): created_on = models.DateTimeField(auto_now_add=True) updated_on = models...
true
true
08f4d08828634b1892e953536c37a53f8875d569
653
py
Python
var/spack/repos/builtin.mock/packages/override-context-templates/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin.mock/packages/override-context-templates/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin.mock/packages/override-context-templates/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class OverrideContextTemplates(Package): """This package updates the context for TCL modulefiles...
31.095238
76
0.713629
from spack import * class OverrideContextTemplates(Package): homepage = "http://www.fake-spack-example.org" url = "http://www.fake-spack-example.org/downloads/fake-1.0.tar.gz" version('1.0', 'foobarbaz') tcl_template = 'extension.tcl' tcl_context = {'sentence': "sentence from package"}
true
true
08f4d0b74d75dfbb28d2fa42e6a650af22734827
1,080
py
Python
src/mvnfeed_modules/mvnfeed-cli-transfer/mvnfeed/cli/transfer/_help.py
cclauss/mvnfeed-cli
6b2d2fa52360ad8aa56c34407e527d6346c01484
[ "MIT" ]
8
2019-08-05T20:28:45.000Z
2021-09-02T09:20:59.000Z
src/mvnfeed_modules/mvnfeed-cli-transfer/mvnfeed/cli/transfer/_help.py
cclauss/mvnfeed-cli
6b2d2fa52360ad8aa56c34407e527d6346c01484
[ "MIT" ]
3
2019-07-31T10:12:52.000Z
2021-09-13T12:01:51.000Z
src/mvnfeed_modules/mvnfeed-cli-transfer/mvnfeed/cli/transfer/_help.py
cclauss/mvnfeed-cli
6b2d2fa52360ad8aa56c34407e527d6346c01484
[ "MIT" ]
11
2019-07-31T12:58:14.000Z
2021-09-13T12:50:21.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
25.116279
94
0.55463
from knack.help_files import helps helps[''] = """ type: group short-summary: Utility to transfer Maven artifacts long-summary: """ helps['artifact'] = """ type: group short-summary: Commands to transfer artifacts long-summary: """ helps['config'] = """ type: group short-summary: Com...
true
true
08f4d109627bdb40204fdedf66bcc382e75036c9
653
py
Python
calibrate2.py
hsspratt/Nott-Hawkeye1
178f4f0fef62e8699f6057d9d50adfd61a851047
[ "MIT" ]
null
null
null
calibrate2.py
hsspratt/Nott-Hawkeye1
178f4f0fef62e8699f6057d9d50adfd61a851047
[ "MIT" ]
1
2021-11-11T22:15:36.000Z
2021-11-11T22:15:36.000Z
calibrate2.py
hsspratt/Nott-Hawkeye1
178f4f0fef62e8699f6057d9d50adfd61a851047
[ "MIT" ]
null
null
null
# %% import matplotlib.pyplot as plt import numpy as np import functions import importlib as imp # %% calibrate camera A imp.reload(functions) A_img = functions.open_img('IMG_2987_new.jpg') A_ang_pix = functions.calib(A_img, 30.5, 7, 7, zoom=30) print('Angle per pixel for camera A') # %% calibrate camera B B_img =...
18.138889
55
0.719755
import matplotlib.pyplot as plt import numpy as np import functions import importlib as imp imp.reload(functions) A_img = functions.open_img('IMG_2987_new.jpg') A_ang_pix = functions.calib(A_img, 30.5, 7, 7, zoom=30) print('Angle per pixel for camera A') B_img = functions.open_img('IMG_0742_new.jpg') B_ang_pix = ...
true
true
08f4d128b5e748598fdf7dd2c70b21a2cb8da927
4,881
py
Python
qiskit/quantum_info/random/utils.py
dmquinones/qiskit-terra
f8fdfc514b051b4a37f7ac738b9716aecba8fc37
[ "Apache-2.0" ]
null
null
null
qiskit/quantum_info/random/utils.py
dmquinones/qiskit-terra
f8fdfc514b051b4a37f7ac738b9716aecba8fc37
[ "Apache-2.0" ]
null
null
null
qiskit/quantum_info/random/utils.py
dmquinones/qiskit-terra
f8fdfc514b051b4a37f7ac738b9716aecba8fc37
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2019, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=invalid-name,invalid-sequence-index # pylint: disable=unsupported-assignment-operation """ Methods to crea...
30.31677
90
0.615653
import math import numpy as np from qiskit.quantum_info.operators import Operator from qiskit.exceptions import QiskitError def random_state(dim, seed=None): if seed is None: seed = np.random.randint(0, np.iinfo(np.int32).max) rng = np.random.RandomState(seed) x = rng.rand(dim) x += x...
true
true
08f4d179c557cbf26bfab7c2aa963385aadda5ac
2,733
py
Python
test/misc.py
benchmarking-suite/benchmarking-controller
98171af05ff765c4f68d13373381660119eb1ee4
[ "Apache-2.0" ]
null
null
null
test/misc.py
benchmarking-suite/benchmarking-controller
98171af05ff765c4f68d13373381660119eb1ee4
[ "Apache-2.0" ]
null
null
null
test/misc.py
benchmarking-suite/benchmarking-controller
98171af05ff765c4f68d13373381660119eb1ee4
[ "Apache-2.0" ]
null
null
null
# Benchmarking Suite # Copyright 2014-2017 Engineering Ingegneria Informatica S.p.A. # # 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 ...
54.66
174
0.777534
import logging import os import sys from benchsuite.core.model.provider import load_service_provider_from_config_file OUTPUT = """ 2017-10-11 09:30:00,645 - benchsuite.core.sessionmanager - DEBUG - Benchmarking Sessions loaded from /home/ggiammat/.local/share/benchmarking-suite/sessions.dat (60 sessions) 2017-10-11 ...
true
true
08f4d19cee6475a675fcd0d7badfd2c874e9cf7e
13,673
py
Python
userbot/plugins/chatinfo.py
shubham-king/Trusted_Cat
a595d158454e1baf7e9e088e4997092593c02b5d
[ "MIT" ]
null
null
null
userbot/plugins/chatinfo.py
shubham-king/Trusted_Cat
a595d158454e1baf7e9e088e4997092593c02b5d
[ "MIT" ]
null
null
null
userbot/plugins/chatinfo.py
shubham-king/Trusted_Cat
a595d158454e1baf7e9e088e4997092593c02b5d
[ "MIT" ]
2
2020-06-25T11:14:50.000Z
2021-04-04T13:49:13.000Z
from asyncio import sleep from os import remove from telethon import events import asyncio from telethon.errors import (ChannelInvalidError, ChannelPrivateError, ChannelPublicGroupNaError, InviteHashEmptyError, InviteHashExpiredError, InviteHashInvalidError) from emoji import emojize from telethon.tl.types import Messa...
49.361011
206
0.650625
from asyncio import sleep from os import remove from telethon import events import asyncio from telethon.errors import (ChannelInvalidError, ChannelPrivateError, ChannelPublicGroupNaError, InviteHashEmptyError, InviteHashExpiredError, InviteHashInvalidError) from emoji import emojize from telethon.tl.types import Messa...
true
true
08f4d25da5e97f0304731c25bf9416d61d720912
12,577
py
Python
evaluate.py
scusjs/ucas_evaluate
bae28979a750814b4cba0b1513db9eccf7419192
[ "MIT" ]
29
2016-02-18T06:27:46.000Z
2021-08-02T12:39:14.000Z
evaluate.py
SmallEars/ucas_enroll_evaluation
bae28979a750814b4cba0b1513db9eccf7419192
[ "MIT" ]
5
2017-01-04T16:03:37.000Z
2020-06-04T00:29:45.000Z
evaluate.py
SmallEars/ucas_enroll_evaluation
bae28979a750814b4cba0b1513db9eccf7419192
[ "MIT" ]
21
2016-01-18T09:42:03.000Z
2020-06-30T04:58:44.000Z
# @file evaluate.py # @brief enroll & evaluate # @author scusjs@foxmail.com, my@imcmy.me # @version 0.2.01 # @date 2017-1-3 import requests from configparser import RawConfigParser from bs4 import BeautifulSoup from CollegeCode import CollegeCode import time debug = False class UCASEvaluate: def __init__(self):...
36.774854
149
0.530731
import requests from configparser import RawConfigParser from bs4 import BeautifulSoup from CollegeCode import CollegeCode import time debug = False class UCASEvaluate: def __init__(self): self.__readCoursesId() cf = RawConfigParser() cf.read('config') self.username = cf.get('in...
true
true
08f4d28ce2f0ef0b3e3fc1adf22d6005e65fbd0b
948
py
Python
imperative/python/test/unit/core/test_async_level.py
yang-shuohao/MegEngine
2e8742086563ea442c357b14560245c54e0aa0a3
[ "Apache-2.0" ]
1
2020-12-11T04:08:25.000Z
2020-12-11T04:08:25.000Z
imperative/python/test/unit/core/test_async_level.py
yang-shuohao/MegEngine
2e8742086563ea442c357b14560245c54e0aa0a3
[ "Apache-2.0" ]
null
null
null
imperative/python/test/unit/core/test_async_level.py
yang-shuohao/MegEngine
2e8742086563ea442c357b14560245c54e0aa0a3
[ "Apache-2.0" ]
null
null
null
import pytest import megengine as mge import megengine.functional as F from megengine.core._imperative_rt.imperative import config_async_level, get_async_level def test_basic(): config_async_level(2) assert get_async_level() == 2 with pytest.raises(RuntimeError): config_async_level(3) def test_...
26.333333
88
0.650844
import pytest import megengine as mge import megengine.functional as F from megengine.core._imperative_rt.imperative import config_async_level, get_async_level def test_basic(): config_async_level(2) assert get_async_level() == 2 with pytest.raises(RuntimeError): config_async_level(3) def test_...
true
true
08f4d393b24b57066eb83c979baa81f1a0d0228a
106
py
Python
Calculator/Squared_root.py
kb8njit/StatisticsCalculator
3b9eabc5975ce51735c249c890437620af17c2de
[ "MIT" ]
null
null
null
Calculator/Squared_root.py
kb8njit/StatisticsCalculator
3b9eabc5975ce51735c249c890437620af17c2de
[ "MIT" ]
1
2020-07-08T22:48:11.000Z
2020-07-08T22:48:11.000Z
Calculator/Squared_root.py
kb8njit/StatisticsCalculator
3b9eabc5975ce51735c249c890437620af17c2de
[ "MIT" ]
3
2020-07-02T20:38:33.000Z
2021-07-14T04:44:48.000Z
# Squared root static method import math def squared_root(a): a = float(a) return math.sqrt(a)
11.777778
28
0.669811
import math def squared_root(a): a = float(a) return math.sqrt(a)
true
true
08f4d3f2088d01ac37311a93690be3b75ddfa15f
246
py
Python
gbe/views/costume_changestate_view.py
bethlakshmi/gbe-divio-djangocms-python2.7
6e9b2c894162524bbbaaf73dcbe927988707231d
[ "Apache-2.0" ]
1
2021-03-14T11:56:47.000Z
2021-03-14T11:56:47.000Z
gbe/views/costume_changestate_view.py
bethlakshmi/gbe-divio-djangocms-python2.7
6e9b2c894162524bbbaaf73dcbe927988707231d
[ "Apache-2.0" ]
180
2019-09-15T19:52:46.000Z
2021-11-06T23:48:01.000Z
gbe/views/costume_changestate_view.py
bethlakshmi/gbe-divio-djangocms-python2.7
6e9b2c894162524bbbaaf73dcbe927988707231d
[ "Apache-2.0" ]
null
null
null
from gbe.views import BidChangeStateView from gbe.models import Costume class CostumeChangeStateView(BidChangeStateView): object_type = Costume coordinator_permissions = ('Costume Coordinator', ) redirectURL = 'costume_review_list'
27.333333
55
0.796748
from gbe.views import BidChangeStateView from gbe.models import Costume class CostumeChangeStateView(BidChangeStateView): object_type = Costume coordinator_permissions = ('Costume Coordinator', ) redirectURL = 'costume_review_list'
true
true
08f4d408476b0c2e6bf1eaf9d5ec8c0eef11d466
9,386
py
Python
mycroft/gui/extensions.py
NeonJarbas/ovos-core
b516c319f13afb38401a5c9f6bbc0de35c7d7464
[ "Apache-2.0" ]
null
null
null
mycroft/gui/extensions.py
NeonJarbas/ovos-core
b516c319f13afb38401a5c9f6bbc0de35c7d7464
[ "Apache-2.0" ]
null
null
null
mycroft/gui/extensions.py
NeonJarbas/ovos-core
b516c319f13afb38401a5c9f6bbc0de35c7d7464
[ "Apache-2.0" ]
null
null
null
import threading from mycroft.configuration import Configuration from mycroft.messagebus import Message from mycroft.util.log import LOG from mycroft.api import is_paired from ovos_utils.system import ssh_enable, ssh_disable from json_database import JsonStorageXDG from mycroft.gui.homescreen import HomescreenManager ...
38.946058
106
0.650011
import threading from mycroft.configuration import Configuration from mycroft.messagebus import Message from mycroft.util.log import LOG from mycroft.api import is_paired from ovos_utils.system import ssh_enable, ssh_disable from json_database import JsonStorageXDG from mycroft.gui.homescreen import HomescreenManager ...
true
true
08f4d4919b697af819c1712041210d64067a6c54
2,318
py
Python
main.py
taimur1871/worldbank_data_dashboard
8ce350eda111ffd52b6c2cf2e2ab549135ec479b
[ "MIT" ]
null
null
null
main.py
taimur1871/worldbank_data_dashboard
8ce350eda111ffd52b6c2cf2e2ab549135ec479b
[ "MIT" ]
null
null
null
main.py
taimur1871/worldbank_data_dashboard
8ce350eda111ffd52b6c2cf2e2ab549135ec479b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Library imports from typing import List from wbgapi.source import features from fastapi import FastAPI, Request, Query from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates # import chart ...
33.114286
95
0.703192
from typing import List from wbgapi.source import features from fastapi import FastAPI, Request, Query from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates from utils import api_new import pandas as pd app = FastAPI() app.mount("/stati...
true
true
08f4d4a47369f38379a7652b20aa997088d16cb1
5,010
py
Python
pyxel/gl_wrapper.py
TrietChau/asd
49d08b49246f1720cb1ac1134d5f34391a5c74f2
[ "MIT" ]
1
2019-10-18T01:54:10.000Z
2019-10-18T01:54:10.000Z
pyxel/gl_wrapper.py
TCadillac/Pyxel
49d08b49246f1720cb1ac1134d5f34391a5c74f2
[ "MIT" ]
null
null
null
pyxel/gl_wrapper.py
TCadillac/Pyxel
49d08b49246f1720cb1ac1134d5f34391a5c74f2
[ "MIT" ]
null
null
null
import ctypes import numpy as np import OpenGL.GL as gl from OpenGL.GL import shaders class GLShader: def __init__(self, vertex_shader, fragment_shader): self._program = shaders.compileProgram( shaders.compileShader(vertex_shader, gl.GL_VERTEX_SHADER), shaders.compileShader(fragme...
30
87
0.590619
import ctypes import numpy as np import OpenGL.GL as gl from OpenGL.GL import shaders class GLShader: def __init__(self, vertex_shader, fragment_shader): self._program = shaders.compileProgram( shaders.compileShader(vertex_shader, gl.GL_VERTEX_SHADER), shaders.compileShader(fragme...
true
true
08f4d4e2b26d35f37ef228691ad308d2b2097d56
1,258
py
Python
terraform_compliance/common/pyhcl_helper.py
mikemcowie/terraform-compliance
9ccdaeea4226d7c2df0e10cb199141e4bab2b6f2
[ "MIT" ]
null
null
null
terraform_compliance/common/pyhcl_helper.py
mikemcowie/terraform-compliance
9ccdaeea4226d7c2df0e10cb199141e4bab2b6f2
[ "MIT" ]
null
null
null
terraform_compliance/common/pyhcl_helper.py
mikemcowie/terraform-compliance
9ccdaeea4226d7c2df0e10cb199141e4bab2b6f2
[ "MIT" ]
null
null
null
from sys import exc_info, exit from os.path import isdir from terraform_compliance import Validator from terraform_validate.terraform_validate import TerraformSyntaxException from shutil import rmtree def load_tf_files(tf_directory): result = False print('Reading terraform files.') if isdir('{}/.terrafor...
27.955556
74
0.654213
from sys import exc_info, exit from os.path import isdir from terraform_compliance import Validator from terraform_validate.terraform_validate import TerraformSyntaxException from shutil import rmtree def load_tf_files(tf_directory): result = False print('Reading terraform files.') if isdir('{}/.terrafor...
true
true
08f4d616e19925d620d93e67d3692bea7394abfc
4,619
py
Python
redash/query_runner/vertica.py
geunho/redash
c4c767eabe9200ee7e5d2ef31bd45ce9ba7c0a75
[ "BSD-2-Clause" ]
3
2018-06-01T00:05:18.000Z
2019-03-07T14:03:10.000Z
redash/query_runner/vertica.py
geunho/redash
c4c767eabe9200ee7e5d2ef31bd45ce9ba7c0a75
[ "BSD-2-Clause" ]
10
2017-10-17T09:17:53.000Z
2019-12-05T07:13:41.000Z
redash/query_runner/vertica.py
tradingfoe/redash-clone
94065b8dce0e27f6f40a7adc2b99e078b03115b3
[ "BSD-2-Clause" ]
5
2018-06-02T11:12:44.000Z
2020-05-13T18:34:33.000Z
import sys import logging from redash.utils import json_loads, json_dumps from redash.query_runner import * logger = logging.getLogger(__name__) types_map = { 5: TYPE_BOOLEAN, 6: TYPE_INTEGER, 7: TYPE_FLOAT, 8: TYPE_STRING, 9: TYPE_STRING, 10: TYPE_DATE, 11: TYPE_DATETIME, 12: TYPE_DA...
29.420382
108
0.501191
import sys import logging from redash.utils import json_loads, json_dumps from redash.query_runner import * logger = logging.getLogger(__name__) types_map = { 5: TYPE_BOOLEAN, 6: TYPE_INTEGER, 7: TYPE_FLOAT, 8: TYPE_STRING, 9: TYPE_STRING, 10: TYPE_DATE, 11: TYPE_DATETIME, 12: TYPE_DA...
true
true
08f4d76a2839bfb8b471723f4cffa5bb4effb265
10,501
py
Python
sdk/python/pulumi_azure_native/dbformariadb/v20180601/firewall_rule.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/dbformariadb/v20180601/firewall_rule.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/dbformariadb/v20180601/firewall_rule.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "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, overload from ... import _utilities __...
44.308017
410
0.6547
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = ['FirewallRuleArgs', 'FirewallRule'] @pulumi.input_type class FirewallRuleArgs: def __init__(__self__, *, end_ip_address: pulumi.Input[str...
true
true
08f4d7af2fb109eefc5662b95c4f3366a3d9b19a
853
py
Python
setup.py
Poofjunior/mash
9fafba2aa001b14b5a1f2118a229d8b8c3ac1c72
[ "MIT" ]
3
2020-07-22T23:07:56.000Z
2021-04-13T18:01:34.000Z
setup.py
Poofjunior/mash
9fafba2aa001b14b5a1f2118a229d8b8c3ac1c72
[ "MIT" ]
5
2020-07-23T06:46:04.000Z
2022-03-01T23:30:46.000Z
setup.py
Poofjunior/mash
9fafba2aa001b14b5a1f2118a229d8b8c3ac1c72
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r", newline="", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="inpromptu", version="0.0.5", author="Joshua Vasquez", author_email="joshua@doublejumpelectric.com", description="An inferrable line oriented command prompt in...
31.592593
73
0.660023
import setuptools with open("README.md", "r", newline="", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="inpromptu", version="0.0.5", author="Joshua Vasquez", author_email="joshua@doublejumpelectric.com", description="An inferrable line oriented command prompt in...
true
true
08f4d9ae00e26f20373558b2c572dd26ed54c18c
2,397
py
Python
gg/builtins/branches/tests/test_gg_branches.py
peterbe/
c7fd91931639f31391f9db0784228fae8804adfa
[ "MIT" ]
4
2016-05-06T17:38:16.000Z
2021-02-03T02:37:50.000Z
gg/builtins/branches/tests/test_gg_branches.py
peterbe/
c7fd91931639f31391f9db0784228fae8804adfa
[ "MIT" ]
3
2016-07-01T12:37:35.000Z
2016-07-01T14:53:08.000Z
gg/builtins/branches/tests/test_gg_branches.py
peterbe/gg
c7fd91931639f31391f9db0784228fae8804adfa
[ "MIT" ]
null
null
null
import json import os import tempfile import shutil import pytest import requests_mock from click.testing import CliRunner # By doing this import we make sure that the plugin is made available # but the entry points loading inside gg.main. # An alternative would we to set `PYTHONPATH=. py.test` (or something) # but t...
28.2
76
0.670004
import json import os import tempfile import shutil import pytest import requests_mock from click.testing import CliRunner from gg.main import Config from gg.builtins.branches.gg_branches import branches @pytest.fixture(autouse=True) def requestsmock(): with requests_mock.mock() as m: yield m @pytest...
true
true
08f4da6d3db8bbc551fca87463cc4c7affcaa54b
11,394
py
Python
implementations/python/mzlib/spectrum_library_collection.py
HUPO-PSI/spectralLib-Format
79ba19513a9138f7d3a7175c8b17d3068c2e304f
[ "Apache-2.0" ]
7
2017-11-01T09:02:31.000Z
2020-04-08T17:33:09.000Z
implementations/python/mzlib/spectrum_library_collection.py
HUPO-PSI/spectralLib-Format
79ba19513a9138f7d3a7175c8b17d3068c2e304f
[ "Apache-2.0" ]
16
2017-04-26T07:01:20.000Z
2020-05-14T16:35:18.000Z
implementations/python/mzlib/spectrum_library_collection.py
HUPO-PSI/spectralLib-Format
79ba19513a9138f7d3a7175c8b17d3068c2e304f
[ "Apache-2.0" ]
8
2018-04-19T14:33:53.000Z
2020-03-25T14:38:59.000Z
#!/usr/bin/env python3 from __future__ import print_function import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) import os from datetime import datetime from sqlalchemy import Column, ForeignKey, Integer, Float, String, DateTime, Text, PickleType, LargeBinary from sqlalchemy....
29.905512
139
0.600755
from __future__ import print_function import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) import os from datetime import datetime from sqlalchemy import Column, ForeignKey, Integer, Float, String, DateTime, Text, PickleType, LargeBinary from sqlalchemy.ext.declarative import d...
true
true
08f4db6a2555199035d5662a6bf6e7957295c2b9
9,611
py
Python
SLAM/FastSLAM1/fast_slam1.py
tks10/PythonRobotics
9461aa039f041775e1610d2a22b38ae3353f36ec
[ "MIT" ]
11
2019-03-21T17:55:19.000Z
2021-11-18T01:25:48.000Z
SLAM/FastSLAM1/fast_slam1.py
Sunshengjin/PythonRobotics
10042893d30f1a75f0f2083b338c63d43ab5cd1e
[ "MIT" ]
null
null
null
SLAM/FastSLAM1/fast_slam1.py
Sunshengjin/PythonRobotics
10042893d30f1a75f0f2083b338c63d43ab5cd1e
[ "MIT" ]
5
2019-03-26T10:36:14.000Z
2020-04-16T07:24:25.000Z
""" FastSLAM 1.0 example author: Atsushi Sakai (@Atsushi_twi) """ import numpy as np import math import matplotlib.pyplot as plt # Fast SLAM covariance Q = np.diag([3.0, np.deg2rad(10.0)])**2 R = np.diag([1.0, np.deg2rad(20.0)])**2 # Simulation parameter Qsim = np.diag([0.3, np.deg2rad(2.0)])**2 Rsim = np.diag(...
24.331646
79
0.522942
import numpy as np import math import matplotlib.pyplot as plt Q = np.diag([3.0, np.deg2rad(10.0)])**2 R = np.diag([1.0, np.deg2rad(20.0)])**2 Qsim = np.diag([0.3, np.deg2rad(2.0)])**2 Rsim = np.diag([0.5, np.deg2rad(10.0)])**2 OFFSET_YAWRATE_NOISE = 0.01 DT = 0.1 SIM_TIME = 50.0 MAX_RANGE = 20.0 M_DIST_TH = 2....
true
true
08f4db90f0fe45654a22649d45a11ff473bc98a4
4,566
py
Python
delpapa/avalanches/FigS3.py
delpapa/CritSORN
cdad55d55f39e04f568ca1bc0c6036bec8db08fb
[ "MIT" ]
null
null
null
delpapa/avalanches/FigS3.py
delpapa/CritSORN
cdad55d55f39e04f568ca1bc0c6036bec8db08fb
[ "MIT" ]
null
null
null
delpapa/avalanches/FigS3.py
delpapa/CritSORN
cdad55d55f39e04f568ca1bc0c6036bec8db08fb
[ "MIT" ]
null
null
null
#### # Script for the S2 paper figure (from PhaseTransitionNoise) # A,B: Fixed spikes #### from pylab import * import tables import os from tempfile import TemporaryFile import data_analysis as analysis import powerlaw as pl from matplotlib import gridspec transient_steps = 2e6 stable_steps = 3e6 number_of_files = ...
31.708333
80
0.602059
from pylab import * import tables import os from tempfile import TemporaryFile import data_analysis as analysis import powerlaw as pl from matplotlib import gridspec transient_steps = 2e6 stable_steps = 3e6 number_of_files = 100 THETA_P = 15 width = 7 height = 3 fig = figure(1, figsize=(width, height))...
false
true
08f4dbd38ee0951de8b33b668ac9745ae9d5bf27
1,774
py
Python
pypass.py
XXXTheInternXXX/pypass
8e4ec36a22d205e43d9cd988eb458d4123c734d4
[ "MIT" ]
null
null
null
pypass.py
XXXTheInternXXX/pypass
8e4ec36a22d205e43d9cd988eb458d4123c734d4
[ "MIT" ]
null
null
null
pypass.py
XXXTheInternXXX/pypass
8e4ec36a22d205e43d9cd988eb458d4123c734d4
[ "MIT" ]
null
null
null
# Generate a random password. import secrets x = 0 password = "" uppercase = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] # Len == 26 secrets.randbelow(26) lowercase = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'...
28.612903
151
0.552988
import secrets x = 0 password = "" uppercase = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] lowercase = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] numbers = ['0','1','2','3','4','5','6...
true
true
08f4dd222061d79b8b9cedb8bb30064a908fec17
50
py
Python
deep_utils/vision/object_detection/main/__init__.py
dornasabet/deep_utils
be61b36ea5b3219831e9f2a364fbd4a63858abed
[ "MIT" ]
36
2021-11-10T05:17:18.000Z
2022-03-27T18:25:10.000Z
deep_utils/vision/object_detection/main/__init__.py
MenuaB/deep_utils
b1b936f4780ea7dc52224f53f5116288c5b0a804
[ "MIT" ]
15
2021-07-24T06:23:04.000Z
2021-09-18T05:30:20.000Z
deep_utils/vision/object_detection/main/__init__.py
MenuaB/deep_utils
b1b936f4780ea7dc52224f53f5116288c5b0a804
[ "MIT" ]
4
2021-07-20T09:36:08.000Z
2021-09-18T08:31:17.000Z
from .main_object_detection import ObjectDetector
25
49
0.9
from .main_object_detection import ObjectDetector
true
true
08f4ddb8baeafe6f2c0fdacd32ce27b6e5c9b49a
2,926
py
Python
examples/simple_event_writer.py
watsonjj/ctapipe
fc98748d7a38f50040f1fbe3ce5e174ad8c0ba0a
[ "BSD-3-Clause" ]
53
2015-06-23T15:24:20.000Z
2021-09-23T22:30:58.000Z
examples/simple_event_writer.py
watsonjj/ctapipe
fc98748d7a38f50040f1fbe3ce5e174ad8c0ba0a
[ "BSD-3-Clause" ]
1,537
2015-06-24T11:27:16.000Z
2022-03-31T16:17:08.000Z
examples/simple_event_writer.py
watsonjj/ctapipe
fc98748d7a38f50040f1fbe3ce5e174ad8c0ba0a
[ "BSD-3-Clause" ]
275
2015-07-09T14:09:28.000Z
2022-03-17T22:25:51.000Z
#!/usr/bin/env python3 """ This example uses a configuration file in JSON format to process the events and apply pre-selection cuts to the images (charge and number of pixels). An HDF5 file is written with image MC and moment parameters (e.g. length, width, image amplitude, etc.). """ from tqdm.auto import tqdm from c...
31.12766
88
0.630554
from tqdm.auto import tqdm from ctapipe.core import Tool from ctapipe.core.traits import Path, Unicode, Dict, Bool from ctapipe.io import EventSource, HDF5TableWriter from ctapipe.calib import CameraCalibrator from ctapipe.utils import get_dataset_path from ctapipe.image import hillas_parameters, tailcuts_clean cla...
true
true
08f4df4daa7b411b4cddb4014e24775fb68d7039
309
py
Python
packages/core/minos-microservice-aggregate/minos/aggregate/events/__init__.py
minos-framework/minos-python
9a6ad6783361f3d8a497a088808b55ea7a938c6c
[ "MIT" ]
247
2022-01-24T14:55:30.000Z
2022-03-25T12:06:17.000Z
packages/core/minos-microservice-aggregate/minos/aggregate/events/__init__.py
minos-framework/minos-python
9a6ad6783361f3d8a497a088808b55ea7a938c6c
[ "MIT" ]
168
2022-01-24T14:54:31.000Z
2022-03-31T09:31:09.000Z
packages/core/minos-microservice-aggregate/minos/aggregate/events/__init__.py
minos-framework/minos-python
9a6ad6783361f3d8a497a088808b55ea7a938c6c
[ "MIT" ]
21
2022-02-06T17:25:58.000Z
2022-03-27T04:50:29.000Z
from .entries import ( EventEntry, ) from .fields import ( FieldDiff, FieldDiffContainer, IncrementalFieldDiff, ) from .models import ( Event, ) from .repositories import ( DatabaseEventRepository, EventDatabaseOperationFactory, EventRepository, InMemoryEventRepository, )
17.166667
34
0.721683
from .entries import ( EventEntry, ) from .fields import ( FieldDiff, FieldDiffContainer, IncrementalFieldDiff, ) from .models import ( Event, ) from .repositories import ( DatabaseEventRepository, EventDatabaseOperationFactory, EventRepository, InMemoryEventRepository, )
true
true
08f4df6142eed418171ccbc7ee95822bdb0858aa
666
py
Python
manage.py
Burugux/library-api
5e7d2f5b7eff31773695a04a7385bf58c485ef35
[ "MIT" ]
null
null
null
manage.py
Burugux/library-api
5e7d2f5b7eff31773695a04a7385bf58c485ef35
[ "MIT" ]
null
null
null
manage.py
Burugux/library-api
5e7d2f5b7eff31773695a04a7385bf58c485ef35
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rental_api.settings') try: from django.core.management import execute_from_command_line except I...
28.956522
74
0.68018
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rental_api.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
08f4e0908c0ebdd1a2e10ca6baf145c725598ed7
11,091
py
Python
PyWGCNA/comparison.py
mortazavilab/PyWGCNA
f61bf9a71c39d1b58c787b36ffd271d68de663b4
[ "MIT" ]
7
2022-02-01T21:52:21.000Z
2022-03-03T18:30:41.000Z
PyWGCNA/comparison.py
mortazavilab/PyWGCNA
f61bf9a71c39d1b58c787b36ffd271d68de663b4
[ "MIT" ]
null
null
null
PyWGCNA/comparison.py
mortazavilab/PyWGCNA
f61bf9a71c39d1b58c787b36ffd271d68de663b4
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from scipy.stats import fisher_exact import matplotlib.pyplot as plt import pickle # bcolors HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' class Co...
39.190813
157
0.53052
import pandas as pd import numpy as np from scipy.stats import fisher_exact import matplotlib.pyplot as plt import pickle HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' class Comparison: ...
true
true
08f4e2554a1dd1bca17479a30fb82f12ff23b31d
297
py
Python
meridian/tst/acupoints/test_yinbai32.py
sinotradition/meridian
8c6c1762b204b72346be4bbfb74dedd792ae3024
[ "Apache-2.0" ]
5
2015-12-14T15:14:23.000Z
2022-02-09T10:15:33.000Z
meridian/tst/acupoints/test_yinbai32.py
sinotradition/meridian
8c6c1762b204b72346be4bbfb74dedd792ae3024
[ "Apache-2.0" ]
null
null
null
meridian/tst/acupoints/test_yinbai32.py
sinotradition/meridian
8c6c1762b204b72346be4bbfb74dedd792ae3024
[ "Apache-2.0" ]
3
2015-11-27T05:23:49.000Z
2020-11-28T09:01:56.000Z
#!/usr/bin/python #coding=utf-8 ''' @author: sheng @license: ''' import unittest from meridian.acupoints import yinbai32 class TestYinbai32Functions(unittest.TestCase): def setUp(self): pass def test_xxx(self): pass if __name__ == '__main__': unittest.main()
11.88
47
0.659933
import unittest from meridian.acupoints import yinbai32 class TestYinbai32Functions(unittest.TestCase): def setUp(self): pass def test_xxx(self): pass if __name__ == '__main__': unittest.main()
true
true
08f4e26cad89b1c55434bd0b8270ff98438bc9dc
6,479
py
Python
gammapy/utils/testing.py
contrera/gammapy
aa0a74baa977ee2477b5c63e036075f4219792a3
[ "BSD-3-Clause" ]
null
null
null
gammapy/utils/testing.py
contrera/gammapy
aa0a74baa977ee2477b5c63e036075f4219792a3
[ "BSD-3-Clause" ]
null
null
null
gammapy/utils/testing.py
contrera/gammapy
aa0a74baa977ee2477b5c63e036075f4219792a3
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Utilities for testing""" from __future__ import absolute_import, division, print_function, unicode_literals import sys import os import astropy.units as u from astropy.time import Time from astropy.coordinates import SkyCoord from numpy.testing import a...
27.806867
82
0.650255
from __future__ import absolute_import, division, print_function, unicode_literals import sys import os import astropy.units as u from astropy.time import Time from astropy.coordinates import SkyCoord from numpy.testing import assert_allclose __all__ = [ "requires_dependency", "requires_data", "assert_quan...
true
true
08f4e27f97976bb72ac551cfbce0de1d142b0efd
6,670
py
Python
test_intcode.py
Leftfish/interpreters
3b335524266c10bbcfd542e25974ff88c7d612cf
[ "MIT" ]
null
null
null
test_intcode.py
Leftfish/interpreters
3b335524266c10bbcfd542e25974ff88c7d612cf
[ "MIT" ]
null
null
null
test_intcode.py
Leftfish/interpreters
3b335524266c10bbcfd542e25974ff88c7d612cf
[ "MIT" ]
null
null
null
import pytest import intcode c = intcode.Computer() def test_day2(): code = [1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,6,1,19,1,19,10,23,2,13,23,27,1,5,27,31,2,6,31,35,1,6,35,39,2,39,9,43,1,5,43,47,1,13,47,51,1,10,51,55,2,55,10,59,2,10,59,63,1,9,63,67,2,67,13,71,1,71,6,75,2,6,75,79,1,5,79,83,2,83,9,87,1,6,87,91,2,91,6,95...
49.776119
3,409
0.652924
import pytest import intcode c = intcode.Computer() def test_day2(): code = [1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,6,1,19,1,19,10,23,2,13,23,27,1,5,27,31,2,6,31,35,1,6,35,39,2,39,9,43,1,5,43,47,1,13,47,51,1,10,51,55,2,55,10,59,2,10,59,63,1,9,63,67,2,67,13,71,1,71,6,75,2,6,75,79,1,5,79,83,2,83,9,87,1,6,87,91,2,91,6,95...
true
true
08f4e2b38a65b312a6e3cf12a61835df5fb31105
85,138
py
Python
auth-api/migrations/versions/c10f494d7e10_add_tos_verion_4.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
11
2019-09-26T06:58:25.000Z
2022-01-26T06:19:39.000Z
auth-api/migrations/versions/c10f494d7e10_add_tos_verion_4.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
1,622
2019-05-07T21:08:38.000Z
2022-03-28T17:07:15.000Z
auth-api/migrations/versions/c10f494d7e10_add_tos_verion_4.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
98
2019-03-01T21:36:15.000Z
2021-12-01T22:11:25.000Z
"""add tos verion 4 Revision ID: c10f494d7e10 Revises: aaa29018c0a1 Create Date: 2020-12-24 11:04:39.997395 """ import sqlalchemy as sa from alembic import op from sqlalchemy import Integer, String from sqlalchemy.sql import column, table # revision identifiers, used by Alembic. revision = 'c10f494d7e10' down_revis...
99.576608
794
0.705948
import sqlalchemy as sa from alembic import op from sqlalchemy import Integer, String from sqlalchemy.sql import column, table revision = 'c10f494d7e10' down_revision = 'aaa29018c0a1' branch_labels = None depends_on = None def upgrade(): documents = table('documents', column('version_i...
true
true
08f4e2dc488143384aae50d1594b2b71ec06157e
22,311
py
Python
asyncio_mqtt/client.py
Shikoruma/asyncio-mqtt
4ccf8afb492acfa192c06f28d73c15338ec8a5ce
[ "BSD-3-Clause" ]
null
null
null
asyncio_mqtt/client.py
Shikoruma/asyncio-mqtt
4ccf8afb492acfa192c06f28d73c15338ec8a5ce
[ "BSD-3-Clause" ]
null
null
null
asyncio_mqtt/client.py
Shikoruma/asyncio-mqtt
4ccf8afb492acfa192c06f28d73c15338ec8a5ce
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause import asyncio import logging import socket import ssl from contextlib import contextmanager, suppress from enum import IntEnum from types import TracebackType from typing import ( Any, AsyncGenerator, AsyncIterator, Awaitable, Callable, Dict, Generato...
38.667244
123
0.619246
import asyncio import logging import socket import ssl from contextlib import contextmanager, suppress from enum import IntEnum from types import TracebackType from typing import ( Any, AsyncGenerator, AsyncIterator, Awaitable, Callable, Dict, Generator, Iterator, List, Optional,...
true
true
08f4e2ef43883d14e03ae61f6f949d763e4c8d7d
13,654
py
Python
Tests/test_traceback.py
btddg28/ironpython
8006238c19d08db5db9bada39d765143e631059e
[ "Apache-2.0" ]
null
null
null
Tests/test_traceback.py
btddg28/ironpython
8006238c19d08db5db9bada39d765143e631059e
[ "Apache-2.0" ]
null
null
null
Tests/test_traceback.py
btddg28/ironpython
8006238c19d08db5db9bada39d765143e631059e
[ "Apache-2.0" ]
null
null
null
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
26.107075
187
0.565842
def _raise_exception(): raise Exception() _retb = (18, 0, 'test_traceback.py', '_raise_exception') from iptest.assert_util import * from iptest.file_util import * import imp if not is_cli: import os def _raise_exception_with_finally(): try: raise Exception() finally: pass _rewftb= (27, 0...
true
true
08f4e3649533c564894194c2b175c432632be288
607
py
Python
pengujian/views/pengujian.py
userbaruu/aerotron
f2f2fb7797a75a7a3b3c0eb3836193bc05650c65
[ "MIT" ]
null
null
null
pengujian/views/pengujian.py
userbaruu/aerotron
f2f2fb7797a75a7a3b3c0eb3836193bc05650c65
[ "MIT" ]
null
null
null
pengujian/views/pengujian.py
userbaruu/aerotron
f2f2fb7797a75a7a3b3c0eb3836193bc05650c65
[ "MIT" ]
1
2021-07-28T23:19:27.000Z
2021-07-28T23:19:27.000Z
from django.shortcuts import get_object_or_404 from rest_framework import generics from pengujian.models.pengujian import Pengujian from pengujian.serializers.pengujian import PengujianSerializers from perawatan.models.fasilitas import Fasilitas class DaftarPengujian(generics.ListAPIView): serializer_class = Pen...
33.722222
74
0.807249
from django.shortcuts import get_object_or_404 from rest_framework import generics from pengujian.models.pengujian import Pengujian from pengujian.serializers.pengujian import PengujianSerializers from perawatan.models.fasilitas import Fasilitas class DaftarPengujian(generics.ListAPIView): serializer_class = Pen...
true
true
08f4e5b6311edbaadfe5e93cf9d647e526aa8c33
37,739
py
Python
ParaMol/MM_engines/openmm.py
mnagaku/ParaMol
13529f584e2d50076e038388ecbdd57af23c73b9
[ "MIT" ]
15
2021-03-08T17:56:36.000Z
2022-03-30T01:46:29.000Z
ParaMol/MM_engines/openmm.py
mnagaku/ParaMol
13529f584e2d50076e038388ecbdd57af23c73b9
[ "MIT" ]
7
2021-03-28T05:53:59.000Z
2021-10-15T15:37:56.000Z
ParaMol/MM_engines/openmm.py
mnagaku/ParaMol
13529f584e2d50076e038388ecbdd57af23c73b9
[ "MIT" ]
2
2021-04-30T06:42:09.000Z
2021-06-21T05:49:29.000Z
# -*- coding: utf-8 -*- """ Description ----------- This module defines the :obj:`ParaMol.MM_engines.openmm.OpenMMEngine` class which is the ParaMol wrapper for OpenMM. """ import logging import numpy as np import simtk.unit as unit import simtk.openmm as openmm import simtk.openmm.app as app # ---------------------...
42.934016
294
0.580222
import logging import numpy as np import simtk.unit as unit import simtk.openmm as openmm import simtk.openmm.app as app class OpenMMEngine: force_groups_dict = {'HarmonicBondForce': 0, 'HarmonicAngleForce': 1, 'PeriodicTorsionForce': 2, ...
true
true
08f4e5bbaf6e3cbc3305f375f176cafda0a5bce4
1,922
py
Python
datasetclasses.py
m090009/Advanced_Lane_line_detection
2967e7156e178eea305c205474d5a00887655840
[ "MIT" ]
1
2019-12-19T02:44:11.000Z
2019-12-19T02:44:11.000Z
datasetclasses.py
m090009/Advanced_Lane_line_detection
2967e7156e178eea305c205474d5a00887655840
[ "MIT" ]
null
null
null
datasetclasses.py
m090009/Advanced_Lane_line_detection
2967e7156e178eea305c205474d5a00887655840
[ "MIT" ]
null
null
null
import utils from collections import Counter from sklearn.utils import shuffle from sklearn.model_selection import train_test_split class Dataset: def __init__(self, features, labels): # Splitting the data to 80% training and 20% validation if features: ...
34.321429
98
0.609261
import utils from collections import Counter from sklearn.utils import shuffle from sklearn.model_selection import train_test_split class Dataset: def __init__(self, features, labels): if features: X_train, X_valid, y_train, y_valid = train_test_split(...
true
true
08f4e805d8a5175b37caa83d0905f69916fae53d
1,408
py
Python
WEEKS/CD_Sata-Structures/_MISC/algorithms/dp/min_cost_path.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/algorithms/dp/min_cost_path.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/algorithms/dp/min_cost_path.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
##------------------------------------------------------------------- """ author @goswami-rahul To find minimum cost path from station 0 to station N-1, where cost of moving from ith station to jth station is given as: Matrix of size (N x N) where Matrix[i][j] denotes the cost of moving from station i --> station j ...
23.864407
76
0.535511
INF = float("inf") def min_cost(cost): n = len(cost) dist = [INF] * n dist[0] = 0 for i in range(n): for j in range(i + 1, n): dist[j] = min(dist[j], dist[i] + cost[i][j]) return dist[n - 1] if __name__ == "__main__": cost = [ [0, 15, 80, 90], ...
true
true
08f4e879cb73bde3b62fdd40e61e07a1afae43d9
2,027
py
Python
utils/saver.py
yyywxk/RGTNet
cb53cb5979caac87b10eae4c396e3f7ca3f10e6c
[ "MIT" ]
1
2021-12-15T07:13:49.000Z
2021-12-15T07:13:49.000Z
utils/saver.py
yyywxk/RGTNet
cb53cb5979caac87b10eae4c396e3f7ca3f10e6c
[ "MIT" ]
null
null
null
utils/saver.py
yyywxk/RGTNet
cb53cb5979caac87b10eae4c396e3f7ca3f10e6c
[ "MIT" ]
null
null
null
import os import torch from collections import OrderedDict import glob class Saver(object): def __init__(self, args): self.args = args self.directory = os.path.join('run1', args.dataset, args.checkname) self.runs = sorted(glob.glob(os.path.join(self.directory, 'experiment_*'))) run...
37.537037
95
0.598915
import os import torch from collections import OrderedDict import glob class Saver(object): def __init__(self, args): self.args = args self.directory = os.path.join('run1', args.dataset, args.checkname) self.runs = sorted(glob.glob(os.path.join(self.directory, 'experiment_*'))) run...
true
true
08f4e88ccb8dfb3c18136c933615e1a4d7b458bf
675
py
Python
acmp/postcard_envelope.py
webkadiz/olympiad-problems
620912815904c0f95b91ccd193ca3db0ea20e507
[ "MIT" ]
null
null
null
acmp/postcard_envelope.py
webkadiz/olympiad-problems
620912815904c0f95b91ccd193ca3db0ea20e507
[ "MIT" ]
null
null
null
acmp/postcard_envelope.py
webkadiz/olympiad-problems
620912815904c0f95b91ccd193ca3db0ea20e507
[ "MIT" ]
null
null
null
from math import cos, sin, pi card_w, card_h = map(int, input().split()) env_w, env_h = map(int, input().split()) eps = 1e-10 if card_w == env_h and card_h == env_w: print('Possible') exit() def check_insert(w, h): if w <= env_w + eps and h <= env_h + eps: return True else: ret...
16.463415
45
0.551111
from math import cos, sin, pi card_w, card_h = map(int, input().split()) env_w, env_h = map(int, input().split()) eps = 1e-10 if card_w == env_h and card_h == env_w: print('Possible') exit() def check_insert(w, h): if w <= env_w + eps and h <= env_h + eps: return True else: ret...
true
true
08f4ecb08b9b4b1782ab43c1e55ce9b2331271f3
3,388
py
Python
tests/mdts/lib/rule.py
duarten/midonet
c7a5aa352a8038bdc6a463c68abc47bb411a1e7c
[ "Apache-2.0" ]
1
2015-05-19T08:36:55.000Z
2015-05-19T08:36:55.000Z
tests/mdts/lib/rule.py
duarten/midonet
c7a5aa352a8038bdc6a463c68abc47bb411a1e7c
[ "Apache-2.0" ]
null
null
null
tests/mdts/lib/rule.py
duarten/midonet
c7a5aa352a8038bdc6a463c68abc47bb411a1e7c
[ "Apache-2.0" ]
1
2018-10-25T05:52:05.000Z
2018-10-25T05:52:05.000Z
# Copyright 2014 Midokura SARL # # 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...
29.46087
74
0.610685
from mdts.lib.resource_base import ResourceBase FIELDS = [ 'inv_port_group', 'tp_src', 'dl_src', 'dl_src_mask', 'inv_nw_dst', 'dl_dst', 'dl_dst_mask', 'match_forward_flow', 'inv_tp_src', 'match_return_flow', 'inv_nw_src', 'out_ports', 'nw_dst_length', 'inv_out_...
true
true
08f4edba3ed3df2859b8832f76cbd2b8ecfb3445
354
py
Python
ray/ray-autopilot.py
xzrderek/RayCarla
40872e015cba9e32228061e66e56a42b3aef74c6
[ "Apache-2.0" ]
2
2022-01-18T23:41:27.000Z
2022-02-10T21:58:49.000Z
ray/ray-autopilot.py
xzrderek/RayCarla
40872e015cba9e32228061e66e56a42b3aef74c6
[ "Apache-2.0" ]
null
null
null
ray/ray-autopilot.py
xzrderek/RayCarla
40872e015cba9e32228061e66e56a42b3aef74c6
[ "Apache-2.0" ]
null
null
null
# Ray-autopilot def autopilot_on_ray(): """ Speed up the dataset collection by running simulation and autopilot in Ray. 1. Port oatomobile on Carla latest (0.9.12+) version and Python 3.7. 2. Solve the problem of Ray supporting ABC. 3. Use Ray actor and task to make autopilot simulation parrallel an...
35.4
87
0.706215
def autopilot_on_ray(): pass
true
true
08f4ee7db4ab688e8a6b51c0cf23a8c7e78d0858
175
py
Python
tests/test_timer.py
kamyar/abzar
2bdceef6aceed8cc200ffc42431512523bd49024
[ "Apache-2.0" ]
null
null
null
tests/test_timer.py
kamyar/abzar
2bdceef6aceed8cc200ffc42431512523bd49024
[ "Apache-2.0" ]
null
null
null
tests/test_timer.py
kamyar/abzar
2bdceef6aceed8cc200ffc42431512523bd49024
[ "Apache-2.0" ]
null
null
null
import time from abzar.timer import Timer def test_timer_returns_correct_value(): with Timer() as timer: time.sleep(1) assert 1000 <= timer.total <= 1050
14.583333
39
0.685714
import time from abzar.timer import Timer def test_timer_returns_correct_value(): with Timer() as timer: time.sleep(1) assert 1000 <= timer.total <= 1050
true
true
08f4eec7942a97d87996fe19de0fad69548cba16
5,849
py
Python
web/rootpage.py
kagix/py-learn
6ed7ddd83b2c8285d7ef4a33db8982da4783314b
[ "Apache-2.0" ]
null
null
null
web/rootpage.py
kagix/py-learn
6ed7ddd83b2c8285d7ef4a33db8982da4783314b
[ "Apache-2.0" ]
null
null
null
web/rootpage.py
kagix/py-learn
6ed7ddd83b2c8285d7ef4a33db8982da4783314b
[ "Apache-2.0" ]
null
null
null
from HTMLParser import HTMLParser from htmlentitydefs import name2codepoint from bs4 import BeautifulSoup from xml.dom.minidom import parse, parseString import sys def getVersionFromFile(textlines): theVersion = 0 if theVersion == 0: for text in textlines: # print text if "17.10....
29.245
70
0.439049
from HTMLParser import HTMLParser from htmlentitydefs import name2codepoint from bs4 import BeautifulSoup from xml.dom.minidom import parse, parseString import sys def getVersionFromFile(textlines): theVersion = 0 if theVersion == 0: for text in textlines: if "17.10.2016" in text: ...
false
true
08f4ef087709d07bec084bbe0d94a7caa1632d13
6,285
py
Python
convlab/agent/algorithm/ddq.py
hsvgbkhgbv/ConvLab
aab9e3f91605015d0d6a52e85a53d1d3a92ab137
[ "MIT" ]
null
null
null
convlab/agent/algorithm/ddq.py
hsvgbkhgbv/ConvLab
aab9e3f91605015d0d6a52e85a53d1d3a92ab137
[ "MIT" ]
null
null
null
convlab/agent/algorithm/ddq.py
hsvgbkhgbv/ConvLab
aab9e3f91605015d0d6a52e85a53d1d3a92ab137
[ "MIT" ]
null
null
null
# Modified by Microsoft Corporation. # Licensed under the MIT license. import numpy as np import torch import torch.nn.functional as F from convlab.agent import memory from convlab.agent import net from convlab.agent.algorithm.dqn import DQN from convlab.agent.net import net_util from convlab.lib import logger, util ...
39.28125
167
0.623071
import numpy as np import torch import torch.nn.functional as F from convlab.agent import memory from convlab.agent import net from convlab.agent.algorithm.dqn import DQN from convlab.agent.net import net_util from convlab.lib import logger, util from convlab.lib.decorator import lab_api logger = logger.get_logger(_...
true
true
08f4ef8fefe0278f3a9133fae28a1a6df0f9c402
4,855
py
Python
graphblas/monoid/numpy.py
jim22k/grblas
7c96ddd3cb485f2c98637e7fb96070ff6c48d219
[ "Apache-2.0" ]
4
2020-01-25T00:16:13.000Z
2020-04-23T04:25:13.000Z
graphblas/monoid/numpy.py
jim22k/grblas
7c96ddd3cb485f2c98637e7fb96070ff6c48d219
[ "Apache-2.0" ]
25
2020-03-10T16:28:22.000Z
2020-07-22T02:13:52.000Z
graphblas/monoid/numpy.py
jim22k/grblas
7c96ddd3cb485f2c98637e7fb96070ff6c48d219
[ "Apache-2.0" ]
1
2020-03-13T21:39:50.000Z
2020-03-13T21:39:50.000Z
""" Create UDFs of numpy functions supported by numba. See list of numpy ufuncs supported by numpy here: https://numba.readthedocs.io/en/stable/reference/numpysupported.html#math-operations """ import numpy as _np from .. import _STANDARD_OPERATOR_NAMES from .. import binary as _binary from .. import config as _con...
33.715278
99
0.609887
import numpy as _np from .. import _STANDARD_OPERATOR_NAMES from .. import binary as _binary from .. import config as _config from .. import monoid as _monoid from ..dtypes import _supports_complex _delayed = {} _complex_dtypes = {"FC32", "FC64"} _float_dtypes = {"FP32", "FP64"} _int_dtypes = {"INT8", "UINT8", "INT16...
true
true
08f4efd04265af9ff107959bd6f202f3f7ec8828
4,141
py
Python
Software/src/liv/iotConnectors/devicehive/examples/i2c_gateway.py
nadaol/Weather_Station
5bfb31c2974227fcc8d912e3911f356d4e3fb187
[ "MIT" ]
null
null
null
Software/src/liv/iotConnectors/devicehive/examples/i2c_gateway.py
nadaol/Weather_Station
5bfb31c2974227fcc8d912e3911f356d4e3fb187
[ "MIT" ]
null
null
null
Software/src/liv/iotConnectors/devicehive/examples/i2c_gateway.py
nadaol/Weather_Station
5bfb31c2974227fcc8d912e3911f356d4e3fb187
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- # vim:set et tabstop=4 shiftwidth=4 nu nowrap fileencoding=utf-8: import sys import os import argparse from twisted.python import log from twisted.internet import reactor sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import devicehive ...
47.056818
111
0.49843
import sys import os import argparse from twisted.python import log from twisted.internet import reactor sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import devicehive import devicehive.auto import devicehive.gateway import devicehive.gateway.i2c DEVICE_INFO = ((0x78, ...
true
true
08f4f00e9d04da3fc771d8cd31ee269d840b56da
229
py
Python
Silent_nuker/main.py
poggers1337/Storage-destroyer
fe66b76c7e97c18275918c5f7a64bb1f22a9c93c
[ "MIT" ]
null
null
null
Silent_nuker/main.py
poggers1337/Storage-destroyer
fe66b76c7e97c18275918c5f7a64bb1f22a9c93c
[ "MIT" ]
null
null
null
Silent_nuker/main.py
poggers1337/Storage-destroyer
fe66b76c7e97c18275918c5f7a64bb1f22a9c93c
[ "MIT" ]
null
null
null
import os, time, random, webbrowser from os import system, name from pathlib import Path if os.name == 'nt': downloads_path = str(Path.home() / "Downloads") else: downloads_path = str(os.path.join(Path.home(), "Public"))
28.625
61
0.69869
import os, time, random, webbrowser from os import system, name from pathlib import Path if os.name == 'nt': downloads_path = str(Path.home() / "Downloads") else: downloads_path = str(os.path.join(Path.home(), "Public"))
true
true
08f4f0f64ac3f80c2bae5b7ee60657dc0b60342e
18,843
py
Python
nova/virt/fake.py
larsbutler/nova
fb190f30a911658d8b0c4deaf43cbb8c9e35b672
[ "Apache-2.0" ]
null
null
null
nova/virt/fake.py
larsbutler/nova
fb190f30a911658d8b0c4deaf43cbb8c9e35b672
[ "Apache-2.0" ]
null
null
null
nova/virt/fake.py
larsbutler/nova
fb190f30a911658d8b0c4deaf43cbb8c9e35b672
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
33.057895
79
0.597516
import collections import contextlib from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import versionutils from nova.compute import arch from nova.compute import hv_type from nova.compute import power_state from nova.compute import task_states from nova.compute import vm_m...
true
true
08f4f187eb5c9077ff7439a1eb64a56cd34b5e42
167
py
Python
food_delivery_app/restaurants/apps.py
MahmoudFarid/Food-Delivery-App
8411ca48497e7347fe0258b720c2d2a566bb6e88
[ "MIT" ]
null
null
null
food_delivery_app/restaurants/apps.py
MahmoudFarid/Food-Delivery-App
8411ca48497e7347fe0258b720c2d2a566bb6e88
[ "MIT" ]
null
null
null
food_delivery_app/restaurants/apps.py
MahmoudFarid/Food-Delivery-App
8411ca48497e7347fe0258b720c2d2a566bb6e88
[ "MIT" ]
null
null
null
from django.apps import AppConfig class RestaurantsConfig(AppConfig): name = 'food_delivery_app.restaurants' def ready(self): from . import signals
18.555556
42
0.724551
from django.apps import AppConfig class RestaurantsConfig(AppConfig): name = 'food_delivery_app.restaurants' def ready(self): from . import signals
true
true
08f4f25425781ee1b1a25db072d7681b8235ebbd
418
py
Python
PacMan/venv/Scripts/pip3.5-script.py
akshitgoyal/PacMan
bc68806169f59118ef9f62af3f14d8e82c692bfd
[ "MIT" ]
1
2020-07-21T02:17:58.000Z
2020-07-21T02:17:58.000Z
PacMan/venv/Scripts/pip3.5-script.py
akshitgoyal/PacMan
bc68806169f59118ef9f62af3f14d8e82c692bfd
[ "MIT" ]
null
null
null
PacMan/venv/Scripts/pip3.5-script.py
akshitgoyal/PacMan
bc68806169f59118ef9f62af3f14d8e82c692bfd
[ "MIT" ]
1
2021-07-13T21:21:46.000Z
2021-07-13T21:21:46.000Z
#!C:\Users\Richard\PycharmProjects\PacMan\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3.5' __requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.ar...
32.153846
70
0.669856
__requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('pip==19.0.3', 'console_scripts', 'pip3.5')() )
true
true
08f4f40b727c10cc0934ea5cd76d0c9259fef335
11,400
py
Python
OLD/ReformaterRapportTeams.py
HubTou/tala
917b15f4951252372354516e6b73df536b13bb80
[ "BSD-3-Clause" ]
null
null
null
OLD/ReformaterRapportTeams.py
HubTou/tala
917b15f4951252372354516e6b73df536b13bb80
[ "BSD-3-Clause" ]
null
null
null
OLD/ReformaterRapportTeams.py
HubTou/tala
917b15f4951252372354516e6b73df536b13bb80
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ ReformaterRapportTeams - convertir un fichier CSV de rapport Teams en informations utiles et lisibles Licence: BSD 3 clauses (see https://opensource.org/licenses/BSD-3-Clause) Auteur: Hubert Tournier """ import csv import getopt import logging import os import re import signal import sys # ...
39.86014
150
0.447807
import csv import getopt import logging import os import re import signal import sys ID = "@(#) $Id: ReformaterRapportTeams v1.0.1 (5 Février 2022) par Hubert Tournier $" parametres = { "Lister participants": True, "Afficher contenu": False, } def _initialisation_journalisation(nom_programme): format_j...
true
true
08f4f41acfe4352da0e0fbbc7cafb23c16e101bd
1,808
py
Python
fsf-server/modules/EXTRACT_UPX.py
akniffe1/fsf
15303aa298414397f9aa5d19ca343040a0fe0bbd
[ "Apache-2.0" ]
259
2015-08-06T13:10:11.000Z
2022-03-19T19:43:00.000Z
fsf-server/modules/EXTRACT_UPX.py
akniffe1/fsf
15303aa298414397f9aa5d19ca343040a0fe0bbd
[ "Apache-2.0" ]
46
2015-08-13T10:58:11.000Z
2021-09-14T13:19:42.000Z
fsf-server/modules/EXTRACT_UPX.py
akniffe1/fsf
15303aa298414397f9aa5d19ca343040a0fe0bbd
[ "Apache-2.0" ]
58
2015-08-06T16:00:40.000Z
2021-07-27T08:29:22.000Z
#!/usr/bin/env python # # Author: Jason Batchelor # Description: Unpack UPX packed binaries # Date: 8/28/2015 ''' Copyright 2015 Emerson Electric Co. 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 ...
29.639344
81
0.670907
''' Copyright 2015 Emerson Electric Co. 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...
false
true
08f4f42e7e9cd2b8fb7b31f2b77ffe009f039c8e
6,130
py
Python
google/net/proto2/python/internal/wire_format.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
26
2015-01-20T08:02:38.000Z
2020-06-10T04:57:41.000Z
google/net/proto2/python/internal/wire_format.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
53
2016-04-06T21:10:43.000Z
2018-03-19T23:14:33.000Z
google/net/proto2/python/internal/wire_format.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
23
2016-04-19T05:45:26.000Z
2021-12-31T23:22:36.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
23.667954
77
0.740457
import struct from google.net.proto2.python.public import descriptor from google.net.proto2.python.public import message TAG_TYPE_BITS = 3 TAG_TYPE_MASK = (1 << TAG_TYPE_BITS) - 1 WIRETYPE_VARINT = 0 WIRETYPE_FIXED64 = 1 WIRETYPE_LENGTH_DELIMITED = 2 WIRETYPE_START_GROUP = 3 WIRETYPE_END_GROUP = 4 WIRETYP...
true
true
08f4f4981675fbb41dba592fb422cc2862139f12
5,381
py
Python
neurokernel/LPU/NDComponents/SynapseModels/BaseSynapseModel.py
yiyin/neurodriver
34e6874a1cf35633cda1191920cbaeac5d25dc9b
[ "BSD-3-Clause" ]
null
null
null
neurokernel/LPU/NDComponents/SynapseModels/BaseSynapseModel.py
yiyin/neurodriver
34e6874a1cf35633cda1191920cbaeac5d25dc9b
[ "BSD-3-Clause" ]
null
null
null
neurokernel/LPU/NDComponents/SynapseModels/BaseSynapseModel.py
yiyin/neurodriver
34e6874a1cf35633cda1191920cbaeac5d25dc9b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from collections import OrderedDict import numpy as np import pycuda.gpuarray as garray from pycuda.tools import dtype_to_ctype import pycuda.driver as cuda from pycuda.compiler import SourceModule from abc import ABCMeta, abstractmethod, abstractproperty from future.utils import with_metaclas...
38.435714
90
0.589296
from collections import OrderedDict import numpy as np import pycuda.gpuarray as garray from pycuda.tools import dtype_to_ctype import pycuda.driver as cuda from pycuda.compiler import SourceModule from abc import ABCMeta, abstractmethod, abstractproperty from future.utils import with_metaclass from neurokernel.LP...
true
true
08f4f4faf6407d488adb328a74843a33c341b2d7
202
py
Python
utils/loss/__init__.py
aasseman/mi-prometheus
c655c88cc6aec4d0724c19ea95209f1c2dd6770d
[ "Apache-2.0" ]
null
null
null
utils/loss/__init__.py
aasseman/mi-prometheus
c655c88cc6aec4d0724c19ea95209f1c2dd6770d
[ "Apache-2.0" ]
null
null
null
utils/loss/__init__.py
aasseman/mi-prometheus
c655c88cc6aec4d0724c19ea95209f1c2dd6770d
[ "Apache-2.0" ]
null
null
null
from .masked_cross_entropy_loss import MaskedCrossEntropyLoss from .masked_bce_with_logits_loss import MaskedBCEWithLogitsLoss __all__ = [ 'MaskedCrossEntropyLoss', 'MaskedBCEWithLogitsLoss']
25.25
64
0.836634
from .masked_cross_entropy_loss import MaskedCrossEntropyLoss from .masked_bce_with_logits_loss import MaskedBCEWithLogitsLoss __all__ = [ 'MaskedCrossEntropyLoss', 'MaskedBCEWithLogitsLoss']
true
true
08f4f5454f41217592c02e9910cace7778fd673c
5,099
py
Python
djangocms_oembed/models.py
MatthewWilkes/djangocms-oembed
168436cb2496def1bf64605dde5ce253769d3822
[ "BSD-3-Clause" ]
null
null
null
djangocms_oembed/models.py
MatthewWilkes/djangocms-oembed
168436cb2496def1bf64605dde5ce253769d3822
[ "BSD-3-Clause" ]
null
null
null
djangocms_oembed/models.py
MatthewWilkes/djangocms-oembed
168436cb2496def1bf64605dde5ce253769d3822
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from cms.models import CMSPlugin import urllib import urlparse from django.core.exceptions import ValidationError from django.db import models from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from micawber.exceptions import ProviderNotFoundExc...
39.835938
139
0.604236
from cms.models import CMSPlugin import urllib import urlparse from django.core.exceptions import ValidationError from django.db import models from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from micawber.exceptions import ProviderNotFoundException, ProviderExceptio...
false
true
08f4f5ccaeaea0eb0ac5357296c161ae69bfb446
269
py
Python
DEM_te.py
enigeer1/show12
9cf6b9949c35bd2e3a8bbbb2126af813a61c9a54
[ "Apache-2.0" ]
null
null
null
DEM_te.py
enigeer1/show12
9cf6b9949c35bd2e3a8bbbb2126af813a61c9a54
[ "Apache-2.0" ]
null
null
null
DEM_te.py
enigeer1/show12
9cf6b9949c35bd2e3a8bbbb2126af813a61c9a54
[ "Apache-2.0" ]
null
null
null
# --coding--:utf-8 -- import cv2 img = cv2.imread('xin1.jpg', cv2.IMREAD_COLOR) # print(img) # cv2.imshow('image', img) # K = cv2.waitKey(0) with open('xin1.jpg', 'rb') as file: f = file.readline() print(type(f)) s = str(f, encoding='unicode') print(s)
22.416667
46
0.60223
import cv2 img = cv2.imread('xin1.jpg', cv2.IMREAD_COLOR) with open('xin1.jpg', 'rb') as file: f = file.readline() print(type(f)) s = str(f, encoding='unicode') print(s)
true
true
08f4f6bdc2c76fb4885de936420aa46d24882a6a
3,964
py
Python
tests/test_set2.py
RmStorm/cryptopals_challenge_roald
94808e309d2ecd03faa02eb076dc133c1a32f472
[ "MIT" ]
null
null
null
tests/test_set2.py
RmStorm/cryptopals_challenge_roald
94808e309d2ecd03faa02eb076dc133c1a32f472
[ "MIT" ]
null
null
null
tests/test_set2.py
RmStorm/cryptopals_challenge_roald
94808e309d2ecd03faa02eb076dc133c1a32f472
[ "MIT" ]
null
null
null
import os import base64 import pytest from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend from cryptopals_challenge_roald.crypto_lib import AesEcbCipher, AesCbcCipher, crack_ecb_encryptor, \ apply_pkcs_7_padding, verify_and_remove_p...
41.291667
118
0.761352
import os import base64 import pytest from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend from cryptopals_challenge_roald.crypto_lib import AesEcbCipher, AesCbcCipher, crack_ecb_encryptor, \ apply_pkcs_7_padding, verify_and_remove_p...
true
true
08f4f6c692c97c7120b5db74eaa72d09381772bc
2,540
py
Python
test/functional/mempool_limit.py
ESIRInvestments/ESIRInvestments
f457e4bf68f2749e061ee2b9dd20bc3d7aa62944
[ "MIT" ]
null
null
null
test/functional/mempool_limit.py
ESIRInvestments/ESIRInvestments
f457e4bf68f2749e061ee2b9dd20bc3d7aa62944
[ "MIT" ]
null
null
null
test/functional/mempool_limit.py
ESIRInvestments/ESIRInvestments
f457e4bf68f2749e061ee2b9dd20bc3d7aa62944
[ "MIT" ]
null
null
null
#!/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. """Test mempool limiting together/eviction with the wallet.""" from test_framework.test_framework import ...
46.181818
118
0.676378
from test_framework.test_framework import earn_save_invest_repeatTestFramework from test_framework.util import * class MempoolLimitTest(earn_save_invest_repeatTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [["-maxmempool=5", "-...
true
true
08f4f8169944158ea6750720bd74f1c7ad1ffab1
1,993
py
Python
src/dispatch/database/core.py
BuildJet/dispatch
d9fcaabefecfb24bbf3bbed1ed942084b7bdbea2
[ "Apache-2.0" ]
null
null
null
src/dispatch/database/core.py
BuildJet/dispatch
d9fcaabefecfb24bbf3bbed1ed942084b7bdbea2
[ "Apache-2.0" ]
null
null
null
src/dispatch/database/core.py
BuildJet/dispatch
d9fcaabefecfb24bbf3bbed1ed942084b7bdbea2
[ "Apache-2.0" ]
null
null
null
import re import functools from typing import Any from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base, declared_attr from sqlalchemy.orm import sessionmaker from sqlalchemy_searchable import make_searchable from starlette.requests import Request from dispatch.config import SQL...
29.746269
91
0.743101
import re import functools from typing import Any from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base, declared_attr from sqlalchemy.orm import sessionmaker from sqlalchemy_searchable import make_searchable from starlette.requests import Request from dispatch.config import SQL...
true
true
08f4f828fd6cb3526f913f45be6498abf45cdcb5
7,611
py
Python
skimage/segmentation/slic_superpixels.py
RobbiNespu/scikit-image
a65b8af4bf0f5f71624a91ea5ce7812e80cae4cb
[ "BSD-3-Clause" ]
8
2016-03-11T13:23:51.000Z
2021-12-19T10:43:26.000Z
skimage/segmentation/slic_superpixels.py
RobbiNespu/scikit-image
a65b8af4bf0f5f71624a91ea5ce7812e80cae4cb
[ "BSD-3-Clause" ]
5
2021-03-19T08:36:48.000Z
2022-01-13T01:52:34.000Z
skimage/segmentation/slic_superpixels.py
RobbiNespu/scikit-image
a65b8af4bf0f5f71624a91ea5ce7812e80cae4cb
[ "BSD-3-Clause" ]
4
2020-06-19T00:04:34.000Z
2021-02-23T07:24:00.000Z
# coding=utf-8 import collections as coll import numpy as np from scipy import ndimage import warnings from ..util import img_as_float, regular_grid from ..segmentation._slic import (_slic_cython, _enforce_label_connectivity_cython) from ..color import rgb2lab def slic(image, n_seg...
40.057895
79
0.639075
import collections as coll import numpy as np from scipy import ndimage import warnings from ..util import img_as_float, regular_grid from ..segmentation._slic import (_slic_cython, _enforce_label_connectivity_cython) from ..color import rgb2lab def slic(image, n_segments=100, comp...
true
true
08f4f8f273ccb672c6c9c8b5b7d5c18eb4c27cf8
2,296
py
Python
tests/main_test.py
schriftgestalt/glyphsLib
cf19d1e52725ac8ab463d9122cfa1e6174cc4e08
[ "Apache-2.0" ]
null
null
null
tests/main_test.py
schriftgestalt/glyphsLib
cf19d1e52725ac8ab463d9122cfa1e6174cc4e08
[ "Apache-2.0" ]
null
null
null
tests/main_test.py
schriftgestalt/glyphsLib
cf19d1e52725ac8ab463d9122cfa1e6174cc4e08
[ "Apache-2.0" ]
null
null
null
# coding=UTF-8 # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
32.8
88
0.70122
from __future__ import print_function, division, absolute_import, unicode_literals import os import glob import glyphsLib.cli import glyphsLib.parser def test_glyphs_main_masters(tmpdir): import fontTools.designspaceLib filename = os.path.join(os.path.dirname(__file__), "data/GlyphsUnitTestSans.glyphs") ...
true
true
08f4fa05bbd3e3adf03936201e78f87236645926
1,001
py
Python
torsiondrive/priority_queue.py
dotsdl/torsiondrive
b6b9530801bdd20f2c8b52051d1ffb1453080e04
[ "MIT" ]
15
2018-10-11T13:08:57.000Z
2022-03-16T03:25:20.000Z
torsiondrive/priority_queue.py
dotsdl/torsiondrive
b6b9530801bdd20f2c8b52051d1ffb1453080e04
[ "MIT" ]
47
2018-08-28T06:13:11.000Z
2022-01-30T20:35:15.000Z
torsiondrive/priority_queue.py
dotsdl/torsiondrive
b6b9530801bdd20f2c8b52051d1ffb1453080e04
[ "MIT" ]
12
2019-02-01T23:38:27.000Z
2022-03-18T11:54:26.000Z
#!/usr/bin/env python import itertools from heapq import heappush, heappop class PriorityQueue(object): def __len__(self): return len(self._pq) def __iter__(self): return iter(task for priority, count, task in self._pq) def __init__(self): self._pq = [] self.counter = i...
25.025
78
0.593407
import itertools from heapq import heappush, heappop class PriorityQueue(object): def __len__(self): return len(self._pq) def __iter__(self): return iter(task for priority, count, task in self._pq) def __init__(self): self._pq = [] self.counter = itertools.count() ...
true
true
08f4fb14f5ba82dfa0e6c71e70a56e0b20774017
4,178
py
Python
tests/unit/scheduler_test.py
testandconquer/pytest-conquer
da600c7f5bcd06aa62c5cca9b75370bf1a6ebf05
[ "MIT" ]
null
null
null
tests/unit/scheduler_test.py
testandconquer/pytest-conquer
da600c7f5bcd06aa62c5cca9b75370bf1a6ebf05
[ "MIT" ]
5
2018-12-27T02:52:01.000Z
2019-01-02T01:52:55.000Z
tests/unit/scheduler_test.py
testandconquer/pytest-conquer
da600c7f5bcd06aa62c5cca9b75370bf1a6ebf05
[ "MIT" ]
null
null
null
from datetime import datetime import pytest from testandconquer.client import MessageType from testandconquer.model import Location, Report, Schedule, SuiteItem from testandconquer.scheduler import Scheduler from unittest import mock from tests.mock.client import MockClient from tests.mock.settings import MockSettin...
29.013889
110
0.624222
from datetime import datetime import pytest from testandconquer.client import MessageType from testandconquer.model import Location, Report, Schedule, SuiteItem from testandconquer.scheduler import Scheduler from unittest import mock from tests.mock.client import MockClient from tests.mock.settings import MockSettin...
true
true
08f4fbacd1cda7a33e2cee70785ee0dc88d7f68f
931
py
Python
streams/ckan_pages/migrations/0009_featuredetailpage.py
Engerrs/ckan.org
a5a9b63b0ca16cb5aa4f709f7a264b8f6c265158
[ "BSD-3-Clause" ]
1
2022-03-18T03:20:00.000Z
2022-03-18T03:20:00.000Z
streams/ckan_pages/migrations/0009_featuredetailpage.py
Engerrs/ckan.org
a5a9b63b0ca16cb5aa4f709f7a264b8f6c265158
[ "BSD-3-Clause" ]
26
2021-07-07T08:42:42.000Z
2022-03-29T14:34:59.000Z
streams/ckan_pages/migrations/0009_featuredetailpage.py
Engerrs/ckan.org
a5a9b63b0ca16cb5aa4f709f7a264b8f6c265158
[ "BSD-3-Clause" ]
3
2021-07-07T22:11:03.000Z
2021-09-15T18:19:10.000Z
# Generated by Django 3.1.1 on 2020-09-29 14:05 from django.db import migrations, models import django.db.models.deletion import wagtail.core.blocks import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0052_pagelogentry'), ('ckan_pages', '0008_ckanf...
32.103448
191
0.622986
from django.db import migrations, models import django.db.models.deletion import wagtail.core.blocks import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0052_pagelogentry'), ('ckan_pages', '0008_ckanforpage_page_title'), ] operations = [ ...
true
true
08f4fbb76630bea01c9ad365dfcacfe510b1de13
4,306
py
Python
scripts/tdep_read_outcar.py
flokno/tools.tdep
7f8fd4e50f6c1cb94780133a157c695a40fd80c9
[ "0BSD" ]
4
2021-08-31T12:34:18.000Z
2022-01-27T09:50:51.000Z
scripts/tdep_read_outcar.py
flokno/tools.tdep
7f8fd4e50f6c1cb94780133a157c695a40fd80c9
[ "0BSD" ]
null
null
null
scripts/tdep_read_outcar.py
flokno/tools.tdep
7f8fd4e50f6c1cb94780133a157c695a40fd80c9
[ "0BSD" ]
null
null
null
#! /usr/bin/env python from dataclasses import dataclass from pathlib import Path import numpy as np import typer born_match = "BORN EFFECTIVE CHARGES (including local field effects)" natoms_match = "number of ions" stress_match = "FORCE on cell =-STRESS in cart. coord. units (eV):" forces_match = "TOTAL-FORCE (eV/A...
34.448
88
0.530655
from dataclasses import dataclass from pathlib import Path import numpy as np import typer born_match = "BORN EFFECTIVE CHARGES (including local field effects)" natoms_match = "number of ions" stress_match = "FORCE on cell =-STRESS in cart. coord. units (eV):" forces_match = "TOTAL-FORCE (eV/Angst)" timing_match = "...
true
true
08f4fbe2f400af248ceab77edfb0945c866ad897
2,357
py
Python
setup.py
Khan/rbtools
38007690b7cddff7ba01fad9cfd8f22413ea9b20
[ "MIT" ]
1
2019-08-14T21:16:15.000Z
2019-08-14T21:16:15.000Z
setup.py
holdenk/rbtools
652a160d07c0f94ed84f63be2bf25ac6a2eb20a8
[ "MIT" ]
null
null
null
setup.py
holdenk/rbtools
652a160d07c0f94ed84f63be2bf25ac6a2eb20a8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # setup.py -- Installation for rbtools. # # Copyright (C) 2009 Christian Hammond # Copyright (C) 2009 David Trowbridge # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; e...
30.217949
77
0.682647
from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from setuptools.command.test import test from rbtools import get_package_version, is_release, VERSION PACKAGE_NAME = 'RBTools' if is_release(): download_url = "http://downloads.reviewboard.org/releases/%s/%s.%s/" ...
true
true
08f4fc0e8652537b8fdc0d1faa8bd73db7260f1c
3,448
py
Python
docs/tools/plot_pr.py
axelande/scikit-fuzzy
d9bac7a53d8e64f69f71b0fb4da2c8921b6aa7d0
[ "BSD-3-Clause" ]
5
2015-09-10T17:34:29.000Z
2021-08-14T14:31:00.000Z
docs/tools/plot_pr.py
axelande/scikit-fuzzy
d9bac7a53d8e64f69f71b0fb4da2c8921b6aa7d0
[ "BSD-3-Clause" ]
1
2021-01-11T06:18:38.000Z
2021-01-11T06:18:38.000Z
docs/tools/plot_pr.py
axelande/scikit-fuzzy
d9bac7a53d8e64f69f71b0fb4da2c8921b6aa7d0
[ "BSD-3-Clause" ]
15
2015-04-05T03:34:00.000Z
2022-01-22T14:04:32.000Z
import urllib import json import copy from collections import OrderedDict import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter import dateutil.parser from dateutil.relativedelta import relativedelta from datetime import datetime, timedelta cache = '_pr_cache.txt' # Obtain release dates using,...
25.731343
79
0.62645
import urllib import json import copy from collections import OrderedDict import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter import dateutil.parser from dateutil.relativedelta import relativedelta from datetime import datetime, timedelta cache = '_pr_cache.txt' releases = OrderedDict([ ...
true
true
08f4fccc9443a7376b1d936d904eea9c0b8d423e
585
py
Python
Gamefile/EasyCom.py
bepp-boop/old_dice_game
54456dfdfcc2e668aa2e0d62261b6140bf00ff3f
[ "MIT" ]
null
null
null
Gamefile/EasyCom.py
bepp-boop/old_dice_game
54456dfdfcc2e668aa2e0d62261b6140bf00ff3f
[ "MIT" ]
null
null
null
Gamefile/EasyCom.py
bepp-boop/old_dice_game
54456dfdfcc2e668aa2e0d62261b6140bf00ff3f
[ "MIT" ]
null
null
null
""" This is the easy computer class, which extends the player class """ import random from Player import P_Player class EasyComputerPlayer(P_Player): def __init__(self, name): """initializes easy computer class""" super(EasyComputerPlayer,self).__init__(name) def roll_again(self,cage):...
29.25
71
0.632479
import random from Player import P_Player class EasyComputerPlayer(P_Player): def __init__(self, name): super(EasyComputerPlayer,self).__init__(name) def roll_again(self,cage): while cage.value < (10 + random.randint(2,20)): print( "Role again") return ...
true
true
08f4fd301360ac57144992d7dc7a54672e883658
3,591
py
Python
sel_dedicated_codegen/models/ip_release_model.py
xRocketPowerx/python-sel-dedicated
3b9b41fbd7abc05d427e8abf688b007b6dcf9e96
[ "MIT" ]
2
2019-10-12T08:56:31.000Z
2019-10-12T17:34:51.000Z
sel_dedicated_codegen/models/ip_release_model.py
xRocketPowerx/python-sel-dedicated
3b9b41fbd7abc05d427e8abf688b007b6dcf9e96
[ "MIT" ]
null
null
null
sel_dedicated_codegen/models/ip_release_model.py
xRocketPowerx/python-sel-dedicated
3b9b41fbd7abc05d427e8abf688b007b6dcf9e96
[ "MIT" ]
null
null
null
# coding: utf-8 """ Seido User REST API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 2.4.8 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import ...
30.432203
125
0.589251
import pprint import re import six class IpReleaseModel(object): openapi_types = { 'resource_uuid': 'str' } attribute_map = { 'resource_uuid': 'resource_uuid' } def __init__(self, resource_uuid=None): self._resource_uuid = None self.discriminator = None ...
true
true
08f4fdf281b321b3d2c25d5198e81d855599df86
7,588
py
Python
Intro_to_Machine_Learning/ENV/lib/python2.7/site-packages/sklearn/linear_model/tests/test_huber.py
workingyifei/DAND
23980f8121dffee4201101fbc02ec653b6783b90
[ "MIT" ]
18
2018-02-23T11:28:54.000Z
2021-09-23T08:19:54.000Z
sklearn/linear_model/tests/test_huber.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
19
2020-01-28T21:41:50.000Z
2022-03-11T23:17:39.000Z
sklearn/linear_model/tests/test_huber.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
5
2019-03-12T14:24:18.000Z
2021-06-23T13:42:58.000Z
# Authors: Manoj Kumar mks542@nyu.edu # License: BSD 3 clause import numpy as np from scipy import optimize, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_a...
38.714286
81
0.70941
import numpy as np from scipy import optimize, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_greater f...
true
true
08f4ff95369637477aa6db58a32cbe03c4a610ee
1,133
py
Python
scipy/optimize/tests/test_regression.py
rostyboost/scipy
2f5aa264724099c03772ed784e7a947d2bea8398
[ "BSD-3-Clause" ]
null
null
null
scipy/optimize/tests/test_regression.py
rostyboost/scipy
2f5aa264724099c03772ed784e7a947d2bea8398
[ "BSD-3-Clause" ]
null
null
null
scipy/optimize/tests/test_regression.py
rostyboost/scipy
2f5aa264724099c03772ed784e7a947d2bea8398
[ "BSD-3-Clause" ]
1
2021-09-17T03:51:02.000Z
2021-09-17T03:51:02.000Z
"""Regression tests for optimize. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_almost_equal, \ assert_raises import scipy.optimize class TestRegression(object): def test_newton_x0_is_0(self): # Regression test for gh-1...
26.348837
64
0.563107
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_almost_equal, \ assert_raises import scipy.optimize class TestRegression(object): def test_newton_x0_is_0(self): tgt = 1 res = scipy.optimize.newton(lambda x: x -...
true
true
08f500321c97747058ecf370798a0b1a70ada6a7
265
py
Python
make_list.py
ddboline/movie_collection_app
92211939714243ca9cfba1dfec24529b3c60d935
[ "MIT" ]
null
null
null
make_list.py
ddboline/movie_collection_app
92211939714243ca9cfba1dfec24529b3c60d935
[ "MIT" ]
null
null
null
make_list.py
ddboline/movie_collection_app
92211939714243ca9cfba1dfec24529b3c60d935
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- """ manage collection """ from __future__ import (absolute_import, division, print_function, unicode_literals) from movie_collection_app.make_list import make_list_main if __name__ == '__main__': make_list_main()
29.444444
84
0.750943
from __future__ import (absolute_import, division, print_function, unicode_literals) from movie_collection_app.make_list import make_list_main if __name__ == '__main__': make_list_main()
true
true
08f500600554bf5e1b1189997245e341b6d4fdaf
8,561
py
Python
alma-dspace-synchronizer.py
UKUK-Repository-Dept/alma-dspace-synchronizator
d890b3256a0ace2d5e28b37d477aba2e4c78b7ce
[ "MIT" ]
null
null
null
alma-dspace-synchronizer.py
UKUK-Repository-Dept/alma-dspace-synchronizator
d890b3256a0ace2d5e28b37d477aba2e4c78b7ce
[ "MIT" ]
null
null
null
alma-dspace-synchronizer.py
UKUK-Repository-Dept/alma-dspace-synchronizator
d890b3256a0ace2d5e28b37d477aba2e4c78b7ce
[ "MIT" ]
null
null
null
# #!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set syntax=python: ######################### # (c) JR, 2022 # ######################### from __future__ import annotations import argparse from lib2to3.pgen2.token import LBRACE import dspace_api as ds_api import dspace_solr as ds_solr import logging impor...
34.800813
139
0.642682
from __future__ import annotations import argparse from lib2to3.pgen2.token import LBRACE import dspace_api as ds_api import dspace_solr as ds_solr import logging import logging.config import twisted.logger import os from twisted.internet import reactor from twisted.internet import task from twisted.python import log ...
true
true
08f502263d1370ad3a6f75c265a20b500da47574
4,080
py
Python
status.py
chubbypanda/service-status-geckoboard
8f31348ac3563d5b5413de13307a5359861fbb1d
[ "MIT" ]
null
null
null
status.py
chubbypanda/service-status-geckoboard
8f31348ac3563d5b5413de13307a5359861fbb1d
[ "MIT" ]
null
null
null
status.py
chubbypanda/service-status-geckoboard
8f31348ac3563d5b5413de13307a5359861fbb1d
[ "MIT" ]
null
null
null
# assingement for Geckoboard's Support Engineer Coding Challenge, by k., 2016/10/14 # https://gist.github.com/luise64/931fcded2801c27f7d3d5b6792815444 import requests import time from threading import Timer # GitHub API details from https://status.github.com/api github_api = 'https://status.github.com/api/status.jso...
36.756757
110
0.627941
# https://gist.github.com/luise64/931fcded2801c27f7d3d5b6792815444 import requests import time from threading import Timer # GitHub API details from https://status.github.com/api github_api = 'https://status.github.com/api/status.json' # Twilio API details at https://status.twilio.com/api twilio_api = 'https://gpkpy...
false
true
08f5028f08d7fa343d8d4978b8264ff2fa520ce2
1,584
py
Python
tests/dsl/test_simple_dag_list.py
shanioren/argo-workflow-tools
d2fb41de3f5ccf9284ff4cb027a886ff61a13e69
[ "Apache-2.0" ]
15
2021-12-08T20:57:52.000Z
2022-03-23T19:41:29.000Z
tests/dsl/test_simple_dag_list.py
shanioren/argo-workflow-tools
d2fb41de3f5ccf9284ff4cb027a886ff61a13e69
[ "Apache-2.0" ]
18
2021-12-07T07:49:17.000Z
2022-03-02T10:27:49.000Z
tests/dsl/test_simple_dag_list.py
shanioren/argo-workflow-tools
d2fb41de3f5ccf9284ff4cb027a886ff61a13e69
[ "Apache-2.0" ]
3
2022-01-09T08:19:11.000Z
2022-02-09T15:20:08.000Z
from typing import List import pytest import yaml from argo_workflow_tools import dsl, Workflow @dsl.Task(image="python:3.10") def say_hello(name: list): message = f"hello {name}" return message @dsl.DAG() def command_hello(name): message = say_hello(name) return message @dsl.Task(image="python:...
24
82
0.698864
from typing import List import pytest import yaml from argo_workflow_tools import dsl, Workflow @dsl.Task(image="python:3.10") def say_hello(name: list): message = f"hello {name}" return message @dsl.DAG() def command_hello(name): message = say_hello(name) return message @dsl.Task(image="python:...
true
true
08f5033c7719a61b89992a75b69932aa380d30ec
411
py
Python
stage05-artist1/s1level24.py
xenomorff/code-dot-org-python
7b35999dc35fa9ca13c683f43eca631dc92e5da4
[ "Unlicense" ]
null
null
null
stage05-artist1/s1level24.py
xenomorff/code-dot-org-python
7b35999dc35fa9ca13c683f43eca631dc92e5da4
[ "Unlicense" ]
null
null
null
stage05-artist1/s1level24.py
xenomorff/code-dot-org-python
7b35999dc35fa9ca13c683f43eca631dc92e5da4
[ "Unlicense" ]
null
null
null
"""Stage 5: Puzzle 1 of 10 Hi meet the artist. You can write code to make the artist draw almost anything. Run this code to see the goal. Then add a few lines of code to make the artist draw over the grey lines of the goal. """ import sys sys.path.append('..') import codestudio artist = codestudio.load('s1level24') ...
19.571429
79
0.739659
import sys sys.path.append('..') import codestudio artist = codestudio.load('s1level24') a = artist artist.move_forward(100) a.turn_right(90) a.move_forward(100) artist.check()
true
true
08f504b6b4ca11134c68df5c09194632c2a86d65
2,658
py
Python
skdecide/hub/solver/meta_policy/meta_policies.py
emilienDespres/scikit-decide
2a3dd2d93e5e6d07984e1bc02b6e969261aeefbc
[ "MIT" ]
27
2020-11-23T11:45:31.000Z
2022-03-22T08:08:00.000Z
skdecide/hub/solver/meta_policy/meta_policies.py
emilienDespres/scikit-decide
2a3dd2d93e5e6d07984e1bc02b6e969261aeefbc
[ "MIT" ]
94
2021-02-24T09:50:23.000Z
2022-02-27T10:07:15.000Z
skdecide/hub/solver/meta_policy/meta_policies.py
emilienDespres/scikit-decide
2a3dd2d93e5e6d07984e1bc02b6e969261aeefbc
[ "MIT" ]
12
2020-12-08T10:38:26.000Z
2021-10-01T09:17:04.000Z
# Copyright (c) AIRBUS and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from typing import Any, Dict from skdecide import rollout_episode from skdecide.builders.domain.scheduling.scheduli...
36.916667
86
0.60158
from __future__ import annotations from typing import Any, Dict from skdecide import rollout_episode from skdecide.builders.domain.scheduling.scheduling_domains import D, SchedulingDomain from skdecide.builders.solver import DeterministicPolicies class MetaPolicy(DeterministicPolicies): T_domain = D def _...
true
true
08f504c5838f5bda6a4e9e1c3f3b513e269a9d24
16,628
py
Python
people/datasets/human36m.py
dluvizon/3d-pose-consensus
7a829d5713d2c45c6b265c9886add0b69e0050a8
[ "MIT" ]
5
2020-05-11T14:18:12.000Z
2022-03-10T12:10:17.000Z
people/datasets/human36m.py
dluvizon/3d-pose-consensus
7a829d5713d2c45c6b265c9886add0b69e0050a8
[ "MIT" ]
null
null
null
people/datasets/human36m.py
dluvizon/3d-pose-consensus
7a829d5713d2c45c6b265c9886add0b69e0050a8
[ "MIT" ]
null
null
null
import os import json import numpy as np import scipy.io as sio from PIL import Image from .generic import GenericDataset from .generic import project_gt_poses_to_anchors from .generic import compute_anchors_reference from .generic import compute_window_reference from ..utils import * ACTION_LABELS = None ZBOUND = n...
34.641667
80
0.582151
import os import json import numpy as np import scipy.io as sio from PIL import Image from .generic import GenericDataset from .generic import project_gt_poses_to_anchors from .generic import compute_anchors_reference from .generic import compute_window_reference from ..utils import * ACTION_LABELS = None ZBOUND = n...
true
true
08f504d7cc9ac37a551e83c8d7466c767a06186a
48
py
Python
gunicorn.conf.py
henry32144/simpoll
cdaa1b1d0c584364394b0be61ee9b67364d7da09
[ "MIT" ]
null
null
null
gunicorn.conf.py
henry32144/simpoll
cdaa1b1d0c584364394b0be61ee9b67364d7da09
[ "MIT" ]
null
null
null
gunicorn.conf.py
henry32144/simpoll
cdaa1b1d0c584364394b0be61ee9b67364d7da09
[ "MIT" ]
null
null
null
workers = 5 worker_class = "gevent" timeout = 15
16
23
0.729167
workers = 5 worker_class = "gevent" timeout = 15
true
true
08f506451f203065f1d6f67e83af388d1938cb39
1,140
py
Python
torchtext/datasets/dbpedia.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
3,172
2017-01-18T19:47:03.000Z
2022-03-27T17:06:03.000Z
torchtext/datasets/dbpedia.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
1,228
2017-01-18T20:09:16.000Z
2022-03-31T04:42:35.000Z
torchtext/datasets/dbpedia.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
850
2017-01-19T03:19:54.000Z
2022-03-29T15:29:52.000Z
from torchtext.utils import ( download_from_url, extract_archive, ) from torchtext.data.datasets_utils import ( _RawTextIterableDataset, _wrap_split_argument, _add_docstring_header, _find_match, _create_dataset_directory, _create_data_from_csv, ) import os URL = 'https://drive.google.co...
27.804878
83
0.692105
from torchtext.utils import ( download_from_url, extract_archive, ) from torchtext.data.datasets_utils import ( _RawTextIterableDataset, _wrap_split_argument, _add_docstring_header, _find_match, _create_dataset_directory, _create_data_from_csv, ) import os URL = 'https://drive.google.co...
true
true
08f50646001caf03538299c723325220dd95ce19
3,722
py
Python
MyClassifier.py
yotsubo/o-glassesX
2e06570c3bc3924a2a666718968a649a2d08e45f
[ "MIT" ]
9
2020-02-25T02:40:35.000Z
2021-12-04T11:01:38.000Z
MyClassifier.py
yotsubo/o-glassesX
2e06570c3bc3924a2a666718968a649a2d08e45f
[ "MIT" ]
null
null
null
MyClassifier.py
yotsubo/o-glassesX
2e06570c3bc3924a2a666718968a649a2d08e45f
[ "MIT" ]
1
2020-02-24T16:50:10.000Z
2020-02-24T16:50:10.000Z
from chainer.functions.evaluation import accuracy from chainer.functions.loss import softmax_cross_entropy from chainer import link from chainer import reporter import chainer.functions as F import chainer #arrnged from #https://github.com/shunk031/chainer-FocalLoss/blob/master/focal_loss.py def focal_loss(x, t, alpha...
32.938053
97
0.6295
from chainer.functions.evaluation import accuracy from chainer.functions.loss import softmax_cross_entropy from chainer import link from chainer import reporter import chainer.functions as F import chainer def focal_loss(x, t, alpha=0.2, gamma=2, eps=1e-7): xp = chainer.cuda.get_array_module(t) logit = F.softm...
true
true
08f5065338a69982611dba4d996cb4a1a9fb9a47
830
py
Python
python_socks/_proxy_chain_async.py
mgorny/python-socks
b6bae4bb904e8c066ec3bb15b408182a57ea2fbf
[ "Apache-2.0" ]
28
2020-09-21T08:34:00.000Z
2022-02-25T15:57:36.000Z
aiohttp_socks/core_socks/_proxy_chain_async.py
maemo-leste-extras/aiohttp-socks
4771b8bc73bd85f41a158600171b931de8e0c414
[ "Apache-2.0" ]
15
2020-09-21T15:39:49.000Z
2022-01-22T15:13:31.000Z
aiohttp_socks/core_socks/_proxy_chain_async.py
maemo-leste-extras/aiohttp-socks
4771b8bc73bd85f41a158600171b931de8e0c414
[ "Apache-2.0" ]
9
2020-11-09T10:53:32.000Z
2022-03-24T22:17:48.000Z
from typing import Iterable from ._proxy_async import AsyncProxy class ProxyChain: def __init__(self, proxies: Iterable[AsyncProxy]): self._proxies = proxies async def connect(self, dest_host, dest_port, timeout=None): curr_socket = None proxies = list(self._proxies) length =...
27.666667
64
0.590361
from typing import Iterable from ._proxy_async import AsyncProxy class ProxyChain: def __init__(self, proxies: Iterable[AsyncProxy]): self._proxies = proxies async def connect(self, dest_host, dest_port, timeout=None): curr_socket = None proxies = list(self._proxies) length =...
true
true
08f5066b1012d57eeffe197a214038b97613967e
37,513
py
Python
yolov5/utils/general.py
Plan-Bee/planbee_yolov5
9f77823284a8df3f3bc975552c00593b7079e7ef
[ "MIT" ]
null
null
null
yolov5/utils/general.py
Plan-Bee/planbee_yolov5
9f77823284a8df3f3bc975552c00593b7079e7ef
[ "MIT" ]
null
null
null
yolov5/utils/general.py
Plan-Bee/planbee_yolov5
9f77823284a8df3f3bc975552c00593b7079e7ef
[ "MIT" ]
null
null
null
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ General utils """ import contextlib import glob import logging import math import os import platform import random import re import shutil import signal import time import urllib from datetime import datetime from itertools import repeat from multiprocessing.pool import ...
41.405077
120
0.5963
import contextlib import glob import logging import math import os import platform import random import re import shutil import signal import time import urllib from datetime import datetime from itertools import repeat from multiprocessing.pool import ThreadPool from pathlib import Path from subprocess import check_o...
true
true
08f5067459cb21a9d647366897ac8797173e8baf
1,567
py
Python
arts-main/arts_api/urls.py
SilverLineFramework/orchestrator
6a11a2754c41bce6999330a927f17038f4070086
[ "BSD-3-Clause" ]
null
null
null
arts-main/arts_api/urls.py
SilverLineFramework/orchestrator
6a11a2754c41bce6999330a927f17038f4070086
[ "BSD-3-Clause" ]
null
null
null
arts-main/arts_api/urls.py
SilverLineFramework/orchestrator
6a11a2754c41bce6999330a927f17038f4070086
[ "BSD-3-Clause" ]
null
null
null
"""arts_api URL Configuration. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/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-bas...
41.236842
86
0.727505
from django.contrib import admin from django.urls import path, re_path, include from rest_framework_jwt.views import obtain_jwt_token from rest_framework.schemas import get_schema_view from django.views.generic import TemplateView from django.conf import settings from django.conf.urls.static import static from wasm_fi...
true
true
08f5070c7abeb184dc65f203daeadf2558514299
21,367
py
Python
optuna/storages/_base.py
jeffzi/optuna
133e9d678723ad9e5183789f9271b7f96db32322
[ "MIT" ]
1
2020-12-29T07:38:45.000Z
2020-12-29T07:38:45.000Z
optuna/storages/_base.py
jeffzi/optuna
133e9d678723ad9e5183789f9271b7f96db32322
[ "MIT" ]
1
2021-06-25T15:45:42.000Z
2021-06-25T15:45:42.000Z
optuna/storages/_base.py
jeffzi/optuna
133e9d678723ad9e5183789f9271b7f96db32322
[ "MIT" ]
1
2020-12-25T03:27:09.000Z
2020-12-25T03:27:09.000Z
import abc from typing import Any from typing import Dict from typing import List from typing import Optional from optuna._study_direction import StudyDirection from optuna._study_summary import StudySummary from optuna.distributions import BaseDistribution from optuna.trial import FrozenTrial from optuna.trial import...
31.514749
99
0.590022
import abc from typing import Any from typing import Dict from typing import List from typing import Optional from optuna._study_direction import StudyDirection from optuna._study_summary import StudySummary from optuna.distributions import BaseDistribution from optuna.trial import FrozenTrial from optuna.trial import...
true
true
08f5077a777640ae8f385bc0d6046ad882a15b98
1,719
py
Python
numerize/numerize.py
shalilly/numerize
6d63175793ae4508215b39ec91d9527c1b2b9410
[ "MIT" ]
null
null
null
numerize/numerize.py
shalilly/numerize
6d63175793ae4508215b39ec91d9527c1b2b9410
[ "MIT" ]
null
null
null
numerize/numerize.py
shalilly/numerize
6d63175793ae4508215b39ec91d9527c1b2b9410
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from decimal import Decimal def round_num(n, decimals): ''' Params: n - number to round decimals - number of decimal places to round to Round number to 2 decimal places For example: 10.0 -> 10 10.222 -> 10.22 ''' return n.to_integral...
28.65
86
0.55032
from decimal import Decimal def round_num(n, decimals): return n.to_integral() if n == n.to_integral() else round(n.normalize(), decimals) def drop_zero(n): n = str(n) return n.rstrip('0').rstrip('.') if '.' in n else n def numerize(n, decimals=2): is_negative_string = "" abriviations = {range(10...
true
true
08f50781c0e4119797d3b17f291f2786123ac495
17,954
py
Python
tools/vsnp/vsnp_build_tables.py
ErasmusMC-Bioinformatics/tools-iuc
2efdef3fbd1ee73c61547ff07a7da6a2b8269f6d
[ "MIT" ]
142
2015-03-13T18:08:34.000Z
2022-03-30T23:52:34.000Z
tools/vsnp/vsnp_build_tables.py
ErasmusMC-Bioinformatics/tools-iuc
2efdef3fbd1ee73c61547ff07a7da6a2b8269f6d
[ "MIT" ]
3,402
2015-01-05T18:04:20.000Z
2022-03-30T22:09:36.000Z
tools/vsnp/vsnp_build_tables.py
ErasmusMC-Bioinformatics/tools-iuc
2efdef3fbd1ee73c61547ff07a7da6a2b8269f6d
[ "MIT" ]
438
2015-01-07T20:33:59.000Z
2022-03-30T04:39:18.000Z
#!/usr/bin/env python import argparse import multiprocessing import os import queue import re import pandas import pandas.io.formats.excel from Bio import SeqIO # Maximum columns allowed in a LibreOffice # spreadsheet is 1024. Excel allows for # 16,384 columns, but we'll set the lower # number as the maximum. Some...
47.247368
149
0.639133
import argparse import multiprocessing import os import queue import re import pandas import pandas.io.formats.excel from Bio import SeqIO # number as the maximum. Some browsers # (e.g., Firefox on Linux) are configured # to use LibreOffice for Excel spreadsheets. MAXCOLS = 1024 OUTPUT_EXCEL_DIR = 'output_excel_dir...
true
true
08f507e770eaaa8a2b0715a2947d312bc7fd8c81
3,167
py
Python
spark-jobs/job_load_dim_gym_actions.py
cojaq/teste
6f3e08c314265e264a799750bb734bf607d906c1
[ "MIT" ]
null
null
null
spark-jobs/job_load_dim_gym_actions.py
cojaq/teste
6f3e08c314265e264a799750bb734bf607d906c1
[ "MIT" ]
null
null
null
spark-jobs/job_load_dim_gym_actions.py
cojaq/teste
6f3e08c314265e264a799750bb734bf607d906c1
[ "MIT" ]
null
null
null
import os from jobControl import jobControl from pyspark.sql import SparkSession from pyspark.sql import functions as f from pyspark.sql.types import StringType from utils import arg_utils, dataframe_utils job_args = arg_utils.get_job_args() job_name = os.path.basename(__file__).split(".")[0] num_partitions = 6 jobE...
31.356436
87
0.677613
import os from jobControl import jobControl from pyspark.sql import SparkSession from pyspark.sql import functions as f from pyspark.sql.types import StringType from utils import arg_utils, dataframe_utils job_args = arg_utils.get_job_args() job_name = os.path.basename(__file__).split(".")[0] num_partitions = 6 jobE...
true
true
08f508f73c5004469aba65dc1b019e9d43f0722d
4,466
py
Python
code/tools/wordnet_utils.py
Living-with-machines/AtypicalAnimacy
a5ba418d61fb2a3ad43d45dffe522324adaede7e
[ "MIT" ]
4
2020-11-23T10:20:10.000Z
2021-10-17T19:48:28.000Z
code/tools/wordnet_utils.py
Living-with-machines/AtypicalAnimacy
a5ba418d61fb2a3ad43d45dffe522324adaede7e
[ "MIT" ]
null
null
null
code/tools/wordnet_utils.py
Living-with-machines/AtypicalAnimacy
a5ba418d61fb2a3ad43d45dffe522324adaede7e
[ "MIT" ]
1
2021-04-28T10:39:05.000Z
2021-04-28T10:39:05.000Z
from sentence_transformers import SentenceTransformer import torch,scipy from nltk.corpus import wordnet as wn from tools import wemb_utils from gensim.models.wrappers import FastText from pathlib import Path # sent_sim_model = SentenceTransformer('models/bert-base-nli-mean-tokens') # wemb_model = FastText.load_fastt...
31.230769
106
0.615316
from sentence_transformers import SentenceTransformer import torch,scipy from nltk.corpus import wordnet as wn from tools import wemb_utils from gensim.models.wrappers import FastText from pathlib import Path def wordnet_animacy(token,sentence,wsd,tokenizer): hypernyms = lambda s: s.hypernyms() word_sen...
true
true