hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f70a5536b187b95499372854a9278b60efced3b0
788
py
Python
merge-sort/merge_sort/merge_sort.py
doaa-1996/Data-structures-and-algorithms1
5b2b4e1ece2f6671770dac80a95b662345106f49
[ "MIT" ]
1
2021-06-22T12:26:13.000Z
2021-06-22T12:26:13.000Z
merge-sort/merge_sort/merge_sort.py
doaa-1996/data-structures-and-algorithms
5b2b4e1ece2f6671770dac80a95b662345106f49
[ "MIT" ]
null
null
null
merge-sort/merge_sort/merge_sort.py
doaa-1996/data-structures-and-algorithms
5b2b4e1ece2f6671770dac80a95b662345106f49
[ "MIT" ]
null
null
null
def mergeSort(arr): n= len(arr) if n > 1: mid = int(n/2) left = arr[0:mid] right = arr[mid:n] mergeSort(left) mergeSort(right) Merge(left, right, arr) def Merge(left, right, arr): i = 0 j = 0 k = 0 while i < len(left) and j < len(right): if...
20.736842
43
0.413706
def mergeSort(arr): n= len(arr) if n > 1: mid = int(n/2) left = arr[0:mid] right = arr[mid:n] mergeSort(left) mergeSort(right) Merge(left, right, arr) def Merge(left, right, arr): i = 0 j = 0 k = 0 while i < len(left) and j < len(right): if...
true
true
f70a5558a78b0bae5dd9be819598d90e827a8312
624
py
Python
sphinxpapyrus/docxbuilder/nodes/important.py
amarin/sphinxpapyrus-docxbuilder
0fd00a0c5467554d0a2b5ad9cd93ab780511f1a3
[ "MIT" ]
null
null
null
sphinxpapyrus/docxbuilder/nodes/important.py
amarin/sphinxpapyrus-docxbuilder
0fd00a0c5467554d0a2b5ad9cd93ab780511f1a3
[ "MIT" ]
null
null
null
sphinxpapyrus/docxbuilder/nodes/important.py
amarin/sphinxpapyrus-docxbuilder
0fd00a0c5467554d0a2b5ad9cd93ab780511f1a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Translate docutils node important formatting. each important start will processed with visit() and finished with depart() """ from docutils.nodes import Node from sphinxpapyrus.docxbuilder.translator import DocxTranslator node_name = "important" def visit(visitor: DocxTranslator, node: N...
27.130435
75
0.75
from docutils.nodes import Node from sphinxpapyrus.docxbuilder.translator import DocxTranslator node_name = "important" def visit(visitor: DocxTranslator, node: Node): assert isinstance(visitor, DocxTranslator) assert isinstance(node, Node) def depart(visitor: DocxTranslator, node: Node): assert isin...
true
true
f70a55c9bd6446009caf8957e8cedb97d86a3592
3,679
py
Python
setup.py
speezepearson/pow
7c86a36134cb90bfcf6e2740c4293d629b6021a1
[ "MIT" ]
5
2017-10-31T00:17:30.000Z
2017-11-11T00:53:08.000Z
setup.py
speezepearson/prpg
7c86a36134cb90bfcf6e2740c4293d629b6021a1
[ "MIT" ]
null
null
null
setup.py
speezepearson/prpg
7c86a36134cb90bfcf6e2740c4293d629b6021a1
[ "MIT" ]
null
null
null
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'README.markdown'), encoding='utf-8')...
36.425743
94
0.665398
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.markdown'), encoding='utf-8') as f: long_description = f.read() setup( name='prpg', version='0.4.1', description='A...
true
true
f70a56767a954b3cb026e141fd9f582d9f92fc11
847
py
Python
djangoPharma/app/templatetags/app_tags.py
thodoris/djangoPharma
76089e67bc9940651a876d078879469127f5ac66
[ "Apache-2.0" ]
null
null
null
djangoPharma/app/templatetags/app_tags.py
thodoris/djangoPharma
76089e67bc9940651a876d078879469127f5ac66
[ "Apache-2.0" ]
null
null
null
djangoPharma/app/templatetags/app_tags.py
thodoris/djangoPharma
76089e67bc9940651a876d078879469127f5ac66
[ "Apache-2.0" ]
null
null
null
from django import template from django.contrib.auth.models import Group register = template.Library() @register.filter(name='has_group') def has_group(user, group_name): try: group = Group.objects.get(name=group_name) except: return False # group doesn't exist, so for sure the user isn't par...
29.206897
89
0.706021
from django import template from django.contrib.auth.models import Group register = template.Library() @register.filter(name='has_group') def has_group(user, group_name): try: group = Group.objects.get(name=group_name) except: return False if user.is_superuser: return True ...
true
true
f70a58845e40a18b54f35acaaa0caa0a007ce791
265
py
Python
demo_app/config/desktop.py
ravik0007/erpapp_tasks
bafd1de9bbf6889e639320b15c6e7c52124ba05b
[ "MIT" ]
null
null
null
demo_app/config/desktop.py
ravik0007/erpapp_tasks
bafd1de9bbf6889e639320b15c6e7c52124ba05b
[ "MIT" ]
null
null
null
demo_app/config/desktop.py
ravik0007/erpapp_tasks
bafd1de9bbf6889e639320b15c6e7c52124ba05b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Demo App", "color": "grey", "icon": "octicon octicon-file-directory", "type": "module", "label": _("Demo App") } ]
17.666667
44
0.607547
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Demo App", "color": "grey", "icon": "octicon octicon-file-directory", "type": "module", "label": _("Demo App") } ]
true
true
f70a5b9b2e7e749c433cad42920bd0cd17d8c944
4,446
py
Python
src/pretix/plugins/sendmail/forms.py
sker152/pretix
92754136a653453d00f0b95cdefac533fec5e1ba
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/plugins/sendmail/forms.py
sker152/pretix
92754136a653453d00f0b95cdefac533fec5e1ba
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/plugins/sendmail/forms.py
sker152/pretix
92754136a653453d00f0b95cdefac533fec5e1ba
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from django import forms from django.urls import reverse from django.utils.translation import pgettext_lazy, ugettext_lazy as _ from i18nfield.forms import I18nFormField, I18nTextarea, I18nTextInput from pretix.base.email import get_available_placeholders from pretix.base.forms import PlaceholderValidator from pretix....
39
118
0.587494
from django import forms from django.urls import reverse from django.utils.translation import pgettext_lazy, ugettext_lazy as _ from i18nfield.forms import I18nFormField, I18nTextarea, I18nTextInput from pretix.base.email import get_available_placeholders from pretix.base.forms import PlaceholderValidator from pretix....
true
true
f70a5c3041d88ac442f82714d37a6a78ffa82afd
14,503
py
Python
bases_2021_1S/Grupo 03/parserT28/models/instructions/Expression/trigonometric_functions.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
bases_2021_1S/Grupo 03/parserT28/models/instructions/Expression/trigonometric_functions.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
bases_2021_1S/Grupo 03/parserT28/models/instructions/Expression/trigonometric_functions.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from parserT28.models.instructions.Expression.type_enum import DATA_TYPE from parserT28.controllers.three_address_code import ThreeAddressCode from parserT28.controllers.error_controller import ErrorController from parserT28.models.instructions.Expression.expression import Expression, Identifiers, PrimitiveData from pa...
46.187898
102
0.524581
from parserT28.models.instructions.Expression.type_enum import DATA_TYPE from parserT28.controllers.three_address_code import ThreeAddressCode from parserT28.controllers.error_controller import ErrorController from parserT28.models.instructions.Expression.expression import Expression, Identifiers, PrimitiveData from pa...
true
true
f70a5c8395fa19831b0e3bd7d8affacab5114e5c
5,465
py
Python
docs/conf.py
kattni/Adafruit_CircuitPython_MatrixKeypad
cbe0474ca08ce0b9beaf7322ecda487d8db9a5fe
[ "MIT" ]
null
null
null
docs/conf.py
kattni/Adafruit_CircuitPython_MatrixKeypad
cbe0474ca08ce0b9beaf7322ecda487d8db9a5fe
[ "MIT" ]
null
null
null
docs/conf.py
kattni/Adafruit_CircuitPython_MatrixKeypad
cbe0474ca08ce0b9beaf7322ecda487d8db9a5fe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extens...
33.734568
324
0.69021
import os import sys sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.napoleon', 'sphinx.ext.todo', ] intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedo...
true
true
f70a5d79a04061ba9e020a7854cb72fde0f00f28
8,923
py
Python
DeutschlandStadtLandFluss/generateAnkiDeck.py
SoerenSofke/Anki
533b3d340f441582d094b04cfa1eb4d99bd7a8d0
[ "CC0-1.0" ]
null
null
null
DeutschlandStadtLandFluss/generateAnkiDeck.py
SoerenSofke/Anki
533b3d340f441582d094b04cfa1eb4d99bd7a8d0
[ "CC0-1.0" ]
null
null
null
DeutschlandStadtLandFluss/generateAnkiDeck.py
SoerenSofke/Anki
533b3d340f441582d094b04cfa1eb4d99bd7a8d0
[ "CC0-1.0" ]
null
null
null
import genanki import glob from pathlib import Path import random def generateAnki(): random.seed(42) title = 'Deutschland - Stadt, Land, Fluss' aDeck = genanki.Deck( 2059400110, title) # location to name aModel = genanki.Model( 1607392319, title, fields=[...
26.876506
240
0.419029
import genanki import glob from pathlib import Path import random def generateAnki(): random.seed(42) title = 'Deutschland - Stadt, Land, Fluss' aDeck = genanki.Deck( 2059400110, title) aModel = genanki.Model( 1607392319, title, fields=[ {'nam...
true
true
f70a5d9047d00493189d08971cef9c2e994138ee
11,060
py
Python
src/oci/logging/models/create_unified_agent_configuration_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/logging/models/create_unified_agent_configuration_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/logging/models/create_unified_agent_configuration_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
36.866667
245
0.687703
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class CreateUnifiedAgentConfigurationDetails(object): def __init__(self, **kwargs): self.swagger_types = { ...
true
true
f70a5f5db5f4952721a9c7dd0511c372f9948851
2,041
py
Python
whatsapp-bot-venv/Lib/site-packages/twilio/base/serialize.py
RedaMastouri/ConversationalPythonicChatBot
f204276d4b80348d42091b17d1a7d9eea33fb4e0
[ "MIT" ]
1,362
2015-01-04T10:25:18.000Z
2022-03-24T10:07:08.000Z
whatsapp-bot-venv/Lib/site-packages/twilio/base/serialize.py
RedaMastouri/ConversationalPythonicChatBot
f204276d4b80348d42091b17d1a7d9eea33fb4e0
[ "MIT" ]
299
2015-01-30T09:52:39.000Z
2022-03-31T23:03:02.000Z
bot/lib/python3.7/site-packages/twilio/base/serialize.py
carlosrh18/DavinciBot
d73a6b7f68d7bab25d134d3f85c6b63a86c206c5
[ "MIT" ]
622
2015-01-03T04:43:09.000Z
2022-03-29T14:11:00.000Z
import datetime import json from twilio.base import values def iso8601_date(d): """ Return a string representation of a date that the Twilio API understands Format is YYYY-MM-DD. Returns None if d is not a string, datetime, or date """ if d == values.unset: return d elif isinstance(d,...
24.590361
78
0.602646
import datetime import json from twilio.base import values def iso8601_date(d): if d == values.unset: return d elif isinstance(d, datetime.datetime): return str(d.date()) elif isinstance(d, datetime.date): return str(d) elif isinstance(d, str): return d def iso8601_d...
true
true
f70a6146604ae77580af15ad77d5692ec2f498f1
4,713
py
Python
tests/test_dialects.py
blthree/sqlglot
c3130584db6d767575854ba0d57da37e026863c9
[ "MIT" ]
null
null
null
tests/test_dialects.py
blthree/sqlglot
c3130584db6d767575854ba0d57da37e026863c9
[ "MIT" ]
null
null
null
tests/test_dialects.py
blthree/sqlglot
c3130584db6d767575854ba0d57da37e026863c9
[ "MIT" ]
null
null
null
import unittest from sqlglot import transpile from sqlglot.errors import ErrorLevel, UnsupportedError class TestDialects(unittest.TestCase): def test_mysql(self): sql = transpile('SELECT CAST(`a`.`b` AS INT) FROM foo', read='mysql', write='mysql')[0] self.assertEqual(sql, 'SELECT CAST(`a`.`b` AS I...
46.663366
107
0.611288
import unittest from sqlglot import transpile from sqlglot.errors import ErrorLevel, UnsupportedError class TestDialects(unittest.TestCase): def test_mysql(self): sql = transpile('SELECT CAST(`a`.`b` AS INT) FROM foo', read='mysql', write='mysql')[0] self.assertEqual(sql, 'SELECT CAST(`a`.`b` AS I...
true
true
f70a6173c8c03d653e854b67508634dd8a582875
189
py
Python
tools/pathutils.py
Laogeodritt/KazTron
42f35e520875b458ffde7c2729865c95de606aca
[ "MIT" ]
6
2018-07-04T20:41:01.000Z
2021-09-08T08:10:34.000Z
tools/pathutils.py
Laogeodritt/KazTron
42f35e520875b458ffde7c2729865c95de606aca
[ "MIT" ]
259
2018-05-01T22:41:32.000Z
2022-02-08T23:25:00.000Z
tools/pathutils.py
Laogeodritt/KazTron
42f35e520875b458ffde7c2729865c95de606aca
[ "MIT" ]
6
2019-04-16T22:13:15.000Z
2021-12-15T08:06:38.000Z
from pathlib import Path import sys import os def add_application_path(): app_path = Path(__file__).resolve().parents[1] sys.path.append(str(app_path)) os.chdir(str(app_path))
21
50
0.730159
from pathlib import Path import sys import os def add_application_path(): app_path = Path(__file__).resolve().parents[1] sys.path.append(str(app_path)) os.chdir(str(app_path))
true
true
f70a6277163e65611b36ebc3dd064be9f81de3f7
1,159
py
Python
web/addons/hr_holidays/tests/__init__.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
web/addons/hr_holidays/tests/__init__.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
web/addons/hr_holidays/tests/__init__.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
39.965517
78
0.630716
true
true
f70a627d9cb818695d9704ab57ce2d2dce8ac924
248
py
Python
plex_notifier/__init__.py
sudoursa/plex_notifier
d0c7123d23b7e5a37ef5ad4ca0ab2c324d9c2332
[ "MIT" ]
1
2018-01-22T21:25:40.000Z
2018-01-22T21:25:40.000Z
plex_notifier/__init__.py
sudoursa/plex_notifier
d0c7123d23b7e5a37ef5ad4ca0ab2c324d9c2332
[ "MIT" ]
16
2018-01-22T15:22:26.000Z
2018-01-27T22:18:12.000Z
plex_notifier/__init__.py
sudoursa/plex_notifier
d0c7123d23b7e5a37ef5ad4ca0ab2c324d9c2332
[ "MIT" ]
1
2018-01-28T23:49:10.000Z
2018-01-28T23:49:10.000Z
""" importing public methods """ from .plex_auth import connect_to_plex from .plex_movies import return_movies from .plex_tv import return_tv from .plex_users import get_emails from .plex_users import unsub_emails from .plex_email import send_mail
24.8
38
0.834677
from .plex_auth import connect_to_plex from .plex_movies import return_movies from .plex_tv import return_tv from .plex_users import get_emails from .plex_users import unsub_emails from .plex_email import send_mail
true
true
f70a628c1ce95ca174fbb067a483d898b989003d
1,265
py
Python
_unittests/ut_packaged/test_LONG_script_install.py
sdpython/pymyinstall
72b3a56a29def0694e34ccae910bf288a95cf4a5
[ "MIT" ]
8
2015-08-24T21:01:49.000Z
2018-01-04T06:34:51.000Z
_unittests/ut_packaged/test_LONG_script_install.py
sdpython/pymyinstall
72b3a56a29def0694e34ccae910bf288a95cf4a5
[ "MIT" ]
66
2015-06-14T22:04:58.000Z
2021-11-11T13:46:03.000Z
_unittests/ut_packaged/test_LONG_script_install.py
sdpython/pymyinstall
72b3a56a29def0694e34ccae910bf288a95cf4a5
[ "MIT" ]
5
2016-09-13T18:14:46.000Z
2021-08-23T12:03:28.000Z
""" @brief test log(time=2s) """ import unittest import warnings from pyquickhelper.loghelper import fLOG class TestLONGScriptInstall(unittest.TestCase): def test_pypi(self): fLOG( __file__, self._testMethodName, OutputPrint=__name__ == "__main__") import...
30.119048
72
0.527273
import unittest import warnings from pyquickhelper.loghelper import fLOG class TestLONGScriptInstall(unittest.TestCase): def test_pypi(self): fLOG( __file__, self._testMethodName, OutputPrint=__name__ == "__main__") import xmlrpc.client as xmlrpc_client ...
true
true
f70a6377aa4fa71b8438d2f648431ccecf2a659a
1,216
py
Python
ambassador/views.py
cforcross/django-vue-admin
269ba3047b6762c565d9a4c306efc86c3ffd4867
[ "MIT" ]
null
null
null
ambassador/views.py
cforcross/django-vue-admin
269ba3047b6762c565d9a4c306efc86c3ffd4867
[ "MIT" ]
null
null
null
ambassador/views.py
cforcross/django-vue-admin
269ba3047b6762c565d9a4c306efc86c3ffd4867
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import exceptions from common.serializers import UserSerializer from core.models import User,Product,Link,OrderItem,Order from common.authentication import JWTAuthentication from...
39.225806
65
0.754112
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import exceptions from common.serializers import UserSerializer from core.models import User,Product,Link,OrderItem,Order from common.authentication import JWTAuthentication from...
true
true
f70a649a6c145f8eae91526b87cd9cfca92cdb65
679
py
Python
pyglet/window/cocoa/systemcursor.py
seeminglee/pyglet64
3dd167b5b0d3ad132a157e404586e53c2bb21736
[ "BSD-3-Clause" ]
1
2016-01-09T03:47:39.000Z
2016-01-09T03:47:39.000Z
pyglet/window/cocoa/systemcursor.py
seeminglee/pyglet64
3dd167b5b0d3ad132a157e404586e53c2bb21736
[ "BSD-3-Clause" ]
null
null
null
pyglet/window/cocoa/systemcursor.py
seeminglee/pyglet64
3dd167b5b0d3ad132a157e404586e53c2bb21736
[ "BSD-3-Clause" ]
null
null
null
from pyglet.libs.darwin.objc_runtime import * # This class is a wrapper around NSCursor which prevents us from # sending too many hide or unhide messages in a row. Apparently # NSCursor treats them like retain/release messages, which can be # problematic when we are e.g. switching between window & fullscreen. class S...
35.736842
69
0.693667
from pyglet.libs.darwin.objc_runtime import * class SystemCursor: cursor_is_hidden = False @classmethod def hide(cls): if not cls.cursor_is_hidden: send_message('NSCursor', 'hide') cls.cursor_is_hidden = True @classmethod def unhide(cls): if cls.cursor_is...
true
true
f70a67ae0050e3dd5dbc7ea33789132d8704dd2b
269
py
Python
src/pycounts_polluxtroy3758/__init__.py
polluxtroy3758/pycounts
92bcbdb2609eb543c631293c7cf3babb0472565c
[ "MIT" ]
null
null
null
src/pycounts_polluxtroy3758/__init__.py
polluxtroy3758/pycounts
92bcbdb2609eb543c631293c7cf3babb0472565c
[ "MIT" ]
null
null
null
src/pycounts_polluxtroy3758/__init__.py
polluxtroy3758/pycounts
92bcbdb2609eb543c631293c7cf3babb0472565c
[ "MIT" ]
null
null
null
# read version from installed package from importlib.metadata import version __version__ = version("pycounts_polluxtroy3758") from pycounts_polluxtroy3758.plotting import plot_words # noqa: F401 from pycounts_polluxtroy3758.pycounts import count_words # noqa: F401
33.625
70
0.836431
from importlib.metadata import version __version__ = version("pycounts_polluxtroy3758") from pycounts_polluxtroy3758.plotting import plot_words from pycounts_polluxtroy3758.pycounts import count_words
true
true
f70a68ac62bf6c61cd21de3ffd41d24a77bdf900
11,410
py
Python
examples/adminapi.py
fkaufer/confluent-kafka-python
c4ff376cdbfba41b08806df8e4a68d68f953b593
[ "Apache-2.0" ]
1
2018-07-23T15:01:15.000Z
2018-07-23T15:01:15.000Z
examples/adminapi.py
AkuDTA/confluent-kafka-python
e4f7bb6d2feeae33ec1aa69f49bc3277265dba48
[ "Apache-2.0" ]
1
2018-06-14T19:53:56.000Z
2018-06-14T19:53:56.000Z
examples/adminapi.py
AkuDTA/confluent-kafka-python
e4f7bb6d2feeae33ec1aa69f49bc3277265dba48
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2018 Confluent 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...
36.453674
113
0.627695
from confluent_kafka.admin import AdminClient, NewTopic, NewPartitions, ConfigResource, ConfigEntry from confluent_kafka import KafkaException import sys import threading import logging logging.basicConfig() def example_create_topics(a, topics): new_topics = [NewTopic(topic, num_partitions=...
true
true
f70a6906b34d328a586c5a69de02ca915b6ad0ee
5,457
py
Python
fixit/cli/run_rules.py
isidentical/Fixit
e9bd1bcce14922d44086ee31798959b302377338
[ "Apache-2.0" ]
null
null
null
fixit/cli/run_rules.py
isidentical/Fixit
e9bd1bcce14922d44086ee31798959b302377338
[ "Apache-2.0" ]
null
null
null
fixit/cli/run_rules.py
isidentical/Fixit
e9bd1bcce14922d44086ee31798959b302377338
[ "Apache-2.0" ]
1
2020-09-09T09:57:35.000Z
2020-09-09T09:57:35.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # Usage: # # $ python -m fixit.cli.run_rules --help # $ python -m fixit.cli.run_rules # $ python -m fixit.cli.run_rules --rules AvoidOrI...
31.912281
100
0.68206
import argparse import itertools import shutil import sys import time from dataclasses import dataclass from pathlib import Path from typing import TYPE_CHECKING, Iterable, Mapping, Optional, Sequence from libcst import ParserSyntaxError, parse_module from libcst.metadata import MetadataWrapper from fix...
true
true
f70a695a360de2a4638bc8fac6801bae01f235ff
19,184
py
Python
gym/envs/__init__.py
Jekyll1021/gym
1701741df2e6ae9a762fe647122ee8344f586bc9
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
gym/envs/__init__.py
Jekyll1021/gym
1701741df2e6ae9a762fe647122ee8344f586bc9
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
gym/envs/__init__.py
Jekyll1021/gym
1701741df2e6ae9a762fe647122ee8344f586bc9
[ "Python-2.0", "OLDAP-2.7" ]
null
null
null
from gym.envs.registration import registry, register, make, spec # Algorithmic # ---------------------------------------- register( id='Copy-v0', entry_point='gym.envs.algorithmic:CopyEnv', max_episode_steps=200, reward_threshold=25.0, ) register( id='RepeatCopy-v0', entry_point='gym.envs.alg...
26.868347
151
0.634122
from gym.envs.registration import registry, register, make, spec register( id='Copy-v0', entry_point='gym.envs.algorithmic:CopyEnv', max_episode_steps=200, reward_threshold=25.0, ) register( id='RepeatCopy-v0', entry_point='gym.envs.algorithmic:RepeatCopyEnv', max_episode_steps=200, ...
true
true
f70a6966c8f433d99412dfc5c6bb2b7a62863608
347
py
Python
topicnet/cooking_machine/recipes/__init__.py
DmitriyValetov/TopicNet
b450606ce6cdf2b1f75280112627666f325b1b2c
[ "MIT" ]
null
null
null
topicnet/cooking_machine/recipes/__init__.py
DmitriyValetov/TopicNet
b450606ce6cdf2b1f75280112627666f325b1b2c
[ "MIT" ]
null
null
null
topicnet/cooking_machine/recipes/__init__.py
DmitriyValetov/TopicNet
b450606ce6cdf2b1f75280112627666f325b1b2c
[ "MIT" ]
null
null
null
from .multimodal_exploratory_search_pipeline import MultimodalSearchRecipe from .artm_baseline_pipeline import BaselineRecipe from .exploratory_search_pipeline import SearchRecipe from .artm_baseline_pipeline import ARTM_baseline_template as ARTM_baseline from .exploratory_search_pipeline import exploratory_search_temp...
57.833333
90
0.916427
from .multimodal_exploratory_search_pipeline import MultimodalSearchRecipe from .artm_baseline_pipeline import BaselineRecipe from .exploratory_search_pipeline import SearchRecipe from .artm_baseline_pipeline import ARTM_baseline_template as ARTM_baseline from .exploratory_search_pipeline import exploratory_search_temp...
true
true
f70a69b8a7b993da0e40d67273f8006f8f15f747
2,299
py
Python
grr/parsers/windows_persistence_test.py
StanislavParovoy/GRR
7cdf490f9be2ccc0a8160c9b8ae23b73922049d5
[ "Apache-2.0" ]
5
2017-03-17T08:25:09.000Z
2022-02-22T05:28:14.000Z
grr/parsers/windows_persistence_test.py
StanislavParovoy/GRR
7cdf490f9be2ccc0a8160c9b8ae23b73922049d5
[ "Apache-2.0" ]
null
null
null
grr/parsers/windows_persistence_test.py
StanislavParovoy/GRR
7cdf490f9be2ccc0a8160c9b8ae23b73922049d5
[ "Apache-2.0" ]
3
2018-12-07T07:04:37.000Z
2022-02-22T05:28:16.000Z
#!/usr/bin/env python """Tests for grr.parsers.windows_persistence.""" from grr.lib import flags from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdfvalues import paths as rdf_paths from grr.lib.rdfvalues import protodict as rdf_protodict from gr...
33.808824
77
0.683776
from grr.lib import flags from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdfvalues import paths as rdf_paths from grr.lib.rdfvalues import protodict as rdf_protodict from grr.parsers import windows_persistence class WindowsPersistenceMechani...
true
true
f70a6a6b45048c2b9550d17284e2cbac8687e10a
1,656
py
Python
kafka-python-console-sample/consumertask.py
IBM-CSM/event-streams-samples
ce90b1f7f57f3d2afff0596b3f4610392c025ece
[ "Apache-2.0" ]
39
2015-10-13T21:41:25.000Z
2018-08-14T12:29:48.000Z
kafka-python-console-sample/consumertask.py
IBM-CSM/event-streams-samples
ce90b1f7f57f3d2afff0596b3f4610392c025ece
[ "Apache-2.0" ]
22
2016-05-06T15:30:43.000Z
2018-09-12T06:59:49.000Z
kafka-python-console-sample/consumertask.py
IBM-CSM/event-streams-samples
ce90b1f7f57f3d2afff0596b3f4610392c025ece
[ "Apache-2.0" ]
92
2015-10-13T21:41:25.000Z
2018-09-19T09:08:10.000Z
""" Copyright 2015-2018 IBM Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
32.470588
106
0.629831
import asyncio from confluent_kafka import Consumer class ConsumerTask(object): def __init__(self, conf, topic_name): self.consumer = Consumer(conf) self.topic_name = topic_name self.running = True def stop(self): self.running = False @asyncio.coroutine def run(self):...
true
true
f70a6a7d524410e5221820b26a7da36dcf0ac821
1,296
py
Python
var/spack/repos/builtin/packages/seqan/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/seqan/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/seqan/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Seqan(CMakePackage): """SeqAn is an open source C++ library of efficient algorithms and d...
38.117647
95
0.70216
from spack import * class Seqan(CMakePackage): homepage = "https://www.seqan.de" url = "https://github.com/seqan/seqan/archive/seqan-v2.4.0.tar.gz" version('2.4.0', sha256='d7084d17729214003e84818e0280a16f223c8f1c6a30eeef040c27e0c0047bd7') depends_on('cmake@3.4.0:', type='build') dep...
true
true
f70a6a9e38230c1855566a8a044921b83b845f35
6,386
py
Python
tests/lite/test_wrappers.py
FeryET/pytorch-lightning
b1f8b111b5085373599758a4e155a482259cdbf0
[ "Apache-2.0" ]
null
null
null
tests/lite/test_wrappers.py
FeryET/pytorch-lightning
b1f8b111b5085373599758a4e155a482259cdbf0
[ "Apache-2.0" ]
1
2022-03-18T21:56:53.000Z
2022-03-18T21:56:53.000Z
tests/lite/test_wrappers.py
FeryET/pytorch-lightning
b1f8b111b5085373599758a4e155a482259cdbf0
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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...
38.939024
114
0.727216
from unittest.mock import ANY, Mock import pytest import torch from torch.utils.data.dataloader import DataLoader from pytorch_lightning.core.mixins import DeviceDtypeModuleMixin from pytorch_lightning.lite import LightningLite from pytorch_lightning.lite.wrappers import _LiteDataLoader, _LiteModule, _Li...
true
true
f70a6b28b67cb2ac17dd95251e5df602c3b4223d
56,239
py
Python
.install/.backup/platform/gsutil/third_party/boto/boto/beanstalk/layer1.py
bopopescu/google-cloud-sdk
b34e6a18f1e89673508166acce816111c3421e4b
[ "Apache-2.0" ]
1
2017-11-18T18:23:22.000Z
2017-11-18T18:23:22.000Z
taskqueue/venv_tq/lib/python2.7/site-packages/boto/beanstalk/layer1.py
matthappens/taskqueue
548979587326b95bf41851eb135052de782e74fc
[ "MIT" ]
null
null
null
taskqueue/venv_tq/lib/python2.7/site-packages/boto/beanstalk/layer1.py
matthappens/taskqueue
548979587326b95bf41851eb135052de782e74fc
[ "MIT" ]
1
2020-07-24T20:04:47.000Z
2020-07-24T20:04:47.000Z
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
46.787854
97
0.655577
import boto import boto.jsonresponse from boto.compat import json from boto.regioninfo import RegionInfo from boto.connection import AWSQueryConnection class Layer1(AWSQueryConnection): APIVersion = '2010-12-01' DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'elasticbeans...
true
true
f70a6be4011c55e74593391945721361e11f0255
814
py
Python
concurrency-overview/io_mp.py
syberflea/materials
54f44725b40edf00c1b523d7a85b34a85014d7eb
[ "MIT" ]
3,682
2018-05-07T19:45:24.000Z
2022-03-31T15:19:10.000Z
concurrency-overview/io_mp.py
sribarrow/materials
c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5
[ "MIT" ]
148
2018-05-15T21:18:49.000Z
2022-03-21T11:25:39.000Z
concurrency-overview/io_mp.py
sribarrow/materials
c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5
[ "MIT" ]
5,535
2018-05-25T23:36:08.000Z
2022-03-31T16:55:52.000Z
#!/usr/bin/env python3 import requests import multiprocessing import time session = None def set_global_session(): global session if not session: session = requests.Session() def download_site(url): with session.get(url) as response: name = multiprocessing.current_process().name ...
23.257143
70
0.675676
import requests import multiprocessing import time session = None def set_global_session(): global session if not session: session = requests.Session() def download_site(url): with session.get(url) as response: name = multiprocessing.current_process().name print(f"{name}:Read {...
true
true
f70a6c957ea73f9a7a4e7f4df245a126a32c588e
22,064
py
Python
tests/test_filters.py
ticketmaster/cloud-custodian
0da3866f70f858895af228cc08706d0909a2a324
[ "Apache-2.0" ]
null
null
null
tests/test_filters.py
ticketmaster/cloud-custodian
0da3866f70f858895af228cc08706d0909a2a324
[ "Apache-2.0" ]
4
2017-02-02T17:08:23.000Z
2017-05-25T19:33:19.000Z
tests/test_filters.py
ticketmaster/cloud-custodian
0da3866f70f858895af228cc08706d0909a2a324
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
28.654545
92
0.497145
from __future__ import absolute_import, division, print_function, unicode_literals from dateutil import tz from datetime import datetime, timedelta import unittest from c7n import filters as base_filters from c7n.resources.ec2 import filters from c7n.utils import annotation from .common import instance,...
true
true
f70a6d4fa3cb899a39d76c539603b4d81d6a554c
448
py
Python
14.py
CallMeTwitch/LeetCode
7d59b299fe76eb93ecc3d6936ab4bfedeb323ef7
[ "MIT" ]
null
null
null
14.py
CallMeTwitch/LeetCode
7d59b299fe76eb93ecc3d6936ab4bfedeb323ef7
[ "MIT" ]
null
null
null
14.py
CallMeTwitch/LeetCode
7d59b299fe76eb93ecc3d6936ab4bfedeb323ef7
[ "MIT" ]
null
null
null
class Solution: def longestCommonPrefix(self, strs): min_len = len(min(strs, key = len)) for q in range(len(strs)): strs[q] = list(strs[q]) lst = [] final = '' for _ in range(min_len): lst = [q.pop(0) for q in strs] if all(q ==...
26.352941
46
0.4375
class Solution: def longestCommonPrefix(self, strs): min_len = len(min(strs, key = len)) for q in range(len(strs)): strs[q] = list(strs[q]) lst = [] final = '' for _ in range(min_len): lst = [q.pop(0) for q in strs] if all(q ==...
true
true
f70a6de635ea8ebcd428588097104e0bda6abb8a
664
py
Python
tests/test_slider.py
Yardanico/pylibui-cffi
10d90f08b6b1e43bf567ffcd22dbe976cb10e80e
[ "MIT" ]
6
2017-10-16T03:23:05.000Z
2020-11-10T06:24:04.000Z
tests/test_slider.py
TiberiumN/pylibui-cffi
10d90f08b6b1e43bf567ffcd22dbe976cb10e80e
[ "MIT" ]
null
null
null
tests/test_slider.py
TiberiumN/pylibui-cffi
10d90f08b6b1e43bf567ffcd22dbe976cb10e80e
[ "MIT" ]
1
2018-09-07T06:14:27.000Z
2018-09-07T06:14:27.000Z
""" Pylibui test suite. """ from pylibui.controls import Slider from tests.utils import WindowTestCase class SliderTest(WindowTestCase): def setUp(self): super().setUp() self.slider = Slider(0, 100) def test_value_initial_value(self): """Tests the sliders's `value` initial value is...
25.538462
75
0.653614
from pylibui.controls import Slider from tests.utils import WindowTestCase class SliderTest(WindowTestCase): def setUp(self): super().setUp() self.slider = Slider(0, 100) def test_value_initial_value(self): slider = Slider(10, 110) self.assertEqual(slider.value, 10) def ...
true
true
f70a6e363fb6bb482c5e3c38f34d9a3cc6bb57b1
2,239
py
Python
frappe/core/page/background_jobs/background_jobs.py
juhiwue/frappe
77f88af74e037dcca0bae3f3ef1e8cae7fb0f699
[ "MIT" ]
null
null
null
frappe/core/page/background_jobs/background_jobs.py
juhiwue/frappe
77f88af74e037dcca0bae3f3ef1e8cae7fb0f699
[ "MIT" ]
17
2021-03-22T18:47:14.000Z
2022-03-15T12:21:00.000Z
frappe/core/page/background_jobs/background_jobs.py
juhiwue/frappe
77f88af74e037dcca0bae3f3ef1e8cae7fb0f699
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import json from typing import TYPE_CHECKING, Dict, List from rq import Queue, Worker import frappe from frappe import _ from frappe.utils import convert_utc_to_user_timezone, format_datetime from frappe.utils.backgro...
24.336957
78
0.711925
import json from typing import TYPE_CHECKING, Dict, List from rq import Queue, Worker import frappe from frappe import _ from frappe.utils import convert_utc_to_user_timezone, format_datetime from frappe.utils.background_jobs import get_redis_conn from frappe.utils.scheduler import is_scheduler_inactive if TYPE_C...
true
true
f70a6ea2f3bc1234f058f1d39e3b1937ed425d61
10,360
py
Python
jax/_src/device_array.py
zjzh/jax
8372b98c4856b6b2363b7bb28abdb4579440a656
[ "Apache-2.0" ]
null
null
null
jax/_src/device_array.py
zjzh/jax
8372b98c4856b6b2363b7bb28abdb4579440a656
[ "Apache-2.0" ]
8
2022-01-03T10:15:55.000Z
2022-02-14T10:19:45.000Z
jax/_src/device_array.py
zjzh/jax
8372b98c4856b6b2363b7bb28abdb4579440a656
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.888889
108
0.721911
from functools import partial, partialmethod import operator from typing import (Any, List, Optional, Union) import weakref import numpy as np from jax import core from jax._src.config import config from jax._src import abstract_arrays from jax._src import dtypes from jax._src import profiler from jax...
true
true
f70a6f4e41b9deabaa98231dc49f102c2da5262c
3,144
py
Python
pkgs/ipykernel-4.3.1-py27_0/lib/python2.7/site-packages/ipykernel/gui/gtk3embed.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
652
2015-07-26T00:00:17.000Z
2022-02-24T18:30:04.000Z
pkgs/ipykernel-4.3.1-py27_0/lib/python2.7/site-packages/ipykernel/gui/gtk3embed.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
8
2015-09-07T03:38:19.000Z
2021-05-23T03:18:51.000Z
pkgs/ipykernel-4.3.1-py27_0/lib/python2.7/site-packages/ipykernel/gui/gtk3embed.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
40
2015-07-24T19:45:08.000Z
2021-11-01T14:54:56.000Z
"""GUI support for the IPython ZeroMQ kernel - GTK toolkit support. """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distribute...
36.55814
79
0.54612
import sys from gi.repository import GObject, Gtk class GTKEmbed(object): def __init__(self, kernel): self.kernel = kernel self.gtk_main = None self.gtk_main_quit = None def start(self): GObject.idle_add(self._wire_kernel) Gtk.main() ...
true
true
f70a703ecf8b20f0a4ea6cf7f1cfc565cffc8462
19,936
py
Python
caesd-master/main.py
korecodes/FYP
b4f67d968081f9199d1555a1729856d4af4a895e
[ "MIT" ]
1
2022-01-18T15:33:46.000Z
2022-01-18T15:33:46.000Z
caesd-master/main.py
korecodes/FYP
b4f67d968081f9199d1555a1729856d4af4a895e
[ "MIT" ]
null
null
null
caesd-master/main.py
korecodes/FYP
b4f67d968081f9199d1555a1729856d4af4a895e
[ "MIT" ]
null
null
null
#GUI classes for the application from kivy.app import App from kivy.lang import Builder from kivy.core.window import Window from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition from kivy.uix.popup import Popup from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix....
48.154589
169
0.589938
from kivy.app import App from kivy.lang import Builder from kivy.core.window import Window from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition from kivy.uix.popup import Popup from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.spinner import Spinner from kivy...
true
true
f70a71c00a69752a6818debf925e56044120def3
619
py
Python
apps/addpaths.py
lorenzcsunikl/Dataset-of-Artefact-Aware-Human-Motion-Capture-using-Inertial-Sensors-Integrated-into-Loose-Clothing
e5864e20d60bd7fa38bf6935ba1bacfadcdb3035
[ "Apache-2.0" ]
null
null
null
apps/addpaths.py
lorenzcsunikl/Dataset-of-Artefact-Aware-Human-Motion-Capture-using-Inertial-Sensors-Integrated-into-Loose-Clothing
e5864e20d60bd7fa38bf6935ba1bacfadcdb3035
[ "Apache-2.0" ]
null
null
null
apps/addpaths.py
lorenzcsunikl/Dataset-of-Artefact-Aware-Human-Motion-Capture-using-Inertial-Sensors-Integrated-into-Loose-Clothing
e5864e20d60bd7fa38bf6935ba1bacfadcdb3035
[ "Apache-2.0" ]
null
null
null
import os, sys, inspect # realpath() will make your script run, even if you symlink it :) cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])) if cmd_folder not in sys.path: sys.path.insert(0, cmd_folder) # # Use this if you want to include modules from a subfo...
41.266667
105
0.722132
import os, sys, inspect cmd_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])) if cmd_folder not in sys.path: sys.path.insert(0, cmd_folder) path.join(os.path.split(inspect.getfile(inspect.currentframe()))[0], ".."))) if cmd_subfolder not in sys.path: sys.pa...
true
true
f70a71c87434c0461dadcc68734d1ada03bc32f7
35,695
py
Python
snaps/openstack/tests/create_image_tests.py
hashnfv/hashnfv-snaps
0dfca494ef7c2778babfac48d9b701953860b54f
[ "Apache-2.0" ]
null
null
null
snaps/openstack/tests/create_image_tests.py
hashnfv/hashnfv-snaps
0dfca494ef7c2778babfac48d9b701953860b54f
[ "Apache-2.0" ]
null
null
null
snaps/openstack/tests/create_image_tests.py
hashnfv/hashnfv-snaps
0dfca494ef7c2778babfac48d9b701953860b54f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 Cable Television Laboratories, Inc. ("CableLabs") # and others. 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://w...
43.109903
79
0.620143
from glanceclient.exc import HTTPBadRequest try: from urllib.request import URLError except ImportError: from urllib2 import URLError import logging import shutil import unittest import uuid import os from snaps import file_utils from snaps.openstack import create_image from snaps.openstack.cr...
true
true
f70a721597372b0efa52b1d23b20e2d0f1387886
7,859
py
Python
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_7.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_7.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints_permutations/scaling_nonlinear_software/10-19_7.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
34.169565
81
0.529457
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f70a73527a65c5e526a4eb9382c4dd98ceed86bc
294
py
Python
manage.py
dstl/lighthouse
b810742d9f4cbfac02bf99096542499d25c88b58
[ "MIT" ]
5
2016-05-12T13:47:38.000Z
2020-06-22T07:33:35.000Z
manage.py
dstl/lighthouse
b810742d9f4cbfac02bf99096542499d25c88b58
[ "MIT" ]
7
2016-10-24T12:41:09.000Z
2016-12-08T21:58:18.000Z
manage.py
dstl/lighthouse
b810742d9f4cbfac02bf99096542499d25c88b58
[ "MIT" ]
4
2016-05-12T21:53:21.000Z
2021-04-10T22:02:26.000Z
#!/usr/bin/env python # (c) Crown Owned Copyright, 2016. Dstl. import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lighthouse.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
24.5
74
0.761905
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lighthouse.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
f70a73e7ec769ceacef155b98ab3be8009c63172
5,229
py
Python
models/project.py
jlgoh/labeldat
057248a22c7f022110d712dbcb61befd40e62760
[ "MIT" ]
1
2021-09-07T06:34:54.000Z
2021-09-07T06:34:54.000Z
models/project.py
wilsonteng97/labeldat
bdca5df0af55bdd460807808861de25d762b28da
[ "MIT" ]
5
2021-09-08T02:44:59.000Z
2022-02-27T10:55:29.000Z
models/project.py
wilsonteng97/labeldat
bdca5df0af55bdd460807808861de25d762b28da
[ "MIT" ]
1
2020-12-31T11:03:39.000Z
2020-12-31T11:03:39.000Z
from extensions import db from models.item_data_type import ItemDataType from models.label import Label from models.task import Task class Project(db.Model): id = db.Column(db.String(80), primary_key=True, nullable=False) # 1(Project)-to-1(organisation) org_id = db.Column(db.String(80), db.ForeignKey('org...
42.169355
99
0.634921
from extensions import db from models.item_data_type import ItemDataType from models.label import Label from models.task import Task class Project(db.Model): id = db.Column(db.String(80), primary_key=True, nullable=False) org_id = db.Column(db.String(80), db.ForeignKey('organisation.id'), nullable=False)...
true
true
f70a74917258038a2fbc62fab3d8f0fe001b74ce
8,773
py
Python
videoanalyst/model/task_model/taskmodel_impl/siamese_track.py
983632847/video_analyst
01b7ad278b828a3f7ff7a0488c5ca8f055240192
[ "MIT" ]
2
2020-07-30T08:26:08.000Z
2020-11-24T07:40:46.000Z
videoanalyst/model/task_model/taskmodel_impl/siamese_track.py
983632847/video_analyst
01b7ad278b828a3f7ff7a0488c5ca8f055240192
[ "MIT" ]
null
null
null
videoanalyst/model/task_model/taskmodel_impl/siamese_track.py
983632847/video_analyst
01b7ad278b828a3f7ff7a0488c5ca8f055240192
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -* import numpy as np from loguru import logger import torch import torch.nn as nn import torch.nn.functional as F from videoanalyst.model.common_opr.common_block import (conv_bn_relu, xcorr_depthwise) from videoanalyst.model.module_base imp...
36.861345
105
0.53904
import numpy as np from loguru import logger import torch import torch.nn as nn import torch.nn.functional as F from videoanalyst.model.common_opr.common_block import (conv_bn_relu, xcorr_depthwise) from videoanalyst.model.module_base import ModuleBase from vi...
true
true
f70a75256c638f4a3ce9cda3b9577176e49f3cca
4,042
py
Python
youtube_dl/extractor/redtube.py
aalvarito68/https-github.com-rg3-youtube-dl
dfc80bdd2e4ef3d30f161a93f99f3050537944ab
[ "Unlicense" ]
3
2017-09-28T22:31:51.000Z
2021-09-15T07:43:07.000Z
youtube_dl/extractor/redtube.py
aalvarito68/https-github.com-rg3-youtube-dl
dfc80bdd2e4ef3d30f161a93f99f3050537944ab
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/redtube.py
aalvarito68/https-github.com-rg3-youtube-dl
dfc80bdd2e4ef3d30f161a93f99f3050537944ab
[ "Unlicense" ]
3
2020-12-01T10:58:29.000Z
2021-07-22T15:57:22.000Z
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, str_to_int, unified_strdate, ) class RedTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www\.)?redtube\.com/|embed\.redtube\...
35.769912
101
0.517566
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, str_to_int, unified_strdate, ) class RedTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www\.)?redtube\.com/|embed\.redtube\...
true
true
f70a75b50f6ab4c03d21568a0b919684fa9dd706
187
py
Python
repos/tf_ctpn_cpu/lib/utils/setup.py
ysglh/DeepVideoAnalytics
ce807cc1595c813250bb4bc7dfc6fb76cd644335
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
3
2019-03-05T00:46:56.000Z
2021-11-26T10:20:40.000Z
repos/tf_ctpn_cpu/lib/utils/setup.py
jiangxu87/DeepVideoAnalytics
e401b3273782409b2604657514bec293d6aa75b0
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
repos/tf_ctpn_cpu/lib/utils/setup.py
jiangxu87/DeepVideoAnalytics
e401b3273782409b2604657514bec293d6aa75b0
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
4
2021-09-22T07:47:27.000Z
2022-01-23T14:16:08.000Z
from Cython.Build import cythonize import numpy as np from distutils.core import setup setup(ext_modules=cythonize(["bbox.pyx","cython_nms.pyx"],include_path=[np.get_include()] ))
20.777778
89
0.764706
from Cython.Build import cythonize import numpy as np from distutils.core import setup setup(ext_modules=cythonize(["bbox.pyx","cython_nms.pyx"],include_path=[np.get_include()] ))
true
true
f70a75c0e2859d8527b98b051b3342213f23e151
6,992
py
Python
nicos/clients/gui/panels/base.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
1
2021-03-26T10:30:45.000Z
2021-03-26T10:30:45.000Z
nicos/clients/gui/panels/base.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos/clients/gui/panels/base.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
3
2020-08-04T18:35:05.000Z
2021-04-16T11:22:08.000Z
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
36.227979
81
0.641447
from time import time as currenttime from nicos.clients.gui.config import panel from nicos.clients.gui.utils import DlgUtils, SettingGroup from nicos.guisupport.qt import QDialog, QHBoxLayout, QObject, QPainter, \ QPalette, QStyle, QStyleOption, QWidget, pyqtSignal from nicos.utils import...
true
true
f70a75c3e0f6aec1f478f8422ff34adbef44b487
3,812
py
Python
tests/unit/test_diffusion2d_functions.py
constracktor/testing-python-exercise
70b15a9d8e193fc518e46996cbc3e9f52cb1336d
[ "CC-BY-4.0" ]
null
null
null
tests/unit/test_diffusion2d_functions.py
constracktor/testing-python-exercise
70b15a9d8e193fc518e46996cbc3e9f52cb1336d
[ "CC-BY-4.0" ]
null
null
null
tests/unit/test_diffusion2d_functions.py
constracktor/testing-python-exercise
70b15a9d8e193fc518e46996cbc3e9f52cb1336d
[ "CC-BY-4.0" ]
null
null
null
""" Tests for functions in class SolveDiffusion2D """ import numpy as np #import pytest from diffusion2d import SolveDiffusion2D from unittest import TestCase class TestOperations(TestCase): """ Test suite for mathematical operations functions. """ def setUp(self): # Fixture self.w = ...
27.228571
74
0.574239
import numpy as np from diffusion2d import SolveDiffusion2D from unittest import TestCase class TestOperations(TestCase): def setUp(self): self.w = 12. self.h = 20. self.dx = 0.4 self.dy = 0.2 self.D = 0.5 self.T_cold = 300. self.T_hot = 700. ...
true
true
f70a75e1d9bb17e8ca4b66e379fd93f2e4479d40
5,117
py
Python
examples/gto/20-ao_integrals.py
nmardirossian/pyscf
57c8912dcfcc1157a822feede63df54ed1067115
[ "BSD-2-Clause" ]
1
2018-05-02T19:55:30.000Z
2018-05-02T19:55:30.000Z
examples/gto/20-ao_integrals.py
nmardirossian/pyscf
57c8912dcfcc1157a822feede63df54ed1067115
[ "BSD-2-Clause" ]
null
null
null
examples/gto/20-ao_integrals.py
nmardirossian/pyscf
57c8912dcfcc1157a822feede63df54ed1067115
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # # Author: Qiming Sun <osirpt.sun@gmail.com> # ''' Access AO integrals Mole.intor and Mole.intor_by_shell functions can generate AO integrals. Calling Mole.intor with the integral function name returns a integral matrix for all basis functions defined in Mole. If the integral operator has many...
30.825301
82
0.580027
import numpy from pyscf import gto, scf mol = gto.M( verbose = 0, atom = 'C 0 0 0; O 0 0 1.5', basis = 'ccpvdz' ) mf = scf.RHF(mol) mf.kernel() dm = mf.make_rdm1() s = mol.intor('cint1e_ovlp_sph') t = mol.intor('cint1e_kin_sph') v = mol.intor('cint1e_nuc_sph') s1 = mol.intor('cint1e_ipovlp_sph', c...
true
true
f70a767814ed94c06907f469c28d401cf661137d
1,461
py
Python
setup.py
mcflugen/plume
7fc65ba9461fece372eef4b2bee9ba6e72f42d19
[ "MIT" ]
null
null
null
setup.py
mcflugen/plume
7fc65ba9461fece372eef4b2bee9ba6e72f42d19
[ "MIT" ]
null
null
null
setup.py
mcflugen/plume
7fc65ba9461fece372eef4b2bee9ba6e72f42d19
[ "MIT" ]
1
2018-08-30T17:32:26.000Z
2018-08-30T17:32:26.000Z
from setuptools import setup, find_packages from distutils.extension import Extension import numpy as np import cython_gsl import versioneer def read_requirements(): import os path = os.path.dirname(os.path.abspath(__file__)) requirements_file = os.path.join(path, 'requirements.txt') try: wi...
31.085106
76
0.626283
from setuptools import setup, find_packages from distutils.extension import Extension import numpy as np import cython_gsl import versioneer def read_requirements(): import os path = os.path.dirname(os.path.abspath(__file__)) requirements_file = os.path.join(path, 'requirements.txt') try: wi...
true
true
f70a7759e95a54a93bcca22412d4b186cb575890
791
py
Python
src/home/migrations/0001_initial.py
gatortechuf/gatortechuf.com
8d0ad5f0772a42113c41bf454e96c2fa2c22d1f3
[ "MIT" ]
2
2016-07-18T02:11:37.000Z
2017-08-27T17:28:25.000Z
src/home/migrations/0001_initial.py
gatortechuf/gatortechuf.com
8d0ad5f0772a42113c41bf454e96c2fa2c22d1f3
[ "MIT" ]
66
2016-06-18T04:00:01.000Z
2018-02-03T17:42:17.000Z
src/home/migrations/0001_initial.py
gatortechuf/gatortechuf.com
8d0ad5f0772a42113c41bf454e96c2fa2c22d1f3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-03-17 03:31 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Semester...
30.423077
114
0.624526
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='SemesterModules', fields=[ ('id', models.AutoFiel...
true
true
f70a79fccd50251c7ab4ed1433fa98f79020be5a
3,038
py
Python
guardabinario.py
paatshala1/firststeps
5b91e1ad9a0a1197438d827d23879701cf81afbb
[ "MIT" ]
null
null
null
guardabinario.py
paatshala1/firststeps
5b91e1ad9a0a1197438d827d23879701cf81afbb
[ "MIT" ]
null
null
null
guardabinario.py
paatshala1/firststeps
5b91e1ad9a0a1197438d827d23879701cf81afbb
[ "MIT" ]
null
null
null
import pickle # ============================================================================= # EL MÉTODO __str__ NO PERMITE IMPRIMIR LA INFO DEL OBJETO COMO STRING, YA QUE # DE LO CONTRARIO EL MÉTODO showp() MOSTRARÍA LOS OBJETOS CREADOS EN MEMORIA # PERO NO SU INFO: (<__main__.People object at 0x00000218F088B...
34.134831
81
0.455892
import pickle class Person: def __init__(self , name , nac , age): self.name = name self.nac = nac self.age = age print("\nIt's been created:" , self.name) def __str__(self): return "{} {} {}".format(self.name , self.nac , self.age) # ==...
true
true
f70a7a3f1fea92b6119cb3af8052d25d1baf7caf
737
py
Python
python-algorithm/common/trie_node.py
isudox/nerd-algorithm
c1fbe153953cf3fc24395f75d102016fdf9ea0fa
[ "MIT" ]
5
2017-06-11T09:19:34.000Z
2019-01-16T16:58:31.000Z
python-algorithm/common/trie_node.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
5
2020-03-22T13:53:54.000Z
2020-03-23T08:49:35.000Z
python-algorithm/common/trie_node.py
isudox/nerd-algorithm
c1fbe153953cf3fc24395f75d102016fdf9ea0fa
[ "MIT" ]
1
2019-03-02T15:50:43.000Z
2019-03-02T15:50:43.000Z
# Trie Tree Node from typing import Optional class TrieNode: def __init__(self, char: Optional[str] = None): self.char = char self.children = [] self.counter = 0 self.end = False def add(self, word: str): node = self for char in word: found_in_child...
27.296296
51
0.497965
from typing import Optional class TrieNode: def __init__(self, char: Optional[str] = None): self.char = char self.children = [] self.counter = 0 self.end = False def add(self, word: str): node = self for char in word: found_in_children = False ...
true
true
f70a7a5a3c556402a7e07cce5f17dc361e7a5d74
7,221
py
Python
moto/ec2/responses/elastic_ip_addresses.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
moto/ec2/responses/elastic_ip_addresses.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
1
2022-03-07T07:39:03.000Z
2022-03-07T07:39:03.000Z
moto/ec2/responses/elastic_ip_addresses.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
from moto.ec2.utils import add_tag_specification from ._base_response import EC2BaseResponse class ElasticIPAddresses(EC2BaseResponse): def allocate_address(self): domain = self._get_param("Domain", if_none="standard") reallocate_address = self._get_param("Address", if_none=None) tags = se...
40.340782
113
0.596316
from moto.ec2.utils import add_tag_specification from ._base_response import EC2BaseResponse class ElasticIPAddresses(EC2BaseResponse): def allocate_address(self): domain = self._get_param("Domain", if_none="standard") reallocate_address = self._get_param("Address", if_none=None) tags = se...
true
true
f70a7a9d650cd69fbf70293d70feac3812614d3c
6,344
py
Python
markdown/extensions/headerid.py
koocieyu/interactive-tutorials
873851b37f0a13b6218ba1e656d51169010981fe
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
markdown/extensions/headerid.py
koocieyu/interactive-tutorials
873851b37f0a13b6218ba1e656d51169010981fe
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
markdown/extensions/headerid.py
koocieyu/interactive-tutorials
873851b37f0a13b6218ba1e656d51169010981fe
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
#!/usr/bin/python """ HeaderID Extension for Python-Markdown ====================================== Adds ability to set HTML IDs for headers. Basic usage: >>> import markdown >>> text = "# Some Header # {#some_id}" >>> md = markdown.markdown(text, ['headerid']) >>> md u'<h1 id="some_id">Some Hea...
32.367347
112
0.539565
import markdown from markdown import etree import re from string import ascii_lowercase, digits, punctuation ID_CHARS = ascii_lowercase + digits + '-_' IDCOUNT_RE = re.compile(r'^(.*)_([0-9]+)$') class HeaderIdProcessor(markdown.blockprocessors.BlockProcessor): RE = re.compile(r"""(^|\n) ...
true
true
f70a7c482c9860f258e06df2c22abbd6f1f50e9f
60,529
py
Python
xdl-algorithm-solution/Rocket/script/rnn.py
Ru-Xiang/x-deeplearning
04cc0497150920c64b06bb8c314ef89977a3427a
[ "Apache-2.0" ]
4,071
2018-12-13T04:17:38.000Z
2022-03-30T03:29:35.000Z
xdl-algorithm-solution/Rocket/script/rnn.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
359
2018-12-21T01:14:57.000Z
2022-02-15T07:18:02.000Z
xdl-algorithm-solution/Rocket/script/rnn.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
1,054
2018-12-20T09:57:42.000Z
2022-03-29T07:16:53.000Z
# Copyright (C) 2016-2018 Alibaba Group Holding Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
41.316724
88
0.693321
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework impo...
true
true
f70a7c8757ec8f2334ab61df77799b4f77e92dfc
1,711
py
Python
libs/cnn/customlayers.py
franckfotso/kr_cnn_models
242f4a6650004af5849404c8e0e7b3621ba020b6
[ "MIT" ]
1
2017-07-06T03:30:33.000Z
2017-07-06T03:30:33.000Z
libs/cnn/customlayers.py
romyny/kr_cnn_models
242f4a6650004af5849404c8e0e7b3621ba020b6
[ "MIT" ]
null
null
null
libs/cnn/customlayers.py
romyny/kr_cnn_models
242f4a6650004af5849404c8e0e7b3621ba020b6
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Written by: Romuald FOTSO # Licensed: MIT License # Copyright (c) 2017 # Based on 'dandxy89' github repository: # https://github.com/dandxy89/ImageModels/blob/master/KerasLayers/Custom_layers.py # -------------------------------------------------------- from ...
33.54902
82
0.484512
from keras.engine import Layer from keras import backend as K class LRN2D(Layer): def __init__(self, alpha=1e-4, k=2, beta=0.75, n=5, **kwargs): if n % 2 == 0: raise NotImplementedError( "LRN2D only works with odd n. n provided: " + str(n)) super(LRN2D, self).__i...
true
true
f70a7c97aa3c694dfc2fdc8eb7fb9de62211e209
119
py
Python
carbon/client/metrics/__init__.py
mosquito/carbonate
5eca69602b9fc03dc0b982f9104c7ebb04159059
[ "MIT" ]
2
2017-12-21T15:40:12.000Z
2018-02-07T10:00:14.000Z
carbon/client/metrics/__init__.py
mosquito/carbonate
5eca69602b9fc03dc0b982f9104c7ebb04159059
[ "MIT" ]
2
2016-12-02T08:53:48.000Z
2016-12-05T21:46:04.000Z
carbon/client/metrics/__init__.py
mosquito/carbonate
5eca69602b9fc03dc0b982f9104c7ebb04159059
[ "MIT" ]
5
2015-07-22T14:31:28.000Z
2020-09-30T08:20:29.000Z
from .timer import Timer from .simple import Counter from .heartbeat import HeartBeat from .collector import Collector
23.8
32
0.831933
from .timer import Timer from .simple import Counter from .heartbeat import HeartBeat from .collector import Collector
true
true
f70a7d0c89eb7ecab3a17df6d81f44d7bf8719a8
928
py
Python
examples/addons/pycsg_sphere_vs_menger_sponge.py
hh-wu/ezdxf
62509ba39b826ee9b36f19c0a5abad7f3518186a
[ "MIT" ]
1
2021-06-05T09:15:15.000Z
2021-06-05T09:15:15.000Z
examples/addons/pycsg_sphere_vs_menger_sponge.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
null
null
null
examples/addons/pycsg_sphere_vs_menger_sponge.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
null
null
null
# Copyright (c) 2020, Manfred Moitzi # License: MIT License from pathlib import Path from time import perf_counter import ezdxf from ezdxf.render.forms import sphere from ezdxf.addons import MengerSponge from ezdxf.addons.pycsg import CSG DIR = Path('~/Desktop/Outbox').expanduser() doc = ezdxf.new() doc.layers.new('...
29
83
0.727371
from pathlib import Path from time import perf_counter import ezdxf from ezdxf.render.forms import sphere from ezdxf.addons import MengerSponge from ezdxf.addons.pycsg import CSG DIR = Path('~/Desktop/Outbox').expanduser() doc = ezdxf.new() doc.layers.new('sponge', dxfattribs={'color': 5}) doc.layers.new('sphere',...
true
true
f70a7dc2646487373bb5e2077dd5a51a79e9d7fb
10,424
py
Python
Code/Model/resnet.py
Jinwon-DK/GaitAnalysis
6b7be4aae9963b8986519af5bcbff39f32ebf2cd
[ "MIT" ]
5
2020-07-23T05:55:54.000Z
2021-07-09T22:15:33.000Z
Code/Model/resnet.py
Jinwon-DK/GaitAnalysis
6b7be4aae9963b8986519af5bcbff39f32ebf2cd
[ "MIT" ]
null
null
null
Code/Model/resnet.py
Jinwon-DK/GaitAnalysis
6b7be4aae9963b8986519af5bcbff39f32ebf2cd
[ "MIT" ]
2
2020-07-23T06:05:54.000Z
2021-04-13T05:55:24.000Z
from __future__ import division import six import keras from keras.models import Model from keras.layers import ( Input, Activation, Dense, Flatten ) from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D from keras.layers import add from keras.layers import BatchNormalization from keras.regul...
37.905455
109
0.647448
from __future__ import division import six import keras from keras.models import Model from keras.layers import ( Input, Activation, Dense, Flatten ) from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D from keras.layers import add from keras.layers import BatchNormalization from keras.regul...
true
true
f70a7e2116a93a54134b28967766017ed21b90c0
633
py
Python
Back-End/Python/Basics/Part -4- OOP/07 - Metaprogramming/04_metaclass.py
ASHISHKUMAR2411/Programming-CookBook
9c60655d64d21985ccb4196360858d98344701f9
[ "MIT" ]
25
2021-04-28T02:51:26.000Z
2022-03-24T13:58:04.000Z
Back-End/Python/Basics/Part -4- OOP/07 - Metaprogramming/04_metaclass.py
ASHISHKUMAR2411/Programming-CookBook
9c60655d64d21985ccb4196360858d98344701f9
[ "MIT" ]
1
2022-03-03T23:33:41.000Z
2022-03-03T23:35:41.000Z
Back-End/Python/Basics/Part -4- OOP/07 - Metaprogramming/04_metaclass.py
ASHISHKUMAR2411/Programming-CookBook
9c60655d64d21985ccb4196360858d98344701f9
[ "MIT" ]
15
2021-05-30T01:35:20.000Z
2022-03-25T12:38:25.000Z
import math class CustomType(type): def __new__(mcls, name, bases, class_dict): print(f'Using custom metaclass {mcls} to create class {name}...') cls_obj = super().__new__(mcls, name, bases, class_dict) cls_obj.circ = lambda self: 2 * math.pi * self.r return cls_obj class Circle(m...
26.375
81
0.606635
import math class CustomType(type): def __new__(mcls, name, bases, class_dict): print(f'Using custom metaclass {mcls} to create class {name}...') cls_obj = super().__new__(mcls, name, bases, class_dict) cls_obj.circ = lambda self: 2 * math.pi * self.r return cls_obj class Circle(m...
true
true
f70a7f477db698ca69684e5e9325cf10a6ff9cb3
1,801
py
Python
main.py
ankurankan/game_of_life
81cf2f7f70a05019e78206d1ee7a8205aa590186
[ "MIT" ]
null
null
null
main.py
ankurankan/game_of_life
81cf2f7f70a05019e78206d1ee7a8205aa590186
[ "MIT" ]
null
null
null
main.py
ankurankan/game_of_life
81cf2f7f70a05019e78206d1ee7a8205aa590186
[ "MIT" ]
null
null
null
from time import sleep import numpy as np import matplotlib.pyplot as plt def get_initial_state(size): return np.random.choice([0, 1], size) def compute_next_state(state): new_state = np.zeros(state.shape, dtype=int) for i in range(state.shape[0]): for j in range(state.shape[1]): low...
28.587302
78
0.533592
from time import sleep import numpy as np import matplotlib.pyplot as plt def get_initial_state(size): return np.random.choice([0, 1], size) def compute_next_state(state): new_state = np.zeros(state.shape, dtype=int) for i in range(state.shape[0]): for j in range(state.shape[1]): low...
true
true
f70a7f830ddc667a9fa64921ab6b3d031ed80d41
42,759
py
Python
tests/auth_tests/test_forms.py
markvdb/django
b08a18f17ba53eb0bc7fd7993924f3d7f8ed5c52
[ "PSF-2.0", "BSD-3-Clause" ]
1
2019-03-04T12:45:49.000Z
2019-03-04T12:45:49.000Z
tests/auth_tests/test_forms.py
Kiku-git/django
b08a18f17ba53eb0bc7fd7993924f3d7f8ed5c52
[ "PSF-2.0", "BSD-3-Clause" ]
1
2019-06-24T07:34:43.000Z
2019-06-24T07:34:43.000Z
tests/auth_tests/test_forms.py
Kiku-git/django
b08a18f17ba53eb0bc7fd7993924f3d7f8ed5c52
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
import datetime import re from unittest import mock from django import forms from django.contrib.auth.forms import ( AdminPasswordChangeForm, AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ...
40.68411
119
0.634556
import datetime import re from unittest import mock from django import forms from django.contrib.auth.forms import ( AdminPasswordChangeForm, AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ...
true
true
f70a801c5d683c1dba1026dff2fe4f7c00cc9e36
1,524
py
Python
NiaPy/benchmarks/chungReynolds.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
NiaPy/benchmarks/chungReynolds.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
NiaPy/benchmarks/chungReynolds.py
tuahk/NiaPy
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
[ "MIT" ]
null
null
null
# encoding=utf8 # pylint: disable=anomalous-backslash-in-string, old-style-class import math __all__ = ['ChungReynolds'] class ChungReynolds: r"""Implementation of Chung Reynolds functions. Date: 2018 Authors: Lucija Brezočnik License: MIT Function: **Chung Reynolds function** :math:...
25.4
97
0.566273
import math __all__ = ['ChungReynolds'] class ChungReynolds: def __init__(self, Lower=-100.0, Upper=100.0): self.Lower = Lower self.Upper = Upper @classmethod def function(cls): def evaluate(D, sol): val = 0.0 for i in range(D): val +=...
true
true
f70a811a53d750ec8a97ef9cb6bb7b23600aa0f9
3,184
bzl
Python
google/cloud/bigtable/bigtable_client.bzl
millerantonio810/google-cloud-cpp
71582d922bc22b0dcbc58234f36c726ea3b7c171
[ "Apache-2.0" ]
3
2020-05-27T23:21:23.000Z
2020-05-31T22:31:53.000Z
google/cloud/bigtable/bigtable_client.bzl
millerantonio810/google-cloud-cpp
71582d922bc22b0dcbc58234f36c726ea3b7c171
[ "Apache-2.0" ]
2
2020-05-31T22:26:57.000Z
2020-06-19T00:14:10.000Z
google/cloud/bigtable/bigtable_client.bzl
millerantonio810/google-cloud-cpp
71582d922bc22b0dcbc58234f36c726ea3b7c171
[ "Apache-2.0" ]
1
2021-12-09T16:26:23.000Z
2021-12-09T16:26:23.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
28.428571
79
0.682789
bigtable_client_hdrs = [ "admin_client.h", "app_profile_config.h", "async_row_reader.h", "cell.h", "client_options.h", "cluster_config.h", "cluster_list_responses.h", "column_family.h", "completion_queue.h", "data_client.h", "expr.h", "filters.h", "ia...
true
true
f70a8219ec7071e721f28c56f09238a86a3a82ea
312
py
Python
models/devices.py
stephanGarland/PyNotion
74460e4792758c740b4e779772f734f97d7ad371
[ "MIT" ]
9
2017-11-29T04:01:22.000Z
2022-02-06T09:19:24.000Z
models/devices.py
stephanGarland/PyNotion
74460e4792758c740b4e779772f734f97d7ad371
[ "MIT" ]
3
2021-09-01T20:51:32.000Z
2021-09-03T16:30:48.000Z
models/devices.py
stephanGarland/PyNotion
74460e4792758c740b4e779772f734f97d7ad371
[ "MIT" ]
1
2021-09-02T19:28:44.000Z
2021-09-02T19:28:44.000Z
class Device: def __init__(self, id=None, token=None, platform=None, endpoint=None, created_at=None, updated_at=None): self.id = id self.token = token self.platform = platform self.endpoint = endpoint self.created_at = created_at self.updated_at = updated_at
31.2
108
0.650641
class Device: def __init__(self, id=None, token=None, platform=None, endpoint=None, created_at=None, updated_at=None): self.id = id self.token = token self.platform = platform self.endpoint = endpoint self.created_at = created_at self.updated_at = updated_at
true
true
f70a8336bc5479f73419747b75d720f65693f002
3,574
py
Python
django_rq/management/commands/rqworker.py
UKTV/django_rq
681d8797eacda78a46db2897235b84b6929b8d16
[ "MIT" ]
null
null
null
django_rq/management/commands/rqworker.py
UKTV/django_rq
681d8797eacda78a46db2897235b84b6929b8d16
[ "MIT" ]
null
null
null
django_rq/management/commands/rqworker.py
UKTV/django_rq
681d8797eacda78a46db2897235b84b6929b8d16
[ "MIT" ]
1
2017-06-07T16:03:35.000Z
2017-06-07T16:03:35.000Z
from distutils.version import LooseVersion import os import importlib import logging import sys from django.core.management.base import BaseCommand from django.utils.version import get_version from django_rq.queues import get_queues from django_rq.workers import get_exception_handlers from redis.exceptions import Co...
39.274725
92
0.622832
from distutils.version import LooseVersion import os import importlib import logging import sys from django.core.management.base import BaseCommand from django.utils.version import get_version from django_rq.queues import get_queues from django_rq.workers import get_exception_handlers from redis.exceptions import Co...
true
true
f70a8465913381e196aa41c4ceeea530e222a6a2
2,947
py
Python
src/utils/args.py
ioangatop/srVAE
dfee765c53f11f4653e7c6e7118a339832656867
[ "MIT" ]
60
2020-06-11T11:06:15.000Z
2022-03-31T14:35:19.000Z
src/utils/args.py
ioangatop/srVAE
dfee765c53f11f4653e7c6e7118a339832656867
[ "MIT" ]
9
2020-06-28T09:45:28.000Z
2020-12-30T15:20:19.000Z
src/utils/args.py
ioangatop/srVAE
dfee765c53f11f4653e7c6e7118a339832656867
[ "MIT" ]
9
2020-07-28T12:03:32.000Z
2022-03-31T14:34:08.000Z
import torch import argparse # ----- Parser ----- def parser(): PARSER = argparse.ArgumentParser(description='Training parameters.') # Dataset PARSER.add_argument('--dataset', default='CIFAR10', type=str, choices=['CIFAR10', 'CelebA', 'Imagenette', 'ImageNet32', 'ImageNet64'], ...
38.272727
118
0.562606
import torch import argparse def parser(): PARSER = argparse.ArgumentParser(description='Training parameters.') PARSER.add_argument('--dataset', default='CIFAR10', type=str, choices=['CIFAR10', 'CelebA', 'Imagenette', 'ImageNet32', 'ImageNet64'], help="Da...
true
true
f70a84c63ca36138b87e96ed011c0fe5cf9d31bc
9,961
py
Python
third_party/catapult/dashboard/dashboard/models/histogram_test.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/catapult/dashboard/dashboard/models/histogram_test.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/catapult/dashboard/dashboard/models/histogram_test.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import sys from dashboard.common import testing_common from dashboard.common import utils from dashboard.models import histogram from tracing.va...
32.766447
78
0.609979
import json import sys from dashboard.common import testing_common from dashboard.common import utils from dashboard.models import histogram from tracing.value.diagnostics import reserved_infos class SparseDiagnosticTest(testing_common.TestCase): def setUp(self): super(SparseDiagnosticTest, self).setUp() ...
true
true
f70a85945485651bb9a81ecb734bd755346a98cc
3,208
py
Python
meetnowport/settings.py
bonaw/Meetnow
02b77af78db7fa403a5ecee49ee1c64eea893a7a
[ "MIT" ]
null
null
null
meetnowport/settings.py
bonaw/Meetnow
02b77af78db7fa403a5ecee49ee1c64eea893a7a
[ "MIT" ]
null
null
null
meetnowport/settings.py
bonaw/Meetnow
02b77af78db7fa403a5ecee49ee1c64eea893a7a
[ "MIT" ]
null
null
null
""" Django settings for mysite project. Generated by 'django-admin startproject' using Django 2.0.5. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ i...
26.512397
92
0.668329
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'a6j(qtzl$#pd2g^fm+=g27^^r&%gz6sh!o45ekij=--bj)^qx$' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'dja...
true
true
f70a859d84435c0a6414934e105c3751a53b1cad
161
py
Python
uclasm/matching/filters/__init__.py
cfld/uclasm
dbdbe99fa8bd6e85a7e90ac2e666c1e667c62d57
[ "MIT" ]
null
null
null
uclasm/matching/filters/__init__.py
cfld/uclasm
dbdbe99fa8bd6e85a7e90ac2e666c1e667c62d57
[ "MIT" ]
null
null
null
uclasm/matching/filters/__init__.py
cfld/uclasm
dbdbe99fa8bd6e85a7e90ac2e666c1e667c62d57
[ "MIT" ]
null
null
null
"""Provide functions for filtering.""" from .stats_filter import stats_filter from .topology_filter import topology_filter from .run_filters import run_filters
26.833333
44
0.832298
from .stats_filter import stats_filter from .topology_filter import topology_filter from .run_filters import run_filters
true
true
f70a8613e1d5d47e63f3f531a3bb99f989be6e47
11,728
py
Python
libcxx/utils/libcxx/test/features.py
jinge90/llvm
1f3f9b9b1181feb559e85970155678c18a436711
[ "Apache-2.0" ]
null
null
null
libcxx/utils/libcxx/test/features.py
jinge90/llvm
1f3f9b9b1181feb559e85970155678c18a436711
[ "Apache-2.0" ]
null
null
null
libcxx/utils/libcxx/test/features.py
jinge90/llvm
1f3f9b9b1181feb559e85970155678c18a436711
[ "Apache-2.0" ]
null
null
null
#===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------------------------------...
56.114833
171
0.632418
rom libcxx.test.dsl import * import re import shutil import sys import subprocess _isClang = lambda cfg: '__clang__' in compilerMacros(cfg) and '__apple_build_version__' not in compilerMacros(cfg) _isAppleClang = lambda cfg: '__apple_build_version__' in compilerMacros(cfg) _isGCC = lambda cfg: '__GNUC__...
true
true
f70a86e1f718625d42509fc16e98474c738aa896
4,104
py
Python
lib/composite/LiPolymerDataScaler.py
KanHatakeyama/annealing_project
eac2dfe65c480450a5d12b09db2c1c9f83d03389
[ "MIT" ]
null
null
null
lib/composite/LiPolymerDataScaler.py
KanHatakeyama/annealing_project
eac2dfe65c480450a5d12b09db2c1c9f83d03389
[ "MIT" ]
null
null
null
lib/composite/LiPolymerDataScaler.py
KanHatakeyama/annealing_project
eac2dfe65c480450a5d12b09db2c1c9f83d03389
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler from DataUtility import get_column_names class LiPolymerDataScaler: """ a special class to scale the lithium polymer database """ def __init__(self): self.scaling_dict = {} self.main_val_params = [...
31.813953
116
0.569444
import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler from DataUtility import get_column_names class LiPolymerDataScaler: def __init__(self): self.scaling_dict = {} self.main_val_params = ["SMILES_wt", "wt_ratio", "inorg_contain_ratio"] self.main_txt_para...
true
true
f70a87ce62cba398e7370660217593d337998146
140
py
Python
python/data_sutram/scraper/test.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/data_sutram/scraper/test.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/data_sutram/scraper/test.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
def test_func(i): print(i) if i>10: return else: test_func(i+1) if __name__ == "__main__": test_func(2)
15.555556
26
0.521429
def test_func(i): print(i) if i>10: return else: test_func(i+1) if __name__ == "__main__": test_func(2)
true
true
f70a87f89311f5320018937ff535733ef8e8f539
10,355
py
Python
curtsies/formatstringarray.py
toolforger/curtsies
7f86c07d95aa22b004db9acf8f787e1abf49b581
[ "MIT" ]
3
2015-07-13T12:53:40.000Z
2018-01-21T20:38:46.000Z
curtsies/formatstringarray.py
toolforger/curtsies
7f86c07d95aa22b004db9acf8f787e1abf49b581
[ "MIT" ]
null
null
null
curtsies/formatstringarray.py
toolforger/curtsies
7f86c07d95aa22b004db9acf8f787e1abf49b581
[ "MIT" ]
1
2018-01-21T20:38:03.000Z
2018-01-21T20:38:03.000Z
""" Format String 2D array 2d array for compositing term-formated strings -autoexpanding vertically -interesting get_item behavior (renders fmtstrs) -caching behavior eventually >>> a = FSArray(10, 14) >>> a.shape (10, 14) >>> a[1] = 'i' >>> a[3:4, :] = ['i' * 14] >>> a[16:17, :] = ['j' * 14] >>> a.shape, a[16, 0] ...
33.29582
111
0.547562
import sys import logging from .formatstring import fmtstr from .formatstring import normalize_slice from .formatstring import FmtStr from typing import ( Any, Union, Text, List, Sequence, overload, Tuple, cast, no_type_check, ) actualize = str logger = logging.getLogger(__name__...
true
true
f70a8a2cc7770d9c4ef39696ddde8e9dab7893c8
670
py
Python
leetcode/[cutz]mergekarr.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
3
2019-11-26T14:31:01.000Z
2020-01-10T18:19:46.000Z
leetcode/[cutz]mergekarr.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
null
null
null
leetcode/[cutz]mergekarr.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
null
null
null
import heapq # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def mergeKLists(self, lists: List[ListNode]) -> ListNode: heap = [] root = res = ListNode(None) for i in range...
25.769231
67
0.525373
import heapq class Solution: def mergeKLists(self, lists: List[ListNode]) -> ListNode: heap = [] root = res = ListNode(None) for i in range(len(lists)): heapq.heappush(heap, (lists[i].val, i, lists[i])) print(heap) while heap: m = heapq.heappop...
true
true
f70a8a8f20d027af22a12a78590c0391f8a9a744
6,361
py
Python
monai/metrics/surface_distance.py
danielschulz/MONAI
54ef6e9e700f0de3d50184c0148f953be871a58e
[ "Apache-2.0" ]
null
null
null
monai/metrics/surface_distance.py
danielschulz/MONAI
54ef6e9e700f0de3d50184c0148f953be871a58e
[ "Apache-2.0" ]
null
null
null
monai/metrics/surface_distance.py
danielschulz/MONAI
54ef6e9e700f0de3d50184c0148f953be871a58e
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
42.406667
108
0.652413
import warnings from typing import Union import numpy as np import torch from monai.metrics.utils import * from monai.utils import MetricReduction class SurfaceDistanceMetric: def __init__( self, include_background: bool = False, symmetric: bool = False, distance_metr...
true
true
f70a8ae488be6f9e83f14e6becdc73cfc39e30b3
611
py
Python
src/spyne_smev/server/wsgi.py
barsgroup/m3-spyne-smev
356d190a0f341f3b91d626eba81875cde8ff12f2
[ "MIT" ]
7
2015-10-22T02:57:33.000Z
2021-08-08T16:46:48.000Z
src/spyne_smev/server/wsgi.py
barsgroup/m3-spyne-smev
356d190a0f341f3b91d626eba81875cde8ff12f2
[ "MIT" ]
2
2017-05-01T05:31:41.000Z
2020-03-18T16:26:43.000Z
src/spyne_smev/server/wsgi.py
barsgroup/m3-spyne-smev
356d190a0f341f3b91d626eba81875cde8ff12f2
[ "MIT" ]
8
2015-10-22T02:57:47.000Z
2021-11-08T08:28:32.000Z
# -*- coding: utf- """ wsgi.py :Created: 12 Jun 2014 :Author: tim """ from spyne.server.wsgi import WsgiApplication as _SpyneWsgiApplication from spyne_smev.server import _AllYourInterfaceDocuments class WsgiApplication(_SpyneWsgiApplication): def __init__(self, app, c...
26.565217
79
0.631751
from spyne.server.wsgi import WsgiApplication as _SpyneWsgiApplication from spyne_smev.server import _AllYourInterfaceDocuments class WsgiApplication(_SpyneWsgiApplication): def __init__(self, app, chunked=True, max_content_length=2 * 1024 * 1024, block_length=8 * 1024): super(WsgiA...
true
true
f70a8c102b413f15a56d9719e7836be3413d7bfe
2,477
py
Python
Advent2020/23.py
SSteve/AdventOfCode
aed16209381ccd292fc02008f1f2da5d16ff1a05
[ "MIT" ]
null
null
null
Advent2020/23.py
SSteve/AdventOfCode
aed16209381ccd292fc02008f1f2da5d16ff1a05
[ "MIT" ]
null
null
null
Advent2020/23.py
SSteve/AdventOfCode
aed16209381ccd292fc02008f1f2da5d16ff1a05
[ "MIT" ]
null
null
null
class Node: def __init__(self, next: int): self.next = next self.up = False def MakeNodes(data: str): values = [int(ch) - 1 for ch in data] nodes = [] for value in range(len(values)): index = values.index(value) next = values[(index + 1) % len(values)] no...
26.634409
52
0.608801
class Node: def __init__(self, next: int): self.next = next self.up = False def MakeNodes(data: str): values = [int(ch) - 1 for ch in data] nodes = [] for value in range(len(values)): index = values.index(value) next = values[(index + 1) % len(values)] no...
true
true
f70a8c1d9d385ae5c5b01cb27f773a0610725826
4,907
py
Python
nextdl/extractor/palcomp3.py
devenu85/nextdl
0b458f556e2e0be80cb94bd9a9b1405ad2e9182d
[ "MIT" ]
1
2021-12-19T13:55:20.000Z
2021-12-19T13:55:20.000Z
nextdl/extractor/palcomp3.py
devenu85/nextdl
0b458f556e2e0be80cb94bd9a9b1405ad2e9182d
[ "MIT" ]
null
null
null
nextdl/extractor/palcomp3.py
devenu85/nextdl
0b458f556e2e0be80cb94bd9a9b1405ad2e9182d
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import int_or_none, str_or_none, try_get from .common import InfoExtractor class PalcoMP3BaseIE(InfoExtractor): _GQL_QUERY_TMPL = """{ artist(slug: "%s") { %s } }""" _ARTIST_FIELDS_TMPL = "...
29.035503
133
0.525372
from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import int_or_none, str_or_none, try_get from .common import InfoExtractor class PalcoMP3BaseIE(InfoExtractor): _GQL_QUERY_TMPL = """{ artist(slug: "%s") { %s } }""" _ARTIST_FIELDS_TMPL = """music(slug: "...
true
true
f70a8cead3e6860b7b1976560adb6005e93da51d
11,829
py
Python
vissl/data/dataset_catalog.py
NKI-AI/vissl
ddf5a97572c6640438faabba1f91426028520c4b
[ "MIT" ]
null
null
null
vissl/data/dataset_catalog.py
NKI-AI/vissl
ddf5a97572c6640438faabba1f91426028520c4b
[ "MIT" ]
null
null
null
vissl/data/dataset_catalog.py
NKI-AI/vissl
ddf5a97572c6640438faabba1f91426028520c4b
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Data and labels file for various datasets. """ import json import logging import os from typing import List import numpy as np from fvcor...
38.03537
93
0.668442
import json import logging import os from typing import List import numpy as np from fvcore.common.file_io import PathManager from vissl.data.datasets import get_coco_imgs_labels_info, get_voc_images_labels_info from vissl.utils.misc import get_json_data_catalog_file from vissl.utils.slurm import get_slurm_dir ...
true
true
f70a8d36f31dcd5350e51b402a11c45acf9c1b33
100
py
Python
Alys/src/alys/alys.py
PikaBlue107/alys-pronouns
ff86648bdc9a5bc82beaf5c007ad88be94961324
[ "MIT" ]
null
null
null
Alys/src/alys/alys.py
PikaBlue107/alys-pronouns
ff86648bdc9a5bc82beaf5c007ad88be94961324
[ "MIT" ]
null
null
null
Alys/src/alys/alys.py
PikaBlue107/alys-pronouns
ff86648bdc9a5bc82beaf5c007ad88be94961324
[ "MIT" ]
null
null
null
''' Created on Nov 20, 2019 @author: Melody Griesen ''' if __name__ == '__main__': pass
12.5
27
0.59
if __name__ == '__main__': pass
true
true
f70a8d437ab6062a2810b247f87863917ccd942b
4,412
py
Python
dags/python_scripts/load_staging_genre.py
jrderek/Movie_Analytics-Data-Engineering-
9789b2d4a13964b93f7f99b010137e9c4e6cc807
[ "MIT" ]
null
null
null
dags/python_scripts/load_staging_genre.py
jrderek/Movie_Analytics-Data-Engineering-
9789b2d4a13964b93f7f99b010137e9c4e6cc807
[ "MIT" ]
null
null
null
dags/python_scripts/load_staging_genre.py
jrderek/Movie_Analytics-Data-Engineering-
9789b2d4a13964b93f7f99b010137e9c4e6cc807
[ "MIT" ]
null
null
null
import sys import os from datetime import datetime from pyspark import SparkConf, SparkContext from pyspark.sql import SparkSession from pyspark.sql.types import (StructType, StructField as Fld, DoubleType as Dbl, IntegerType as Int, DateType as Date, Boolea...
38.365217
95
0.577289
import sys import os from datetime import datetime from pyspark import SparkConf, SparkContext from pyspark.sql import SparkSession from pyspark.sql.types import (StructType, StructField as Fld, DoubleType as Dbl, IntegerType as Int, DateType as Date, Boolea...
true
true
f70a8ee941ed8c8f91318a8c247810c74106e4af
8,951
py
Python
scripts/enip-logix/gen_pull.py
Vadoola/pulr
d276b94b4ffcc7381b661654cc004c5b8ebc2776
[ "Apache-2.0" ]
13
2020-08-28T17:20:23.000Z
2022-02-03T06:23:51.000Z
scripts/enip-logix/gen_pull.py
Vadoola/pulr
d276b94b4ffcc7381b661654cc004c5b8ebc2776
[ "Apache-2.0" ]
1
2021-05-06T10:43:42.000Z
2021-05-12T13:21:19.000Z
scripts/enip-logix/gen_pull.py
Vadoola/pulr
d276b94b4ffcc7381b661654cc004c5b8ebc2776
[ "Apache-2.0" ]
3
2020-09-02T08:10:12.000Z
2021-05-06T03:37:57.000Z
#!/usr/bin/env python3 """ Generates Pulr "pull" config section from JSON, created with fetch-tags.py """ import sys import argparse from textwrap import dedent try: import rapidjson as json except: import json import yaml DEFAULT_FREQ = 1 DEFAULT_PATH = '1,0' DEFAULT_CPU = 'LGX' DEFAULT_TIMEOUT = 2 def ...
28.597444
80
0.431013
import sys import argparse from textwrap import dedent try: import rapidjson as json except: import json import yaml DEFAULT_FREQ = 1 DEFAULT_PATH = '1,0' DEFAULT_CPU = 'LGX' DEFAULT_TIMEOUT = 2 def generate(tag_list, tag_file=None, tag_data=None, exclude=None, ...
true
true
f70a9017583af2e35cffeb78d26cdec6a68df2ec
9,648
py
Python
makeReadmeMD.py
freehackquest/2016-tasks
3d4a1525213d9ef106bcfa8c5c6e33938489366d
[ "MIT" ]
null
null
null
makeReadmeMD.py
freehackquest/2016-tasks
3d4a1525213d9ef106bcfa8c5c6e33938489366d
[ "MIT" ]
null
null
null
makeReadmeMD.py
freehackquest/2016-tasks
3d4a1525213d9ef106bcfa8c5c6e33938489366d
[ "MIT" ]
1
2019-01-22T18:05:26.000Z
2019-01-22T18:05:26.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import json import os import sys import os.path import re from pprint import pprint from subprocess import Popen, PIPE readme = open('README.md', 'w') readme.write("# Free Hack Quest 2016\n") def getListOfDirsWithTasks(): result = [] dirs = os.listdir('./'); for d in di...
29.595092
134
0.632566
import json import os import sys import os.path import re from pprint import pprint from subprocess import Popen, PIPE readme = open('README.md', 'w') readme.write("# Free Hack Quest 2016\n") def getListOfDirsWithTasks(): result = [] dirs = os.listdir('./'); for d in dirs: print(d); if os.path.isdir(d): ...
true
true
f70a90c74a64770e6bdc44f68bb42a89c0778438
1,441
py
Python
sms.py
Lyokolux/smsNotificationFree
e82290c1d643bc249c9e70bf9df54c05005da789
[ "MIT" ]
null
null
null
sms.py
Lyokolux/smsNotificationFree
e82290c1d643bc249c9e70bf9df54c05005da789
[ "MIT" ]
null
null
null
sms.py
Lyokolux/smsNotificationFree
e82290c1d643bc249c9e70bf9df54c05005da789
[ "MIT" ]
null
null
null
import sys import click import json from urllib.request import urlopen from urllib.parse import quote RESPONSES_CODE = { 200 : "SMS sent", 400 : "One parameter is missing (identifier, password or message).", 402 : "Too many SMS sent.", 403 : "Service not activated or false login/key.", 500 : "Serv...
32.022222
100
0.581541
import sys import click import json from urllib.request import urlopen from urllib.parse import quote RESPONSES_CODE = { 200 : "SMS sent", 400 : "One parameter is missing (identifier, password or message).", 402 : "Too many SMS sent.", 403 : "Service not activated or false login/key.", 500 : "Serv...
true
true
f70a91aa7357a9d5cc499152a4eeee87757d1d2b
1,086
py
Python
Experiments/ARIMA/RunnerARIMA.py
nj-czy/UCTB
bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a
[ "MIT" ]
null
null
null
Experiments/ARIMA/RunnerARIMA.py
nj-czy/UCTB
bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a
[ "MIT" ]
null
null
null
Experiments/ARIMA/RunnerARIMA.py
nj-czy/UCTB
bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a
[ "MIT" ]
null
null
null
import os from tqdm import tqdm # dataset = [['Bike','NYC','all','365','sum','0.1'],['DiDi','Xian','all','all','sum','0.1'], # ['Metro','Chongqing','all','all','sum','0.1'],['ChargeStation','Beijing','all','all','max','0.1'], # ['METR','LA','all','all','average','0.2'],['PEMS','BAY','all','all','average','0.2']] datase...
51.714286
273
0.529466
import os from tqdm import tqdm dataset = [['METR','LA','all','all','average','0.2'],['PEMS','BAY','all','all','average','0.2']] with open("ARIMAresult3.txt","w") as fp: for index in tqdm(range(len(dataset))): fp.write("*********************************************************\n") fp.write("Pr...
true
true
f70a94376224e4e62b4838d7f26f665e40767945
1,015
py
Python
openstack_dashboard/dashboards/project/overview/urls.py
hashsos/hashcloudos-horizon
0cc080ca6777e4a1dac5cbcc6143202baddab176
[ "Apache-2.0" ]
930
2015-01-04T08:06:03.000Z
2022-03-13T18:47:13.000Z
openstack_dashboard/dashboards/project/overview/urls.py
hashsos/hashcloudos-horizon
0cc080ca6777e4a1dac5cbcc6143202baddab176
[ "Apache-2.0" ]
106
2019-01-18T03:06:55.000Z
2019-11-29T05:06:18.000Z
openstack_dashboard/dashboards/project/overview/urls.py
hashsos/hashcloudos-horizon
0cc080ca6777e4a1dac5cbcc6143202baddab176
[ "Apache-2.0" ]
1,040
2015-01-01T18:48:28.000Z
2022-03-19T08:35:18.000Z
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
36.25
78
0.737931
from django.conf.urls import url from openstack_dashboard.dashboards.project.overview import views urlpatterns = [ url(r'^$', views.ProjectOverview.as_view(), name='index'), url(r'^warning$', views.WarningView.as_view(), name='warning'), ]
true
true
f70a944f916b145fc345dc057278b25d671d9ad4
170
py
Python
app/projects/TestProject.py
cchernn/ProjectsWebsite
ad5a23539f5034956076259b55f628542241d9d8
[ "MIT" ]
null
null
null
app/projects/TestProject.py
cchernn/ProjectsWebsite
ad5a23539f5034956076259b55f628542241d9d8
[ "MIT" ]
null
null
null
app/projects/TestProject.py
cchernn/ProjectsWebsite
ad5a23539f5034956076259b55f628542241d9d8
[ "MIT" ]
null
null
null
class handler(): def __init__(self): self.greeting = "Hello World" def __repr__(self): return self.greeting if __name__ == "__main__": pass
17
37
0.611765
class handler(): def __init__(self): self.greeting = "Hello World" def __repr__(self): return self.greeting if __name__ == "__main__": pass
true
true
f70a94c0e06d3fd4dafc82aa2df645c9cb1dba9e
916
py
Python
script/gimp_histemul.py
matteli/histemul
61f1ea8e1263b92fd2bead0c808f67940faad802
[ "BSD-2-Clause" ]
1
2019-07-05T09:40:50.000Z
2019-07-05T09:40:50.000Z
script/gimp_histemul.py
matteli/histemul
61f1ea8e1263b92fd2bead0c808f67940faad802
[ "BSD-2-Clause" ]
null
null
null
script/gimp_histemul.py
matteli/histemul
61f1ea8e1263b92fd2bead0c808f67940faad802
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python from gimpfu import * from gimpenums import * import sys import os def color2id(color): a = (color[0]<<16) | (color[1]<<8) | color[2] b = (a & 0xF00000) >> 12 | (a & 0xF000) >> 8 | (a & 0xF00) << 4 | \ (a & 0xF0) >> 4 c = (b & 0xF000) | (b & 0x800) >> 11 | (b & 0x400) >> 7 | \ ...
24.756757
71
0.469432
from gimpfu import * from gimpenums import * import sys import os def color2id(color): a = (color[0]<<16) | (color[1]<<8) | color[2] b = (a & 0xF00000) >> 12 | (a & 0xF000) >> 8 | (a & 0xF00) << 4 | \ (a & 0xF0) >> 4 c = (b & 0xF000) | (b & 0x800) >> 11 | (b & 0x400) >> 7 | \ (b & 0x200) >> 3 | (b...
true
true
f70a95254e35822d1e937560e483bbab7dc9a08f
1,510
py
Python
docker_engine/komand_docker_engine/actions/container_remove/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
docker_engine/komand_docker_engine/actions/container_remove/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
docker_engine/komand_docker_engine/actions/container_remove/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Input: FORCE = "force" ID = "id" LINK = "link" V = "v" class Output: SUCCESS = "success" class ContainerRemoveInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "pro...
19.868421
82
0.542384
import komand import json class Input: FORCE = "force" ID = "id" LINK = "link" V = "v" class Output: SUCCESS = "success" class ContainerRemoveInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "force": { "type"...
true
true
f70a95cc159cace0f85857909a871669972e3f9e
31,375
py
Python
scipy/integrate/quadrature.py
maxi-marufo/my-scipy
be6c2597fcee86419592ac512319301c7ddfc118
[ "BSD-3-Clause" ]
1
2020-07-22T17:29:25.000Z
2020-07-22T17:29:25.000Z
scipy/integrate/quadrature.py
maxi-marufo/my-scipy
be6c2597fcee86419592ac512319301c7ddfc118
[ "BSD-3-Clause" ]
null
null
null
scipy/integrate/quadrature.py
maxi-marufo/my-scipy
be6c2597fcee86419592ac512319301c7ddfc118
[ "BSD-3-Clause" ]
null
null
null
import functools import numpy as np import math import types import warnings # trapz is a public function for scipy.integrate, # even though it's actually a NumPy function. from numpy import trapz from scipy.special import roots_legendre from scipy.special import gammaln __all__ = ['fixed_quad', 'quadrature', 'romber...
32.278807
103
0.578135
import functools import numpy as np import math import types import warnings from numpy import trapz from scipy.special import roots_legendre from scipy.special import gammaln __all__ = ['fixed_quad', 'quadrature', 'romberg', 'trapz', 'simps', 'romb', 'cumtrapz', 'newton_cotes'] # Make See Also linking...
true
true
f70a96e43b69336d19518c9d33a4c86634d2adbd
3,541
py
Python
indy_common/authorize/auth_cons_strategies.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
627
2017-07-06T12:38:08.000Z
2022-03-30T13:18:43.000Z
indy_common/authorize/auth_cons_strategies.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
580
2017-06-29T17:59:57.000Z
2022-03-29T21:37:52.000Z
indy_common/authorize/auth_cons_strategies.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
704
2017-06-29T17:45:34.000Z
2022-03-30T07:08:58.000Z
from abc import abstractmethod, ABCMeta from indy_common.authorize.auth_actions import split_action_id from indy_common.authorize.auth_constraints import AbstractAuthConstraint, AbstractConstraintSerializer from indy_common.state import config from plenum.common.metrics_collector import MetricsName, MetricsCollector f...
35.767677
103
0.663372
from abc import abstractmethod, ABCMeta from indy_common.authorize.auth_actions import split_action_id from indy_common.authorize.auth_constraints import AbstractAuthConstraint, AbstractConstraintSerializer from indy_common.state import config from plenum.common.metrics_collector import MetricsName, MetricsCollector f...
true
true
f70a9784cb666d54aa8b8ed0284ab8fdc2ba59d2
3,518
py
Python
supervisor/backups/validate.py
mib1185/homeassistant-supervisor
d536ac8604e1b5a0f5008c92e3d98fcc8ab16bb5
[ "Apache-2.0" ]
597
2017-04-27T15:10:08.000Z
2019-12-18T16:02:57.000Z
supervisor/backups/validate.py
mib1185/homeassistant-supervisor
d536ac8604e1b5a0f5008c92e3d98fcc8ab16bb5
[ "Apache-2.0" ]
799
2017-05-02T00:26:07.000Z
2019-12-18T21:40:18.000Z
supervisor/backups/validate.py
mib1185/homeassistant-supervisor
d536ac8604e1b5a0f5008c92e3d98fcc8ab16bb5
[ "Apache-2.0" ]
173
2017-04-26T17:03:42.000Z
2019-12-15T10:41:57.000Z
"""Validate some things around restore.""" from __future__ import annotations from typing import Any import voluptuous as vol from ..backups.const import BackupType from ..const import ( ATTR_ADDONS, ATTR_COMPRESSED, ATTR_CRYPTO, ATTR_DATE, ATTR_DOCKER, ATTR_FOLDERS, ATTR_HOMEASSISTANT, ...
28.370968
88
0.608016
from __future__ import annotations from typing import Any import voluptuous as vol from ..backups.const import BackupType from ..const import ( ATTR_ADDONS, ATTR_COMPRESSED, ATTR_CRYPTO, ATTR_DATE, ATTR_DOCKER, ATTR_FOLDERS, ATTR_HOMEASSISTANT, ATTR_NAME, ATTR_PROTECTED, ATTR_...
true
true
f70a978dd0049c27244b57c32fae3ca446d6330a
574
py
Python
utils/heap_queue.py
yeshwanthv5/PruneFL
ad1f7f33b0605d1d79abfbe42ef287fcc613a943
[ "MIT" ]
6
2021-07-01T05:35:08.000Z
2022-03-04T18:53:31.000Z
utils/heap_queue.py
yeshwanthv5/PruneFL
ad1f7f33b0605d1d79abfbe42ef287fcc613a943
[ "MIT" ]
null
null
null
utils/heap_queue.py
yeshwanthv5/PruneFL
ad1f7f33b0605d1d79abfbe42ef287fcc613a943
[ "MIT" ]
1
2021-06-21T14:24:47.000Z
2021-06-21T14:24:47.000Z
import heapq from typing import Iterable class HeapQueue: def __init__(self, init_h: Iterable): self.h = [(-val, index) for index, val in init_h] heapq.heapify(self.h) def replace_largest(self, new_val): heapq.heapreplace(self.h, (-new_val, self.max_index)) def pop(self): ...
22.076923
70
0.625436
import heapq from typing import Iterable class HeapQueue: def __init__(self, init_h: Iterable): self.h = [(-val, index) for index, val in init_h] heapq.heapify(self.h) def replace_largest(self, new_val): heapq.heapreplace(self.h, (-new_val, self.max_index)) def pop(self): ...
true
true
f70a9949d4166222fbcd0e7d65ca4dd9d870cbb4
628
py
Python
dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/LockChangeRequest.py
mjames-upc/python-awips
e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c
[ "BSD-3-Clause" ]
null
null
null
dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/LockChangeRequest.py
mjames-upc/python-awips
e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c
[ "BSD-3-Clause" ]
null
null
null
dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/LockChangeRequest.py
mjames-upc/python-awips
e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c
[ "BSD-3-Clause" ]
null
null
null
## ## # File auto-generated against equivalent DynamicSerialize Java class class LockChangeRequest(object): def __init__(self): self.requests = None self.workstationID = None self.siteID = None def getRequests(self): return self.requests def setRequests(self, requests): ...
20.258065
68
0.664013
class LockChangeRequest(object): def __init__(self): self.requests = None self.workstationID = None self.siteID = None def getRequests(self): return self.requests def setRequests(self, requests): self.requests = requests def getWorkstationID(self): ...
true
true
f70a998e45a9cd53af285a0aff5b0be6fe9d545d
1,642
py
Python
xua/build_tools.py
kmirzavaziri/xua-cli
e442f7522665cf6a4605acce3c023e8194f07176
[ "MIT" ]
null
null
null
xua/build_tools.py
kmirzavaziri/xua-cli
e442f7522665cf6a4605acce3c023e8194f07176
[ "MIT" ]
null
null
null
xua/build_tools.py
kmirzavaziri/xua-cli
e442f7522665cf6a4605acce3c023e8194f07176
[ "MIT" ]
null
null
null
import os from xua import helpers from xua.constants import CLI, BUILD from xua.exceptions import UserError from xua.builders.doc import htmlOld def getBuildEngine(project, config): if project == CLI.PROJECT_SERVER_PHP: # @TODO return None elif project == CLI.PROJECT_MARSHAL_DART: # @T...
37.318182
92
0.629111
import os from xua import helpers from xua.constants import CLI, BUILD from xua.exceptions import UserError from xua.builders.doc import htmlOld def getBuildEngine(project, config): if project == CLI.PROJECT_SERVER_PHP: return None elif project == CLI.PROJECT_MARSHAL_DART: re...
true
true
f70a9cb73c105b012ba90f9d50a5890ed86a8e48
14,491
py
Python
homeassistant/components/notify/html5.py
glogiotatidis/home-assistant
3b83a64f7cdf8a3b90f7f445869155c549c631b0
[ "Apache-2.0" ]
3
2019-01-24T20:32:14.000Z
2022-03-22T14:25:48.000Z
homeassistant/components/notify/html5.py
abusalimov/home-assistant
5b53bd6aa02a45ddcd4bf4358e74ddbc0285d8d3
[ "Apache-2.0" ]
null
null
null
homeassistant/components/notify/html5.py
abusalimov/home-assistant
5b53bd6aa02a45ddcd4bf4358e74ddbc0285d8d3
[ "Apache-2.0" ]
1
2022-03-22T14:25:52.000Z
2022-03-22T14:25:52.000Z
""" HTML5 Push Messaging notification service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.html5/ """ import datetime import json import logging import time import uuid from aiohttp.hdrs import AUTHORIZATION import voluptuous as vol from volup...
34.502381
79
0.630736
import datetime import json import logging import time import uuid from aiohttp.hdrs import AUTHORIZATION import voluptuous as vol from voluptuous.humanize import humanize_error from homeassistant.util.json import load_json, save_json from homeassistant.exceptions import HomeAssistantError from homeassistant.componen...
true
true
f70a9ce853cb9ce01b71a3e215447fff235084b1
386
py
Python
mysit/urls.py
GhasemMatoo/Mysite_Restaurants
f44e0b0374016850cc47f212db0d5693d6de2ee6
[ "MIT" ]
null
null
null
mysit/urls.py
GhasemMatoo/Mysite_Restaurants
f44e0b0374016850cc47f212db0d5693d6de2ee6
[ "MIT" ]
null
null
null
mysit/urls.py
GhasemMatoo/Mysite_Restaurants
f44e0b0374016850cc47f212db0d5693d6de2ee6
[ "MIT" ]
null
null
null
from django.urls import path from mysit.views import * app_name = 'mysit' urlpatterns = [ path('',index_views, name='index'), path('about',about_views, name='about'), path('contact',contact_views, name='contact'), path('gallery',gallery_views, name='gallery'), path('menu',menu_views, name='menu')...
27.571429
62
0.683938
from django.urls import path from mysit.views import * app_name = 'mysit' urlpatterns = [ path('',index_views, name='index'), path('about',about_views, name='about'), path('contact',contact_views, name='contact'), path('gallery',gallery_views, name='gallery'), path('menu',menu_views, name='menu')...
true
true
f70a9def8d0fc3fb9e3a591155df239d7c97521c
971
py
Python
fizzbuzz/fizzbuzz/number_publisher_node.py
ericboehlke/ros_fizzbuzz
c1bf95a154f78c050be255caa29e6454942ff6f6
[ "MIT" ]
null
null
null
fizzbuzz/fizzbuzz/number_publisher_node.py
ericboehlke/ros_fizzbuzz
c1bf95a154f78c050be255caa29e6454942ff6f6
[ "MIT" ]
null
null
null
fizzbuzz/fizzbuzz/number_publisher_node.py
ericboehlke/ros_fizzbuzz
c1bf95a154f78c050be255caa29e6454942ff6f6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import rclpy from rclpy.node import Node from std_msgs.msg import Int64 class NumberPublisher(Node): def __init__(self): super().__init__('number_publisher') self.publisher_ = self.create_publisher(Int64, 'numbers', 10) timer_period = 0.5 # seconds self.ti...
23.119048
73
0.661174
import rclpy from rclpy.node import Node from std_msgs.msg import Int64 class NumberPublisher(Node): def __init__(self): super().__init__('number_publisher') self.publisher_ = self.create_publisher(Int64, 'numbers', 10) timer_period = 0.5 self.timer = self.create_timer(timer_p...
true
true
f70a9fa422465f06e33a73da4d25cfab7390d3b8
2,624
py
Python
libs/dscache/odc/dscache/apps/dstiler.py
MatthewJA/odc-tools
4bf902701b858c15f2a5f27974d05daf96df42c3
[ "Apache-2.0" ]
null
null
null
libs/dscache/odc/dscache/apps/dstiler.py
MatthewJA/odc-tools
4bf902701b858c15f2a5f27974d05daf96df42c3
[ "Apache-2.0" ]
null
null
null
libs/dscache/odc/dscache/apps/dstiler.py
MatthewJA/odc-tools
4bf902701b858c15f2a5f27974d05daf96df42c3
[ "Apache-2.0" ]
null
null
null
from functools import partial import click from odc import dscache from odc.dscache.tools.tiling import ( bin_by_native_tile, web_gs, extract_native_albers_tile, parse_gridspec) from odc.dscache._dscache import mk_group_name from odc.index import bin_dataset_stream @click.command('dstiler') @click.op...
34.986667
102
0.653201
from functools import partial import click from odc import dscache from odc.dscache.tools.tiling import ( bin_by_native_tile, web_gs, extract_native_albers_tile, parse_gridspec) from odc.dscache._dscache import mk_group_name from odc.index import bin_dataset_stream @click.command('dstiler') @click.op...
true
true
f70aa11c73981f29fb4af7f7835b063d5d965fa2
917
py
Python
flex.py
johndemlon/c-and-c-server
562e5fd21b9b93f68f4e65a4c032f20128eb9c2d
[ "MIT" ]
2
2021-09-01T16:39:46.000Z
2021-09-08T16:44:56.000Z
flex.py
johndemlon/c-and-c-server
562e5fd21b9b93f68f4e65a4c032f20128eb9c2d
[ "MIT" ]
null
null
null
flex.py
johndemlon/c-and-c-server
562e5fd21b9b93f68f4e65a4c032f20128eb9c2d
[ "MIT" ]
null
null
null
# Date: 09/28/2017 # Author: Ethical-H4CK3R # Description: A Simple C&C Server from core.prompt import Prompt from core.server import Server from template.design import Designer from core.console import MainController from core.communicate import Communicate __version__ = 0.1 class Flex(Prompt, Server, Designer, Mai...
21.833333
66
0.718648
from core.prompt import Prompt from core.server import Server from template.design import Designer from core.console import MainController from core.communicate import Communicate __version__ = 0.1 class Flex(Prompt, Server, Designer, MainController, Communicate): def __init__(self): self.ip = '127.0.0.1' ...
true
true