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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72e6c8ddb3a2702133558af850f4622b3f800aa
4,987
py
Python
files_sdk/models/style.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
14
2020-08-05T15:48:06.000Z
2021-08-18T13:13:39.000Z
files_sdk/models/style.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
4
2020-10-30T14:49:25.000Z
2021-09-29T17:11:53.000Z
files_sdk/models/style.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
null
null
null
import builtins import datetime from files_sdk.api import Api from files_sdk.exceptions import InvalidParameterError, MissingParameterError, NotImplementedError class Style: default_attributes = { 'id': None, # int64 - Style ID 'path': None, # string - Folder path This must be slash-delimit...
40.877049
154
0.643674
import builtins import datetime from files_sdk.api import Api from files_sdk.exceptions import InvalidParameterError, MissingParameterError, NotImplementedError class Style: default_attributes = { 'id': None, 'path': None, 'logo': None, 'thumbnail': None, 'fi...
true
true
f72e6de87d8b0bd0845f41e8704948a16523c24b
33,336
py
Python
scipy/io/matlab/mio5.py
ikamensh/scipy
d645404be21b7c0b1e7ba24bf8d525b624aeb848
[ "BSD-3-Clause" ]
null
null
null
scipy/io/matlab/mio5.py
ikamensh/scipy
d645404be21b7c0b1e7ba24bf8d525b624aeb848
[ "BSD-3-Clause" ]
null
null
null
scipy/io/matlab/mio5.py
ikamensh/scipy
d645404be21b7c0b1e7ba24bf8d525b624aeb848
[ "BSD-3-Clause" ]
null
null
null
''' Classes for read / write of matlab (TM) 5 files The matfile specification last found here: https://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf (as of December 5 2008) ''' ''' ================================= Note on functions and mat files ================================= The doc...
37.330347
81
0.603882
import os import time import sys import zlib from io import BytesIO import warnings import numpy as np from numpy.compat import asbytes, asstr import scipy.sparse from .byteordercodes import native_code, swapped_code from .miobase import (MatFileReader, docfiller, matdims, read_dtype, arr_...
true
true
f72e6eb586f0c6e20ddb5b1d5a840e99e6971d7d
575
py
Python
pola/users/urls.py
bpaszcza/pola-backend
60c142d24b0630dbe22e73cf9bfaf9df297abd7c
[ "BSD-3-Clause" ]
30
2015-08-13T01:05:36.000Z
2022-01-22T03:02:50.000Z
pola/users/urls.py
bpaszcza/pola-backend
60c142d24b0630dbe22e73cf9bfaf9df297abd7c
[ "BSD-3-Clause" ]
1,428
2015-10-08T07:38:26.000Z
2022-03-31T08:36:08.000Z
pola/users/urls.py
bpaszcza/pola-backend
60c142d24b0630dbe22e73cf9bfaf9df297abd7c
[ "BSD-3-Clause" ]
13
2015-12-27T22:35:25.000Z
2022-02-01T15:55:58.000Z
from django.conf.urls import url from . import views urlpatterns = [ # URL pattern for the UserListView url(regex=r'^$', view=views.UserListView.as_view(), name='list'), # URL pattern for the UserRedirectView url(regex=r'^~redirect/$', view=views.UserRedirectView.as_view(), name='redirect'), # URL...
38.333333
97
0.683478
from django.conf.urls import url from . import views urlpatterns = [ url(regex=r'^$', view=views.UserListView.as_view(), name='list'), url(regex=r'^~redirect/$', view=views.UserRedirectView.as_view(), name='redirect'), url(regex=r'^(?P<username>[\w.@+-]+)/$', view=views.UserDetailView.as_view(...
true
true
f72e6f0ca0dd7ba992d3af00812a666bd784e293
9,546
py
Python
BeesEtAl/Gholami.py
FJFranklin/BeesEtAl
3fd21d044e77b4a1df56ac2f405e2084bebd54e1
[ "MIT" ]
1
2020-08-04T00:13:54.000Z
2020-08-04T00:13:54.000Z
BeesEtAl/Gholami.py
FJFranklin/BeesEtAl
3fd21d044e77b4a1df56ac2f405e2084bebd54e1
[ "MIT" ]
null
null
null
BeesEtAl/Gholami.py
FJFranklin/BeesEtAl
3fd21d044e77b4a1df56ac2f405e2084bebd54e1
[ "MIT" ]
null
null
null
# *** References *** # Gholami & Mohammadi, A Novel Combination of Bees and Firefly Algorithm to Optimize Continuous Problems # Türker Tuncer, LDW-SCSA: Logistic Dynamic Weight based Sine Cosine Search Algorithm for Numerical Functions Optimization # https://arxiv.org/ftp/arxiv/papers/1809/1809.03055.pdf # Hartmut ...
26.153425
157
0.602137
import numpy as np from .Base_Coster import Base_Coster class F1(Base_Coster): @staticmethod def extents(Ndim): return -5.12 * np.ones(Ndim), 5.12 * np.ones(Ndim) def __init__(self, base_optimiser): Base_Coster.__init__(self, base_optimiser) def map_to_solution_space(self, X): ...
true
true
f72e70c39c18d6e4ccb7179f2c40bbfbc8e403ba
666
py
Python
microservice-model-template/sources/flask/simulation/__init__.py
evalinani/onesait-cloud-platform-examples
7b69e05d3f39261b97081b345df9b6e1823207f6
[ "Apache-2.0" ]
10
2019-05-14T13:23:28.000Z
2019-09-18T08:52:15.000Z
microservice-model-template/sources/flask/simulation/__init__.py
evalinani/onesait-cloud-platform-examples
7b69e05d3f39261b97081b345df9b6e1823207f6
[ "Apache-2.0" ]
6
2019-10-14T13:48:05.000Z
2021-08-16T18:09:42.000Z
microservice-model-template/sources/flask/simulation/__init__.py
evalinani/onesait-cloud-platform-examples
7b69e05d3f39261b97081b345df9b6e1823207f6
[ "Apache-2.0" ]
8
2019-04-23T09:59:42.000Z
2021-06-30T21:04:17.000Z
# Copyright Indra Soluciones Tecnologías de la Información, S.L.U. # 2013-2019 SPAIN # # 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...
44.4
74
0.771772
from .datasimulator import Simulator
true
true
f72e71fc8efd3c5b1b273dfb7620f0e96f5eebf8
2,709
py
Python
predict_risk_1/machine_learning_models/KNN.py
VenkateshBH99/django_local_library
db834cbe6ec475a2d3224b3ea9b56b1fa3519e9f
[ "Apache-2.0" ]
null
null
null
predict_risk_1/machine_learning_models/KNN.py
VenkateshBH99/django_local_library
db834cbe6ec475a2d3224b3ea9b56b1fa3519e9f
[ "Apache-2.0" ]
null
null
null
predict_risk_1/machine_learning_models/KNN.py
VenkateshBH99/django_local_library
db834cbe6ec475a2d3224b3ea9b56b1fa3519e9f
[ "Apache-2.0" ]
null
null
null
# Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd import random # Importing the dataset dataset = pd.read_csv('kidney_disease2.csv') X = dataset.iloc[:,:-1].values y = dataset.iloc[:,24].values #handling missing data from sklearn.preprocessing import Imputer imputer =...
27.927835
93
0.773717
import numpy as np import matplotlib.pyplot as plt import pandas as pd import random dataset = pd.read_csv('kidney_disease2.csv') X = dataset.iloc[:,:-1].values y = dataset.iloc[:,24].values from sklearn.preprocessing import Imputer imputer = Imputer(missing_values = 'NaN', strategy = 'mean', axis = 0) imputer = i...
true
true
f72e720965d81ae52683fcd6c1169ce40b6a7ed3
7,270
py
Python
intera_examples/scripts/joint_position_joystick.py
UtQ67/intera_sdk
a9340f9f2b9287b7580cbca86fd450677542108b
[ "Apache-2.0" ]
38
2017-01-20T15:44:22.000Z
2022-01-28T15:15:40.000Z
intera_examples/scripts/joint_position_joystick.py
UtQ67/intera_sdk
a9340f9f2b9287b7580cbca86fd450677542108b
[ "Apache-2.0" ]
47
2016-12-16T19:41:03.000Z
2022-03-21T14:04:04.000Z
intera_examples/scripts/joint_position_joystick.py
UtQ67/intera_sdk
a9340f9f2b9287b7580cbca86fd450677542108b
[ "Apache-2.0" ]
52
2017-02-03T13:26:23.000Z
2021-03-16T14:25:51.000Z
#! /usr/bin/env python # Copyright (c) 2013-2018, Rethink Robotics 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 ...
33.502304
92
0.602338
import argparse import rospy import intera_interface import intera_external_devices from intera_interface import CHECK_VERSION def rotate(l): if len(l): v = l[0] l[:-1] = l[1:] l[-1] = v def set_j(cmd, limb, joints, index, delta): joint = joints[index] cmd[joint] = delta + lim...
true
true
f72e7223e89eedc346ce7a9e695c19fef535fe15
2,266
py
Python
gamechangerml/src/search/query_expansion/tests/test_qe.py
ekmixon/gamechanger-ml
e7967261a4b2f21b06347020cd7e6a010538eb8f
[ "MIT" ]
11
2021-05-05T17:52:10.000Z
2022-02-04T15:12:29.000Z
gamechangerml/src/search/query_expansion/tests/test_qe.py
ekmixon/gamechanger-ml
e7967261a4b2f21b06347020cd7e6a010538eb8f
[ "MIT" ]
76
2021-07-24T02:33:16.000Z
2022-03-20T22:40:46.000Z
gamechangerml/src/search/query_expansion/tests/test_qe.py
ekmixon/gamechanger-ml
e7967261a4b2f21b06347020cd7e6a010538eb8f
[ "MIT" ]
6
2021-06-30T22:18:56.000Z
2022-03-22T16:54:50.000Z
import logging import pytest logger = logging.getLogger(__name__) def check(expanded, exp_len): return 1 <= len(expanded) <= exp_len def test_qe_emb_expand(qe_obj, topn): q_str = "security clearance" exp = qe_obj.expand(q_str) logger.info(exp) assert check(exp, topn) def test_qe_emb_empty(qe...
25.75
97
0.659312
import logging import pytest logger = logging.getLogger(__name__) def check(expanded, exp_len): return 1 <= len(expanded) <= exp_len def test_qe_emb_expand(qe_obj, topn): q_str = "security clearance" exp = qe_obj.expand(q_str) logger.info(exp) assert check(exp, topn) def test_qe_emb_empty(qe...
true
true
f72e72e522ec513de5e3efacb8883404d676ae41
1,861
py
Python
setup.py
glikaj/pako
27f9846459a94933dfe20884f80d6ec81d8dc092
[ "MIT" ]
null
null
null
setup.py
glikaj/pako
27f9846459a94933dfe20884f80d6ec81d8dc092
[ "MIT" ]
null
null
null
setup.py
glikaj/pako
27f9846459a94933dfe20884f80d6ec81d8dc092
[ "MIT" ]
null
null
null
import os import sys py_version = sys.version_info[:2] if py_version < (2, 7): raise RuntimeError('On Python 2, Supervisor requires Python 2.7 or later') elif (3, 0) < py_version < (3, 4): raise RuntimeError('On Python 3, Supervisor requires Python 3.4 or later') from setuptools import setup, find_packages ...
32.086207
78
0.634068
import os import sys py_version = sys.version_info[:2] if py_version < (2, 7): raise RuntimeError('On Python 2, Supervisor requires Python 2.7 or later') elif (3, 0) < py_version < (3, 4): raise RuntimeError('On Python 3, Supervisor requires Python 3.4 or later') from setuptools import setup, find_packages ...
true
true
f72e730e867ce0880e9a4b7cd06ba8b921784b8a
3,822
py
Python
LuciferMoringstar_Robot/modules/inline.py
Shanidkk00/PAID-PROMO-FUCK-OFF
b6f0766032ccd09e14cef164a5984ba9f6cb636e
[ "MIT" ]
2
2022-02-08T14:44:36.000Z
2022-03-03T07:55:14.000Z
LuciferMoringstar_Robot/modules/inline.py
Shanidkk00/PAID-PROMO-FUCK-OFF
b6f0766032ccd09e14cef164a5984ba9f6cb636e
[ "MIT" ]
null
null
null
LuciferMoringstar_Robot/modules/inline.py
Shanidkk00/PAID-PROMO-FUCK-OFF
b6f0766032ccd09e14cef164a5984ba9f6cb636e
[ "MIT" ]
2
2022-02-10T11:31:16.000Z
2022-02-10T12:40:40.000Z
import logging from pyrogram import Client as LuciferMoringstar_Robot, filters as Worker, emoji from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument from LuciferMoringstar_Robot.database._utils import get_size from LuciferMoringstar_Robot.database.autofilter_db import g...
39.402062
109
0.584511
import logging from pyrogram import Client as LuciferMoringstar_Robot, filters as Worker, emoji from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument from LuciferMoringstar_Robot.database._utils import get_size from LuciferMoringstar_Robot.database.autofilter_db import g...
true
true
f72e7328156adf3d454b7598395f831f88d58f24
1,839
py
Python
ics/structures/s_text_api_settings.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
ics/structures/s_text_api_settings.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
ics/structures/s_text_api_settings.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
# This file was auto generated; Do not modify, if you value your sanity! import ctypes # can1_options class can1_options(ctypes.Union): _pack_ = 2 _fields_ = [ ('bExtended', ctypes.c_uint32, 1), # [Bitfield] ('DWord', ctypes.c_uint32), ] # Extra names go here: # End of extra names # can...
25.541667
83
0.616639
import ctypes class can1_options(ctypes.Union): _pack_ = 2 _fields_ = [ ('bExtended', ctypes.c_uint32, 1), ('DWord', ctypes.c_uint32), ] class can2_options(ctypes.Union): _pack_ = 2 _fields_ = [ ('bExtended', ctypes.c_uint32, 1), ('DWord', ctypes.c_uint32), ]...
true
true
f72e735867669fcf4103b3d3ac7577830db2749f
321
py
Python
leetcode/maximum-subarray.py
hg-pyun/algorithm
cf92483c399f05e488b6febc79c80620f115fadf
[ "MIT" ]
7
2018-09-15T13:57:37.000Z
2022-03-13T10:01:56.000Z
leetcode/maximum-subarray.py
hg-pyun/algorithm
cf92483c399f05e488b6febc79c80620f115fadf
[ "MIT" ]
1
2019-04-26T07:02:28.000Z
2019-04-26T07:02:28.000Z
leetcode/maximum-subarray.py
hg-pyun/algorithm
cf92483c399f05e488b6febc79c80620f115fadf
[ "MIT" ]
1
2020-05-03T23:43:38.000Z
2020-05-03T23:43:38.000Z
class Solution: def maxSubArray(self, nums: List[int]) -> int: ans = nums[0] sub_sum = 0 for num in nums: sub_sum += num ans = max(sub_sum, ans) if sub_sum < 0: sub_sum = 0 return ans ...
20.0625
50
0.392523
class Solution: def maxSubArray(self, nums: List[int]) -> int: ans = nums[0] sub_sum = 0 for num in nums: sub_sum += num ans = max(sub_sum, ans) if sub_sum < 0: sub_sum = 0 return ans ...
true
true
f72e752b81b96c364ac0063922f80616e7fca486
2,256
py
Python
murano/tests/unit/dsl/test_meta.py
openstack/murano
314c85db8addae184a77c8b47217b1f28e4a1b67
[ "Apache-2.0" ]
91
2015-04-26T16:05:03.000Z
2021-12-28T07:12:33.000Z
murano/tests/unit/dsl/test_meta.py
openstack/murano
314c85db8addae184a77c8b47217b1f28e4a1b67
[ "Apache-2.0" ]
3
2016-06-24T08:05:20.000Z
2021-02-07T06:04:47.000Z
murano/tests/unit/dsl/test_meta.py
openstack/murano
314c85db8addae184a77c8b47217b1f28e4a1b67
[ "Apache-2.0" ]
61
2015-05-19T22:56:34.000Z
2021-06-01T05:38:53.000Z
# Copyright (c) 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.25
78
0.671986
from murano.tests.unit.dsl.foundation import object_model as om from murano.tests.unit.dsl.foundation import test_case class TestMeta(test_case.DslTestCase): def setUp(self): super(TestMeta, self).setUp() self._runner = self.new_runner(om.Object('metatests.TestMeta')) def test_class_multi_m...
true
true
f72e76c8f0c62355d037b9e364b47158d7de00b5
788
py
Python
profiles_api/migrations/0002_profilefeeditem.py
nirmit1509/profiles-rest-api
c707103b7ffb5c321a6b47ba05175c51ef816d45
[ "MIT" ]
null
null
null
profiles_api/migrations/0002_profilefeeditem.py
nirmit1509/profiles-rest-api
c707103b7ffb5c321a6b47ba05175c51ef816d45
[ "MIT" ]
null
null
null
profiles_api/migrations/0002_profilefeeditem.py
nirmit1509/profiles-rest-api
c707103b7ffb5c321a6b47ba05175c51ef816d45
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-12-18 13:14 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0001_initial'), ] operations = [ migrations.CreateModel( ...
31.52
126
0.633249
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0001_initial'), ] operations = [ migrations.CreateModel( name='ProfileFeedItem', f...
true
true
f72e77268ba9acbcb6d08cf96c6155994a820451
11,191
py
Python
core/platform/email/mailgun_email_services_test.py
Tim810306/oppia
6f90044d12dbe0979c999265cbe46f267c4c592d
[ "Apache-2.0" ]
2
2021-05-24T10:23:32.000Z
2021-08-22T18:50:14.000Z
core/platform/email/mailgun_email_services_test.py
Tim810306/oppia
6f90044d12dbe0979c999265cbe46f267c4c592d
[ "Apache-2.0" ]
11
2021-03-03T07:21:27.000Z
2022-03-12T01:03:44.000Z
core/platform/email/mailgun_email_services_test.py
Tim810306/oppia
6f90044d12dbe0979c999265cbe46f267c4c592d
[ "Apache-2.0" ]
1
2017-12-06T19:41:49.000Z
2017-12-06T19:41:49.000Z
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
42.390152
93
0.548566
from __future__ import absolute_import from __future__ import unicode_literals import ast from core.platform.email import mailgun_email_services from core.tests import test_utils import feconf import python_utils from typing import Dict, List, Tuple, Union MailgunQueryType = Tuple[ str, Dict[str, List[Uni...
true
true
f72e7770d6e09471566f9a1de0432dcf558fcac0
16,661
py
Python
test/functional/test_framework/mininode.py
GerardoTaboada/EducaCoin
c7f1be5dacd0a10464775c7eeb0eb799fc66cd43
[ "MIT" ]
3
2018-10-04T04:38:09.000Z
2021-02-22T04:45:03.000Z
test/functional/test_framework/mininode.py
GerardoTaboada/EducaCoin
c7f1be5dacd0a10464775c7eeb0eb799fc66cd43
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
GerardoTaboada/EducaCoin
c7f1be5dacd0a10464775c7eeb0eb799fc66cd43
[ "MIT" ]
2
2018-10-05T22:11:11.000Z
2020-04-13T04:51:06.000Z
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Educacoin P2...
37.609481
182
0.635556
import asyncore from collections import defaultdict from io import BytesIO import logging import socket import struct import sys import threading from test_framework.messages import * from test_framework.util import wait_until logger = logging.getLogger("TestFramework.mininode") MESSAGEMAP = { b"addr": msg_addr,...
true
true
f72e77ad679e57d46b94c2f6dab8fbd671008976
4,611
py
Python
venv/Lib/site-packages/statsmodels/discrete/tests/test_margins.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
76
2019-12-28T08:37:10.000Z
2022-03-29T02:19:41.000Z
venv/Lib/site-packages/statsmodels/discrete/tests/test_margins.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
7
2020-12-04T04:10:42.000Z
2021-03-16T00:53:09.000Z
venv/Lib/site-packages/statsmodels/discrete/tests/test_margins.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
35
2020-02-04T14:46:25.000Z
2022-03-24T03:56:17.000Z
# -*- coding: utf-8 -*- """ Created on Thu Aug 3 21:08:49 2017 Author: Josef Perktold """ import numpy as np from numpy.testing import assert_allclose from statsmodels.discrete.discrete_model import (Poisson, NegativeBinomial, NegativeBinomialP) from statsmodels.tools...
35.744186
84
0.643678
import numpy as np from numpy.testing import assert_allclose from statsmodels.discrete.discrete_model import (Poisson, NegativeBinomial, NegativeBinomialP) from statsmodels.tools.tools import add_constant import statsmodels.discrete.tests.results.results_count_margins ...
true
true
f72e7997ae61489068cbd806a984a116eb6dbe1f
147
py
Python
chap12.py
maciejkos/ModSimPy
fe80a994689dafd282c3d479b19c90c34c590eb5
[ "MIT" ]
1
2022-01-04T12:54:18.000Z
2022-01-04T12:54:18.000Z
chap12.py
Dicaromonroy/ModSimPy
fe80a994689dafd282c3d479b19c90c34c590eb5
[ "MIT" ]
null
null
null
chap12.py
Dicaromonroy/ModSimPy
fe80a994689dafd282c3d479b19c90c34c590eb5
[ "MIT" ]
null
null
null
from modsim import * def calc_total_infected(results, system): s_0 = results.S[0] s_end = results.S[system.t_end] return s_0 - s_end
18.375
41
0.687075
from modsim import * def calc_total_infected(results, system): s_0 = results.S[0] s_end = results.S[system.t_end] return s_0 - s_end
true
true
f72e7ab3ebec9d29054bd636d606b7df2c7bdcf7
7,013
py
Python
img2gb/__init__.py
flozz/img2gb
2564a718d0b377d1b524204d97a674aedeec770d
[ "BSD-3-Clause" ]
23
2018-11-14T12:50:31.000Z
2022-03-30T17:28:43.000Z
img2gb/__init__.py
flozz/img2gb
2564a718d0b377d1b524204d97a674aedeec770d
[ "BSD-3-Clause" ]
10
2019-07-01T17:24:47.000Z
2022-01-13T12:38:38.000Z
img2gb/__init__.py
flozz/img2gb
2564a718d0b377d1b524204d97a674aedeec770d
[ "BSD-3-Clause" ]
3
2019-10-16T23:27:28.000Z
2022-01-23T22:28:29.000Z
import os.path from .gbtile import GBTile from .gbtileset import GBTileset from .gbtilemap import GBTilemap from .c_export import generate_c_file, generate_c_header_file from .version import VERSION def generate_tileset( input_images, output_c=None, output_h=None, output_image=None, ...
32.022831
93
0.595038
import os.path from .gbtile import GBTile from .gbtileset import GBTileset from .gbtilemap import GBTilemap from .c_export import generate_c_file, generate_c_header_file from .version import VERSION def generate_tileset( input_images, output_c=None, output_h=None, output_image=None, ...
true
true
f72e7afc52b4efae67131e7da1c5037fcc3c2abd
6,050
py
Python
docs_zh_CN/conf.py
tailocbmt/mmaction2
51612047a53a13be7a855878ffe6f2e5dc4b7b0a
[ "Apache-2.0" ]
1
2022-01-29T13:32:23.000Z
2022-01-29T13:32:23.000Z
docs_zh_CN/conf.py
tailocbmt/mmaction2
51612047a53a13be7a855878ffe6f2e5dc4b7b0a
[ "Apache-2.0" ]
null
null
null
docs_zh_CN/conf.py
tailocbmt/mmaction2
51612047a53a13be7a855878ffe6f2e5dc4b7b0a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -----------------------...
32.180851
79
0.506612
import os import subprocess import sys import pytorch_sphinx_theme sys.path.insert(0, os.path.abspath('..')) project = 'MMAction2' copyright = '2020, OpenMMLab' author = 'MMAction2 Authors' version_file = '../mmaction/version.py' def get_version(): with open(version_file, 'r') as f: exec(compile(f.r...
true
true
f72e7b095cb6503055bc41e3a7a220bc323fe712
11,578
py
Python
entity.py
iamgreaser/fireball
2c5afb3dc5756a3b26da9045278f7e4a2bc036d2
[ "BSD-2-Clause-FreeBSD" ]
1
2019-05-06T15:11:17.000Z
2019-05-06T15:11:17.000Z
entity.py
iamgreaser/fireball
2c5afb3dc5756a3b26da9045278f7e4a2bc036d2
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
entity.py
iamgreaser/fireball
2c5afb3dc5756a3b26da9045278f7e4a2bc036d2
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
""" Copyright 2011 Ben Russell & contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions ...
26.616092
107
0.632234
from math import * import numpy as np import pyglet import helpers MOUSE_SENS_X = 0.3 MOUSE_SENS_Y = 0.3 PLAYER_SPEED = 3.0*2.0 OBJECT_GRAVITY = 9.8*2.0 PLAYER_FRICTION = 0.02 PLAYER_JUMP_HEIGHT = 10.0 COLLISION_TOLERANCE = 0.2 KEY_MOVE_FORWARD_BIT = 0x0001 KEY_MOVE_BACKWARD_BIT = 0x0002 KEY_MOVE_LEFT_BIT = 0x000...
true
true
f72e7b2d77caf3124d0c041b67c7329e92fa362c
4,961
py
Python
Lib/hashlib.py
ystk/debian-python3.1
6241444a6994140621d1b143a2d6b311b184366a
[ "PSF-2.0" ]
1
2015-05-21T23:47:54.000Z
2015-05-21T23:47:54.000Z
Lib/hashlib.py
ystk/debian-python3.1
6241444a6994140621d1b143a2d6b311b184366a
[ "PSF-2.0" ]
1
2015-10-29T20:51:31.000Z
2015-10-29T20:51:31.000Z
Lib/hashlib.py
ystk/debian-python3.1
6241444a6994140621d1b143a2d6b311b184366a
[ "PSF-2.0" ]
1
2019-04-11T11:27:01.000Z
2019-04-11T11:27:01.000Z
# $Id: hashlib.py 66094 2008-08-31 16:35:01Z gregory.p.smith $ # # Copyright (C) 2005-2007 Gregory P. Smith (greg@krypto.org) # Licensed to PSF under a Contributor Agreement. # __doc__ = """hashlib module - A common interface to many hash functions. new(name, data=b'') - returns a new hash object implementing the...
35.184397
85
0.648256
__doc__ = """hashlib module - A common interface to many hash functions. new(name, data=b'') - returns a new hash object implementing the given hash function; initializing the hash using the given binary data. Named constructor functions are also available, these are faste...
true
true
f72e7cd332d811777563166041005fd0edb29089
17,395
py
Python
python_modules/dagster/dagster/core/definitions/decorators/solid.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/decorators/solid.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/decorators/solid.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
from functools import lru_cache, update_wrapper from typing import Any, Callable, Dict, List, NamedTuple, Optional, Sequence, Set, Union, cast from dagster import check from dagster.core.decorator_utils import format_docstring_for_description from dagster.core.errors import DagsterInvalidDefinitionError from dagster.c...
39.714612
112
0.665306
from functools import lru_cache, update_wrapper from typing import Any, Callable, Dict, List, NamedTuple, Optional, Sequence, Set, Union, cast from dagster import check from dagster.core.decorator_utils import format_docstring_for_description from dagster.core.errors import DagsterInvalidDefinitionError from dagster.c...
true
true
f72e7deedad7102a3c5f47b1158672e18ad0b3b5
96
py
Python
mqttassistant/web/healthz.py
madron/mqttassistant
a6e40612b74e60585fd612785da1f2ba81f11881
[ "MIT" ]
null
null
null
mqttassistant/web/healthz.py
madron/mqttassistant
a6e40612b74e60585fd612785da1f2ba81f11881
[ "MIT" ]
null
null
null
mqttassistant/web/healthz.py
madron/mqttassistant
a6e40612b74e60585fd612785da1f2ba81f11881
[ "MIT" ]
2
2022-02-04T15:29:37.000Z
2022-02-05T16:56:33.000Z
from fastapi import Request, Response async def main(request: Request): return Response()
16
37
0.75
from fastapi import Request, Response async def main(request: Request): return Response()
true
true
f72e7f367fcf301b211752dfc42c0fae3388424b
18,108
py
Python
tests/datasets/commands_tests.py
arpith-kp/superset
42ff4fc19a34144b31cef82b341871dff34f37d2
[ "Apache-2.0" ]
44
2021-04-14T10:53:36.000Z
2021-09-11T00:29:50.000Z
tests/datasets/commands_tests.py
arpith-kp/superset
42ff4fc19a34144b31cef82b341871dff34f37d2
[ "Apache-2.0" ]
55
2021-04-02T16:03:57.000Z
2022-03-24T02:12:33.000Z
tests/datasets/commands_tests.py
arpith-kp/superset
42ff4fc19a34144b31cef82b341871dff34f37d2
[ "Apache-2.0" ]
11
2021-06-09T08:30:57.000Z
2021-11-30T03:16:14.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.882845
89
0.602386
from operator import itemgetter from typing import Any, List from unittest.mock import patch import pytest import yaml from superset import db, security_manager from superset.commands.exceptions import CommandInvalidError from superset.commands.importers.exceptions import IncorrectVersionError from superset.connecto...
true
true
f72e7f84b4f61db9dcf7fd72e77f2264339e6bce
1,378
py
Python
hooks/charmhelpers/__init__.py
plumgrid/upstream-charm-plumgrid-gateway
7448c43f9735203a052d1366aa96a091f6544446
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
hooks/charmhelpers/__init__.py
plumgrid/upstream-charm-plumgrid-gateway
7448c43f9735203a052d1366aa96a091f6544446
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
hooks/charmhelpers/__init__.py
plumgrid/upstream-charm-plumgrid-gateway
7448c43f9735203a052d1366aa96a091f6544446
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2014-2015 Canonical Limited. # # This file is part of charm-helpers. # # charm-helpers is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 as # published by the Free Software Foundation. # # charm-helpers is distributed in the hope ...
35.333333
75
0.708999
import subprocess import sys try: import six except ImportError: if sys.version_info.major == 2: subprocess.check_call(['apt-get', 'install', '-y', 'python-six']) else: subprocess.check_call(['apt-get', 'install', '-y', 'python3-six']) import six try: import yaml except ImportE...
true
true
f72e7ff4bdcea5b48d5876c34c9a5f7cc754350a
161
py
Python
myproject/studentapp/urls.py
EvgenDEP1/my-project-django
89955f814a5bd54da9fc37855ec2db2538384c4f
[ "Apache-2.0" ]
null
null
null
myproject/studentapp/urls.py
EvgenDEP1/my-project-django
89955f814a5bd54da9fc37855ec2db2538384c4f
[ "Apache-2.0" ]
null
null
null
myproject/studentapp/urls.py
EvgenDEP1/my-project-django
89955f814a5bd54da9fc37855ec2db2538384c4f
[ "Apache-2.0" ]
null
null
null
import studentapp.views as studentapp from django.urls import path app_name = 'studentapp' urlpatterns = [ path('', studentapp.student, name='student'), ]
17.888889
49
0.732919
import studentapp.views as studentapp from django.urls import path app_name = 'studentapp' urlpatterns = [ path('', studentapp.student, name='student'), ]
true
true
f72e81657fea988ec3832105863d1b4015271e88
1,335
py
Python
setup.py
ken0-1n/annot_gnomAD
32c9284398ea85b8b18a0b8115a2393cae54cd7c
[ "MIT" ]
null
null
null
setup.py
ken0-1n/annot_gnomAD
32c9284398ea85b8b18a0b8115a2393cae54cd7c
[ "MIT" ]
null
null
null
setup.py
ken0-1n/annot_gnomAD
32c9284398ea85b8b18a0b8115a2393cae54cd7c
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) def get_version(): with open(path.join(here, "annot_gnomad/version.py")) as hin: for line in hin: if line.startswith("__version__"): version = line.partition('=')[2] ...
31.785714
79
0.595506
from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) def get_version(): with open(path.join(here, "annot_gnomad/version.py")) as hin: for line in hin: if line.startswith("__version__"): version = line.partition('=')[2] ...
true
true
f72e81800474c7076717f7149cc037c45a9fa546
9,652
py
Python
test/test_ops.py
baheytharwat/tinygrad
acf652c3c524ee3214e9ce58d41113738cb833ae
[ "MIT" ]
null
null
null
test/test_ops.py
baheytharwat/tinygrad
acf652c3c524ee3214e9ce58d41113738cb833ae
[ "MIT" ]
null
null
null
test/test_ops.py
baheytharwat/tinygrad
acf652c3c524ee3214e9ce58d41113738cb833ae
[ "MIT" ]
null
null
null
import os import torch import numpy as np import unittest import timeit import functools from tinygrad.tensor import Tensor, DEFAULT_DEVICE, Device def helper_test_op(shps, torch_fxn, tinygrad_fxn, atol=1e-6, rtol=1e-3, grad_atol=1e-6, grad_rtol=1e-3, forward_only=False, vals=None, a=-0.5, b=20): torch.manual_seed(0...
47.546798
157
0.631372
import os import torch import numpy as np import unittest import timeit import functools from tinygrad.tensor import Tensor, DEFAULT_DEVICE, Device def helper_test_op(shps, torch_fxn, tinygrad_fxn, atol=1e-6, rtol=1e-3, grad_atol=1e-6, grad_rtol=1e-3, forward_only=False, vals=None, a=-0.5, b=20): torch.manual_seed(0...
true
true
f72e819cdc32ca8ddd85aa0af7d020cbe93c59c3
58,151
py
Python
kubernetes/client/apis/storage_v1_api.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/client/apis/storage_v1_api.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
1
2021-04-30T20:41:19.000Z
2021-04-30T20:41:19.000Z
venv/lib/python2.7/site-packages/kubernetes/client/apis/storage_v1_api.py
784134748/kubernetes-install
5df59632c2619632e422948b667fb68eab9ff5be
[ "MIT" ]
1
2020-05-09T07:16:55.000Z
2020-05-09T07:16:55.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os i...
62.127137
1,390
0.646025
from __future__ import absolute_import import sys import os import re from six import iteritems from ..api_client import ApiClient class StorageV1Api(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client d...
true
true
f72e81a4f6bf6b24baaad1bd0696c84db8d72574
900
py
Python
tests/test_todo.py
damianfs/canvasapi
10ef96d268a0535c888d8fdd8169da31d9a66e3f
[ "MIT" ]
386
2017-03-31T15:44:40.000Z
2022-03-31T12:28:41.000Z
tests/test_todo.py
damianfs/canvasapi
10ef96d268a0535c888d8fdd8169da31d9a66e3f
[ "MIT" ]
502
2017-04-03T19:06:06.000Z
2022-03-10T21:59:23.000Z
tests/test_todo.py
damianfs/canvasapi
10ef96d268a0535c888d8fdd8169da31d9a66e3f
[ "MIT" ]
148
2017-04-03T14:26:38.000Z
2022-03-14T15:07:00.000Z
import unittest import requests_mock from canvasapi import Canvas from canvasapi.todo import Todo from tests import settings @requests_mock.Mocker() class TestTodo(unittest.TestCase): def setUp(self): self.canvas = Canvas(settings.BASE_URL, settings.API_KEY) self.todo = Todo( self.c...
26.470588
65
0.534444
import unittest import requests_mock from canvasapi import Canvas from canvasapi.todo import Todo from tests import settings @requests_mock.Mocker() class TestTodo(unittest.TestCase): def setUp(self): self.canvas = Canvas(settings.BASE_URL, settings.API_KEY) self.todo = Todo( self.c...
true
true
f72e81aed967860ab086d392a5b77ebbbf88814a
347,727
py
Python
sympy/solvers/ode.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
null
null
null
sympy/solvers/ode.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
2
2019-08-04T13:10:46.000Z
2020-11-06T19:59:25.000Z
sympy/solvers/ode.py
CameronKing/sympy
3295b02c617a10ea8db0a070356cc0ba5a3b5121
[ "BSD-3-Clause" ]
null
null
null
r""" This module contains :py:meth:`~sympy.solvers.ode.dsolve` and different helper functions that it uses. :py:meth:`~sympy.solvers.ode.dsolve` solves ordinary differential equations. See the docstring on the various functions for their uses. Note that partial differential equations support is in ``pde.py``. Note t...
39.712997
279
0.54749
from __future__ import print_function, division from collections import defaultdict from itertools import islice from sympy.core import Add, S, Mul, Pow, oo from sympy.core.compatibility import ordered, iterable, is_sequence, range, string_types from sympy.core.containers import Tuple from sympy.core.exprtools import...
true
true
f72e824990bb73cef7bba0e0f1c0e056f9cd231b
1,362
py
Python
setup.py
jwplayer/sparksteps
8809ab42f22017aee9945bce8f7b3f3b70674bf8
[ "Apache-2.0" ]
74
2016-06-15T21:36:53.000Z
2021-12-21T16:40:27.000Z
setup.py
jwplayer/sparksteps
8809ab42f22017aee9945bce8f7b3f3b70674bf8
[ "Apache-2.0" ]
13
2017-03-28T19:33:02.000Z
2021-01-21T12:05:32.000Z
setup.py
jwplayer/sparksteps
8809ab42f22017aee9945bce8f7b3f3b70674bf8
[ "Apache-2.0" ]
16
2016-10-10T21:14:51.000Z
2022-02-19T09:52:11.000Z
# -*- coding: utf-8 -*- """Distutils setup file, used to install or test 'sparksteps'.""" import textwrap from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() setup( name='sparksteps', description='Workflow tool to launch Spark jobs on AWS EMR', long_description...
28.978723
71
0.624816
import textwrap from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() setup( name='sparksteps', description='Workflow tool to launch Spark jobs on AWS EMR', long_description=readme, packages=find_packages(exclude=['tests', 'examples', 'bootstrap']), use_s...
true
true
f72e82c9d7bd2b2e7b24df8a3f6dc4ce9687a9d7
699
py
Python
src/podping_hivewriter/models/podping_settings.py
brianoflondon/podping-hivewriter
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
[ "MIT" ]
11
2021-05-28T15:58:31.000Z
2022-03-21T07:08:58.000Z
src/podping_hivewriter/models/podping_settings.py
brianoflondon/podping-hivewriter
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
[ "MIT" ]
33
2021-06-12T09:23:47.000Z
2022-02-27T06:34:05.000Z
src/podping_hivewriter/models/podping_settings.py
brianoflondon/podping-hivewriter
0fab946b00ae1c53db72a2f0b48de3f02a771a1d
[ "MIT" ]
3
2021-07-30T19:40:04.000Z
2022-01-19T04:14:14.000Z
from typing import Tuple from pydantic import BaseModel, validator class PodpingSettings(BaseModel): """Dataclass for settings we will fetch from Hive""" hive_operation_period: int = 3 max_url_list_bytes: int = 7500 diagnostic_report_period: int = 60 control_account: str = "podping" control_...
30.391304
71
0.680973
from typing import Tuple from pydantic import BaseModel, validator class PodpingSettings(BaseModel): hive_operation_period: int = 3 max_url_list_bytes: int = 7500 diagnostic_report_period: int = 60 control_account: str = "podping" control_account_check_period: int = 60 test_nodes: Tuple[str,...
true
true
f72e8306feafbbb1dafb789b86bcdde1ac7bd206
12,065
py
Python
contextualized_topic_models/evaluation/measures.py
onlyrico/contextualized-topic-models
ac338eab6601cd34475d490ae8072fecb73bb0c2
[ "MIT" ]
1
2022-02-07T13:52:48.000Z
2022-02-07T13:52:48.000Z
contextualized_topic_models/evaluation/measures.py
onlyrico/contextualized-topic-models
ac338eab6601cd34475d490ae8072fecb73bb0c2
[ "MIT" ]
null
null
null
contextualized_topic_models/evaluation/measures.py
onlyrico/contextualized-topic-models
ac338eab6601cd34475d490ae8072fecb73bb0c2
[ "MIT" ]
null
null
null
from gensim.corpora.dictionary import Dictionary from gensim.models.coherencemodel import CoherenceModel from gensim.models import KeyedVectors import gensim.downloader as api from scipy.spatial.distance import cosine import abc from contextualized_topic_models.evaluation.rbo import rbo import numpy as np import itert...
39.818482
123
0.630999
from gensim.corpora.dictionary import Dictionary from gensim.models.coherencemodel import CoherenceModel from gensim.models import KeyedVectors import gensim.downloader as api from scipy.spatial.distance import cosine import abc from contextualized_topic_models.evaluation.rbo import rbo import numpy as np import itert...
true
true
f72e8350d7481236cc8e11a4dc5d4bd60251c0b9
6,102
py
Python
beliefs/factors/discrete_factor.py
drivergroup/beliefs
7e0b2a02d719f5b1c889d72ac1e9421971cc120b
[ "MIT" ]
2
2019-07-11T17:42:07.000Z
2020-02-10T05:19:53.000Z
beliefs/factors/discrete_factor.py
drivergroup/beliefs
7e0b2a02d719f5b1c889d72ac1e9421971cc120b
[ "MIT" ]
1
2019-07-11T19:13:19.000Z
2019-07-11T19:13:19.000Z
beliefs/factors/discrete_factor.py
driver-oss/beliefs
7e0b2a02d719f5b1c889d72ac1e9421971cc120b
[ "MIT" ]
2
2019-07-11T19:02:54.000Z
2020-02-10T05:20:01.000Z
""" The MIT License (MIT) Copyright (c) 2013-2017 pgmpy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
40.68
96
0.654376
import copy import numpy as np class DiscreteFactor: def __init__(self, variables, cardinality, values=None, state_names=None): self.variables = list(variables) self.cardinality = list(cardinality) if values is None: self._values = None else: self._values ...
true
true
f72e83933f876cd4572db0e34fcdcc95f8a2fb8c
6,388
py
Python
toontown/fishing/FishPhoto.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
1
2021-02-13T22:40:50.000Z
2021-02-13T22:40:50.000Z
toontown/fishing/FishPhoto.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
toontown/fishing/FishPhoto.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
3
2021-06-03T05:36:36.000Z
2021-06-22T15:07:31.000Z
from direct.directnotify import DirectNotifyGlobal from panda3d.core import * from direct.interval.IntervalGlobal import * import FishGlobals class DirectRegion(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('DirectRegion') def __init__(self, parent = aspect2d): NodePath.__init__(self...
34.717391
118
0.591578
from direct.directnotify import DirectNotifyGlobal from panda3d.core import * from direct.interval.IntervalGlobal import * import FishGlobals class DirectRegion(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('DirectRegion') def __init__(self, parent = aspect2d): NodePath.__init__(self...
true
true
f72e8847156e836eb2f014e2a896ec4b5ce4fc3d
3,837
py
Python
sceptre/context.py
janrotter/sceptre
05c6742ff00c56f7d49e37124344851ea8e144a2
[ "Apache-2.0" ]
null
null
null
sceptre/context.py
janrotter/sceptre
05c6742ff00c56f7d49e37124344851ea8e144a2
[ "Apache-2.0" ]
1
2021-03-26T00:46:38.000Z
2021-03-26T00:46:38.000Z
sceptre/context.py
isotoma/sceptre
05c6742ff00c56f7d49e37124344851ea8e144a2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ sceptre.context This module implements the SceptreContext class which holds details about the paths used in a Sceptre project. """ from os import path class SceptreContext(object): """ SceptreContext is a place that holds data that is relevant to the project, including refer...
33.077586
79
0.649466
from os import path class SceptreContext(object): def __init__(self, project_path, command_path, user_variables=None, options=None, output_format=None, no_colour=False): self.project_path = project_path self.config_path = "confi...
true
true
f72e88acf96609ef2f0f8f0c3513b465a09bb0a5
113,890
py
Python
emscripten.py
conversy/emscripten
0bebbec826ed50a7e93c45242e1729ac2c002d3e
[ "MIT" ]
1
2020-07-26T05:50:02.000Z
2020-07-26T05:50:02.000Z
emscripten.py
GwG422/emscripten
ffed1d38b7692989583ad832cea013cc299df1d2
[ "MIT" ]
null
null
null
emscripten.py
GwG422/emscripten
ffed1d38b7692989583ad832cea013cc299df1d2
[ "MIT" ]
1
2020-07-26T16:08:10.000Z
2020-07-26T16:08:10.000Z
# Copyright 2010 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. """A small wrapper script around the core JS compiler. This calls tha...
39.97543
256
0.684643
from __future__ import print_function import difflib import os import json import subprocess import re import time import logging import pprint from collections import OrderedDict from tools import shared from tools import gen_struct_info from tools import jsrun from tools.response_file import substitute_response_f...
true
true
f72e8982cdd4262f5a24940e7a182364aca39d7f
13,812
py
Python
troposphere/pinpoint.py
ds-mn/troposphere
ebaa1749dff9da552e4dbaff188b740c60a8387a
[ "BSD-2-Clause" ]
1
2019-10-09T04:11:40.000Z
2019-10-09T04:11:40.000Z
troposphere/pinpoint.py
ds-mn/troposphere
ebaa1749dff9da552e4dbaff188b740c60a8387a
[ "BSD-2-Clause" ]
null
null
null
troposphere/pinpoint.py
ds-mn/troposphere
ebaa1749dff9da552e4dbaff188b740c60a8387a
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 47.0.0 from . import AWSObject, AWSProperty from .validators import boolean, double, integer class ADMChannel(AW...
24.841727
66
0.564147
from . import AWSObject, AWSProperty from .validators import boolean, double, integer class ADMChannel(AWSObject): resource_type = "AWS::Pinpoint::ADMChannel" props = { "ApplicationId": (str, True), "ClientId": (str, True), "ClientSecret": (str, True), "Enabled": (boolean, F...
true
true
f72e8a516b80749a38c870c143ff7e475d8b0389
6,372
py
Python
builder/main.py
djix123/platform-gd32v
3c949e3ab9d615b441da64a7f3162db48ac1eae3
[ "Apache-2.0" ]
null
null
null
builder/main.py
djix123/platform-gd32v
3c949e3ab9d615b441da64a7f3162db48ac1eae3
[ "Apache-2.0" ]
null
null
null
builder/main.py
djix123/platform-gd32v
3c949e3ab9d615b441da64a7f3162db48ac1eae3
[ "Apache-2.0" ]
null
null
null
import sys from os.path import join from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment) env = DefaultEnvironment() platform = env.PioPlatform() board = env.BoardConfig() env.Replace( AR="riscv-nuclei-elf-gcc-ar", AS="riscv-nuclei-elf...
30.056604
134
0.59275
import sys from os.path import join from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment) env = DefaultEnvironment() platform = env.PioPlatform() board = env.BoardConfig() env.Replace( AR="riscv-nuclei-elf-gcc-ar", AS="riscv-nuclei-elf...
true
true
f72e8ad1c3608b91eaaa2a795f92f4b5c3a9b434
2,445
py
Python
mmseg/integration/nncf/utils.py
yunchu/mmsegmentation
404f3e0e8859991931b6a39a583de412348e98f0
[ "Apache-2.0" ]
3
2021-12-21T07:25:13.000Z
2022-02-07T01:59:19.000Z
mmseg/integration/nncf/utils.py
yunchu/mmsegmentation
404f3e0e8859991931b6a39a583de412348e98f0
[ "Apache-2.0" ]
13
2021-12-10T15:08:56.000Z
2022-03-23T08:58:03.000Z
mmseg/integration/nncf/utils.py
yunchu/mmsegmentation
404f3e0e8859991931b6a39a583de412348e98f0
[ "Apache-2.0" ]
3
2021-11-11T23:16:51.000Z
2021-12-08T23:49:29.000Z
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # import importlib from collections import OrderedDict from contextlib import contextmanager import torch _is_nncf_enabled = importlib.util.find_spec('nncf') is not None def is_nncf_enabled(): return _is_nncf_enabled def check_nncf...
25.46875
92
0.708384
import importlib from collections import OrderedDict from contextlib import contextmanager import torch _is_nncf_enabled = importlib.util.find_spec('nncf') is not None def is_nncf_enabled(): return _is_nncf_enabled def check_nncf_is_enabled(): if not is_nncf_enabled(): raise RuntimeError('Tried ...
true
true
f72e8ad32ab4f0397c6c09682578a2c085bad8b4
6,857
py
Python
mir_eval/key.py
f90/mir_eval
645f46258515677620add3a60fc21a6bf6b27363
[ "MIT" ]
431
2015-03-05T18:08:23.000Z
2022-03-29T14:51:02.000Z
mir_eval/key.py
f90/mir_eval
645f46258515677620add3a60fc21a6bf6b27363
[ "MIT" ]
217
2015-02-10T15:23:19.000Z
2022-02-16T21:14:13.000Z
mir_eval/key.py
f90/mir_eval
645f46258515677620add3a60fc21a6bf6b27363
[ "MIT" ]
118
2015-01-15T09:22:55.000Z
2022-02-08T18:22:14.000Z
''' Key Detection involves determining the underlying key (distribution of notes and note transitions) in a piece of music. Key detection algorithms are evaluated by comparing their estimated key to a ground-truth reference key and reporting a score according to the relationship of the keys. Conventions ----------- K...
34.631313
79
0.553157
import collections from . import util KEY_TO_SEMITONE = {'c': 0, 'c#': 1, 'db': 1, 'd': 2, 'd#': 3, 'eb': 3, 'e': 4, 'f': 5, 'f#': 6, 'gb': 6, 'g': 7, 'g#': 8, 'ab': 8, 'a': 9, 'a#': 10, 'bb': 10, 'b': 11, 'x': None} def validate_key(key): if len(key.split()) != 2 \ ...
true
true
f72e8c5866fb2e87ce436a3e9688b5cbeb43d9f5
52,622
py
Python
main.py
LinZichuan/AdMRL
50a22d4d480e99125cc91cc65dfcc0df4a883ac6
[ "MIT" ]
27
2020-06-17T11:40:17.000Z
2021-11-16T07:39:33.000Z
main.py
LinZichuan/AdMRL
50a22d4d480e99125cc91cc65dfcc0df4a883ac6
[ "MIT" ]
3
2020-06-19T07:01:48.000Z
2020-06-19T07:14:57.000Z
main.py
LinZichuan/AdMRL
50a22d4d480e99125cc91cc65dfcc0df4a883ac6
[ "MIT" ]
5
2020-11-19T01:11:24.000Z
2021-12-24T09:03:56.000Z
import sys sys.path = ['./rllab/'] + sys.path print (sys.path) import pickle import os,time from collections import deque import tensorflow as tf import numpy as np import lunzi.nn as nn from lunzi.Logger import logger from slbo.utils.average_meter import AverageMeter from slbo.utils.flags import FLAGS from slbo.utils....
54.30547
354
0.609137
import sys sys.path = ['./rllab/'] + sys.path print (sys.path) import pickle import os,time from collections import deque import tensorflow as tf import numpy as np import lunzi.nn as nn from lunzi.Logger import logger from slbo.utils.average_meter import AverageMeter from slbo.utils.flags import FLAGS from slbo.utils....
true
true
f72e8cc5d63278100727c1c262ba1c22725d8d19
34,804
py
Python
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp855.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp855.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp855.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP855.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors=...
49.79113
98
0.596684
import codecs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): return codecs.charmap_decode(input,errors,decoding_table) class IncrementalEncoder(codecs.Incremental...
true
true
f72e8d3f29aa1af65b058c4504d5648e6c8fb53e
18,293
py
Python
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/14-sender_receiver_2.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/14-sender_receiver_2.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/14-sender_receiver_2.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet from collections import Iterable from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msa...
38.350105
89
0.574865
from typing import FrozenSet from collections import Iterable from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msa...
true
true
f72e8d751c0523f0e8d682b392acc2d5952982f1
394
py
Python
checkout/migrations/0005_orderitem_completed.py
yusif763/Unistore-pro
41ad0fa209c79a201d3f6a7aa68ec0ace707dcad
[ "MIT" ]
3
2021-04-29T10:49:06.000Z
2022-03-03T12:40:21.000Z
checkout/migrations/0005_orderitem_completed.py
yusif763/Unistore-pro
41ad0fa209c79a201d3f6a7aa68ec0ace707dcad
[ "MIT" ]
null
null
null
checkout/migrations/0005_orderitem_completed.py
yusif763/Unistore-pro
41ad0fa209c79a201d3f6a7aa68ec0ace707dcad
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-04-27 11:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('checkout', '0004_checkout_completed'), ] operations = [ migrations.AddField( model_name='orderitem', name='completed...
20.736842
53
0.606599
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('checkout', '0004_checkout_completed'), ] operations = [ migrations.AddField( model_name='orderitem', name='completed', field=models.BooleanField(default...
true
true
f72e8d94ce9c8b70aedb2c77a687ec9e45d85bfa
2,794
py
Python
exercises/sliding_alignment.py
saiden89/programming_stefano_roncelli
3b77259e7e590fffd49dae96e0be16c934cae051
[ "MIT" ]
2
2020-01-13T08:41:52.000Z
2020-01-15T15:33:28.000Z
exercises/sliding_alignment.py
saiden89/programming_stefano_roncelli
3b77259e7e590fffd49dae96e0be16c934cae051
[ "MIT" ]
null
null
null
exercises/sliding_alignment.py
saiden89/programming_stefano_roncelli
3b77259e7e590fffd49dae96e0be16c934cae051
[ "MIT" ]
null
null
null
# 2) Write a script that generates all the possible ungapped alignments of two sequences, scores them and identifies # the best scoring ones. # # These are all the possible ungapped alingments of the two sequences: TCA and GA: # # --TCA -TCA TCA TCA TCA- TCA-- # GA--- GA-- GA- -GA --GA ---GA # # Using the fol...
27.94
153
0.581961
matrix = {'AA': 2, 'AC': -1, 'AT': -1, 'AG': -2, 'CC': 2, 'CT': 0, 'CG': -1, 'TT': 2, 'TG': -1, 'GG': 2, 'CA': -1, 'TA': -1, 'GA': -2, 'TC': 0, 'GC': -1, 'GT': -1, } human = open('./data/titin_hu.txt', 'r') mouse = open('./data/titin_mo.txt', 'r') seq1 = '' seq2 = '' for line in human: line = l...
true
true
f72e8dcfb6a1d538af304734c158aabf6a2827cf
5,580
py
Python
keras/ltlib/evaluation.py
cambridgeltl/cancer-hallmark-cnn
a1aba55ba425aa0deac4f80c97572a146e4097bb
[ "MIT" ]
7
2017-07-15T08:45:06.000Z
2021-06-28T14:09:25.000Z
keras/ltlib/evaluation.py
cambridgeltl/cancer-hallmark-cnn
a1aba55ba425aa0deac4f80c97572a146e4097bb
[ "MIT" ]
null
null
null
keras/ltlib/evaluation.py
cambridgeltl/cancer-hallmark-cnn
a1aba55ba425aa0deac4f80c97572a146e4097bb
[ "MIT" ]
4
2018-11-27T06:41:29.000Z
2022-03-19T11:06:43.000Z
import numpy as np # TODO remove dependency from collections import namedtuple from itertools import chain from sklearn import metrics as skmetrics from util import unique from logging import warn BinaryClassificationCounts = namedtuple('BinaryClassificationCounts', 'tp t...
34.233129
78
0.623835
import numpy as np from collections import namedtuple from itertools import chain from sklearn import metrics as skmetrics from util import unique from logging import warn BinaryClassificationCounts = namedtuple('BinaryClassificationCounts', 'tp tn fp fn') BinaryClassific...
true
true
f72e8e165d3d5f54741251e1676396f0a12b4e4f
5,929
py
Python
lian/ssh_deploy.py
catroll/lian
405fd0c8c4ce8557609bf595431284a07e7b443e
[ "Apache-2.0" ]
null
null
null
lian/ssh_deploy.py
catroll/lian
405fd0c8c4ce8557609bf595431284a07e7b443e
[ "Apache-2.0" ]
null
null
null
lian/ssh_deploy.py
catroll/lian
405fd0c8c4ce8557609bf595431284a07e7b443e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import logging import os import re import time from collections import OrderedDict LOG = logging.getLogger(__name__) def md5sum_command(directory='.', find_type='f', match='', not_match=''): return ' '.join([i for i in [ 'find', directory, ('-type %s' % find_type) if find...
31.041885
110
0.608366
import logging import os import re import time from collections import OrderedDict LOG = logging.getLogger(__name__) def md5sum_command(directory='.', find_type='f', match='', not_match=''): return ' '.join([i for i in [ 'find', directory, ('-type %s' % find_type) if find_type else '', ...
true
true
f72e8e927897fafefe42d0edd70415afe4ce8502
2,987
py
Python
mailparser/const.py
nitishkansal/mail-parser
d10e6dbec5c37ca740f5ef2edc70eba2c05fdaf5
[ "Apache-2.0" ]
1
2021-12-04T14:57:49.000Z
2021-12-04T14:57:49.000Z
mailparser/const.py
KonstantinKlepikov/mail-parser
c90cb1cd72fcf986fa013acbbc1277b7b6fa2e84
[ "Apache-2.0" ]
48
2020-02-17T07:43:41.000Z
2021-08-02T05:42:12.000Z
mailparser/const.py
KonstantinKlepikov/mail-parser
c90cb1cd72fcf986fa013acbbc1277b7b6fa2e84
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright 2018 Fedele Mantuano (https://twitter.com/fedelemantuano) 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/lice...
28.721154
77
0.579846
import re REGXIP = re.compile(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}") JUNK_PATTERN = r'[ \(\)\[\]\t\n]+' RECEIVED_PATTERNS = [ ( r'(?:(?:^|\s)from\s+(?P<from>.+?)(?:\s*[(]?' r'envelope-from|\s*[(]?envelope-sender|\s+' r'by|\s+with(?! cipher)|\s+id|\s+for|\s+via|;))' ...
true
true
f72e9050f2607486b7faa4d1c4b1e9b2a220fdb9
360
py
Python
yeelight/__init__.py
kmohrf/python-yeelight
483019c074556b4c3d2f665398f0fc308afd6274
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
yeelight/__init__.py
kmohrf/python-yeelight
483019c074556b4c3d2f665398f0fc308afd6274
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
yeelight/__init__.py
kmohrf/python-yeelight
483019c074556b4c3d2f665398f0fc308afd6274
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# flake8: noqa """A Python library for controlling YeeLight RGB bulbs.""" from yeelight.enums import BulbType, CronType, LightType, PowerMode, SceneClass from yeelight.flow import Flow, HSVTransition, RGBTransition, SleepTransition, TemperatureTransition from yeelight.main import Bulb, BulbException, discover_bulbs f...
40
100
0.827778
from yeelight.enums import BulbType, CronType, LightType, PowerMode, SceneClass from yeelight.flow import Flow, HSVTransition, RGBTransition, SleepTransition, TemperatureTransition from yeelight.main import Bulb, BulbException, discover_bulbs from yeelight.version import __version__
true
true
f72e9115ce15721094d17e92eb46738e05716f2a
2,138
py
Python
keras/utils/np_utils.py
Jallet/keras-jl-ac-mean
2bbc1596192fb8c3aefc4a8126482a5283574a59
[ "MIT" ]
1
2016-12-15T07:20:42.000Z
2016-12-15T07:20:42.000Z
keras/utils/np_utils.py
Jallet/keras-jl-ac-mean
2bbc1596192fb8c3aefc4a8126482a5283574a59
[ "MIT" ]
null
null
null
keras/utils/np_utils.py
Jallet/keras-jl-ac-mean
2bbc1596192fb8c3aefc4a8126482a5283574a59
[ "MIT" ]
null
null
null
from __future__ import absolute_import import numpy as np import scipy as sp from six.moves import range from six.moves import zip def to_categorical(y, nb_classes=None): '''Convert class vector (integers from 0 to nb_classes) to binary class matrix, for use with categorical_crossentropy. ''' if not n...
27.766234
76
0.596819
from __future__ import absolute_import import numpy as np import scipy as sp from six.moves import range from six.moves import zip def to_categorical(y, nb_classes=None): if not nb_classes: nb_classes = np.max(y)+1 Y = np.zeros((len(y), nb_classes)) for i in range(len(y)): Y[i, y[i]] = 1. ...
true
true
f72e9130a037400e6880119aa046276237c3a43a
827
py
Python
conman/routes/migrations/0003_add_validators.py
meshy/django-conman
c739d09250d02d99068358e925ed8298a2a37a75
[ "BSD-2-Clause" ]
null
null
null
conman/routes/migrations/0003_add_validators.py
meshy/django-conman
c739d09250d02d99068358e925ed8298a2a37a75
[ "BSD-2-Clause" ]
81
2015-07-27T23:21:49.000Z
2018-05-21T22:06:09.000Z
conman/routes/migrations/0003_add_validators.py
meshy/django-conman
c739d09250d02d99068358e925ed8298a2a37a75
[ "BSD-2-Clause" ]
2
2015-10-06T09:18:06.000Z
2017-03-17T08:51:56.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import conman.routes.validators class Migration(migrations.Migration): dependencies = [ ('routes', '0002_remove_slug_parent'), ] operations = [ migrations.AlterField( mod...
39.380952
448
0.740024
from __future__ import unicode_literals from django.db import models, migrations import conman.routes.validators class Migration(migrations.Migration): dependencies = [ ('routes', '0002_remove_slug_parent'), ] operations = [ migrations.AlterField( model_name='route', ...
true
true
f72e91674e57314a4df5f2282bf245e700c13ea3
1,852
py
Python
pycs/character.py
dwagon/pycs
4d02acbf380526d3bf0380f6bb8b757a827024b8
[ "MIT" ]
null
null
null
pycs/character.py
dwagon/pycs
4d02acbf380526d3bf0380f6bb8b757a827024b8
[ "MIT" ]
null
null
null
pycs/character.py
dwagon/pycs
4d02acbf380526d3bf0380f6bb8b757a827024b8
[ "MIT" ]
null
null
null
""" Base Player character """ from pycs.creature import Creature from pycs.spell import SpellAction from pycs.races import Human from pycs.util import check_args from pycs.constant import Condition from pycs.constant import DamageType ############################################################################## clas...
35.615385
80
0.50432
from pycs.creature import Creature from pycs.spell import SpellAction from pycs.races import Human from pycs.util import check_args from pycs.constant import Condition from pycs.constant import DamageType class Character(Creature): def __init__(self, **kwargs): check_args(self._valid_args(), self.__class...
true
true
f72e91692ce19b47db39e089f77ace71680d7ddd
1,089
py
Python
sdk/python/pulumi_azure_native/storsimple/v20161001/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storsimple/v20161001/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storsimple/v20161001/__init__.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! *** from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .access_control_record import * from .b...
32.029412
80
0.790634
from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .access_control_record import * from .backup_schedule_group import * from .chap_setting import * from .file_server import * from .file_share import * from .get_access_control_record import * from .get_backup...
true
true
f72e91c889dbea08c3f350b640e6e04270a313e4
1,951
py
Python
data/logs_model/__init__.py
dongboyan77/quay
8018e5bd80f17e6d855b58b7d5f2792d92675905
[ "Apache-2.0" ]
1
2020-10-16T19:30:41.000Z
2020-10-16T19:30:41.000Z
data/logs_model/__init__.py
dongboyan77/quay
8018e5bd80f17e6d855b58b7d5f2792d92675905
[ "Apache-2.0" ]
15
2020-06-18T15:32:06.000Z
2022-03-03T23:06:24.000Z
data/logs_model/__init__.py
dongboyan77/quay
8018e5bd80f17e6d855b58b7d5f2792d92675905
[ "Apache-2.0" ]
null
null
null
import logging from data.logs_model.table_logs_model import TableLogsModel from data.logs_model.document_logs_model import DocumentLogsModel from data.logs_model.combined_model import CombinedLogsModel logger = logging.getLogger(__name__) def _transition_model(*args, **kwargs): return CombinedLogsModel(Document...
30.968254
98
0.682727
import logging from data.logs_model.table_logs_model import TableLogsModel from data.logs_model.document_logs_model import DocumentLogsModel from data.logs_model.combined_model import CombinedLogsModel logger = logging.getLogger(__name__) def _transition_model(*args, **kwargs): return CombinedLogsModel(Document...
true
true
f72e91dd9b9f3ef8e8276dee26fe5cfef7d818db
1,160
py
Python
nornir/failed_tasks/partial_fail.py
twin-bridges/pynet-ons
f3abe14a6760bddea2addab75e6d87d5f5454b7b
[ "Apache-2.0" ]
1
2021-01-11T23:17:26.000Z
2021-01-11T23:17:26.000Z
nornir/failed_tasks/partial_fail.py
twin-bridges/pynet-ons
f3abe14a6760bddea2addab75e6d87d5f5454b7b
[ "Apache-2.0" ]
null
null
null
nornir/failed_tasks/partial_fail.py
twin-bridges/pynet-ons
f3abe14a6760bddea2addab75e6d87d5f5454b7b
[ "Apache-2.0" ]
7
2020-07-21T17:15:08.000Z
2021-12-14T01:13:56.000Z
from nornir import InitNornir from nornir.plugins.tasks.networking import netmiko_send_command from nornir.plugins.functions.text import print_result def failed_task(task): print() print("-" * 60) print(f"This is a host that earlier failed: {task.host.name}") print("-" * 60) print() if __name__ ...
28.292683
88
0.711207
from nornir import InitNornir from nornir.plugins.tasks.networking import netmiko_send_command from nornir.plugins.functions.text import print_result def failed_task(task): print() print("-" * 60) print(f"This is a host that earlier failed: {task.host.name}") print("-" * 60) print() if __name__ ...
true
true
f72e93a0f4fd80901bd47d30bfa9f5cea0f21a98
663
py
Python
schematic/utils/__init__.py
nf-osi/schematic
b59856f40c613a43d117fe3fafa2ca5ba5bbf8d6
[ "MIT" ]
null
null
null
schematic/utils/__init__.py
nf-osi/schematic
b59856f40c613a43d117fe3fafa2ca5ba5bbf8d6
[ "MIT" ]
6
2020-10-08T19:53:47.000Z
2021-05-07T14:50:39.000Z
schematic/utils/__init__.py
nf-osi/schematic
b59856f40c613a43d117fe3fafa2ca5ba5bbf8d6
[ "MIT" ]
null
null
null
from schematic.utils.curie_utils import expand_curie_to_uri, expand_curies_in_schema, extract_name_from_uri_or_curie, uri2label from schematic.utils.df_utils import update_df from schematic.utils.general import dict2list, find_duplicates, str2list, unlist from schematic.utils.google_api_utils import download_creds_file...
73.666667
127
0.891403
from schematic.utils.curie_utils import expand_curie_to_uri, expand_curies_in_schema, extract_name_from_uri_or_curie, uri2label from schematic.utils.df_utils import update_df from schematic.utils.general import dict2list, find_duplicates, str2list, unlist from schematic.utils.google_api_utils import download_creds_file...
true
true
f72e93d2aa15998810aa737c1e59d2250453be8f
2,173
py
Python
os_ken/lib/sockopt.py
faucetsdn/python3-os-ken
31037f6388b7885c859391802451b867c30f1694
[ "Apache-2.0" ]
4
2018-10-25T08:42:56.000Z
2019-04-24T04:01:26.000Z
os_ken/lib/sockopt.py
anlaneg/os-ken
379a7694c3129cc0156343af71f4fca8830d9de5
[ "Apache-2.0" ]
1
2021-05-09T06:14:16.000Z
2021-05-09T06:14:18.000Z
os_ken/lib/sockopt.py
anlaneg/os-ken
379a7694c3129cc0156343af71f4fca8830d9de5
[ "Apache-2.0" ]
5
2019-04-24T04:01:01.000Z
2020-06-20T14:38:04.000Z
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp> # # 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:...
30.180556
77
0.682006
import platform import socket import struct from os_ken.lib import sockaddr TCP_MD5SIG_LINUX = 0x0e TCP_MD5SIG_BSD = 0x10 def _set_tcp_md5sig_linux(s, addr, key): af = s.family if af == socket.AF_INET: sa = sockaddr.sa_in4(addr) elif af == socket.AF_INET6: s...
true
true
f72e9456c271e20b045e78bd9e5b9a814fc335e4
854
py
Python
source/cmdline_test.py
birdwes/Asterisk_Google_Authenticator
85d1eec3bcf8ca5a3b8df258e00096a4854101dc
[ "MIT" ]
1
2022-02-13T19:03:17.000Z
2022-02-13T19:03:17.000Z
source/cmdline_test.py
birdwes/Asterisk_Google_Authenticator
85d1eec3bcf8ca5a3b8df258e00096a4854101dc
[ "MIT" ]
null
null
null
source/cmdline_test.py
birdwes/Asterisk_Google_Authenticator
85d1eec3bcf8ca5a3b8df258e00096a4854101dc
[ "MIT" ]
2
2022-02-14T09:02:48.000Z
2022-02-16T06:50:40.000Z
#!/usr/bin/env python3 import sys import hashlib import hmac import base64 import secrets import re import datetime from datetime import timezone import math from GoogleOTP import GoogleOTP # Implementation of Google Authenticator verification # To generate secrets: # secret = generateSecret() # print( secret )...
21.897436
102
0.758782
import sys import hashlib import hmac import base64 import secrets import re import datetime from datetime import timezone import math from GoogleOTP import GoogleOTP class GoogleOTPfileLookup( GoogleOTP ): def lookupUserSecret( self, userID ): return 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' otp = GoogleO...
true
true
f72e9481f5e2c06c3f9ab22b5c21260254d1a13a
22,798
py
Python
django_sites/pegasus/venv/lib/python3.6/site-packages/postman/models.py
omaralaniz/pegasus
410d0f0bcaace704a81e62eba68f76bf13a79399
[ "MIT" ]
null
null
null
django_sites/pegasus/venv/lib/python3.6/site-packages/postman/models.py
omaralaniz/pegasus
410d0f0bcaace704a81e62eba68f76bf13a79399
[ "MIT" ]
1
2020-07-20T01:03:42.000Z
2020-07-20T01:03:42.000Z
django_sites/pegasus/venv/lib/python3.6/site-packages/postman/models.py
aguanlao/csc648-sp19-team104
5ebde40a2b93a9c0925ea422e9e173423f0fc940
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import hashlib try: from importlib import import_module except ImportError: from django.utils.importlib import import_module # Django 1.6 / py2.6 from django import VERSION from django.conf import settings from django.core.exceptions import ValidationError if VERSION < ...
39.71777
144
0.630055
from __future__ import unicode_literals import hashlib try: from importlib import import_module except ImportError: from django.utils.importlib import import_module from django import VERSION from django.conf import settings from django.core.exceptions import ValidationError if VERSION < (1, 10): from dja...
true
true
f72e9493dc3832bb184f22f70089b28ea0887e1a
10,895
py
Python
abraia/hsi.py
abraia/abraia-python
e49e3869b2ee7e6b1bcb41e0cc1ae126ac39e202
[ "MIT" ]
4
2018-03-23T22:32:53.000Z
2020-08-25T12:42:00.000Z
abraia/hsi.py
abraia/abraia-multiple
e49e3869b2ee7e6b1bcb41e0cc1ae126ac39e202
[ "MIT" ]
5
2021-02-18T20:29:09.000Z
2022-03-29T09:28:57.000Z
abraia/hsi.py
abraia/abraia-python
e49e3869b2ee7e6b1bcb41e0cc1ae126ac39e202
[ "MIT" ]
1
2021-01-22T23:51:14.000Z
2021-01-22T23:51:14.000Z
import os import wget import tempfile import numpy as np import scipy.io as sio import scipy.ndimage as nd from PIL import Image from sklearn.svm import SVC from sklearn.utils import resample from sklearn.decomposition import PCA from sklearn.model_selection import train_test_split from sklearn.metrics import classifi...
40.055147
130
0.659752
import os import wget import tempfile import numpy as np import scipy.io as sio import scipy.ndimage as nd from PIL import Image from sklearn.svm import SVC from sklearn.utils import resample from sklearn.decomposition import PCA from sklearn.model_selection import train_test_split from sklearn.metrics import classifi...
true
true
f72e951622f6044f08a25ce59529d0101e14827c
1,346
py
Python
adminmgr/media/code/A3/task2/BD_749_1674.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/A3/task2/BD_749_1674.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/A3/task2/BD_749_1674.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
from pyspark.sql.types import StructType import pyspark.sql.functions as F from pyspark.sql.functions import explode from pyspark.sql.functions import split from pyspark.sql import SparkSession,SQLContext from pyspark import SparkContext,SparkConf spark = SparkSession \ .builder \ .appName("task1") \ .get...
28.638298
133
0.708024
from pyspark.sql.types import StructType import pyspark.sql.functions as F from pyspark.sql.functions import explode from pyspark.sql.functions import split from pyspark.sql import SparkSession,SQLContext from pyspark import SparkContext,SparkConf spark = SparkSession \ .builder \ .appName("task1") \ .get...
true
true
f72e9525bfd75b58c874cba5b790cbac710cb9dd
14,113
py
Python
research/object_detection/export_tflite_ssd_graph_lib.py
gujralsanyam22/models
d96f8f043dbe2b5ca8ea1785f57df8faf68d8875
[ "Apache-2.0" ]
82,518
2016-02-05T12:07:23.000Z
2022-03-31T23:09:47.000Z
research/object_detection/export_tflite_ssd_graph_lib.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
9,021
2016-03-08T01:02:05.000Z
2022-03-31T08:06:35.000Z
research/object_detection/export_tflite_ssd_graph_lib.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
54,341
2016-02-06T17:19:55.000Z
2022-03-31T10:27:44.000Z
# Lint as: python2, python3 # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
42.128358
101
0.728194
import os import tempfile import numpy as np import tensorflow.compat.v1 as tf from tensorflow.core.framework import attr_value_pb2 from tensorflow.core.framework import types_pb2 from tensorflow.core.protobuf import saver_pb2 from object_detection import exporter from object_detection.builders import graph_rewriter_bu...
true
true
f72e965b76a38bbb24d1f12720ee08067253c519
510
py
Python
lab2/number_even.py
irisxiu666/5001
07ea4bac4fa7c1f961d93bdd9723716b2452adc4
[ "MIT" ]
null
null
null
lab2/number_even.py
irisxiu666/5001
07ea4bac4fa7c1f961d93bdd9723716b2452adc4
[ "MIT" ]
null
null
null
lab2/number_even.py
irisxiu666/5001
07ea4bac4fa7c1f961d93bdd9723716b2452adc4
[ "MIT" ]
null
null
null
""" A program to judge whether an integer is odd or even.""" def main(): # Input the number with integer type. number = int(input('Input number: ')) # Assuming the reminder of the number dividing by 2 is 0, # the number is even and print it out. if number % 2 == 0: print(number, 'is even')...
26.842105
64
0.621569
def main(): number = int(input('Input number: ')) if number % 2 == 0: print(number, 'is even') # the number is odd and print it out. else: print(number, 'is odd') if __name__ == '__main__': main()
true
true
f72e96c7a9c0f18f6c980fcbc1de140fbd826ae4
3,370
py
Python
vulnerabilities/importers/archlinux.py
ziadhany/vulnerablecode
c94ed5701a70bc836a66484f6d54aacc81c4288f
[ "Apache-2.0" ]
null
null
null
vulnerabilities/importers/archlinux.py
ziadhany/vulnerablecode
c94ed5701a70bc836a66484f6d54aacc81c4288f
[ "Apache-2.0" ]
null
null
null
vulnerabilities/importers/archlinux.py
ziadhany/vulnerablecode
c94ed5701a70bc836a66484f6d54aacc81c4288f
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) nexB Inc. and others. All rights reserved. # VulnerableCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/vulnerablecode for support or download. # See https://aboutcode.org for mor...
33.366337
97
0.546884
import dataclasses import json from typing import Iterable from typing import List from typing import Mapping from typing import Set from urllib.request import urlopen from packageurl import PackageURL from vulnerabilities import severity_systems from vulnerabilities.importer import AdvisoryData from vulnerabilities....
true
true
f72e96f5af4b264e6fbcdc962ecc0d3a0e21838e
14,369
py
Python
jni-build/jni/include/tensorflow/python/training/server_lib_test.py
rcelebi/android-elfali
4ea14a58a18356ef9e16aba2e7dae84c02afba12
[ "Apache-2.0" ]
680
2016-12-03T14:38:28.000Z
2022-02-16T04:06:45.000Z
tensorflow/python/training/server_lib_test.py
alainrk/tensorflow
314d9cd9b607460f8bfea80fc828b1521ca18443
[ "Apache-2.0" ]
38
2016-11-17T08:43:51.000Z
2019-11-12T12:27:04.000Z
tensorflow/python/training/server_lib_test.py
alainrk/tensorflow
314d9cd9b607460f8bfea80fc828b1521ca18443
[ "Apache-2.0" ]
250
2016-12-05T10:37:17.000Z
2022-03-18T21:26:55.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.322078
80
0.664416
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import numpy as np import tensorflow as tf class GrpcServerTest(tf.test.TestCase): def testRunStep(self): server = tf.train.Server.create_local_server() with tf.Session(server.target)...
true
true
f72e975ec68de10ec951352b654b92d2aa5f1c53
908
py
Python
tests/xgboost_data/models.py
wmonteiro92/xmoai-examples
0286d57e15cb60693f57cdff386cbb246787442b
[ "MIT" ]
1
2021-03-22T11:31:00.000Z
2021-03-22T11:31:00.000Z
tests/xgboost_data/models.py
wmonteiro92/xmoai-examples
0286d57e15cb60693f57cdff386cbb246787442b
[ "MIT" ]
null
null
null
tests/xgboost_data/models.py
wmonteiro92/xmoai-examples
0286d57e15cb60693f57cdff386cbb246787442b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jul 17 21:16:08 2020 @author: wmonteiro92 """ from xgboost import XGBRegressor, XGBClassifier def train_ml_model(X, y, algorithm, random_state=0): """Train one dataset in Python. :param X: the input values. :type X: np.array :param y: the targ...
27.515152
76
0.643172
from xgboost import XGBRegressor, XGBClassifier def train_ml_model(X, y, algorithm, random_state=0): if algorithm == 'XGBClassifier': model = XGBClassifier(random_state=random_state) elif algorithm == 'XGBRegressor': model = XGBRegressor(random_state=random_state) model...
true
true
f72e97da7df88495c60eae65539637bc4aa922b9
18,895
py
Python
timml/model.py
Huite/timml
5eb52066be094326343fe26b46555253fef44dc9
[ "MIT" ]
24
2015-09-13T17:11:58.000Z
2021-12-14T09:09:17.000Z
timml/model.py
Huite/timml
5eb52066be094326343fe26b46555253fef44dc9
[ "MIT" ]
42
2015-09-23T19:29:34.000Z
2022-01-17T09:13:14.000Z
timml/model.py
Huite/timml
5eb52066be094326343fe26b46555253fef44dc9
[ "MIT" ]
26
2015-08-24T17:25:27.000Z
2021-07-09T14:09:30.000Z
""" Model classes """ import numpy as np import sys import inspect # Used for storing the input from .aquifer import Aquifer from .aquifer_parameters import param_maq, param_3d from .constant import ConstantStar from .util import PlotTim import multiprocessing as mp __all__ = ['Model', 'ModelMaq', 'Model3D'] class...
35.450281
117
0.54136
import numpy as np import sys import inspect from .aquifer import Aquifer from .aquifer_parameters import param_maq, param_3d from .constant import ConstantStar from .util import PlotTim import multiprocessing as mp __all__ = ['Model', 'ModelMaq', 'Model3D'] class Model(PlotTim): def __init__(self, kaq, c,...
true
true
f72e99326922bbcda505ef3370008898b5c3b5e9
19,599
py
Python
Lib/ntpath.py
jimmyyu2004/jython
5b4dc2d54d01a6fda8c55d07b2608167e7a40769
[ "CNRI-Jython" ]
332
2015-08-22T12:43:56.000Z
2022-03-17T01:05:43.000Z
Lib/ntpath.py
Pandinosaurus/jython3
def4f8ec47cb7a9c799ea4c745f12badf92c5769
[ "CNRI-Jython" ]
36
2015-05-30T08:39:19.000Z
2022-03-04T20:42:33.000Z
Lib/ntpath.py
Pandinosaurus/jython3
def4f8ec47cb7a9c799ea4c745f12badf92c5769
[ "CNRI-Jython" ]
74
2015-05-29T17:18:53.000Z
2022-01-15T14:06:44.000Z
# Module 'ntpath' -- common operations on WinNT/Win95 pathnames """Common pathname manipulations, WindowsNT/95 version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import sys import stat import genericpath import warnings from genericpath import * __all__ ...
34.935829
80
0.542017
import os import sys import stat import genericpath import warnings from genericpath import * __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","getctime", "islink","exists","lexists","isdir","isfile", ...
true
true
f72e99b87018df0efd9d0456b5f140f1ca7e69aa
1,994
py
Python
apprentice/learners/when_learners/actor_critic.py
pearlfranz20/AL_Core
6592079330c7ec3ca264b86f8414970ddab06c0e
[ "MIT" ]
10
2019-11-01T01:09:57.000Z
2022-02-17T09:15:12.000Z
apprentice/learners/when_learners/actor_critic.py
pearlfranz20/AL_Core
6592079330c7ec3ca264b86f8414970ddab06c0e
[ "MIT" ]
40
2019-08-06T18:01:31.000Z
2021-07-15T12:38:56.000Z
apprentice/learners/when_learners/actor_critic.py
pearlfranz20/AL_Core
6592079330c7ec3ca264b86f8414970ddab06c0e
[ "MIT" ]
6
2019-08-15T01:45:19.000Z
2021-06-01T19:54:29.000Z
import torch import torch.nn as nn class ValueNet(nn.Module): """ The part of the actor critic network that computes the state value. Also, returns the hidden layer before state valuation, for use in action network. """ def __init__(self, n_inputs: int, n_hidden: int = None): """ ...
29.323529
79
0.600802
import torch import torch.nn as nn class ValueNet(nn.Module): def __init__(self, n_inputs: int, n_hidden: int = None): super(ValueNet, self).__init__() if n_hidden is None: n_hidden = (n_inputs + 2) // 2 self.n_hidden = n_hidden self.hidden = nn.Sequential( ...
true
true
f72e99c211ca13bdd9ce866e317332537579f66b
413
py
Python
Hackerrank-Solutions/Hackerrank-Python-Solutions/Introduction/Python If-Else.py
HetDaftary/Competitive-Coding-Solutions
a683fa11895410c6eef07b1a68054f3e90aa596b
[ "MIT" ]
null
null
null
Hackerrank-Solutions/Hackerrank-Python-Solutions/Introduction/Python If-Else.py
HetDaftary/Competitive-Coding-Solutions
a683fa11895410c6eef07b1a68054f3e90aa596b
[ "MIT" ]
null
null
null
Hackerrank-Solutions/Hackerrank-Python-Solutions/Introduction/Python If-Else.py
HetDaftary/Competitive-Coding-Solutions
a683fa11895410c6eef07b1a68054f3e90aa596b
[ "MIT" ]
null
null
null
#!/bin/python import math import os import random import re import sys if __name__ == '__main__': n = int(input().strip()) if n % 2: # odd. print("Weird") elif n < 5: # All the elif never come if number is odd. print("Not Weird") elif n < 21: # If number in 2 to 5 than above wi...
18.772727
84
0.581114
import math import os import random import re import sys if __name__ == '__main__': n = int(input().strip()) if n % 2: print("Weird") elif n < 5: print("Not Weird") elif n < 21: print("Weird") else: print("Not Weird")
true
true
f72e9a5c6673bca078109fe2cc00c921bf182f20
6,244
py
Python
Surround.py
jcartledge/sublime-surround
204831d3b9f5219c155b43363c17d6eb606bbe7b
[ "MIT" ]
22
2015-03-19T09:27:26.000Z
2021-12-04T14:04:39.000Z
Surround.py
jcartledge/sublime-surround
204831d3b9f5219c155b43363c17d6eb606bbe7b
[ "MIT" ]
2
2016-02-05T11:19:22.000Z
2017-04-09T05:44:56.000Z
Surround.py
jcartledge/sublime-surround
204831d3b9f5219c155b43363c17d6eb606bbe7b
[ "MIT" ]
5
2015-01-09T08:37:31.000Z
2020-07-11T12:33:33.000Z
import sublime import sublime_plugin import re class SurroundWindowCommand(sublime_plugin.WindowCommand): """ Base class for surround window commands """ def run(self, sel=None): self.sel = sel self.window.show_input_panel( self.caption(), "", self.callback, None, None) class Su...
34.120219
89
0.604901
import sublime import sublime_plugin import re class SurroundWindowCommand(sublime_plugin.WindowCommand): def run(self, sel=None): self.sel = sel self.window.show_input_panel( self.caption(), "", self.callback, None, None) class SurroundSelectionWindowCommand(SurroundWindowCommand):...
true
true
f72e9b984ac71cf8b83b845a772ada6289eeca8c
1,947
py
Python
src/pysilk/__main__.py
wyapx/Python-Silk-Module
65619c79f78ac930073a8424ddb981b66d97ecde
[ "BSD-2-Clause" ]
null
null
null
src/pysilk/__main__.py
wyapx/Python-Silk-Module
65619c79f78ac930073a8424ddb981b66d97ecde
[ "BSD-2-Clause" ]
null
null
null
src/pysilk/__main__.py
wyapx/Python-Silk-Module
65619c79f78ac930073a8424ddb981b66d97ecde
[ "BSD-2-Clause" ]
null
null
null
import argparse import time from . import encode_file, decode_file from .utils import get_file from .wav import Wave parser = argparse.ArgumentParser("pysilk", description="encode/decode your silk file") parser.add_argument("-sr", "--sample-rate", default=24000, help="set pcm samplerate") parser.add_argument("-q", "-...
37.442308
115
0.618387
import argparse import time from . import encode_file, decode_file from .utils import get_file from .wav import Wave parser = argparse.ArgumentParser("pysilk", description="encode/decode your silk file") parser.add_argument("-sr", "--sample-rate", default=24000, help="set pcm samplerate") parser.add_argument("-q", "-...
true
true
f72e9bc5fdf1a9d36616a60693fa75d25f25a068
42,688
py
Python
src/framework.py
peter-clemenko/ptf
b250de6b68159a98936df17c6c0a179e6e0010e4
[ "FTL" ]
null
null
null
src/framework.py
peter-clemenko/ptf
b250de6b68159a98936df17c6c0a179e6e0010e4
[ "FTL" ]
null
null
null
src/framework.py
peter-clemenko/ptf
b250de6b68159a98936df17c6c0a179e6e0010e4
[ "FTL" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # PTF Main framework look and feel # # main module imports from src.core import * import sys import readline import os import time import getpass try: import pexpect pexpect_check = 1 except: print("[!] python-pexpect not installed, gitlab will not work") ...
52.377914
273
0.513517
from src.core import * import sys import readline import os import time import getpass try: import pexpect pexpect_check = 1 except: print("[!] python-pexpect not installed, gitlab will not work") print("[!] Run pip install pexpect to install pexpect for gitlab support.") pexpect_check = 0 try:...
true
true
f72e9d1be433245d491d2fe54afdb73351728508
3,862
py
Python
tlidb/TLiDB/datasets/clinc150_dataset.py
alon-albalak/TLiDB
4f3524a3bbe7580e417dd884c4dc8751bdaf8855
[ "MIT" ]
null
null
null
tlidb/TLiDB/datasets/clinc150_dataset.py
alon-albalak/TLiDB
4f3524a3bbe7580e417dd884c4dc8751bdaf8855
[ "MIT" ]
null
null
null
tlidb/TLiDB/datasets/clinc150_dataset.py
alon-albalak/TLiDB
4f3524a3bbe7580e417dd884c4dc8751bdaf8855
[ "MIT" ]
null
null
null
from .TLiDB_dataset import TLiDB_Dataset from tlidb.TLiDB.metrics.all_metrics import Accuracy class clinc150_dataset(TLiDB_Dataset): """ CLINC150 dataset This is the full dataset from https://github.com/clinc/oos-eval Input (x): - text (str): Text utterance Target (y): - label (li...
36.780952
93
0.551787
from .TLiDB_dataset import TLiDB_Dataset from tlidb.TLiDB.metrics.all_metrics import Accuracy class clinc150_dataset(TLiDB_Dataset): _dataset_name = "clinc150" _tasks = ["intent_detection"] _url = "https://drive.google.com/uc?export=download&id=1dG6KXQ6L7xpbnWmhW9Xo3vPSfYstk43E" def __init__(self, task...
true
true
f72e9dda78207301c3e7659b1baf989a356f877b
9,707
py
Python
aesara/tensor/nnet/conv3d2d.py
anirudhacharya/Theano-PyMC
55f54243cf88397b032ebc7121d1090ee91aea7d
[ "BSD-3-Clause" ]
null
null
null
aesara/tensor/nnet/conv3d2d.py
anirudhacharya/Theano-PyMC
55f54243cf88397b032ebc7121d1090ee91aea7d
[ "BSD-3-Clause" ]
null
null
null
aesara/tensor/nnet/conv3d2d.py
anirudhacharya/Theano-PyMC
55f54243cf88397b032ebc7121d1090ee91aea7d
[ "BSD-3-Clause" ]
null
null
null
import aesara from aesara import tensor as at from aesara.gradient import DisconnectedType from aesara.graph.basic import Apply from aesara.graph.op import Op from aesara.graph.opt import TopoOptimizer, copy_stack_trace, local_optimizer def get_diagonal_subtensor_view(x, i0, i1): """ Helper function for Diago...
29.685015
89
0.609457
import aesara from aesara import tensor as at from aesara.gradient import DisconnectedType from aesara.graph.basic import Apply from aesara.graph.op import Op from aesara.graph.opt import TopoOptimizer, copy_stack_trace, local_optimizer def get_diagonal_subtensor_view(x, i0, i1): i0 = int(i0) i1 = int...
true
true
f72e9f4df3baeedd0f0a991769dc963a8cee6f32
897
py
Python
python/tvm/driver/tvmc/__main__.py
mwillsey/incubator-tvm
e02dc69fef294eb73dd65d18949ed9e108f60cda
[ "Apache-2.0" ]
4
2019-05-08T04:46:07.000Z
2019-11-11T19:43:04.000Z
python/tvm/driver/tvmc/__main__.py
mwillsey/incubator-tvm
e02dc69fef294eb73dd65d18949ed9e108f60cda
[ "Apache-2.0" ]
3
2020-04-20T15:37:55.000Z
2020-05-13T05:34:28.000Z
python/tvm/driver/tvmc/__main__.py
mwillsey/incubator-tvm
e02dc69fef294eb73dd65d18949ed9e108f60cda
[ "Apache-2.0" ]
2
2019-08-08T01:48:03.000Z
2019-09-27T06:49:16.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.88
62
0.758082
from .main import main if __name__ == "__main__": main()
true
true
f72e9fae2a5cbb0065907b84dcb83ecc498baec3
161
py
Python
delicious_treat/__init__.py
briggySmalls/delicious-treat
92a4eb3ba56262b4b167e06dce52a4cb4b1bb5fb
[ "MIT" ]
null
null
null
delicious_treat/__init__.py
briggySmalls/delicious-treat
92a4eb3ba56262b4b167e06dce52a4cb4b1bb5fb
[ "MIT" ]
3
2020-03-24T17:57:40.000Z
2021-02-02T22:23:51.000Z
delicious_treat/__init__.py
briggySmalls/delicious-treat
92a4eb3ba56262b4b167e06dce52a4cb4b1bb5fb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for delicious treat.""" __author__ = """Sam Briggs""" __email__ = 'briggySmalls90@gmail.com' __version__ = '0.1.0'
23
44
0.658385
__author__ = """Sam Briggs""" __email__ = 'briggySmalls90@gmail.com' __version__ = '0.1.0'
true
true
f72e9feb8ce2f78432251248f5f7ea13e9f2b929
10,321
py
Python
salt/states/csf.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
1
2020-04-09T03:25:10.000Z
2020-04-09T03:25:10.000Z
salt/states/csf.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
salt/states/csf.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ CSF Ip tables management ======================== :depends: - csf utility :configuration: See http://download.configserver.com/csf/install.txt for setup instructions. .. code-block:: yaml Simply allow/deny rules: csf.rule_present: ip: 1.2.3.4 method: allow """...
24.990315
87
0.560314
from __future__ import absolute_import, print_function, unicode_literals import logging from salt.ext import six log = logging.getLogger(__name__) def __virtual__(): return "csf" def rule_present( name, method, port=None, proto="tcp", direction="in", port_origin="d", ip_origin="s"...
true
true
f72ea02cfd7d58ff08cac71df6447397276916de
1,902
py
Python
tests/test_text.py
ankurRakuten/WebHelper
5e36d75161588260371978b8a42f4adf1f0ec252
[ "BSD-3-Clause" ]
null
null
null
tests/test_text.py
ankurRakuten/WebHelper
5e36d75161588260371978b8a42f4adf1f0ec252
[ "BSD-3-Clause" ]
null
null
null
tests/test_text.py
ankurRakuten/WebHelper
5e36d75161588260371978b8a42f4adf1f0ec252
[ "BSD-3-Clause" ]
1
2019-07-31T11:00:05.000Z
2019-07-31T11:00:05.000Z
# -*- coding: utf-8 -*- from util import WebHelpersTestCase import unittest from nose.tools import eq_ from webhelpers.text import * class TestTextHelper(WebHelpersTestCase): def test_excerpt(self): self.assertEqual("...lo my wo...", excerpt("hello my world", "my", 3)) ...
38.816327
88
0.572555
from util import WebHelpersTestCase import unittest from nose.tools import eq_ from webhelpers.text import * class TestTextHelper(WebHelpersTestCase): def test_excerpt(self): self.assertEqual("...lo my wo...", excerpt("hello my world", "my", 3)) self.assertEqual("......
true
true
f72ea0bd5ec69a1e378dcf4fa5f871d867ab1210
5,929
py
Python
tensorflow_model_analysis/eval_saved_model/testutil.py
hakanhp/chanel
6825b60e86c46daabb18f40f1e45d3de2ff8e983
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/eval_saved_model/testutil.py
hakanhp/chanel
6825b60e86c46daabb18f40f1e45d3de2ff8e983
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/eval_saved_model/testutil.py
hakanhp/chanel
6825b60e86c46daabb18f40f1e45d3de2ff8e983
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
40.889655
89
0.624051
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import tempfile import tensorflow as tf from tensorflow_model_analysis.types_compat import Dict, Iterable, Union, Sequence, Tuple from tensorflow.core.example import example_pb2 class Tensorflo...
true
true
f72ea42d49b9e748dddd0ea72f10fa57fb092cbe
14,348
py
Python
torch_utils.py
MDoid10111/EMNLP2020
97e4da06abc72873a4830cfa53c035a27eb3975b
[ "MIT" ]
42
2020-10-13T19:47:37.000Z
2022-03-26T09:56:46.000Z
torch_utils.py
MDoid10111/EMNLP2020
97e4da06abc72873a4830cfa53c035a27eb3975b
[ "MIT" ]
null
null
null
torch_utils.py
MDoid10111/EMNLP2020
97e4da06abc72873a4830cfa53c035a27eb3975b
[ "MIT" ]
5
2020-11-30T14:48:44.000Z
2022-02-19T17:18:21.000Z
import numpy as np import torch, os import torch.nn.utils.rnn as rnn_utils from typing import Tuple import torch.nn as nn import torch.nn.functional as F from PIL import Image import torchvision from torchvision import transforms def flatten(x): ''' flatten high dimensional tensor x into an array :param x...
31.259259
118
0.625802
import numpy as np import torch, os import torch.nn.utils.rnn as rnn_utils from typing import Tuple import torch.nn as nn import torch.nn.functional as F from PIL import Image import torchvision from torchvision import transforms def flatten(x): dims = x.size()[1:] num_features = 1 for s in dims: num_feat...
true
true
f72ea474aea803c8551d2dd9a3d642ba5bdfa8bf
6,529
py
Python
qa/rpc-tests/txn_doublespend.py
mirzaei-ce/core-outbit
3ebf7d8f398fa564c593433f7808d0a1d35809b9
[ "MIT" ]
null
null
null
qa/rpc-tests/txn_doublespend.py
mirzaei-ce/core-outbit
3ebf7d8f398fa564c593433f7808d0a1d35809b9
[ "MIT" ]
null
null
null
qa/rpc-tests/txn_doublespend.py
mirzaei-ce/core-outbit
3ebf7d8f398fa564c593433f7808d0a1d35809b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with a double-spend conflict # from test_framework.test_framework import Outb...
45.657343
111
0.606065
from test_framework.test_framework import OutbitTestFramework from test_framework.util import * class TxnMallTest(OutbitTestFramework): def add_options(self, parser): parser.add_option("--mineblock", dest="mine_block", default=False, action="store_true", help="Test double-spend...
true
true
f72ea519259a797fa9330cd2c0f999cf42083662
3,975
py
Python
diverse/conveyor.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/conveyor.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/conveyor.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
import os import time import shutil import hashlib import mimetypes from django.core.files.storage import FileSystemStorage from . import settings class VersionGenerationError(Exception): pass class Conveyor(object): # convention: storage should operate files on local filesystem # to allow processors us...
37.149533
80
0.580881
import os import time import shutil import hashlib import mimetypes from django.core.files.storage import FileSystemStorage from . import settings class VersionGenerationError(Exception): pass class Conveyor(object): storage_allowed = (FileSystemStorage,) storage = None def __init__(self, *...
true
true
f72ea553a3dff77429beda1663ea93edb12f2be7
56
py
Python
tests/__init__.py
dougppaz/pyaml_env
09d3c43da39d5f997ac88b0b7e9945de797eca02
[ "MIT" ]
30
2021-04-27T15:26:28.000Z
2022-03-29T17:12:36.000Z
tests/__init__.py
dougppaz/pyaml_env
09d3c43da39d5f997ac88b0b7e9945de797eca02
[ "MIT" ]
12
2021-04-28T11:43:15.000Z
2022-03-03T17:48:17.000Z
tests/__init__.py
dougppaz/pyaml_env
09d3c43da39d5f997ac88b0b7e9945de797eca02
[ "MIT" ]
10
2021-04-29T00:31:08.000Z
2022-03-14T13:49:54.000Z
import os import sys sys.path.insert(0, (os.getcwd()))
11.2
33
0.696429
import os import sys sys.path.insert(0, (os.getcwd()))
true
true
f72ea6730b4f2126d264157f36867ba7c80f59b1
8,491
py
Python
test/functional/wallet_accounts.py
ALQO-GitHub-Official/new-chain
b993c07397f91860311e2f9e207cb84fdd3a3ffa
[ "MIT" ]
110
2019-07-12T11:46:31.000Z
2022-02-18T19:47:23.000Z
test/functional/wallet_accounts.py
ALQO-GitHub-Official/new-chain
b993c07397f91860311e2f9e207cb84fdd3a3ffa
[ "MIT" ]
29
2018-10-23T21:28:56.000Z
2021-02-10T14:42:59.000Z
test/functional/wallet_accounts.py
ALQO-GitHub-Official/new-chain
b993c07397f91860311e2f9e207cb84fdd3a3ffa
[ "MIT" ]
55
2018-10-20T13:40:39.000Z
2022-03-07T07:13:02.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-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 account RPCs. RPCs tested are: - getaccountaddress - getaddressesbyaccount - listaddr...
41.827586
83
0.668119
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal class WalletAccountsTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [[]] def run_test(self): no...
true
true
f72ea7749502804e63cabefce69af2c3762767e4
2,268
py
Python
server/tests/test_patients.py
ishitakapoor26/Nutrihelp
5bac42aaee61884f9ee7415caf441e80b7b03b48
[ "MIT" ]
22
2021-02-15T10:30:59.000Z
2022-01-09T07:10:36.000Z
server/tests/test_patients.py
Ayonijakaushik19/Nutrihelp
85926b187a6bfcf80f1f1cd60667ed3d14dce0be
[ "MIT" ]
51
2021-02-27T15:42:15.000Z
2022-03-01T15:02:03.000Z
server/tests/test_patients.py
Ayonijakaushik19/Nutrihelp
85926b187a6bfcf80f1f1cd60667ed3d14dce0be
[ "MIT" ]
25
2021-02-14T17:49:23.000Z
2022-02-27T18:27:39.000Z
from bson.json_util import dumps from ..app import app from json import dumps as pretty class glo: patient_id = [] g = glo() userid = ['1k33224', '60961d77a7090edb5b69c62c'] patient = { 'name': 'Abhishek shrivastava', 'age': 19, 'gender': 'M', 'mobile': '9022930339' } patient2 = { 'name': ...
23.142857
64
0.53351
from bson.json_util import dumps from ..app import app from json import dumps as pretty class glo: patient_id = [] g = glo() userid = ['1k33224', '60961d77a7090edb5b69c62c'] patient = { 'name': 'Abhishek shrivastava', 'age': 19, 'gender': 'M', 'mobile': '9022930339' } patient2 = { 'name': ...
true
true
f72ea7d8dd96b72bf999b8d29730d781aa003ace
321
py
Python
main/migrations/0002_remove_project_created_date.py
NancyWachiuri/AwardsApp
c4eb0a87ab528c2166d1bd27e3ec6302e7ef08df
[ "MIT" ]
null
null
null
main/migrations/0002_remove_project_created_date.py
NancyWachiuri/AwardsApp
c4eb0a87ab528c2166d1bd27e3ec6302e7ef08df
[ "MIT" ]
null
null
null
main/migrations/0002_remove_project_created_date.py
NancyWachiuri/AwardsApp
c4eb0a87ab528c2166d1bd27e3ec6302e7ef08df
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-05 00:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='project', name='created_date', ), ]...
17.833333
47
0.582555
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='project', name='created_date', ), ]
true
true
f72ea823aa4b99280f01169d6a40994760c8465e
3,674
py
Python
18.Web Scraping with Python Scrapy - RM/03_Advanced_Techniques/news_scraper_challenge/news_scraper_challenge/middlewares.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
3
2020-06-01T04:17:18.000Z
2020-12-18T03:05:55.000Z
18.Web Scraping with Python Scrapy - RM/03_Advanced_Techniques/news_scraper_challenge/news_scraper_challenge/middlewares.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
1
2020-04-25T08:01:59.000Z
2020-04-25T08:01:59.000Z
18.Web Scraping with Python Scrapy - RM/03_Advanced_Techniques/news_scraper_challenge/news_scraper_challenge/middlewares.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
7
2020-04-26T10:02:36.000Z
2021-06-08T05:12:46.000Z
# Define here the models for your spider middleware # # See documentation in: # https://docs.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals # useful for handling different item types with a single interface from itemadapter import is_item, ItemAdapter class NewsScraperChallengeSpiderM...
35.326923
78
0.676647
from scrapy import signals from itemadapter import is_item, ItemAdapter class NewsScraperChallengeSpiderMiddleware: @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) return s def pro...
true
true
f72ea85064b2c2a6f54570529a6ce35ac41d67bd
488
py
Python
astronomy_datamodels/tests/test_subarray.py
spacetelescope/astronomy_datamodels
ca5db82d5982781ea763cef9851d4c982fd86328
[ "BSD-3-Clause" ]
1
2019-03-08T03:06:43.000Z
2019-03-08T03:06:43.000Z
astronomy_datamodels/tests/test_subarray.py
spacetelescope/astronomy_datamodels
ca5db82d5982781ea763cef9851d4c982fd86328
[ "BSD-3-Clause" ]
1
2020-10-29T19:54:28.000Z
2020-10-29T19:54:28.000Z
astronomy_datamodels/tests/test_subarray.py
spacetelescope/astronomy_datamodels
ca5db82d5982781ea763cef9851d4c982fd86328
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest import numpy as np asdf = pytest.importorskip('asdf', minversion='2.0.0.dev0') from asdf import util from asdf.tests import helpers from ..subarray import Subarray def test1(tmpdir, ret=False): subarray = Subarr...
28.705882
71
0.702869
import pytest import numpy as np asdf = pytest.importorskip('asdf', minversion='2.0.0.dev0') from asdf import util from asdf.tests import helpers from ..subarray import Subarray def test1(tmpdir, ret=False): subarray = Subarray(offset=(100, 131), size=(256, 256), name='SA1') tree = {'subarray': subarray} ...
true
true
f72ea9c1cb6d29549be75d7beed55fe01e257814
707
py
Python
tests/framework/RunFailures/failer.py
rinelson456/raven
1114246136a2f72969e75b5e99a11b35500d4eef
[ "Apache-2.0" ]
159
2017-03-24T21:07:06.000Z
2022-03-20T13:44:40.000Z
tests/framework/RunFailures/failer.py
rinelson456/raven
1114246136a2f72969e75b5e99a11b35500d4eef
[ "Apache-2.0" ]
1,667
2017-03-27T14:41:22.000Z
2022-03-31T19:50:06.000Z
tests/framework/RunFailures/failer.py
rinelson456/raven
1114246136a2f72969e75b5e99a11b35500d4eef
[ "Apache-2.0" ]
95
2017-03-24T21:05:03.000Z
2022-03-08T17:30:22.000Z
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
39.277778
74
0.746818
def run(self,Input): if self.x+self.y > 0: raise IOError('Testing, testing, 1,2,3.') self.ans = self.x+self.y
true
true
f72eaa3113edd3d25a929e626271bcff8fa160e6
1,162
py
Python
ver-3/backup_ver3.py
Emmanuel-Temitope/backup-problem-solved
c5e10bc586c9fc449c6e13d08f9ad0d964105c67
[ "MIT" ]
null
null
null
ver-3/backup_ver3.py
Emmanuel-Temitope/backup-problem-solved
c5e10bc586c9fc449c6e13d08f9ad0d964105c67
[ "MIT" ]
null
null
null
ver-3/backup_ver3.py
Emmanuel-Temitope/backup-problem-solved
c5e10bc586c9fc449c6e13d08f9ad0d964105c67
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Jun 9 18:52:56 2019 @author: Emmanuel-Temitope """ import os import time #location of directory source = [r'source', '"Another source"'] #targer directory target_dir = r'target' if not os.path.exists(target_dir): os.mkdir(target_dir) today = target_dir + os.sep ...
22.784314
63
0.654905
import os import time source = [r'source', '"Another source"'] target_dir = r'target' if not os.path.exists(target_dir): os.mkdir(target_dir) today = target_dir + os.sep + time.strftime('%Y%m%d') now = time.strftime('%H%M%S') comment = input('Enter a comment --> ') if len(comment) == 0: target = today ...
true
true
f72eaa8f5af2633482ecb8f03a085435a35f5fa3
4,852
py
Python
archive/attention.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
archive/attention.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
archive/attention.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Nov 5 22:53:44 2020 @author: Emmett """ import tensorflow as tf import os from tensorflow.python.keras.layers import Layer from tensorflow.python.keras import backend as K class AttentionLayer(Layer): """ This class implements Bahdanau attention (http...
39.447154
102
0.543899
import tensorflow as tf import os from tensorflow.python.keras.layers import Layer from tensorflow.python.keras import backend as K class AttentionLayer(Layer): def __init__(self, **kwargs): super(AttentionLayer, self).__init__(**kwargs) def build(self, input_shape): assert isins...
true
true
f72eabe57eec9d5c6a19eec2a538f36cdca7eb4c
637
py
Python
src/cbapi/__init__.py
rlmaers/cbapi-python
395763e609ba1338ff3c7540395a6f2804e94584
[ "MIT" ]
3
2019-01-23T19:11:33.000Z
2022-02-25T02:06:51.000Z
src/cbapi/__init__.py
rlmaers/cbapi-python
395763e609ba1338ff3c7540395a6f2804e94584
[ "MIT" ]
null
null
null
src/cbapi/__init__.py
rlmaers/cbapi-python
395763e609ba1338ff3c7540395a6f2804e94584
[ "MIT" ]
1
2022-02-25T02:06:52.000Z
2022-02-25T02:06:52.000Z
from __future__ import absolute_import import cbapi.six __title__ = 'cbapi' __author__ = 'Carbon Black Developer Network' __license__ = 'MIT' __copyright__ = 'Copyright 2018 Carbon Black' __version__ = '1.3.6' # New API as of cbapi 0.9.0 from cbapi.response.rest_api import CbEnterpriseResponseAPI, CbResponseAPI from...
31.85
80
0.821036
from __future__ import absolute_import import cbapi.six __title__ = 'cbapi' __author__ = 'Carbon Black Developer Network' __license__ = 'MIT' __copyright__ = 'Copyright 2018 Carbon Black' __version__ = '1.3.6' from cbapi.response.rest_api import CbEnterpriseResponseAPI, CbResponseAPI from cbapi.protection.rest_api i...
true
true
f72eac1b900c7f609802611bd21042c02362d0e3
16,499
py
Python
telethon/client/users.py
polisitni1/DogeClickBot
ac57eaeefca2c6ab9e48458f9f928a6a421a162e
[ "MIT" ]
null
null
null
telethon/client/users.py
polisitni1/DogeClickBot
ac57eaeefca2c6ab9e48458f9f928a6a421a162e
[ "MIT" ]
null
null
null
telethon/client/users.py
polisitni1/DogeClickBot
ac57eaeefca2c6ab9e48458f9f928a6a421a162e
[ "MIT" ]
null
null
null
import asyncio import itertools import logging import time from .telegrambaseclient import TelegramBaseClient from .. import errors, utils from ..tl import TLObject, TLRequest, types, functions __log__ = logging.getLogger(__name__) _NOT_A_REQUEST = TypeError('You can only invoke requests, not types!') class UserMet...
41.042289
80
0.576217
import asyncio import itertools import logging import time from .telegrambaseclient import TelegramBaseClient from .. import errors, utils from ..tl import TLObject, TLRequest, types, functions __log__ = logging.getLogger(__name__) _NOT_A_REQUEST = TypeError('You can only invoke requests, not types!') class UserMet...
true
true
f72ead7d4b9e3e317119cf83ac6cb3d4a19f18ec
340
py
Python
examples/resetting_errors.py
MK8J/dobot-python
3ce4a2a5d6e9ae5ab6d42546eab0228419e82e8e
[ "MIT" ]
null
null
null
examples/resetting_errors.py
MK8J/dobot-python
3ce4a2a5d6e9ae5ab6d42546eab0228419e82e8e
[ "MIT" ]
null
null
null
examples/resetting_errors.py
MK8J/dobot-python
3ce4a2a5d6e9ae5ab6d42546eab0228419e82e8e
[ "MIT" ]
null
null
null
''' A script to try and reset from a stage error without having to turn off the dobot ''' import sys import os sys.path.append(os.path.abspath('..')) import connecting #connect bot = connecting.connect() bot.reset_pose(1,45,45) # 0 is false, will try to automatically reset? bot.clear_alarms_state() bot.serial.close(...
17
70
0.738235
import sys import os sys.path.append(os.path.abspath('..')) import connecting bot = connecting.connect() bot.reset_pose(1,45,45) bot.clear_alarms_state() bot.serial.close()
true
true
f72eadfc88eda868eba4d4b77c1b8a758b724676
18,817
py
Python
src/docker-images/job-exporter/test/test_collector.py
jinlmsft/Apulis-AI-Platform
2cf1fbb50e08b477940f5f336b1b897a49608b72
[ "MIT" ]
38
2020-07-13T08:46:39.000Z
2021-02-08T01:38:44.000Z
src/docker-images/job-exporter/test/test_collector.py
debbie-alaine/DLWorkspace
2888042c0f9388f911bc74fe5ecd20ef3fabd715
[ "MIT" ]
null
null
null
src/docker-images/job-exporter/test/test_collector.py
debbie-alaine/DLWorkspace
2888042c0f9388f911bc74fe5ecd20ef3fabd715
[ "MIT" ]
20
2020-07-14T03:38:50.000Z
2021-01-08T06:24:17.000Z
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation # the rights to ...
38.718107
128
0.634905
import os import sys import unittest import datetime import time import logging import base sys.path.append(os.path.abspath("../src/")) import collector import nvidia import docker_inspect from collector import ContainerCollector from collector import GpuCollector logger = logging.getLogger(__name__) class TestC...
true
true
f72eae12827e90588b406e44397f79f94ffd2658
5,224
py
Python
spacy/lemmatizer.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
null
null
null
spacy/lemmatizer.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
null
null
null
spacy/lemmatizer.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
null
null
null
# coding: utf8 from __future__ import unicode_literals from collections import OrderedDict from .symbols import NOUN, VERB, ADJ, PUNCT, PROPN from .errors import Errors from .lookups import Lookups from .parts_of_speech import NAMES as UPOS_NAMES class Lemmatizer(object): """ The Lemmatizer supports simple ...
37.049645
100
0.612749
from __future__ import unicode_literals from collections import OrderedDict from .symbols import NOUN, VERB, ADJ, PUNCT, PROPN from .errors import Errors from .lookups import Lookups from .parts_of_speech import NAMES as UPOS_NAMES class Lemmatizer(object): @classmethod def load(cls, *args, **kwargs): ...
true
true