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
1c459cb9695ce51149e5eae19d31908ca788d5d5
6,562
py
Python
seq2seq/tasks/decode_text.py
chunfengh/seq2seq
cc6e1a15f523c2ead809d48b1f6eebbeb94e3f0b
[ "Apache-2.0" ]
null
null
null
seq2seq/tasks/decode_text.py
chunfengh/seq2seq
cc6e1a15f523c2ead809d48b1f6eebbeb94e3f0b
[ "Apache-2.0" ]
null
null
null
seq2seq/tasks/decode_text.py
chunfengh/seq2seq
cc6e1a15f523c2ead809d48b1f6eebbeb94e3f0b
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
34.536842
77
0.704358
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools from pydoc import locate import numpy as np import tensorflow as tf from tensorflow import gfile from seq2seq.tasks.inference_task impor...
true
true
1c459cbafa7959829a0eb6b44a0612c737b7663e
782
py
Python
jorldy/config/m_dqn/cartpole.py
Kyushik/JORLDY
6a24a2195e5e87ade157ee53f631af2221f0a188
[ "Apache-2.0" ]
300
2021-11-03T07:06:34.000Z
2022-03-24T02:23:56.000Z
jorldy/config/m_dqn/cartpole.py
Kyushik/JORLDY
6a24a2195e5e87ade157ee53f631af2221f0a188
[ "Apache-2.0" ]
37
2021-11-04T04:31:07.000Z
2022-03-30T01:40:49.000Z
jorldy/config/m_dqn/cartpole.py
Kyushik/JORLDY
6a24a2195e5e87ade157ee53f631af2221f0a188
[ "Apache-2.0" ]
45
2021-11-03T08:05:56.000Z
2022-03-24T08:35:05.000Z
### Munchausen DQN CartPole Config ### env = { "name": "cartpole", "action_type": "discrete", "render": False, } agent = { "name": "m_dqn", "network": "discrete_q_network", "gamma": 0.99, "epsilon_init": 1.0, "epsilon_min": 0.01, "explore_ratio": 0.2, "buffer_size": 50000, ...
18.186047
38
0.553708
False, } agent = { "name": "m_dqn", "network": "discrete_q_network", "gamma": 0.99, "epsilon_init": 1.0, "epsilon_min": 0.01, "explore_ratio": 0.2, "buffer_size": 50000, "batch_size": 32, "start_train_step": 2000, "target_update_period": 500, "lr_decay": True, "alph...
true
true
1c459d4fd01576a1d2a19cab06b15dcefae8bd24
336
py
Python
setup.py
ippee/py_init
0d997ec5ddaee95ef71562f14542e74f40e88646
[ "CC0-1.0" ]
null
null
null
setup.py
ippee/py_init
0d997ec5ddaee95ef71562f14542e74f40e88646
[ "CC0-1.0" ]
null
null
null
setup.py
ippee/py_init
0d997ec5ddaee95ef71562f14542e74f40e88646
[ "CC0-1.0" ]
null
null
null
# coding: UTF-8 from setuptools import setup install_requires = [] packages = [] setup( name='', version='0.1.0', license='', description='', author='you', author_email='', url='', packages=packages, install_requires=install_requires, setup_requires=['pytest-runner'], tests_require=['pytest', ...
15.272727
40
0.660714
from setuptools import setup install_requires = [] packages = [] setup( name='', version='0.1.0', license='', description='', author='you', author_email='', url='', packages=packages, install_requires=install_requires, setup_requires=['pytest-runner'], tests_require=['pytest', "pytest-cov"] )...
true
true
1c459d5ed4db13f7e8ef93008315c97790ecb9b7
5,618
py
Python
commitizen/commands/init.py
christian-hawk/commitizen
5c0dd546866f2bd2ab6b4ecd27035441b7b4692b
[ "MIT" ]
null
null
null
commitizen/commands/init.py
christian-hawk/commitizen
5c0dd546866f2bd2ab6b4ecd27035441b7b4692b
[ "MIT" ]
null
null
null
commitizen/commands/init.py
christian-hawk/commitizen
5c0dd546866f2bd2ab6b4ecd27035441b7b4692b
[ "MIT" ]
null
null
null
import os import questionary import yaml from packaging.version import Version from commitizen import cmd, factory, out from commitizen.__version__ import __version__ from commitizen.config import BaseConfig, TomlConfig from commitizen.cz import registry from commitizen.defaults import config_files from commitizen.ex...
36.245161
92
0.58455
import os import questionary import yaml from packaging.version import Version from commitizen import cmd, factory, out from commitizen.__version__ import __version__ from commitizen.config import BaseConfig, TomlConfig from commitizen.cz import registry from commitizen.defaults import config_files from commitizen.ex...
true
true
1c459db6c393559c2cd965467577c6bdcb250d28
1,090
py
Python
hpc-historias-clinicas/fojas_quirurgicas/migrations/0005_auto_20150505_0101.py
btenaglia/hpc-historias-clinicas
649d8660381381b1c591667760c122d73071d5ec
[ "BSD-3-Clause" ]
null
null
null
hpc-historias-clinicas/fojas_quirurgicas/migrations/0005_auto_20150505_0101.py
btenaglia/hpc-historias-clinicas
649d8660381381b1c591667760c122d73071d5ec
[ "BSD-3-Clause" ]
null
null
null
hpc-historias-clinicas/fojas_quirurgicas/migrations/0005_auto_20150505_0101.py
btenaglia/hpc-historias-clinicas
649d8660381381b1c591667760c122d73071d5ec
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('fojas_quirurgicas', '0004_auto_20150504_2120'), ] operations = [ migrations.AlterField( model_na...
32.058824
137
0.612844
from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('fojas_quirurgicas', '0004_auto_20150504_2120'), ] operations = [ migrations.AlterField( model_name='fojasquirurgicas', ...
true
true
1c459dbc87ad166cc650a1298f694761c0c2d4ae
14,998
py
Python
utils.py
RachithP/rpg_public_dronet
244b44c6d321e77cfe326071f8413ea1f7e438cb
[ "MIT" ]
null
null
null
utils.py
RachithP/rpg_public_dronet
244b44c6d321e77cfe326071f8413ea1f7e438cb
[ "MIT" ]
null
null
null
utils.py
RachithP/rpg_public_dronet
244b44c6d321e77cfe326071f8413ea1f7e438cb
[ "MIT" ]
1
2019-12-10T02:48:20.000Z
2019-12-10T02:48:20.000Z
import re import os import numpy as np import tensorflow as tf import json import time from keras import backend as K from keras.preprocessing.image import Iterator from keras.preprocessing.image import ImageDataGenerator from keras.utils.generic_utils import Progbar from keras.models import model_from_json import img...
35.206573
96
0.595146
import re import os import numpy as np import tensorflow as tf import json import time from keras import backend as K from keras.preprocessing.image import Iterator from keras.preprocessing.image import ImageDataGenerator from keras.utils.generic_utils import Progbar from keras.models import model_from_json import img...
true
true
1c459f2b6ff309defaa99622a9e67444b25d1a67
309
py
Python
testing_8709/main.py
akvrdata/testing_8709
b9987a6a14d582a062f08d9de13f9b46f38989b1
[ "MIT" ]
null
null
null
testing_8709/main.py
akvrdata/testing_8709
b9987a6a14d582a062f08d9de13f9b46f38989b1
[ "MIT" ]
null
null
null
testing_8709/main.py
akvrdata/testing_8709
b9987a6a14d582a062f08d9de13f9b46f38989b1
[ "MIT" ]
null
null
null
import sys import click @click.command() @click.option('--count',default=1,help='Number of prints required') @click.option('--name',help='name to print') def hello(count,name): '''Click Cli testing''' for x in range(count): click.echo('Hello %s' %name) if __name__ == '__main__': hello()
23.769231
67
0.653722
import sys import click @click.command() @click.option('--count',default=1,help='Number of prints required') @click.option('--name',help='name to print') def hello(count,name): for x in range(count): click.echo('Hello %s' %name) if __name__ == '__main__': hello()
true
true
1c459f2e63f5d6cbc44f6b3304bb888e1f9f90a0
3,711
py
Python
bauh/api/http.py
Flash1232/bauh
6f65556c05ae272c1dbbd557c7f80a606658eb56
[ "Zlib" ]
507
2019-08-12T16:15:55.000Z
2022-03-28T15:49:39.000Z
bauh/api/http.py
Flash1232/bauh
6f65556c05ae272c1dbbd557c7f80a606658eb56
[ "Zlib" ]
176
2019-08-14T02:35:21.000Z
2022-03-31T21:43:56.000Z
bauh/api/http.py
Flash1232/bauh
6f65556c05ae272c1dbbd557c7f80a606658eb56
[ "Zlib" ]
57
2019-09-02T04:09:22.000Z
2022-03-21T21:37:16.000Z
import logging import time import traceback from typing import Optional import requests import yaml from bauh.commons import system class HttpClient: def __init__(self, logger: logging.Logger, max_attempts: int = 2, timeout: int = 30, sleep: float = 0.5): self.max_attempts = max_attempts self.s...
35.009434
207
0.565346
import logging import time import traceback from typing import Optional import requests import yaml from bauh.commons import system class HttpClient: def __init__(self, logger: logging.Logger, max_attempts: int = 2, timeout: int = 30, sleep: float = 0.5): self.max_attempts = max_attempts self.s...
true
true
1c459fbfb4d5f376b961ba213a2581525628f906
398
py
Python
accounts/migrations/0002_account_points.py
ebar0n/palermo-coin
63dc14fce31fbeae50ec7ebf5ea97efbb1ec18fd
[ "MIT" ]
null
null
null
accounts/migrations/0002_account_points.py
ebar0n/palermo-coin
63dc14fce31fbeae50ec7ebf5ea97efbb1ec18fd
[ "MIT" ]
15
2019-05-13T23:40:06.000Z
2022-03-11T23:39:57.000Z
accounts/migrations/0002_account_points.py
ebar0n/leviatan-backend
63dc14fce31fbeae50ec7ebf5ea97efbb1ec18fd
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-03-07 07:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AddField( model_name='account', name='points', f...
20.947368
73
0.603015
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), ] operations = [ migrations.AddField( model_name='account', name='points', field=models.PositiveIntegerField(default=0, edi...
true
true
1c45a0ca7dda5396a87bdbca7a0a71105cce95b6
1,359
py
Python
python2/timeout.py
SLongofono/Python-Misc
c6c2735f65b7f06e31996140c2921315b1a6cf9e
[ "MIT" ]
2
2017-07-24T17:46:13.000Z
2017-12-09T16:00:40.000Z
python2/timeout.py
SLongofono/Python-Misc
c6c2735f65b7f06e31996140c2921315b1a6cf9e
[ "MIT" ]
null
null
null
python2/timeout.py
SLongofono/Python-Misc
c6c2735f65b7f06e31996140c2921315b1a6cf9e
[ "MIT" ]
1
2018-09-18T15:18:47.000Z
2018-09-18T15:18:47.000Z
def timed_func(f, args=(), kwargs=None, timeout=30, default=None, errormsg="Timeout error"): # Since kwargs are mutable, assume they don't exist via optional arguments. If they do in fact exist, # they will exist in this context and be assigned. Otherwise, set to an empty dict and proceed. kwargs = kwargs or {} i...
28.3125
103
0.734364
def timed_func(f, args=(), kwargs=None, timeout=30, default=None, errormsg="Timeout error"): # they will exist in this context and be assigned. Otherwise, set to an empty dict and proceed. kwargs = kwargs or {} import signal class TimeoutError(Exception): pass def timeout_handler(signum, frame): raise Time...
true
true
1c45a0f0a16e4c957d53072ae53309de03cc22ef
6,090
py
Python
docs/conf.py
open-datastudio/datastudio
5055579adf969ad6d7491454b30ab2fedbaaa067
[ "MIT" ]
10
2020-06-23T13:45:44.000Z
2021-11-04T13:31:43.000Z
docs/conf.py
open-datastudio/datastudio
5055579adf969ad6d7491454b30ab2fedbaaa067
[ "MIT" ]
1
2020-06-23T23:15:10.000Z
2020-08-11T04:41:25.000Z
docs/conf.py
open-datastudio/datastudio
5055579adf969ad6d7491454b30ab2fedbaaa067
[ "MIT" ]
2
2021-11-20T21:24:36.000Z
2022-01-05T03:35:32.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
31.71875
93
0.663054
project = u'Open Data Studio' copyright = u'Open Data Studio Authors' author = u'Open Data Studio Authors' version = u'' release = u'' extensions = [ 'sphinx.ext.autosectionlabel', 'aafigure.sphinxext' ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = ...
true
true
1c45a10a9ddde743dce9b343e4d18f568bb05e72
3,531
py
Python
python/paddle/fluid/tests/unittests/dist_mnist.py
hshen14/Paddle
0962be9c800d29e0804fc3135163bdfba1564c61
[ "Apache-2.0" ]
2
2019-04-03T05:36:17.000Z
2020-04-29T03:38:54.000Z
python/paddle/fluid/tests/unittests/dist_mnist.py
hshen14/Paddle
0962be9c800d29e0804fc3135163bdfba1564c61
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/dist_mnist.py
hshen14/Paddle
0962be9c800d29e0804fc3135163bdfba1564c61
[ "Apache-2.0" ]
3
2019-01-07T06:50:29.000Z
2019-03-13T08:48:23.000Z
# Copyright (c) 2018 PaddlePaddle 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 app...
32.394495
89
0.687624
from __future__ import print_function import numpy as np import argparse import time import math import paddle import paddle.fluid as fluid import paddle.fluid.profiler as profiler from paddle.fluid import core import unittest from multiprocessing import Process import os import signal from functools im...
true
true
1c45a12fb0bf22d70b2259e645866d62d1c2fa9f
5,240
py
Python
tests/test_cli.py
steffenschumacher/NIPAP
200ec08ce02ba9f782b276510bc7bb23b20d7570
[ "MIT" ]
1
2018-12-07T15:59:27.000Z
2018-12-07T15:59:27.000Z
tests/test_cli.py
steffenschumacher/NIPAP
200ec08ce02ba9f782b276510bc7bb23b20d7570
[ "MIT" ]
1
2021-07-24T14:44:10.000Z
2021-07-24T14:44:10.000Z
tests/test_cli.py
steffenschumacher/NIPAP
200ec08ce02ba9f782b276510bc7bb23b20d7570
[ "MIT" ]
1
2020-05-27T15:28:03.000Z
2020-05-27T15:28:03.000Z
#!/usr/bin/env python # vim: et : import logging import unittest import sys sys.path.append('../nipap/') from nipap.backend import Nipap from nipap.authlib import SqliteAuth from nipap.nipapconfig import NipapConfig logger = logging.getLogger() logger.setLevel(logging.DEBUG) log_format = "%(levelname)-8s %(message)s...
29.438202
140
0.55687
import logging import unittest import sys sys.path.append('../nipap/') from nipap.backend import Nipap from nipap.authlib import SqliteAuth from nipap.nipapconfig import NipapConfig logger = logging.getLogger() logger.setLevel(logging.DEBUG) log_format = "%(levelname)-8s %(message)s" import xmlrpclib server_url ...
true
true
1c45a18a21fd6fbd0b288b2271b398a0ed9f080d
12,540
py
Python
napari/_qt/widgets/qt_viewer_dock_widget.py
Mishrasubha/napari
c4d1038fc3ed30dc228949cbdedf12826ec2efc2
[ "BSD-3-Clause" ]
null
null
null
napari/_qt/widgets/qt_viewer_dock_widget.py
Mishrasubha/napari
c4d1038fc3ed30dc228949cbdedf12826ec2efc2
[ "BSD-3-Clause" ]
3
2020-11-14T08:35:18.000Z
2021-07-26T10:06:32.000Z
napari/_qt/widgets/qt_viewer_dock_widget.py
Mishrasubha/napari
c4d1038fc3ed30dc228949cbdedf12826ec2efc2
[ "BSD-3-Clause" ]
null
null
null
import warnings from functools import reduce from itertools import count from operator import ior from typing import List, Optional from qtpy.QtCore import Qt from qtpy.QtWidgets import ( QDockWidget, QFrame, QHBoxLayout, QLabel, QPushButton, QSizePolicy, QVBoxLayout, QWidget, ) from ....
35.12605
213
0.596332
import warnings from functools import reduce from itertools import count from operator import ior from typing import List, Optional from qtpy.QtCore import Qt from qtpy.QtWidgets import ( QDockWidget, QFrame, QHBoxLayout, QLabel, QPushButton, QSizePolicy, QVBoxLayout, QWidget, ) from ....
true
true
1c45a1a090a13d50476e4eb2e61b77dfeabe3a7e
22,311
py
Python
test/functional/importmulti.py
DeepPool/test
c6d99f019667ea4bf51139adff2a98d46c0015ed
[ "MIT" ]
null
null
null
test/functional/importmulti.py
DeepPool/test
c6d99f019667ea4bf51139adff2a98d46c0015ed
[ "MIT" ]
null
null
null
test/functional/importmulti.py
DeepPool/test
c6d99f019667ea4bf51139adff2a98d46c0015ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-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. """Test the importmulti RPC.""" from test_framework.test_framework import DietBitcoinTestFramework from te...
48.084052
137
0.631841
from test_framework.test_framework import DietBitcoinTestFramework from test_framework.util import * class ImportMultiTest (DietBitcoinTestFramework): def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True def setup_network(self): self.setup_nodes() def ru...
true
true
1c45a2de98069c080d2cca90e61524a21453a51c
1,957
py
Python
examples/get-started/play_mp3/example_test.py
kigor302/esp-adf
7feaf6c4b23d2a06850f96c302eebb814516239c
[ "MIT-0" ]
12
2021-04-15T14:15:27.000Z
2022-01-17T03:40:35.000Z
examples/get-started/play_mp3/example_test.py
Tianxiaomo/esp-adf
fae539c3035b2c041f49c5b01cdc4c99038595b0
[ "MIT-0" ]
2
2021-04-03T22:00:11.000Z
2021-10-03T18:27:39.000Z
examples/get-started/play_mp3/example_test.py
Tianxiaomo/esp-adf
fae539c3035b2c041f49c5b01cdc4c99038595b0
[ "MIT-0" ]
4
2021-06-22T10:08:07.000Z
2021-11-17T23:21:04.000Z
import os import sys # this is a test case written with tiny-test-fw. # to run test cases outside tiny-test-fw, # we need to set environment variable `TEST_FW_PATH`, # then get and insert `TEST_FW_PATH` to sys path before import FW module test_fw_path = os.getenv("TEST_FW_PATH") if test_fw_path and test_fw_path not i...
39.938776
114
0.748084
import os import sys test_fw_path = os.getenv("TEST_FW_PATH") if test_fw_path and test_fw_path not in sys.path: sys.path.insert(0, test_fw_path) auto_test_path = os.getenv("AUTO_TEST_PATH") if auto_test_path and auto_test_path not in sys.path: sys.path.insert(0, auto_test_path) import TinyFW import Norm...
true
true
1c45a4aba3bdd23727ad80971a816dcd80684560
2,390
py
Python
lib/util.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
1
2021-05-27T13:32:45.000Z
2021-05-27T13:32:45.000Z
lib/util.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
null
null
null
lib/util.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
null
null
null
# MicroPython utility methods. # # Copyright (c) 2020 ks-tec # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to dealin the Software without restriction, including without limitation # the rights to use, copy, modi...
35.147059
82
0.684519
def strtobool(value): if type(value) is not str and value not in [0, 1]: raise TypeError("The type of parameter value must be string.") ret_value = None if value.lower() in ["false", "f", "no", "n", "off", "0"] or value == 0: ret_value = False elif value.lower() in ["true", "t", "ye...
true
true
1c45a56482a78277a224da1cf5efdb87161f30b9
626
py
Python
manage.py
agamgn/django-Tourism
ee8fae54981d135cbd7ddaf9131eb77ea7b2fb8a
[ "MIT" ]
9
2019-06-30T06:34:22.000Z
2021-11-09T17:21:16.000Z
manage.py
agamgn/django-Tourism
ee8fae54981d135cbd7ddaf9131eb77ea7b2fb8a
[ "MIT" ]
14
2019-12-22T02:04:18.000Z
2022-03-11T23:44:38.000Z
manage.py
agamgn/django-Tourism
ee8fae54981d135cbd7ddaf9131eb77ea7b2fb8a
[ "MIT" ]
3
2019-06-30T06:35:57.000Z
2019-12-18T03:42:43.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'treval.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportE...
28.454545
73
0.682109
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'treval.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
1c45a58e90e653de1bb431003c78566d25a7d67b
57,074
py
Python
improver/ensemble_copula_coupling/ensemble_copula_coupling.py
VictoriaLouiseS/improver
86470bff973e21fbd5f24e26047871ad3bc2f3db
[ "BSD-3-Clause" ]
null
null
null
improver/ensemble_copula_coupling/ensemble_copula_coupling.py
VictoriaLouiseS/improver
86470bff973e21fbd5f24e26047871ad3bc2f3db
[ "BSD-3-Clause" ]
3
2020-04-25T12:55:42.000Z
2020-07-23T11:50:46.000Z
improver/ensemble_copula_coupling/ensemble_copula_coupling.py
Kat-90/improver
a5c31be3430df429ae38e7c16e267fcbc2af1858
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2020 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
42.816204
102
0.644286
import warnings import iris import numpy as np from iris.exceptions import CoordinateNotFoundError, InvalidCubeError from scipy import stats from improver import BasePlugin from improver.calibration.utilities import convert_cube_data_to_2d from improver.ensemble_copula_coupling.utilities...
true
true
1c45a614492dc6ca48e3d950527282f5ff9aa377
784
py
Python
examples/dagster_examples/intro_tutorial/config.py
bambielli-flex/dagster
30b75ba7c62fc536bc827f177c1dc6ba20f5ae20
[ "Apache-2.0" ]
null
null
null
examples/dagster_examples/intro_tutorial/config.py
bambielli-flex/dagster
30b75ba7c62fc536bc827f177c1dc6ba20f5ae20
[ "Apache-2.0" ]
null
null
null
examples/dagster_examples/intro_tutorial/config.py
bambielli-flex/dagster
30b75ba7c62fc536bc827f177c1dc6ba20f5ae20
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 # py27 compat from dagster import Field, PipelineDefinition, execute_pipeline, solid, types @solid(config_field=Field(types.String, is_optional=True, default_value='en-us')) def configurable_hello(context): if len(context.solid_config) >= 3 and context.solid_config[:3] == 'haw': return ...
31.36
98
0.714286
from dagster import Field, PipelineDefinition, execute_pipeline, solid, types @solid(config_field=Field(types.String, is_optional=True, default_value='en-us')) def configurable_hello(context): if len(context.solid_config) >= 3 and context.solid_config[:3] == 'haw': return 'Aloha honua!' elif len(co...
true
true
1c45a68d0192fabe44b1195622b98bb7d5868d24
3,238
py
Python
kaplot/astro/wcsgrid.py
maartenbreddels/kaplot
305026209f8026094d54373e14541f4f039501d5
[ "MIT" ]
null
null
null
kaplot/astro/wcsgrid.py
maartenbreddels/kaplot
305026209f8026094d54373e14541f4f039501d5
[ "MIT" ]
null
null
null
kaplot/astro/wcsgrid.py
maartenbreddels/kaplot
305026209f8026094d54373e14541f4f039501d5
[ "MIT" ]
null
null
null
from kaplot.objects import PlotObject import numarray import kaplot import kaplot.context import kaplot.vector class WcsGrid(PlotObject): def __init__(self, xticks, yticks, projection, longitudeoffset, lock=True, context=None, **kwargs): PlotObject.__init__(self, lock=False, context=kaplot.context.mergeDicts(contex...
30.261682
100
0.647931
from kaplot.objects import PlotObject import numarray import kaplot import kaplot.context import kaplot.vector class WcsGrid(PlotObject): def __init__(self, xticks, yticks, projection, longitudeoffset, lock=True, context=None, **kwargs): PlotObject.__init__(self, lock=False, context=kaplot.context.mergeDicts(contex...
true
true
1c45a7a78535500c62f6eb5fd46da6f909d578fb
1,034
py
Python
manage.py
manuelen12/test_sale
1d199fcfca8361edf704e0bb138a07e7d924f327
[ "MIT" ]
null
null
null
manage.py
manuelen12/test_sale
1d199fcfca8361edf704e0bb138a07e7d924f327
[ "MIT" ]
null
null
null
manage.py
manuelen12/test_sale
1d199fcfca8361edf704e0bb138a07e7d924f327
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure tha...
34.466667
77
0.658607
import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportE...
true
true
1c45a7b3b9bd4e9eca083311a86129a50d7c738e
189
py
Python
tests/web_platform/CSS2/normal_flow/test_block_in_inline_insert_014_nosplit_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_block_in_inline_insert_014_nosplit_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_block_in_inline_insert_014_nosplit_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
1
2020-01-16T01:56:41.000Z
2020-01-16T01:56:41.000Z
from tests.utils import W3CTestCase class TestBlockInInlineInsert014NosplitRef(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'block-in-inline-insert-014-nosplit-ref'))
31.5
93
0.814815
from tests.utils import W3CTestCase class TestBlockInInlineInsert014NosplitRef(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'block-in-inline-insert-014-nosplit-ref'))
true
true
1c45a859a5271dffa80a1d5cc1763cd482c9913a
2,912
py
Python
test/integration_tests/test_roles.py
poldracklab/bids-core
b87a1ef2d3e1c5a79a98c0f0ba82b1b2634bce0e
[ "MIT" ]
1
2016-03-09T01:24:02.000Z
2016-03-09T01:24:02.000Z
test/integration_tests/test_roles.py
poldracklab/bids-core
b87a1ef2d3e1c5a79a98c0f0ba82b1b2634bce0e
[ "MIT" ]
15
2016-02-17T19:11:32.000Z
2018-04-12T23:33:06.000Z
test/integration_tests/test_roles.py
poldracklab/bids-core
b87a1ef2d3e1c5a79a98c0f0ba82b1b2634bce0e
[ "MIT" ]
4
2017-04-05T17:34:59.000Z
2018-01-22T01:40:51.000Z
import requests import os import json import time from nose.tools import with_setup base_url = 'http://localhost:8080/api' adm_user = 'test@user.com' user = 'other@user.com' test_data = type('',(object,),{})() def setup_db(): global session session = requests.Session() # all the requests will be performe...
25.321739
71
0.595467
import requests import os import json import time from nose.tools import with_setup base_url = 'http://localhost:8080/api' adm_user = 'test@user.com' user = 'other@user.com' test_data = type('',(object,),{})() def setup_db(): global session session = requests.Session() session.params = { 'us...
true
true
1c45a92868008d359499e2e83998919eb99a0158
5,916
py
Python
sdk/python/pulumi_azure_native/migrate/latest/group.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/migrate/latest/group.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/migrate/latest/group.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
42.869565
333
0.644523
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = ['Group'] warnings.warn("""The 'latest' version is deprecated. Please migrate to the resource in the top-level module: 'azure-native:mi...
true
true
1c45a98c9736d722678cfe3cb4948c956cd7f2d7
6,212
py
Python
tempest/api/object_storage/test_container_sync.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
1
2021-05-21T08:24:02.000Z
2021-05-21T08:24:02.000Z
tempest/api/object_storage/test_container_sync.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
null
null
null
tempest/api/object_storage/test_container_sync.py
azorge/tempest
549dfc93fb7e3d6d8566064a60a6069deae5c8eb
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # 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 requ...
41.413333
79
0.650193
import time from six.moves.urllib import parse as urlparse import testtools from tempest.api.object_storage import base from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest import test CONF = config.CONF class ContainerSyncT...
true
true
1c45aa09ed045489b6f2e606842645ee253d9d21
15,307
py
Python
scripts/compile_frontend.py
jillmnolan/devtools-frontend
ea371f55d17d9b5909785c7c636be866f44cc352
[ "BSD-3-Clause" ]
1
2018-02-18T03:46:04.000Z
2018-02-18T03:46:04.000Z
scripts/compile_frontend.py
jillmnolan/devtools-frontend
ea371f55d17d9b5909785c7c636be866f44cc352
[ "BSD-3-Clause" ]
null
null
null
scripts/compile_frontend.py
jillmnolan/devtools-frontend
ea371f55d17d9b5909785c7c636be866f44cc352
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
39.148338
160
0.688639
import argparse import os import os.path as path import re import shutil import subprocess import sys import tempfile from build import modular_build from build import generate_protocol_externs import dependency_preprocessor import utils try: import simplejson as json except ImportEr...
false
true
1c45ab721c9d7842215f9675276f0e2745f79bac
14,462
py
Python
external/workload-automation/wa/framework/signal.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
1
2020-11-30T16:14:02.000Z
2020-11-30T16:14:02.000Z
external/workload-automation/wa/framework/signal.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
null
null
null
external/workload-automation/wa/framework/signal.py
qais-yousef/lisa
8343e26bf0565589928a69ccbe67b1be03403db7
[ "Apache-2.0" ]
1
2020-10-09T11:40:00.000Z
2020-10-09T11:40:00.000Z
# Copyright 2013-2018 ARM Limited # # 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 w...
42.163265
118
0.691675
import sys import logging from contextlib import contextmanager import wrapt from louie import dispatcher from wa.utils.types import prioritylist, enum logger = logging.getLogger('signal') class Signal(object): def __init__(self, name, description='no description', invert_priority=False): ...
true
true
1c45ac250287c61459664f4104f27b4fea00e83d
61
py
Python
language-python-test/test/features/comprehensions/set_comprehension.py
wbadart/language-python
6c048c215ff7fe4a5d5cc36ba3c17a666af74821
[ "BSD-3-Clause" ]
null
null
null
language-python-test/test/features/comprehensions/set_comprehension.py
wbadart/language-python
6c048c215ff7fe4a5d5cc36ba3c17a666af74821
[ "BSD-3-Clause" ]
null
null
null
language-python-test/test/features/comprehensions/set_comprehension.py
wbadart/language-python
6c048c215ff7fe4a5d5cc36ba3c17a666af74821
[ "BSD-3-Clause" ]
null
null
null
{ x + y for x in [1,2,3] if x > 1 for y in [4,5,6] if y < 6}
30.5
60
0.459016
{ x + y for x in [1,2,3] if x > 1 for y in [4,5,6] if y < 6}
true
true
1c45ad4927dd2f22598e965b4d772bbae5f47434
1,172
py
Python
tests/api/ils/eitems/test_eitems_crud.py
NRodriguezcuellar/invenio-app-ils
144a25a6c56330b214c6fd0b832220fa71f2e68a
[ "MIT" ]
41
2018-09-04T13:00:46.000Z
2022-03-24T20:45:56.000Z
tests/api/ils/eitems/test_eitems_crud.py
NRodriguezcuellar/invenio-app-ils
144a25a6c56330b214c6fd0b832220fa71f2e68a
[ "MIT" ]
720
2017-03-10T08:02:41.000Z
2022-01-14T15:36:37.000Z
tests/api/ils/eitems/test_eitems_crud.py
NRodriguezcuellar/invenio-app-ils
144a25a6c56330b214c6fd0b832220fa71f2e68a
[ "MIT" ]
54
2017-03-09T16:05:29.000Z
2022-03-17T08:34:51.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CERN. # # Invenio-Circulation is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Tests eitems CRUD.""" import pytest from invenio_app_ils.eitems.api import EItem from invenio_app_ils.err...
27.904762
77
0.669795
import pytest from invenio_app_ils.eitems.api import EItem from invenio_app_ils.errors import DocumentNotFoundError def test_eitem_refs(app, testdata): eitem = EItem.create( dict( pid="eitemid-99", document_pid="docid-1", created_by=dict(type="script", value="d...
true
true
1c45ad5c3147af9dff358391d91445cf2f8d76bf
3,131
py
Python
from_cpython/Lib/test/test_normalization.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
9
2015-04-15T10:58:49.000Z
2018-09-24T09:11:33.000Z
Lib/test/test_normalization.py
odsod/cpython-internals-course
55fffca28e83ac0f30029c60113a3110451dfa08
[ "PSF-2.0" ]
2
2020-02-17T22:31:09.000Z
2020-02-18T04:31:55.000Z
Lib/test/test_normalization.py
odsod/cpython-internals-course
55fffca28e83ac0f30029c60113a3110451dfa08
[ "PSF-2.0" ]
9
2015-03-13T18:27:27.000Z
2018-12-03T15:38:51.000Z
from test.test_support import run_unittest, open_urlresource import unittest from httplib import HTTPException import sys import os from unicodedata import normalize, unidata_version TESTDATAFILE = "NormalizationTest.txt" TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE def c...
30.398058
89
0.516448
from test.test_support import run_unittest, open_urlresource import unittest from httplib import HTTPException import sys import os from unicodedata import normalize, unidata_version TESTDATAFILE = "NormalizationTest.txt" TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE def c...
true
true
1c45af1163ca30e3f1de7ee012519613a5a4350b
66,206
py
Python
test/test_datasets.py
CellEight/vision
e8dded4c05ee403633529cef2e09bf94b07f6170
[ "BSD-3-Clause" ]
1
2021-04-12T09:42:25.000Z
2021-04-12T09:42:25.000Z
test/test_datasets.py
mvpzhangqiu/vision
e8dded4c05ee403633529cef2e09bf94b07f6170
[ "BSD-3-Clause" ]
null
null
null
test/test_datasets.py
mvpzhangqiu/vision
e8dded4c05ee403633529cef2e09bf94b07f6170
[ "BSD-3-Clause" ]
null
null
null
import contextlib import sys import os import unittest from unittest import mock import numpy as np import PIL from PIL import Image from torch._utils_internal import get_file_path_2 import torchvision from torchvision.datasets import utils from common_utils import get_tmp_dir from fakedata_generation import svhn_root,...
37.983936
136
0.634142
import contextlib import sys import os import unittest from unittest import mock import numpy as np import PIL from PIL import Image from torch._utils_internal import get_file_path_2 import torchvision from torchvision.datasets import utils from common_utils import get_tmp_dir from fakedata_generation import svhn_root,...
true
true
1c45af2d6128c89098abeaec9ca933517547a304
2,864
py
Python
tests/functional/test_email_address.py
AutumnalDream/tartiflette-plugin-scalars
2c73b20eac93b364a97b2192956e5fd4034ec35a
[ "MIT" ]
8
2019-10-02T12:47:15.000Z
2021-12-15T14:29:37.000Z
tests/functional/test_email_address.py
AutumnalDream/tartiflette-plugin-scalars
2c73b20eac93b364a97b2192956e5fd4034ec35a
[ "MIT" ]
109
2019-09-19T13:37:43.000Z
2022-03-28T07:08:50.000Z
tests/functional/test_email_address.py
AutumnalDream/tartiflette-plugin-scalars
2c73b20eac93b364a97b2192956e5fd4034ec35a
[ "MIT" ]
4
2019-10-26T19:57:20.000Z
2021-06-24T14:32:37.000Z
import pytest from tartiflette import Resolver, create_engine @pytest.mark.asyncio async def test_email_address_ok(): @Resolver("Query.email", schema_name="test_email_address_ok") async def email_resolver(*_args, **_kwargs): return "alice.girardguittard@dm.com" sdl = """ type Query { ...
25.571429
80
0.623953
import pytest from tartiflette import Resolver, create_engine @pytest.mark.asyncio async def test_email_address_ok(): @Resolver("Query.email", schema_name="test_email_address_ok") async def email_resolver(*_args, **_kwargs): return "alice.girardguittard@dm.com" sdl = """ type Query { ...
true
true
1c45af5f2860e383958cbd656df2e212b922f313
3,327
py
Python
tests/parse/test_parse_reference.py
wbknez/breakdb
f783820425c8cb70d8caedc6f5839a72de7c945e
[ "Apache-2.0" ]
1
2020-02-03T18:31:20.000Z
2020-02-03T18:31:20.000Z
tests/parse/test_parse_reference.py
wbknez/breakdb
f783820425c8cb70d8caedc6f5839a72de7c945e
[ "Apache-2.0" ]
null
null
null
tests/parse/test_parse_reference.py
wbknez/breakdb
f783820425c8cb70d8caedc6f5839a72de7c945e
[ "Apache-2.0" ]
null
null
null
""" Contains unit tests to ensure that all functions involved in parsing DICOM references work as intended. """ import pytest from breakdb.parse import has_reference, parse_reference from breakdb.tag import ReferenceTag, get_tag_at, MalformedSequence, \ MissingSequence, MissingTag from tests.helpers.tag import mat...
32.940594
82
0.62098
import pytest from breakdb.parse import has_reference, parse_reference from breakdb.tag import ReferenceTag, get_tag_at, MalformedSequence, \ MissingSequence, MissingTag from tests.helpers.tag import match class TestParseReference: def test_has_reference_is_false_when_reference_is_missing(self, ...
true
true
1c45b05c5d250ea77c37d28b3bab75d2b9cf9824
143,725
py
Python
corehq/apps/accounting/models.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/accounting/models.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/accounting/models.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
null
null
null
import datetime import itertools from decimal import Decimal from io import BytesIO from tempfile import NamedTemporaryFile from django.conf import settings from django.contrib.postgres.fields import ArrayField from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, Min...
38.552843
115
0.641621
import datetime import itertools from decimal import Decimal from io import BytesIO from tempfile import NamedTemporaryFile from django.conf import settings from django.contrib.postgres.fields import ArrayField from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, Min...
true
true
1c45b1afd70b4b9e6a45db74c842c66174c7a49a
2,103
py
Python
guild/main_bootstrap.py
wheatdog/guildai
817cf179d0b6910d3d4fca522045a8139aef6c9e
[ "Apache-2.0" ]
null
null
null
guild/main_bootstrap.py
wheatdog/guildai
817cf179d0b6910d3d4fca522045a8139aef6c9e
[ "Apache-2.0" ]
null
null
null
guild/main_bootstrap.py
wheatdog/guildai
817cf179d0b6910d3d4fca522045a8139aef6c9e
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
29.619718
75
0.701854
from __future__ import absolute_import from __future__ import division import os import sys def main(): ensure_external_path() import guild.main guild.main.main() def ensure_external_path(): path = _external_libs_path() if path not in sys.path: sys.path.insert(0, path) ...
true
true
1c45b1e58aee7713ff142e357f97c11aaa11ed05
1,246
py
Python
discord/utils.py
rf20008/nextcord
48ae815f226e9f7f2f4076c68b6589563144d67b
[ "MIT" ]
null
null
null
discord/utils.py
rf20008/nextcord
48ae815f226e9f7f2f4076c68b6589563144d67b
[ "MIT" ]
null
null
null
discord/utils.py
rf20008/nextcord
48ae815f226e9f7f2f4076c68b6589563144d67b
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2021-present tag-epic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
47.923077
76
0.804173
from nextcord.utils import * from nextcord.utils import MISSING, DISCORD_EPOCH
true
true
1c45b20896b287eedc789388d42830cf74be6fa6
25,192
py
Python
trac/admin/web_ui.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
trac/admin/web_ui.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
trac/admin/web_ui.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2020 Edgewall Software # Copyright (C) 2005 Jonas Borgström <jonas@edgewall.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://...
41.230769
79
0.551286
import os import pkg_resources import re import shutil from functools import partial from trac import log from trac.admin.api import IAdminPanelProvider from trac.core import * from trac.loader import get_plugin_info from trac.log import LOG_LEVELS, LOG_LEVEL_ALIASES, LOG_LEVEL_ALIASES_MAP from trac.pe...
true
true
1c45b215becc81148e7aeae262a82262f980a51d
2,641
py
Python
render.py
araistrick/camera_pan_renderer
900c6c064ac7d2b460087a16be49204276679e04
[ "BSD-3-Clause" ]
2
2021-10-15T22:49:05.000Z
2022-02-28T20:26:53.000Z
render.py
araistrick/camera_pan_renderer
900c6c064ac7d2b460087a16be49204276679e04
[ "BSD-3-Clause" ]
null
null
null
render.py
araistrick/camera_pan_renderer
900c6c064ac7d2b460087a16be49204276679e04
[ "BSD-3-Clause" ]
null
null
null
import os import argparse from pathlib import Path import bpy import numpy as np os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "0" def use_cuda(): bpy.context.preferences.addons["cycles"].preferences.compute_device_type = "CUDA" print(bpy.context.preferences.addons["cycl...
33.43038
95
0.710716
import os import argparse from pathlib import Path import bpy import numpy as np os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "0" def use_cuda(): bpy.context.preferences.addons["cycles"].preferences.compute_device_type = "CUDA" print(bpy.context.preferences.addons["cycl...
true
true
1c45b269ee0360c0a0e853445b9985838bcb82f4
1,210
py
Python
examples/tutorials/pong/steps/step4/main.py
xinmingzhang/kivy
86b6e19d8a02788fe8850b690bcecdff848f3c4e
[ "MIT" ]
9
2016-09-03T07:20:01.000Z
2020-05-21T14:44:48.000Z
examples/tutorials/pong/steps/step4/main.py
xinmingzhang/kivy
86b6e19d8a02788fe8850b690bcecdff848f3c4e
[ "MIT" ]
1
2017-05-30T20:45:15.000Z
2017-05-30T20:45:15.000Z
examples/tutorials/pong/steps/step4/main.py
xinmingzhang/kivy
86b6e19d8a02788fe8850b690bcecdff848f3c4e
[ "MIT" ]
4
2016-09-10T15:27:54.000Z
2020-03-27T22:05:31.000Z
from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, ReferenceListProperty,\ ObjectProperty from kivy.vector import Vector from kivy.clock import Clock from random import randint class PongBall(Widget): velocity_x = NumericProperty(0) velocity_y = Numeri...
25.208333
68
0.65124
from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, ReferenceListProperty,\ ObjectProperty from kivy.vector import Vector from kivy.clock import Clock from random import randint class PongBall(Widget): velocity_x = NumericProperty(0) velocity_y = Numeri...
true
true
1c45b33cf72198aec1df6487bbfca595bdaf3951
1,552
py
Python
SimpleCV/examples/detection/MotionTracker.py
nikhilgk/SimpleCV
ee64451c16db1f40b4da221115273020a6a7b01a
[ "BSD-3-Clause" ]
2
2016-04-30T12:23:05.000Z
2022-03-02T00:01:10.000Z
SimpleCV/examples/detection/MotionTracker.py
nikhilgk/SimpleCV
ee64451c16db1f40b4da221115273020a6a7b01a
[ "BSD-3-Clause" ]
null
null
null
SimpleCV/examples/detection/MotionTracker.py
nikhilgk/SimpleCV
ee64451c16db1f40b4da221115273020a6a7b01a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # This SimpleCV example uses a technique called frame differencing to determine # if motion has occured. You take an initial image, then another, subtract # the difference, what is left over is what has changed between those two images # this are typically blobs on the images, so we do a blob search ...
31.673469
121
0.721005
import sys, time, socket from SimpleCV import * cam = Camera() min_size = 0.1*cam.getProperty("width")*cam.getProperty("height") thresh = 10 show_message_for = 2 motion_timestamp = int(time.time()) message_text = "Motion detected" draw_message = False lastImg = cam.getImage() lastImg.show() while(True):...
false
true
1c45b360ed6e478c667bfe1ca7f4f430632593d1
10,978
py
Python
packages/python/plotly/plotly/validators/_candlestick.py
c-chaitanya/plotly.py
7bda89c77559747e67fb1608bf9309e97505a4f2
[ "MIT" ]
7
2021-09-29T09:46:36.000Z
2022-03-24T08:30:41.000Z
packages/python/plotly/plotly/validators/_candlestick.py
c-chaitanya/plotly.py
7bda89c77559747e67fb1608bf9309e97505a4f2
[ "MIT" ]
1
2021-09-30T16:56:21.000Z
2021-10-15T09:14:12.000Z
packages/python/plotly/plotly/validators/_candlestick.py
c-chaitanya/plotly.py
7bda89c77559747e67fb1608bf9309e97505a4f2
[ "MIT" ]
1
2021-09-29T22:34:05.000Z
2021-09-29T22:34:05.000Z
import _plotly_utils.basevalidators class CandlestickValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="candlestick", parent_name="", **kwargs): super(CandlestickValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
46.12605
76
0.538167
import _plotly_utils.basevalidators class CandlestickValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="candlestick", parent_name="", **kwargs): super(CandlestickValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
1c45b39ba990a7c522df62adb4f9bedffe167392
60,426
py
Python
pandas/core/internals/managers.py
joybhallaa/pandas
1779155552631a30d4bb176dec70b8cc477defd7
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2022-02-02T02:05:28.000Z
2022-02-02T02:09:37.000Z
pandas/core/internals/managers.py
north-star-saj/pandas
fc9fdba6592bdb5d0d1147ce4d65639acd897565
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/internals/managers.py
north-star-saj/pandas
fc9fdba6592bdb5d0d1147ce4d65639acd897565
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2020-10-28T03:32:40.000Z
2020-10-28T03:32:40.000Z
from __future__ import annotations from collections import defaultdict import itertools from typing import ( Any, Callable, DefaultDict, Dict, Hashable, List, Optional, Sequence, Tuple, TypeVar, Union, ) import warnings import numpy as np from pandas._libs import internals...
32.175719
88
0.574389
from __future__ import annotations from collections import defaultdict import itertools from typing import ( Any, Callable, DefaultDict, Dict, Hashable, List, Optional, Sequence, Tuple, TypeVar, Union, ) import warnings import numpy as np from pandas._libs import internals...
true
true
1c45b3d5de333d6534be0122ea89da552988ca0c
601
py
Python
tests/changes/api/test_build_mark_seen.py
bowlofstew/changes
ebd393520e0fdb07c240a8d4e8747281b6186e28
[ "Apache-2.0" ]
1
2015-11-08T13:00:44.000Z
2015-11-08T13:00:44.000Z
tests/changes/api/test_build_mark_seen.py
alex/changes
69a17b4c639e7082a75d037384ccb68ead3a0b4b
[ "Apache-2.0" ]
null
null
null
tests/changes/api/test_build_mark_seen.py
alex/changes
69a17b4c639e7082a75d037384ccb68ead3a0b4b
[ "Apache-2.0" ]
null
null
null
from changes.models import BuildSeen from changes.testutils import APITestCase class BuildMarkSeenTest(APITestCase): def test_simple(self): project = self.create_project() build = self.create_build(project=project) self.login_default() path = '/api/0/builds/{0}/mark_seen/'.format...
26.130435
66
0.648918
from changes.models import BuildSeen from changes.testutils import APITestCase class BuildMarkSeenTest(APITestCase): def test_simple(self): project = self.create_project() build = self.create_build(project=project) self.login_default() path = '/api/0/builds/{0}/mark_seen/'.format...
true
true
1c45b4011172fbf7f667e12379db8e0b37a73ae8
644
py
Python
WebFilm/urls.py
marekbaranowski98/WebFilm
5d78bb9518070c195feffc2181735b93be019ca0
[ "MIT" ]
null
null
null
WebFilm/urls.py
marekbaranowski98/WebFilm
5d78bb9518070c195feffc2181735b93be019ca0
[ "MIT" ]
null
null
null
WebFilm/urls.py
marekbaranowski98/WebFilm
5d78bb9518070c195feffc2181735b93be019ca0
[ "MIT" ]
null
null
null
"""WebFilm URL Configuration path docs/ loads url from apps docs path / loads url from apps frontend path api/users/ loads url from apps users path api/photos loads url from app photos path api/movies loads url from app movies """ from django.contrib import admin from django.urls import path, include urlpatterns = [ ...
30.666667
58
0.692547
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('docs/', include('docs.urls')), path('api/users/', include('users.urls')), path('api/photos/', include('photos.urls')), path('api/movies/', include('movies.urls')), path(...
true
true
1c45b4b0875ea7d446dba15109b8e98b5d4bdaab
3,439
py
Python
libqtile/widget/windowname.py
Bauthe/qtile
569c4d9aaad1dbd912435648f5f814e084de8365
[ "MIT" ]
null
null
null
libqtile/widget/windowname.py
Bauthe/qtile
569c4d9aaad1dbd912435648f5f814e084de8365
[ "MIT" ]
null
null
null
libqtile/widget/windowname.py
Bauthe/qtile
569c4d9aaad1dbd912435648f5f814e084de8365
[ "MIT" ]
null
null
null
# Copyright (c) 2008, 2010 Aldo Cortesi # Copyright (c) 2010 matt # Copyright (c) 2011 Mounier Florian # Copyright (c) 2012 Tim Neumann # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Tycho Andersen # # Permission is hereby granted, free of charge, to any person obtaining a copy # o...
40.458824
102
0.662402
from libqtile import bar, hook, pangocffi from libqtile.widget import base class WindowName(base._TextBox): orientations = base.ORIENTATION_HORIZONTAL defaults = [ ('for_current_screen', False, 'instead of this bars screen use currently active screen'), ('empty_group_...
true
true
1c45b8317ee2fbfb8197eed5bc2187f391f7f3ad
3,634
py
Python
root/settings.py
henrid3v/pocket-man
d0e7f44674db877b3e658ee7fc8b0fddf79bfcc8
[ "MIT" ]
null
null
null
root/settings.py
henrid3v/pocket-man
d0e7f44674db877b3e658ee7fc8b0fddf79bfcc8
[ "MIT" ]
1
2020-11-28T21:27:01.000Z
2020-11-28T21:29:32.000Z
root/settings.py
shadowcompiler/pocket-man
d0e7f44674db877b3e658ee7fc8b0fddf79bfcc8
[ "MIT" ]
null
null
null
""" Django settings for root project. Generated by 'django-admin startproject' using Django 3.0. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os import ...
26.720588
91
0.705559
import os import environ env = environ.Env() environ.Env.read_env() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.environ.get('SECRET_KEY') DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.aut...
true
true
1c45b92429dcb84d7d15f647c4e3472f81ee716b
4,819
py
Python
pychron/lasers/tasks/panes/uv.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/lasers/tasks/panes/uv.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/lasers/tasks/panes/uv.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
31.292208
87
0.529155
from __future__ import absolute_import from pyface.tasks.traits_dock_pane import TraitsDockPane from traitsui.api import ( View, Item, VGroup, HGroup, spring, UItem, ButtonEditor, Group, EnumEditor, ) from pychron.core.ui.led_editor import LEDEditor from pychron.cor...
true
true
1c45b960408ef5e1ab38b4817737225fd34b5a9f
575
py
Python
test/test_ncbi.py
Daniel-Davies/pytaxize
446990c0f64c8360f1ee65fa7beaeb2410f6213d
[ "MIT" ]
21
2015-02-23T19:41:09.000Z
2020-11-04T15:11:20.000Z
test/test_ncbi.py
Daniel-Davies/pytaxize
446990c0f64c8360f1ee65fa7beaeb2410f6213d
[ "MIT" ]
56
2015-01-12T09:05:10.000Z
2020-09-24T01:48:10.000Z
test/test_ncbi.py
Daniel-Davies/pytaxize
446990c0f64c8360f1ee65fa7beaeb2410f6213d
[ "MIT" ]
21
2015-01-12T08:45:02.000Z
2020-09-10T01:01:43.000Z
import os from nose.tools import * import unittest import vcr from pytaxize import ncbi class NcbiTest(unittest.TestCase): @vcr.use_cassette("test/vcr_cassettes/ncbi_search.yml", filter_query_parameters=['api_key']) def test_ncbi_search(self): "ncbi.search" x = ncbi.search(sci_com = "Apis") ...
30.263158
96
0.61913
import os from nose.tools import * import unittest import vcr from pytaxize import ncbi class NcbiTest(unittest.TestCase): @vcr.use_cassette("test/vcr_cassettes/ncbi_search.yml", filter_query_parameters=['api_key']) def test_ncbi_search(self): x = ncbi.search(sci_com = "Apis") assert type(x) =...
true
true
1c45ba8f50be8960f823fac0995df7dfaa1215e0
218
py
Python
models/__init__.py
netotz/p-dispersion-problem
123a6110dbf64d19a221da545c0590f7efc500dc
[ "MIT" ]
1
2021-09-23T06:31:47.000Z
2021-09-23T06:31:47.000Z
models/__init__.py
binary-hideout/p-dispersion-problem
123a6110dbf64d19a221da545c0590f7efc500dc
[ "MIT" ]
1
2021-08-31T15:15:08.000Z
2021-08-31T15:15:08.000Z
models/__init__.py
netotz/p-dispersion-problem
123a6110dbf64d19a221da545c0590f7efc500dc
[ "MIT" ]
1
2020-05-19T04:46:47.000Z
2020-05-19T04:46:47.000Z
''' Package that contains the models of the project. These models are the classes of Point and PDPInstance. ''' # package level imports from .point import Point from .pdp_instance import PDPInstance, Matrix, Solution
24.222222
55
0.784404
from .point import Point from .pdp_instance import PDPInstance, Matrix, Solution
true
true
1c45bafe765f80375e19d84146bad5379603a450
356
py
Python
Interviews/HUAWEI/19/1.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
1
2019-05-04T10:28:32.000Z
2019-05-04T10:28:32.000Z
Interviews/HUAWEI/19/1.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
null
null
null
Interviews/HUAWEI/19/1.py
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
3
2020-12-31T04:36:38.000Z
2021-07-25T07:39:31.000Z
import math n = list(map(int, input().split())) length = len(n) dp = [math.inf] * length for i in range(1, int(length / 2)): step = 1 idx = i while idx < length: dp[idx] = min(dp[idx], step) idx = idx + n[idx] step += 1 if dp[length - 1] == math.inf: print(-1)...
17.8
37
0.491573
import math n = list(map(int, input().split())) length = len(n) dp = [math.inf] * length for i in range(1, int(length / 2)): step = 1 idx = i while idx < length: dp[idx] = min(dp[idx], step) idx = idx + n[idx] step += 1 if dp[length - 1] == math.inf: print(-1)...
true
true
1c45bb098fd540b0ca4ce20913c1c1b808e0ae7b
1,204
py
Python
tutorial/proxy.py
maksimKorzh/fresh-proxy-list
e9ed2821a8445430aa30252c01b618892093f5ed
[ "MIT" ]
7
2019-05-24T15:08:25.000Z
2020-06-08T07:51:33.000Z
tutorial/proxy.py
maksimKorzh/fresh-proxy-list
e9ed2821a8445430aa30252c01b618892093f5ed
[ "MIT" ]
null
null
null
tutorial/proxy.py
maksimKorzh/fresh-proxy-list
e9ed2821a8445430aa30252c01b618892093f5ed
[ "MIT" ]
5
2019-11-19T23:00:57.000Z
2021-12-22T04:01:31.000Z
import requests from bs4 import BeautifulSoup proxyList = [] response = requests.get('https://free-proxy-list.net/') bs = BeautifulSoup(response.text, 'lxml') table = bs.find('table') rows = table.find_all('tr') count = 0 for row in rows: ip = row.contents[0].text port = row.contents[1].text anonym = r...
27.363636
91
0.508306
import requests from bs4 import BeautifulSoup proxyList = [] response = requests.get('https://free-proxy-list.net/') bs = BeautifulSoup(response.text, 'lxml') table = bs.find('table') rows = table.find_all('tr') count = 0 for row in rows: ip = row.contents[0].text port = row.contents[1].text anonym = r...
true
true
1c45bb97d6036108335eeb9c5089a59bb600968e
8,237
py
Python
bluzelle/codec/crud/KeyValue_pb2.py
hhio618/bluezelle-py
c38a07458a36305457680196e8c47372008db5ab
[ "MIT" ]
3
2021-08-19T10:09:29.000Z
2022-01-05T14:19:59.000Z
bluzelle/codec/crud/KeyValue_pb2.py
hhio618/bluzelle-py
c38a07458a36305457680196e8c47372008db5ab
[ "MIT" ]
null
null
null
bluzelle/codec/crud/KeyValue_pb2.py
hhio618/bluzelle-py
c38a07458a36305457680196e8c47372008db5ab
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: crud/KeyValue.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.p...
30.507407
489
0.618308
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from bluzelle.codec.crud import lease_pb2 as crud_dot_l...
true
true
1c45bbaba79b9d8c2de84555e39251039007bf90
2,727
py
Python
crypto/hard1/service/server.py
AnyKeyShik/CTF_Code
32ff5dce6452dbea09eff0a4db7ad603efe4027d
[ "Apache-2.0" ]
null
null
null
crypto/hard1/service/server.py
AnyKeyShik/CTF_Code
32ff5dce6452dbea09eff0a4db7ad603efe4027d
[ "Apache-2.0" ]
null
null
null
crypto/hard1/service/server.py
AnyKeyShik/CTF_Code
32ff5dce6452dbea09eff0a4db7ad603efe4027d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from random import randint from math import pow def gcd(a, b): if a < b: return gcd(b, a) elif a % b == 0: return b; else: return gcd(b, a % b) def gen_key(modulo): key = randint(pow(10, 20), modulo) while gcd(modulo, key) !...
23.110169
305
0.574624
from random import randint from math import pow def gcd(a, b): if a < b: return gcd(b, a) elif a % b == 0: return b; else: return gcd(b, a % b) def gen_key(modulo): key = randint(pow(10, 20), modulo) while gcd(modulo, key) != 1: key = randint(pow(10, 20), modul...
true
true
1c45bd5ae57fb300ba5e328a5611c8d8c5854181
1,330
py
Python
tests/test_data/test_sciense.py
el/elizabeth
dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff
[ "MIT" ]
null
null
null
tests/test_data/test_sciense.py
el/elizabeth
dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff
[ "MIT" ]
null
null
null
tests/test_data/test_sciense.py
el/elizabeth
dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff
[ "MIT" ]
1
2019-12-27T19:34:17.000Z
2019-12-27T19:34:17.000Z
# -*- coding: utf-8 -*- import re from unittest import TestCase from elizabeth import Science import elizabeth.core.interdata as common from tests.test_data import DummyCase from ._patterns import STR_REGEX class ScienceBaseTest(TestCase): def setUp(self): self.science = Science() def tearDown(self...
30.227273
77
0.695489
import re from unittest import TestCase from elizabeth import Science import elizabeth.core.interdata as common from tests.test_data import DummyCase from ._patterns import STR_REGEX class ScienceBaseTest(TestCase): def setUp(self): self.science = Science() def tearDown(self): del self.sci...
true
true
1c45be92d15874a5e90e8e60efad7107c63df898
43,600
py
Python
arelle/ValidateVersReport.py
theredpea/Arelle
e53097f142a69b2fefc18298a72f1f1b219b973d
[ "Apache-2.0" ]
1
2018-01-04T01:39:04.000Z
2018-01-04T01:39:04.000Z
arelle/ValidateVersReport.py
GuoHuiChen/Arelle
76b3c720e55348fd91b7be091040d2207f85400c
[ "Apache-2.0" ]
null
null
null
arelle/ValidateVersReport.py
GuoHuiChen/Arelle
76b3c720e55348fd91b7be091040d2207f85400c
[ "Apache-2.0" ]
null
null
null
''' Created on Nov 9, 2010 @author: Mark V Systems Limited (c) Copyright 2010 Mark V Systems Limited, All rights reserved. ''' from arelle import ModelVersObject, XbrlConst, ValidateXbrl, ModelDocument from arelle.ModelValue import qname conceptAttributeEventAttributes = { "conceptAttributeDelete": ("fromCust...
80.740741
176
0.547546
from arelle import ModelVersObject, XbrlConst, ValidateXbrl, ModelDocument from arelle.ModelValue import qname conceptAttributeEventAttributes = { "conceptAttributeDelete": ("fromCustomAttribute",), "conceptAttributeAdd": ("toCustomAttribute",), "conceptAttributeChange": ("fromCustomAttribute",...
true
true
1c45bee0b72f7290f98a152d2fd4047f74e16502
8,482
py
Python
inbm/dispatcher-agent/dispatcher/fota/fota.py
intel/intel-inb-manageability
cdb17765120857fd41cacb838d6ee6e34e1f5047
[ "Apache-2.0" ]
5
2021-12-13T21:19:31.000Z
2022-01-18T18:29:43.000Z
inbm/dispatcher-agent/dispatcher/fota/fota.py
intel/intel-inb-manageability
cdb17765120857fd41cacb838d6ee6e34e1f5047
[ "Apache-2.0" ]
45
2021-12-30T17:21:09.000Z
2022-03-29T22:47:32.000Z
inbm/dispatcher-agent/dispatcher/fota/fota.py
intel/intel-inb-manageability
cdb17765120857fd41cacb838d6ee6e34e1f5047
[ "Apache-2.0" ]
4
2022-01-26T17:42:54.000Z
2022-03-30T04:48:04.000Z
""" FOTA update tool which is called from the dispatcher during installation Copyright (C) 2017-2022 Intel Corporation SPDX-License-Identifier: Apache-2.0 """ import logging import os import platform from threading import Timer from typing import Any, Optional, Mapping from future.moves.urllib.parse impo...
42.838384
113
0.630512
import logging import os import platform from threading import Timer from typing import Any, Optional, Mapping from future.moves.urllib.parse import urlparse from inbm_common_lib.exceptions import UrlSecurityException from inbm_common_lib.utility import canonicalize_uri from inbm_common_lib.constants import REMOTE_SO...
true
true
1c45bf70eca6a992410fb3243e168ae272e4fd35
1,699
py
Python
coding_interviews/elements_of_programming_interview/delete_duplicates_from_a_sorted_array.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
coding_interviews/elements_of_programming_interview/delete_duplicates_from_a_sorted_array.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
coding_interviews/elements_of_programming_interview/delete_duplicates_from_a_sorted_array.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
# input: [2,3,5,5,7,11,11,11,13] # output: [2,3,5,7,11,13,0,0,0] # input: [-2,-2,1] # output: [-2,1,0] # input: [0,0,1,1] # output: [0,1,0,0] ''' result = [] counter = {} loop input is not in the counter counter[number] << True result << number n = len(input) - len(result) loop n resul...
20.22619
58
0.566215
def delete_duplicates(numbers): if not numbers: return [[], 0] result = [] counter_mapper = {} counter = 0 for number in numbers: if number not in counter_mapper: counter_mapper[number] = True result.append(number) counter += 1 dif...
true
true
1c45bfbfe06e66c030a706f0763fdf1865d626d3
1,904
py
Python
map/views.py
alzseven/djeju
5aade103dd97999dd7b5f97c461aeccbfb0ea23e
[ "MIT" ]
null
null
null
map/views.py
alzseven/djeju
5aade103dd97999dd7b5f97c461aeccbfb0ea23e
[ "MIT" ]
2
2021-06-04T23:32:09.000Z
2021-06-10T19:39:20.000Z
map/views.py
alzseven/djeju
5aade103dd97999dd7b5f97c461aeccbfb0ea23e
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.template import Context import json import requests from map.models import Hospitals from django.contrib.gis.geos import fromstr from django.contrib.gis.db.models.functions import Distance # Create your views here. def maskmap(request): # djangoReq cur_lat = re...
27.594203
117
0.605567
from django.shortcuts import render from django.template import Context import json import requests from map.models import Hospitals from django.contrib.gis.geos import fromstr from django.contrib.gis.db.models.functions import Distance def maskmap(request): cur_lat = request.GET.get('lat') cur_lng = r...
true
true
1c45c0b5f0f1b4ac58ff0d930371bca1e8a86c2c
31,428
py
Python
boto/gs/key.py
dreamhost/boto
57eaacfc66acd7083641ef504857786a12e330ff
[ "MIT" ]
null
null
null
boto/gs/key.py
dreamhost/boto
57eaacfc66acd7083641ef504857786a12e330ff
[ "MIT" ]
null
null
null
boto/gs/key.py
dreamhost/boto
57eaacfc66acd7083641ef504857786a12e330ff
[ "MIT" ]
null
null
null
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
45.220144
91
0.616329
import base64 import binascii import os import re import StringIO from boto.exception import BotoClientError from boto.s3.key import Key as S3Key from boto.s3.keyfile import KeyFile class Key(S3Key): generation = None meta_generation = None def endElement(self, name, value, connection...
true
true
1c45c0eac73d31615a106f4522042ae688360bab
2,494
py
Python
forum/models.py
boxed/forum
abb3699d310bf3a404f031a3cb0e4bdbf403da5a
[ "BSD-3-Clause" ]
2
2019-06-28T16:30:44.000Z
2020-12-28T01:46:52.000Z
forum/models.py
boxed/forum
abb3699d310bf3a404f031a3cb0e4bdbf403da5a
[ "BSD-3-Clause" ]
14
2019-02-26T17:25:54.000Z
2019-04-03T18:11:24.000Z
forum/models.py
boxed/forum
abb3699d310bf3a404f031a3cb0e4bdbf403da5a
[ "BSD-3-Clause" ]
1
2019-06-14T14:21:47.000Z
2019-06-14T14:21:47.000Z
from hashlib import md5 from django.contrib.auth.models import User from django.core import validators from django.db import models from iommi import register_factory from unread.models import UnreadModel class Model(models.Model): def __repr__(self): return f'{type(self)} {self.pk}:{self}' class M...
29
111
0.690056
from hashlib import md5 from django.contrib.auth.models import User from django.core import validators from django.db import models from iommi import register_factory from unread.models import UnreadModel class Model(models.Model): def __repr__(self): return f'{type(self)} {self.pk}:{self}' class M...
true
true
1c45c15f9e69201656c5a6fd742639e0189553ed
15,419
py
Python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_keys_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2019-08-23T21:14:00.000Z
2021-09-07T18:32:34.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_keys_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_keys_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.640379
195
0.660938
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
1c45c21bce32039850b2b214ced69db7934f7418
5,134
py
Python
samples/demo.py
siyuan-song/Container
42313132af32f2edf710643b9ceb8ca84693ba5c
[ "MIT" ]
2
2020-07-17T02:24:00.000Z
2020-07-17T21:14:45.000Z
samples/demo.py
siyuan-song/Container
42313132af32f2edf710643b9ceb8ca84693ba5c
[ "MIT" ]
null
null
null
samples/demo.py
siyuan-song/Container
42313132af32f2edf710643b9ceb8ca84693ba5c
[ "MIT" ]
null
null
null
# coding: utf-8 # # Mask R-CNN Demo # # A quick intro to using the pre-trained model to detect and segment objects. # In[1]: import os import sys import random import math import numpy as np import skimage.io import matplotlib import matplotlib.pyplot as plt # Root directory of the project ROOT_DIR = os.path.abs...
34.456376
421
0.730619
import sys import random import math import numpy as np import skimage.io import matplotlib import matplotlib.pyplot as plt ROOT_DIR = os.path.abspath("../") sys.path.append(ROOT_DIR) from mrcnn import utils import mrcnn.model as modellib from mrcnn import visualize sys.path.append(os.path.join(ROOT_DIR, "sam...
true
true
1c45c26bdf9dbb63739a39e2d750920b7e4c23b2
1,886
py
Python
terrascript/heroku/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/heroku/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/heroku/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/heroku/r.py # Automatically generated by tools/makecode.py () import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class heroku_account_feature(terrascript.Resource): pass class heroku_addon(terrascript.Resource): ...
15.459016
79
0.782078
import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class heroku_account_feature(terrascript.Resource): pass class heroku_addon(terrascript.Resource): pass class heroku_addon_attachment(terrascript.Resource): pass cl...
true
true
1c45c283a6f9e86c7a63de4447cd5512835f3ca4
2,594
py
Python
build/scripts/gen_linkkit_sdk.py
jinlongliu/AliOS-Things
ce051172a775f987183e7aca88bb6f3b809ea7b0
[ "Apache-2.0" ]
92
2020-02-25T11:16:15.000Z
2021-09-20T14:45:49.000Z
build/scripts/gen_linkkit_sdk.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
12
2020-02-28T03:51:00.000Z
2020-08-05T09:38:54.000Z
build/scripts/gen_linkkit_sdk.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
45
2020-02-26T04:31:08.000Z
2021-10-09T17:17:23.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- import sys, os import shutil SDKNAME = "linkkit-sdk-c" compdirs = [ ['middleware/linkkit/sdk-c', ''], ['middleware/uagent/uota', 'src/services/uota'], ['utility/libc/compilers/armlibc', 'src/infra/stdc/armlibc'], ['utility/libc/compilers/iar', 'src/infra/...
33.25641
86
0.623362
import sys, os import shutil SDKNAME = "linkkit-sdk-c" compdirs = [ ['middleware/linkkit/sdk-c', ''], ['middleware/uagent/uota', 'src/services/uota'], ['utility/libc/compilers/armlibc', 'src/infra/stdc/armlibc'], ['utility/libc/compilers/iar', 'src/infra/stdc/iarlibc'], ] examples = ['linkkitapp'...
false
true
1c45c374300575c38d0712283bbc628b33dfa7e8
20,243
py
Python
save/tokyo202112_MemGCRN_c1to1_20220208115005_time/traintest_MemGCRN.py
deepkashiwa20/TrafficAccident
c5fb26106137a4e85e5b5aa1e8ffdbb672a61988
[ "MIT" ]
null
null
null
save/tokyo202112_MemGCRN_c1to1_20220208115005_time/traintest_MemGCRN.py
deepkashiwa20/TrafficAccident
c5fb26106137a4e85e5b5aa1e8ffdbb672a61988
[ "MIT" ]
null
null
null
save/tokyo202112_MemGCRN_c1to1_20220208115005_time/traintest_MemGCRN.py
deepkashiwa20/TrafficAccident
c5fb26106137a4e85e5b5aa1e8ffdbb672a61988
[ "MIT" ]
null
null
null
import sys import os import shutil import math import numpy as np import pandas as pd import scipy.sparse as ss from sklearn.preprocessing import StandardScaler, MinMaxScaler from datetime import datetime import time import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F from to...
50.230769
202
0.644173
import sys import os import shutil import math import numpy as np import pandas as pd import scipy.sparse as ss from sklearn.preprocessing import StandardScaler, MinMaxScaler from datetime import datetime import time import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F from to...
true
true
1c45c40bf2888f61ea031bfc6439f06b59f6dae5
664
py
Python
manage.py
njiiri12/neighbourhood
e36f04f450c352f3947ff991118e4c06cc5bcb87
[ "MIT" ]
null
null
null
manage.py
njiiri12/neighbourhood
e36f04f450c352f3947ff991118e4c06cc5bcb87
[ "MIT" ]
null
null
null
manage.py
njiiri12/neighbourhood
e36f04f450c352f3947ff991118e4c06cc5bcb87
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'NH_watch.settings') try: from django.core.management import execute_from_command_line except Imp...
28.869565
73
0.679217
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'NH_watch.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
1c45c46dba085dae7fe79cedf838de675bd3c279
5,081
py
Python
opps/articles/views.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
159
2015-01-03T16:36:35.000Z
2022-03-29T20:50:13.000Z
opps/articles/views.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
81
2015-01-02T21:26:16.000Z
2021-05-29T12:24:52.000Z
opps/articles/views.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
75
2015-01-23T13:41:03.000Z
2021-09-24T03:45:23.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.contrib.sites.models import get_current_site from django.utils import timezone from django.conf import settings from opps.views.generic.list import ListView from opps.containers.views import ContainerList from opps.containers.models import Container, ContainerB...
35.531469
77
0.597717
from django.contrib.sites.models import get_current_site from django.utils import timezone from django.conf import settings from opps.views.generic.list import ListView from opps.containers.views import ContainerList from opps.containers.models import Container, ContainerBox from opps.articles.models import Album ...
true
true
1c45c4b27799ee041b7c97394535e06eaba9dfb4
51,275
py
Python
cogs/game/minigames/game_of_life/player.py
FellowHashbrown/omega-psi-py
4ea33cdbef15ffaa537f2c9e382de508c58093fc
[ "MIT" ]
4
2018-12-23T08:49:40.000Z
2021-03-25T16:51:43.000Z
cogs/game/minigames/game_of_life/player.py
FellowHashbrown/omega-psi-py
4ea33cdbef15ffaa537f2c9e382de508c58093fc
[ "MIT" ]
23
2020-11-03T17:40:40.000Z
2022-02-01T17:12:59.000Z
cogs/game/minigames/game_of_life/player.py
FellowHashbrown/omega-psi-py
4ea33cdbef15ffaa537f2c9e382de508c58093fc
[ "MIT" ]
1
2019-07-11T23:40:13.000Z
2019-07-11T23:40:13.000Z
from asyncio import sleep from discord import Embed from math import ceil from random import randint, choice from cogs.globals import PRIMARY_EMBED_COLOR, NUMBER_EMOJIS, LEAVE from cogs.game.minigames.base_game.player import Player from cogs.game.minigames.game_of_life.functions import choose_house from cogs.game.mi...
38.122677
144
0.505958
from asyncio import sleep from discord import Embed from math import ceil from random import randint, choice from cogs.globals import PRIMARY_EMBED_COLOR, NUMBER_EMOJIS, LEAVE from cogs.game.minigames.base_game.player import Player from cogs.game.minigames.game_of_life.functions import choose_house from cogs.game.mi...
true
true
1c45c55d868ffd36fb6e4d51f703e1ffad0a1d37
12,262
py
Python
apps/usuario/view/views_perfil.py
Ajerhy/proyectosigetebr
5b63f194bbe06adb92d1cdbba93d1e0028b4164f
[ "MIT" ]
1
2020-05-11T13:29:41.000Z
2020-05-11T13:29:41.000Z
apps/usuario/view/views_perfil.py
Ajerhy/proyectosigetebr
5b63f194bbe06adb92d1cdbba93d1e0028b4164f
[ "MIT" ]
11
2020-02-12T03:19:44.000Z
2022-03-12T00:10:31.000Z
apps/usuario/view/views_perfil.py
Ajerhy/proyectosigetebr
5b63f194bbe06adb92d1cdbba93d1e0028b4164f
[ "MIT" ]
null
null
null
from django.shortcuts import redirect, render from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.messages.views import SuccessMessageMixin from django.views.generic import (CreateView, UpdateView, DetailView, TemplateView, View, DeleteView,ListView) from django.shortcuts import render, redire...
38.438871
110
0.676562
from django.shortcuts import redirect, render from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.messages.views import SuccessMessageMixin from django.views.generic import (CreateView, UpdateView, DetailView, TemplateView, View, DeleteView,ListView) from django.shortcuts import render, redire...
true
true
1c45c58302360fe1ea1256f259b08d194601aee0
9,269
py
Python
spookbot.py
carsuki/discord-spookbot
a6bd5b7e80860d7db65f3eb634bab68b9d4c50f1
[ "BSD-3-Clause" ]
1
2021-10-01T13:44:05.000Z
2021-10-01T13:44:05.000Z
spookbot.py
carsuki/discord-spookbot
a6bd5b7e80860d7db65f3eb634bab68b9d4c50f1
[ "BSD-3-Clause" ]
null
null
null
spookbot.py
carsuki/discord-spookbot
a6bd5b7e80860d7db65f3eb634bab68b9d4c50f1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import asyncio import discord import logging import json import random logger = logging.getLogger('spookbot') logger.setLevel(logging.INFO) handler = logging.FileHandler(filename='spookbot.log', mode='w', encoding='utf-8') handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name...
130.549296
7,276
0.784659
import asyncio import discord import logging import json import random logger = logging.getLogger('spookbot') logger.setLevel(logging.INFO) handler = logging.FileHandler(filename='spookbot.log', mode='w', encoding='utf-8') handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')) log...
true
true
1c45c59d5474af1e72f1993635d141aeccc75b6e
416
py
Python
products/migrations/0002_auto_20210110_1353.py
ashishkr619/dukaan_main
b236b498b95f62160959b5e84bb642a0be6063b0
[ "MIT" ]
null
null
null
products/migrations/0002_auto_20210110_1353.py
ashishkr619/dukaan_main
b236b498b95f62160959b5e84bb642a0be6063b0
[ "MIT" ]
null
null
null
products/migrations/0002_auto_20210110_1353.py
ashishkr619/dukaan_main
b236b498b95f62160959b5e84bb642a0be6063b0
[ "MIT" ]
null
null
null
# Generated by Django 2.2.17 on 2021-01-10 13:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0001_initial'), ] operations = [ migrations.AlterField( model_name='product', name='category', ...
21.894737
86
0.612981
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0001_initial'), ] operations = [ migrations.AlterField( model_name='product', name='category', field=models.CharField(max_length=120, verbo...
true
true
1c45c5a180008bb7c796a6f16b8559ac7395f0c5
1,094
py
Python
test/fx2trt/converters/acc_op/test_relu.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
1
2022-01-31T14:15:35.000Z
2022-01-31T14:15:35.000Z
test/fx2trt/converters/acc_op/test_relu.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
1
2022-02-03T12:43:23.000Z
2022-02-03T12:47:53.000Z
test/fx2trt/converters/acc_op/test_relu.py
steffenerickson/pytorch
0b656c4c69ce77ecd9aace486e471917e4660746
[ "Intel" ]
null
null
null
# Owner(s): ["oncall: aiacc"] import torch import torch.fx.experimental.fx_acc.acc_ops as acc_ops import torch.nn as nn from torch.testing._internal.common_fx2trt import AccTestCase, InputTensorSpec from torch.testing._internal.common_utils import run_tests class TestReLUConverter(AccTestCase): def test_relu(sel...
29.567568
78
0.606947
import torch import torch.fx.experimental.fx_acc.acc_ops as acc_ops import torch.nn as nn from torch.testing._internal.common_fx2trt import AccTestCase, InputTensorSpec from torch.testing._internal.common_utils import run_tests class TestReLUConverter(AccTestCase): def test_relu(self): class TestModule(...
true
true
1c45c79ba7fba114d9c50c58c0dee7cf69a990c6
36,332
py
Python
scripts/validate_docstrings.py
kpflugshaupt/pandas
c9e3883c630c48b17218e6bcc5593720c1402bf1
[ "BSD-3-Clause" ]
80
2015-01-01T17:32:11.000Z
2022-01-24T07:17:47.000Z
scripts/validate_docstrings.py
sanjusci/pandas
a1fee9199eba7ebf423880243936b9f1501d3d3a
[ "BSD-3-Clause" ]
null
null
null
scripts/validate_docstrings.py
sanjusci/pandas
a1fee9199eba7ebf423880243936b9f1501d3d3a
[ "BSD-3-Clause" ]
28
2015-01-30T16:07:48.000Z
2022-02-11T18:41:13.000Z
#!/usr/bin/env python """ Analyze docstrings to detect errors. If no argument is provided, it does a quick check of docstrings and returns a csv with all API functions and results of basic checks. If a function or method is provided in the form "pandas.function", "pandas.module.class.method", etc. a list of all error...
36.588117
79
0.572168
import os import sys import json import re import glob import functools import collections import argparse import pydoc import inspect import importlib import doctest import tempfile import ast import textwrap import flake8.main.application try: from io import StringIO except ImportError: from cStringIO impo...
true
true
1c45c79cdc783d17fc365a898f4c6a3109e9d344
2,508
py
Python
api_app/models/schemas/workspace.py
tanya-borisova/AzureTRE
02e1745785a75a7dc676d9b9853ae4d4de7d87af
[ "MIT" ]
null
null
null
api_app/models/schemas/workspace.py
tanya-borisova/AzureTRE
02e1745785a75a7dc676d9b9853ae4d4de7d87af
[ "MIT" ]
1
2022-02-02T14:52:06.000Z
2022-02-02T15:00:01.000Z
api_app/models/schemas/workspace.py
tanya-borisova/AzureTRE
02e1745785a75a7dc676d9b9853ae4d4de7d87af
[ "MIT" ]
null
null
null
from enum import Enum from typing import List from pydantic import BaseModel, Field from models.domain.resource import ResourceType from models.domain.workspace import Workspace def get_sample_workspace(workspace_id: str, spec_workspace_id: str = "0001") -> dict: return { "id": workspace_id, "is...
27.56044
152
0.585726
from enum import Enum from typing import List from pydantic import BaseModel, Field from models.domain.resource import ResourceType from models.domain.workspace import Workspace def get_sample_workspace(workspace_id: str, spec_workspace_id: str = "0001") -> dict: return { "id": workspace_id, "is...
true
true
1c45c8088030d2b6425eb6a785a0705fba310bdf
694
py
Python
Menu/BaseScripts/updateBlock.py
fortiersteven/Narikiri-Dungeon-X
49e5716fa5aa81a25048bcbe212eb74828cf0e10
[ "MIT" ]
10
2021-06-04T10:17:48.000Z
2022-01-23T13:23:37.000Z
Menu/BaseScripts/updateBlock.py
fortiersteven/Narikiri-Dungeon-X
49e5716fa5aa81a25048bcbe212eb74828cf0e10
[ "MIT" ]
1
2021-06-05T17:05:04.000Z
2021-06-05T17:05:04.000Z
Menu/BaseScripts/updateBlock.py
fortiersteven/Narikiri-Dungeon-X
49e5716fa5aa81a25048bcbe212eb74828cf0e10
[ "MIT" ]
4
2021-05-21T11:21:04.000Z
2022-01-06T18:50:12.000Z
from HelperfunctionsNew import * import sys import os if __name__ == "__main__": blockDesc = sys.argv[1] helper = Helper() herlper.get if blockDesc in ["Skit Name", "Synopsis", "Minigame"]: helper.createBlock_Multi(blockDesc) elif blockDesc != "All": ...
23.133333
58
0.602305
from HelperfunctionsNew import * import sys import os if __name__ == "__main__": blockDesc = sys.argv[1] helper = Helper() herlper.get if blockDesc in ["Skit Name", "Synopsis", "Minigame"]: helper.createBlock_Multi(blockDesc) elif blockDesc != "All": ...
true
true
1c45c86d301eb86719539dd517c54c2d7968b0d2
2,061
py
Python
sdk/python/pulumi_aws/__init__.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/__init__.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/__init__.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import importlib # Make subpackages available: __all__ = ['acm', 'acmpca', 'apigateway', 'appautoscaling', 'applicationloadbalancing', ...
73.607143
1,216
0.706938
import importlib # Make subpackages available: __all__ = ['acm', 'acmpca', 'apigateway', 'appautoscaling', 'applicationloadbalancing', 'appmesh', 'appsync', 'athena', 'autoscaling', 'backup', 'batch', 'budgets', 'cfg', 'cloud9', 'cloudformation', 'cloudfront', 'cloudhsmv2', 'cloudtrail', 'cloudwatch', 'codebuild', ...
true
true
1c45c9928167414ac58f3e156afea4d5426540e6
122
py
Python
ecommerce/api/category/admin.py
jigyasudhingra/E-commerce-Store-Using-React-And-Django
128e0e3d78dd7aca309c851eff2d02e2452d4d1f
[ "MIT" ]
1
2021-12-04T08:47:29.000Z
2021-12-04T08:47:29.000Z
ecommerce/api/category/admin.py
jigyasudhingra/E-commerce-Store-Using-React-And-Django
128e0e3d78dd7aca309c851eff2d02e2452d4d1f
[ "MIT" ]
null
null
null
ecommerce/api/category/admin.py
jigyasudhingra/E-commerce-Store-Using-React-And-Django
128e0e3d78dd7aca309c851eff2d02e2452d4d1f
[ "MIT" ]
1
2021-05-15T07:23:37.000Z
2021-05-15T07:23:37.000Z
from django.contrib import admin from .models import Category # Register your models here. admin.site.register(Category)
20.333333
32
0.811475
from django.contrib import admin from .models import Category admin.site.register(Category)
true
true
1c45ca09ffeae3aabe2a3a4553e18bbea7714321
595
py
Python
pyaz/eventgrid/topic_type/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/eventgrid/topic_type/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/eventgrid/topic_type/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
from ... pyaz_utils import _call_az def list(): ''' List registered topic types. ''' return _call_az("az eventgrid topic-type list", locals()) def show(name): ''' Get the details for a topic type. Required Parameters: - name -- Name of the topic type. ''' return _call_az("az ...
20.517241
73
0.636975
from ... pyaz_utils import _call_az def list(): return _call_az("az eventgrid topic-type list", locals()) def show(name): return _call_az("az eventgrid topic-type show", locals()) def list_event_types(name): return _call_az("az eventgrid topic-type list-event-types", locals())
true
true
1c45ca0d1bfde8aae6ad6466c099bac46b3121a0
4,702
py
Python
sdk/python/pulumi_aws/iot/thing_principal_attachment.py
sibuthomasmathew/pulumi-aws
6351f2182eb6f693d4e09e4136c385adfa0ab674
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/iot/thing_principal_attachment.py
sibuthomasmathew/pulumi-aws
6351f2182eb6f693d4e09e4136c385adfa0ab674
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/iot/thing_principal_attachment.py
sibuthomasmathew/pulumi-aws
6351f2182eb6f693d4e09e4136c385adfa0ab674
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
38.859504
134
0.630795
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __all__ = ['ThingPrincipalAttachment'] class ThingPrincipalAttachment(pulumi.CustomResource): def __init__(__self__, resource_name: str, ...
true
true
1c45ca1a60b4a3f9502678a3a66a9ba2d024ce6a
3,966
py
Python
coursera-compinvest1-master/coursera-compinvest1-master/homework/Homework4.py
telefar/stockEye
2556c951af5e813460ee44951542cd918986578b
[ "BSD-3-Clause" ]
null
null
null
coursera-compinvest1-master/coursera-compinvest1-master/homework/Homework4.py
telefar/stockEye
2556c951af5e813460ee44951542cd918986578b
[ "BSD-3-Clause" ]
null
null
null
coursera-compinvest1-master/coursera-compinvest1-master/homework/Homework4.py
telefar/stockEye
2556c951af5e813460ee44951542cd918986578b
[ "BSD-3-Clause" ]
null
null
null
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. ''' import pandas as pd import numpy as np import math import copy import QSTK.qstkutil.qsdateutil as du import datet...
37.771429
92
0.631367
''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. ''' import pandas as pd import numpy as np import math import copy import QSTK.qstkutil.qsdateutil as du import datet...
false
true
1c45cb5a65393e34123182c95336941251f13bac
4,748
py
Python
preGame.py
Unf-Team/Hang-Man
330ce502de95da48d127cad1b9c4d6c0328864ca
[ "Apache-2.0" ]
15
2015-11-19T19:42:43.000Z
2019-08-16T05:49:02.000Z
preGame.py
Unf-Team/Hang-Man
330ce502de95da48d127cad1b9c4d6c0328864ca
[ "Apache-2.0" ]
3
2016-11-06T19:12:26.000Z
2017-10-27T00:51:35.000Z
preGame.py
Unf-Team/Hang-Man
330ce502de95da48d127cad1b9c4d6c0328864ca
[ "Apache-2.0" ]
29
2015-12-19T06:51:15.000Z
2020-04-07T18:10:35.000Z
#-*- coding: utf-8 -*- #Contém a lógica do preGame #Importa os comandos import comandos as c import bds import game as g from random import randint, shuffle def categorias(chat_id, u_id, message_id): l = c.getLanguage(chat_id) if bds.checkAdm(chat_id, u_id): bds.setCategorias(chat_id,True) return ...
45.653846
131
0.625527
import comandos as c import bds import game as g from random import randint, shuffle def categorias(chat_id, u_id, message_id): l = c.getLanguage(chat_id) if bds.checkAdm(chat_id, u_id): bds.setCategorias(chat_id,True) return [c.toDict(chat_id, l.cat_msg, replyTo = message_id, replyMarkup = c.m...
false
true
1c45cb82a5676f74fee689944bd273eb30fc85e0
4,151
py
Python
Tests/Plot/LamWind/test_Slot_LSRPM_plot.py
tobsen2code/pyleecan
5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
Tests/Plot/LamWind/test_Slot_LSRPM_plot.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
Tests/Plot/LamWind/test_Slot_LSRPM_plot.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
# -*- coding: utf-8 -*- from os.path import join import pytest import matplotlib.pyplot as plt from numpy import array, pi, zeros from pyleecan.Classes.Frame import Frame from pyleecan.Classes.LamSlotWind import LamSlotWind from pyleecan.Classes.LamSquirrelCage import LamSquirrelCage from pyleecan.Classes.MachineDFIM...
29.863309
89
0.530956
from os.path import join import pytest import matplotlib.pyplot as plt from numpy import array, pi, zeros from pyleecan.Classes.Frame import Frame from pyleecan.Classes.LamSlotWind import LamSlotWind from pyleecan.Classes.LamSquirrelCage import LamSquirrelCage from pyleecan.Classes.MachineDFIM import MachineDFIM fro...
true
true
1c45cc01daf7a254c2fe16fed376b3fc58df574f
1,643
py
Python
src/nucleotide/component/windows/msvc/atom/version.py
dmilos/nucleotide
aad5d60508c9e4baf4888069284f2cb5c9fd7c55
[ "Apache-2.0" ]
1
2020-09-04T13:00:04.000Z
2020-09-04T13:00:04.000Z
src/nucleotide/component/windows/msvc/atom/version.py
dmilos/nucleotide
aad5d60508c9e4baf4888069284f2cb5c9fd7c55
[ "Apache-2.0" ]
1
2020-04-10T01:52:32.000Z
2020-04-10T09:11:29.000Z
src/nucleotide/component/windows/msvc/atom/version.py
dmilos/nucleotide
aad5d60508c9e4baf4888069284f2cb5c9fd7c55
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # Copyright 2015 Dejan D. M. Milosavljevic # # 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 # # ...
27.847458
109
0.625685
import os import subprocess import nucleotide import nucleotide.component import nucleotide.component.function def _windows_version_MSVC_VERSION( P_data ): if( False == ( 'msvc' in P_data ) ): return None print( " ||" + str( P_data ) + "||" ) return P_data[ 'm...
true
true
1c45ccb173f55ce3b5f37cb85aa9fc13c1fdd831
791
py
Python
david/modules/event/admin.py
ktmud/david
4b8d6f804b73cdfa1a8ddf784077fa9a39f1e36f
[ "MIT" ]
2
2016-04-07T08:21:32.000Z
2020-11-26T11:49:20.000Z
david/modules/event/admin.py
ktmud/david
4b8d6f804b73cdfa1a8ddf784077fa9a39f1e36f
[ "MIT" ]
null
null
null
david/modules/event/admin.py
ktmud/david
4b8d6f804b73cdfa1a8ddf784077fa9a39f1e36f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from david.core.article.admin import ArticleAdmin, ModelAdmin from david.ext.admin import _ from .model import Event class EventAdmin(ArticleAdmin): column_labels = dict( title=_('Title'), slug=_('Slug'), id=_('ID'), tags=_('Tags'), ...
27.275862
61
0.542351
from david.core.article.admin import ArticleAdmin, ModelAdmin from david.ext.admin import _ from .model import Event class EventAdmin(ArticleAdmin): column_labels = dict( title=_('Title'), slug=_('Slug'), id=_('ID'), tags=_('Tags'), create_at=_('Create ...
true
true
1c45ccf0ef4a8a26e47030e104f785132e53c97d
31,133
py
Python
flexmock_test.py
sagara-/flexmock
0b24b769cd04e234d4921089053707a5565aa007
[ "BSD-2-Clause" ]
null
null
null
flexmock_test.py
sagara-/flexmock
0b24b769cd04e234d4921089053707a5565aa007
[ "BSD-2-Clause" ]
null
null
null
flexmock_test.py
sagara-/flexmock
0b24b769cd04e234d4921089053707a5565aa007
[ "BSD-2-Clause" ]
null
null
null
#-*- coding: utf8 -*- from flexmock import FlexMock from flexmock import AlreadyMocked from flexmock import AndExecuteNotSupportedForClassMocks from flexmock import AttemptingToMockBuiltin from flexmock import Expectation from flexmock import FlexmockContainer from flexmock import FlexmockException from flexmock import...
36.201163
81
0.710886
from flexmock import FlexMock from flexmock import AlreadyMocked from flexmock import AndExecuteNotSupportedForClassMocks from flexmock import AttemptingToMockBuiltin from flexmock import Expectation from flexmock import FlexmockContainer from flexmock import FlexmockException from flexmock import InvalidMethodSignatu...
true
true
1c45ccf6c4e027fc171552bcb089538da702ede9
3,773
py
Python
dataviz/timeline_gibraltar.py
Udzu/pudzu
5a0302830b052fc54feba891eb7bf634957a9d90
[ "MIT" ]
119
2017-07-22T15:02:30.000Z
2021-08-02T10:42:59.000Z
dataviz/timeline_gibraltar.py
Udzu/pudzu
5a0302830b052fc54feba891eb7bf634957a9d90
[ "MIT" ]
null
null
null
dataviz/timeline_gibraltar.py
Udzu/pudzu
5a0302830b052fc54feba891eb7bf634957a9d90
[ "MIT" ]
28
2017-08-04T14:28:41.000Z
2019-11-27T23:46:14.000Z
from pudzu.charts import * from pudzu.dates import * from collections import defaultdict df = pd.read_csv("datasets/timeline_gibraltar.csv") df_events = pd.read_csv("datasets/timeline_gibraltar_events.csv") START, END, INTERVAL = 1000, 2000, 250 PHOTOS = ["http://www.kindredgroup.com/wp-content/uploads/2016/1...
49.644737
181
0.662073
from pudzu.charts import * from pudzu.dates import * from collections import defaultdict df = pd.read_csv("datasets/timeline_gibraltar.csv") df_events = pd.read_csv("datasets/timeline_gibraltar_events.csv") START, END, INTERVAL = 1000, 2000, 250 PHOTOS = ["http://www.kindredgroup.com/wp-content/uploads/2016/1...
true
true
1c45cda6072debbc7728300318b2edc0c33241ba
1,070
py
Python
software/tbd/set_ids.py
mayhem/led-chandelier
899caa8d81e6aac6e954f78b4f5b4ab101bf5257
[ "MIT" ]
2
2018-09-20T08:36:11.000Z
2019-08-25T20:06:11.000Z
software/tbd/set_ids.py
mayhem/led-chandelier
899caa8d81e6aac6e954f78b4f5b4ab101bf5257
[ "MIT" ]
null
null
null
software/tbd/set_ids.py
mayhem/led-chandelier
899caa8d81e6aac6e954f78b4f5b4ab101bf5257
[ "MIT" ]
1
2020-12-12T18:21:18.000Z
2020-12-12T18:21:18.000Z
#!/usr/bin/python import os import sys import math from chandelier import Chandelier, BROADCAST import generator as g import filter as f import random import common import function as s from time import sleep, time from color import Color device = "/dev/ttyAMA0" confirm = raw_input("This will clear all ids of all th...
19.814815
125
0.669159
import os import sys import math from chandelier import Chandelier, BROADCAST import generator as g import filter as f import random import common import function as s from time import sleep, time from color import Color device = "/dev/ttyAMA0" confirm = raw_input("This will clear all ids of all the bottles current...
false
true
1c45cf4bdee098de3ed2c46a413ab004e8e94cbf
1,436
py
Python
tests/test_tools_jobinfo.py
NERSC/pytokio
22244718cf82567c50620cbe0e635dfc990de36b
[ "BSD-3-Clause-LBNL" ]
22
2017-11-14T01:30:48.000Z
2022-01-01T21:51:00.000Z
tests/test_tools_jobinfo.py
glennklockwood/pytokio
22244718cf82567c50620cbe0e635dfc990de36b
[ "BSD-3-Clause-LBNL" ]
39
2017-12-20T01:42:19.000Z
2020-05-28T21:17:26.000Z
tests/test_tools_jobinfo.py
glennklockwood/pytokio
22244718cf82567c50620cbe0e635dfc990de36b
[ "BSD-3-Clause-LBNL" ]
5
2018-02-06T19:39:19.000Z
2019-07-10T01:20:26.000Z
"""Test jobinfo and all supported backends """ import tokio.tools.jobinfo import tokiotest def test_get_job_startend_slurm(): """tools.jobinfo.get_job_startend, Slurm """ tokio.config.CONFIG["jobinfo_jobid_providers"] = ["slurm"] start, end = tokio.tools.jobinfo.get_job_startend( jobid=tokiotes...
31.217391
69
0.722145
import tokio.tools.jobinfo import tokiotest def test_get_job_startend_slurm(): tokio.config.CONFIG["jobinfo_jobid_providers"] = ["slurm"] start, end = tokio.tools.jobinfo.get_job_startend( jobid=tokiotest.SAMPLE_DARSHAN_JOBID, cache_file=tokiotest.SAMPLE_SLURM_CACHE_FILE) print(start, end) ...
true
true
1c45cf7be7c3d2e904239c5a45cec80098ce6554
78
py
Python
wmf/dump/__init__.py
maribelacosta/wikiwho
5c53f129b018541aad0cc63be5e03a862e6183a1
[ "MIT" ]
17
2015-01-04T15:17:15.000Z
2019-09-17T15:38:43.000Z
wmf/dump/__init__.py
maribelacosta/wikiwho
5c53f129b018541aad0cc63be5e03a862e6183a1
[ "MIT" ]
5
2015-06-03T09:07:40.000Z
2017-03-31T16:36:13.000Z
wmf/dump/__init__.py
maribelacosta/wikiwho
5c53f129b018541aad0cc63be5e03a862e6183a1
[ "MIT" ]
10
2015-02-11T11:50:11.000Z
2021-07-28T02:17:16.000Z
from .iterator import Iterator from .map import map from .map import dumpFile
19.5
30
0.807692
from .iterator import Iterator from .map import map from .map import dumpFile
true
true
1c45cfcca17602a353dfd446b147a8f1cf0251e7
4,479
py
Python
tests/samples.py
chikko80/bit
af557cde90c9021ee16024ab89a000961c6062b4
[ "MIT" ]
1,173
2016-11-30T19:45:44.000Z
2022-03-31T15:43:58.000Z
tests/samples.py
chikko80/bit
af557cde90c9021ee16024ab89a000961c6062b4
[ "MIT" ]
155
2017-03-17T13:06:42.000Z
2022-02-28T16:59:14.000Z
tests/samples.py
chikko80/bit
af557cde90c9021ee16024ab89a000961c6062b4
[ "MIT" ]
197
2017-02-16T04:30:29.000Z
2022-03-24T09:38:29.000Z
import os BINARY_ADDRESS = b'\x00\x92F\x1b\xdeb\x83\xb4a\xec\xe7\xdd\xf4\xdb\xf1\xe0\xa4\x8b\xd1\x13\xd8&E\xb4\xbf' BITCOIN_ADDRESS = '1ELReFsTCUY2mfaDTy32qxYiT49z786eFg' BITCOIN_ADDRESS_COMPRESSED = '1ExJJsNLQDNVVM1s1sdyt1o5P3GC5r32UG' BITCOIN_ADDRESS_NP2WKH = '3291hXxutb58vbDVVumaJpopanmfxjVpgJ' BITCOIN_ADDRESS_PAY2...
67.863636
150
0.841036
import os BINARY_ADDRESS = b'\x00\x92F\x1b\xdeb\x83\xb4a\xec\xe7\xdd\xf4\xdb\xf1\xe0\xa4\x8b\xd1\x13\xd8&E\xb4\xbf' BITCOIN_ADDRESS = '1ELReFsTCUY2mfaDTy32qxYiT49z786eFg' BITCOIN_ADDRESS_COMPRESSED = '1ExJJsNLQDNVVM1s1sdyt1o5P3GC5r32UG' BITCOIN_ADDRESS_NP2WKH = '3291hXxutb58vbDVVumaJpopanmfxjVpgJ' BITCOIN_ADDRESS_PAY2...
true
true
1c45cff204c2083e87e0c5b405062242ac5f4e29
2,254
py
Python
.config/qutebrowser/config.py
SqrtMinusOne/dotfiles
1121bd865cb9ed019e9e4c257155e2fb483d98c5
[ "Apache-2.0" ]
12
2021-05-01T11:08:55.000Z
2022-03-27T05:57:02.000Z
.config/qutebrowser/config.py
SqrtMinusOne/dotfiles
1121bd865cb9ed019e9e4c257155e2fb483d98c5
[ "Apache-2.0" ]
1
2022-02-13T14:54:29.000Z
2022-02-13T15:42:55.000Z
.config/qutebrowser/config.py
SqrtMinusOne/dotfiles
1121bd865cb9ed019e9e4c257155e2fb483d98c5
[ "Apache-2.0" ]
4
2021-05-22T21:31:28.000Z
2022-03-30T21:28:33.000Z
import os import dracula.draw from qutebrowser.api import interceptor def filter_yt(info: interceptor.Request): """Block the given request if necessary.""" url = info.request_url if (url.host() == 'www.youtube.com' and url.path() == '/get_video_info' and '&adformat=' in url.query()): info.block() interce...
26.517647
91
0.624667
import os import dracula.draw from qutebrowser.api import interceptor def filter_yt(info: interceptor.Request): url = info.request_url if (url.host() == 'www.youtube.com' and url.path() == '/get_video_info' and '&adformat=' in url.query()): info.block() interceptor.register(filter_yt) config.load_autocon...
true
true
1c45d042e89a5bb966939c08622d51ac265a1ecd
3,127
py
Python
tmt/steps/report/junit.py
KwisatzHaderach/tmt
75ff90a543240d39c45baa849e6a3149545be0fd
[ "MIT" ]
null
null
null
tmt/steps/report/junit.py
KwisatzHaderach/tmt
75ff90a543240d39c45baa849e6a3149545be0fd
[ "MIT" ]
null
null
null
tmt/steps/report/junit.py
KwisatzHaderach/tmt
75ff90a543240d39c45baa849e6a3149545be0fd
[ "MIT" ]
null
null
null
import os import click import tmt import tmt.steps.report DEFAULT_NAME = "junit.xml" def import_junit_xml(): """ Import junit_xml module only when needed Until we have a separate package for each plugin. """ global junit_xml try: import junit_xml except ImportError: rai...
30.960396
79
0.568276
import os import click import tmt import tmt.steps.report DEFAULT_NAME = "junit.xml" def import_junit_xml(): global junit_xml try: import junit_xml except ImportError: raise tmt.utils.ReportError( "Missing 'junit-xml', fixable by 'pip install tmt[report-junit]'.") def dura...
true
true
1c45d09ac800551f95112d696ee3ba6ef9d53511
5,786
py
Python
packaging/dicarlo/sanghavi/sanghavimurty2020things1.py
dmayo/brain-score
3ab4258152c9e3f8c7d29afb10158b184dbcebbe
[ "MIT" ]
52
2019-12-13T06:43:44.000Z
2022-02-21T07:47:39.000Z
packaging/dicarlo/sanghavi/sanghavimurty2020things1.py
dmayo/brain-score
3ab4258152c9e3f8c7d29afb10158b184dbcebbe
[ "MIT" ]
104
2019-12-06T18:08:54.000Z
2022-03-31T23:57:51.000Z
packaging/dicarlo/sanghavi/sanghavimurty2020things1.py
dmayo/brain-score
3ab4258152c9e3f8c7d29afb10158b184dbcebbe
[ "MIT" ]
32
2019-12-05T14:31:14.000Z
2022-03-10T02:04:45.000Z
import os from pathlib import Path import json import numpy as np import xarray as xr import pandas as pd from brainio_base.assemblies import NeuronRecordingAssembly from brainio_base.stimuli import StimulusSet from brainio_collection.packaging import package_data_assembly, package_stimulus_set from mkgu_packaging.di...
48.621849
125
0.667128
import os from pathlib import Path import json import numpy as np import xarray as xr import pandas as pd from brainio_base.assemblies import NeuronRecordingAssembly from brainio_base.stimuli import StimulusSet from brainio_collection.packaging import package_data_assembly, package_stimulus_set from mkgu_packaging.di...
true
true
1c45d15d423872579297a22d537eec56230d8c1c
197
py
Python
Aprendendo Python/cursopythonudamy/aula16while_contador_acumulador.py
JlucasS777/Aprendendo-Python
a3a960260070f0d604c27fbbc41578a6ab11edb5
[ "MIT" ]
null
null
null
Aprendendo Python/cursopythonudamy/aula16while_contador_acumulador.py
JlucasS777/Aprendendo-Python
a3a960260070f0d604c27fbbc41578a6ab11edb5
[ "MIT" ]
null
null
null
Aprendendo Python/cursopythonudamy/aula16while_contador_acumulador.py
JlucasS777/Aprendendo-Python
a3a960260070f0d604c27fbbc41578a6ab11edb5
[ "MIT" ]
null
null
null
contador = 1 acumulador = 1 while contador <= 10: print(contador,acumulador) if contador>5: break contador+=1 else : print("Cheguei ao final do programa e usei o laço else")
21.888889
60
0.659898
contador = 1 acumulador = 1 while contador <= 10: print(contador,acumulador) if contador>5: break contador+=1 else : print("Cheguei ao final do programa e usei o laço else")
true
true
1c45d36bee4e9d54b5cbf2aeacd682f4ac03ae3c
1,228
py
Python
scipy/special/_precompute/utils.py
smola/scipy
ff8b9d9e87a585a820846d7f459d6156ba621c4d
[ "BSD-3-Clause" ]
1
2020-02-26T12:15:51.000Z
2020-02-26T12:15:51.000Z
scipy/special/_precompute/utils.py
smola/scipy
ff8b9d9e87a585a820846d7f459d6156ba621c4d
[ "BSD-3-Clause" ]
null
null
null
scipy/special/_precompute/utils.py
smola/scipy
ff8b9d9e87a585a820846d7f459d6156ba621c4d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, print_function, absolute_import from numpy.testing import suppress_warnings try: import mpmath as mp except ImportError: pass try: # Can remove when sympy #11255 is resolved; see # https://github.com/sympy/sympy/issues/11255 with suppress_warnings() as sup: ...
26.12766
76
0.593648
from __future__ import division, print_function, absolute_import from numpy.testing import suppress_warnings try: import mpmath as mp except ImportError: pass try: _warnings() as sup: sup.filter(DeprecationWarning, "inspect.getargspec.. is deprecated") from sympy.abc import x except Impor...
true
true
1c45d3b6ea710c0f740d2889df7c9d12df1dfe29
405
py
Python
minesweeperapi/minesweeperapi/wsgi.py
Olaussen/minesweeper-online-api
36ba250b65b19cc4f0d8be36b3f84faf3f692035
[ "MIT" ]
4
2020-04-15T18:21:36.000Z
2020-04-24T12:24:03.000Z
minesweeperapi/minesweeperapi/wsgi.py
Olaussen/minesweeper-online-api
36ba250b65b19cc4f0d8be36b3f84faf3f692035
[ "MIT" ]
4
2021-03-29T23:56:40.000Z
2021-09-22T19:00:36.000Z
minesweeperapi/minesweeperapi/wsgi.py
Angstboksen/minesweeper-online-api
36ba250b65b19cc4f0d8be36b3f84faf3f692035
[ "MIT" ]
null
null
null
""" WSGI config for minesweeperapi 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/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANG...
23.823529
78
0.792593
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'minesweeperapi.settings') application = get_wsgi_application()
true
true
1c45d4943574fa4c951c551453898c091153b659
1,917
py
Python
trax/rl/__init__.py
koz4k2/trax
548f671fa3804cb86154ac504fb0c6c4269b42c7
[ "Apache-2.0" ]
2
2020-02-05T09:27:29.000Z
2020-02-05T09:27:49.000Z
trax/rl/__init__.py
koz4k2/trax
548f671fa3804cb86154ac504fb0c6c4269b42c7
[ "Apache-2.0" ]
null
null
null
trax/rl/__init__.py
koz4k2/trax
548f671fa3804cb86154ac504fb0c6c4269b42c7
[ "Apache-2.0" ]
1
2021-07-08T16:35:30.000Z
2021-07-08T16:35:30.000Z
# coding=utf-8 # Copyright 2019 The Trax Authors. # # 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...
36.169811
79
0.806468
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gin from trax.rl import simulated_env_problem def configure_rl(*args, **kwargs): kwargs['module'] = 'trax.rl' return gin.external_configurable(*args, **kwargs) def configure_simu...
true
true
1c45d52d487074570c308737c78dd22714356d93
4,508
py
Python
play_with_mpv.py
davehorner/play-with-mpv
89ad8de0faf10a175fbd8cf0792706e39ed87fae
[ "Unlicense" ]
null
null
null
play_with_mpv.py
davehorner/play-with-mpv
89ad8de0faf10a175fbd8cf0792706e39ed87fae
[ "Unlicense" ]
null
null
null
play_with_mpv.py
davehorner/play-with-mpv
89ad8de0faf10a175fbd8cf0792706e39ed87fae
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # Plays MPV when instructed to by a chrome extension =] import sys import argparse from subprocess import Popen FileNotFoundError = IOError if sys.version_info[0] < 3: # python 2 import BaseHTTPServer import urlparse class CompatibilityMixin: def send_body(self, msg): ...
37.566667
160
0.533718
import sys import argparse from subprocess import Popen FileNotFoundError = IOError if sys.version_info[0] < 3: import BaseHTTPServer import urlparse class CompatibilityMixin: def send_body(self, msg): self.wfile.write(msg+'\n') self.wfile.close() else: import ht...
true
true
1c45d5350b388a12e7757dc666f9344c210a8547
42,275
py
Python
pypy/module/_winreg/interp_winreg.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/_winreg/interp_winreg.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
null
null
null
pypy/module/_winreg/interp_winreg.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
null
null
null
from rpython.rtyper.lltypesystem import rffi, lltype from rpython.rlib import rwinreg, rwin32, rstring from rpython.rlib.rarithmetic import r_uint, r_ulonglong, intmask from rpython.rlib.buffer import ByteBuffer from rpython.rlib.rutf8 import check_utf8 from pypy.interpreter.baseobjspace import W_Root, BufferInterface...
41.527505
91
0.649415
from rpython.rtyper.lltypesystem import rffi, lltype from rpython.rlib import rwinreg, rwin32, rstring from rpython.rlib.rarithmetic import r_uint, r_ulonglong, intmask from rpython.rlib.buffer import ByteBuffer from rpython.rlib.rutf8 import check_utf8 from pypy.interpreter.baseobjspace import W_Root, BufferInterface...
true
true