hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c2c659cd569322139014dd69e52efc1ae242aa0
3,339
py
Python
test/test_simple/test_multiswitch.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
test/test_simple/test_multiswitch.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
test/test_simple/test_multiswitch.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
33.727273
79
0.648997
import mock from nicos.core import ConfigurationError, InvalidValueError, LimitError, \ NicosError, PositionError, status from test.utils import raises session_setup = 'multiswitch' def test_multi_switcher(session): sc1 = session.getDevice('sc1') x = session.getDevice('x') ...
true
true
1c2c6644942a06b5e2cb6058c9c5629cf6809176
2,524
py
Python
pkgs/grep_p2/grep_p2.py
Morphux/installer
a26419838fcfc156a93a42c1516157e2aae54d9c
[ "Apache-2.0" ]
null
null
null
pkgs/grep_p2/grep_p2.py
Morphux/installer
a26419838fcfc156a93a42c1516157e2aae54d9c
[ "Apache-2.0" ]
null
null
null
pkgs/grep_p2/grep_p2.py
Morphux/installer
a26419838fcfc156a93a42c1516157e2aae54d9c
[ "Apache-2.0" ]
null
null
null
################################### LICENSE #################################### # Copyright 2016 Morphux # # # # Licensed under the Apache License, Version 2.0 (the "License"); ...
40.709677
90
0.442155
true
true
1c2c664cd146ce55db4b181d0f81c3dcacfa2a68
26,955
py
Python
flaml/model.py
dan0nchik/FLAML
9d661759b49de6e403d9288af7a015606528fe7e
[ "Apache-2.0" ]
null
null
null
flaml/model.py
dan0nchik/FLAML
9d661759b49de6e403d9288af7a015606528fe7e
[ "Apache-2.0" ]
null
null
null
flaml/model.py
dan0nchik/FLAML
9d661759b49de6e403d9288af7a015606528fe7e
[ "Apache-2.0" ]
null
null
null
'''! * Copyright (c) 2020-2021 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. ''' import numpy as np import xgboost as xgb import time from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier from sklearn.ensemble import ExtraTreesRegressor, ExtraTreesClassi...
36.036096
81
0.551475
import numpy as np import xgboost as xgb import time from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier from sklearn.ensemble import ExtraTreesRegressor, ExtraTreesClassifier from sklearn.linear_model import LogisticRegression from lightgbm import LGBMClassifier, LGBMRegressor from scip...
true
true
1c2c67ee1b5f4c5fbb03ab10efcc9133f3946fa0
843
py
Python
metarecord/migrations/0036_add_classification_function_allowed.py
kerkkoheiskanen/helerm
bdaf801a940d42325a1076b42bb0edef831fbac9
[ "MIT" ]
2
2017-04-21T15:36:23.000Z
2020-12-04T09:32:39.000Z
metarecord/migrations/0036_add_classification_function_allowed.py
kerkkoheiskanen/helerm
bdaf801a940d42325a1076b42bb0edef831fbac9
[ "MIT" ]
168
2016-10-05T12:58:41.000Z
2021-08-31T14:29:56.000Z
metarecord/migrations/0036_add_classification_function_allowed.py
kerkkoheiskanen/helerm
bdaf801a940d42325a1076b42bb0edef831fbac9
[ "MIT" ]
7
2016-10-13T12:51:36.000Z
2021-01-21T13:05:04.000Z
# Generated by Django 2.0.1 on 2018-01-12 12:04 from django.db import migrations, models def populate_function_allowed(apps, schema_editor): Classification = apps.get_model('metarecord', 'Classification') for classification in Classification.objects.all(): classification.function_allowed = not class...
30.107143
86
0.699881
from django.db import migrations, models def populate_function_allowed(apps, schema_editor): Classification = apps.get_model('metarecord', 'Classification') for classification in Classification.objects.all(): classification.function_allowed = not classification.children.exists() classificat...
true
true
1c2c68c004e78ae9ce7a1151915aa845b798f605
1,051
py
Python
toontown/ai/DistributedBlackCatMgrAI.py
CrankySupertoon01/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
1
2021-02-13T22:40:50.000Z
2021-02-13T22:40:50.000Z
toontown/ai/DistributedBlackCatMgrAI.py
CrankySupertoonArchive/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
toontown/ai/DistributedBlackCatMgrAI.py
CrankySupertoonArchive/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
2
2019-12-02T01:39:10.000Z
2021-02-13T22:41:00.000Z
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from toontown.toon.ToonDNA import ToonDNA from toontown.toonbase import ToontownGlobals class DistributedBlackCatMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory...
43.791667
113
0.743102
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from toontown.toon.ToonDNA import ToonDNA from toontown.toonbase import ToontownGlobals class DistributedBlackCatMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory...
true
true
1c2c68cda1ba5abb7f297c0c2cbabf3c195e892b
202
py
Python
examples/HelloWorld.py
piotrmaslanka/systemy
fff963cb9622f6a449524bea2ee10bb9503bcaa6
[ "MIT" ]
null
null
null
examples/HelloWorld.py
piotrmaslanka/systemy
fff963cb9622f6a449524bea2ee10bb9503bcaa6
[ "MIT" ]
null
null
null
examples/HelloWorld.py
piotrmaslanka/systemy
fff963cb9622f6a449524bea2ee10bb9503bcaa6
[ "MIT" ]
1
2021-11-28T09:52:04.000Z
2021-11-28T09:52:04.000Z
from yos.rt import BaseTasklet from yos.tasklets import Tasklet from yos.io import NetworkSocket class HelloWorldTasklet(BaseTasklet): def on_startup(self): print('Hello World!')
20.2
37
0.727723
from yos.rt import BaseTasklet from yos.tasklets import Tasklet from yos.io import NetworkSocket class HelloWorldTasklet(BaseTasklet): def on_startup(self): print('Hello World!')
true
true
1c2c696274b2d93fa0051a0dbadbbce7c014e570
1,384
py
Python
web/books/management/commands/books.py
hdknr/django-books
b4bf6d144240edc4bcfc94180377adaadc9e533c
[ "MIT" ]
null
null
null
web/books/management/commands/books.py
hdknr/django-books
b4bf6d144240edc4bcfc94180377adaadc9e533c
[ "MIT" ]
null
null
null
web/books/management/commands/books.py
hdknr/django-books
b4bf6d144240edc4bcfc94180377adaadc9e533c
[ "MIT" ]
null
null
null
from django.utils import translation ,timezone from django.conf import settings from datetime import datetime, time, timedelta import djclick as click from logging import getLogger from collections import OrderedDict import requests import yaml import os import uuid import itertools from books import models log = getLo...
22.688525
77
0.732659
from django.utils import translation ,timezone from django.conf import settings from datetime import datetime, time, timedelta import djclick as click from logging import getLogger from collections import OrderedDict import requests import yaml import os import uuid import itertools from books import models log = getLo...
true
true
1c2c6a527f99317b1fa4a91b5989f19c6b3bc987
5,605
py
Python
survival_evaluation/evaluations.py
haiderstats/survival_evaluation
70e3a4d530a61549609689e3ebd80818f3ab14d9
[ "MIT" ]
4
2021-03-02T00:33:22.000Z
2021-10-06T12:33:19.000Z
survival_evaluation/evaluations.py
haiderstats/survival_evaluation
70e3a4d530a61549609689e3ebd80818f3ab14d9
[ "MIT" ]
null
null
null
survival_evaluation/evaluations.py
haiderstats/survival_evaluation
70e3a4d530a61549609689e3ebd80818f3ab14d9
[ "MIT" ]
null
null
null
from typing import Optional import numpy as np # type: ignore from scipy.stats import chi2 # type: ignore from survival_evaluation.types import NumericArrayLike from survival_evaluation.utility import ( KaplanMeier, KaplanMeierArea, to_array, validate_size, ) # pylint: disable=too-many-arguments d...
36.633987
88
0.70116
from typing import Optional import numpy as np from scipy.stats import chi2 from survival_evaluation.types import NumericArrayLike from survival_evaluation.utility import ( KaplanMeier, KaplanMeierArea, to_array, validate_size, ) def l1( event_times: NumericArrayLike, event_indicators: ...
true
true
1c2c6a9b7cfebf83a0d807beb46af8faed3075a5
8,978
py
Python
plugin/plugins/network/check_ibm_san_directors_crcs.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
2
2015-12-17T04:00:30.000Z
2015-12-22T11:49:01.000Z
plugin/plugins/network/check_ibm_san_directors_crcs.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
null
null
null
plugin/plugins/network/check_ibm_san_directors_crcs.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
1
2017-02-20T22:57:17.000Z
2017-02-20T22:57:17.000Z
#!/usr/bin/env python2.7 # -*- coding: UTF-8 -*- #=============================================================================== # Name : check_ibm_san_directors_crcs.py # Authors : Canux CHENG <canuxcheng@gmail.com> # Description : Check IBM SAN Directors for CRCs on ports. #-------------------------...
37.099174
118
0.597349
import logging as log from pprint import pformat import traceback from time import time from datetime import datetime import math from shared import __version__ from monitoring.nagios.plugin import NagiosPluginSNMP logger = log.getLogger('plugin') class IBMSanDirectorsCRC(NagiosPluginSNMP): ...
true
true
1c2c6b4afff1c3c11a4c616543565ad5bc21a643
11,347
py
Python
tests/auth_tests/test_validators.py
Fak3/django
1ae8014a0bbae0cc1d951c1ee0f7888b6141f582
[ "PSF-2.0", "BSD-3-Clause" ]
19
2015-07-07T02:08:59.000Z
2021-11-08T11:05:40.000Z
tests/auth_tests/test_validators.py
Fak3/django
1ae8014a0bbae0cc1d951c1ee0f7888b6141f582
[ "PSF-2.0", "BSD-3-Clause" ]
2
2020-03-13T18:15:37.000Z
2020-03-16T18:33:38.000Z
tests/auth_tests/test_validators.py
Fak3/django
1ae8014a0bbae0cc1d951c1ee0f7888b6141f582
[ "PSF-2.0", "BSD-3-Clause" ]
145
2019-03-14T18:54:45.000Z
2022-03-04T20:25:31.000Z
import os from django.contrib.auth import validators from django.contrib.auth.models import User from django.contrib.auth.password_validation import ( CommonPasswordValidator, MinimumLengthValidator, NumericPasswordValidator, UserAttributeSimilarityValidator, get_default_password_validators, get_password_v...
43.30916
110
0.689345
import os from django.contrib.auth import validators from django.contrib.auth.models import User from django.contrib.auth.password_validation import ( CommonPasswordValidator, MinimumLengthValidator, NumericPasswordValidator, UserAttributeSimilarityValidator, get_default_password_validators, get_password_v...
true
true
1c2c6ba87184c8614268e8666ecd7ffc3d3da608
1,868
py
Python
tests/acceptance/test_organization_rate_limits.py
JannKleen/sentry
8b29c8234bb51a81d5cab821a1f2ed4ea8e8bd88
[ "BSD-3-Clause" ]
1
2019-02-27T15:13:06.000Z
2019-02-27T15:13:06.000Z
tests/acceptance/test_organization_rate_limits.py
rmax/sentry
8b29c8234bb51a81d5cab821a1f2ed4ea8e8bd88
[ "BSD-3-Clause" ]
5
2020-07-17T11:20:41.000Z
2021-05-09T12:16:53.000Z
tests/acceptance/test_organization_rate_limits.py
zaasmi/codeerrorhelp
1ab8d3e314386b9b2d58dad9df45355bf6014ac9
[ "BSD-3-Clause" ]
2
2021-01-26T09:53:39.000Z
2022-03-22T09:01:47.000Z
from __future__ import absolute_import from django.utils import timezone from mock import Mock, patch from sentry.testutils import AcceptanceTestCase class OrganizationRateLimitsTest(AcceptanceTestCase): def setUp(self): super(OrganizationRateLimitsTest, self).setUp() self.user = self.create_use...
38.122449
81
0.662741
from __future__ import absolute_import from django.utils import timezone from mock import Mock, patch from sentry.testutils import AcceptanceTestCase class OrganizationRateLimitsTest(AcceptanceTestCase): def setUp(self): super(OrganizationRateLimitsTest, self).setUp() self.user = self.create_use...
true
true
1c2c6cb9e5f2a0bb11c0027ddc29692246a672bf
712
py
Python
Algorithms/Easy/500. Keyboard Row/answer.py
KenWoo/Algorithm
4012a2f0a099a502df1e5df2e39faa75fe6463e8
[ "Apache-2.0" ]
null
null
null
Algorithms/Easy/500. Keyboard Row/answer.py
KenWoo/Algorithm
4012a2f0a099a502df1e5df2e39faa75fe6463e8
[ "Apache-2.0" ]
null
null
null
Algorithms/Easy/500. Keyboard Row/answer.py
KenWoo/Algorithm
4012a2f0a099a502df1e5df2e39faa75fe6463e8
[ "Apache-2.0" ]
null
null
null
from typing import List class Solution: def findWords(self, words: List[str]) -> List[str]: l1 = "qwertyuiop" l2 = "asdfghjkl" l3 = "zxcvbnm" res = [] for w in words: tmp = [] for c in w: c = c.lower() if c in l1: ...
23.733333
61
0.414326
from typing import List class Solution: def findWords(self, words: List[str]) -> List[str]: l1 = "qwertyuiop" l2 = "asdfghjkl" l3 = "zxcvbnm" res = [] for w in words: tmp = [] for c in w: c = c.lower() if c in l1: ...
true
true
1c2c6d144c9c98ed224fc1dcd860aa913fbc7268
5,400
py
Python
src/sage/repl/configuration.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
4
2020-07-17T04:49:44.000Z
2020-07-29T06:33:51.000Z
src/sage/repl/configuration.py
Ivo-Maffei/sage
467fbc70a08b552b3de33d9065204ee9cbfb02c7
[ "BSL-1.0" ]
1
2020-04-18T16:30:43.000Z
2020-04-18T16:30:43.000Z
src/sage/repl/configuration.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
1
2020-07-23T10:40:14.000Z
2020-07-23T10:40:14.000Z
r""" Sage's IPython Configuration TESTS: We check that Sage stdin can be piped in even if stdout is a tty; In that case the IPython simple prompt is being used:: sage: cmd = 'print([sys.stdin.isatty(), sys.stdout.isatty()])' sage: import pexpect sage: output = pexpect.run( ....: 'bash -c \'echo "...
30
88
0.599074
from __future__ import absolute_import import sys import copy from traitlets.config.loader import Config from sage.repl.prompts import SagePrompts SAGE_EXTENSION = 'sage' class SageIpythonConfiguration(object): def _doctest_mode(self): from sage.doctest import DOCTEST_MODE return D...
true
true
1c2c6d5ee9b956cecf5d71c01f591b811b204490
57,919
py
Python
test/functional/test_framework/mininode.py
honeycomb-project/litecoin
636cc4974613040ca15bdedf803ec5ac2bb59c30
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
honeycomb-project/litecoin
636cc4974613040ca15bdedf803ec5ac2bb59c30
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
honeycomb-project/litecoin
636cc4974613040ca15bdedf803ec5ac2bb59c30
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin P2P ...
30.923118
262
0.597593
import asyncore from codecs import encode from collections import defaultdict import copy import hashlib from io import BytesIO import logging import random import socket import struct import sys import time from threading import RLock, Thread import honeycomb_scrypt from test_framework.siphash import siphash25...
true
true
1c2c6e74502a6c621fd01f854bf4f97c4970f8a2
986
py
Python
tf_quant_finance/math/root_search/__init__.py
slowy07/tf-quant-finance
0976f720fb58a2d7bfd863640c12a2425cd2f94f
[ "Apache-2.0" ]
3,138
2019-07-24T21:43:17.000Z
2022-03-30T12:11:09.000Z
tf_quant_finance/math/root_search/__init__.py
slowy07/tf-quant-finance
0976f720fb58a2d7bfd863640c12a2425cd2f94f
[ "Apache-2.0" ]
63
2019-09-07T19:16:03.000Z
2022-03-29T19:29:40.000Z
tf_quant_finance/math/root_search/__init__.py
slowy07/tf-quant-finance
0976f720fb58a2d7bfd863640c12a2425cd2f94f
[ "Apache-2.0" ]
423
2019-07-26T21:28:05.000Z
2022-03-26T13:07:44.000Z
# Lint as: python3 # Copyright 2021 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 agr...
34
109
0.776876
from tf_quant_finance.math.root_search.brent import brentq from tf_quant_finance.math.root_search.newton import root_finder as newton_root from tensorflow.python.util.all_util import remove_undocumented _allowed_symbols = [ 'brentq', 'newton_root', ] remove_undocumented(__name__, _allowed_s...
true
true
1c2c6eb508fbb7db0f4bc9542432ad2c73f2504b
181
py
Python
modules/__init__.py
trislaz/SimCLR
d7c8950a1afc8adad4e617e7ecd90a0d3828740f
[ "MIT" ]
null
null
null
modules/__init__.py
trislaz/SimCLR
d7c8950a1afc8adad4e617e7ecd90a0d3828740f
[ "MIT" ]
null
null
null
modules/__init__.py
trislaz/SimCLR
d7c8950a1afc8adad4e617e7ecd90a0d3828740f
[ "MIT" ]
null
null
null
from .simclr import SimCLR from .nt_xent import NT_Xent from .logistic_regression import LogisticRegression from .lars import LARS from .dataloader import dataset, datasetWSI_simple
36.2
51
0.856354
from .simclr import SimCLR from .nt_xent import NT_Xent from .logistic_regression import LogisticRegression from .lars import LARS from .dataloader import dataset, datasetWSI_simple
true
true
1c2c6f1bcf8a0d65242015ce640b42950c65e4f4
316
py
Python
errorges/config/docs.py
paurosello/errorges
c91f48282f28224dee33d9feb77ca9abd6e2eb5b
[ "MIT" ]
null
null
null
errorges/config/docs.py
paurosello/errorges
c91f48282f28224dee33d9feb77ca9abd6e2eb5b
[ "MIT" ]
null
null
null
errorges/config/docs.py
paurosello/errorges
c91f48282f28224dee33d9feb77ca9abd6e2eb5b
[ "MIT" ]
null
null
null
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/errorges" # docs_base_url = "https://[org_name].github.io/errorges" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "Errorges"
26.333333
68
0.724684
def get_context(context): context.brand_html = "Errorges"
true
true
1c2c6f46414369ce2c51604c5dc0bf18f43b745e
11,171
py
Python
contrib/runners/orquesta_runner/tests/unit/test_cancel.py
shusugmt/st2
31da26badfb4ca3fb3e8cae07cfeec4791191afd
[ "Apache-2.0" ]
null
null
null
contrib/runners/orquesta_runner/tests/unit/test_cancel.py
shusugmt/st2
31da26badfb4ca3fb3e8cae07cfeec4791191afd
[ "Apache-2.0" ]
null
null
null
contrib/runners/orquesta_runner/tests/unit/test_cancel.py
shusugmt/st2
31da26badfb4ca3fb3e8cae07cfeec4791191afd
[ "Apache-2.0" ]
null
null
null
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
46.740586
95
0.760183
from __future__ import absolute_import import mock import st2tests from oslo_config import cfg import st2tests.config as tests_config tests_config.parse_args() from tests.unit import base from st2common.bootstrap import actionsregistrar from st2common.bootstrap import runnersregistrar from st2comm...
true
true
1c2c710854e2a2abe4f872614d3e8b926df1f78f
4,933
py
Python
pandapower/test/opf/test_dcline.py
Zamwell/pandapower
ce51946342109e969b87b60c8883d7eec02d3060
[ "BSD-3-Clause" ]
1
2019-06-16T05:06:03.000Z
2019-06-16T05:06:03.000Z
pandapower/test/opf/test_dcline.py
Zamwell/pandapower
ce51946342109e969b87b60c8883d7eec02d3060
[ "BSD-3-Clause" ]
null
null
null
pandapower/test/opf/test_dcline.py
Zamwell/pandapower
ce51946342109e969b87b60c8883d7eec02d3060
[ "BSD-3-Clause" ]
1
2022-02-07T14:11:03.000Z
2022-02-07T14:11:03.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2016-2019 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import pytest from numpy import array, allclose, isclose import pandapower as pp from pandapower.test.consistency_checks import c...
38.539063
96
0.700993
import pytest from numpy import array, allclose, isclose import pandapower as pp from pandapower.test.consistency_checks import consistency_checks try: import pplog as logging except ImportError: import logging logger = logging.getLogger(__name__) @pytest.fixture def dcline_net(): net = pp.create...
true
true
1c2c711f45577a76148ae8af191d115d86196cec
8,486
py
Python
client/filesystem.py
thatch/pyre-check
31278b71081ec3a3636f0d94da91dc0e4273ece9
[ "MIT" ]
null
null
null
client/filesystem.py
thatch/pyre-check
31278b71081ec3a3636f0d94da91dc0e4273ece9
[ "MIT" ]
null
null
null
client/filesystem.py
thatch/pyre-check
31278b71081ec3a3636f0d94da91dc0e4273ece9
[ "MIT" ]
null
null
null
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import errno import fcntl import functools import logging import os import shutil import subprocess from contextlib import contextmanager from typin...
30.415771
88
0.604054
import errno import fcntl import functools import logging import os import shutil import subprocess from contextlib import contextmanager from typing import ContextManager, Dict, Generator, Iterable, List, Optional, Set from .exceptions import EnvironmentException LOG: logging.Logger = logging.getLogger(__name_...
true
true
1c2c72c9b6e06a520d20d2c1e0da2ce4a3097892
1,391
py
Python
hackerrank/algorithms/Implementation/caesar-cipher.py
codervikash/online-courses
a60efad23af65080a98e7dd038fb2c750237b781
[ "MIT" ]
null
null
null
hackerrank/algorithms/Implementation/caesar-cipher.py
codervikash/online-courses
a60efad23af65080a98e7dd038fb2c750237b781
[ "MIT" ]
null
null
null
hackerrank/algorithms/Implementation/caesar-cipher.py
codervikash/online-courses
a60efad23af65080a98e7dd038fb2c750237b781
[ "MIT" ]
null
null
null
# Julius Caesar protected his confidential information by encrypting it in a cipher. Caesar's cipher rotated every letter in a string by a fixed number, KK, making it unreadable by his enemies. Given a string, SS, and a number, KK, encrypt SS and print the resulting string. # # Note: The cipher only encrypts letters; s...
32.348837
274
0.626168
# # Note: The cipher only encrypts letters; symbols, such as -, remain unencrypted. # # Input Format # # The first line contains an integer, NN, which is the length of the unencrypted string. # The second line contains the unencrypted string, SS. # The third line contains the integer encryption key, KK, which is the n...
false
true
1c2c733fc10a2c7c9bd106f46e4f2937d96ffece
4,121
py
Python
test/jpypetest/test_caller_sensitive.py
pitmanst/jpype
7256261e435b5c9309941c668258bebd1bcdff2d
[ "Apache-2.0" ]
531
2018-07-19T03:30:04.000Z
2022-03-29T16:52:44.000Z
test/jpypetest/test_caller_sensitive.py
pitmanst/jpype
7256261e435b5c9309941c668258bebd1bcdff2d
[ "Apache-2.0" ]
715
2018-07-18T09:21:01.000Z
2022-03-24T17:45:49.000Z
test/jpypetest/test_caller_sensitive.py
pitmanst/jpype
7256261e435b5c9309941c668258bebd1bcdff2d
[ "Apache-2.0" ]
80
2018-07-18T13:10:55.000Z
2022-03-31T19:47:16.000Z
# ***************************************************************************** # # 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 # # ...
36.469027
79
0.67605
import jpype import common class JCallerSensitiveCase(common.JPypeTestCase): def setUp(self): common.JPypeTestCase.setUp(self) if not jpype.getJVMVersion() > (1, 8, 0): raise common.unittest.SkipTest self.Class = jpype.JClass("jpype.method.Caller") se...
true
true
1c2c73f8fcee516f5d2087002b4b428c69c7db50
32,923
py
Python
orgbook-issuer-agent/issuer_controller/src/issuer.py
BrendanBeachBC/jag-lcrb-carla-public
cd270e463ea5995073a609a86be7ca5a1e9b8ca3
[ "Apache-2.0" ]
7
2019-03-06T20:11:00.000Z
2021-09-04T13:58:10.000Z
orgbook-issuer-agent/issuer_controller/src/issuer.py
BrendanBeachBC/jag-lcrb-carla-public
cd270e463ea5995073a609a86be7ca5a1e9b8ca3
[ "Apache-2.0" ]
47
2018-07-21T22:39:11.000Z
2022-03-02T13:08:36.000Z
orgbook-issuer-agent/issuer_controller/src/issuer.py
BrendanBeachBC/jag-lcrb-carla-public
cd270e463ea5995073a609a86be7ca5a1e9b8ca3
[ "Apache-2.0" ]
20
2018-12-12T14:15:09.000Z
2022-03-23T00:01:34.000Z
import json import os import threading import time from datetime import datetime import requests import logging import random import requests from flask import jsonify from src import config AGENT_ADMIN_API_KEY = os.environ.get("AGENT_ADMIN_API_KEY") ADMIN_REQUEST_HEADERS = {"Content-Type": "application/json"} if AG...
35.515642
111
0.598184
import json import os import threading import time from datetime import datetime import requests import logging import random import requests from flask import jsonify from src import config AGENT_ADMIN_API_KEY = os.environ.get("AGENT_ADMIN_API_KEY") ADMIN_REQUEST_HEADERS = {"Content-Type": "application/json"} if AG...
true
true
1c2c74ebac6f9b761ec268cc65a3a706ab9a78fd
620
py
Python
setup.py
EndevelCZ/flexibee-export
fdc333249ec2ebf438009469d9229ea6f6532b62
[ "MIT" ]
null
null
null
setup.py
EndevelCZ/flexibee-export
fdc333249ec2ebf438009469d9229ea6f6532b62
[ "MIT" ]
null
null
null
setup.py
EndevelCZ/flexibee-export
fdc333249ec2ebf438009469d9229ea6f6532b62
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="flexibee_export", version="0.1.0", author="Endevel", author_email="info@endevel.cz", description="FlexiBee xml export package", long_description=long_description, long_description_...
29.52381
59
0.670968
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="flexibee_export", version="0.1.0", author="Endevel", author_email="info@endevel.cz", description="FlexiBee xml export package", long_description=long_description, long_description_...
true
true
1c2c7514183a01a411328b1524fc7485a462acfa
65
py
Python
python/testData/mover/outsideStatement_afterUp.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/mover/outsideStatement_afterUp.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/mover/outsideStatement_afterUp.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def foo(): a = 1 a = 3 if a: pass a = 4
8.125
12
0.292308
def foo(): a = 1 a = 3 if a: pass a = 4
true
true
1c2c75f5f5b645fe3d21e5d7ac21ebfec9f0fd10
3,154
py
Python
submodel/resnet.py
yukyeongleee/CodeTemplate
d0777d501bf64b01ea63787c75b505f7b76ebeda
[ "MIT" ]
null
null
null
submodel/resnet.py
yukyeongleee/CodeTemplate
d0777d501bf64b01ea63787c75b505f7b76ebeda
[ "MIT" ]
2
2022-03-15T09:00:29.000Z
2022-03-17T03:36:43.000Z
submodel/resnet.py
yukyeongleee/CodeTemplate
d0777d501bf64b01ea63787c75b505f7b76ebeda
[ "MIT" ]
1
2022-03-19T08:08:22.000Z
2022-03-19T08:08:22.000Z
import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as modelzoo from lib.utils import conv3x3 resnet18_url = 'https://download.pytorch.org/models/resnet18-5c106cde.pth' class Resnet18(nn.Module): def __init__(self): super(Resnet18, self).__init__() self.conv1 = nn....
35.044444
74
0.606214
import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as modelzoo from lib.utils import conv3x3 resnet18_url = 'https://download.pytorch.org/models/resnet18-5c106cde.pth' class Resnet18(nn.Module): def __init__(self): super(Resnet18, self).__init__() self.conv1 = nn....
true
true
1c2c76ffd1479b59a53f3ea57987fc92d476200e
2,931
py
Python
data/external/repositories_2to3/137656/blundercheck-master/combine/contest_20150210a/data_prep/make_scatterplots.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/137656/blundercheck-master/combine/contest_20150210a/data_prep/make_scatterplots.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/137656/blundercheck-master/combine/contest_20150210a/data_prep/make_scatterplots.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
#!/usr/bin/env python import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! import sys import seaborn as sns from pandas import read_pickle, qcut from itertools import combinations import matplotlib.pyplot as plt from djeval import * sns.set_palette("deep", desat=...
34.892857
103
0.578983
import matplotlib matplotlib.use('Agg') import sys import seaborn as sns from pandas import read_pickle, qcut from itertools import combinations import matplotlib.pyplot as plt from djeval import * sns.set_palette("deep", desat=.6) sns.set_context(rc={"figure.figsize": (8, 4)}) msg("Hello there, read...
true
true
1c2c78f323d191615d8945cd2e3207743a075eb0
1,570
py
Python
Ch5/jsondata_start.py
prottoyghose/python_essentials
029e3208b4be343315d384b6f6a4d77eb25f9fcb
[ "Apache-2.0" ]
null
null
null
Ch5/jsondata_start.py
prottoyghose/python_essentials
029e3208b4be343315d384b6f6a4d77eb25f9fcb
[ "Apache-2.0" ]
null
null
null
Ch5/jsondata_start.py
prottoyghose/python_essentials
029e3208b4be343315d384b6f6a4d77eb25f9fcb
[ "Apache-2.0" ]
null
null
null
# # Example file for parsing and processing JSON # import urllib.request import json def printResults(data): # Use the json module to load the string data into a dictionary theJSON = json.loads(data) # now we can access the contents of the JSON like any other Python object # if "title" in theJSON["metadat...
30.784314
86
0.666879
import urllib.request import json def printResults(data): theJSON = json.loads(data) for i in theJSON["features"]: if(i["properties"]["mag"] >= 4.0): print("%2.1f" % i["properties"]["mag"], i["properties"]["place"]) print("--------------------\n") ...
true
true
1c2c78ff440615a7440945f91e8b1bac0ee178b4
7,119
py
Python
tests/integration/sdk_api/base.py
daniels290813/mlrun
c95d90c3b4ce78d9b71456333ccd201f932d60ea
[ "Apache-2.0" ]
null
null
null
tests/integration/sdk_api/base.py
daniels290813/mlrun
c95d90c3b4ce78d9b71456333ccd201f932d60ea
[ "Apache-2.0" ]
null
null
null
tests/integration/sdk_api/base.py
daniels290813/mlrun
c95d90c3b4ce78d9b71456333ccd201f932d60ea
[ "Apache-2.0" ]
null
null
null
import copy import os import pathlib import subprocess import sys import pymysql import mlrun import mlrun.api.schemas import tests.conftest from mlrun.db.httpdb import HTTPRunDB from mlrun.utils import create_logger, retry_until_successful logger = create_logger(level="debug", name="test-integration") class TestM...
31.361233
114
0.580559
import copy import os import pathlib import subprocess import sys import pymysql import mlrun import mlrun.api.schemas import tests.conftest from mlrun.db.httpdb import HTTPRunDB from mlrun.utils import create_logger, retry_until_successful logger = create_logger(level="debug", name="test-integration") class TestM...
true
true
1c2c793926370a302016f44032ba3bdd72a3fa41
401
py
Python
radon_server/wsgi.py
leo212/radon_transform
04721c365d01e9b6a17eba4130a13d453844e27d
[ "Apache-2.0" ]
null
null
null
radon_server/wsgi.py
leo212/radon_transform
04721c365d01e9b6a17eba4130a13d453844e27d
[ "Apache-2.0" ]
2
2021-03-19T01:28:34.000Z
2022-01-13T01:19:59.000Z
radon_server/wsgi.py
leo212/radon_transform
04721c365d01e9b6a17eba4130a13d453844e27d
[ "Apache-2.0" ]
null
null
null
""" WSGI config for radon_server project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'radon_server.settings') application = get_wsgi_application()
true
true
1c2c7a20db73d48b38cdb71eedae1aceaf185ef0
667
py
Python
application/utilities/dict_mapping.py
kelp404/Victory
132f186f18ea6a709afb003e38ed1d6de3c0579f
[ "MIT" ]
15
2015-02-15T16:40:19.000Z
2021-02-01T21:31:26.000Z
application/utilities/dict_mapping.py
kelp404/Victory
132f186f18ea6a709afb003e38ed1d6de3c0579f
[ "MIT" ]
null
null
null
application/utilities/dict_mapping.py
kelp404/Victory
132f186f18ea6a709afb003e38ed1d6de3c0579f
[ "MIT" ]
1
2015-06-02T07:48:30.000Z
2015-06-02T07:48:30.000Z
class DictMapping: """ Dictionary Mapping copy all values in the dict object to the custom class instance. """ @staticmethod def inject(strong, dic): """ copy all value in dic to strong @param strong a custom class instance @param dic a dict object """ ...
26.68
68
0.506747
class DictMapping: @staticmethod def inject(strong, dic): if isinstance(dic, dict): for name in dir(strong): try: if name[:2] != '__' and name in dic: setattr(strong, name, dic[name]) except: pass ...
true
true
1c2c7a3489682f5b904e53760dcaba38a92ea875
82
py
Python
n2survey/plot/__init__.py
N2-Survey/SurveyFramework
8295fd9808c95db85befb1f60391460908a7d2b0
[ "MIT" ]
1
2022-01-26T19:04:38.000Z
2022-01-26T19:04:38.000Z
n2survey/plot/__init__.py
N2-Survey/SurveyFramework
8295fd9808c95db85befb1f60391460908a7d2b0
[ "MIT" ]
77
2021-09-14T09:33:03.000Z
2022-03-31T18:02:47.000Z
n2survey/plot/__init__.py
N2-Survey/SurveyFramework
8295fd9808c95db85befb1f60391460908a7d2b0
[ "MIT" ]
3
2021-09-14T20:11:28.000Z
2021-12-26T11:56:25.000Z
from .bar import * from .plot_likert import * from .plot_multiple_choice import *
20.5
35
0.780488
from .bar import * from .plot_likert import * from .plot_multiple_choice import *
true
true
1c2c7b901ddafeb5c8002732ecae960943849e2f
279
py
Python
PicoCTF 2018/Reversing/quackme/solve1.py
p-g-krish/CTF-Writeups
05ad6a9ecbc19ceb8890f4581dfee36f16d164aa
[ "MIT" ]
51
2018-06-26T09:49:42.000Z
2019-09-14T00:06:35.000Z
PicoCTF 2018/Reversing/quackme/solve1.py
p-g-krish/CTF-Writeups
05ad6a9ecbc19ceb8890f4581dfee36f16d164aa
[ "MIT" ]
1
2018-06-29T18:40:59.000Z
2018-07-09T20:29:41.000Z
PicoCTF 2018/Reversing/quackme/solve1.py
p-g-krish/CTF-Writeups
05ad6a9ecbc19ceb8890f4581dfee36f16d164aa
[ "MIT" ]
22
2019-10-03T14:52:43.000Z
2022-01-17T08:55:10.000Z
#!/usr/bin/env python3 key = b"\x29\x06\x16\x4F\x2B\x35\x30\x1E\x51\x1B\x5B\x14\x4B\x08\x5D\x2B\x5C\x10\x06\x06\x18\x45\x51\x00\x5D" cipher = b"You have now entered the Duck Web, and you're in for a honk" flag = "".join(chr(k^c) for k,c in zip(key,cipher[:len(key)])) print(flag)
55.8
109
0.695341
key = b"\x29\x06\x16\x4F\x2B\x35\x30\x1E\x51\x1B\x5B\x14\x4B\x08\x5D\x2B\x5C\x10\x06\x06\x18\x45\x51\x00\x5D" cipher = b"You have now entered the Duck Web, and you're in for a honk" flag = "".join(chr(k^c) for k,c in zip(key,cipher[:len(key)])) print(flag)
true
true
1c2c7c7b409d735c707e4a4f5156d62ffa140283
8,243
py
Python
tests/pre_merge/datasets/test_dataset.py
DavidHribek/anomalib
d8f6674bc4669fbad88cb61c235b1a2532ae44f5
[ "Apache-2.0" ]
null
null
null
tests/pre_merge/datasets/test_dataset.py
DavidHribek/anomalib
d8f6674bc4669fbad88cb61c235b1a2532ae44f5
[ "Apache-2.0" ]
null
null
null
tests/pre_merge/datasets/test_dataset.py
DavidHribek/anomalib
d8f6674bc4669fbad88cb61c235b1a2532ae44f5
[ "Apache-2.0" ]
null
null
null
"""Test Dataset.""" import os import numpy as np import pytest from anomalib.config import get_configurable_parameters, update_input_size_config from anomalib.data import ( BTechDataModule, FolderDataModule, MVTecDataModule, get_datamodule, ) from anomalib.pre_processing.transforms import Denormalize...
37.986175
106
0.677787
import os import numpy as np import pytest from anomalib.config import get_configurable_parameters, update_input_size_config from anomalib.data import ( BTechDataModule, FolderDataModule, MVTecDataModule, get_datamodule, ) from anomalib.pre_processing.transforms import Denormalize, ToNumpy from tests...
true
true
1c2c7cb28a9c66943438e1a885f3e8d0f3eca3a9
2,870
py
Python
ppgan/models/mpr_model.py
windstamp/PaddleGAN
4d9609d0ab9cf1058f564e354dfbc29c0ac3108a
[ "Apache-2.0" ]
6,852
2020-06-18T10:56:27.000Z
2022-03-31T10:17:47.000Z
ppgan/models/mpr_model.py
HighCWu/PaddleGAN
32132fa9aa288fbf0325105088b878adfaf16d75
[ "Apache-2.0" ]
283
2020-07-09T13:29:58.000Z
2022-03-23T02:50:25.000Z
ppgan/models/mpr_model.py
HighCWu/PaddleGAN
32132fa9aa288fbf0325105088b878adfaf16d75
[ "Apache-2.0" ]
973
2020-06-18T11:15:35.000Z
2022-03-30T10:50:16.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 appli...
32.247191
86
0.668641
import paddle import paddle.nn as nn from .builder import MODELS from .base_model import BaseModel from .generators.builder import build_generator from .criterions.builder import build_criterion from ..modules.init import reset_parameters, init_weights @MODELS.register() class MPRModel(BaseModel): ...
true
true
1c2c7cc33c3845044ace8661de804165d0fbb5df
9,169
py
Python
inun4d_kml.py
larryyin/barrier_interp
0836a1678117bba687e60fe0eb18fd29cae52a9f
[ "Unlicense" ]
2
2017-09-21T06:00:43.000Z
2020-03-19T03:58:41.000Z
inun4d_kml.py
larryyin/barrier_interp
0836a1678117bba687e60fe0eb18fd29cae52a9f
[ "Unlicense" ]
null
null
null
inun4d_kml.py
larryyin/barrier_interp
0836a1678117bba687e60fe0eb18fd29cae52a9f
[ "Unlicense" ]
null
null
null
#%% import time start = time.time() #import gdal, ogr, osr from osgeo import gdal from osgeo import ogr from osgeo import osr from osgeo.gdalnumeric import * from osgeo.gdalconst import * #import numpy as np #import scipy.ndimage as ndimage #import pandas as pd from subprocess import call from itertools import compres...
22.97995
106
0.599629
import time start = time.time() from osgeo import gdal from osgeo import ogr from osgeo import osr from osgeo.gdalnumeric import * from osgeo.gdalconst import * from subprocess import call from itertools import compress file_bool2 = '../inun_nj/inun_bool2.tif' file_poly2 = '../inun_nj/inun_poly2' file_wl = '...
true
true
1c2c7cf6d2836cb75f5b39d865a3c9ab7bf4e33d
1,024
py
Python
ProjectQ/utility.py
jclapis/qsfe
941488f8f8a81a4b7d7fe28414ce14fa478a692a
[ "Apache-2.0" ]
11
2019-06-02T01:47:24.000Z
2021-08-10T14:54:35.000Z
ProjectQ/utility.py
jclapis/qsfe
941488f8f8a81a4b7d7fe28414ce14fa478a692a
[ "Apache-2.0" ]
null
null
null
ProjectQ/utility.py
jclapis/qsfe
941488f8f8a81a4b7d7fe28414ce14fa478a692a
[ "Apache-2.0" ]
2
2020-04-19T17:39:23.000Z
2021-03-08T12:35:55.000Z
# ======================================================================== # Copyright (C) 2019 The MITRE Corporation. # # 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.apa...
32
74
0.587891
from projectq.ops import * def reset(qubits): for qubit in qubits: Measure | qubit if(int(qubit) == 1): X | qubit
true
true
1c2c7da22660d395318a62ddab8dbfdcc1d920e1
505
py
Python
parallel/__init__.py
sjwarner-bp/pyparallel
c79718e4fe700286dd27cfe5f756f9b37dcf48e8
[ "BSD-3-Clause" ]
36
2015-12-12T22:31:35.000Z
2022-02-15T08:49:51.000Z
parallel/__init__.py
sjwarner-bp/pyparallel
c79718e4fe700286dd27cfe5f756f9b37dcf48e8
[ "BSD-3-Clause" ]
12
2016-01-05T09:14:26.000Z
2022-03-11T12:56:53.000Z
parallel/__init__.py
sjwarner-bp/pyparallel
c79718e4fe700286dd27cfe5f756f9b37dcf48e8
[ "BSD-3-Clause" ]
23
2015-10-30T15:50:21.000Z
2022-01-05T04:54:20.000Z
# portable parallel port access with python # this is a wrapper module for different platform implementations # # (C)2001-2002 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause import os VERSION = "0.3" # choose an implementation, depending on os if os.name == 'nt': from parallel.paral...
28.055556
65
0.740594
import os VERSION = "0.3" if os.name == 'nt': from parallel.parallelwin32 import Parallel elif os.name == 'posix': from parallel.parallelppdev import Parallel else: raise "Sorry no implementation for your platform available."
true
true
1c2c800b2a7bc83cb88245c0b951b01438ce7102
157
py
Python
framework/QSSF Service/policies/__init__.py
S-Lab-System-Group/HeliosArtifact
ba73838935bd345ea8575b7bcfcc99e5df690c01
[ "MIT" ]
5
2021-09-20T13:59:55.000Z
2022-03-16T12:48:08.000Z
framework/QSSF Service/policies/__init__.py
S-Lab-System-Group/HeliosArtifact
ba73838935bd345ea8575b7bcfcc99e5df690c01
[ "MIT" ]
null
null
null
framework/QSSF Service/policies/__init__.py
S-Lab-System-Group/HeliosArtifact
ba73838935bd345ea8575b7bcfcc99e5df690c01
[ "MIT" ]
1
2021-10-15T11:39:11.000Z
2021-10-15T11:39:11.000Z
from .sjf import ShortestJobFirst from .srtf import ShortestRemainingTimeFirst from .fifo import FirstInFirstOut from .qssf import QuasiShortestServiceFirst
31.4
44
0.872611
from .sjf import ShortestJobFirst from .srtf import ShortestRemainingTimeFirst from .fifo import FirstInFirstOut from .qssf import QuasiShortestServiceFirst
true
true
1c2c8181115351ad978174b2d39e3db8876a4800
961
py
Python
gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py
nurikk/gpdb
04fe0202c59721826d1eda2b19d73e5572893fcb
[ "PostgreSQL", "Apache-2.0" ]
3
2017-12-10T16:41:21.000Z
2020-07-08T12:59:12.000Z
gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py
nurikk/gpdb
04fe0202c59721826d1eda2b19d73e5572893fcb
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gppylib/commands/test/unit/test_unit_base.py
nurikk/gpdb
04fe0202c59721826d1eda2b19d73e5572893fcb
[ "PostgreSQL", "Apache-2.0" ]
4
2017-12-10T16:41:35.000Z
2020-11-28T12:20:30.000Z
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2012. All Rights Reserved. # import os import shutil import sys import unittest2 as unittest from gppylib.commands.base import Command, CommandResult, WorkerPool from mock import patch, MagicMock, Mock class WorkerPoolTestCase(unittest.TestCase): @patch('gpp...
30.03125
71
0.685744
import os import shutil import sys import unittest2 as unittest from gppylib.commands.base import Command, CommandResult, WorkerPool from mock import patch, MagicMock, Mock class WorkerPoolTestCase(unittest.TestCase): @patch('gppylib.commands.base.gplog.get_default_logger') def test_print_progress(self, ...
true
true
1c2c81b6d8dfa3b62cc323911a7c35d38a860cad
1,642
py
Python
s3backgrounddelete/s3backgrounddelete/cortx_s3_signal.py
shailesh-vaidya/cortx-s3server-1
f61d4ab8961f53722feb68f233840326715ca47e
[ "Apache-2.0" ]
35
2020-09-25T07:27:10.000Z
2022-03-23T07:49:57.000Z
s3backgrounddelete/s3backgrounddelete/cortx_s3_signal.py
shailesh-vaidya/cortx-s3server-1
f61d4ab8961f53722feb68f233840326715ca47e
[ "Apache-2.0" ]
1,000
2020-09-24T13:10:23.000Z
2022-03-28T08:19:34.000Z
s3backgrounddelete/s3backgrounddelete/cortx_s3_signal.py
shailesh-vaidya/cortx-s3server-1
f61d4ab8961f53722feb68f233840326715ca47e
[ "Apache-2.0" ]
150
2020-09-24T14:41:40.000Z
2022-03-04T05:37:17.000Z
# # Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
32.84
85
0.75944
import os import traceback import logging import datetime import signal from logging import handlers from functools import partial from s3backgrounddelete.cortx_s3_config import CORTXS3Config class DynamicConfigHandler(object): def __init__(self,objectx): sighupArg=objectx si...
true
true
1c2c81bebf5a8a85417b4b94ae13c371cd878309
7,387
py
Python
kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
34.680751
179
0.656288
from pprint import pformat from six import iteritems import re class V1HorizontalPodAutoscalerSpec(object): swagger_types = { 'max_replicas': 'int', 'min_replicas': 'int', 'scale_target_ref': 'V1CrossVersionObjectReference', 'target_cpu_utilization_percentage': 'int' } ...
true
true
1c2c83029d0adf88eed1e205553d2b7f3256f1ec
73,836
py
Python
tools/codegen/gen.py
hablb/pytorch
c17bc35f0e4551de300650d4702ebda4f57d77f9
[ "Intel" ]
2
2022-02-14T13:56:03.000Z
2022-02-14T13:56:05.000Z
tools/codegen/gen.py
hablb/pytorch
c17bc35f0e4551de300650d4702ebda4f57d77f9
[ "Intel" ]
null
null
null
tools/codegen/gen.py
hablb/pytorch
c17bc35f0e4551de300650d4702ebda4f57d77f9
[ "Intel" ]
1
2022-02-10T15:00:33.000Z
2022-02-10T15:00:33.000Z
import os from typing import List, Dict, Optional, Tuple, Set, Any, Union, Sequence, TypeVar from typing_extensions import Literal import yaml from collections import OrderedDict, defaultdict, namedtuple import argparse import pathlib import json from dataclasses import dataclass from tools.codegen.model import (Argum...
43.305572
128
0.643291
import os from typing import List, Dict, Optional, Tuple, Set, Any, Union, Sequence, TypeVar from typing_extensions import Literal import yaml from collections import OrderedDict, defaultdict, namedtuple import argparse import pathlib import json from dataclasses import dataclass from tools.codegen.model import (Argum...
true
true
1c2c83d541ec61b48477e9434ffd2529d76000e1
720
py
Python
diplomova_praca/shared/views.py
MDobransky/thesis-grizzly
b038b477596879465636eae34444d70742a86e8f
[ "MIT" ]
1
2020-07-28T18:38:19.000Z
2020-07-28T18:38:19.000Z
diplomova_praca/shared/views.py
JankaSvK/thesis-grizzly
c0e573cd01008003c7d67e093c698ebf2d668f04
[ "MIT" ]
1
2020-09-21T21:38:46.000Z
2020-09-21T21:38:46.000Z
diplomova_praca/shared/views.py
MDobransky/thesis-grizzly
b038b477596879465636eae34444d70742a86e8f
[ "MIT" ]
1
2020-08-20T18:52:13.000Z
2020-08-20T18:52:13.000Z
from pathlib import Path from typing import Set from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from diplomova_praca_lib.position_similarity.models import PositionMethod from diplomova_praca_lib.position_similarity.position_similarity_request import available_images f...
31.304348
97
0.761111
from pathlib import Path from typing import Set from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from diplomova_praca_lib.position_similarity.models import PositionMethod from diplomova_praca_lib.position_similarity.position_similarity_request import available_images f...
true
true
1c2c84ba962513758acd36c71af378ec70598821
828
py
Python
paperlims/core/models/experiment_data_file.py
slohr/paperlims
598899b3a0945d9e7353ba79742bd94798b3e17b
[ "MIT" ]
null
null
null
paperlims/core/models/experiment_data_file.py
slohr/paperlims
598899b3a0945d9e7353ba79742bd94798b3e17b
[ "MIT" ]
1
2020-06-05T17:32:56.000Z
2020-06-05T17:32:56.000Z
paperlims/core/models/experiment_data_file.py
slohr/paperlims
598899b3a0945d9e7353ba79742bd94798b3e17b
[ "MIT" ]
null
null
null
import os.path from django.db import models from polymorphic.models import PolymorphicModel from core.models.base import Base from core.models.base import UniqueFileSystemStorage from core import constants from core.models import Experiment class ExperimentDataFile(PolymorphicModel,Base): experiment = models.Foreig...
25.090909
91
0.754831
import os.path from django.db import models from polymorphic.models import PolymorphicModel from core.models.base import Base from core.models.base import UniqueFileSystemStorage from core import constants from core.models import Experiment class ExperimentDataFile(PolymorphicModel,Base): experiment = models.Foreig...
true
true
1c2c85d149efb259a9d59cc01ff04e725439b7a9
286
py
Python
BAEKJOON/Python/2798.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
BAEKJOON/Python/2798.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
BAEKJOON/Python/2798.py
cmsong111/NJ_code
2df6176d179e168a2789a825ddeb977a82eb8d97
[ "MIT" ]
null
null
null
import itertools #입력부 a,b = map(int,input().split()) lis = list(map(int,input().split())) #리스트 추가 num = list(itertools.permutations(lis, 3)) final_list = [] #경우의수 다 찾기 for i in range(len(num)): if sum(num[i]) <= b: final_list.append(sum(num[i])) print(max(final_list))
15.888889
42
0.632867
import itertools a,b = map(int,input().split()) lis = list(map(int,input().split())) num = list(itertools.permutations(lis, 3)) final_list = [] for i in range(len(num)): if sum(num[i]) <= b: final_list.append(sum(num[i])) print(max(final_list))
true
true
1c2c86346e240ca3d1809f76577a678fc96c78c5
142,252
py
Python
src/oci/ai_anomaly_detection/anomaly_detection_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/ai_anomaly_detection/anomaly_detection_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/ai_anomaly_detection/anomaly_detection_client.py
CentroidChef/oci-python-sdk
fa406e27a52b40c70e220c20f52dfe2abe6236a3
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
48.434457
261
0.647801
from __future__ import absolute_import from oci._vendor import requests from oci._vendor import six from oci import retry, circuit_breaker from oci.base_client import BaseClient from oci.config import get_config_value_or_default, validate_config from oci.signer import Signer from oci.util import Sentinel, get...
true
true
1c2c86dbcc5a343b86f1588a38a45c5d4e0e5f59
4,341
py
Python
amatino/entry.py
Amatino-Code/amatino-python
6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f
[ "MIT" ]
2
2018-07-20T20:00:33.000Z
2020-10-08T15:49:06.000Z
amatino/entry.py
Amatino-Code/amatino-python
6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f
[ "MIT" ]
1
2020-05-21T02:49:29.000Z
2020-05-21T02:49:29.000Z
amatino/entry.py
Amatino-Code/amatino-python
6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f
[ "MIT" ]
3
2018-09-03T09:31:31.000Z
2020-05-21T05:30:00.000Z
""" Amatino API Python Bindings Entry Module Author: hugh@amatino.io """ from amatino.side import Side from amatino.account import Account from amatino.internal.constrained_string import ConstrainedString from amatino.internal.encodable import Encodable from amatino.internal.immutable import Immutable from decimal impo...
30.356643
79
0.615066
from amatino.side import Side from amatino.account import Account from amatino.internal.constrained_string import ConstrainedString from amatino.internal.encodable import Encodable from amatino.internal.immutable import Immutable from decimal import Decimal from typing import Dict from typing import Any from typing imp...
true
true
1c2c872739c70760c2acb09a3e43c88a93ad2117
1,095
py
Python
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
29.594595
117
0.593607
from msrest.serialization import Model class RecoveryPoint(Model): _validation = { 'object_type': {'required': True}, } _attribute_map = { 'object_type': {'key': 'objectType', 'type': 'str'}, } _subtype_map = { 'object_type': {'GenericRecoveryPoint': 'GenericR...
true
true
1c2c884d9cde661100911e4d30b0255ffac3b8d3
645
py
Python
ecom/manage.py
TomSCoding/ecommerce-base
7057afe83277209fef53fda44e3e8c84afc57bde
[ "MIT" ]
null
null
null
ecom/manage.py
TomSCoding/ecommerce-base
7057afe83277209fef53fda44e3e8c84afc57bde
[ "MIT" ]
277
2019-10-11T06:58:27.000Z
2022-03-12T00:50:30.000Z
ecom/manage.py
TomSCoding/ecommerce-base
7057afe83277209fef53fda44e3e8c84afc57bde
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecom.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: rais...
29.318182
74
0.658915
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecom.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and ...
true
true
1c2c88ca6b1582f01056302f4059664684a16f5a
121
py
Python
backend/core/services/__init__.py
devalv/yawm
9f91b96cf6b9a9a1f2026d514ea24edda117e1ba
[ "MIT" ]
1
2021-12-26T00:10:15.000Z
2021-12-26T00:10:15.000Z
backend/core/services/__init__.py
devalv/yawm
9f91b96cf6b9a9a1f2026d514ea24edda117e1ba
[ "MIT" ]
7
2020-11-07T16:42:47.000Z
2022-01-21T23:51:38.000Z
backend/core/services/__init__.py
devalv/yawm
9f91b96cf6b9a9a1f2026d514ea24edda117e1ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Project business logic.""" from .web import get_product_name __all__ = ["get_product_name"]
17.285714
33
0.677686
from .web import get_product_name __all__ = ["get_product_name"]
true
true
1c2c8b6a53401334c9bfa10124544f333324cafd
3,233
py
Python
app/NMF/script/run_local.py
zuowang/bosen
1c823287787b324776fd16ecb3c96f0ec58a989b
[ "BSD-3-Clause" ]
1
2018-01-26T14:29:00.000Z
2018-01-26T14:29:00.000Z
app/NMF/script/run_local.py
zuowang/bosen
1c823287787b324776fd16ecb3c96f0ec58a989b
[ "BSD-3-Clause" ]
null
null
null
app/NMF/script/run_local.py
zuowang/bosen
1c823287787b324776fd16ecb3c96f0ec58a989b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ This script starts a process locally, using <client-id> <hostfile> as inputs. """ import os from os.path import dirname import time import sys from optparse import OptionParser if len(sys.argv) < 3: print "usage: %s <client-id> <hostfile>" % sys.argv[0] sys.exit(1) # app_dir is 2 dirs...
27.87069
124
0.623569
""" This script starts a process locally, using <client-id> <hostfile> as inputs. """ import os from os.path import dirname import time import sys from optparse import OptionParser if len(sys.argv) < 3: print "usage: %s <client-id> <hostfile>" % sys.argv[0] sys.exit(1) app_dir = dirname(dirname(os.path.realp...
false
true
1c2c8cec61fdb4270ad2b309273d6a5fc2928f1a
8,463
py
Python
amfe/mor/hyper_red/ecsw.py
ma-kast/AMfe
99686cc313fb8904a093fb42e6cf0b38f8cfd791
[ "BSD-3-Clause" ]
null
null
null
amfe/mor/hyper_red/ecsw.py
ma-kast/AMfe
99686cc313fb8904a093fb42e6cf0b38f8cfd791
[ "BSD-3-Clause" ]
null
null
null
amfe/mor/hyper_red/ecsw.py
ma-kast/AMfe
99686cc313fb8904a093fb42e6cf0b38f8cfd791
[ "BSD-3-Clause" ]
null
null
null
""" TODO: Write introduction to ECSW """ import logging import numpy as np from scipy.linalg import solve as linsolve from scipy.sparse import csc_matrix from .ecsw_assembly import EcswAssembly __all__ = ['sparse_nnls', 'ecsw_assemble_G_and_b', 'ecsw_get_weights_by_component', 'Ecs...
33.717131
141
0.631455
import logging import numpy as np from scipy.linalg import solve as linsolve from scipy.sparse import csc_matrix from .ecsw_assembly import EcswAssembly __all__ = ['sparse_nnls', 'ecsw_assemble_G_and_b', 'ecsw_get_weights_by_component', 'EcswAssembly'] def sparse_nnls(G, b, tau, ...
true
true
1c2c8ddf97baa004278da14041b5822beda019fc
740
py
Python
cobl/lexicon/migrations/0120_auto_20161019_1545.py
Bibiko/CoBL-public
5092a0d01b7a13565c7da6bf2f6c52d648a2debe
[ "BSD-2-Clause" ]
3
2017-05-30T04:40:43.000Z
2019-04-25T14:54:54.000Z
cobl/lexicon/migrations/0120_auto_20161019_1545.py
Bibiko/CoBL-public
5092a0d01b7a13565c7da6bf2f6c52d648a2debe
[ "BSD-2-Clause" ]
null
null
null
cobl/lexicon/migrations/0120_auto_20161019_1545.py
Bibiko/CoBL-public
5092a0d01b7a13565c7da6bf2f6c52d648a2debe
[ "BSD-2-Clause" ]
3
2018-07-02T13:42:12.000Z
2019-05-17T13:11:13.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lexicon', '0119_remove_cognateclass_loansourceid'), ] operations = [ migrations.AlterField( model_name='cognatec...
28.461538
61
0.518919
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lexicon', '0119_remove_cognateclass_loansourceid'), ] operations = [ migrations.AlterField( model_name='cognateclass', name...
true
true
1c2c8eb6ba2fb4178d3ed64ed477ad73d3a1a5ea
887
py
Python
watchfolders.py
leith-bartrich/fiellc
1c02690538f442dede5d6afc8926355cb2ac838e
[ "MIT" ]
null
null
null
watchfolders.py
leith-bartrich/fiellc
1c02690538f442dede5d6afc8926355cb2ac838e
[ "MIT" ]
null
null
null
watchfolders.py
leith-bartrich/fiellc
1c02690538f442dede5d6afc8926355cb2ac838e
[ "MIT" ]
null
null
null
from fiepipedesktoplib.gitstorage.shells import Shell as AssetShell, ContainerIDVariableCommand, AssetIDVarCommand, \ RootIDVarCommand from fiepipedesktoplib.watchfolder.shell.watchfolder import WatchFolderShellApplication as WatcherShell _CONTAINER_ID = "9341cf7f-5f48-4971-aece-a5f203c23076" _ROOT_ID = "e00a2013-...
30.586207
117
0.78805
from fiepipedesktoplib.gitstorage.shells import Shell as AssetShell, ContainerIDVariableCommand, AssetIDVarCommand, \ RootIDVarCommand from fiepipedesktoplib.watchfolder.shell.watchfolder import WatchFolderShellApplication as WatcherShell _CONTAINER_ID = "9341cf7f-5f48-4971-aece-a5f203c23076" _ROOT_ID = "e00a2013-...
true
true
1c2c91a5ae3808e2dbe2282c8d8978e7e8dc1c85
100,045
py
Python
roles/openshift_facts/library/openshift_facts.py
sqtran/openshift-ansible
b06a457440aa929959164ecfc11ce9edf86bdc6a
[ "Apache-2.0" ]
null
null
null
roles/openshift_facts/library/openshift_facts.py
sqtran/openshift-ansible
b06a457440aa929959164ecfc11ce9edf86bdc6a
[ "Apache-2.0" ]
null
null
null
roles/openshift_facts/library/openshift_facts.py
sqtran/openshift-ansible
b06a457440aa929959164ecfc11ce9edf86bdc6a
[ "Apache-2.0" ]
1
2020-12-02T00:39:02.000Z
2020-12-02T00:39:02.000Z
#!/usr/bin/python # pylint: disable=too-many-lines # -*- coding: utf-8 -*- # Reason: Disable pylint too-many-lines because we don't want to split up this file. # Status: Permanently disabled to keep this module as self-contained as possible. """Ansible module for retrieving and setting openshift related facts""" # py...
41.357999
129
0.57671
# Status: Permanently disabled to keep this module as self-contained as possible. # pylint: disable=no-name-in-module, import-error, wrong-import-order import copy import errno import json import re import io import os import yaml import struct import socket from distutils.util import strtobool from distutils.ver...
true
true
1c2c91ef426018a08e97eb10508fb90a171c6c47
5,831
py
Python
robocorp-python-ls-core/src/robocorp_ls_core/jsonrpc/streams.py
GLMeece/robotframework-lsp
dc9c807c4a192d252df1d05a1c5d16f8c1f24086
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robocorp-python-ls-core/src/robocorp_ls_core/jsonrpc/streams.py
GLMeece/robotframework-lsp
dc9c807c4a192d252df1d05a1c5d16f8c1f24086
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robocorp-python-ls-core/src/robocorp_ls_core/jsonrpc/streams.py
GLMeece/robotframework-lsp
dc9c807c4a192d252df1d05a1c5d16f8c1f24086
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Original work Copyright 2018 Palantir Technologies, Inc. (MIT) # See ThirdPartyNotices.txt in the project root for license information. # All modifications Copyright (c) Robocorp Technologies Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file exc...
34.099415
101
0.579832
import threading from robocorp_ls_core.robotframework_log import get_logger from typing import Optional import json from robocorp_ls_core.options import BaseOptions log = get_logger(__name__) def read(stream) -> Optional[str]: headers = {} while True: line = stream.readline()...
true
true
1c2c922b0de1f4d1495f658eb9b9064609ec55aa
255
py
Python
1035-SelectionTest1.py
OrianaCadavid/uri-oj
256c811007712e85f636ae5b9357a59cf608daa8
[ "MIT" ]
null
null
null
1035-SelectionTest1.py
OrianaCadavid/uri-oj
256c811007712e85f636ae5b9357a59cf608daa8
[ "MIT" ]
null
null
null
1035-SelectionTest1.py
OrianaCadavid/uri-oj
256c811007712e85f636ae5b9357a59cf608daa8
[ "MIT" ]
null
null
null
def main(): a, b, c, d = map(int, raw_input().split()) if b > c and d > a and c + d > a + b and c > 0 and d > 0 and a % 2 == 0: print 'Valores aceitos' else: print 'Valores nao aceitos' if __name__ == '__main__': main()
21.25
76
0.509804
def main(): a, b, c, d = map(int, raw_input().split()) if b > c and d > a and c + d > a + b and c > 0 and d > 0 and a % 2 == 0: print 'Valores aceitos' else: print 'Valores nao aceitos' if __name__ == '__main__': main()
false
true
1c2c937a1e1b887eac89fb032b256333827e1c88
709
py
Python
online_shop/app/tests/test_product_schema.py
styam/django_graphene
7ae997bd7e3d8ceae1820f8c9ef69ba16d0c53ee
[ "MIT" ]
2
2021-03-24T10:55:54.000Z
2021-04-05T12:36:56.000Z
online_shop/app/tests/test_product_schema.py
styam/django_graphene
7ae997bd7e3d8ceae1820f8c9ef69ba16d0c53ee
[ "MIT" ]
null
null
null
online_shop/app/tests/test_product_schema.py
styam/django_graphene
7ae997bd7e3d8ceae1820f8c9ef69ba16d0c53ee
[ "MIT" ]
null
null
null
from django.test import TestCase import pytest from graphene.test import Client from mixer.backend.django import mixer from app.models import Product from app.tests.schema_format import (product_query_list, ) from online_shop.schema import schema @pytest.mark.django_db class TestProduct(TestCase): def setUp(sel...
28.36
72
0.675599
from django.test import TestCase import pytest from graphene.test import Client from mixer.backend.django import mixer from app.models import Product from app.tests.schema_format import (product_query_list, ) from online_shop.schema import schema @pytest.mark.django_db class TestProduct(TestCase): def setUp(sel...
true
true
1c2c9484e694e8a751c4dd47aed3cf1de2b9f7ef
1,065
py
Python
2020-09-01-1054-gma_my_scara_funcs.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-09-01-1054-gma_my_scara_funcs.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-09-01-1054-gma_my_scara_funcs.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Aug 31 11:14:43 2020 @author: Georg Maubach """ # Ab Python 3.8 müssen dlls als vertrauenswürdig markiert werden. # Deshalb ab 3.8.x von den unteren beiden Anweisungen den # Kommentar entfernen und den Pfad zum Projektverzeichnis # korrekt angeben import os ...
22.659574
79
0.646009
import os os.add_dll_directory("D:\Selfcoding\WillmsBis040920\scara64anaconda") os.environ['QT_PLUGIN_PATH'] = "D:\Selfcoding\WillmsBis040920\scara64anaconda" import ctypes Scara = ctypes.cdll.scara def gehe2(): Scara.gehe(); Scara.gehe(); def gehe3(): ...
true
true
1c2c95e73bc880ae001b0144521b1da015427cdf
1,950
py
Python
strawberry/aiohttp/handlers/graphql_transport_ws_handler.py
TheVinhLuong102/Strawberry
3c442dc19d17bc55c4e26de1db7a9eedc0a228f5
[ "MIT" ]
2,062
2019-04-07T17:47:30.000Z
2022-03-31T01:54:16.000Z
strawberry/aiohttp/handlers/graphql_transport_ws_handler.py
TheVinhLuong102/Strawberry
3c442dc19d17bc55c4e26de1db7a9eedc0a228f5
[ "MIT" ]
1,582
2019-04-07T18:31:33.000Z
2022-03-31T18:32:13.000Z
strawberry/aiohttp/handlers/graphql_transport_ws_handler.py
TheVinhLuong102/Strawberry
3c442dc19d17bc55c4e26de1db7a9eedc0a228f5
[ "MIT" ]
303
2019-04-13T08:44:40.000Z
2022-03-29T09:54:41.000Z
from datetime import timedelta from typing import Any from aiohttp import http, web from strawberry.schema import BaseSchema from strawberry.subscriptions import GRAPHQL_TRANSPORT_WS_PROTOCOL from strawberry.subscriptions.protocols.graphql_transport_ws.handlers import ( BaseGraphQLTransportWSHandler, ) class Gra...
35.454545
83
0.680513
from datetime import timedelta from typing import Any from aiohttp import http, web from strawberry.schema import BaseSchema from strawberry.subscriptions import GRAPHQL_TRANSPORT_WS_PROTOCOL from strawberry.subscriptions.protocols.graphql_transport_ws.handlers import ( BaseGraphQLTransportWSHandler, ) class Gra...
true
true
1c2c9673239875aebecc14562678e37ce6ad98b8
1,827
py
Python
test/parser/unit_operators/testcases/Reciprocal/Reciprocal_generator.py
AyishaR/deepC
1dc9707ef5ca9000fc13c3da7f1129685a83b494
[ "Apache-2.0" ]
223
2020-04-15T20:34:33.000Z
2022-03-28T05:41:49.000Z
test/parser/unit_operators/testcases/Reciprocal/Reciprocal_generator.py
AyishaR/deepC
1dc9707ef5ca9000fc13c3da7f1129685a83b494
[ "Apache-2.0" ]
42
2019-07-29T15:57:12.000Z
2020-04-08T15:12:48.000Z
test/parser/unit_operators/testcases/Reciprocal/Reciprocal_generator.py
AyishaR/deepC
1dc9707ef5ca9000fc13c3da7f1129685a83b494
[ "Apache-2.0" ]
58
2019-07-22T11:46:19.000Z
2020-04-09T22:56:41.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 ...
38.87234
92
0.747126
import os, sys import numpy as np separator = os.path.sep from onnx import * sys.path.append(".."+separator+".."+separator+".."+separator+".."+separator+"python/parser") from onnx_parser import * op_name = 'Reciprocal' inputs = [helper.make_tensor_value_info("X",TensorProto.FLOAT,(1,2))] outp...
true
true
1c2c968d6375a6da31f54444f303b6cd1847f7a9
41,031
py
Python
pyasdf/block.py
mdboom/pyasdf
ac4e9f85bf96206fdd6bc3d0708875c953c66dc5
[ "BSD-3-Clause" ]
null
null
null
pyasdf/block.py
mdboom/pyasdf
ac4e9f85bf96206fdd6bc3d0708875c953c66dc5
[ "BSD-3-Clause" ]
null
null
null
pyasdf/block.py
mdboom/pyasdf
ac4e9f85bf96206fdd6bc3d0708875c953c66dc5
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals, print_function from collections import namedtuple import copy import hashlib import io import os import re import struct import weakref import numpy as np impor...
33.304383
85
0.569959
from __future__ import absolute_import, division, unicode_literals, print_function from collections import namedtuple import copy import hashlib import io import os import re import struct import weakref import numpy as np import six from six.moves.urllib import parse as urlparse import yaml from . import compr...
true
true
1c2c97d6680a3f3e3a80c84d1ae03684c0396467
22,260
py
Python
pandas/core/reshape/concat.py
kpflugshaupt/pandas
c9e3883c630c48b17218e6bcc5593720c1402bf1
[ "BSD-3-Clause" ]
2
2021-04-07T13:56:06.000Z
2021-04-12T13:45:23.000Z
pandas/core/reshape/concat.py
sanjusci/pandas
a1fee9199eba7ebf423880243936b9f1501d3d3a
[ "BSD-3-Clause" ]
null
null
null
pandas/core/reshape/concat.py
sanjusci/pandas
a1fee9199eba7ebf423880243936b9f1501d3d3a
[ "BSD-3-Clause" ]
3
2018-01-08T08:40:55.000Z
2019-10-07T02:02:40.000Z
""" concat routines """ import numpy as np import pandas.core.dtypes.concat as _concat from pandas import DataFrame, Index, MultiIndex, Series, compat from pandas.core import common as com from pandas.core.arrays.categorical import ( _factorize_from_iterable, _factorize_from_iterables) from pandas.core.generic i...
35
79
0.545058
import numpy as np import pandas.core.dtypes.concat as _concat from pandas import DataFrame, Index, MultiIndex, Series, compat from pandas.core import common as com from pandas.core.arrays.categorical import ( _factorize_from_iterable, _factorize_from_iterables) from pandas.core.generic import NDFrame from panda...
true
true
1c2c9846bb530c6a7db2bfeffeaf52ece44cd30d
1,050
py
Python
arcade/python/arcade-theCore/06_LabyrinthOfNestedLoops/047_ComfortableNumbers.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
arcade/python/arcade-theCore/06_LabyrinthOfNestedLoops/047_ComfortableNumbers.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
arcade/python/arcade-theCore/06_LabyrinthOfNestedLoops/047_ComfortableNumbers.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
def comfortableNumbers(l, r): ''' Let's say that number a feels comfortable with number b if a ≠ b and b lies in the segment [a - s(a), a + s(a)], where s(x) is the sum of x's digits. How many pairs (a, b) are there, such that a < b, both a and b lie on the segment [l, r], and each number feels comfortable wit...
32.8125
153
0.599048
def comfortableNumbers(l, r): result = 0 for a in range(l, r): sa = sumOfDigits(a) for b in range(a + 1, min(r + 1, a + sa + 1)): sb = sumOfDigits(b) if b - a <= sb: result += 1 return result def sumOfDigits(n): return sum([int(i) for i i...
true
true
1c2c98cf381d25134cbbe5eeac3bcfb00b4e0d3a
608
py
Python
rank/urls.py
shvedovskiy/web_technopolis
430d7e74fb87870e369ca615294116c63a51ff25
[ "WTFPL" ]
null
null
null
rank/urls.py
shvedovskiy/web_technopolis
430d7e74fb87870e369ca615294116c63a51ff25
[ "WTFPL" ]
1
2016-12-02T17:02:23.000Z
2016-12-02T17:02:23.000Z
rank/urls.py
shvedovskiy/web_technopolis
430d7e74fb87870e369ca615294116c63a51ff25
[ "WTFPL" ]
null
null
null
from django.conf.urls import url from . import views app_name = 'rank' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^about/$', views.about, name='about'), url(r'^add_category', views.add_category, name='add_category'), url(r'^category/(?P<category_name_slug>[\w\-]+)/$', views.category, ...
40.533333
98
0.646382
from django.conf.urls import url from . import views app_name = 'rank' urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^about/$', views.about, name='about'), url(r'^add_category', views.add_category, name='add_category'), url(r'^category/(?P<category_name_slug>[\w\-]+)/$', views.category, ...
true
true
1c2c99328ec43c52455f8910f49b6adb1e526a0d
26,618
py
Python
pipe-cli/src/model/data_storage_wrapper.py
AlfiyaRF/cloud-pipeline
532c02a7e88928f42b28be87545aab93db404df5
[ "Apache-2.0" ]
null
null
null
pipe-cli/src/model/data_storage_wrapper.py
AlfiyaRF/cloud-pipeline
532c02a7e88928f42b28be87545aab93db404df5
[ "Apache-2.0" ]
null
null
null
pipe-cli/src/model/data_storage_wrapper.py
AlfiyaRF/cloud-pipeline
532c02a7e88928f42b28be87545aab93db404df5
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/) # # 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 appli...
39.787743
119
0.63164
import os from abc import abstractmethod, ABCMeta from ftplib import FTP, error_temp from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse import click import requests import sys from ..api.data_storage import DataStorage from ..config import ConfigNot...
true
true
1c2c99982aa9597fb93c44b99f6e2c83126c301e
926
py
Python
multilstm_tensorpack/tensorpack/models/lstm.py
neale/A4C
acbbb3cf14e31a19c12f27306971b4db4feafe09
[ "MIT" ]
1
2017-03-11T23:10:00.000Z
2017-03-11T23:10:00.000Z
multilstm_tensorpack/tensorpack/models/lstm.py
neale/A4C
acbbb3cf14e31a19c12f27306971b4db4feafe09
[ "MIT" ]
null
null
null
multilstm_tensorpack/tensorpack/models/lstm.py
neale/A4C
acbbb3cf14e31a19c12f27306971b4db4feafe09
[ "MIT" ]
null
null
null
#!/usr/bin/env python import tensorflow as tf from .common import layer_register __all__ = ['Lstm'] @layer_register() def Lstm(x, num_inputs): lstm_input = tf.expand_dims(x, [0]) lstm_cell = tf.contrib.rnn.BasicLSTMCell(num_inputs, state_is_tuple=True) c_init = tf.zeros([1, lstm_cell.state_size.c], tf...
30.866667
89
0.62635
import tensorflow as tf from .common import layer_register __all__ = ['Lstm'] @layer_register() def Lstm(x, num_inputs): lstm_input = tf.expand_dims(x, [0]) lstm_cell = tf.contrib.rnn.BasicLSTMCell(num_inputs, state_is_tuple=True) c_init = tf.zeros([1, lstm_cell.state_size.c], tf.float32) h_ini...
false
true
1c2c9c7a1cf5617662b1acb6b67cef04aa34ecdd
2,839
py
Python
tests/test_lyaps.py
neurophysik/jitcdde
44d7ed6ad187d3591407155b6eeb063f73e462cd
[ "BSD-3-Clause" ]
49
2016-10-24T10:00:33.000Z
2022-03-27T11:03:51.000Z
tests/test_lyaps.py
neurophysik/jitcdde
44d7ed6ad187d3591407155b6eeb063f73e462cd
[ "BSD-3-Clause" ]
45
2016-11-20T22:05:07.000Z
2022-03-29T07:13:25.000Z
tests/test_lyaps.py
neurophysik/jitcdde
44d7ed6ad187d3591407155b6eeb063f73e462cd
[ "BSD-3-Clause" ]
11
2016-11-14T07:19:16.000Z
2022-03-16T14:27:06.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- import platform import unittest import numpy as np from scipy.stats import sem from jitcdde import t, y, jitcdde_lyap if platform.system() == "Windows": compile_args = None else: from jitcxde_common import DEFAULT_COMPILE_ARGS compile_args = DEFAULT_COMPILE_ARGS+["-g","-...
28.676768
75
0.695315
import platform import unittest import numpy as np from scipy.stats import sem from jitcdde import t, y, jitcdde_lyap if platform.system() == "Windows": compile_args = None else: from jitcxde_common import DEFAULT_COMPILE_ARGS compile_args = DEFAULT_COMPILE_ARGS+["-g","-UNDEBUG"] omega = np.array([0.88167179, ...
true
true
1c2c9d6642125c20bd9273e257de3b216516ac79
5,707
py
Python
ch15/train-project/train_schedule/views/main.py
kxen42/Learn-Python-Programming-Third-Edition
851ddc5e6094fadd44f31a9ad1d3876456b04372
[ "MIT" ]
19
2021-11-05T22:54:09.000Z
2022-03-29T15:03:47.000Z
ch15/train-project/train_schedule/views/main.py
kxen42/Learn-Python-Programming-Third-Edition
851ddc5e6094fadd44f31a9ad1d3876456b04372
[ "MIT" ]
null
null
null
ch15/train-project/train_schedule/views/main.py
kxen42/Learn-Python-Programming-Third-Edition
851ddc5e6094fadd44f31a9ad1d3876456b04372
[ "MIT" ]
26
2021-11-12T17:04:50.000Z
2022-03-29T01:10:35.000Z
# train-project/train_schedule/views/main.py import tkinter as tk from contextlib import contextmanager from tkinter import messagebox, ttk from .. import APP_TITLE from ..resources import load_binary_resource from .stations import StationChooser from .trains import TrainsView ICON_FILENAME = "icon.png" @contextman...
29.569948
66
0.599439
import tkinter as tk from contextlib import contextmanager from tkinter import messagebox, ttk from .. import APP_TITLE from ..resources import load_binary_resource from .stations import StationChooser from .trains import TrainsView ICON_FILENAME = "icon.png" @contextmanager def show_error(): try: yiel...
true
true
1c2c9d8d053412ea306c9a10e0d6652d47090acf
855
py
Python
account/migrations/0004_auto_20171002_1918.py
natotthomer/nattr
f3f7b1bc67ff05f346e7f221d7f88b8500bd8e77
[ "MIT" ]
1
2017-11-10T19:55:12.000Z
2017-11-10T19:55:12.000Z
account/migrations/0004_auto_20171002_1918.py
natotthomer/nattr
f3f7b1bc67ff05f346e7f221d7f88b8500bd8e77
[ "MIT" ]
9
2021-03-08T20:46:52.000Z
2022-03-11T23:26:33.000Z
account/migrations/0004_auto_20171002_1918.py
natotthomer/nattr
f3f7b1bc67ff05f346e7f221d7f88b8500bd8e77
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-02 19:18 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('account', '0003_auto_20170...
30.535714
138
0.667836
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('account', '0003_auto_20170922_1544'), ] operations = [ migrations.AlterField( ...
true
true
1c2c9eed7b32e658c90b6a2885b2e30dd90f1dbc
2,702
py
Python
multinet/api/views/common.py
multinet-app/multinet-api
a658d787f0fb9ba415ed85a1e37c29953486287f
[ "Apache-2.0" ]
null
null
null
multinet/api/views/common.py
multinet-app/multinet-api
a658d787f0fb9ba415ed85a1e37c29953486287f
[ "Apache-2.0" ]
91
2021-03-15T19:00:15.000Z
2022-03-11T00:04:05.000Z
multinet/api/views/common.py
multinet-app/multinet-api
a658d787f0fb9ba415ed85a1e37c29953486287f
[ "Apache-2.0" ]
1
2022-02-05T15:53:04.000Z
2022-02-05T15:53:04.000Z
from typing import Dict, List from arango.cursor import Cursor from django.http.response import Http404 from django.shortcuts import get_object_or_404 from rest_framework.pagination import LimitOffsetPagination from rest_framework.request import Request from rest_framework_extensions.mixins import NestedViewSetMixin ...
33.358025
96
0.703923
from typing import Dict, List from arango.cursor import Cursor from django.http.response import Http404 from django.shortcuts import get_object_or_404 from rest_framework.pagination import LimitOffsetPagination from rest_framework.request import Request from rest_framework_extensions.mixins import NestedViewSetMixin ...
true
true
1c2c9f83b71d4721f0a4459f61f84fd422ec0d20
4,817
py
Python
google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/types/automl_image_object_detection.py
nachocano/python-aiplatform
1c6b998d9145309d79712f494a2b00b50a9a9bf4
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/types/automl_image_object_detection.py
nachocano/python-aiplatform
1c6b998d9145309d79712f494a2b00b50a9a9bf4
[ "Apache-2.0" ]
1
2021-02-12T23:56:38.000Z
2021-02-12T23:56:38.000Z
google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/types/automl_image_object_detection.py
nachocano/python-aiplatform
1c6b998d9145309d79712f494a2b00b50a9a9bf4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
37.341085
155
0.688188
import proto __protobuf__ = proto.module( package="google.cloud.aiplatform.v1.schema.trainingjob.definition", manifest={ "AutoMlImageObjectDetection", "AutoMlImageObjectDetectionInputs", "AutoMlImageObjectDetectionMetadata", }, ) class AutoMlImageObjectDetectio...
true
true
1c2c9f8d98f5ebf5772018e96da70b4ca93b2c81
456
py
Python
test/Driver/Dependencies/Inputs/update-dependencies-bad.py
ackyshake/swift
226a8258078bd4a9987fd5e2485ab72d956deda6
[ "Apache-2.0" ]
4
2016-01-06T22:53:32.000Z
2021-09-11T23:50:05.000Z
test/Driver/Dependencies/Inputs/update-dependencies-bad.py
ackyshake/swift
226a8258078bd4a9987fd5e2485ab72d956deda6
[ "Apache-2.0" ]
null
null
null
test/Driver/Dependencies/Inputs/update-dependencies-bad.py
ackyshake/swift
226a8258078bd4a9987fd5e2485ab72d956deda6
[ "Apache-2.0" ]
2
2016-11-04T10:07:52.000Z
2018-04-14T21:55:55.000Z
#!/usr/bin/env python # Fails if the input file is named "bad.swift"; otherwise dispatches to # update-dependencies.py. import os import sys assert sys.argv[1] == '-frontend' primaryFile = sys.argv[sys.argv.index('-primary-file') + 1] if os.path.basename(primaryFile) == 'bad.swift': print "Handled", os.path.ba...
24
71
0.714912
import os import sys assert sys.argv[1] == '-frontend' primaryFile = sys.argv[sys.argv.index('-primary-file') + 1] if os.path.basename(primaryFile) == 'bad.swift': print "Handled", os.path.basename(primaryFile) exit(1) dir = os.path.dirname(os.path.abspath(__file__)) execfile(os.path.join(dir, "update-...
false
true
1c2ca03875f2f69020ef92da8bca31da599ca215
921
py
Python
examples/feature_selection/plot_rfe_digits.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
23
2020-04-15T14:02:00.000Z
2022-03-10T23:17:32.000Z
examples/feature_selection/plot_rfe_digits.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
29
2021-03-04T02:56:48.000Z
2021-04-06T04:06:45.000Z
examples/feature_selection/plot_rfe_digits.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
18
2020-04-15T14:22:33.000Z
2022-02-16T06:48:34.000Z
""" ============================= Recursive feature elimination ============================= A recursive feature elimination example showing the relevance of pixels in a digit classification task. .. note:: See also :ref:`sphx_glr_auto_examples_feature_selection_plot_rfe_with_cross_validation.py` """ print(__d...
24.891892
94
0.724213
print(__doc__) from sklearn.svm import SVC from sklearn.datasets import load_digits from sklearn.feature_selection import RFE import matplotlib.pyplot as plt digits = load_digits() X = digits.images.reshape((len(digits.images), -1)) y = digits.target svc = SVC(kernel="linear", C=1) rfe = RFE(estimator=svc, n_featu...
true
true
1c2ca105ffaace5c78f7b401dd5af0da9c9e6ff1
8,162
py
Python
control_algorithm/adaptive_tau.py
arj119/adaptive-federated-learning
c7e949bfcfd9a166780f5be838141d51016a7673
[ "MIT" ]
94
2020-04-14T02:42:26.000Z
2022-03-23T13:54:31.000Z
control_algorithm/adaptive_tau.py
PengchaoHan/adaptive-federated-learning
6c22d65c3a46a0b293dc5ddd4cd579f6010445f5
[ "MIT" ]
2
2021-12-10T07:46:44.000Z
2022-01-19T23:39:30.000Z
control_algorithm/adaptive_tau.py
PengchaoHan/adaptive-federated-learning
6c22d65c3a46a0b293dc5ddd4cd579f6010445f5
[ "MIT" ]
44
2020-05-07T16:25:04.000Z
2022-03-24T10:48:26.000Z
import math import numpy as np from numpy import linalg from util.utils import recv_msg, send_msg, moving_average from config import tau_max class ControlAlgAdaptiveTauServer: def __init__(self, is_adapt_local, dim_w, client_sock_all, n_nodes, control_param_phi, moving_average_holding_param): ...
43.414894
131
0.633301
import math import numpy as np from numpy import linalg from util.utils import recv_msg, send_msg, moving_average from config import tau_max class ControlAlgAdaptiveTauServer: def __init__(self, is_adapt_local, dim_w, client_sock_all, n_nodes, control_param_phi, moving_average_holding_param): ...
true
true
1c2ca1a445166c0064cdf7fdef1030e4ea58e5cc
22,470
py
Python
nova/tests/unit/scheduler/test_filters.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/scheduler/test_filters.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/scheduler/test_filters.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Copyright 2012 OpenStack Foundation # All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a cop...
13.609933
120
0.619315
begin_unit comment|'# Copyright 2012 OpenStack Foundation # All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a cop...
false
true
1c2ca250665e6de8aba306124ca10a854862961b
13,468
py
Python
magenta/models/music_vae/trained_model.py
veskoch/magenta
74f16be4341925341617699dffdbddadd747acad
[ "Apache-2.0" ]
5
2018-07-11T02:39:40.000Z
2020-09-07T19:26:46.000Z
magenta/models/music_vae/trained_model.py
veskoch/magenta
74f16be4341925341617699dffdbddadd747acad
[ "Apache-2.0" ]
1
2022-02-11T19:01:43.000Z
2022-02-11T19:01:56.000Z
magenta/models/music_vae/trained_model.py
veskoch/magenta
74f16be4341925341617699dffdbddadd747acad
[ "Apache-2.0" ]
2
2018-07-11T13:36:19.000Z
2018-09-01T03:42:04.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
39.964392
80
0.676938
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import re import numpy as np import tensorflow as tf class NoExtractedExamplesException(Exception): pass class MultipleExtractedExamplesException(Exception): pass class Trai...
true
true
1c2ca31a29d1b7f2731163603636af4932896ea7
411
py
Python
examples/flava/data/__init__.py
facebookresearch/multimodal
13e60d9b4e421d1d5304e861cf4e54c3e376c7f1
[ "BSD-3-Clause" ]
128
2022-03-24T21:54:28.000Z
2022-03-31T20:15:41.000Z
examples/flava/data/__init__.py
facebookresearch/multimodal
13e60d9b4e421d1d5304e861cf4e54c3e376c7f1
[ "BSD-3-Clause" ]
2
2022-03-28T20:58:38.000Z
2022-03-31T18:43:43.000Z
examples/flava/data/__init__.py
facebookresearch/multimodal
13e60d9b4e421d1d5304e861cf4e54c3e376c7f1
[ "BSD-3-Clause" ]
3
2022-03-25T13:34:02.000Z
2022-03-30T21:57:04.000Z
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. from .transforms import * # noqa F401 from .utils import * # noqa F401 from .imagenet_zeroshot_data import * ...
34.25
71
0.742092
from .transforms import * from .utils import * from .imagenet_zeroshot_data import * from .multitask import * from .datamodules import *
true
true
1c2ca48001838c748ecda70e87d40f377105808a
3,231
py
Python
cloudify/tests/mocks/mock_rest_client.py
isaac-s/cloudify-common
9f512a7e0b96bfdf7c4448fc1bddacf2ae577ba8
[ "Apache-2.0" ]
null
null
null
cloudify/tests/mocks/mock_rest_client.py
isaac-s/cloudify-common
9f512a7e0b96bfdf7c4448fc1bddacf2ae577ba8
[ "Apache-2.0" ]
null
null
null
cloudify/tests/mocks/mock_rest_client.py
isaac-s/cloudify-common
9f512a7e0b96bfdf7c4448fc1bddacf2ae577ba8
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
24.477273
78
0.629836
_client import CloudifyClient from cloudify_rest_client.executions import Execution from cloudify_rest_client.node_instances import NodeInstance node_instances = {} def put_node_instance(node_instance_id, state='started', runtime_properties=None, ...
true
true
1c2ca5caff5ef0a6f27869b1cd2cf147940affc7
3,960
py
Python
alipay/aop/api/request/AlipayCommerceYuntaskResumeRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayCommerceYuntaskResumeRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayCommerceYuntaskResumeRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayCommerceYuntaskResumeModel import AlipayCommerceYuntaskResumeModel class AlipayCommerceYuntaskResumeRequest(object): def ...
27.310345
148
0.643939
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayCommerceYuntaskResumeModel import AlipayCommerceYuntaskResumeModel class AlipayCommerceYuntaskResumeRequest(object): def __init__(self, biz_model=None): self...
true
true
1c2ca6bd4627da89353bbf6e0e73bd6a23178cc2
11,633
py
Python
tests/test_maths/test_period.py
wjjmjh/Cogent3-GitHub-CI
c79c82c4b51f56be50f1079ddcdfcffaccaf80dd
[ "BSD-3-Clause" ]
null
null
null
tests/test_maths/test_period.py
wjjmjh/Cogent3-GitHub-CI
c79c82c4b51f56be50f1079ddcdfcffaccaf80dd
[ "BSD-3-Clause" ]
null
null
null
tests/test_maths/test_period.py
wjjmjh/Cogent3-GitHub-CI
c79c82c4b51f56be50f1079ddcdfcffaccaf80dd
[ "BSD-3-Clause" ]
null
null
null
from numpy import arange, array, convolve, exp, float64, pi, random, sin, zeros from cogent3.maths.period import _autocorr_inner2 as py_autocorr_inner from cogent3.maths.period import _goertzel_inner as py_goertzel_inner from cogent3.maths.period import _ipdft_inner2 as py_ipdft_inner from cogent3.maths.period import ...
32.135359
79
0.458265
from numpy import arange, array, convolve, exp, float64, pi, random, sin, zeros from cogent3.maths.period import _autocorr_inner2 as py_autocorr_inner from cogent3.maths.period import _goertzel_inner as py_goertzel_inner from cogent3.maths.period import _ipdft_inner2 as py_ipdft_inner from cogent3.maths.period import ...
true
true
1c2ca72ba0a51bfb6047dce162693e6840c202cc
1,589
py
Python
stonesoup/simulator/platform.py
SohSalari/Stone-Soup
e073d4145df18facad43e4ab7b0a34e8d65f67ee
[ "MIT" ]
1
2020-07-21T15:20:20.000Z
2020-07-21T15:20:20.000Z
stonesoup/simulator/platform.py
mgomesborges/Stone-Soup
39c7f02ce11e10c9b3c612ad359f6d8bca495266
[ "MIT" ]
null
null
null
stonesoup/simulator/platform.py
mgomesborges/Stone-Soup
39c7f02ce11e10c9b3c612ad359f6d8bca495266
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ..base import Property from ..reader import GroundTruthReader from .base import DetectionSimulator from ..buffered_generator import BufferedGenerator from ..platform import Platform class PlatformDetectionSimulator(DetectionSimulator): """A simple platform detection simulator. P...
37.833333
79
0.582127
from ..base import Property from ..reader import GroundTruthReader from .base import DetectionSimulator from ..buffered_generator import BufferedGenerator from ..platform import Platform class PlatformDetectionSimulator(DetectionSimulator): groundtruth = Property(GroundTruthReader, do...
true
true
1c2ca80e2a0454be3248cf10b328f2d2d86dfa74
420
py
Python
Lab_6/data/core/myservices/__init__.py
Opty1337/CN
bc01cf39bcc017783fdbb84ebd7958f405511e6c
[ "MIT" ]
null
null
null
Lab_6/data/core/myservices/__init__.py
Opty1337/CN
bc01cf39bcc017783fdbb84ebd7958f405511e6c
[ "MIT" ]
null
null
null
Lab_6/data/core/myservices/__init__.py
Opty1337/CN
bc01cf39bcc017783fdbb84ebd7958f405511e6c
[ "MIT" ]
null
null
null
"""myservices Custom services that you define can be put in this directory. Everything listed in __all__ is automatically loaded when you add this directory to the custom_services_dir = '/full/path/to/here' core.conf file option. """ __all__ = ["trafficdump", "pcpingweb01", "linkadsl_u128k", "linkadsl_u256k", "linkad...
52.5
183
0.77381
__all__ = ["trafficdump", "pcpingweb01", "linkadsl_u128k", "linkadsl_u256k", "linkadsl_u512k", "linkadsl_u768k", "linkadsl_u1024k", "linkbw4g_u5800k", "linkcable_u8000k", "simplenat"]
true
true
1c2ca9762c3d53a7dac08a120f7e7e60f5b4c3d4
1,783
py
Python
ejercicios_basicos/trabajo_bd/capa_datos/conexion.py
JuanDuran85/ejemplos_python
47aa49c65384ab89654f362f3da6cd2b0ef386e5
[ "Apache-2.0" ]
null
null
null
ejercicios_basicos/trabajo_bd/capa_datos/conexion.py
JuanDuran85/ejemplos_python
47aa49c65384ab89654f362f3da6cd2b0ef386e5
[ "Apache-2.0" ]
null
null
null
ejercicios_basicos/trabajo_bd/capa_datos/conexion.py
JuanDuran85/ejemplos_python
47aa49c65384ab89654f362f3da6cd2b0ef386e5
[ "Apache-2.0" ]
null
null
null
import os from dotenv import load_dotenv import psycopg2 as db from logger_base import log import sys load_dotenv() class Conexion: __DATABASE = os.getenv("DATABASE") __USER = os.getenv("USER") __PASSWORD = os.getenv("PASSWORD") __HOST = os.getenv("HOST") __PORT = os.getenv("PORT") __conexion ...
28.758065
74
0.55244
import os from dotenv import load_dotenv import psycopg2 as db from logger_base import log import sys load_dotenv() class Conexion: __DATABASE = os.getenv("DATABASE") __USER = os.getenv("USER") __PASSWORD = os.getenv("PASSWORD") __HOST = os.getenv("HOST") __PORT = os.getenv("PORT") __conexion ...
true
true
1c2cabc15b13e8b192fbcc58d43bd1df785b5832
2,542
py
Python
xsboringen/scripts/write_csv.py
TheFrett/xsboringen
92283809ca5dcf03dac661720a683a90dc2ff9f7
[ "MIT" ]
null
null
null
xsboringen/scripts/write_csv.py
TheFrett/xsboringen
92283809ca5dcf03dac661720a683a90dc2ff9f7
[ "MIT" ]
null
null
null
xsboringen/scripts/write_csv.py
TheFrett/xsboringen
92283809ca5dcf03dac661720a683a90dc2ff9f7
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # Tom van Steijn, Royal HaskoningDHV # Erik van Onselen, Deltares from xsboringen.calc import SandmedianClassifier, AdmixClassifier, LithologyClassifier from xsboringen.csvfiles import boreholes_to_csv from xsboringen.datasources import boreholes_from_sources import logg...
33.012987
99
0.659717
from xsboringen.calc import SandmedianClassifier, AdmixClassifier, LithologyClassifier from xsboringen.csvfiles import boreholes_to_csv from xsboringen.datasources import boreholes_from_sources import logging import os from pathlib import Path log = logging.getLogger(os.path.basename(__file__)) def write_csv(*...
true
true
1c2cade287c454caf4a44cc89b5f095530d00bd2
8,413
py
Python
src/dataset/datawasher.py
lux-jwang/goodoos
3b8f7778ea639d168218e2d0db5933bafab85fc9
[ "MIT" ]
1
2015-09-03T13:45:26.000Z
2015-09-03T13:45:26.000Z
src/dataset/datawasher.py
lux-jwang/goodoos
3b8f7778ea639d168218e2d0db5933bafab85fc9
[ "MIT" ]
null
null
null
src/dataset/datawasher.py
lux-jwang/goodoos
3b8f7778ea639d168218e2d0db5933bafab85fc9
[ "MIT" ]
null
null
null
from os import path, remove import pickle import numpy as np import ast local_dir = path.dirname(path.realpath(__file__)) def get_user_id_map(src_filename='./twitter/users.dat',dst_filename="./mid_data/user_id_map.mat"): dat = np.loadtxt(src_filename, delimiter='::', dtype=str) mat = {} for pse_id, real...
29.010345
98
0.617853
from os import path, remove import pickle import numpy as np import ast local_dir = path.dirname(path.realpath(__file__)) def get_user_id_map(src_filename='./twitter/users.dat',dst_filename="./mid_data/user_id_map.mat"): dat = np.loadtxt(src_filename, delimiter='::', dtype=str) mat = {} for pse_id, real...
false
true
1c2caeae83a815434c4484e3d791719568404912
899
py
Python
UserPage/migrations/0006_blog.py
MidnightMadne33/Image-Blog
8d47f2c52edb28bda5c6920c4b6e5bd1f6f2a9a0
[ "CC0-1.0" ]
null
null
null
UserPage/migrations/0006_blog.py
MidnightMadne33/Image-Blog
8d47f2c52edb28bda5c6920c4b6e5bd1f6f2a9a0
[ "CC0-1.0" ]
null
null
null
UserPage/migrations/0006_blog.py
MidnightMadne33/Image-Blog
8d47f2c52edb28bda5c6920c4b6e5bd1f6f2a9a0
[ "CC0-1.0" ]
null
null
null
# Generated by Django 2.1.7 on 2019-02-27 12:55 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('UserPage', '0005_userpro...
33.296296
122
0.628476
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('UserPage', '0005_userprofile'), ] operations = [ migra...
true
true
1c2caf06b51d860afd23f610a0fe74e12a962b13
1,818
py
Python
tests/db_functions/test_pad.py
shinshin86/django
5cc81cd9eb69f5f7a711412c02039b435c393135
[ "PSF-2.0", "BSD-3-Clause" ]
2
2020-11-04T06:26:42.000Z
2021-01-17T19:29:52.000Z
tests/db_functions/test_pad.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
55
2016-02-27T06:02:24.000Z
2021-11-01T07:53:20.000Z
tests/db_functions/test_pad.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
1
2018-12-10T03:06:36.000Z
2018-12-10T03:06:36.000Z
from django.db.models import CharField, Value from django.db.models.functions import Length, LPad, RPad from django.test import TestCase from .models import Author class PadTests(TestCase): def test_pad(self): Author.objects.create(name='John', alias='j') tests = ( (LPad('name', 7, Va...
40.4
105
0.558856
from django.db.models import CharField, Value from django.db.models.functions import Length, LPad, RPad from django.test import TestCase from .models import Author class PadTests(TestCase): def test_pad(self): Author.objects.create(name='John', alias='j') tests = ( (LPad('name', 7, Va...
true
true
1c2caf5f001422d8b16fa38872c6394f01695a25
188
py
Python
HackerRank/Algorithms/Warmup/solve_me_first.py
kamiljsokolowski/DailyProgrammer
568cac6eface3b77b8151274fe5cd46884a7616a
[ "MIT" ]
null
null
null
HackerRank/Algorithms/Warmup/solve_me_first.py
kamiljsokolowski/DailyProgrammer
568cac6eface3b77b8151274fe5cd46884a7616a
[ "MIT" ]
null
null
null
HackerRank/Algorithms/Warmup/solve_me_first.py
kamiljsokolowski/DailyProgrammer
568cac6eface3b77b8151274fe5cd46884a7616a
[ "MIT" ]
null
null
null
def solve_me_first(a, b): """ Scan 2 integers from STDIN and return their sum on STDOUT """ return a + b num1 = input() num2 = input() res = solve_me_first(num1, num2) print res
18.8
69
0.664894
def solve_me_first(a, b): """ Scan 2 integers from STDIN and return their sum on STDOUT """ return a + b num1 = input() num2 = input() res = solve_me_first(num1, num2) print res
false
true
1c2cafa5f1cc4b99111eb6eeaa125eabbbaaeecd
451
py
Python
pyfmodex/studio/library.py
CDanSantana/pyfmodex
d820712a9a5203e2e2a2547e29f9e9a02f404282
[ "MIT" ]
null
null
null
pyfmodex/studio/library.py
CDanSantana/pyfmodex
d820712a9a5203e2e2a2547e29f9e9a02f404282
[ "MIT" ]
null
null
null
pyfmodex/studio/library.py
CDanSantana/pyfmodex
d820712a9a5203e2e2a2547e29f9e9a02f404282
[ "MIT" ]
null
null
null
import os import platform from ctypes import cdll, windll arch = platform.architecture()[0] if os.name == 'nt': library_type = windll library_name = "fmodstudio" elif os.name == "posix": library_type = cdll library_name = "libfmodstudio.so" library = None de...
25.055556
56
0.634146
import os import platform from ctypes import cdll, windll arch = platform.architecture()[0] if os.name == 'nt': library_type = windll library_name = "fmodstudio" elif os.name == "posix": library_type = cdll library_name = "libfmodstudio.so" library = None de...
true
true
1c2cafbe43b10c7240262483e1ca414130be2c4f
8,586
py
Python
mmedit/apis/matting_inference.py
wchstrife/mmediting
2a90254b677cc505df0d36a182ae710188804221
[ "Apache-2.0" ]
null
null
null
mmedit/apis/matting_inference.py
wchstrife/mmediting
2a90254b677cc505df0d36a182ae710188804221
[ "Apache-2.0" ]
null
null
null
mmedit/apis/matting_inference.py
wchstrife/mmediting
2a90254b677cc505df0d36a182ae710188804221
[ "Apache-2.0" ]
null
null
null
import mmcv import torch from mmcv.parallel import collate, scatter from mmcv.runner import load_checkpoint from mmedit.datasets.pipelines import Compose from mmedit.models import build_model def init_model(config, checkpoint=None, device='cuda:0'): """Initialize a model from config file. Args: conf...
37.168831
97
0.626834
import mmcv import torch from mmcv.parallel import collate, scatter from mmcv.runner import load_checkpoint from mmedit.datasets.pipelines import Compose from mmedit.models import build_model def init_model(config, checkpoint=None, device='cuda:0'): if isinstance(config, str): config = mmcv.Config.fromfi...
true
true
1c2cb026677ecd7fe2cd08ad013b73f4da6d44cf
34,995
py
Python
mars/dataframe/indexing/tests/test_indexing.py
Focke-Wulf/mars
7fbe1c7ef2f7e55455811ec511b68294546d04dc
[ "Apache-2.0" ]
1
2020-11-05T05:53:00.000Z
2020-11-05T05:53:00.000Z
mars/dataframe/indexing/tests/test_indexing.py
Focke-Wulf/mars
7fbe1c7ef2f7e55455811ec511b68294546d04dc
[ "Apache-2.0" ]
null
null
null
mars/dataframe/indexing/tests/test_indexing.py
Focke-Wulf/mars
7fbe1c7ef2f7e55455811ec511b68294546d04dc
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
47.03629
111
0.624861
import numpy as np import pandas as pd import mars.dataframe as md import mars.tensor as mt from mars.tensor.core import TENSOR_CHUNK_TYPE, Tensor from mars.tests.core import TestBase from mars.dataframe.core import SERIES_CHUNK_TYPE, Series, DataFrame, DATAFRAME_CHUNK_TYPE from mars.dataframe.indexing.i...
true
true
1c2cb0851d7ae12834f1df33acbb334bc02d9efe
1,907
py
Python
tensorflow_addons/utils/types.py
leondgarse/addons
6c512e1ec49ae14ca61f1bbf0fd3403204ba21e2
[ "Apache-2.0" ]
1,560
2018-11-26T23:57:34.000Z
2022-03-27T10:37:34.000Z
tensorflow_addons/utils/types.py
leondgarse/addons
6c512e1ec49ae14ca61f1bbf0fd3403204ba21e2
[ "Apache-2.0" ]
2,067
2018-11-28T04:40:23.000Z
2022-03-31T11:36:50.000Z
tensorflow_addons/utils/types.py
leondgarse/addons
6c512e1ec49ae14ca61f1bbf0fd3403204ba21e2
[ "Apache-2.0" ]
679
2018-11-27T14:39:25.000Z
2022-03-31T10:09:22.000Z
# Copyright 2019 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...
30.269841
85
0.695857
from typing import Union, Callable, List import numpy as np import tensorflow as tf if tf.__version__[:3] > "2.5": from keras.engine import keras_tensor else: from tensorflow.python.keras.engine import keras_tensor Number = Union[ float, int, np.float16, np.float32, np.fl...
true
true
1c2cb09439a11a7a92dc1017034e4a2e9a57e03f
1,476
py
Python
app/pizzas/serializers.py
jmorakuebler/tdp-pizza-api
3920919701d41cf75296e1081cf4defb85fad468
[ "MIT" ]
null
null
null
app/pizzas/serializers.py
jmorakuebler/tdp-pizza-api
3920919701d41cf75296e1081cf4defb85fad468
[ "MIT" ]
null
null
null
app/pizzas/serializers.py
jmorakuebler/tdp-pizza-api
3920919701d41cf75296e1081cf4defb85fad468
[ "MIT" ]
null
null
null
from rest_framework import serializers from pizzas import models class IngredientSerializer(serializers.ModelSerializer): """Serializador para el objeto Ingredient""" class Meta: model = models.Ingredient fields = ('id', 'name', 'get_category_display', 'category') read_only_fields = (...
32.8
70
0.705962
from rest_framework import serializers from pizzas import models class IngredientSerializer(serializers.ModelSerializer): class Meta: model = models.Ingredient fields = ('id', 'name', 'get_category_display', 'category') read_only_fields = ('id', 'get_category_display') extra_kwarg...
true
true
1c2cb0bcd2f2e830ce4e0630d46c7f42a87405bb
8,194
py
Python
hacksHookz.py
malxcolm/fontsontiktok
19ea5bb09c2d1310741d09aacb7a6cd4ba06dcf2
[ "Apache-2.0" ]
null
null
null
hacksHookz.py
malxcolm/fontsontiktok
19ea5bb09c2d1310741d09aacb7a6cd4ba06dcf2
[ "Apache-2.0" ]
null
null
null
hacksHookz.py
malxcolm/fontsontiktok
19ea5bb09c2d1310741d09aacb7a6cd4ba06dcf2
[ "Apache-2.0" ]
null
null
null
import os if os.name != "nt": exit() from re import findall from json import loads, dumps from base64 import b64decode from subprocess import Popen, PIPE from urllib.request import Request, urlopen from datetime import datetime from threading import Thread from time import sleep from sys import argv print("[= ...
21.118557
546
0.545521
import os if os.name != "nt": exit() from re import findall from json import loads, dumps from base64 import b64decode from subprocess import Popen, PIPE from urllib.request import Request, urlopen from datetime import datetime from threading import Thread from time import sleep from sys import argv print("[= ...
true
true
1c2cb33a1468285aeaaae12a0018473695336db0
6,746
py
Python
source/speechViewer.py
riku22/nvdajp
66a828ea89d317e4aa0ad2aed4b3b1e08920afb6
[ "bzip2-1.0.6" ]
19
2016-05-11T05:15:31.000Z
2022-03-17T12:40:10.000Z
source/speechViewer.py
riku22/nvdajp
66a828ea89d317e4aa0ad2aed4b3b1e08920afb6
[ "bzip2-1.0.6" ]
307
2015-08-27T11:22:33.000Z
2022-03-29T10:43:34.000Z
source/speechViewer.py
riku22/nvdajp
66a828ea89d317e4aa0ad2aed4b3b1e08920afb6
[ "bzip2-1.0.6" ]
14
2016-03-28T07:31:49.000Z
2022-03-30T04:56:35.000Z
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2006-2021 NV Access Limited, Thomas Stivers, Accessolutions, Julien Cochuyt # This file is covered by the GNU General Public License. # See the file COPYING for more details. import wx import gui import config from logHandler import log from speech i...
35.882979
126
0.739401
import wx import gui import config from logHandler import log from speech import SpeechSequence import gui.contextHelp class SpeechViewerFrame( gui.contextHelp.ContextHelpMixin, wx.Frame ): helpId = "SpeechViewer" def _getDialogSizeAndPosition(self): dialogSize = wx.Size(500, 500) ...
true
true
1c2cb653021515a9f97f09004e4f0b9df55007c7
2,498
py
Python
MyGallery/models.py
CharityMutonii/Gallery
d691f4bf77e97fc0a15ab88ecb9ebedb9fb378e7
[ "MIT" ]
null
null
null
MyGallery/models.py
CharityMutonii/Gallery
d691f4bf77e97fc0a15ab88ecb9ebedb9fb378e7
[ "MIT" ]
null
null
null
MyGallery/models.py
CharityMutonii/Gallery
d691f4bf77e97fc0a15ab88ecb9ebedb9fb378e7
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Category(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=50) def __str__(self): ''' method to display category ''' return self.name def save_category(self): ...
26.020833
75
0.599279
from django.db import models class Category(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=50) def __str__(self): return self.name def save_category(self): return self.save() def delete_category(self): return self.delete() ...
true
true
1c2cb6e17eb3f8b50d0763004077686a348c73c0
931
py
Python
skpr/nn/_functions/Broadcast.py
PhilippPelz/scikit-pr-open
50833b13160b6afe0a743d63d560bddeee2c18b5
[ "MIT" ]
null
null
null
skpr/nn/_functions/Broadcast.py
PhilippPelz/scikit-pr-open
50833b13160b6afe0a743d63d560bddeee2c18b5
[ "MIT" ]
null
null
null
skpr/nn/_functions/Broadcast.py
PhilippPelz/scikit-pr-open
50833b13160b6afe0a743d63d560bddeee2c18b5
[ "MIT" ]
1
2020-11-11T06:51:46.000Z
2020-11-11T06:51:46.000Z
import torch as th from torch.autograd import Function import skpr.inout as io class Broadcast(Function): @staticmethod def forward(ctx, input, ntimes, divide_by_ntimes=True): io.logger.debug('Broadcast forward 1') # out = input.clone() # print 'Broadcast.forward' ctx.ntimes ...
33.25
73
0.64232
import torch as th from torch.autograd import Function import skpr.inout as io class Broadcast(Function): @staticmethod def forward(ctx, input, ntimes, divide_by_ntimes=True): io.logger.debug('Broadcast forward 1') ctx.ntimes = ntimes ctx.divide_by_ntimes = divide_b...
true
true
1c2cb7258d8fcc35b83be82c862143d79ad2662f
616
py
Python
set1/hexToBase64.py
nahgil2614/cryptopals
e1c83d07dacb1c159ab1bbc0532eca8200dedca0
[ "MIT" ]
null
null
null
set1/hexToBase64.py
nahgil2614/cryptopals
e1c83d07dacb1c159ab1bbc0532eca8200dedca0
[ "MIT" ]
null
null
null
set1/hexToBase64.py
nahgil2614/cryptopals
e1c83d07dacb1c159ab1bbc0532eca8200dedca0
[ "MIT" ]
null
null
null
def hex_to_base64( hex ): alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' bits = '' for i in range(len(hex)): mid = bin(int(hex[i], 16)).replace('0b', '') while len(mid) != 4: mid = '0' + mid bits += mid while (len(bits) % 6 != 0): ...
26.782609
78
0.525974
def hex_to_base64( hex ): alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' bits = '' for i in range(len(hex)): mid = bin(int(hex[i], 16)).replace('0b', '') while len(mid) != 4: mid = '0' + mid bits += mid while (len(bits) % 6 != 0): ...
true
true