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
f70dffb054dee576c07829185b1bb6e2aa0e8342
22,040
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/aio/operations/_flow_logs_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/aio/operations/_flow_logs_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/aio/operations/_flow_logs_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.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 ...
50.666667
222
0.672641
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f70dffe0df962a8eeadf76f5e2e402a0010a002f
33,459
py
Python
djangae/tests/test_migrations.py
farridav/djangae
afdef831481d99f3259ca1a10adcd0c35d3424c1
[ "BSD-3-Clause" ]
null
null
null
djangae/tests/test_migrations.py
farridav/djangae
afdef831481d99f3259ca1a10adcd0c35d3424c1
[ "BSD-3-Clause" ]
null
null
null
djangae/tests/test_migrations.py
farridav/djangae
afdef831481d99f3259ca1a10adcd0c35d3424c1
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 # STANDARD LIB from unittest import skipIf # THIRD PARTY from django.apps.registry import apps # Apps from django.conf import settings from django.db import connection, models from django.db.migrations.state import ProjectState from django.test import override_settings from google.appengine.api impo...
41.154982
119
0.657013
from unittest import skipIf from django.apps.registry import apps from django.conf import settings from django.db import connection, models from django.db.migrations.state import ProjectState from django.test import override_settings from google.appengine.api import datastore from google.appengine.runtime import ...
true
true
f70e000ee4d5e5439ae086cbb2c848253ec1032f
198
py
Python
CSV2JSON/CSVreader.py
anthonylzh555/CV_project
96517cd654c5e7f467fad306936e4ad01be64ea2
[ "Unlicense" ]
null
null
null
CSV2JSON/CSVreader.py
anthonylzh555/CV_project
96517cd654c5e7f467fad306936e4ad01be64ea2
[ "Unlicense" ]
null
null
null
CSV2JSON/CSVreader.py
anthonylzh555/CV_project
96517cd654c5e7f467fad306936e4ad01be64ea2
[ "Unlicense" ]
null
null
null
import csv import json csvfile = open('20180308.csv', 'r') jsonfile = open('20180308.json', 'w') reader = csv.DictReader(csvfile) out = json.dumps( [ row for row in reader ] ) jsonfile.write(out)
19.8
45
0.69697
import csv import json csvfile = open('20180308.csv', 'r') jsonfile = open('20180308.json', 'w') reader = csv.DictReader(csvfile) out = json.dumps( [ row for row in reader ] ) jsonfile.write(out)
true
true
f70e0019e1b6f9da8bae5be63c8d6102f298888f
1,344
py
Python
tests/utils.py
fyntex/lib-cl-sii-python
b6ffb72be1f173a1d2e44b17ae5c08caf96ebf34
[ "MIT" ]
8
2020-03-07T19:58:40.000Z
2021-12-15T13:47:40.000Z
tests/utils.py
fyntex/lib-cl-sii-python
b6ffb72be1f173a1d2e44b17ae5c08caf96ebf34
[ "MIT" ]
141
2020-01-17T22:47:35.000Z
2022-03-31T18:29:47.000Z
tests/utils.py
fyndata/lib-cl-sii-python
d618247fe7c73e11b391015ae8a00e7b282c2606
[ "MIT" ]
4
2019-05-18T15:43:35.000Z
2019-11-06T21:55:09.000Z
import json import os from typing import Mapping _TESTS_DIR_PATH = os.path.dirname(__file__) def get_test_file_path(path: str) -> str: filepath = os.path.join( _TESTS_DIR_PATH, path, ) return filepath def read_test_file_bytes(path: str) -> bytes: filepath = os.path.join( _T...
21
99
0.614583
import json import os from typing import Mapping _TESTS_DIR_PATH = os.path.dirname(__file__) def get_test_file_path(path: str) -> str: filepath = os.path.join( _TESTS_DIR_PATH, path, ) return filepath def read_test_file_bytes(path: str) -> bytes: filepath = os.path.join( _T...
true
true
f70e025c9c6583b9c7c6f7774f638cb33684700d
6,572
py
Python
cc_container_worker/application_container/__main__.py
curious-containers/cc-container-worker
89a226a366fe798ba3eda04e0ebc3632b2450bc8
[ "Apache-2.0" ]
null
null
null
cc_container_worker/application_container/__main__.py
curious-containers/cc-container-worker
89a226a366fe798ba3eda04e0ebc3632b2450bc8
[ "Apache-2.0" ]
null
null
null
cc_container_worker/application_container/__main__.py
curious-containers/cc-container-worker
89a226a366fe798ba3eda04e0ebc3632b2450bc8
[ "Apache-2.0" ]
null
null
null
import os import sys import json import jsonschema from subprocess import Popen, PIPE from threading import Thread from traceback import format_exc from cc_container_worker.application_container.telemetry import Telemetry from cc_container_worker.commons.data import ac_download, ac_upload, tracing_upload from cc_conta...
35.524324
115
0.654139
import os import sys import json import jsonschema from subprocess import Popen, PIPE from threading import Thread from traceback import format_exc from cc_container_worker.application_container.telemetry import Telemetry from cc_container_worker.commons.data import ac_download, ac_upload, tracing_upload from cc_conta...
true
true
f70e02bea1eb8fd1dcde3853686bc29b064869be
12,417
py
Python
mgt2001/hyp/non.py
derekdylu/mgt2001
b228d5e75e75a2f3f170e35db1bea999b765bec8
[ "MIT" ]
5
2021-03-01T18:31:41.000Z
2022-01-08T12:10:22.000Z
mgt2001/hyp/non.py
derekdylu/mgt2001
b228d5e75e75a2f3f170e35db1bea999b765bec8
[ "MIT" ]
1
2021-06-18T09:30:27.000Z
2021-06-18T09:30:27.000Z
mgt2001/hyp/non.py
derekdylu/mgt2001
b228d5e75e75a2f3f170e35db1bea999b765bec8
[ "MIT" ]
2
2021-06-11T07:58:41.000Z
2021-10-03T13:49:24.000Z
from matplotlib import pyplot as plt import pandas as pd import numpy as np import math import scipy.stats as stats def inter_p_value(p_value): # interpretation if p_value >= 0 and p_value < 0.01: inter_p = 'Overwhelming Evidence' elif p_value >= 0.01 and p_value < 0.05: inter_p = 'Strong ...
29.079625
112
0.588065
from matplotlib import pyplot as plt import pandas as pd import numpy as np import math import scipy.stats as stats def inter_p_value(p_value): if p_value >= 0 and p_value < 0.01: inter_p = 'Overwhelming Evidence' elif p_value >= 0.01 and p_value < 0.05: inter_p = 'Strong Evidence' el...
true
true
f70e039d9a538ccea5c7dfb4044a5badc285fa16
825
py
Python
modules/post-exploitation/gpp-decrypt.py
TheRealJoeyCo/ptf
dd1985696ba8d33be46645efd9d086ac48bd42cf
[ "FTL" ]
1
2021-01-12T23:32:22.000Z
2021-01-12T23:32:22.000Z
modules/post-exploitation/gpp-decrypt.py
TheRealJoeyCo/ptf
dd1985696ba8d33be46645efd9d086ac48bd42cf
[ "FTL" ]
null
null
null
modules/post-exploitation/gpp-decrypt.py
TheRealJoeyCo/ptf
dd1985696ba8d33be46645efd9d086ac48bd42cf
[ "FTL" ]
2
2018-02-07T23:39:48.000Z
2018-05-16T22:31:28.000Z
#!/usr/bin/env python ##################################### # Installation module for gpp-decrypt ##################################### # AUTHOR OF MODULE NAME AUTHOR="Larry Spohn (Spoonman)" # DESCRIPTION OF THE MODULE DESCRIPTION="This module will install/upgrade gpp-decrypt - a tool for decrypting passwords found ...
25
132
0.699394
true
true
f70e03f7c7e6c6fb27ff349ab1be2511be8a66bf
8,655
py
Python
test/option-k.py
EmanueleCannizzaro/scons
6baa4e65cdf4df6951473545b69435711864e509
[ "MIT" ]
1
2019-09-18T06:37:02.000Z
2019-09-18T06:37:02.000Z
test/option-k.py
EmanueleCannizzaro/scons
6baa4e65cdf4df6951473545b69435711864e509
[ "MIT" ]
null
null
null
test/option-k.py
EmanueleCannizzaro/scons
6baa4e65cdf4df6951473545b69435711864e509
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
28.65894
90
0.619295
__revision__ = "test/option-k.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import os.path import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() test.subdir('work1', 'work2', 'work3') test.write('succeed.py', r""" import sys file = open(sys.argv[1], '...
true
true
f70e062a03a17b15487aef3c92d81d8e650ad003
2,883
py
Python
conans/server/rest/bottle_plugins/authorization_header.py
laundry-96/conan
fd938f7220ca042d94c42ec5eb607ee69c6785a3
[ "MIT" ]
1
2021-06-14T01:39:27.000Z
2021-06-14T01:39:27.000Z
conans/server/rest/bottle_plugins/authorization_header.py
laundry-96/conan
fd938f7220ca042d94c42ec5eb607ee69c6785a3
[ "MIT" ]
1
2020-04-18T10:13:37.000Z
2020-04-18T10:16:37.000Z
conans/server/rest/bottle_plugins/authorization_header.py
laundry-96/conan
fd938f7220ca042d94c42ec5eb607ee69c6785a3
[ "MIT" ]
1
2021-06-03T23:08:43.000Z
2021-06-03T23:08:43.000Z
import inspect from abc import ABCMeta, abstractmethod from bottle import PluginError, request from conans.util.log import logger class AuthorizationHeader(object): """ Generic plugin to handle Authorization header. Must be extended and implement some abstract methods in subclasses """ __metaclass__ = A...
36.961538
94
0.644121
import inspect from abc import ABCMeta, abstractmethod from bottle import PluginError, request from conans.util.log import logger class AuthorizationHeader(object): __metaclass__ = ABCMeta name = 'authorizationheader' api = 2 def __init__(self, keyword): self.keyword = keyword ...
true
true
f70e06d56adcd25862d3ef5d4056a66389c16fa6
25,584
py
Python
.venv/lib/python2.7/site-packages/_pytest/main.py
aruneli/rancher-tests
f0ff5539420ac354fc951ed239b002cecde52505
[ "Apache-2.0" ]
null
null
null
.venv/lib/python2.7/site-packages/_pytest/main.py
aruneli/rancher-tests
f0ff5539420ac354fc951ed239b002cecde52505
[ "Apache-2.0" ]
null
null
null
.venv/lib/python2.7/site-packages/_pytest/main.py
aruneli/rancher-tests
f0ff5539420ac354fc951ed239b002cecde52505
[ "Apache-2.0" ]
null
null
null
""" core implementation of testing process: init, session, runtest loop. """ import re import py import pytest, _pytest import os, sys, imp try: from collections import MutableMapping as MappingMixin except ImportError: from UserDict import DictMixin as MappingMixin from _pytest.runner import collect_one_node...
35.046575
122
0.597209
import re import py import pytest, _pytest import os, sys, imp try: from collections import MutableMapping as MappingMixin except ImportError: from UserDict import DictMixin as MappingMixin from _pytest.runner import collect_one_node tracebackcutdir = py.path.local(_pytest.__file__).dirpath() EXIT_OK = 0 E...
true
true
f70e06e5e95179c1e68d413f9bfa9545ed8a7309
1,319
py
Python
qt_client/components/plot_data_model.py
cosmoscope/qt-client
c6cb59267c8be9149a95fb853a4f181d9092c86b
[ "BSD-3-Clause" ]
null
null
null
qt_client/components/plot_data_model.py
cosmoscope/qt-client
c6cb59267c8be9149a95fb853a4f181d9092c86b
[ "BSD-3-Clause" ]
1
2020-10-29T19:55:04.000Z
2020-10-29T19:55:04.000Z
qt_client/components/plot_data_model.py
cosmoscope/qt-client
c6cb59267c8be9149a95fb853a4f181d9092c86b
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from PyQt5.QtCore import (QAbstractTableModel, QModelIndex, QObject, Qt, QVariant, pyqtProperty, pyqtSignal, pyqtSlot) from ..hub import Hub, Message class PlotDataModel(QAbstractTableModel): # DataRole = Qt.UserRole + 1 def __init__(self, *args, **kwargs): ...
31.404762
72
0.611069
import numpy as np from PyQt5.QtCore import (QAbstractTableModel, QModelIndex, QObject, Qt, QVariant, pyqtProperty, pyqtSignal, pyqtSlot) from ..hub import Hub, Message class PlotDataModel(QAbstractTableModel): def __init__(self, *args, **kwargs): super(PlotDataModel, self...
true
true
f70e0713db5be0d8102c99abc4e445c892d286d5
19,283
py
Python
Pre_Production/Midi_Pre_Processor.py
EricCacciavillani/LyreBird
858657faef39d1adcba19ff0213210ba490b4afa
[ "MIT" ]
1
2019-05-04T02:34:20.000Z
2019-05-04T02:34:20.000Z
Pre_Production/Midi_Pre_Processor.py
EricCacciavillani/LyreBird
858657faef39d1adcba19ff0213210ba490b4afa
[ "MIT" ]
null
null
null
Pre_Production/Midi_Pre_Processor.py
EricCacciavillani/LyreBird
858657faef39d1adcba19ff0213210ba490b4afa
[ "MIT" ]
1
2019-04-04T19:14:09.000Z
2019-04-04T19:14:09.000Z
import pretty_midi import glob import os import copy from collections import Counter from multiprocessing.dummy import Pool as ThreadPool from tqdm import tqdm # Import shared files import sys sys.path.append('..') from Shared_Files.Global_Util import * from Shared_Files.Constants import * import warnings warnings.f...
38.798793
114
0.58995
import pretty_midi import glob import os import copy from collections import Counter from multiprocessing.dummy import Pool as ThreadPool from tqdm import tqdm import sys sys.path.append('..') from Shared_Files.Global_Util import * from Shared_Files.Constants import * import warnings warnings.filterwarnings("ignore...
true
true
f70e07c2c6875cd51efabd172d924854be736523
4,145
py
Python
openstack-cyborg-2.0.0/cyborg/tests/unit/objects/test_device.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
openstack-cyborg-2.0.0/cyborg/tests/unit/objects/test_device.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
openstack-cyborg-2.0.0/cyborg/tests/unit/objects/test_device.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2019 Intel, 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...
45.549451
78
0.61158
import mock from cyborg import objects from cyborg.tests.unit.db import base from cyborg.tests.unit.db import utils class TestDeviceObject(base.DbTestCase): def setUp(self): super(TestDeviceObject, self).setUp() self.fake_device = utils.get_test_device() def test_get(self): ...
true
true
f70e088bf84c45c11008a30e7afba1fe2d2c87f3
1,610
py
Python
proxymanager.py
PrototypeSapien/OWExcelsiorRaffle
a5e38a0060e2c665fee66e695575ae1503bece6c
[ "MIT" ]
2
2018-03-06T22:51:06.000Z
2018-03-14T12:13:17.000Z
proxymanager.py
PrototypeSapien/OWExcelsiorRaffle
a5e38a0060e2c665fee66e695575ae1503bece6c
[ "MIT" ]
null
null
null
proxymanager.py
PrototypeSapien/OWExcelsiorRaffle
a5e38a0060e2c665fee66e695575ae1503bece6c
[ "MIT" ]
1
2018-06-25T09:44:57.000Z
2018-06-25T09:44:57.000Z
from utils import* from random import* formattedProxies = [] def chooseProxy(tasknum): if tasknum + 1 <= len(proxieslines): proxy = proxieslines[tasknum].rstrip() if tasknum + 1 > len(proxieslines): if len(proxieslines) > 1: a = randint(1, len(proxieslines) - 1) if len(proxieslines) == 1: a = 0 proxy...
28.245614
83
0.665217
from utils import* from random import* formattedProxies = [] def chooseProxy(tasknum): if tasknum + 1 <= len(proxieslines): proxy = proxieslines[tasknum].rstrip() if tasknum + 1 > len(proxieslines): if len(proxieslines) > 1: a = randint(1, len(proxieslines) - 1) if len(proxieslines) == 1: a = 0 proxy...
true
true
f70e090bb5b01942713149493e48bc0e51f7f74b
5,620
py
Python
youtube_dl/extractor/ceskatelevize.py
Logmytech/youtube-dl-QT
1497297719a95c4f70fbfa32e0fa4e38cdd475dc
[ "MIT" ]
1
2015-02-19T13:13:47.000Z
2015-02-19T13:13:47.000Z
youtube_dl/extractor/ceskatelevize.py
Logmytech/youtube-dl-QT
1497297719a95c4f70fbfa32e0fa4e38cdd475dc
[ "MIT" ]
2
2019-05-20T12:46:30.000Z
2020-11-07T12:50:32.000Z
youtube_dl/extractor/ceskatelevize.py
Logmytech/youtube-dl-QT
1497297719a95c4f70fbfa32e0fa4e38cdd475dc
[ "MIT" ]
5
2020-10-25T09:18:58.000Z
2021-05-23T22:57:55.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .subtitles import SubtitlesInfoExtractor from ..compat import ( compat_urllib_request, compat_urllib_parse, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, ) class CeskaTelevizeIE(...
36.025641
125
0.561922
from __future__ import unicode_literals import re from .subtitles import SubtitlesInfoExtractor from ..compat import ( compat_urllib_request, compat_urllib_parse, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, ) class CeskaTelevizeIE(SubtitlesInfoExtractor)...
true
true
f70e090e5514cb7ff3f6119ea53ce414c57ac954
2,467
py
Python
profile_generator/feature/colors/hsl/schema.py
nethy/profile-generator
9bc54bed36b84b45902d75a273739480b4ff2204
[ "MIT" ]
null
null
null
profile_generator/feature/colors/hsl/schema.py
nethy/profile-generator
9bc54bed36b84b45902d75a273739480b4ff2204
[ "MIT" ]
null
null
null
profile_generator/feature/colors/hsl/schema.py
nethy/profile-generator
9bc54bed36b84b45902d75a273739480b4ff2204
[ "MIT" ]
null
null
null
from collections.abc import Iterable, Mapping from typing import Any from profile_generator.feature.colors.white_balance.schema import DEFAULT from profile_generator.model.view import raw_therapee from profile_generator.model.view.raw_therapee import EqPoint, LinearEqPoint from profile_generator.schema import object_o...
26.244681
86
0.660722
from collections.abc import Iterable, Mapping from typing import Any from profile_generator.feature.colors.white_balance.schema import DEFAULT from profile_generator.model.view import raw_therapee from profile_generator.model.view.raw_therapee import EqPoint, LinearEqPoint from profile_generator.schema import object_o...
true
true
f70e099b3406c30522f6b90e2609a838fa6f001d
1,675
py
Python
leetcode/solutions/fibonacci_number/matrix_exponentiation_solution_full_implementation.py
ShreckYe/Python-learning-Chinese
cfe4ab8fe5e2d68486ddef0b028979aa5cfab69a
[ "Apache-2.0" ]
6
2018-09-22T12:45:55.000Z
2019-10-08T15:32:25.000Z
leetcode/solutions/fibonacci_number/matrix_exponentiation_solution_full_implementation.py
ShreckYe/Python-learning-Chinese
cfe4ab8fe5e2d68486ddef0b028979aa5cfab69a
[ "Apache-2.0" ]
null
null
null
leetcode/solutions/fibonacci_number/matrix_exponentiation_solution_full_implementation.py
ShreckYe/Python-learning-Chinese
cfe4ab8fe5e2d68486ddef0b028979aa5cfab69a
[ "Apache-2.0" ]
2
2018-09-23T13:12:08.000Z
2018-09-26T15:31:12.000Z
""" Author: Shreck Ye Date: June 16, 2019 Time complexity: O(log(N)) Let's think in the mathematical way. Obviously, the recursion formula represents a linear relationship. By viewing it as a recursion formula of a single vector F_n = (f_n, f_{n + 1})' with a transition matrix M = (0, 1; 1, 1), which is (f_{n + 1}, f_...
23.928571
122
0.549254
import copy F_0 = [[0], [1]] M = [[0, 1], [1, 1]] def zero_matrix(m: int, n: int): rows = [None] * m row = [0] * n for i in range(m): rows[i] = copy.deepcopy(row) return rows def matmul(A, B): m = len(A) n = len(B) l = len(B[0]) C = zero_matrix(m, l) for i in range(...
true
true
f70e0a4dc109f4ca82947753b5013560250dda43
623
py
Python
data/stacks_data.py
NimaAIMLDL/segmentation-app
3e13078cbc211f4e1ae915e034825d16edfb2e35
[ "MIT" ]
2
2021-05-14T03:47:47.000Z
2021-05-14T03:48:10.000Z
data/stacks_data.py
NimaAIMLDL/segmentation-app
3e13078cbc211f4e1ae915e034825d16edfb2e35
[ "MIT" ]
null
null
null
data/stacks_data.py
NimaAIMLDL/segmentation-app
3e13078cbc211f4e1ae915e034825d16edfb2e35
[ "MIT" ]
null
null
null
stacks_data = [ { 'name': 'Python', 'image': '../assets/images/python.png' }, { 'name': 'Plotly', 'image': '../assets/images/plotly.png' }, { 'name': 'Dash', 'image': '../assets/images/dash.png' }, { 'name': 'Pandas', 'image': '...
20.096774
50
0.428571
stacks_data = [ { 'name': 'Python', 'image': '../assets/images/python.png' }, { 'name': 'Plotly', 'image': '../assets/images/plotly.png' }, { 'name': 'Dash', 'image': '../assets/images/dash.png' }, { 'name': 'Pandas', 'image': '...
true
true
f70e0b2708b01792a275ee48480039747794c660
3,377
py
Python
predict_functions.py
xXEminenTXx/ImageClassifier
e0e63e12108b523270ea7d615afcbfc696b07996
[ "MIT" ]
null
null
null
predict_functions.py
xXEminenTXx/ImageClassifier
e0e63e12108b523270ea7d615afcbfc696b07996
[ "MIT" ]
null
null
null
predict_functions.py
xXEminenTXx/ImageClassifier
e0e63e12108b523270ea7d615afcbfc696b07996
[ "MIT" ]
null
null
null
# python imports import numpy as np from PIL import Image import torch from torch import nn, optim import torch.nn.functional as F from torchvision import datasets, transforms, models from collections import OrderedDict from sys import exit # File containing all of the functions used in the predict program def load_ch...
30.423423
127
0.695292
import numpy as np from PIL import Image import torch from torch import nn, optim import torch.nn.functional as F from torchvision import datasets, transforms, models from collections import OrderedDict from sys import exit def load_checkpoint(filepath): checkpoint = torch.load(filepath) if checkpoint[...
true
true
f70e0c021691a186693b392f6dbb09438fae2140
6,212
py
Python
app/market/models/player_transaction.py
zanielyene/krabacus3
de985874b4034b13564cfd4af5e58e312fe5d438
[ "MIT" ]
2
2020-01-24T14:15:04.000Z
2020-04-10T21:49:18.000Z
app/market/models/player_transaction.py
zanielyene/krabacus3
de985874b4034b13564cfd4af5e58e312fe5d438
[ "MIT" ]
3
2020-02-12T00:31:59.000Z
2021-06-10T21:33:49.000Z
app/market/models/player_transaction.py
zanielyene/krabacus3
de985874b4034b13564cfd4af5e58e312fe5d438
[ "MIT" ]
3
2020-01-04T19:02:34.000Z
2020-09-13T20:42:43.000Z
import logging from django.contrib.auth.models import User from django.db import models, transaction from django.db.models import Q from django.utils import timezone from eve_api.models import Structure, EVEPlayerCharacter, ObjectType from dataclasses import dataclass from django.apps import apps from django.core.cache...
36.116279
133
0.651642
import logging from django.contrib.auth.models import User from django.db import models, transaction from django.db.models import Q from django.utils import timezone from eve_api.models import Structure, EVEPlayerCharacter, ObjectType from dataclasses import dataclass from django.apps import apps from django.core.cache...
true
true
f70e0d63198c55093b63b35c874d4605ea1b15a0
9,296
py
Python
nova/tests/api/openstack/compute/plugins/v3/test_instance_usage_audit_log.py
bopopescu/nova-34
b037993984229bb698050f20e8719b8c06ff2be3
[ "Apache-2.0" ]
null
null
null
nova/tests/api/openstack/compute/plugins/v3/test_instance_usage_audit_log.py
bopopescu/nova-34
b037993984229bb698050f20e8719b8c06ff2be3
[ "Apache-2.0" ]
null
null
null
nova/tests/api/openstack/compute/plugins/v3/test_instance_usage_audit_log.py
bopopescu/nova-34
b037993984229bb698050f20e8719b8c06ff2be3
[ "Apache-2.0" ]
1
2020-07-24T08:52:14.000Z
2020-07-24T08:52:14.000Z
# Copyright (c) 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 ...
42.254545
78
0.656734
import datetime from webob import exc from nova.api.openstack.compute.plugins.v3 import \ instance_usage_audit_log as ial from nova import context from nova import db from nova.openstack.common import timeutils from nova import test from nova.tests.api.openstack import fakes from nova.tests.objects ...
true
true
f70e0dc1141a75b9b7795fbc60c21ab2fd20b738
1,350
py
Python
tests/kyu_6_tests/test_regexp_basics_is_it_ipv4_address.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
tests/kyu_6_tests/test_regexp_basics_is_it_ipv4_address.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
tests/kyu_6_tests/test_regexp_basics_is_it_ipv4_address.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
import unittest from katas.kyu_6.regexp_basics_is_it_ipv4_address import ipv4_address class IPV4AddressTestCase(unittest.TestCase): def test_true(self): self.assertTrue(ipv4_address('127.0.0.1')) def test_true_2(self): self.assertTrue(ipv4_address('0.0.0.0')) def test_true_3(self): ...
26.470588
69
0.663704
import unittest from katas.kyu_6.regexp_basics_is_it_ipv4_address import ipv4_address class IPV4AddressTestCase(unittest.TestCase): def test_true(self): self.assertTrue(ipv4_address('127.0.0.1')) def test_true_2(self): self.assertTrue(ipv4_address('0.0.0.0')) def test_true_3(self): ...
true
true
f70e0e628ae3abaeb2a0154852fecbc787501f2a
1,410
py
Python
xebec/tests/test_validate.py
gibsramen/xebec
89586fb4b6f6d75fb89ca32cfc1bee0d48705067
[ "BSD-3-Clause" ]
1
2022-03-27T04:46:14.000Z
2022-03-27T04:46:14.000Z
xebec/tests/test_validate.py
gibsramen/xebec
89586fb4b6f6d75fb89ca32cfc1bee0d48705067
[ "BSD-3-Clause" ]
null
null
null
xebec/tests/test_validate.py
gibsramen/xebec
89586fb4b6f6d75fb89ca32cfc1bee0d48705067
[ "BSD-3-Clause" ]
null
null
null
import os import pytest from xebec.src import _validate as vd def test_validate_table(data_paths, tmp_path): err_biom = os.path.join(tmp_path, "err.biom") with open(err_biom, "w") as f: f.write("kachow") with pytest.raises(ValueError) as exc_info: vd.validate_table(err_biom) exp_err...
31.333333
69
0.694326
import os import pytest from xebec.src import _validate as vd def test_validate_table(data_paths, tmp_path): err_biom = os.path.join(tmp_path, "err.biom") with open(err_biom, "w") as f: f.write("kachow") with pytest.raises(ValueError) as exc_info: vd.validate_table(err_biom) exp_err...
true
true
f70e0efee06270a4b2d8e5234f64981ceaae676f
2,248
py
Python
model-optimizer/extensions/front/onnx/pad_ext_test.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
2
2020-11-18T14:14:06.000Z
2020-11-28T04:55:57.000Z
model-optimizer/extensions/front/onnx/pad_ext_test.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
30
2020-11-13T11:44:07.000Z
2022-02-21T13:03:16.000Z
model-optimizer/extensions/front/onnx/pad_ext_test.py
mmakridi/openvino
769bb7709597c14debdaa356dd60c5a78bdfa97e
[ "Apache-2.0" ]
1
2020-12-18T15:47:45.000Z
2020-12-18T15:47:45.000Z
""" Copyright (C) 2018-2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
26.447059
73
0.58274
from argparse import Namespace import onnx from extensions.front.onnx.pad_ext import PadFrontExtractor from mo.graph.graph import Graph from mo.utils.unittest.extractors import PB, BaseExtractorsTestingClass class TestPad(BaseExtractorsTestingClass): @staticmethod def _create_node(pads=None, value=None, mod...
true
true
f70e0effde4c7b7b31c63232faa9299912fb117a
8,791
py
Python
frappe/tests/test_global_search.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/tests/test_global_search.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/tests/test_global_search.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest import frappe import frappe.utils from frappe.desk.page.setup_wizard.install_fixtures import update_global_search_doctypes from frappe.test_runner import make_te...
40.511521
144
0.723695
from __future__ import unicode_literals import unittest import frappe import frappe.utils from frappe.desk.page.setup_wizard.install_fixtures import update_global_search_doctypes from frappe.test_runner import make_test_objects from frappe.utils import global_search class TestGlobalSearch(unittest.TestCase): de...
true
true
f70e0f126b8a9c0eb3c7c60d2741aac4f327bb36
16,294
py
Python
Server/server.py
Rsky-20/Security-Message-Communication
b34d7a3e1ab54f7bed07c9974f7e1a5c4fc7e75c
[ "MIT" ]
null
null
null
Server/server.py
Rsky-20/Security-Message-Communication
b34d7a3e1ab54f7bed07c9974f7e1a5c4fc7e75c
[ "MIT" ]
null
null
null
Server/server.py
Rsky-20/Security-Message-Communication
b34d7a3e1ab54f7bed07c9974f7e1a5c4fc7e75c
[ "MIT" ]
null
null
null
#!/bin/python3 -*- coding: utf-8 -*- """ @Author : Jessy JOSE -- Pierre VAUDRY IPSA Aero1 - Prim2 Release date: 09/12/2020 [other information] Licence: MIT [Description] SMC is a security message communication. This program is the part of server program. The server uses the socket module to work. T...
39.936275
266
0.444213
import datetime import select import socket import os import platform HOST = '127.0.0.1' PORT = 50100 client_connected = [] server_data = { 'count': 0 } # ------------------------------------------------Functions & process------------------------------------------------- # def Clean(): if platfo...
true
true
f70e113091c422b2268db0b5f5723c811cca94c5
4,901
py
Python
sample_project/sample_project/settings.py
MagicSolutions/django-admin-sortable
344927a393262aecf700b830b487430030cffdb2
[ "Naumen", "Condor-1.1", "Apache-1.1", "MS-PL" ]
null
null
null
sample_project/sample_project/settings.py
MagicSolutions/django-admin-sortable
344927a393262aecf700b830b487430030cffdb2
[ "Naumen", "Condor-1.1", "Apache-1.1", "MS-PL" ]
null
null
null
sample_project/sample_project/settings.py
MagicSolutions/django-admin-sortable
344927a393262aecf700b830b487430030cffdb2
[ "Naumen", "Condor-1.1", "Apache-1.1", "MS-PL" ]
null
null
null
# Django settings for test_project project. import os def map_path(directory_name): return os.path.join(os.path.dirname(__file__), '../' + directory_name).replace('\\', '/') DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = {...
30.440994
79
0.697409
import os def map_path(directory_name): return os.path.join(os.path.dirname(__file__), '../' + directory_name).replace('\\', '/') DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': map...
true
true
f70e115700aac8a6e74283f4cc0b46ff65daf283
1,576
py
Python
simstring/measure/overlap.py
icfly2/simstring-1
e4a57603967c5d138ce021cedc09d509f75e1933
[ "MIT" ]
null
null
null
simstring/measure/overlap.py
icfly2/simstring-1
e4a57603967c5d138ce021cedc09d509f75e1933
[ "MIT" ]
null
null
null
simstring/measure/overlap.py
icfly2/simstring-1
e4a57603967c5d138ce021cedc09d509f75e1933
[ "MIT" ]
null
null
null
import math from typing import Iterable from .base import BaseMeasure class OverlapMeasure(BaseMeasure): def __init__(self, db=None, maxsize: int = 100) -> None: super().__init__() if db: self.maxsize = db.max_feature_size() else: self.maxsize = maxsize def min...
30.901961
70
0.626269
import math from typing import Iterable from .base import BaseMeasure class OverlapMeasure(BaseMeasure): def __init__(self, db=None, maxsize: int = 100) -> None: super().__init__() if db: self.maxsize = db.max_feature_size() else: self.maxsize = maxsize def min...
true
true
f70e11851218fffbf03f0ed4b78743ce5833fc4a
1,410
py
Python
webapi/utils/dependencies.py
xqhgit/fastapi-vue-blog
4f90869c4b8078205239be38d79ac9be6dcb56b8
[ "MIT" ]
3
2022-03-10T08:43:24.000Z
2022-03-26T09:10:29.000Z
webapi/utils/dependencies.py
xqhgit/fastapi-vue-blog
4f90869c4b8078205239be38d79ac9be6dcb56b8
[ "MIT" ]
null
null
null
webapi/utils/dependencies.py
xqhgit/fastapi-vue-blog
4f90869c4b8078205239be38d79ac9be6dcb56b8
[ "MIT" ]
2
2022-03-11T03:14:38.000Z
2022-03-19T07:27:56.000Z
from fastapi import Depends, HTTPException, status, Header from fastapi.security import OAuth2PasswordBearer from pydantic import ValidationError from jose import jwt from webapi.db.config import async_session from webapi.db import models, schemas from webapi.db.dals.user_dal import UserDAL from webapi.setting import ...
30
89
0.711348
from fastapi import Depends, HTTPException, status, Header from fastapi.security import OAuth2PasswordBearer from pydantic import ValidationError from jose import jwt from webapi.db.config import async_session from webapi.db import models, schemas from webapi.db.dals.user_dal import UserDAL from webapi.setting import ...
true
true
f70e12e552ce2ce286b2c0216cc508629fb98b15
700
py
Python
modules/spaghetti/modules/fingerprints/waf/binarysec.py
GDGSNF/PXXTF
b1e081348c1e993c61213f3fd5f960894ce91d01
[ "MIT" ]
16
2020-10-03T22:01:46.000Z
2021-08-18T16:58:56.000Z
modules/spaghetti/modules/fingerprints/waf/binarysec.py
GDGSNF/PXXTF
b1e081348c1e993c61213f3fd5f960894ce91d01
[ "MIT" ]
1
2021-10-18T00:13:27.000Z
2021-10-18T00:13:31.000Z
modules/spaghetti/modules/fingerprints/waf/binarysec.py
yezz123/PXXTF
b1e081348c1e993c61213f3fd5f960894ce91d01
[ "MIT" ]
5
2020-10-16T11:07:45.000Z
2021-05-19T23:49:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Spaghetti: Web Application Security Scanner # # @url: https://github.com/m4ll0k/Spaghetti # @author: Momo Outaadi (M4ll0k) # @license: See the file 'doc/LICENSE' import re class Binarysec(): @staticmethod def Run(headers): _ = False try: ...
29.166667
84
0.562857
import re class Binarysec(): @staticmethod def Run(headers): _ = False try: for item in list(headers.items()): _ = re.search(r'BinarySec',item[1],re.I) is not None _ |= re.search(r'x-binarysec-[via|nocahe]',item[0],re.I) is not None ...
true
true
f70e13d2cf53fe00db7193010563cbf1f5d8167b
870
py
Python
Game/buzzer.py
tjddus0403/osscap2020
642691e8e30bbf14ec6acd177da1ad58456c3a4c
[ "Apache-2.0" ]
1
2020-10-07T12:49:33.000Z
2020-10-07T12:49:33.000Z
Game/buzzer.py
tjddus0403/osscap2020
642691e8e30bbf14ec6acd177da1ad58456c3a4c
[ "Apache-2.0" ]
9
2020-10-09T08:58:09.000Z
2020-11-30T12:21:14.000Z
Game/buzzer.py
tjddus0403/osscap2020
642691e8e30bbf14ec6acd177da1ad58456c3a4c
[ "Apache-2.0" ]
3
2020-10-07T12:49:35.000Z
2020-10-11T12:53:39.000Z
import RPi.GPIO as GPIO import time #0 #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #list=[261.6256|,293.6648|,329.6276|,349.2282|,391.9954|,440|,493.8833|,523.2511|,587.3295|,659.2551|,698.4565|,783.9909|,880|,987.7666] #num=[2,...
33.461538
137
0.554023
import RPi.GPIO as GPIO import time
true
true
f70e14360cedd17b4c21de3c4422f52574d413fc
1,610
py
Python
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_featurestore_service_delete_feature_sync.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
1
2022-03-30T05:23:29.000Z
2022-03-30T05:23:29.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_featurestore_service_delete_feature_sync.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_featurestore_service_delete_feature_sync.py
sakagarwal/python-aiplatform
62b4a1ea589235910c6e87f027899a29bf1bacb1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
32.2
88
0.765217
from google.cloud import aiplatform_v1beta1 def sample_delete_feature(): client = aiplatform_v1beta1.FeaturestoreServiceClient() request = aiplatform_v1beta1.DeleteFeatureRequest( name="name_value", ) operation = client.delete_feature(request=request)...
true
true
f70e15283262a46e09c68cb2d40a91404d0eed3e
4,016
py
Python
request-management-api/request_api/auth.py
bcgov/foi-flow
7f9897b3aad4ba91fbc8edcb8f526906efb490df
[ "Apache-2.0" ]
null
null
null
request-management-api/request_api/auth.py
bcgov/foi-flow
7f9897b3aad4ba91fbc8edcb8f526906efb490df
[ "Apache-2.0" ]
1,579
2021-04-14T18:27:45.000Z
2022-03-31T23:49:42.000Z
request-management-api/request_api/auth.py
bcgov/foi-flow
7f9897b3aad4ba91fbc8edcb8f526906efb490df
[ "Apache-2.0" ]
1
2022-03-01T20:17:47.000Z
2022-03-01T20:17:47.000Z
# Copyright © 2021 Province of British Columbia # # 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 agr...
36.844037
130
0.638695
from functools import wraps from http import HTTPStatus from flask import g, request from flask_jwt_oidc import JwtManager from jose import jwt as josejwt jwt = ( JwtManager() ) class Auth: @classmethod def require(cls, f): @jwt.requires_auth @wraps(f) def decora...
true
true
f70e18ddde7bd3b85a45ecc3dfcfaf53de0acc59
22,404
py
Python
tools/memap.py
matthewelse/mbed-os
dce72d52fbb106eac148e00cbc20e03259c40425
[ "Apache-2.0" ]
null
null
null
tools/memap.py
matthewelse/mbed-os
dce72d52fbb106eac148e00cbc20e03259c40425
[ "Apache-2.0" ]
null
null
null
tools/memap.py
matthewelse/mbed-os
dce72d52fbb106eac148e00cbc20e03259c40425
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Memory Map File Analyser for ARM mbed""" import sys import os import re import csv import json import argparse from prettytable import PrettyTable from tools.utils import argparse_filestring_type, \ argparse_lowercase_hyphen_type, argparse_uppercase_type DEBUG = False RE_ARMCC = re.comp...
34.20458
152
0.535262
"""Memory Map File Analyser for ARM mbed""" import sys import os import re import csv import json import argparse from prettytable import PrettyTable from tools.utils import argparse_filestring_type, \ argparse_lowercase_hyphen_type, argparse_uppercase_type DEBUG = False RE_ARMCC = re.compile( r'^\s+0x(\w{...
false
true
f70e1935ab2f3c77a77c5a5dae326c3b14cd1e1d
953
py
Python
python/src/weichat/test/catch_message.py
weiwei02/Technical--Documentation
d53d702b17cbeb9e4940764c6e4a4277382ec0cf
[ "Apache-2.0" ]
2
2017-06-25T13:30:40.000Z
2017-09-18T16:50:40.000Z
python/src/weichat/test/catch_message.py
weiwei02/Technical--Documentation
d53d702b17cbeb9e4940764c6e4a4277382ec0cf
[ "Apache-2.0" ]
null
null
null
python/src/weichat/test/catch_message.py
weiwei02/Technical--Documentation
d53d702b17cbeb9e4940764c6e4a4277382ec0cf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ 1. 实现微信消息的抓取 :author Wang Weiwei <email>weiwei02@vip.qq.com / weiwei.wang@100credit.com</email> :sine 2017/8/11 :version 1.0 """ import itchat,time import queue import _thread XIAOBING_ID = 'xiaoice-ms' msgQueue = queue.Queue(maxsize=100) @itchat.msg_register(itchat.conte...
22.690476
87
0.713536
import itchat,time import queue import _thread XIAOBING_ID = 'xiaoice-ms' msgQueue = queue.Queue(maxsize=100) @itchat.msg_register(itchat.content.TEXT, isMpChat=True) def print_content(msg): if msg["FromUserName"] == XIAOBING_ID: msgQueue.put(msg["Text"]) print("公众号消息", msg["Text"]) @itchat.msg_r...
true
true
f70e1c7958eb5a1da8353fd4c92b1dd3852bdb9a
7,537
py
Python
xarray/tests/test_distributed.py
snowman2/xarray
d47cf0c850cb70429373782b3c1e0329d14fd05a
[ "Apache-2.0" ]
null
null
null
xarray/tests/test_distributed.py
snowman2/xarray
d47cf0c850cb70429373782b3c1e0329d14fd05a
[ "Apache-2.0" ]
null
null
null
xarray/tests/test_distributed.py
snowman2/xarray
d47cf0c850cb70429373782b3c1e0329d14fd05a
[ "Apache-2.0" ]
null
null
null
""" isort:skip_file """ import pickle import pytest dask = pytest.importorskip("dask") # isort:skip distributed = pytest.importorskip("distributed") # isort:skip from dask.distributed import Client, Lock from distributed.utils_test import cluster, gen_cluster from distributed.utils_test import loop from distribute...
31.144628
87
0.63646
import pickle import pytest dask = pytest.importorskip("dask") distributed = pytest.importorskip("distributed") from dask.distributed import Client, Lock from distributed.utils_test import cluster, gen_cluster from distributed.utils_test import loop from distributed.client import futures_of import xarray as xr ...
true
true
f70e1d37c5742828f7d32c361be3599316abc4b4
4,068
py
Python
mkrel.py
CDrummond/lms-volumecheck
d945705a5570656d9e33b65da026a19da2e6d596
[ "MIT" ]
1
2020-09-06T16:03:11.000Z
2020-09-06T16:03:11.000Z
mkrel.py
CDrummond/lms-volumecheck
d945705a5570656d9e33b65da026a19da2e6d596
[ "MIT" ]
null
null
null
mkrel.py
CDrummond/lms-volumecheck
d945705a5570656d9e33b65da026a19da2e6d596
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # LMS-AutoPlay # # Copyright (c) 2020 Craig Drummond <craig.p.drummond@gmail.com> # MIT license. # import hashlib import os import re import requests import shutil import sys REPO_XML = "repo.xml" PLUGIN_NAME = "VolumeCheck" PLUGIN_GIT_NAME = "lms-volumecheck" def info(s): print("INFO:...
25.111111
130
0.598328
import hashlib import os import re import requests import shutil import sys REPO_XML = "repo.xml" PLUGIN_NAME = "VolumeCheck" PLUGIN_GIT_NAME = "lms-volumecheck" def info(s): print("INFO: %s" %s) def error(s): print("ERROR: %s" % s) exit(-1) def usage(): print("Usage: %s <major>.<minor>....
true
true
f70e1d838b73f282995fc08cafd08c13943feeab
10,957
py
Python
conan_inquiry/transformers/github.py
jsdelivrbot/conan_inquiry-1
f218012b02db0fc2abf5e95e2be4a72113b7d820
[ "MIT" ]
11
2017-11-14T17:21:51.000Z
2021-04-03T13:09:56.000Z
conan_inquiry/transformers/github.py
jsdelivrbot/conan_inquiry-1
f218012b02db0fc2abf5e95e2be4a72113b7d820
[ "MIT" ]
7
2018-03-31T12:22:07.000Z
2019-12-02T02:25:04.000Z
conan_inquiry/transformers/github.py
jsdelivrbot/conan_inquiry-1
f218012b02db0fc2abf5e95e2be4a72113b7d820
[ "MIT" ]
2
2018-07-30T06:09:34.000Z
2018-12-07T18:37:49.000Z
import json import os from base64 import b64decode from datetime import timedelta from threading import Semaphore import github from dotmap import DotMap from github import GithubException from conan_inquiry.transformers.base import BaseGithubTransformer from conan_inquiry.util.general import render_readme from conan...
49.355856
120
0.446381
import json import os from base64 import b64decode from datetime import timedelta from threading import Semaphore import github from dotmap import DotMap from github import GithubException from conan_inquiry.transformers.base import BaseGithubTransformer from conan_inquiry.util.general import render_readme from conan...
true
true
f70e1e3962bb07e74eb6aa882f579281c65d1686
1,179
py
Python
sdk/python/pulumi_azure_nextgen/appconfiguration/v20191001/__init__.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/appconfiguration/v20191001/__init__.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/appconfiguration/v20191001/__init__.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# 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! *** # Export this package's modules as members: from ._enums import * from .configuration_store import * from .get_configuration_store import * from .list_...
32.75
108
0.709075
# Export this package's modules as members: from ._enums import * from .configuration_store import * from .get_configuration_store import * from .list_configuration_store_key_value import * from .list_configuration_store_keys import * from ._inputs import * from . import outputs def _register_module(): import ...
true
true
f70e1ee3749cfb451aaed3f6eeb68e36db20480f
918
py
Python
inventory/urls.py
dentonya/python-django-sales-inventory-project
d0fcdf81136908a022e0f4eeca94fc0357473635
[ "Apache-2.0" ]
1
2021-10-18T09:27:03.000Z
2021-10-18T09:27:03.000Z
inventory/urls.py
dentonya/python-django-sales-inventory-project
d0fcdf81136908a022e0f4eeca94fc0357473635
[ "Apache-2.0" ]
1
2021-08-04T20:11:28.000Z
2021-08-04T20:11:28.000Z
inventory/urls.py
dentonya/python-django-sales-inventory-project
d0fcdf81136908a022e0f4eeca94fc0357473635
[ "Apache-2.0" ]
null
null
null
"""inventory URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
35.307692
77
0.697168
from django.contrib import admin from django.urls import path, include from .views import dashboard urlpatterns = [ path('admin/', admin.site.urls), path('', dashboard, name='dashboard'), path('users/', include('users.urls')), path('store/', include('store.urls')), ]
true
true
f70e1eec634ed0c89cd786687c6b726187e816d5
11,426
py
Python
src/train.py
Gordonbuck/ml-oov-we
ce28cd8b556a16125ba36cd41781a3e60bb26422
[ "MIT" ]
null
null
null
src/train.py
Gordonbuck/ml-oov-we
ce28cd8b556a16125ba36cd41781a3e60bb26422
[ "MIT" ]
null
null
null
src/train.py
Gordonbuck/ml-oov-we
ce28cd8b556a16125ba36cd41781a3e60bb26422
[ "MIT" ]
null
null
null
import higher from leap import Leap import numpy as np import os import torch import torch.nn as nn import gc def train(model, source_corpus, char2idx, args, device): model = model.to(device) optimizer = torch.optim.Adam(model.parameters(), lr=args.lr_init) lr_scheduler = torch.optim.lr_scheduler.ReduceLR...
52.412844
120
0.591896
import higher from leap import Leap import numpy as np import os import torch import torch.nn as nn import gc def train(model, source_corpus, char2idx, args, device): model = model.to(device) optimizer = torch.optim.Adam(model.parameters(), lr=args.lr_init) lr_scheduler = torch.optim.lr_scheduler.ReduceLR...
true
true
f70e1f1f5c53199c00231881a0ed05b757d4ed44
15,360
py
Python
p2p/connection.py
g-r-a-n-t/trinity
f108b6cd34ed9aabfcf9e235badd91597650ecd5
[ "MIT" ]
null
null
null
p2p/connection.py
g-r-a-n-t/trinity
f108b6cd34ed9aabfcf9e235badd91597650ecd5
[ "MIT" ]
null
null
null
p2p/connection.py
g-r-a-n-t/trinity
f108b6cd34ed9aabfcf9e235badd91597650ecd5
[ "MIT" ]
null
null
null
import asyncio import collections import contextlib import functools from typing import ( Any, DefaultDict, Dict, List, Sequence, Set, Tuple, Type, TYPE_CHECKING, Union, ) from async_service import Service from async_service.asyncio import cleanup_tasks from cached_property imp...
37.832512
100
0.641667
import asyncio import collections import contextlib import functools from typing import ( Any, DefaultDict, Dict, List, Sequence, Set, Tuple, Type, TYPE_CHECKING, Union, ) from async_service import Service from async_service.asyncio import cleanup_tasks from cached_property imp...
true
true
f70e20602d9329f0b785241b32a1ae744bf6d702
119
py
Python
number reverser.py
Jayapraveen34/crazy-lover
be5bd897c40c31b3e5e6eafe3b6436cb3d888efe
[ "BSD-2-Clause" ]
null
null
null
number reverser.py
Jayapraveen34/crazy-lover
be5bd897c40c31b3e5e6eafe3b6436cb3d888efe
[ "BSD-2-Clause" ]
null
null
null
number reverser.py
Jayapraveen34/crazy-lover
be5bd897c40c31b3e5e6eafe3b6436cb3d888efe
[ "BSD-2-Clause" ]
null
null
null
a = str(input('Enter the number you want to reverse:')) b = (a[::-1]) c = int(b) print('the reversed number is',c)
23.8
56
0.605042
a = str(input('Enter the number you want to reverse:')) b = (a[::-1]) c = int(b) print('the reversed number is',c)
true
true
f70e21c7bb225db44fe1393e288a00a2a5f19261
8,936
py
Python
src/pretix/api/serializers/cart.py
rstrblstr/pretix
a4827fc992bae308e19a295e150998d9f8c17413
[ "Apache-2.0" ]
1,248
2015-04-24T13:32:06.000Z
2022-03-29T07:01:36.000Z
src/pretix/api/serializers/cart.py
rstrblstr/pretix
a4827fc992bae308e19a295e150998d9f8c17413
[ "Apache-2.0" ]
2,113
2015-02-18T18:58:16.000Z
2022-03-31T11:12:32.000Z
src/pretix/api/serializers/cart.py
thegcat/pretix
451d3fce0575d85a0ea93fd64aa0631feaced967
[ "Apache-2.0" ]
453
2015-05-13T09:29:06.000Z
2022-03-24T13:39:16.000Z
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
45.360406
129
0.620859
import os from datetime import timedelta from django.core.files import File from django.utils.crypto import get_random_string from django.utils.timezone import now from django.utils.translation import gettext_lazy from rest_framework import serializers from rest_framework.exceptions import Validat...
true
true
f70e21eca2bbf4b33918b8515ca1203bbabbafc7
1,515
py
Python
zoo/analytics/migrations/0008_auto_20180907_1348.py
uliana291/the-zoo
a15a4162c39553abe91224f4feff5d3b66f9413e
[ "MIT" ]
null
null
null
zoo/analytics/migrations/0008_auto_20180907_1348.py
uliana291/the-zoo
a15a4162c39553abe91224f4feff5d3b66f9413e
[ "MIT" ]
null
null
null
zoo/analytics/migrations/0008_auto_20180907_1348.py
uliana291/the-zoo
a15a4162c39553abe91224f4feff5d3b66f9413e
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2018-09-07 13:48 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [("analytics", "0007_dependencyusage_version")] operations = [ migrations.AddField( ...
31.5625
74
0.593399
from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [("analytics", "0007_dependencyusage_version")] operations = [ migrations.AddField( model_name="dependency", name="ti...
true
true
f70e220a1292f15b8385e165c8d12e90fe7821bc
4,796
py
Python
pygobo/__main__.py
alexmilowski/pygodo
1b47dfc03747899919a415cc491e0eaae65d0cc5
[ "MIT" ]
2
2020-05-22T21:27:10.000Z
2022-03-27T09:56:27.000Z
venv/Lib/site-packages/pygobo/__main__.py
DoesArt-Studios/RamBrowse
a81da53e04d265d17e76855e7affc11130ee6120
[ "MIT" ]
1
2021-06-27T09:45:27.000Z
2021-06-27T09:45:27.000Z
venv/Lib/site-packages/pygobo/__main__.py
DoesArt-Studios/RamBrowse
a81da53e04d265d17e76855e7affc11130ee6120
[ "MIT" ]
1
2021-06-26T09:59:02.000Z
2021-06-26T09:59:02.000Z
import argparse import sys import pprint from pygobo import OBOParser, query_generate if __name__ == '__main__': argparser = argparse.ArgumentParser(description='Article importer') argparser.add_argument('--host',help='Redis host',default='0.0.0.0') argparser.add_argument('--port',help='Redis port',type=int...
42.070175
137
0.538365
import argparse import sys import pprint from pygobo import OBOParser, query_generate if __name__ == '__main__': argparser = argparse.ArgumentParser(description='Article importer') argparser.add_argument('--host',help='Redis host',default='0.0.0.0') argparser.add_argument('--port',help='Redis port',type=int...
true
true
f70e227b06c0768f40ed6d950e9fd3ff364bb6b6
2,044
py
Python
Reinforcement-Learning-Trader/Agent.py
krisbuote/Reinforcement-Learning-Trader
ae8c3af0856a480c88546c2a7e478a735585e0af
[ "MIT" ]
2
2018-11-05T19:46:51.000Z
2020-02-13T16:20:57.000Z
Reinforcement-Learning-Trader/Agent.py
krisbuote/Reinforcement-Learning-Trader
ae8c3af0856a480c88546c2a7e478a735585e0af
[ "MIT" ]
null
null
null
Reinforcement-Learning-Trader/Agent.py
krisbuote/Reinforcement-Learning-Trader
ae8c3af0856a480c88546c2a7e478a735585e0af
[ "MIT" ]
1
2018-11-05T19:46:54.000Z
2018-11-05T19:46:54.000Z
import keras from keras.models import Sequential from keras.models import load_model from keras.layers import Dense, LSTM, Dropout from keras.optimizers import Adam import numpy as np import random from collections import deque class Agent: def __init__(self, state_size, is_eval=False, model_name=""): sel...
32.967742
89
0.630626
import keras from keras.models import Sequential from keras.models import load_model from keras.layers import Dense, LSTM, Dropout from keras.optimizers import Adam import numpy as np import random from collections import deque class Agent: def __init__(self, state_size, is_eval=False, model_name=""): sel...
true
true
f70e22950f5d32c9226094224f16d15f331cb3e4
1,816
py
Python
cryptovote/cryptovote/models/authority.py
cryptovoting/cryptovote
b236cf031a8f9dfa5cca54ff45003313275a0fc8
[ "MIT" ]
8
2019-05-14T02:41:34.000Z
2021-11-25T08:07:22.000Z
cryptovote/cryptovote/models/authority.py
cryptovoting/cryptovote
b236cf031a8f9dfa5cca54ff45003313275a0fc8
[ "MIT" ]
null
null
null
cryptovote/cryptovote/models/authority.py
cryptovoting/cryptovote
b236cf031a8f9dfa5cca54ff45003313275a0fc8
[ "MIT" ]
2
2019-05-14T20:20:07.000Z
2021-11-25T08:07:24.000Z
from ..extensions import db from flask_login import UserMixin as FlaskLoginUser from uuid import uuid4 from damgard_jurik import keygen class Authority(db.Model, FlaskLoginUser): """ Implements an Authority class that can be accessed by flask-login and handled by flask-sqlalchemy. Any human has a unique A...
40.355556
77
0.684471
from ..extensions import db from flask_login import UserMixin as FlaskLoginUser from uuid import uuid4 from damgard_jurik import keygen class Authority(db.Model, FlaskLoginUser): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.Text, nullable=False) email = db.Column(db.Text, nullable=Fal...
true
true
f70e231545b9ef51cfc49f28cfce801ae010f1db
21,955
py
Python
tests/_card_render.py
JrGoodle/rich
8a8250c5ae4da57043e9886643e6d9b7feecf4da
[ "MIT" ]
2
2021-07-29T07:25:53.000Z
2021-11-14T15:48:11.000Z
tests/_card_render.py
heavelock/rich
8a8250c5ae4da57043e9886643e6d9b7feecf4da
[ "MIT" ]
null
null
null
tests/_card_render.py
heavelock/rich
8a8250c5ae4da57043e9886643e6d9b7feecf4da
[ "MIT" ]
1
2021-05-21T20:34:41.000Z
2021-05-21T20:34:41.000Z
expected = "\x1b[3m Rich features \x1b[0m\n\x1b[1;31m \x1b[0m \n\x1b[1;31m \x1b[0m\x1b[1;31m Colors \x1b[0m\x1b[1;31m \x1b[0m✓ \x1...
10,977.5
21,954
0.567069
expected = "\x1b[3m Rich features \x1b[0m\n\x1b[1;31m \x1b[0m \n\x1b[1;31m \x1b[0m\x1b[1;31m Colors \x1b[0m\x1b[1;31m \x1b[0m✓ \x1...
true
true
f70e235b5231d04e223b326cbb3a98dddd6fbd67
59
py
Python
auto_argparse/__init__.py
Delrom01/auto-argparse
30e242979407b87bb3d6bc62e57816078642d7fc
[ "MIT" ]
1
2021-10-11T14:43:11.000Z
2021-10-11T14:43:11.000Z
auto_argparse/__init__.py
Delrom01/auto-argparse
30e242979407b87bb3d6bc62e57816078642d7fc
[ "MIT" ]
5
2020-05-15T16:26:57.000Z
2021-01-25T15:47:28.000Z
auto_argparse/__init__.py
Delrom01/auto-argparse
30e242979407b87bb3d6bc62e57816078642d7fc
[ "MIT" ]
null
null
null
from .auto_argparse import make_parser, parse_args_and_run
29.5
58
0.881356
from .auto_argparse import make_parser, parse_args_and_run
true
true
f70e2360f966b6b225b28079c42dbd2f02ff9bfa
20,493
py
Python
third_party/mlir/utils/spirv/gen_spirv_dialect.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
third_party/mlir/utils/spirv/gen_spirv_dialect.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
third_party/mlir/utils/spirv/gen_spirv_dialect.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2019 The MLIR 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 #...
33.213938
139
0.63246
import re import requests import textwrap SPIRV_HTML_SPEC_URL = 'https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html' SPIRV_JSON_SPEC_URL = 'https://raw.githubusercontent.com/KhronosGroup/SPIRV-Headers/master/include/spirv/unified1/spirv.core.grammar.json' AUTOGEN_O...
true
true
f70e2365adc065b933c5f54d699042c9f42bc30c
641
py
Python
clean.py
amraboelela/ertugrul
00491d002b7a8989b1ec957c94b187d0490e27fa
[ "MIT" ]
null
null
null
clean.py
amraboelela/ertugrul
00491d002b7a8989b1ec957c94b187d0490e27fa
[ "MIT" ]
null
null
null
clean.py
amraboelela/ertugrul
00491d002b7a8989b1ec957c94b187d0490e27fa
[ "MIT" ]
null
null
null
# importing the requests library import sys, os if len(sys.argv) > 6: title = sys.argv[1] s = sys.argv[2] a = int(sys.argv[3]) b = int(sys.argv[4]) sourceLanguage = sys.argv[5] targetLanguage = sys.argv[6] else: print("please enter the title, season number, first episode number, last episo...
29.136364
134
0.583463
import sys, os if len(sys.argv) > 6: title = sys.argv[1] s = sys.argv[2] a = int(sys.argv[3]) b = int(sys.argv[4]) sourceLanguage = sys.argv[5] targetLanguage = sys.argv[6] else: print("please enter the title, season number, first episode number, last episode numer, source language, and t...
true
true
f70e23b0623fe77fb5807f8ef72c2de3c6d55691
1,491
py
Python
example_fuzzers/fuzzing_example.py
rohankumardubey/atheris
77ef3b3b6be35088ada145b223e2c3500ae00123
[ "Apache-2.0" ]
null
null
null
example_fuzzers/fuzzing_example.py
rohankumardubey/atheris
77ef3b3b6be35088ada145b223e2c3500ae00123
[ "Apache-2.0" ]
null
null
null
example_fuzzers/fuzzing_example.py
rohankumardubey/atheris
77ef3b3b6be35088ada145b223e2c3500ae00123
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright 2020 Google LLC # Copyright 2021 Fraunhofer FKIE # # 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...
29.82
80
0.753186
import atheris import sys with atheris.instrument_imports(): import struct import example_library @atheris.instrument_func def TestOneInput(data): if len(data) != 4: return number, = struct.unpack('<I', data) example_library.CodeBeingFuzzed(number) atheris.Setup(sys.argv, Test...
true
true
f70e23d3f90e0aebfb749365625873ed78aeb75c
1,585
py
Python
tests/collect.py
djamaile/mangascan
af3bb62237e81ddc8ef9341bc4e697728c266d20
[ "MIT" ]
null
null
null
tests/collect.py
djamaile/mangascan
af3bb62237e81ddc8ef9341bc4e697728c266d20
[ "MIT" ]
null
null
null
tests/collect.py
djamaile/mangascan
af3bb62237e81ddc8ef9341bc4e697728c266d20
[ "MIT" ]
null
null
null
import unittest from core import collect class TestCollect(unittest.TestCase): def test_if_we_get_viz_release(self): mock_data = { "name": "a", "img": "img", "link": "link", "publisher": "publisher", } response = collect.get_viz()...
28.818182
54
0.484543
import unittest from core import collect class TestCollect(unittest.TestCase): def test_if_we_get_viz_release(self): mock_data = { "name": "a", "img": "img", "link": "link", "publisher": "publisher", } response = collect.get_viz()...
true
true
f70e255f53d9ea5a5e99b9d25e7a1289f6b1f8b7
1,915
py
Python
detokenize.py
miradel51/preprocess
05877ab6da36e068611643b220fed424e3999b3c
[ "MIT" ]
2
2018-10-20T12:53:48.000Z
2021-06-23T16:05:44.000Z
detokenize.py
miradel51/convert_lowercase
05877ab6da36e068611643b220fed424e3999b3c
[ "MIT" ]
null
null
null
detokenize.py
miradel51/convert_lowercase
05877ab6da36e068611643b220fed424e3999b3c
[ "MIT" ]
null
null
null
#!/usr/bin/python #-*-coding:utf-8 -*- # author: mld # email: miradel51@126.com # date : 2017/9/28 import sys import string import re def de_tokenizestr(original_str): after_de_tok = "" original_str = original_str.replace("[ ","[") original_str = original_str.replace(" ]","]") original_str =...
27.753623
76
0.646997
import sys import string import re def de_tokenizestr(original_str): after_de_tok = "" original_str = original_str.replace("[ ","[") original_str = original_str.replace(" ]","]") original_str = original_str.replace(" !",'!') original_str = original_str.replace(" % ","%") original_str = o...
true
true
f70e26550ef5788483a5dda566d84d9dc5230444
1,145
py
Python
humanoid_league_misc/humanoid_league_transform/src/humanoid_league_transform/ball_tester.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
null
null
null
humanoid_league_misc/humanoid_league_transform/src/humanoid_league_transform/ball_tester.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
47
2019-03-11T08:58:09.000Z
2022-02-26T16:43:32.000Z
humanoid_league_misc/humanoid_league_transform/src/humanoid_league_transform/ball_tester.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
1
2019-07-28T11:26:24.000Z
2019-07-28T11:26:24.000Z
#!/usr/bin/env python3 """ Command line tool to publish balls on the /ball_in_image topic """ import rospy from humanoid_league_msgs.msg import BallInImage, BallInImageArray import sys import signal def _signal_term_handler(signal, frame): rospy.logerr('User Keyboard interrupt') sys.exit(0) if __name__ == ...
22.9
76
0.609607
import rospy from humanoid_league_msgs.msg import BallInImage, BallInImageArray import sys import signal def _signal_term_handler(signal, frame): rospy.logerr('User Keyboard interrupt') sys.exit(0) if __name__ == "__main__": signal.signal(signal.SIGINT, _signal_term_handler) rospy.init_node(...
true
true
f70e2745e5e18fd6fb1ea57f8e78709f6dec0740
849
py
Python
code_TSA_SVC_report_version/results/test13/__init__.py
aiir-team/code_TSA_SVC_luxembourg
c3efd636a82ac8279f5b525b2b117eac76d7f1a0
[ "MIT" ]
null
null
null
code_TSA_SVC_report_version/results/test13/__init__.py
aiir-team/code_TSA_SVC_luxembourg
c3efd636a82ac8279f5b525b2b117eac76d7f1a0
[ "MIT" ]
null
null
null
code_TSA_SVC_report_version/results/test13/__init__.py
aiir-team/code_TSA_SVC_luxembourg
c3efd636a82ac8279f5b525b2b117eac76d7f1a0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # ------------------------------------------------------------------------------------------------------# # Created by "Thieu Nguyen" at 02:05, 15/12/2019 # # ...
84.9
105
0.191991
true
true
f70e27a5c0a2afaf918ee7b2a97de344a9057bef
43,409
py
Python
mkt/developers/tests/test_views_payments.py
Joergen/zamboni
20a0e22b75cf986aceeb8c4d8c25abb948d97096
[ "BSD-3-Clause" ]
null
null
null
mkt/developers/tests/test_views_payments.py
Joergen/zamboni
20a0e22b75cf986aceeb8c4d8c25abb948d97096
[ "BSD-3-Clause" ]
null
null
null
mkt/developers/tests/test_views_payments.py
Joergen/zamboni
20a0e22b75cf986aceeb8c4d8c25abb948d97096
[ "BSD-3-Clause" ]
null
null
null
import json from django.core.exceptions import ObjectDoesNotExist import mock from curling.lib import HttpClientError from mock import ANY from nose.tools import eq_, ok_, raises from pyquery import PyQuery as pq import amo import amo.tests from amo.urlresolvers import reverse from addons.models import (Addon, Addon...
41.302569
79
0.60522
import json from django.core.exceptions import ObjectDoesNotExist import mock from curling.lib import HttpClientError from mock import ANY from nose.tools import eq_, ok_, raises from pyquery import PyQuery as pq import amo import amo.tests from amo.urlresolvers import reverse from addons.models import (Addon, Addon...
true
true
f70e283fd6fdb7fa06c81f1feffe487ca33d2235
5,232
py
Python
src/packagedcode2/formats.py
purna135/scancode-toolkit-contrib
ef556c4bb2bfc513f486d5b58d43895c062d44cb
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/packagedcode2/formats.py
purna135/scancode-toolkit-contrib
ef556c4bb2bfc513f486d5b58d43895c062d44cb
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/packagedcode2/formats.py
purna135/scancode-toolkit-contrib
ef556c4bb2bfc513f486d5b58d43895c062d44cb
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
34.196078
83
0.571292
package_formats = { 'rpm': ('RPM (Linux)', ''), 'deb': ('Debian (Linux)', ''), 'pom': ('Maven POM (Java)', ''), 'ivy': ('IVY (Java)', ''), 'gradle': ('gradle (Groovy/Java)', 'https://gradle.org/'), 'jboss': ('JBoss (Java)', ''), 'buildr': ('buildr (Ru...
true
true
f70e286f5caeb1490537e3a205b606633b39a2ca
3,921
py
Python
feat_imp/generate_dataset.py
datajms/feature_importance_study
a10cf9fc66e0ca7f956457b2628a215b89cbe4e4
[ "MIT" ]
null
null
null
feat_imp/generate_dataset.py
datajms/feature_importance_study
a10cf9fc66e0ca7f956457b2628a215b89cbe4e4
[ "MIT" ]
null
null
null
feat_imp/generate_dataset.py
datajms/feature_importance_study
a10cf9fc66e0ca7f956457b2628a215b89cbe4e4
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import openturns as ot from .conf_file_generation import GENERATION_CONF, post_process_generated_dataset def sample_from_conf( var_conf: dict, corr_conf: dict, n_sample: int, seed: int = None ) -> pd.DataFrame: """ Generate dataset with n_sample form configuration f...
27.808511
83
0.630961
import numpy as np import pandas as pd import openturns as ot from .conf_file_generation import GENERATION_CONF, post_process_generated_dataset def sample_from_conf( var_conf: dict, corr_conf: dict, n_sample: int, seed: int = None ) -> pd.DataFrame: onf.keys()) target_var = var_list[-1] i_target_var...
true
true
f70e28f6600962a660650acd577d5d54522326cb
839
py
Python
api/tests/integration/tests/arom/partial_arom_cano.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
204
2015-11-06T21:34:34.000Z
2022-03-30T16:17:01.000Z
api/tests/integration/tests/arom/partial_arom_cano.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
509
2015-11-05T13:54:43.000Z
2022-03-30T22:15:30.000Z
api/tests/integration/tests/arom/partial_arom_cano.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
89
2015-11-17T08:22:54.000Z
2022-03-17T04:26:28.000Z
import os import sys sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common"))) from env_indigo import * indigo = Indigo() for m in indigo.iterateSDFile(joinPathPy('molecules/partial_arom.sdf', __file__)): print("Smiles: " + m.smiles()) # count number of aromatic bonds...
41.95
102
0.65435
import os import sys sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common"))) from env_indigo import * indigo = Indigo() for m in indigo.iterateSDFile(joinPathPy('molecules/partial_arom.sdf', __file__)): print("Smiles: " + m.smiles()) arom_bonds = len([1 for b in...
true
true
f70e294b178871e8ebefeeaeb03d7e597a7a5791
12,728
py
Python
package/spack-hdf5/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-hdf5/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-hdf5/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
40.535032
108
0.594516
'--enable-build-mode=debug') else: extra_args.append('--enable-build-mode=production') else: if '+debug' in self.spec: extra_args.append('--enable-debug=all') else: extra_args.append('--enable-production') ...
true
true
f70e297f339e3eda72257cd14336ad36b629d4c1
7,843
py
Python
cmp3/db_dump.py
ericvaandering/cms_consistency
8ae26a3e911d3a472945411999fc2c730539e0e3
[ "BSD-3-Clause" ]
null
null
null
cmp3/db_dump.py
ericvaandering/cms_consistency
8ae26a3e911d3a472945411999fc2c730539e0e3
[ "BSD-3-Clause" ]
1
2021-02-15T14:58:45.000Z
2021-02-15T14:58:45.000Z
cmp3/db_dump.py
ericvaandering/cms_consistency
8ae26a3e911d3a472945411999fc2c730539e0e3
[ "BSD-3-Clause" ]
4
2020-05-05T19:41:40.000Z
2022-02-23T21:48:40.000Z
import getopt, os, time, re, gzip, json, traceback import sys, uuid from config import DBConfig, Config from part import PartitionedList from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy.orm import sessionmaker ...
29.484962
112
0.580645
import getopt, os, time, re, gzip, json, traceback import sys, uuid from config import DBConfig, Config from part import PartitionedList from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy.orm import sessionmaker ...
true
true
f70e29d6889aa1ef6b97680c7ad657613003f54a
684
py
Python
venv/lib/python3.8/site-packages/setuptools/command/bdist_wininst.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/setuptools/command/bdist_wininst.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/setuptools/command/bdist_wininst.py
realxwx/leetcode-solve
3a7d7d8e92a5fd5fecc347d141a1c532b92e763e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 # Author: xiaoweixiang import distutils.command.bdist_wininst as orig class bdist_wininst(orig.bdist_wininst): def reinitialize_command(self, command, reinit_subcommands=0): """ Supplement reinitialize_command to work around http://bugs.python.org/issue20819 ...
27.36
66
0.633041
import distutils.command.bdist_wininst as orig class bdist_wininst(orig.bdist_wininst): def reinitialize_command(self, command, reinit_subcommands=0): cmd = self.distribution.reinitialize_command( command, reinit_subcommands) if command in ('install', 'install_lib'): cmd...
true
true
f70e29e6bf6eea0771d8185054f6e9499ef78f05
5,646
py
Python
test/functional/p2p_invalid_block.py
luascoin/luascoin
74558007cfd46f9d914e9683dfaac1b0274717a9
[ "MIT" ]
null
null
null
test/functional/p2p_invalid_block.py
luascoin/luascoin
74558007cfd46f9d914e9683dfaac1b0274717a9
[ "MIT" ]
null
null
null
test/functional/p2p_invalid_block.py
luascoin/luascoin
74558007cfd46f9d914e9683dfaac1b0274717a9
[ "MIT" ]
1
2020-02-04T22:41:33.000Z
2020-02-04T22:41:33.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Luascoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid blocks. In this test we connect to one node over p2p, and test block r...
40.913043
115
0.68119
import copy from test_framework.blocktools import create_block, create_coinbase, create_tx_with_script from test_framework.messages import COIN from test_framework.mininode import P2PDataStore from test_framework.test_framework import LuascoinTestFramework from test_framework.util import assert_equal class Invali...
true
true
f70e2cf40b2b6d3ff1c3f728e4b8081fbe399996
8,208
py
Python
ImageBot/infrastructure/Pipeline.py
FraunhoferIAO/Image-Bot
951258a78a297f3fb27478f5671f6bc804cd5715
[ "MIT" ]
2
2021-12-28T08:33:14.000Z
2022-01-06T15:28:19.000Z
ImageBot/infrastructure/Pipeline.py
FraunhoferIAO/Image-Bot
951258a78a297f3fb27478f5671f6bc804cd5715
[ "MIT" ]
1
2022-02-17T17:43:11.000Z
2022-02-17T17:43:11.000Z
ImageBot/infrastructure/Pipeline.py
IAORaisierer/Image-Bot
951258a78a297f3fb27478f5671f6bc804cd5715
[ "MIT" ]
1
2022-02-09T18:24:09.000Z
2022-02-09T18:24:09.000Z
"""Pipeline class implementing Pipes and Filters pattern. A generic pipeline to process messages efficiently in a pipes-and-filter manner (multiprocessing possible). Inspired, but not copied from https://deparkes.co.uk/2019/12/08/simple-python-pipes-and-filters/ Authors: - Lukas Block - Adrian Raiser Todo:...
40.235294
226
0.628411
import multiprocessing from functools import partial import traceback from collections.abc import Iterable from typing import Callable from numpy import sin class Pipeline(object): def __init__(self, with_multiprocessing=False, max_no_processes=8): self._multiprocessing = with_multiprocessing i...
true
true
f70e2e152a2e3569ad9ca7208880f6cf943eab0b
228
py
Python
setup.py
lukovnikov/semparse
0fd5fcd9c982b6faac8f08b451f20273d2cc0da7
[ "MIT" ]
null
null
null
setup.py
lukovnikov/semparse
0fd5fcd9c982b6faac8f08b451f20273d2cc0da7
[ "MIT" ]
null
null
null
setup.py
lukovnikov/semparse
0fd5fcd9c982b6faac8f08b451f20273d2cc0da7
[ "MIT" ]
1
2021-04-06T13:15:01.000Z
2021-04-06T13:15:01.000Z
from setuptools import setup, find_packages setup(name="semparse", description="semparse", author="Sum-Ting Wong", author_email="sumting@wo.ng", install_requires=[], packages=["semparse"], )
22.8
43
0.640351
from setuptools import setup, find_packages setup(name="semparse", description="semparse", author="Sum-Ting Wong", author_email="sumting@wo.ng", install_requires=[], packages=["semparse"], )
true
true
f70e2f26475b76e1fd7448f5a0f2e18350377df4
1,541
py
Python
var/spack/repos/builtin/packages/perl-moose/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/perl-moose/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/perl-moose/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class PerlMoose(PerlPackage): """A postmodern object system for Perl 5""" homepage ...
49.709677
96
0.72096
from spack.package import * class PerlMoose(PerlPackage): homepage = "https://metacpan.org/pod/Moose" url = "https://search.cpan.org/CPAN/authors/id/E/ET/ETHER/Moose-2.2006.tar.gz" version('2.2010', sha256='af0905b69f18c27de1177c9bc7778ee495d4ec91be1f223e8ca8333af4de08c5') version('2.2009'...
true
true
f70e2fae26d7e5c8e0f91ebb422314b422641faf
1,852
py
Python
MRPT/vdz/atoms/V_0/mrpt.py
mussard/share_data_benchmark
c02bfa4017b9008800cabe47d7c7959f82c26060
[ "MIT" ]
null
null
null
MRPT/vdz/atoms/V_0/mrpt.py
mussard/share_data_benchmark
c02bfa4017b9008800cabe47d7c7959f82c26060
[ "MIT" ]
null
null
null
MRPT/vdz/atoms/V_0/mrpt.py
mussard/share_data_benchmark
c02bfa4017b9008800cabe47d7c7959f82c26060
[ "MIT" ]
null
null
null
import json from pyscf import gto,scf,mcscf, fci, lo, ci, cc from pyscf.scf import ROHF, UHF,ROKS import numpy as np import pandas as pd # THIS IS WERE IT STARTS ==================================== df=json.load(open("../../../trail.json")) spins={'Sc':1, 'Ti':2, 'V':3, 'Cr':6, 'Mn':5, 'Fe':4, 'Cu':1} nd={'Sc':(1,0...
26.84058
86
0.607991
import json from pyscf import gto,scf,mcscf, fci, lo, ci, cc from pyscf.scf import ROHF, UHF,ROKS import numpy as np import pandas as pd df=json.load(open("../../../trail.json")) spins={'Sc':1, 'Ti':2, 'V':3, 'Cr':6, 'Mn':5, 'Fe':4, 'Cu':1} nd={'Sc':(1,0), 'Ti':(2,0), 'V':(3,0), 'Cr':(5,0), 'Mn':(5,0), 'Fe':(5,1),...
true
true
f70e2fc47aa0a5ea93392ef38025182ca0cd5b10
1,030
py
Python
alu.py
jhonatheberson/MIPS-architecture
b027502992c115c1529fe9d0ceaaf00e7bdb930e
[ "MIT" ]
null
null
null
alu.py
jhonatheberson/MIPS-architecture
b027502992c115c1529fe9d0ceaaf00e7bdb930e
[ "MIT" ]
null
null
null
alu.py
jhonatheberson/MIPS-architecture
b027502992c115c1529fe9d0ceaaf00e7bdb930e
[ "MIT" ]
null
null
null
class ALU(): def __init__(self): self.Rs = None self.Rt = None self.Rd = None def alu(self, opcode): if (opcode == 0): self.Rd = self.Rs + self.Rt return self.Rd elif (opcode == 1): self.Rd = self.Rs - self.Rt return self....
22.391304
41
0.469903
class ALU(): def __init__(self): self.Rs = None self.Rt = None self.Rd = None def alu(self, opcode): if (opcode == 0): self.Rd = self.Rs + self.Rt return self.Rd elif (opcode == 1): self.Rd = self.Rs - self.Rt return self....
true
true
f70e3047e3f418e139848f3764890f8c70ffc0e6
23
py
Python
__init__.py
marcusschiesser/all-intraday
8879251896074b0a527d75baa8389a071a81d058
[ "MIT" ]
20
2020-02-08T06:41:41.000Z
2022-01-06T08:41:01.000Z
__init__.py
marcusschiesser/all-intraday
8879251896074b0a527d75baa8389a071a81d058
[ "MIT" ]
null
null
null
__init__.py
marcusschiesser/all-intraday
8879251896074b0a527d75baa8389a071a81d058
[ "MIT" ]
5
2020-01-15T06:21:49.000Z
2021-02-14T16:57:26.000Z
from .intraday import *
23
23
0.782609
from .intraday import *
true
true
f70e3222a35b11a54e91bb0d8e4f03eef77080cc
1,543
py
Python
osm2rail/plotter.py
PariseC/osm2rail
dfc373aedba4a82fd144192cb6a855e8a11b0601
[ "Apache-2.0" ]
6
2021-04-30T21:18:44.000Z
2022-03-07T01:47:53.000Z
osm2rail/plotter.py
PariseC/osm2rail
dfc373aedba4a82fd144192cb6a855e8a11b0601
[ "Apache-2.0" ]
null
null
null
osm2rail/plotter.py
PariseC/osm2rail
dfc373aedba4a82fd144192cb6a855e8a11b0601
[ "Apache-2.0" ]
4
2021-05-02T01:29:15.000Z
2022-02-11T02:02:17.000Z
import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection,PolyCollection def showNetwork(network,savefig=None): node_x_coords=[] node_y_coords=[] link_coords=[] poi_coords=[] for _,node in network.node_dict.items(): node_x_coords.append(node.x_coo...
32.829787
92
0.650032
import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection,PolyCollection def showNetwork(network,savefig=None): node_x_coords=[] node_y_coords=[] link_coords=[] poi_coords=[] for _,node in network.node_dict.items(): node_x_coords.append(node.x_coo...
true
true
f70e32309cc4afb69714ebb30f9eb11ce4f0455a
18,318
py
Python
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/global_/graceful_restart/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
64
2016-10-20T15:47:18.000Z
2021-11-11T11:57:32.000Z
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/global_/graceful_restart/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
126
2016-10-05T10:36:14.000Z
2019-05-15T08:43:23.000Z
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/global_/graceful_restart/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
63
2016-11-07T15:23:08.000Z
2021-09-22T14:41:16.000Z
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
38.1625
377
0.604324
from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListType from pyangbind.lib.y...
true
true
f70e3293e3a739d58604ec20d2cb25c87b48e20e
3,356
py
Python
bdd/group_steps.py
koppeltatyana/python_training
bc07671dcb85b783a13a6b00247e4500fc3c2265
[ "Apache-2.0" ]
null
null
null
bdd/group_steps.py
koppeltatyana/python_training
bc07671dcb85b783a13a6b00247e4500fc3c2265
[ "Apache-2.0" ]
null
null
null
bdd/group_steps.py
koppeltatyana/python_training
bc07671dcb85b783a13a6b00247e4500fc3c2265
[ "Apache-2.0" ]
null
null
null
import random from pytest_bdd import given, when, then # пометки from model.group import Group # STEPS FOR ADD GROUP # предусловие @given('a group list', target_fixture="group_list") # эти штуки представляют собой фикстуры, а их можно передавать в кач-ве параметра, что мы сделали в ф-ции verify_group_added def grou...
40.926829
195
0.758939
import random from pytest_bdd import given, when, then from model.group import Group @given('a group list', target_fixture="group_list") def group_list(db): return db.get_group_list() @given('a group with <name>, <header> and <footer>', target_fixture="new_group") def new_group(name, header, footer): ...
true
true
f70e32fa6a639b2df1a93c5c41ceb46b252ddcef
557
py
Python
blackbook/migrations/0014_relinking_transactions_to_budgetperiods.py
bsiebens/blackbook
636d1adc8966db158914abba43e360c6a0d23173
[ "MIT" ]
1
2021-05-10T19:15:48.000Z
2021-05-10T19:15:48.000Z
blackbook/migrations/0014_relinking_transactions_to_budgetperiods.py
bsiebens/BlackBook
636d1adc8966db158914abba43e360c6a0d23173
[ "MIT" ]
20
2020-12-27T15:56:24.000Z
2021-09-22T18:25:02.000Z
blackbook/migrations/0014_relinking_transactions_to_budgetperiods.py
bsiebens/BlackBook
636d1adc8966db158914abba43e360c6a0d23173
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2020-12-23 21:48 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blackbook', '0013_add_uuid_to_other_models'), ] operations = [ migrations.AlterField( model_nam...
27.85
163
0.675045
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blackbook', '0013_add_uuid_to_other_models'), ] operations = [ migrations.AlterField( model_name='transactionjournalentry', name='...
true
true
f70e3309c36350f736985ae60d6539bd6ad1bb1e
3,254
py
Python
torch_geometric/nn/conv/graph_conv.py
Kenneth-Schroeder/pytorch_geometric
f7ec9e964bfae1ce5fb21d9b2b30e9e717bf8e24
[ "MIT" ]
12,651
2017-10-28T15:14:24.000Z
2021-09-12T07:22:57.000Z
torch_geometric/nn/conv/graph_conv.py
Kenneth-Schroeder/pytorch_geometric
f7ec9e964bfae1ce5fb21d9b2b30e9e717bf8e24
[ "MIT" ]
2,472
2017-10-30T23:38:47.000Z
2021-09-12T06:41:44.000Z
torch_geometric/nn/conv/graph_conv.py
Kenneth-Schroeder/pytorch_geometric
f7ec9e964bfae1ce5fb21d9b2b30e9e717bf8e24
[ "MIT" ]
2,363
2017-12-01T13:25:05.000Z
2021-09-12T07:23:09.000Z
from typing import Union, Tuple from torch_geometric.typing import OptTensor, OptPairTensor, Adj, Size from torch import Tensor from torch_sparse import SparseTensor, matmul from torch_geometric.nn.dense.linear import Linear from torch_geometric.nn.conv import MessagePassing class GraphConv(MessagePassing): r"""...
36.561798
79
0.613399
from typing import Union, Tuple from torch_geometric.typing import OptTensor, OptPairTensor, Adj, Size from torch import Tensor from torch_sparse import SparseTensor, matmul from torch_geometric.nn.dense.linear import Linear from torch_geometric.nn.conv import MessagePassing class GraphConv(MessagePassing): def ...
true
true
f70e34e21bad90e8461570263511bcb5e33ea616
303
py
Python
apps/statistics/management/commands/collect_stats.py
starsep/NewsBlur
6c59416ca82377ca1bbc7d044890bdead3eba904
[ "MIT" ]
2
2017-08-14T03:40:11.000Z
2019-06-15T12:28:49.000Z
apps/statistics/management/commands/collect_stats.py
starsep/NewsBlur
6c59416ca82377ca1bbc7d044890bdead3eba904
[ "MIT" ]
7
2021-02-08T20:32:31.000Z
2022-03-11T23:50:47.000Z
apps/statistics/management/commands/collect_stats.py
starsep/NewsBlur
6c59416ca82377ca1bbc7d044890bdead3eba904
[ "MIT" ]
1
2020-11-21T08:43:15.000Z
2020-11-21T08:43:15.000Z
from optparse import make_option from django.core.management.base import BaseCommand from apps.statistics.models import MStatistics class Command(BaseCommand): option_list = BaseCommand.option_list + ( ) def handle(self, *args, **options): MStatistics.collect_statistics()
27.545455
51
0.739274
from optparse import make_option from django.core.management.base import BaseCommand from apps.statistics.models import MStatistics class Command(BaseCommand): option_list = BaseCommand.option_list + ( ) def handle(self, *args, **options): MStatistics.collect_statistics()
true
true
f70e357fa181edee335244ff28450013665c1041
8,110
py
Python
litex_boards/platforms/alinx_ax7101.py
bitinvert/litex-boards
907723fff54d0e02dd19c6c5bbca6e4d7165ff6d
[ "BSD-2-Clause" ]
null
null
null
litex_boards/platforms/alinx_ax7101.py
bitinvert/litex-boards
907723fff54d0e02dd19c6c5bbca6e4d7165ff6d
[ "BSD-2-Clause" ]
null
null
null
litex_boards/platforms/alinx_ax7101.py
bitinvert/litex-boards
907723fff54d0e02dd19c6c5bbca6e4d7165ff6d
[ "BSD-2-Clause" ]
1
2021-12-28T18:05:27.000Z
2021-12-28T18:05:27.000Z
# # This file is part of LiteX-Boards. # # Copyright (c) 2021 Brendan Christy <brendan.christy@hs-rm.de> # SPDX-License-Identifier: BSD-2-Clause from litex.build.generic_platform import * from litex.build.xilinx import XilinxPlatform, VivadoProgrammer from litex.build.openocd import OpenOCD # IOs --------------------...
42.910053
185
0.579162
from litex.build.generic_platform import * from litex.build.xilinx import XilinxPlatform, VivadoProgrammer from litex.build.openocd import OpenOCD _io = [ ("clk200", 0, Subsignal("p", Pins("R4"), IOStandard("DIFF_SSTL15")), Subsignal("n", Pins("T4"), IOStandard("DIFF_SSTL15")) ), ...
true
true
f70e359018c3901f8ab6fad966adece64040b487
12,841
py
Python
django/db/migrations/graph.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
304
2015-01-06T18:02:49.000Z
2021-12-11T18:08:37.000Z
checkerista/.env/Lib/site-packages/django/db/migrations/graph.py
LybaFatimaNasir/CS311S20PID02
bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39
[ "MIT" ]
123
2019-09-10T14:48:01.000Z
2019-11-28T21:24:06.000Z
checkerista/.env/Lib/site-packages/django/db/migrations/graph.py
LybaFatimaNasir/CS311S20PID02
bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39
[ "MIT" ]
145
2019-03-14T18:54:45.000Z
2022-03-04T20:25:31.000Z
from functools import total_ordering from django.db.migrations.state import ProjectState from .exceptions import CircularDependencyError, NodeNotFoundError @total_ordering class Node: """ A single node in the migration graph. Contains direct links to adjacent nodes in either direction. """ def _...
40.128125
110
0.613114
from functools import total_ordering from django.db.migrations.state import ProjectState from .exceptions import CircularDependencyError, NodeNotFoundError @total_ordering class Node: def __init__(self, key): self.key = key self.children = set() self.parents = set() def __eq__(self,...
true
true
f70e35b4ecfce7e7d8d824aa5520b70979374a28
898
py
Python
compare.py
zhoukaisspu/py_script
784c78a0db541b527fa39f13c1aa4d2d15b8438f
[ "BSD-2-Clause" ]
null
null
null
compare.py
zhoukaisspu/py_script
784c78a0db541b527fa39f13c1aa4d2d15b8438f
[ "BSD-2-Clause" ]
null
null
null
compare.py
zhoukaisspu/py_script
784c78a0db541b527fa39f13c1aa4d2d15b8438f
[ "BSD-2-Clause" ]
null
null
null
# compare contents of two files in binary form import sys def compareFile(srcFile,destFile): with open(srcFile,"rb") as src: srcData = src.read() with open(destFile,"rb") as dest: destData = dest.read() checked = False if(len(srcData)!=len(destData)): print("It unequal between ...
29.933333
98
0.603563
import sys def compareFile(srcFile,destFile): with open(srcFile,"rb") as src: srcData = src.read() with open(destFile,"rb") as dest: destData = dest.read() checked = False if(len(srcData)!=len(destData)): print("It unequal between ",srcFile,destFile,". The file size is differe...
true
true
f70e3629b7c97b51ca470780ecfbfd9073525e0a
559
py
Python
DataGeneticsSolutions/reciprocals.py
Zaita/SampleCode
2b846a3a1cd907d62aea6f5a047a755d19597dc3
[ "MIT" ]
null
null
null
DataGeneticsSolutions/reciprocals.py
Zaita/SampleCode
2b846a3a1cd907d62aea6f5a047a755d19597dc3
[ "MIT" ]
null
null
null
DataGeneticsSolutions/reciprocals.py
Zaita/SampleCode
2b846a3a1cd907d62aea6f5a047a755d19597dc3
[ "MIT" ]
null
null
null
import math import itertools digits = [] def search(): for perm in itertools.combinations(digits, 6): total = 0.0 for x in perm: total += (1 / x) if total > 1.0: break if total == 1.0: print('Solution: ' + str(perm)) r...
17.46875
58
0.488372
import math import itertools digits = [] def search(): for perm in itertools.combinations(digits, 6): total = 0.0 for x in perm: total += (1 / x) if total > 1.0: break if total == 1.0: print('Solution: ' + str(perm)) r...
true
true
f70e370b1a7824d9b4845d169600862a98161c47
15,476
py
Python
probe/modules/database/nsrl/nsrl.py
vaginessa/irma
02285080b67b25ef983a99a765044683bd43296c
[ "Apache-2.0" ]
null
null
null
probe/modules/database/nsrl/nsrl.py
vaginessa/irma
02285080b67b25ef983a99a765044683bd43296c
[ "Apache-2.0" ]
null
null
null
probe/modules/database/nsrl/nsrl.py
vaginessa/irma
02285080b67b25ef983a99a765044683bd43296c
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
34.544643
92
0.502843
import logging import json import os import pprint from abc import ABCMeta try: from leveldict import LevelDictSerialized except ImportError as e: LevelDictSerialized = type from lib.common.oopatterns import ParametricSingletonMetaClass log = logging.getLogger(__name__) class NSRL...
true
true
f70e37545e35f5dfcdb3ab4f9338fcecda5848c2
1,318
py
Python
gamestonk_terminal/options/chartexchange_view.py
jperkins12/GamestonkTerminal
43dd95cc49e47ff0a0fd84f6e8a4b75b0f51ed5e
[ "MIT" ]
1
2021-12-04T13:21:40.000Z
2021-12-04T13:21:40.000Z
gamestonk_terminal/options/chartexchange_view.py
TenzinJhopee/GamestonkTerminal
ebc0bc5963635888a01b2958070a0718249c8275
[ "MIT" ]
null
null
null
gamestonk_terminal/options/chartexchange_view.py
TenzinJhopee/GamestonkTerminal
ebc0bc5963635888a01b2958070a0718249c8275
[ "MIT" ]
null
null
null
"""Chartexchange view""" __docformat__ = "numpy" import os from tabulate import tabulate from gamestonk_terminal.helper_funcs import export_data from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.options import chartexchange_model def display_raw( export: str, ticker: str, date: str, ...
23.122807
78
0.597117
__docformat__ = "numpy" import os from tabulate import tabulate from gamestonk_terminal.helper_funcs import export_data from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.options import chartexchange_model def display_raw( export: str, ticker: str, date: str, call: bool, price: str, n...
true
true
f70e377b4642eb62c5792be35937a7c90158949b
2,837
py
Python
sdk/AsposeEmailCloudSdk/models/ai_bcr_parse_request.py
aspose-email-cloud/aspose-email-cloud-python
c5c13839cbbbfa5b6617bd1aedf3cf30cd664227
[ "MIT" ]
1
2020-02-26T13:19:06.000Z
2020-02-26T13:19:06.000Z
sdk/AsposeEmailCloudSdk/models/ai_bcr_parse_request.py
aspose-email-cloud/aspose-email-cloud-python
c5c13839cbbbfa5b6617bd1aedf3cf30cd664227
[ "MIT" ]
null
null
null
sdk/AsposeEmailCloudSdk/models/ai_bcr_parse_request.py
aspose-email-cloud/aspose-email-cloud-python
c5c13839cbbbfa5b6617bd1aedf3cf30cd664227
[ "MIT" ]
null
null
null
# coding: utf-8 # ---------------------------------------------------------------------------- # <copyright company="Aspose" file="ai_bcr_parse_request.py"> # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved. # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person ...
43.646154
164
0.649277
from AsposeEmailCloudSdk.models import * class AiBcrParseRequest(object): def __init__(self, file: str, countries: str = None, languages: str = None, is_single: bool = None): self.file = file self.countries = countries self.languages = languages self.is_...
true
true
f70e3826342543155d683d371c5acba5b651c0f6
4,131
py
Python
src/fbsrankings/domain/service/srs_ranking_service.py
mikee385/fbsrankings
2b50e26a302b53c21cd8f5c965943d6fbf0680a1
[ "MIT" ]
null
null
null
src/fbsrankings/domain/service/srs_ranking_service.py
mikee385/fbsrankings
2b50e26a302b53c21cd8f5c965943d6fbf0680a1
[ "MIT" ]
null
null
null
src/fbsrankings/domain/service/srs_ranking_service.py
mikee385/fbsrankings
2b50e26a302b53c21cd8f5c965943d6fbf0680a1
[ "MIT" ]
null
null
null
from typing import Dict from typing import List import numpy from fbsrankings.domain.model.affiliation import Subdivision from fbsrankings.domain.model.game import Game from fbsrankings.domain.model.game import GameStatus from fbsrankings.domain.model.ranking import Ranking from fbsrankings.domain.model.ranking impor...
33.585366
85
0.574679
from typing import Dict from typing import List import numpy from fbsrankings.domain.model.affiliation import Subdivision from fbsrankings.domain.model.game import Game from fbsrankings.domain.model.game import GameStatus from fbsrankings.domain.model.ranking import Ranking from fbsrankings.domain.model.ranking impor...
true
true
f70e38b452c7ddafcc3ca7600de08d0f6aafa0d9
1,505
py
Python
setup.py
shanedabes/youtube_sm_parser
642663abb9ee12c8478796b7ed7b9a01210d1fad
[ "Apache-2.0" ]
2
2019-05-26T07:50:35.000Z
2020-07-14T22:23:22.000Z
setup.py
shanedabes/youtube_sm_parser
642663abb9ee12c8478796b7ed7b9a01210d1fad
[ "Apache-2.0" ]
35
2019-05-18T02:09:25.000Z
2019-12-03T20:52:21.000Z
setup.py
shanedabes/youtube_sm_parser
642663abb9ee12c8478796b7ed7b9a01210d1fad
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ "requests-futures", "xmltodi...
27.363636
79
0.665116
from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ "requests-futures", "xmltodict", "PyYAML" ] setup_requirements = ['pytest-runner', ] test_...
true
true
f70e39c79abceb650a8a7542ee15c5d7e83b51f3
2,871
py
Python
app/api/routers.py
snakrani/discovery
99690f186a194cabef6a5d1ad18fca715be1e187
[ "CC0-1.0" ]
null
null
null
app/api/routers.py
snakrani/discovery
99690f186a194cabef6a5d1ad18fca715be1e187
[ "CC0-1.0" ]
null
null
null
app/api/routers.py
snakrani/discovery
99690f186a194cabef6a5d1ad18fca715be1e187
[ "CC0-1.0" ]
null
null
null
from django.conf.urls import url from rest_framework.routers import SimpleRouter, Route class DiscoveryAPIRouter(SimpleRouter): routes = [ # List route. Route( url=r'^{prefix}{trailing_slash}$', mapping={ 'get': 'list' }, name='...
29.295918
71
0.487635
from django.conf.urls import url from rest_framework.routers import SimpleRouter, Route class DiscoveryAPIRouter(SimpleRouter): routes = [ Route( url=r'^{prefix}{trailing_slash}$', mapping={ 'get': 'list' }, name='{basename}-li...
true
true
f70e3a49ab9c031dbc42fb609e3a4c77a6c367bd
22,899
py
Python
build/lib/tracc/tracc.py
jamaps/tracc
0f71b07b6560ed2f5a9a9f6f94a07e487af254c5
[ "MIT" ]
1
2021-04-20T21:19:32.000Z
2021-04-20T21:19:32.000Z
build/lib/tracc/tracc.py
jamaps/tracc
0f71b07b6560ed2f5a9a9f6f94a07e487af254c5
[ "MIT" ]
null
null
null
build/lib/tracc/tracc.py
jamaps/tracc
0f71b07b6560ed2f5a9a9f6f94a07e487af254c5
[ "MIT" ]
null
null
null
import tracc import pandas as pd import numpy as np class costs: def __init__(self, travelcosts_df, columns = None ): """ Inputs data and prunes columns if desired """ if columns is not None: self.data = travelcosts_df[columns] else: ...
33.974777
300
0.619197
import tracc import pandas as pd import numpy as np class costs: def __init__(self, travelcosts_df, columns = None ): if columns is not None: self.data = travelcosts_df[columns] else: self.data = travelcosts_df def intrazonal(self, ...
true
true
f70e3a4ee58565709da792d106ab2ed75b268330
2,283
py
Python
rlgraph/components/memories/__init__.py
RLGraph/RLGraph
428fc136a9a075f29a397495b4226a491a287be2
[ "Apache-2.0" ]
290
2018-07-29T15:30:57.000Z
2022-03-19T02:46:53.000Z
rlgraph/components/memories/__init__.py
RLGraph/RLGraph
428fc136a9a075f29a397495b4226a491a287be2
[ "Apache-2.0" ]
76
2018-10-19T08:42:01.000Z
2020-05-03T08:34:21.000Z
rlgraph/components/memories/__init__.py
RLGraph/RLGraph
428fc136a9a075f29a397495b4226a491a287be2
[ "Apache-2.0" ]
41
2018-10-30T07:05:05.000Z
2022-03-01T08:28:24.000Z
# Copyright 2018/2019 The RLgraph 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 appli...
39.362069
83
0.74113
from __future__ import absolute_import from __future__ import division from __future__ import print_function from rlgraph import get_backend from rlgraph.components.memories.memory import Memory from rlgraph.components.memories.fifo_queue import FIFOQueue from rlgraph.components.memories.prioritized_rep...
true
true
f70e3acd46ac2e732b53b6c2e72d9d4d2ad9cafd
5,174
py
Python
tests/test_endpoint.py
mister-px/aioauth
5b2e0d7856fd7fb154744cd58580953d776a3be2
[ "MIT" ]
null
null
null
tests/test_endpoint.py
mister-px/aioauth
5b2e0d7856fd7fb154744cd58580953d776a3be2
[ "MIT" ]
null
null
null
tests/test_endpoint.py
mister-px/aioauth
5b2e0d7856fd7fb154744cd58580953d776a3be2
[ "MIT" ]
null
null
null
import time from http import HTTPStatus from typing import Dict, List, Optional, Type import pytest from aioauth.storage import BaseStorage from aioauth.config import Settings from aioauth.models import Token from aioauth.requests import Post, Request from aioauth.server import AuthorizationServer from aioauth.types i...
30.25731
84
0.71724
import time from http import HTTPStatus from typing import Dict, List, Optional, Type import pytest from aioauth.storage import BaseStorage from aioauth.config import Settings from aioauth.models import Token from aioauth.requests import Post, Request from aioauth.server import AuthorizationServer from aioauth.types i...
true
true
f70e3aebcb471040075ff1af77b959a95a47b028
76
py
Python
ABC051/ABC051d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC051/ABC051d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC051/ABC051d.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
#ABC051d import sys input = sys.stdin.readline sys.setrecursionlimit(10**6)
15.2
28
0.789474
import sys input = sys.stdin.readline sys.setrecursionlimit(10**6)
true
true
f70e3bfbca3e4580c37fe084878699c2caa37041
761
py
Python
migrations/versions/0256_set_postage_tmplt_hstr.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
51
2016-04-03T23:36:17.000Z
2022-03-21T20:04:52.000Z
migrations/versions/0256_set_postage_tmplt_hstr.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
1,335
2015-12-15T14:28:50.000Z
2022-03-30T16:24:27.000Z
migrations/versions/0256_set_postage_tmplt_hstr.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
30
2016-01-08T19:05:32.000Z
2021-12-20T16:37:23.000Z
""" Revision ID: 0256_set_postage_tmplt_hstr Revises: 0255_another_letter_org Create Date: 2019-02-05 14:51:30.808067 """ from alembic import op import sqlalchemy as sa revision = '0256_set_postage_tmplt_hstr' down_revision = '0255_another_letter_org' def upgrade(): # ### commands auto generated by Alembic - ...
26.241379
92
0.703022
from alembic import op import sqlalchemy as sa revision = '0256_set_postage_tmplt_hstr' down_revision = '0255_another_letter_org' def upgrade():
true
true
f70e3d7e95f5b635f46315e7f8048937f6857a83
6,096
py
Python
Filters/Geometry/Testing/Python/geomFilter.py
cclauss/VTK
f62a52cce9044159efb4adb7cc0cfd7ec0bc8b6d
[ "BSD-3-Clause" ]
1,755
2015-01-03T06:55:00.000Z
2022-03-29T05:23:26.000Z
Filters/Geometry/Testing/Python/geomFilter.py
cclauss/VTK
f62a52cce9044159efb4adb7cc0cfd7ec0bc8b6d
[ "BSD-3-Clause" ]
29
2015-04-23T20:58:30.000Z
2022-03-02T16:16:42.000Z
Filters/Geometry/Testing/Python/geomFilter.py
cclauss/VTK
f62a52cce9044159efb4adb7cc0cfd7ec0bc8b6d
[ "BSD-3-Clause" ]
1,044
2015-01-05T22:48:27.000Z
2022-03-31T02:38:26.000Z
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() import sys # create pipeline - structured grid # pl3d = vtk.vtkMultiBlockPLOT3DReader() pl3d.SetXYZFileName("" + str(VTK_DATA_ROOT) + "/Data/combxyz.bin") pl3d.SetQFileName("" + str(VTK_DATA_ROOT) + "/Data/combq....
30.633166
81
0.781988
import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() import sys pl3d = vtk.vtkMultiBlockPLOT3DReader() pl3d.SetXYZFileName("" + str(VTK_DATA_ROOT) + "/Data/combxyz.bin") pl3d.SetQFileName("" + str(VTK_DATA_ROOT) + "/Data/combq.bin") pl3d.SetScalarFunctionNumber(100) pl3d.SetVectorFun...
true
true
f70e3dd26401020ef35bf9b9bb3093878a91618e
7,540
py
Python
algorithms/refinement/parameterisation/scan_varying_crystal_parameters.py
Anthchirp/dials
211cf7646d6711769b86643b010cb2fe5aaf71b9
[ "BSD-3-Clause" ]
null
null
null
algorithms/refinement/parameterisation/scan_varying_crystal_parameters.py
Anthchirp/dials
211cf7646d6711769b86643b010cb2fe5aaf71b9
[ "BSD-3-Clause" ]
2
2020-07-31T22:37:30.000Z
2020-07-31T23:08:55.000Z
algorithms/refinement/parameterisation/scan_varying_crystal_parameters.py
Anthchirp/dials
211cf7646d6711769b86643b010cb2fe5aaf71b9
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, print_function from scitbx import matrix from dials.algorithms.refinement.parameterisation.scan_varying_model_parameters import ( ScanVaryingParameterSet, ScanVaryingModelParameterisation, GaussianSmoother, ) from dials.algorithms.refinement.parameterisation...
34.907407
88
0.650265
from __future__ import absolute_import, division, print_function from scitbx import matrix from dials.algorithms.refinement.parameterisation.scan_varying_model_parameters import ( ScanVaryingParameterSet, ScanVaryingModelParameterisation, GaussianSmoother, ) from dials.algorithms.refinement.parameterisation...
true
true
f70e40e0d8599737f2ce1ae11e3f0c3f5397ee5f
12,933
py
Python
electrumsv/gui/qt/console.py
Breavyn/electrumsv
c28f3dcbf7da29877ff0d90fe61c86a07f84e314
[ "MIT" ]
null
null
null
electrumsv/gui/qt/console.py
Breavyn/electrumsv
c28f3dcbf7da29877ff0d90fe61c86a07f84e314
[ "MIT" ]
null
null
null
electrumsv/gui/qt/console.py
Breavyn/electrumsv
c28f3dcbf7da29877ff0d90fe61c86a07f84e314
[ "MIT" ]
null
null
null
# ElectrumSV - lightweight BitcoinSV client # Copyright (C) 2012 thomasv@gitorious # Copyright (C) 2019-2020 The ElectrumSV Developers # # 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 withou...
33.856021
97
0.586716
import os import re import sys import traceback from PyQt5 import QtCore, QtWidgets from PyQt5.QtGui import QFont, QTextCursor, QTextOption from electrumsv import util from electrumsv.i18n import _ from electrumsv.logs import logs from electrumsv.platform import platform logger = logs.get_...
true
true
f70e414416ca8304fe30e26ffa6f6350cd2d5994
686
py
Python
text/main_part.py
Goodjooy/AzurLane-GirlFrontLine-PaintingRestore
1245ff752c88ca2b2ffe6fa31ea049e2ed6f379b
[ "MIT" ]
49
2018-11-25T08:58:19.000Z
2022-01-07T12:07:08.000Z
text/main_part.py
swordfate3/AzurLane-PaintingExtract
4702f3529d6e86a8aa0e9fde7b62ac54b4b2c9b4
[ "MIT" ]
4
2018-12-30T05:42:12.000Z
2021-06-03T11:05:28.000Z
text/main_part.py
swordfate3/AzurLane-PaintingExtract
4702f3529d6e86a8aa0e9fde7b62ac54b4b2c9b4
[ "MIT" ]
9
2019-02-13T05:53:55.000Z
2020-07-19T09:43:43.000Z
import pygame import os import holder as ch import time textAsset = [] texture2D = os.listdir('texture2D') textAsset = os.listdir('textAsset') text_ = [] for text in textAsset: text_.append(text.split('.')) textAsset = [] for text in text_: textAsset.append(text[0]) textAsset = set(textAsset) te...
19.6
62
0.637026
import pygame import os import holder as ch import time textAsset = [] texture2D = os.listdir('texture2D') textAsset = os.listdir('textAsset') text_ = [] for text in textAsset: text_.append(text.split('.')) textAsset = [] for text in text_: textAsset.append(text[0]) textAsset = set(textAsset) te...
true
true
f70e4148ccdd54d9e830afa9548c8b7779db1fd7
1,659
py
Python
pyramid_oereb/standard/xtf_import/public_law_restriction.py
pvalsecc/pyramid_oereb
3d9a8a68952641e923c34e086768630e21a559ed
[ "BSD-2-Clause" ]
null
null
null
pyramid_oereb/standard/xtf_import/public_law_restriction.py
pvalsecc/pyramid_oereb
3d9a8a68952641e923c34e086768630e21a559ed
[ "BSD-2-Clause" ]
3
2019-12-26T17:00:44.000Z
2022-03-21T22:16:54.000Z
pyramid_oereb/standard/xtf_import/public_law_restriction.py
pvalsecc/pyramid_oereb
3d9a8a68952641e923c34e086768630e21a559ed
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from pyramid_oereb.standard.xtf_import.util import parse_string, parse_multilingual_text, parse_ref class PublicLawRestriction(object): TAG_INFORMATION = 'Aussage' TAG_SUB_THEME = 'SubThema' TAG_OTHER_THEME = 'WeiteresThema' TAG_TYPE_CODE = 'ArtCode' TAG_TYPE_CODE_LIST = '...
44.837838
99
0.729355
from pyramid_oereb.standard.xtf_import.util import parse_string, parse_multilingual_text, parse_ref class PublicLawRestriction(object): TAG_INFORMATION = 'Aussage' TAG_SUB_THEME = 'SubThema' TAG_OTHER_THEME = 'WeiteresThema' TAG_TYPE_CODE = 'ArtCode' TAG_TYPE_CODE_LIST = 'ArtCodeliste' TAG_L...
true
true
f70e414afae0a9937a03b34fc3512400c7b8aae8
5,396
py
Python
SUP_INS_ANCH.py
AndrzejLach89/Plant-3D-scripts
7c85dc1d3dba498b27f292266235f30d405f86b9
[ "MIT" ]
null
null
null
SUP_INS_ANCH.py
AndrzejLach89/Plant-3D-scripts
7c85dc1d3dba498b27f292266235f30d405f86b9
[ "MIT" ]
null
null
null
SUP_INS_ANCH.py
AndrzejLach89/Plant-3D-scripts
7c85dc1d3dba498b27f292266235f30d405f86b9
[ "MIT" ]
null
null
null
# Created by Andrzej Lach @ 2021 # https://github.com/AndrzejLach89 from aqa.math import * from varmain.primitiv import * from varmain.custom import * import math @activate(Group="Support", Ports=1, TooltipShort="Support - insulated, anchor", TooltipLong="Support - insulated, anchor", LengthUnit="mm") @group("MainD...
40.571429
140
0.561527
from aqa.math import * from varmain.primitiv import * from varmain.custom import * import math @activate(Group="Support", Ports=1, TooltipShort="Support - insulated, anchor", TooltipLong="Support - insulated, anchor", LengthUnit="mm") @group("MainDimensions") @param(D=LENGTH, TooltipShort="Pipe diameter") @param(...
true
true
f70e415380567b1032e640d739af9444d9165b7a
443
py
Python
packages/util/galaxy/project_galaxy_util.py
lesperry/Metagenomics
a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6
[ "CC-BY-3.0" ]
null
null
null
packages/util/galaxy/project_galaxy_util.py
lesperry/Metagenomics
a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6
[ "CC-BY-3.0" ]
null
null
null
packages/util/galaxy/project_galaxy_util.py
lesperry/Metagenomics
a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6
[ "CC-BY-3.0" ]
null
null
null
# -*- coding: utf-8 -*- __version__ = '20.9.1.dev0' PROJECT_NAME = "galaxy-util" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Generic Utilities' PROJECT_EMAIL = 'galaxy-committers...
31.642857
60
0.751693
__version__ = '20.9.1.dev0' PROJECT_NAME = "galaxy-util" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Generic Utilities' PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.or...
true
true
f70e41fe8b6a7280ec30203c0e44352f5f5fd21d
2,980
py
Python
src/easylearner/useless_learner.py
renaudbougues/continuous-deep-q-learning
a96e1d9019a7291cc937de37404f2af71eaa2e32
[ "MIT" ]
1
2016-08-02T17:22:33.000Z
2016-08-02T17:22:33.000Z
src/easylearner/useless_learner.py
renaudbougues/continuous-deep-q-learning
a96e1d9019a7291cc937de37404f2af71eaa2e32
[ "MIT" ]
6
2016-10-02T00:18:52.000Z
2016-10-02T00:22:59.000Z
src/easylearner/useless_learner.py
renaudbougues/continuous-deep-q-learning
a96e1d9019a7291cc937de37404f2af71eaa2e32
[ "MIT" ]
null
null
null
''' Training a trivial parametric monomial function "wx" (with no bias parameter) to approximate the true hypothesis f(x)= 2x given 3 datapoints of observation (1, 2),(2, 4),(3, 6) This learner has no practical usage (hence, its name). We are using non-stochastic gradient descent and running weig...
31.368421
127
0.642617
''' Training a trivial parametric monomial function "wx" (with no bias parameter) to approximate the true hypothesis f(x)= 2x given 3 datapoints of observation (1, 2),(2, 4),(3, 6) This learner has no practical usage (hence, its name). We are using non-stochastic gradient descent and running weig...
false
true