hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f756684cc9ecab28ad20d858db62322ba1c36d1a
75,476
py
Python
wagtail/admin/tests/pages/test_edit_page.py
danbentley/wagtail
6ea0cc52f37ef5f6ed27b6f357fcce1efab90495
[ "BSD-3-Clause" ]
null
null
null
wagtail/admin/tests/pages/test_edit_page.py
danbentley/wagtail
6ea0cc52f37ef5f6ed27b6f357fcce1efab90495
[ "BSD-3-Clause" ]
null
null
null
wagtail/admin/tests/pages/test_edit_page.py
danbentley/wagtail
6ea0cc52f37ef5f6ed27b6f357fcce1efab90495
[ "BSD-3-Clause" ]
null
null
null
import datetime import os from unittest import mock from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.core import mail from django.core.files.base import ContentFile from django.http import HttpRequest, HttpResponse from django...
43.030787
252
0.630942
import datetime import os from unittest import mock from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.core import mail from django.core.files.base import ContentFile from django.http import HttpRequest, HttpResponse from django...
true
true
f75669fa978e0a2d08ccb46041c531ca095c8cc9
11,670
py
Python
mendeley/config_helpers.py
ScholarTools/ST_mendeley_python
6a0dd3732958b9f9af7d3a0582bf8d380350fdbf
[ "MIT" ]
null
null
null
mendeley/config_helpers.py
ScholarTools/ST_mendeley_python
6a0dd3732958b9f9af7d3a0582bf8d380350fdbf
[ "MIT" ]
8
2021-02-08T20:39:22.000Z
2021-11-02T18:43:59.000Z
mendeley/config_helpers.py
ScholarTools/ST_mendeley_python
6a0dd3732958b9f9af7d3a0582bf8d380350fdbf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ The configuration is a user specified file. This module works with those user specified files. The user must currently define a user_config.py file locally. This user_config file can point to another file outside the repo that gets synced across computers. More info on this can be fo...
35.688073
157
0.584662
import sys import os import importlib.machinery import inspect from . import errors from . import utils from .utils import get_list_class_display as cld def _print_error(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) #from . import utils #from mendeley.errors import InvalidConfig try...
true
true
f7566ad645bebb62c0cefdc1535721f9ee6c909a
2,215
py
Python
hrim_qa/scripts/requester_py.py
peterpolidoro/HRIM
148a6a5f88543ad1b62efecdccf7bbb2b744877b
[ "Apache-2.0" ]
32
2018-02-05T15:32:19.000Z
2019-02-14T03:16:38.000Z
hrim_qa/scripts/requester_py.py
peterpolidoro/HRIM
148a6a5f88543ad1b62efecdccf7bbb2b744877b
[ "Apache-2.0" ]
24
2018-02-06T15:41:56.000Z
2019-02-18T15:42:35.000Z
hrim_qa/scripts/requester_py.py
peterpolidoro/HRIM
148a6a5f88543ad1b62efecdccf7bbb2b744877b
[ "Apache-2.0" ]
17
2019-02-21T17:27:31.000Z
2022-01-21T02:28:16.000Z
#!/usr/bin/python3 import argparse import importlib import sys def requester(service_pkg, service_name, namespace): import rclpy # Import the service module = importlib.import_module(service_pkg + '.srv') srv_mod = getattr(module, service_name) req = srv_mod.Request() resp = srv_mod.Response...
35.725806
92
0.626637
import argparse import importlib import sys def requester(service_pkg, service_name, namespace): import rclpy module = importlib.import_module(service_pkg + '.srv') srv_mod = getattr(module, service_name) req = srv_mod.Request() resp = srv_mod.Response() srv_fixtures = [[req, resp]] ...
true
true
f7566ae4b05b8de83e30ed8de3aa05a545870e51
10,570
py
Python
sequana/expdesign.py
brwnj/sequana
58f6ca47815bf7253f27e4631d971a0a479c3a63
[ "BSD-3-Clause" ]
null
null
null
sequana/expdesign.py
brwnj/sequana
58f6ca47815bf7253f27e4631d971a0a479c3a63
[ "BSD-3-Clause" ]
null
null
null
sequana/expdesign.py
brwnj/sequana
58f6ca47815bf7253f27e4631d971a0a479c3a63
[ "BSD-3-Clause" ]
1
2019-10-11T18:21:05.000Z
2019-10-11T18:21:05.000Z
# -*- coding: utf-8 -*- # # This file is part of Sequana software # # Copyright (c) 2016 - Sequana Development Team # # File author(s): # Thomas Cokelaer <thomas.cokelaer@pasteur.fr> # Dimitri Desvillechabrol <dimitri.desvillechabrol@pasteur.fr>, # <d.desvillechabrol@gmail.com> # # Distributed un...
31.272189
91
0.601041
import shlex import io from sequana.lazy import pandas as pd __all__ = ["ExpDesignAdapter", "ExpDesignMiSeq", "ExpDesignHiSeq", "ExpDesignBase"] class ExpDesignAdapter(object): def __init__(self, filename, verbose=True): self.verbose = verbose try: self.df = filename.df.c...
true
true
f7566b1b6c0c05932b6f22c1c7f9d9c45cd1b1ed
239
py
Python
scripts/item/consume_2436749.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/item/consume_2436749.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/item/consume_2436749.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
# Created by MechAviv # Knife Wound Damage Skin (30 Day) | (2436749) if sm.addDamageSkin(2436749): sm.chat("'Knife Wound Damage Skin (30 Day)' Damage Skin has been added to your account's damage skin collection.") sm.consumeItem()
47.8
119
0.723849
if sm.addDamageSkin(2436749): sm.chat("'Knife Wound Damage Skin (30 Day)' Damage Skin has been added to your account's damage skin collection.") sm.consumeItem()
true
true
f7566b601c8fa0b37f052de9ec2e8b1a9852d33a
9,372
py
Python
hubspot/crm/objects/models/public_object_search_request.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
1
2020-11-12T08:46:32.000Z
2020-11-12T08:46:32.000Z
hubspot/crm/objects/models/public_object_search_request.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
hubspot/crm/objects/models/public_object_search_request.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ CRM Objects CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are standard objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported O...
32.541667
1,327
0.599872
import pprint import re import six from hubspot.crm.objects.configuration import Configuration class PublicObjectSearchRequest(object): openapi_types = { "filter_groups": "list[FilterGroup]", "sorts": "list[str]", "query": "str", "properties": "list[str]", "limit": "...
true
true
f7566bac9bd290600d24b40875d1b678d8e7ce07
37,990
py
Python
tensorflow/python/ops/while_v2.py
d813s909q/tensortflow
bf16a7511a2d29c460d4e1a771d53ef692a2d32b
[ "Apache-2.0" ]
2
2020-03-20T20:05:13.000Z
2020-03-20T20:05:15.000Z
tensorflow/python/ops/while_v2.py
wolves7/tensorflow
ae244e6dabeb6b879c5adb9ca4c2a85cb4722dc5
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/while_v2.py
wolves7/tensorflow
ae244e6dabeb6b879c5adb9ca4c2a85cb4722dc5
[ "Apache-2.0" ]
1
2020-05-15T06:20:58.000Z
2020-05-15T06:20:58.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.878104
88
0.722295
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import func_graph as func...
true
true
f7566e1c1052ee9f99aeef4e4051027bb9624212
435
py
Python
nanalib/nanalib/nanalib/doctype/author/author.py
mohamedhafezqo/nana_library
d429b2a1f2af4ba988e96c86e39985c19b8ffb51
[ "MIT" ]
null
null
null
nanalib/nanalib/nanalib/doctype/author/author.py
mohamedhafezqo/nana_library
d429b2a1f2af4ba988e96c86e39985c19b8ffb51
[ "MIT" ]
null
null
null
nanalib/nanalib/nanalib/doctype/author/author.py
mohamedhafezqo/nana_library
d429b2a1f2af4ba988e96c86e39985c19b8ffb51
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020, nana and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Author(Document): pass @frappe.whitelist() def test_function(doc_name): author = frapp...
19.772727
49
0.735632
from __future__ import unicode_literals import frappe from frappe.model.document import Document class Author(Document): pass @frappe.whitelist() def test_function(doc_name): author = frappe.get_doc('Author', doc_name) author.age = 23 author.save(ignore_permissions = True) return doc_name
true
true
f7566e5a97202843842b8fae8dab83bea7396deb
17,457
py
Python
indy_node/server/node_bootstrap.py
eric-erki/indy-node
7313dd4f948b059b01f992548bf253bde646b432
[ "Apache-2.0" ]
null
null
null
indy_node/server/node_bootstrap.py
eric-erki/indy-node
7313dd4f948b059b01f992548bf253bde646b432
[ "Apache-2.0" ]
null
null
null
indy_node/server/node_bootstrap.py
eric-erki/indy-node
7313dd4f948b059b01f992548bf253bde646b432
[ "Apache-2.0" ]
null
null
null
from indy_node.persistence.attribute_store import AttributeStore from indy_node.persistence.idr_cache import IdrCache from indy_node.server.pool_config import PoolConfig from indy_node.server.request_handlers.action_req_handlers.pool_restart_handler import PoolRestartHandler from indy_node.server.request_handlers.actio...
66.629771
129
0.717821
from indy_node.persistence.attribute_store import AttributeStore from indy_node.persistence.idr_cache import IdrCache from indy_node.server.pool_config import PoolConfig from indy_node.server.request_handlers.action_req_handlers.pool_restart_handler import PoolRestartHandler from indy_node.server.request_handlers.actio...
true
true
f7566f422c879480e110d43440af05b8d9e9813b
1,813
py
Python
janitor/package/chef/client.py
nilesh-naik/lambda-functions
5daa2828914d23851538d5c3cb11f36b0f4bac52
[ "MIT" ]
77
2016-03-15T21:51:11.000Z
2021-09-15T18:40:25.000Z
janitor/package/chef/client.py
nilesh-naik/lambda-functions
5daa2828914d23851538d5c3cb11f36b0f4bac52
[ "MIT" ]
20
2016-04-15T18:40:57.000Z
2021-06-01T18:59:56.000Z
janitor/package/chef/client.py
nilesh-naik/lambda-functions
5daa2828914d23851538d5c3cb11f36b0f4bac52
[ "MIT" ]
53
2016-04-07T07:35:04.000Z
2022-01-25T18:48:10.000Z
from chef.api import ChefAPI from chef.base import ChefObject class Client(ChefObject): """A Chef client object.""" url = '/clients' def _populate(self, data): self.platform = self.api and self.api.platform self.private_key = None if self.platform: self.orgname = data....
30.728814
63
0.548814
from chef.api import ChefAPI from chef.base import ChefObject class Client(ChefObject): url = '/clients' def _populate(self, data): self.platform = self.api and self.api.platform self.private_key = None if self.platform: self.orgname = data.get('orgname') self....
true
true
f7566fe859d7fa01ea3c413cf42721e95d9a2510
966
py
Python
tests/unit/frames/heartbeat_frame_test.py
simomo/haigha
59f59e58fd6edb6a4dc2a9e89e7aeff8bfaceaf0
[ "BSD-3-Clause" ]
null
null
null
tests/unit/frames/heartbeat_frame_test.py
simomo/haigha
59f59e58fd6edb6a4dc2a9e89e7aeff8bfaceaf0
[ "BSD-3-Clause" ]
null
null
null
tests/unit/frames/heartbeat_frame_test.py
simomo/haigha
59f59e58fd6edb6a4dc2a9e89e7aeff8bfaceaf0
[ "BSD-3-Clause" ]
null
null
null
''' Copyright (c) 2011-2014, Agora Games, LLC All rights reserved. https://github.com/agoragames/haigha/blob/master/LICENSE.txt ''' from chai import Chai from haigha.frames import heartbeat_frame from haigha.frames.heartbeat_frame import HeartbeatFrame from haigha.frames.frame import Frame class HeartbeatFrameTest...
28.411765
73
0.693582
from chai import Chai from haigha.frames import heartbeat_frame from haigha.frames.heartbeat_frame import HeartbeatFrame from haigha.frames.frame import Frame class HeartbeatFrameTest(Chai): def test_type(self): assert_equals(8, HeartbeatFrame.type()) def test_parse(self): frame = Heartbea...
true
true
f756704c04df19e2dcc32ed2d6398938bff2a5b2
11,819
py
Python
tests/CLI/modules/report_tests.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
null
null
null
tests/CLI/modules/report_tests.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
null
null
null
tests/CLI/modules/report_tests.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
null
null
null
""" SoftLayer.tests.CLI.modules.report_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :license: MIT, see LICENSE for more details. """ from SoftLayer import testing import json from pprint import pprint as pp class ReportTests(testing.TestCase): def test_bandwidth_invalid_date(self): resul...
39.661074
101
0.482528
from SoftLayer import testing import json from pprint import pprint as pp class ReportTests(testing.TestCase): def test_bandwidth_invalid_date(self): result = self.run_command( [ 'report', 'bandwidth', '--start=welp', '--end=20...
true
true
f75670f403facee60df3de85bd9b210fb3d985c9
906
py
Python
setup.py
perdixsw/umpy
758cb69c370c825b247ff8f7bec1cc1718181c92
[ "MIT" ]
1
2018-02-07T11:32:19.000Z
2018-02-07T11:32:19.000Z
setup.py
perdixsw/umpy
758cb69c370c825b247ff8f7bec1cc1718181c92
[ "MIT" ]
null
null
null
setup.py
perdixsw/umpy
758cb69c370c825b247ff8f7bec1cc1718181c92
[ "MIT" ]
null
null
null
#! /usr/bin/env python from setuptools import setup setup( name='umpy', packages=['umpy',], version='0.9.9', url='https://www.github.com/perdixsw/umpy', download_url='https://www.github.com/perdixsw/umpy/tarball/master', author='Perdix Software', author_email='ssmith@perdixsw.com', description=('Simple unit of...
31.241379
101
0.708609
from setuptools import setup setup( name='umpy', packages=['umpy',], version='0.9.9', url='https://www.github.com/perdixsw/umpy', download_url='https://www.github.com/perdixsw/umpy/tarball/master', author='Perdix Software', author_email='ssmith@perdixsw.com', description=('Simple unit of measure conversion for...
true
true
f7567100c49c475fa2fcb034c8cb38952cac9897
5,303
py
Python
finrl/pairlist/pairlistmanager.py
behnam71/FinRL-Library_Exchange
13f05667a5fbed734ced350debfb42120f06e384
[ "MIT" ]
1
2022-01-17T17:49:00.000Z
2022-01-17T17:49:00.000Z
finrl/pairlist/pairlistmanager.py
behnam71/FinRL-Library_Exchange
13f05667a5fbed734ced350debfb42120f06e384
[ "MIT" ]
null
null
null
finrl/pairlist/pairlistmanager.py
behnam71/FinRL-Library_Exchange
13f05667a5fbed734ced350debfb42120f06e384
[ "MIT" ]
null
null
null
""" PairList manager class """ import logging from copy import deepcopy from typing import Dict, List from cachetools import TTLCache, cached from finrl.constants import ListPairsWithTimeframes from finrl.exceptions import OperationalException from finrl.pairlist.IPairList import IPairList from finrl.resolvers import...
37.083916
103
0.607392
import logging from copy import deepcopy from typing import Dict, List from cachetools import TTLCache, cached from finrl.constants import ListPairsWithTimeframes from finrl.exceptions import OperationalException from finrl.pairlist.IPairList import IPairList from finrl.resolvers import PairListResolver logger = log...
true
true
f7567121323b7b9f341bfc25c2d36fd385f72ed2
540
py
Python
manage.py
varkon/eparhiaodua
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
2
2018-04-24T10:41:11.000Z
2018-04-24T10:41:15.000Z
manage.py
varkon/eparhia
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
null
null
null
manage.py
varkon/eparhia
f2a2d6fd3c89748712e38f4035a720c6a7ad7fe3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "eparhia.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are...
33.75
73
0.687037
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "eparhia.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installe...
true
true
f75671bf5482466ffcd0709021b2efad074c22d7
287
py
Python
src/com/python/io/BytesIO_Demo.py
Leeo1124/pythonDemo
72e2209c095301a3f1f61edfe03ea69c3c05be40
[ "Apache-2.0" ]
null
null
null
src/com/python/io/BytesIO_Demo.py
Leeo1124/pythonDemo
72e2209c095301a3f1f61edfe03ea69c3c05be40
[ "Apache-2.0" ]
null
null
null
src/com/python/io/BytesIO_Demo.py
Leeo1124/pythonDemo
72e2209c095301a3f1f61edfe03ea69c3c05be40
[ "Apache-2.0" ]
null
null
null
''' Created on 2016年8月4日 @author: Administrator ''' from io import BytesIO # write to BytesIO: f = BytesIO() f.write(b'hello') f.write(b' ') f.write(b'world!') print(f.getvalue()) # read from BytesIO: data = '人闲桂花落,夜静春山空。月出惊山鸟,时鸣春涧中。'.encode('utf-8') f = BytesIO(data) print(f.read())
15.944444
49
0.675958
from io import BytesIO f = BytesIO() f.write(b'hello') f.write(b' ') f.write(b'world!') print(f.getvalue()) data = '人闲桂花落,夜静春山空。月出惊山鸟,时鸣春涧中。'.encode('utf-8') f = BytesIO(data) print(f.read())
true
true
f75672c2e9cd54c985b3d5c625b32b21978a3bf0
3,139
py
Python
Scripts/lines.py
larksq/Lane-Lines-Detection-and-Localization
f07d7feaca7c5e1132bf22c27745328968441ff0
[ "MIT" ]
null
null
null
Scripts/lines.py
larksq/Lane-Lines-Detection-and-Localization
f07d7feaca7c5e1132bf22c27745328968441ff0
[ "MIT" ]
null
null
null
Scripts/lines.py
larksq/Lane-Lines-Detection-and-Localization
f07d7feaca7c5e1132bf22c27745328968441ff0
[ "MIT" ]
1
2020-12-15T09:08:10.000Z
2020-12-15T09:08:10.000Z
import numpy as np class lines: maxNum = 50 threshold = 1 insist = True def __init__(self): # was the line detected in the last iteration? self.detected = False # x values of the last n fits of the line self.recent_xfitted = [] #average x values of the fitted l...
30.475728
138
0.558458
import numpy as np class lines: maxNum = 50 threshold = 1 insist = True def __init__(self): self.detected = False self.recent_xfitted = [] self.bestx = None self.best_fit = None self.current_fit = [np.array([False])] ...
true
true
f75674034e380b36646943d253087f2384c9e4dc
3,801
py
Python
python/examples/client_http.py
josusky/qpid-proton
122355ab5eeed05c7fe1169653387afb1c9fdd95
[ "Apache-2.0" ]
2
2019-05-20T17:57:24.000Z
2021-11-06T23:01:16.000Z
python/examples/client_http.py
josusky/qpid-proton
122355ab5eeed05c7fe1169653387afb1c9fdd95
[ "Apache-2.0" ]
33
2021-04-27T21:40:31.000Z
2021-06-30T17:52:17.000Z
python/examples/client_http.py
josusky/qpid-proton
122355ab5eeed05c7fe1169653387afb1c9fdd95
[ "Apache-2.0" ]
7
2017-11-02T23:13:56.000Z
2021-11-06T23:01:05.000Z
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
32.767241
97
0.663773
from __future__ import print_function import tornado.ioloop import tornado.web from tornado.gen import coroutine from tornado.concurrent import Future from proton import Message from proton.handlers import MessagingHandler from proton_tornado import Container class Client(MessagingHandler): def __init__(self, hos...
true
true
f756740500996825bfe5444fedd8c58072139826
957
py
Python
zeus/migrations/61a1763b9c8d_reindex_outcomes.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
221
2017-07-03T17:29:21.000Z
2021-12-07T19:56:59.000Z
zeus/migrations/61a1763b9c8d_reindex_outcomes.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
298
2017-07-04T18:08:14.000Z
2022-03-03T22:24:51.000Z
zeus/migrations/61a1763b9c8d_reindex_outcomes.py
conrad-kronos/zeus
ddb6bc313e51fb22222b30822b82d76f37dbbd35
[ "Apache-2.0" ]
24
2017-07-15T13:46:45.000Z
2020-08-16T16:14:45.000Z
"""reindex_outcomes Revision ID: 61a1763b9c8d Revises: 340d5cc7e806 Create Date: 2019-08-09 12:47:22.165013 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "61a1763b9c8d" down_revision = "340d5cc7e806" branch_labels = () depends_on = None def upgrade(): #...
23.341463
65
0.646813
from alembic import op import sqlalchemy as sa revision = "61a1763b9c8d" down_revision = "340d5cc7e806" branch_labels = () depends_on = None def upgrade(): op.drop_index("idx_build_outcomes", table_name="build") op.create_index( "idx_build_outcomes", "build", ["repository_id", "s...
true
true
f7567425ac74382ee7e51895f5fe4ac6bb9889f6
4,995
py
Python
gbvision/utils/continuity/continues_shape_wrapper.py
computerboy0555/GBVision
79fc9ba09865bfd9c7a39abaa3980c46ce090b07
[ "Apache-2.0" ]
16
2019-04-15T18:52:58.000Z
2022-02-13T23:00:46.000Z
gbvision/utils/continuity/continues_shape_wrapper.py
computerboy0555/GBVision
79fc9ba09865bfd9c7a39abaa3980c46ce090b07
[ "Apache-2.0" ]
2
2019-04-15T19:00:05.000Z
2019-04-19T15:47:21.000Z
gbvision/utils/continuity/continues_shape_wrapper.py
computerboy0555/GBVision
79fc9ba09865bfd9c7a39abaa3980c46ce090b07
[ "Apache-2.0" ]
3
2019-05-03T13:48:25.000Z
2019-09-22T14:03:49.000Z
from typing import List, Dict, Callable, Union from gbvision.constants.types import Frame, Shape from gbvision.utils.continuity import ContinuesCircle from gbvision.utils.continuity.continues_rect import ContinuesRect from gbvision.utils.continuity import ContinuesRotatedRect from gbvision.utils.continuity import Cont...
44.20354
181
0.662062
from typing import List, Dict, Callable, Union from gbvision.constants.types import Frame, Shape from gbvision.utils.continuity import ContinuesCircle from gbvision.utils.continuity.continues_rect import ContinuesRect from gbvision.utils.continuity import ContinuesRotatedRect from gbvision.utils.continuity import Cont...
true
true
f75674800390bc264d09c594ded40a61204bc1ad
674
py
Python
tests/pyre.pkg/parsing/exceptions.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/pyre.pkg/parsing/exceptions.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/pyre.pkg/parsing/exceptions.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2022 all rights reserved # """ Tests for all the exceptions raised by this package """ def test(): from pyre.parsing.exceptions import ( ParsingError, TokenizationError ) try: raise Parsi...
16.047619
67
0.62908
def test(): from pyre.parsing.exceptions import ( ParsingError, TokenizationError ) try: raise ParsingError() except ParsingError as error: pass try: raise TokenizationError(text=None, locator=None) except TokenizationError as error: pass re...
true
true
f7567489cf1dfdcc62898b30ebf479d71499aaec
14,012
py
Python
eeauditor/auditors/aws/AMI_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
442
2020-03-15T20:56:36.000Z
2022-03-31T22:13:07.000Z
eeauditor/auditors/aws/AMI_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
57
2020-03-15T22:09:56.000Z
2022-03-31T13:17:06.000Z
eeauditor/auditors/aws/AMI_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
59
2020-03-15T21:19:10.000Z
2022-03-31T15:01:31.000Z
#This file is part of ElectricEye. #SPDX-License-Identifier: Apache-2.0 #Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you un...
47.020134
160
0.452541
import boto3 import datetime from check_register import CheckRegister registry = CheckRegister() ec2 = boto3.client("ec2") def describe_images(cache, awsAccountId): response = cache.get("describe_images") if response: return response cache["describe_images"] = ec2.describe_images( Filte...
true
true
f756757a9a60c693d15ccd64b86f9ffd075acaae
28,709
py
Python
tools/callstats.py
LancerWang001/v8
42ff4531f590b901ade0a18bfd03e56485fe2452
[ "BSD-3-Clause" ]
20,995
2015-01-01T05:12:40.000Z
2022-03-31T21:39:18.000Z
tools/callstats.py
Andrea-MariaDB-2/v8
a0f0ebd7a876e8cb2210115adbfcffe900e99540
[ "BSD-3-Clause" ]
333
2020-07-15T17:06:05.000Z
2021-03-15T12:13:09.000Z
tools/callstats.py
Andrea-MariaDB-2/v8
a0f0ebd7a876e8cb2210115adbfcffe900e99540
[ "BSD-3-Clause" ]
4,523
2015-01-01T15:12:34.000Z
2022-03-28T06:23:41.000Z
#!/usr/bin/env python # Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Usage: callstats.py [-h] <command> ... Optional arguments: -h, --help show this help message and exit Commands: run ...
36.901028
80
0.619004
from __future__ import print_function import argparse import json import os import re import shutil import subprocess import sys import tempfile import operator from callstats_groups import RUNTIME_CALL_STATS_GROUPS import numpy from math import sqrt MAX_NOF_RETRIES = 5 def print_command(cmd_args): def fix_fo...
true
true
f756759341b46a297c81e1c388795ca0b1efee8e
5,406
py
Python
databuilder/databuilder/publisher/elasticsearch_publisher.py
jdavidheiser/amundsen
fc18c0ed0cca80f90d3d11436f2c73eb5e385235
[ "Apache-2.0" ]
139
2019-02-11T18:58:21.000Z
2020-08-04T17:04:37.000Z
databuilder/databuilder/publisher/elasticsearch_publisher.py
jdavidheiser/amundsen
fc18c0ed0cca80f90d3d11436f2c73eb5e385235
[ "Apache-2.0" ]
260
2019-02-13T01:46:52.000Z
2020-08-10T22:03:37.000Z
databuilder/databuilder/publisher/elasticsearch_publisher.py
jdavidheiser/amundsen
fc18c0ed0cca80f90d3d11436f2c73eb5e385235
[ "Apache-2.0" ]
139
2019-02-11T19:59:05.000Z
2020-08-06T16:48:46.000Z
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import json import logging from typing import List from elasticsearch.exceptions import NotFoundError from pyhocon import ConfigTree from databuilder.publisher.base_publisher import Publisher from databuilder.publisher.elasticsea...
42.566929
117
0.689789
import json import logging from typing import List from elasticsearch.exceptions import NotFoundError from pyhocon import ConfigTree from databuilder.publisher.base_publisher import Publisher from databuilder.publisher.elasticsearch_constants import TABLE_ELASTICSEARCH_INDEX_MAPPING LOGGER = logging.getLogger(__nam...
true
true
f756767bcfd8661f49498dda90a5436d0749e2f5
1,025
py
Python
setup.py
justheuristic/rpcudp
ec56638ce963a4ea49bc34ac407ec7c09bae816f
[ "MIT" ]
87
2015-01-25T10:05:51.000Z
2021-07-22T15:56:18.000Z
setup.py
justheuristic/rpcudp
ec56638ce963a4ea49bc34ac407ec7c09bae816f
[ "MIT" ]
14
2015-05-18T13:45:27.000Z
2021-02-05T13:46:10.000Z
setup.py
justheuristic/rpcudp
ec56638ce963a4ea49bc34ac407ec7c09bae816f
[ "MIT" ]
34
2015-04-15T23:49:16.000Z
2022-01-03T19:12:59.000Z
#!/usr/bin/env python from setuptools import setup, find_packages import rpcudp setup( name="rpcudp", version=rpcudp.__version__, description="Asynchronous RPC via UDP", long_description=open("README.md", encoding='utf-8').read(), long_description_content_type='text/markdown', author="Brian Mul...
34.166667
69
0.658537
from setuptools import setup, find_packages import rpcudp setup( name="rpcudp", version=rpcudp.__version__, description="Asynchronous RPC via UDP", long_description=open("README.md", encoding='utf-8').read(), long_description_content_type='text/markdown', author="Brian Muller", author_email...
true
true
f7567698ec9b49382e136e75e4da99e592e3c367
159
py
Python
backend/apps/flagged/apps.py
MAX-EINSTEIN/thecodejournalists
4cfbca4b6bb13107dbeca1dc87e80b08d4a763c4
[ "MIT" ]
2
2021-06-24T13:15:41.000Z
2021-06-25T12:32:00.000Z
backend/apps/flagged/apps.py
MAX-EINSTEIN/thecodejournalists
4cfbca4b6bb13107dbeca1dc87e80b08d4a763c4
[ "MIT" ]
null
null
null
backend/apps/flagged/apps.py
MAX-EINSTEIN/thecodejournalists
4cfbca4b6bb13107dbeca1dc87e80b08d4a763c4
[ "MIT" ]
3
2021-07-02T17:38:25.000Z
2021-07-02T17:41:10.000Z
from django.apps import AppConfig class FlaggedConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'backend.apps.flagged'
22.714286
56
0.767296
from django.apps import AppConfig class FlaggedConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'backend.apps.flagged'
true
true
f75677a39d08cf436eea6a4c42d92451273934fb
4,974
py
Python
tern/extensions/scancode/executor.py
aditi137/tern
2c216e52bb6fc45842fb664881ae3a049be1fd1a
[ "BSD-2-Clause" ]
null
null
null
tern/extensions/scancode/executor.py
aditi137/tern
2c216e52bb6fc45842fb664881ae3a049be1fd1a
[ "BSD-2-Clause" ]
null
null
null
tern/extensions/scancode/executor.py
aditi137/tern
2c216e52bb6fc45842fb664881ae3a049be1fd1a
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2019-2020 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-2-Clause """ Execute scancode https://github.com/nexB/scancode-toolkit This plugin does not support installation of scancode The expected environment is as follows: 1. Create a python3 virtual envir...
39.792
78
0.589666
import json import logging from tern.analyze.passthrough import get_filesystem_command from tern.analyze.passthrough import get_file_command from tern.classes.notice import Notice from tern.classes.file_data import FileData from tern.extensions.executor import Executor from tern.utils import constants from tern.util...
true
true
f7567869f0313d1476d6a28422d8cc49fbb97cb0
223
py
Python
n_utils/tests/account_utils_test.py
MarkusNousiainenWebscale/nameless-deploy-tools
f39060d4c6835f1d2236d5ce236d7da09318e01e
[ "Apache-2.0" ]
null
null
null
n_utils/tests/account_utils_test.py
MarkusNousiainenWebscale/nameless-deploy-tools
f39060d4c6835f1d2236d5ce236d7da09318e01e
[ "Apache-2.0" ]
null
null
null
n_utils/tests/account_utils_test.py
MarkusNousiainenWebscale/nameless-deploy-tools
f39060d4c6835f1d2236d5ce236d7da09318e01e
[ "Apache-2.0" ]
null
null
null
from n_utils.account_utils import find_role_arn def test_find_role_arn(mocker): cloudformation = mocker.patch('n_utils.account_utils.cloudformation') find_role_arn('foo') cloudformation.assert_called_with()
22.3
73
0.793722
from n_utils.account_utils import find_role_arn def test_find_role_arn(mocker): cloudformation = mocker.patch('n_utils.account_utils.cloudformation') find_role_arn('foo') cloudformation.assert_called_with()
true
true
f756786b919ed5b2ed79a9a66eaf1d91f01be6b3
1,468
py
Python
disentanglement_lib/evaluation/metrics/beta_vae_test.py
jboilard1994/disentanglement_lib
9cb6bdbafeb0247864f94d5c5c0853a310c86b9e
[ "Apache-2.0" ]
1,280
2019-02-09T20:27:37.000Z
2022-03-29T18:02:23.000Z
disentanglement_lib/evaluation/metrics/beta_vae_test.py
Jimmy-INL/disentanglement_lib
a64b8b9994a28fafd47ccd866b0318fa30a3c76c
[ "Apache-2.0" ]
34
2019-02-14T23:18:01.000Z
2021-11-23T00:55:54.000Z
disentanglement_lib/evaluation/metrics/beta_vae_test.py
Jimmy-INL/disentanglement_lib
a64b8b9994a28fafd47ccd866b0318fa30a3c76c
[ "Apache-2.0" ]
199
2019-02-13T17:52:00.000Z
2022-03-11T17:37:26.000Z
# coding=utf-8 # Copyright 2018 The DisentanglementLib Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
34.139535
74
0.769755
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import absltest from disentanglement_lib.data.ground_truth import dummy_data from disentanglement_lib.evaluation.metrics import beta_vae import numpy as np class BetaVaeTest(absltest.TestC...
true
true
f75678cc388420796ee6a8f6c36db1f9894950b4
3,256
py
Python
tools/MNNPythonOfflineQuant/mnn_offline_quant.py
JujuDel/MNN
8a82f5c5a7ae37192784c2dbd6dfc8ca8833565a
[ "Apache-2.0" ]
1
2021-06-01T03:02:29.000Z
2021-06-01T03:02:29.000Z
tools/MNNPythonOfflineQuant/mnn_offline_quant.py
JujuDel/MNN
8a82f5c5a7ae37192784c2dbd6dfc8ca8833565a
[ "Apache-2.0" ]
null
null
null
tools/MNNPythonOfflineQuant/mnn_offline_quant.py
JujuDel/MNN
8a82f5c5a7ae37192784c2dbd6dfc8ca8833565a
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import time import argparse import numpy as np import tqdm import MNN import yaml from calibration_dataset import calibration_dataset nn = MNN.nn F = MNN.expr def get_mnn_format(format_str): fmt = str.lower(format_str) if fmt == 'nchw': return F.NCHW elif fmt...
27.133333
109
0.646192
from __future__ import print_function import time import argparse import numpy as np import tqdm import MNN import yaml from calibration_dataset import calibration_dataset nn = MNN.nn F = MNN.expr def get_mnn_format(format_str): fmt = str.lower(format_str) if fmt == 'nchw': return F.NCHW elif fmt...
true
true
f7567916333629bfeba9857fe4ea096d006303f1
18,747
py
Python
networkx/algorithms/coloring/tests/test_coloring.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
1
2020-08-08T21:52:34.000Z
2020-08-08T21:52:34.000Z
networkx/algorithms/coloring/tests/test_coloring.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
2
2019-11-13T03:48:53.000Z
2021-02-15T16:52:09.000Z
networkx/algorithms/coloring/tests/test_coloring.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Greedy coloring test suite. """ __author__ = "\n".join(["Christian Olsson <chro@itu.dk>", "Jan Aagaard Meier <jmei@itu.dk>", "Henrik Haugbølle <hhau@itu.dk>", "Jake VanderPlas <jakevdp@uw.edu>"]) import networkx as nx ...
26.110028
79
0.451912
__author__ = "\n".join(["Christian Olsson <chro@itu.dk>", "Jan Aagaard Meier <jmei@itu.dk>", "Henrik Haugbølle <hhau@itu.dk>", "Jake VanderPlas <jakevdp@uw.edu>"]) import networkx as nx import pytest is_coloring = nx.algorithms.coloring.equitab...
true
true
f7567a70ee46c2ec7e99a1f1951a4331dec058e2
1,265
py
Python
core/migrations/0002_tasktemplate.py
Suleymanov2006/ansible-manager
57397c12e49611a5cc6197ecd184222caabf1361
[ "MIT" ]
13
2017-03-18T06:03:43.000Z
2020-02-15T03:42:28.000Z
core/migrations/0002_tasktemplate.py
Suleymanov2006/ansible-manager
57397c12e49611a5cc6197ecd184222caabf1361
[ "MIT" ]
78
2017-03-17T18:16:32.000Z
2018-10-26T11:58:20.000Z
core/migrations/0002_tasktemplate.py
Suleymanov2006/ansible-manager
57397c12e49611a5cc6197ecd184222caabf1361
[ "MIT" ]
6
2017-03-19T13:41:29.000Z
2019-09-11T21:36:52.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-19 20:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( ...
40.806452
135
0.611858
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name='TaskTemplate', fields=[ ('id', models...
true
true
f7567aef6e517998f8039c53f7625461f13d15e4
644
py
Python
3-python-poo (programacao orientada a objeto)/aula07-associacao/classes.py
Leodf/projetos-python
64e6262e6535d92624ad50148634d881608a7523
[ "MIT" ]
null
null
null
3-python-poo (programacao orientada a objeto)/aula07-associacao/classes.py
Leodf/projetos-python
64e6262e6535d92624ad50148634d881608a7523
[ "MIT" ]
null
null
null
3-python-poo (programacao orientada a objeto)/aula07-associacao/classes.py
Leodf/projetos-python
64e6262e6535d92624ad50148634d881608a7523
[ "MIT" ]
null
null
null
class Escritor: def __init__(self, nome): self.__nome = nome self.__ferramenta = None @property def nome(self): return self.__nome @property def ferramenta(self): return self.__ferramenta @ferramenta.setter def ferramenta(self, ferramenta): self.__...
20.125
43
0.627329
class Escritor: def __init__(self, nome): self.__nome = nome self.__ferramenta = None @property def nome(self): return self.__nome @property def ferramenta(self): return self.__ferramenta @ferramenta.setter def ferramenta(self, ferramenta): self.__...
true
true
f7567b06514bcbd666c58a2cc65a85506320aef2
18,534
py
Python
toontown/racing/DistributedRaceAI.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
null
null
null
toontown/racing/DistributedRaceAI.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
1
2021-06-08T17:16:48.000Z
2021-06-08T17:16:48.000Z
toontown/racing/DistributedRaceAI.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
3
2021-06-03T05:36:36.000Z
2021-06-22T15:07:31.000Z
from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from otp.otpbase.PythonUtil import nonRepeatingRandomList import DistributedGagAI, DistributedProjectileAI from direct.task import Task import random, time, Racer, RaceGlob...
38.774059
254
0.598144
from direct.distributed import DistributedObjectAI from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from otp.otpbase.PythonUtil import nonRepeatingRandomList import DistributedGagAI, DistributedProjectileAI from direct.task import Task import random, time, Racer, RaceGlob...
true
true
f7567b920506252bfeaa282eb22088cde38ed2cc
12,921
py
Python
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_toeplitz.py
wataruhashimoto52/probability
12e3f256544eadea6e863868da825614f4423eb0
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_toeplitz.py
wataruhashimoto52/probability
12e3f256544eadea6e863868da825614f4423eb0
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_toeplitz.py
wataruhashimoto52/probability
12e3f256544eadea6e863868da825614f4423eb0
[ "Apache-2.0" ]
1
2020-06-04T23:26:31.000Z
2020-06-04T23:26:31.000Z
# Copyright 2020 The TensorFlow Probability Authors. All Rights Reserved. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # THIS FILE IS AUTO-GENERATED BY `gen_linear_operators.py`. # DO NOT MODIFY DIRECTLY. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
41.546624
119
0.678043
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow_probability.python.internal.backend.numpy import dtype as dtypes from tensorflow_probability.python.internal.backend.numpy import ops from tensorflow_probability.python.internal.backend.numpy ...
true
true
f7567bfbe1448ed205a5efce09ac351e293aa152
521
py
Python
apps/goosepond/views/goosename/name_component.py
lymmers/lymmers.com
661ab442c9b7ad459c6615afec8de7cbda58c176
[ "MIT" ]
null
null
null
apps/goosepond/views/goosename/name_component.py
lymmers/lymmers.com
661ab442c9b7ad459c6615afec8de7cbda58c176
[ "MIT" ]
5
2022-03-28T16:35:47.000Z
2022-03-28T16:39:08.000Z
apps/goosepond/views/goosename/name_component.py
lymmers/lymmers.com
661ab442c9b7ad459c6615afec8de7cbda58c176
[ "MIT" ]
null
null
null
from django.views import View from django.shortcuts import render import logging from apps.goosepond.utils.namegoosifier import goosify log = logging.getLogger('goosepond') class NameComponent(View): def post(self, request): """Render the goosename component.""" gooseinput = request.POST.get("goos...
27.421053
54
0.662188
from django.views import View from django.shortcuts import render import logging from apps.goosepond.utils.namegoosifier import goosify log = logging.getLogger('goosepond') class NameComponent(View): def post(self, request): gooseinput = request.POST.get("gooseinput") log.critical(list(request.POS...
true
true
f7567c0777e7db64ccae12ccabeb56e3a27edf66
8,211
py
Python
networkx_mod/algorithms/flow/edmondskarp.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/algorithms/flow/edmondskarp.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/algorithms/flow/edmondskarp.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Edmonds-Karp algorithm for maximum flow problems. """ __author__ = """ysitu <ysitu@users.noreply.github.com>""" # Copyright (C) 2014 ysitu <ysitu@users.noreply.github.com> # All rights reserved. # BSD license. import networkx_mod as nx from networkx_mod.algorithms.flow.utils import * __al...
32.844
79
0.566435
__author__ = """ysitu <ysitu@users.noreply.github.com>""" import networkx_mod as nx from networkx_mod.algorithms.flow.utils import * __all__ = ['edmonds_karp'] def edmonds_karp_core(R, s, t, cutoff): R_node = R.node R_pred = R.pred R_succ = R.succ inf = R.graph['inf'] def augment(path): ...
true
true
f7567c8e59cdf9cdf452a7850015ca4cc9df6441
1,744
py
Python
src/functions/fixtures_offload.py
Gilbertly/kickoffai-sls-dataml
5098e65c167cb59064c6273f15479cd5b0c53ad8
[ "MIT" ]
1
2022-03-04T06:55:13.000Z
2022-03-04T06:55:13.000Z
src/functions/fixtures_offload.py
Gilbertly/kickoffai-sls-dataml
5098e65c167cb59064c6273f15479cd5b0c53ad8
[ "MIT" ]
null
null
null
src/functions/fixtures_offload.py
Gilbertly/kickoffai-sls-dataml
5098e65c167cb59064c6273f15479cd5b0c53ad8
[ "MIT" ]
null
null
null
import boto3 from datetime import datetime, timedelta from os import environ from src.functions.csv_dump import send_sql rds_client = boto3.client("rds-data") ddb_resource = boto3.resource("dynamodb") shub_table = ddb_resource.Table(environ.get("TABLE_SHUB")) shub_index = environ.get("SHUB_INDEX") db_name = environ.ge...
34.88
92
0.693234
import boto3 from datetime import datetime, timedelta from os import environ from src.functions.csv_dump import send_sql rds_client = boto3.client("rds-data") ddb_resource = boto3.resource("dynamodb") shub_table = ddb_resource.Table(environ.get("TABLE_SHUB")) shub_index = environ.get("SHUB_INDEX") db_name = environ.ge...
true
true
f7567caa8a5fb7438cd782edea16b111741d59c3
555
py
Python
test_box.py
HuiminHe/BugBot
ac121a37ac0b4858e5ed3849062c9bfaa47cb0fa
[ "MIT" ]
9
2017-10-27T14:47:46.000Z
2021-09-18T13:58:54.000Z
test_box.py
gaoqitong/BugBot
ac121a37ac0b4858e5ed3849062c9bfaa47cb0fa
[ "MIT" ]
null
null
null
test_box.py
gaoqitong/BugBot
ac121a37ac0b4858e5ed3849062c9bfaa47cb0fa
[ "MIT" ]
4
2017-11-01T21:58:17.000Z
2021-05-02T01:26:55.000Z
from simulator import Simulator, Map, Agent from devices import Device import numpy as np import simulator_config env = Simulator(simulator_config) map = Map() map.get_map_from_geom2d(env, kp=np.array([[-100, 100], [-100, -100], [100, -100], [100, 100]])) robot = Agent(env, kp=np.array([[-2, 0], [2, 0]]), color=(1, 0...
34.6875
102
0.652252
from simulator import Simulator, Map, Agent from devices import Device import numpy as np import simulator_config env = Simulator(simulator_config) map = Map() map.get_map_from_geom2d(env, kp=np.array([[-100, 100], [-100, -100], [100, -100], [100, 100]])) robot = Agent(env, kp=np.array([[-2, 0], [2, 0]]), color=(1, 0...
true
true
f7567cbd4286bdb25fdfa3cf8a5fc37d27d21346
6,004
py
Python
src/tfchain/polyfill/crypto.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
null
null
null
src/tfchain/polyfill/crypto.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
201
2019-05-20T15:06:05.000Z
2019-07-16T12:48:59.000Z
src/tfchain/polyfill/crypto.py
GlenDC/threefold-wallet-electron
440662a793d98781eb3bbf415ba8a482abed0288
[ "MIT" ]
1
2019-12-20T21:45:39.000Z
2019-12-20T21:45:39.000Z
import tfchain.polyfill.encoding.json as jsjson import tfchain.polyfill.encoding.hex as jshex from tfchain.polyfill.jsmods.sjcl import api as sjcl from tfchain.polyfill.jsmods.blakejs import api as b2b from tfchain.polyfill.jsmods.tweetnacljs import api as nacl def random(n): digest = '' __pragma__("js", "{}", ""...
27.290909
125
0.662059
import tfchain.polyfill.encoding.json as jsjson import tfchain.polyfill.encoding.hex as jshex from tfchain.polyfill.jsmods.sjcl import api as sjcl from tfchain.polyfill.jsmods.blakejs import api as b2b from tfchain.polyfill.jsmods.tweetnacljs import api as nacl def random(n): digest = '' __pragma__("js", "{}", ""...
true
true
f7567cdfb04edb28b2d63eff7ab9196b6a9752d7
526
py
Python
task/manage.py
BakanovKirill/3megawattTask
da7ece79753475cf80fb7796264ff53ea2ad4b9f
[ "MIT" ]
null
null
null
task/manage.py
BakanovKirill/3megawattTask
da7ece79753475cf80fb7796264ff53ea2ad4b9f
[ "MIT" ]
null
null
null
task/manage.py
BakanovKirill/3megawattTask
da7ece79753475cf80fb7796264ff53ea2ad4b9f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings.dev') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you ...
32.875
73
0.68251
import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings.dev') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed an...
true
true
f7567eea8ade4e4fad5628a53df5e1610143ed9f
3,543
py
Python
bindings/python/ensmallen/datasets/string/candidatusaccumulibacterspsk02.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/candidatusaccumulibacterspsk02.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/candidatusaccumulibacterspsk02.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Candidatus Accumulibacter sp. SK-02. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: pro...
33.742857
223
0.680779
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def CandidatusAccumulibacterSpSk02( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "gr...
true
true
f7567f16998b0e4b960d0bb1eb5df48a1f678e37
10,458
py
Python
wooey/views/views.py
macdaliot/Wooey
3a0f40e3b3ab4d905f9acc72f5cd5d6453e14834
[ "BSD-3-Clause" ]
1
2019-03-01T04:00:29.000Z
2019-03-01T04:00:29.000Z
wooey/views/views.py
macdaliot/Wooey
3a0f40e3b3ab4d905f9acc72f5cd5d6453e14834
[ "BSD-3-Clause" ]
null
null
null
wooey/views/views.py
macdaliot/Wooey
3a0f40e3b3ab4d905f9acc72f5cd5d6453e14834
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals from collections import defaultdict from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.forms import FileField from django.http import JsonResponse fro...
38.590406
175
0.632434
from __future__ import absolute_import, unicode_literals from collections import defaultdict from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.forms import FileField from django.http import JsonResponse fro...
true
true
f75681c05a44876378873ffd2211cdb898d49da0
28,061
py
Python
conda_build/source.py
grlee77/conda-build
ea99e2dc2fa473039dbeb73d92b3f5d5c59548fe
[ "BSD-3-Clause" ]
null
null
null
conda_build/source.py
grlee77/conda-build
ea99e2dc2fa473039dbeb73d92b3f5d5c59548fe
[ "BSD-3-Clause" ]
null
null
null
conda_build/source.py
grlee77/conda-build
ea99e2dc2fa473039dbeb73d92b3f5d5c59548fe
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, print_function import io import locale import os from os.path import join, isdir, isfile, abspath, basename, exists, normpath, expanduser import re import shutil from subprocess import CalledProcessError import sys import time from .conda_interface import download, Te...
41.75744
111
0.592602
from __future__ import absolute_import, division, print_function import io import locale import os from os.path import join, isdir, isfile, abspath, basename, exists, normpath, expanduser import re import shutil from subprocess import CalledProcessError import sys import time from .conda_interface import download, Te...
true
true
f75682165a70d4582f713e254d0be864a4b2d7a0
104
py
Python
Lec3/Handouts/first/application.py
tim-ballard/CS50W
e8cd72ffb88171a2f7db6d21ed476845de7af719
[ "MIT" ]
null
null
null
Lec3/Handouts/first/application.py
tim-ballard/CS50W
e8cd72ffb88171a2f7db6d21ed476845de7af719
[ "MIT" ]
4
2020-06-06T01:26:20.000Z
2021-06-10T22:35:19.000Z
CS50_web_dev/src/src2/first/application.py
ChuaCheowHuan/web_app_DPTH
dd901e6359fe76f15b69701c53f76666c3219173
[ "MIT" ]
1
2020-05-09T15:21:34.000Z
2020-05-09T15:21:34.000Z
from flask import Flask app = Flask(__name__) @app.route("/") def index(): return "Hello, world!"
13
26
0.653846
from flask import Flask app = Flask(__name__) @app.route("/") def index(): return "Hello, world!"
true
true
f756824febb1da35d42d132d2f1776eb4148cb53
280
py
Python
demos/assignment_4/problem_2.py
joeparis/CS161-Demos-Winter-19
613a93de9169fa4ee62538ff0ac93a9930b75fef
[ "MIT" ]
null
null
null
demos/assignment_4/problem_2.py
joeparis/CS161-Demos-Winter-19
613a93de9169fa4ee62538ff0ac93a9930b75fef
[ "MIT" ]
null
null
null
demos/assignment_4/problem_2.py
joeparis/CS161-Demos-Winter-19
613a93de9169fa4ee62538ff0ac93a9930b75fef
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # coding=utf-8 """ Write a Python program that prints a table of n, n^2, and n^3 in right-aligned columns for 1 >= n <= 10.</p> """ def main(): for n in range(1, 11): print(f"{n:2} {n**2:3} {n**3:4}") if __name__ == "__main__": main()
16.470588
78
0.560714
def main(): for n in range(1, 11): print(f"{n:2} {n**2:3} {n**3:4}") if __name__ == "__main__": main()
true
true
f756846850d5a094855f88c1643453f4dfb4d33f
809
py
Python
Lib/corpuscrawler/crawl_gub.py
cash/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
95
2019-06-13T23:34:21.000Z
2022-03-12T05:22:49.000Z
Lib/corpuscrawler/crawl_gub.py
sahwar/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
31
2019-06-02T18:56:53.000Z
2021-08-10T20:16:02.000Z
Lib/corpuscrawler/crawl_gub.py
sahwar/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
35
2019-06-18T08:26:24.000Z
2022-01-11T13:59:40.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, ...
36.772727
74
0.770087
from __future__ import absolute_import, print_function, unicode_literals from corpuscrawler.util import crawl_bibleis def crawl(crawler): out = crawler.get_output(language='gub') crawl_bibleis(crawler, out, bible='GUBWBT')
true
true
f75684d0f07986c869ccf82924d4298a3e315ce9
2,241
py
Python
test_cases/general/map/of/map/py/test_generate/parse.py
Parquery/mapry
93515307f9eba8447fe64b0ac7cc68b2d07205a7
[ "MIT" ]
11
2019-06-26T05:56:41.000Z
2021-03-28T16:44:16.000Z
test_cases/general/map/of/map/py/test_generate/parse.py
Parquery/mapry
93515307f9eba8447fe64b0ac7cc68b2d07205a7
[ "MIT" ]
4
2019-10-18T14:43:59.000Z
2020-04-02T19:12:07.000Z
test_cases/general/map/of/map/py/test_generate/parse.py
Parquery/mapry
93515307f9eba8447fe64b0ac7cc68b2d07205a7
[ "MIT" ]
3
2019-06-17T07:39:03.000Z
2020-04-01T14:01:23.000Z
# File automatically generated by mapry. DO NOT EDIT OR APPEND! """provides general structures and functions for parsing.""" import typing import some.graph class Error: """represents an error occurred while parsing.""" def __init__(self, ref: str, message: str) -> None: """ initializes ...
27.666667
75
0.627845
import typing import some.graph class Error: def __init__(self, ref: str, message: str) -> None: self.ref = ref self.message = message class Errors: def __init__(self, cap: int) -> None: self.cap = cap self._values = [] def add(self, ref: str, message: str) -> No...
true
true
f7568515d7979fab7b013fa12cf1e59163605848
395
py
Python
neurotech/wsgi.py
stevillis/full-stack-software-engineer-neurotech
d5673b7e05c97891b407b31ba71770074aea43ae
[ "MIT" ]
null
null
null
neurotech/wsgi.py
stevillis/full-stack-software-engineer-neurotech
d5673b7e05c97891b407b31ba71770074aea43ae
[ "MIT" ]
null
null
null
neurotech/wsgi.py
stevillis/full-stack-software-engineer-neurotech
d5673b7e05c97891b407b31ba71770074aea43ae
[ "MIT" ]
null
null
null
""" WSGI config for neurotech project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SET...
23.235294
78
0.787342
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'neurotech.settings') application = get_wsgi_application()
true
true
f75687f36b6fe3c4ce5e8a128806ab752dff9c0c
3,917
py
Python
functions_legacy/GraphicalLasso.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2021-04-10T13:24:30.000Z
2022-03-26T08:20:42.000Z
functions_legacy/GraphicalLasso.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
null
null
null
functions_legacy/GraphicalLasso.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2019-08-13T22:02:17.000Z
2022-02-09T17:49:12.000Z
import matplotlib.pyplot as plt from numpy import array, ones, zeros, cov plt.style.use('seaborn') from fglasso import glasso def GraphicalLasso(pop, lam, initStruct=None, approximate=0, warmInit=0, verbose=0, penalDiag=1, tolThreshold=1e-4, maxIter=1e4, w=None, theta=None): # [w, theta, iter, avgTol, hasError] ...
46.630952
149
0.683431
import matplotlib.pyplot as plt from numpy import array, ones, zeros, cov plt.style.use('seaborn') from fglasso import glasso def GraphicalLasso(pop, lam, initStruct=None, approximate=0, warmInit=0, verbose=0, penalDiag=1, tolThreshold=1e-4, maxIter=1e4, w=None, theta=None): ...
true
true
f756883310c42484a5770d226e8e2b8b824a7239
5,483
py
Python
experimentor/models/action.py
aquilesC/experimentor
1a70760912ef40f0e2aaee44ed1a1e5594fd5b45
[ "MIT" ]
4
2020-05-15T04:07:25.000Z
2020-09-30T22:20:46.000Z
experimentor/models/action.py
aquilesC/experimentor
1a70760912ef40f0e2aaee44ed1a1e5594fd5b45
[ "MIT" ]
null
null
null
experimentor/models/action.py
aquilesC/experimentor
1a70760912ef40f0e2aaee44ed1a1e5594fd5b45
[ "MIT" ]
null
null
null
""" Action ====== An action is an event that gets triggered on a device. For example, a camera can have an action ``acquire`` or ``read``. They should normally be associated with the pressing of a button. Action is a handy decorator to register methods on a model and have quick access to them when ...
42.176923
120
0.672442
from concurrent.futures.thread import ThreadPoolExecutor import threading class Action: def __init__(self, method=None, **kwargs): self.method = method self.kwargs = kwargs def __get__(self, instance, owner): self.instance = instance return self def __set_name__(self, ow...
true
true
f75689e247681d6beaf4f021c1cbf4a69de1f7b8
183
py
Python
src/lamuda/messager/telegram.py
hanadumal/lamud
092e036c4c1a0420b6f5c16148252288f42f3271
[ "MIT" ]
null
null
null
src/lamuda/messager/telegram.py
hanadumal/lamud
092e036c4c1a0420b6f5c16148252288f42f3271
[ "MIT" ]
null
null
null
src/lamuda/messager/telegram.py
hanadumal/lamud
092e036c4c1a0420b6f5c16148252288f42f3271
[ "MIT" ]
null
null
null
import telegram def send(buffer, sid, token): """ :param buffer: :return: """ bot = telegram.Bot(token=token) bot.send_message(chat_id=str(sid), text=buffer)
18.3
51
0.622951
import telegram def send(buffer, sid, token): bot = telegram.Bot(token=token) bot.send_message(chat_id=str(sid), text=buffer)
true
true
f7568a116218a7b511f44d7f4de6baed53693d71
4,075
py
Python
src/problem2.py
walterae/08-Exam1-201930
97e7a3c5e0295f581d9620f892c8e9976654d87c
[ "MIT" ]
null
null
null
src/problem2.py
walterae/08-Exam1-201930
97e7a3c5e0295f581d9620f892c8e9976654d87c
[ "MIT" ]
null
null
null
src/problem2.py
walterae/08-Exam1-201930
97e7a3c5e0295f581d9620f892c8e9976654d87c
[ "MIT" ]
null
null
null
""" Exam 1, problem 2. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Audrey Walters. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. def main(): """ Calls the TEST functions in this module. """ test_fac...
36.383929
79
0.485153
def main(): test_factor_sum() def test_factor_sum(): print() print('---------------------------------------------------------') print('Testing the factor_sum function:') print('---------------------------...
true
true
f7568b835befaf300706ebeb114ac45a723104c3
851
py
Python
setup.py
AYSung/comppyss
093342790cc091763c92aa140f43841d8d50bb96
[ "MIT" ]
null
null
null
setup.py
AYSung/comppyss
093342790cc091763c92aa140f43841d8d50bb96
[ "MIT" ]
null
null
null
setup.py
AYSung/comppyss
093342790cc091763c92aa140f43841d8d50bb96
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="comppyss", version="0.0.2", author="Andrew Sung", author_email="aysung300@gmail.com", description="Python implementation of the CompPASS algorithm for scoring AE-MS exper...
31.518519
96
0.663925
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="comppyss", version="0.0.2", author="Andrew Sung", author_email="aysung300@gmail.com", description="Python implementation of the CompPASS algorithm for scoring AE-MS exper...
true
true
f7568be3d5eeaff16205ff55ac1c4e6b6ef907bb
1,678
py
Python
ch04/gradient_2d.py
OnsenTamagoYoshi/DeepLearningFromScratch
006f80b63130829b142c04a88632287bcf5a61b0
[ "MIT" ]
null
null
null
ch04/gradient_2d.py
OnsenTamagoYoshi/DeepLearningFromScratch
006f80b63130829b142c04a88632287bcf5a61b0
[ "MIT" ]
null
null
null
ch04/gradient_2d.py
OnsenTamagoYoshi/DeepLearningFromScratch
006f80b63130829b142c04a88632287bcf5a61b0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # cf.http://d.hatena.ne.jp/white_wheels/20100327/p3 import numpy as np import matplotlib.pylab as plt from mpl_toolkits.mplot3d import Axes3D def _numerical_gradient_no_batch(f, x): h = 1e-4 #0.0001 grad = np.zeros_like(x) #xと同じ形状の配列を作成 for idx in range(x.size): tmp_val...
24.318841
111
0.52503
import numpy as np import matplotlib.pylab as plt from mpl_toolkits.mplot3d import Axes3D def _numerical_gradient_no_batch(f, x): h = 1e-4 grad = np.zeros_like(x) for idx in range(x.size): tmp_val = x[idx] x[idx] = tmp_val + h fxh1 = f(x) x[idx]...
true
true
f7568c1e207d95524bea82c452c6e6a9fc23ebb2
5,213
py
Python
flask_mailman/backends/smtp.py
jugmac00/flask-mailman
248b7d0376d2a2b4bafbf876869e853039963755
[ "BSD-3-Clause" ]
null
null
null
flask_mailman/backends/smtp.py
jugmac00/flask-mailman
248b7d0376d2a2b4bafbf876869e853039963755
[ "BSD-3-Clause" ]
null
null
null
flask_mailman/backends/smtp.py
jugmac00/flask-mailman
248b7d0376d2a2b4bafbf876869e853039963755
[ "BSD-3-Clause" ]
null
null
null
"""SMTP email backend class.""" import smtplib import ssl import threading from flask_mailman.backends.base import BaseEmailBackend from flask_mailman.message import sanitize_address from flask_mailman.utils import DNS_NAME class EmailBackend(BaseEmailBackend): """ A wrapper that manages the SMTP network con...
39.793893
95
0.615576
import smtplib import ssl import threading from flask_mailman.backends.base import BaseEmailBackend from flask_mailman.message import sanitize_address from flask_mailman.utils import DNS_NAME class EmailBackend(BaseEmailBackend): def __init__(self, host=None, port=None, username=None, password=None, ...
true
true
f7568e6a8dd80ec648cf3c333229272cc776edd1
4,980
py
Python
test/model/concourse_test.py
jia-jerry/cc-utils
01322d2acb7343c92138dcf0b6ac913b276525bc
[ "Apache-2.0" ]
null
null
null
test/model/concourse_test.py
jia-jerry/cc-utils
01322d2acb7343c92138dcf0b6ac913b276525bc
[ "Apache-2.0" ]
null
null
null
test/model/concourse_test.py
jia-jerry/cc-utils
01322d2acb7343c92138dcf0b6ac913b276525bc
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed # under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
43.304348
99
0.67008
import pytest import model.concourse as examinee from model.base import ModelValidationError class ConcourseTeamTest(object): @pytest.fixture def concourse_team_dict(self): return { 'username': 'foo', 'password': 'baz', 'git_auth_team': 'foo:bar', 'git...
true
true
f7568e9d7859c08aa3915144e85b52995789cbcf
14,096
py
Python
virtual_env/lib/python3.5/site-packages/urllib3/util/url.py
straydag/To_Due_Backend
ac91f5ebabe8e4f2b6db7faa5ccbd30ebdb4e3f6
[ "MIT" ]
160
2019-09-27T18:02:03.000Z
2022-03-15T23:46:40.000Z
virtual_env/lib/python3.5/site-packages/urllib3/util/url.py
straydag/To_Due_Backend
ac91f5ebabe8e4f2b6db7faa5ccbd30ebdb4e3f6
[ "MIT" ]
127
2020-08-07T21:56:58.000Z
2022-03-30T18:24:53.000Z
virtual_env/lib/python3.5/site-packages/urllib3/util/url.py
straydag/To_Due_Backend
ac91f5ebabe8e4f2b6db7faa5ccbd30ebdb4e3f6
[ "MIT" ]
31
2019-10-19T18:10:23.000Z
2022-02-28T14:13:19.000Z
from __future__ import absolute_import import re from collections import namedtuple from ..exceptions import LocationParseError from ..packages import six url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"] # We only want to normalize urls with an HTTP(S) scheme. # urllib3 infers URLs withou...
32.256293
88
0.562003
from __future__ import absolute_import import re from collections import namedtuple from ..exceptions import LocationParseError from ..packages import six url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"] NORMALIZABLE_SCHEMES = ("http", "https", None) PERCENT_RE = re.compile(r"%[a-fA-F0-9...
true
true
f7568eb3a5601bf9e9f5e5a856b632fdec98ee25
4,073
py
Python
Medical_Sieve_Pipeline/Medical_Sieve_Model_Pipeline/estimator.py
JianhengHou/Medical-Sieve
cafb69054ef98cf2f42229ff73c93b6796f9fa91
[ "MIT" ]
null
null
null
Medical_Sieve_Pipeline/Medical_Sieve_Model_Pipeline/estimator.py
JianhengHou/Medical-Sieve
cafb69054ef98cf2f42229ff73c93b6796f9fa91
[ "MIT" ]
null
null
null
Medical_Sieve_Pipeline/Medical_Sieve_Model_Pipeline/estimator.py
JianhengHou/Medical-Sieve
cafb69054ef98cf2f42229ff73c93b6796f9fa91
[ "MIT" ]
null
null
null
from sklearn.preprocessing import MultiLabelBinarizer from sklearn.metrics import hamming_loss from sklearn.metrics import accuracy_score from sklearn.metrics import multilabel_confusion_matrix from sklearn.metrics import roc_auc_score import numpy as np import copy def combinations(nums): ans = [[]] for row i...
42.873684
129
0.662657
from sklearn.preprocessing import MultiLabelBinarizer from sklearn.metrics import hamming_loss from sklearn.metrics import accuracy_score from sklearn.metrics import multilabel_confusion_matrix from sklearn.metrics import roc_auc_score import numpy as np import copy def combinations(nums): ans = [[]] for row i...
true
true
f7568ef97f4f17d81ef5ed0fe0752015a3d1cc26
731
py
Python
Python/21. MergeTwoSortedLists.py
ranisnehal/LeetCode-Solutions
1dda6774cd971f0277c57b600193485856ac6e6b
[ "MIT" ]
263
2020-10-05T18:47:29.000Z
2022-03-31T19:44:46.000Z
Python/21. MergeTwoSortedLists.py
ranisnehal/LeetCode-Solutions
1dda6774cd971f0277c57b600193485856ac6e6b
[ "MIT" ]
1,264
2020-10-05T18:13:05.000Z
2022-03-31T23:16:35.000Z
Python/21. MergeTwoSortedLists.py
ranisnehal/LeetCode-Solutions
1dda6774cd971f0277c57b600193485856ac6e6b
[ "MIT" ]
760
2020-10-05T18:22:51.000Z
2022-03-29T06:06:20.000Z
# Merge two sorted linked lists and return it as a new sorted list. # The new list should be made by splicing together the nodes of the first two lists. # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution...
33.227273
84
0.574555
class Solution: def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode: sorted_list = result = ListNode(None) while l1 and l2: if l1.val < l2.val: result.next = l1 l1 = l1.next else: result.next = l2 l...
true
true
f7568f2b203759c16b5f9bbb316219c761236ebf
12,801
py
Python
dmclient/tars/__rpc.py
simplecelery/stellar_stream
1e308394b101104538ae889232498e77e16cb17a
[ "MIT" ]
9
2021-08-19T17:19:58.000Z
2021-11-11T01:14:13.000Z
dmclient/tars/__rpc.py
simplecelery/stellar_stream
1e308394b101104538ae889232498e77e16cb17a
[ "MIT" ]
3
2021-09-23T03:20:59.000Z
2022-03-10T06:31:24.000Z
dmclient/tars/__rpc.py
simplecelery/stellar_stream
1e308394b101104538ae889232498e77e16cb17a
[ "MIT" ]
9
2021-09-24T03:26:21.000Z
2022-03-23T01:32:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __rpc.py # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file ex...
28.961538
98
0.568627
import time import argparse from .__logger import tarsLogger from .__logger import initLog from .__trans import EndPointInfo from .__TimeoutQueue import TimeoutQueue from .__TimeoutQueue import QueueTimeout from .__trans import FDReactor from .__adapterproxy import AdapterProxyManager from .__servantproxy import S...
true
true
f7568fd719f68e63eb96e721ce1b86ea1ae110d8
14,211
py
Python
mark_tool.py
qq769747518/img_mark_tool
f195912bdbc396e51871d8ec7aed8e30c198f7de
[ "MIT" ]
1
2019-12-12T02:36:39.000Z
2019-12-12T02:36:39.000Z
mark_tool.py
qq769747518/img_mark_tool
f195912bdbc396e51871d8ec7aed8e30c198f7de
[ "MIT" ]
null
null
null
mark_tool.py
qq769747518/img_mark_tool
f195912bdbc396e51871d8ec7aed8e30c198f7de
[ "MIT" ]
null
null
null
import cv2 import shutil import tkinter as tk from PIL import Image, ImageTk from tkinter.filedialog import askdirectory import re import os import json from collections import OrderedDict from tkinter.messagebox import * class Tk_window(): def __init__(self): self.window = tk.Tk() # 第2步,给窗口的可视化...
41.311047
180
0.604954
import cv2 import shutil import tkinter as tk from PIL import Image, ImageTk from tkinter.filedialog import askdirectory import re import os import json from collections import OrderedDict from tkinter.messagebox import * class Tk_window(): def __init__(self): self.window = tk.Tk() self....
true
true
f75691bbd70c86e1340ae528d8a4ed3093d3fa14
3,839
py
Python
text-classification-module/multi-class-classifier/tf-idf+svm/train.py
SmartDataAnalytics/horus-ner
866afa3a3165011af126649f4fa80ecc39c4b457
[ "Apache-2.0" ]
43
2018-04-09T09:08:18.000Z
2019-12-13T12:26:37.000Z
text-classification-module/multi-class-classifier/tf-idf+svm/train.py
SmartDataAnalytics/HORUS-NER
866afa3a3165011af126649f4fa80ecc39c4b457
[ "Apache-2.0" ]
14
2020-04-29T19:09:03.000Z
2020-05-11T11:59:04.000Z
text-classification-module/multi-class-classifier/tf-idf+svm/train.py
SmartDataAnalytics/horus-ner
866afa3a3165011af126649f4fa80ecc39c4b457
[ "Apache-2.0" ]
3
2018-04-15T12:44:49.000Z
2018-12-19T23:41:35.000Z
import pandas as pd import numpy as np import random import string import sys from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from sklearn.model_selection import train_test_split, cross_val_predict from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer, TfidfTrans...
32.533898
122
0.696275
import pandas as pd import numpy as np import random import string import sys from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from sklearn.model_selection import train_test_split, cross_val_predict from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer, TfidfTrans...
false
true
f75691dd7e24881b0cec2b596e54cdc67ce47249
310
py
Python
mirror/main.py
FrancescoSaverioZuppichini/mirror
db38362a8ce300bab04d86f2659d6d9bf516c850
[ "MIT" ]
234
2018-12-02T12:53:53.000Z
2022-02-04T22:11:18.000Z
mirror/main.py
garain/mirror
a099f8eb87ec6517463123e514acaf63741136ea
[ "MIT" ]
12
2019-01-06T17:38:34.000Z
2022-02-27T21:35:23.000Z
mirror/main.py
garain/mirror
a099f8eb87ec6517463123e514acaf63741136ea
[ "MIT" ]
23
2018-12-17T13:44:15.000Z
2021-07-06T17:58:54.000Z
import webbrowser from .App import App def mirror(input, model, visualisations=[], port=5000, debug=False): app = App(input, model, visualisations) if not debug: webbrowser.open_new(f'http://localhost:{port}') # opens in default browser app.run(host="0.0.0.0", port=port, use_reloader=debug)
28.181818
93
0.706452
import webbrowser from .App import App def mirror(input, model, visualisations=[], port=5000, debug=False): app = App(input, model, visualisations) if not debug: webbrowser.open_new(f'http://localhost:{port}') app.run(host="0.0.0.0", port=port, use_reloader=debug)
true
true
f75693119542904f019fb8585806ef811b69b403
4,233
py
Python
pyqtgraph/examples/contextMenu.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
1
2022-01-30T20:04:51.000Z
2022-01-30T20:04:51.000Z
pyqtgraph/examples/contextMenu.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
null
null
null
pyqtgraph/examples/contextMenu.py
StSav012/pyqtgraph
65e17c4e3707eb3bd4d91cdc13504d9b150f4360
[ "MIT" ]
null
null
null
""" Demonstrates adding a custom context menu to a GraphicsItem and extending the context menu of a ViewBox. PyQtGraph implements a system that allows each item in a scene to implement its own context menu, and for the menus of its parent items to be automatically displayed as well. """ import pyqtgraph as pg fr...
30.673913
80
0.639735
import pyqtgraph as pg from pyqtgraph.Qt import QtCore, QtGui, QtWidgets win = pg.GraphicsLayoutWidget(show=True) win.setWindowTitle('pyqtgraph example: context menu') view = win.addViewBox() zoom1 = view.menu.addAction('Zoom to box 1') zoom2 = view.menu.addAction('Zoom to box 2') def zoomTo1(): view.aut...
true
true
f75693a6d7d474a87f5e0e475b97e1b6fa087a52
550
py
Python
chatroom/connection/migrations/0003_auto_20180115_0808.py
shunobaka/2ID60-Web-Technology-PiedPiper
bee04cb880479dac599e5749159ede2196e175aa
[ "MIT" ]
null
null
null
chatroom/connection/migrations/0003_auto_20180115_0808.py
shunobaka/2ID60-Web-Technology-PiedPiper
bee04cb880479dac599e5749159ede2196e175aa
[ "MIT" ]
14
2020-02-12T00:13:15.000Z
2022-03-11T23:18:02.000Z
chatroom/connection/migrations/0003_auto_20180115_0808.py
shunobaka/2ID60-Web-Technology-PiedPiper
bee04cb880479dac599e5749159ede2196e175aa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-01-15 07:08 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('connection', '0002_auto_20180113_1458'), ] operati...
25
111
0.658182
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('connection', '0002_auto_20180113_1458'), ] operations = [ migrations.AlterField( model_name='connection...
true
true
f756950f77a6685bd0fe0a85fcc65e41a789c524
50
py
Python
nabla/__main__.py
salbrandi/nabla
1e9d95224d2cefde92d74053418ee00ea01d2fc4
[ "MIT" ]
null
null
null
nabla/__main__.py
salbrandi/nabla
1e9d95224d2cefde92d74053418ee00ea01d2fc4
[ "MIT" ]
null
null
null
nabla/__main__.py
salbrandi/nabla
1e9d95224d2cefde92d74053418ee00ea01d2fc4
[ "MIT" ]
null
null
null
import app as server server.startserver('nabla')
12.5
27
0.78
import app as server server.startserver('nabla')
true
true
f75695bcf1dfc41cd3dc5f7ecee4fc4b39305980
686
py
Python
app/core/migrations/0003_ingredient.py
lastlift/recipe-app-api
07385c9ad0a2538a24d253c9f4dd90ffd155c153
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
lastlift/recipe-app-api
07385c9ad0a2538a24d253c9f4dd90ffd155c153
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
lastlift/recipe-app-api
07385c9ad0a2538a24d253c9f4dd90ffd155c153
[ "MIT" ]
null
null
null
# Generated by Django 2.2.27 on 2022-02-08 05:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0002_tag'), ] operations = [ migrations.CreateModel( ...
28.583333
118
0.618076
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0002_tag'), ] operations = [ migrations.CreateModel( name='Ingredient', fields=[ ...
true
true
f756964fbc2dc985b3d971e51fa0a00a51dd404a
125,681
py
Python
salt/minion.py
sbellem/salt
0f1dc2c66b6d41ee8ca17d2cdefb1673bbeaaf51
[ "Apache-2.0" ]
null
null
null
salt/minion.py
sbellem/salt
0f1dc2c66b6d41ee8ca17d2cdefb1673bbeaaf51
[ "Apache-2.0" ]
null
null
null
salt/minion.py
sbellem/salt
0f1dc2c66b6d41ee8ca17d2cdefb1673bbeaaf51
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import absolute_import, print_function, with_statement import os import re import sys import copy import time import types import signal import fnmatch import logging import threading import traceback import contextlib impo...
41.492572
165
0.545643
''' Routines to set up a minion ''' from __future__ import absolute_import, print_function, with_statement import os import re import sys import copy import time import types import signal import fnmatch import logging import threading import traceback import contextlib import multiprocessing from random import randint...
false
true
f756966c35e9bd0d87a2ba4f2d3967e695e0b05a
6,344
py
Python
metadata-ingestion/src/datahub/emitter/rest_emitter.py
chinmay-bhat/datahub
ab270a98ee541b993413a0ad68fd2c6ca14441eb
[ "Apache-2.0" ]
1
2022-01-19T02:01:31.000Z
2022-01-19T02:01:31.000Z
metadata-ingestion/src/datahub/emitter/rest_emitter.py
zhangheng08/datahub
9b81fa428cfa10260b047c6656180f1d90a33978
[ "Apache-2.0" ]
1
2021-10-01T13:13:15.000Z
2021-10-12T11:51:33.000Z
metadata-ingestion/src/datahub/emitter/rest_emitter.py
zhangheng08/datahub
9b81fa428cfa10260b047c6656180f1d90a33978
[ "Apache-2.0" ]
5
2021-07-26T08:37:42.000Z
2021-11-16T05:41:02.000Z
import itertools import json import logging import shlex from json.decoder import JSONDecodeError from typing import List, Optional, Union import requests from requests.exceptions import HTTPError, RequestException from datahub import __package_name__ from datahub.configuration.common import OperationalError from dat...
33.744681
188
0.612232
import itertools import json import logging import shlex from json.decoder import JSONDecodeError from typing import List, Optional, Union import requests from requests.exceptions import HTTPError, RequestException from datahub import __package_name__ from datahub.configuration.common import OperationalError from dat...
true
true
f75697a790886baaa9a6d37b6e81f92b4a184f85
2,882
py
Python
insights/client/constants.py
dougsland/insights-core
4bde73b75d1b26c3ba98e9ca4c46f8cc1fa969ff
[ "Apache-2.0" ]
null
null
null
insights/client/constants.py
dougsland/insights-core
4bde73b75d1b26c3ba98e9ca4c46f8cc1fa969ff
[ "Apache-2.0" ]
null
null
null
insights/client/constants.py
dougsland/insights-core
4bde73b75d1b26c3ba98e9ca4c46f8cc1fa969ff
[ "Apache-2.0" ]
null
null
null
import os from insights import package_info class InsightsConstants(object): app_name = 'insights-client' auth_method = 'BASIC' package_path = os.path.dirname( os.path.dirname(os.path.abspath(__file__))) sleep_time = 300 default_conf_dir = '/etc/insights-client' default_conf_file = '/...
58.816327
120
0.733865
import os from insights import package_info class InsightsConstants(object): app_name = 'insights-client' auth_method = 'BASIC' package_path = os.path.dirname( os.path.dirname(os.path.abspath(__file__))) sleep_time = 300 default_conf_dir = '/etc/insights-client' default_conf_file = '/...
true
true
f75697d625c635fc1ad5212e62f5a9d4297cb71c
1,392
py
Python
datepick.py
manzino0705/flask
68e505ef41f26246693c033a115e08b92be0bca7
[ "MIT" ]
null
null
null
datepick.py
manzino0705/flask
68e505ef41f26246693c033a115e08b92be0bca7
[ "MIT" ]
null
null
null
datepick.py
manzino0705/flask
68e505ef41f26246693c033a115e08b92be0bca7
[ "MIT" ]
1
2021-07-26T23:58:08.000Z
2021-07-26T23:58:08.000Z
import pymysql import datetime from flask import Flask, render_template, request from cal import calday def datepick(db_password, zone, infra, id): conn = pymysql.connect( host='127.0.0.1', port=3306, user='root', password=db_password, db=zone) curs = conn.cursor() m_...
20.776119
67
0.555316
import pymysql import datetime from flask import Flask, render_template, request from cal import calday def datepick(db_password, zone, infra, id): conn = pymysql.connect( host='127.0.0.1', port=3306, user='root', password=db_password, db=zone) curs = conn.cursor() m_...
true
true
f75698b019ea0d15403e393b304862d490bb7795
50,416
py
Python
nova/tests/unit/virt/libvirt/test_migration.py
daespinel/nova
67c2eaf83bcd613c8b56e470899c4562b900b867
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/virt/libvirt/test_migration.py
daespinel/nova
67c2eaf83bcd613c8b56e470899c4562b900b867
[ "Apache-2.0" ]
2
2021-03-31T19:41:37.000Z
2021-12-13T20:33:53.000Z
nova/tests/unit/virt/libvirt/test_migration.py
daespinel/nova
67c2eaf83bcd613c8b56e470899c4562b900b867
[ "Apache-2.0" ]
1
2020-07-22T20:27:41.000Z
2020-07-22T20:27:41.000Z
# Copyright (c) 2016 Red Hat, 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 a...
38.544343
79
0.606038
from collections import deque from lxml import etree import mock from oslo_utils.fixture import uuidsentinel as uuids from oslo_utils import units import six from nova.compute import power_state from nova import exception from nova.network import model as network_model from nova import objects from nova import test ...
true
true
f756995c94b2be6ba19c16e92a74f757a5d99386
8,021
py
Python
catalyst/rl/scripts/run_samplers.py
mike0sv/catalyst
54597a3b3d78e5b6c3084dfc3c28185600c79c90
[ "Apache-2.0" ]
1
2020-04-18T03:09:20.000Z
2020-04-18T03:09:20.000Z
catalyst/rl/scripts/run_samplers.py
mike0sv/catalyst
54597a3b3d78e5b6c3084dfc3c28185600c79c90
[ "Apache-2.0" ]
null
null
null
catalyst/rl/scripts/run_samplers.py
mike0sv/catalyst
54597a3b3d78e5b6c3084dfc3c28185600c79c90
[ "Apache-2.0" ]
1
2021-12-20T07:32:25.000Z
2021-12-20T07:32:25.000Z
#!/usr/bin/env python # isort:skip_file import os os.environ["OMP_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" import argparse # noqa E402 import atexit # noqa E402 import copy # noqa E402 import multiprocessing as mp # noqa E402 import time # noqa E402 import torch # noqa E402 torch.set_num_threads...
27.006734
79
0.619374
import os os.environ["OMP_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" import argparse import atexit import copy import multiprocessing as mp import time import torch torch.set_num_threads(1) from catalyst.rl.core import ( ExplorationHandler, Sampler, ValidSampler ) from catalyst.rl.registry i...
true
true
f75699b83b5bb1646479e9d397409b86b49c5130
2,253
py
Python
general_algorithms/unique_paths_grid/src/solution.py
playandlearntocode/main
2f2374b92b9af3fc11e2aedf13bf8c2240ece906
[ "MIT" ]
2
2022-01-25T10:34:08.000Z
2022-03-16T17:17:09.000Z
general_algorithms/unique_paths_grid/src/solution.py
playandlearntocode/main
2f2374b92b9af3fc11e2aedf13bf8c2240ece906
[ "MIT" ]
null
null
null
general_algorithms/unique_paths_grid/src/solution.py
playandlearntocode/main
2f2374b92b9af3fc11e2aedf13bf8c2240ece906
[ "MIT" ]
3
2022-01-24T23:56:22.000Z
2022-02-24T20:46:11.000Z
''' # Unique paths in a grid A small example of using dynamic programming techniques for finding out the total number of unique paths between two points in a 2D grid. Author: Goran Trlin Find more tutorials and code samples on: https://playandlearntocode.com ''' class Solution: # camelCase is used at the LeetC...
26.505882
137
0.447847
class Solution: def unique_paths(self, m: int, n: int) -> int: if m == 0 or n == 0: return 0 if m == 1 and n == 1: return 1 if m == 2 and n == 1: return 1 if m == 1 and n == 2: return 1 if m == 2 and n == 2: ...
true
true
f7569bfb29145ae6d4ea355c92b3223507df2d9f
265
py
Python
Tests/Tests.py
SkyLined/mDebugOutput
0ba3ae5e6118283449119a4942186cb55e47dfe6
[ "CC-BY-4.0" ]
2
2019-07-23T06:47:07.000Z
2021-01-30T07:29:28.000Z
Tests/Tests.py
SkyLined/zyp
d5d68257d1bacff4781ad7af318d6922f0dbbd46
[ "CC-BY-4.0" ]
null
null
null
Tests/Tests.py
SkyLined/zyp
d5d68257d1bacff4781ad7af318d6922f0dbbd46
[ "CC-BY-4.0" ]
null
null
null
import os, sys; sModulePath = os.path.dirname(__file__); sys.path = [sModulePath] + [sPath for sPath in sys.path if sPath.lower() != sModulePath.lower()]; from fTestDependencies import fTestDependencies; fTestDependencies(); # I should add some tests here. pass;
26.5
97
0.750943
import os, sys; sModulePath = os.path.dirname(__file__); sys.path = [sModulePath] + [sPath for sPath in sys.path if sPath.lower() != sModulePath.lower()]; from fTestDependencies import fTestDependencies; fTestDependencies(); pass;
true
true
f7569c652a43bb73124fa48de12f0aafa079c174
22,692
py
Python
operator/helm/split_resources.py
msteffen/seldon-core
8aaa104de8c6e2a8138632022265271ec070ad1f
[ "Apache-2.0" ]
4
2019-08-29T19:36:55.000Z
2021-12-20T00:37:08.000Z
operator/helm/split_resources.py
msteffen/seldon-core
8aaa104de8c6e2a8138632022265271ec070ad1f
[ "Apache-2.0" ]
153
2020-02-03T10:48:40.000Z
2021-08-02T10:31:51.000Z
operator/helm/split_resources.py
ellisvalentiner/seldon-core
2cd0d88add06db7699ccfb41b4d850183402206d
[ "Apache-2.0" ]
3
2019-10-27T17:56:52.000Z
2021-02-21T17:06:03.000Z
import argparse import glob import re import yaml parser = argparse.ArgumentParser() parser.add_argument("--prefix", default="xx", help="find files matching prefix") parser.add_argument("--folder", required=True, help="Output folder") args, _ = parser.parse_known_args() HELM_SPARTAKUS_IF_START = "{{- if .Values.usag...
43.976744
183
0.515292
import argparse import glob import re import yaml parser = argparse.ArgumentParser() parser.add_argument("--prefix", default="xx", help="find files matching prefix") parser.add_argument("--folder", required=True, help="Output folder") args, _ = parser.parse_known_args() HELM_SPARTAKUS_IF_START = "{{- if .Values.usag...
true
true
f7569e711786f22914d638d5034c5cfd84c7753c
13,192
py
Python
src/aihwkit/nn/modules/linear_mapped.py
todd-deshane/aihwkit
07269e29731f9a6482d25326400437f6bef2fc94
[ "Apache-2.0" ]
133
2020-09-17T20:36:08.000Z
2022-03-21T12:15:40.000Z
src/aihwkit/nn/modules/linear_mapped.py
todd-deshane/aihwkit
07269e29731f9a6482d25326400437f6bef2fc94
[ "Apache-2.0" ]
140
2020-09-21T12:16:55.000Z
2022-03-31T18:07:37.000Z
src/aihwkit/nn/modules/linear_mapped.py
todd-deshane/aihwkit
07269e29731f9a6482d25326400437f6bef2fc94
[ "Apache-2.0" ]
53
2020-09-17T15:53:31.000Z
2022-03-30T12:22:04.000Z
# -*- coding: utf-8 -*- # (C) Copyright 2020, 2021 IBM. All Rights Reserved. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificatio...
38.460641
99
0.614312
from typing import Optional, Tuple, List from torch import Tensor, cat, split, no_grad from torch.nn import Linear from aihwkit.nn.functions import AnalogFunction from aihwkit.nn.modules.base import AnalogModuleBase, RPUConfigAlias from aihwkit.simulator.configs import SingleRPUConfig from aihwkit.exceptions impor...
true
true
f7569e79289da685599f14871fa12c796b24fc5e
1,697
py
Python
ascii_error.py
rmorgan10/error_cat
5d0c17f9636255f34926570e5ce4a4e49a47ddf9
[ "MIT" ]
3
2019-10-31T14:21:41.000Z
2020-04-23T13:45:00.000Z
ascii_error.py
rmorgan10/error_cat
5d0c17f9636255f34926570e5ce4a4e49a47ddf9
[ "MIT" ]
null
null
null
ascii_error.py
rmorgan10/error_cat
5d0c17f9636255f34926570e5ce4a4e49a47ddf9
[ "MIT" ]
1
2019-12-12T21:55:30.000Z
2019-12-12T21:55:30.000Z
# A module to make your error messages less scary import sys from characters import AsciiCharacter def output_ascii(err_message="You certainly messed something up."): one_line = False err_line_1 = err_message.split('--')[0] try: err_line_2 = err_message.split('--')[1] except: on...
27.819672
90
0.46317
import sys from characters import AsciiCharacter def output_ascii(err_message="You certainly messed something up."): one_line = False err_line_1 = err_message.split('--')[0] try: err_line_2 = err_message.split('--')[1] except: one_line = True err_line_2 = err_line_1 ...
true
true
f756a02c797075c5ba0d009801f110a6eb7a8519
8,493
py
Python
qa/rpc-tests/cfund-paymentrequest-state-accept-expired-proposal.py
Ankh-Trust/electrum-core
360efcd3d6907e342608e3d2dc7628d6be639619
[ "MIT" ]
2
2019-10-31T12:02:24.000Z
2019-11-09T11:08:03.000Z
qa/rpc-tests/cfund-paymentrequest-state-accept-expired-proposal.py
Ankh-Trust/electrum-core
360efcd3d6907e342608e3d2dc7628d6be639619
[ "MIT" ]
null
null
null
qa/rpc-tests/cfund-paymentrequest-state-accept-expired-proposal.py
Ankh-Trust/electrum-core
360efcd3d6907e342608e3d2dc7628d6be639619
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The NavCoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import ElectrumTestFramework from test_framework.cfund_util import * impor...
41.837438
151
0.666313
from test_framework.test_framework import ElectrumTestFramework from test_framework.cfund_util import * import time class CommunityFundPaymentRequestsTest(ElectrumTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 1 def setup_networ...
true
true
f756a05db43f76e88044fe66b97083fdedac41a3
43,510
py
Python
cwltool/workflow.py
hmenager/cwltool
526f36f93655bfb098f766ff020708b5a707513a
[ "Apache-2.0" ]
null
null
null
cwltool/workflow.py
hmenager/cwltool
526f36f93655bfb098f766ff020708b5a707513a
[ "Apache-2.0" ]
null
null
null
cwltool/workflow.py
hmenager/cwltool
526f36f93655bfb098f766ff020708b5a707513a
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import copy import datetime import functools import logging import random import tempfile from collections import namedtuple from typing import (Any, Callable, Dict, Generator, Iterable, List, Mapping, MutableMapping, MutableSequence, Optio...
43.336653
115
0.556883
from __future__ import absolute_import import copy import datetime import functools import logging import random import tempfile from collections import namedtuple from typing import (Any, Callable, Dict, Generator, Iterable, List, Mapping, MutableMapping, MutableSequence, Optio...
true
true
f756a0e3fa44ca13101f8b58b79a5585e3abf3f4
12,751
py
Python
samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/rest.py
BrMtssk/openapi-generator
13f1c610d9ba8f3a4bbbe8ae0e7cb4d0a9b786c9
[ "Apache-2.0" ]
null
null
null
samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/rest.py
BrMtssk/openapi-generator
13f1c610d9ba8f3a4bbbe8ae0e7cb4d0a9b786c9
[ "Apache-2.0" ]
null
null
null
samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/rest.py
BrMtssk/openapi-generator
13f1c610d9ba8f3a4bbbe8ae0e7cb4d0a9b786c9
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenAPI Extension x-auth-id-alias This specification shows how to use x-auth-id-alias extension for API keys. # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import io import json import logging import re import ssl from ...
42.082508
146
0.545291
import io import json import logging import re import ssl from urllib.parse import urlencode import certifi import urllib3 from x_auth_id_alias.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError logger = logging.getLogger(__name__) clas...
true
true
f756a2b78dfa6db189d57ff1424659d5f2f5cd34
321
py
Python
DesignPatterns/05_iterator/1_no_iterator/employee_collection.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
DesignPatterns/05_iterator/1_no_iterator/employee_collection.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
DesignPatterns/05_iterator/1_no_iterator/employee_collection.py
eduardormonteiro/PythonPersonalLibrary
561733bb8305c4e25a08f99c28b60ec77251ad67
[ "MIT" ]
null
null
null
class Employees(object): _employees = {} _headcount = 0 def add_employee(self, employee): self._headcount += 1 self._employees[self._headcount] = employee def get_employee(self, i): return self._employees[i] @property def headcount(self): return self._headcount...
21.4
51
0.635514
class Employees(object): _employees = {} _headcount = 0 def add_employee(self, employee): self._headcount += 1 self._employees[self._headcount] = employee def get_employee(self, i): return self._employees[i] @property def headcount(self): return self._headcount...
true
true
f756a31ffeece92f486e9c683b90296ddff59f1d
4,213
py
Python
anchore_engine/services/policy_engine/api/models/image_vulnerability_listing.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/services/policy_engine/api/models/image_vulnerability_listing.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
anchore_engine/services/policy_engine/api/models/image_vulnerability_listing.py
roachmd/anchore-engine
521d6796778139a95f51542670714205c2735a81
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from anchore_engine.services.policy_engine.api.models.base_model_ import Model from anchore_engine.services.policy_engine.api.models.legacy_vulnerability_report import ...
29.669014
133
0.663423
from __future__ import absolute_import from datetime import date, datetime from typing import List, Dict from anchore_engine.services.policy_engine.api.models.base_model_ import Model from anchore_engine.services.policy_engine.api.models.legacy_vulnerability_report import LegacyVulnerabilityReport from anchore_en...
true
true
f756a3304cf1aef9a5d6ae57bf8a72af95f002b6
903
py
Python
arakat-backend/pipeline_generator/family_base/BatchWriteToFile.py
ahmetfyildirim/arakat
01cfebdb77cdcec5723b0dc9d7d597a3b288f9e1
[ "Apache-2.0" ]
null
null
null
arakat-backend/pipeline_generator/family_base/BatchWriteToFile.py
ahmetfyildirim/arakat
01cfebdb77cdcec5723b0dc9d7d597a3b288f9e1
[ "Apache-2.0" ]
null
null
null
arakat-backend/pipeline_generator/family_base/BatchWriteToFile.py
ahmetfyildirim/arakat
01cfebdb77cdcec5723b0dc9d7d597a3b288f9e1
[ "Apache-2.0" ]
null
null
null
from domain.ErrorTypes import ErrorTypes from validity import IncomingEdgeValidityChecker from utils import CodeGenerationUtils import os def generate_code(args): node = args["node"] requireds_info = args["requireds_info"] edges = args["edges"] checklist={"df_count": {1}, "model_count": {0}} erro...
39.26087
220
0.665559
from domain.ErrorTypes import ErrorTypes from validity import IncomingEdgeValidityChecker from utils import CodeGenerationUtils import os def generate_code(args): node = args["node"] requireds_info = args["requireds_info"] edges = args["edges"] checklist={"df_count": {1}, "model_count": {0}} erro...
true
true
f756a365eb88faf78cb6aede8290b8a9c12d348c
1,560
py
Python
ivi/agilent/agilent8596EM.py
edupo/python-ivi
8105d8064503725dde781f0378d75db58defaecb
[ "MIT" ]
null
null
null
ivi/agilent/agilent8596EM.py
edupo/python-ivi
8105d8064503725dde781f0378d75db58defaecb
[ "MIT" ]
null
null
null
ivi/agilent/agilent8596EM.py
edupo/python-ivi
8105d8064503725dde781f0378d75db58defaecb
[ "MIT" ]
null
null
null
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2013-2016 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
36.27907
77
0.753846
from .agilentBase8590E import * class agilent8596EM(agilentBase8590E): def __init__(self, *args, **kwargs): self.__dict__.setdefault('_instrument_id', 'HP8596EM') super(agilent8596EM, self).__init__(*args, **kwargs) self._input_impedance = 50 self._frequency_...
true
true
f756a4ae56c0cf79b240d9a1382239553947d5fb
7,850
py
Python
code/PH.py
LiuXiangMath/Hom-Complex-ML
e47d3af91e119d35af2c97312efd007adc7abfe5
[ "Apache-2.0" ]
null
null
null
code/PH.py
LiuXiangMath/Hom-Complex-ML
e47d3af91e119d35af2c97312efd007adc7abfe5
[ "Apache-2.0" ]
null
null
null
code/PH.py
LiuXiangMath/Hom-Complex-ML
e47d3af91e119d35af2c97312efd007adc7abfe5
[ "Apache-2.0" ]
1
2021-12-29T04:33:50.000Z
2021-12-29T04:33:50.000Z
# -*- coding: utf-8 -*- import numpy as np def get_point_index(point,simplices): for i in range(len(simplices)): if simplices[i][2]==0: if simplices[i][3]==point: return i def get_edge_index(edge,simplices): for i in range(len(simplices)): if simplice...
31.526104
119
0.505223
import numpy as np def get_point_index(point,simplices): for i in range(len(simplices)): if simplices[i][2]==0: if simplices[i][3]==point: return i def get_edge_index(edge,simplices): for i in range(len(simplices)): if simplices[i][2]==1: ...
true
true
f756a4b951f93a176478e164cdca404427459cb6
2,359
py
Python
tests/test_client.py
xinxi1990/httprunner_test
3b9a1097e63a108408955d395308bf273d29753d
[ "MIT" ]
1
2018-08-14T02:52:54.000Z
2018-08-14T02:52:54.000Z
tests/test_client.py
xinxi1990/httprunner_test
3b9a1097e63a108408955d395308bf273d29753d
[ "MIT" ]
1
2020-03-02T10:35:53.000Z
2020-03-02T10:35:53.000Z
tests/test_client.py
xinxi1990/httprunner_test
3b9a1097e63a108408955d395308bf273d29753d
[ "MIT" ]
null
null
null
from httprunner.built_in import setup_hook_prepare_kwargs from httprunner.client import HttpSession from httprunner.compat import bytes from tests.base import ApiServerUnittest class TestHttpClient(ApiServerUnittest): def setUp(self): super(TestHttpClient, self).setUp() self.api_client = HttpSessi...
32.315068
80
0.571429
from httprunner.built_in import setup_hook_prepare_kwargs from httprunner.client import HttpSession from httprunner.compat import bytes from tests.base import ApiServerUnittest class TestHttpClient(ApiServerUnittest): def setUp(self): super(TestHttpClient, self).setUp() self.api_client = HttpSessi...
true
true
f756a65b02f044e400ead403974967598e39ec7a
6,239
py
Python
nanome/api/structure/residue.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
nanome/api/structure/residue.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
nanome/api/structure/residue.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
import nanome from nanome.util import Logs from nanome._internal._structure._residue import _Residue from . import Base class Residue(_Residue, Base): RibbonMode = nanome.util.enums.RibbonMode SecondaryStructure = nanome.util.enums.SecondaryStructure def __init__(self): super(Residue, self).__ini...
27.008658
109
0.610995
import nanome from nanome.util import Logs from nanome._internal._structure._residue import _Residue from . import Base class Residue(_Residue, Base): RibbonMode = nanome.util.enums.RibbonMode SecondaryStructure = nanome.util.enums.SecondaryStructure def __init__(self): super(Residue, self).__ini...
true
true
f756a69c6c34fe76d3acd147e44dbd09300bac90
3,483
py
Python
examples/taxi_service.py
sash-ko/simobility
97317c488cc22d1d7c9ebf3c5811d1bac3a0b79c
[ "MIT" ]
29
2020-01-22T20:02:40.000Z
2022-01-11T18:51:24.000Z
examples/taxi_service.py
sash-ko/simobility
97317c488cc22d1d7c9ebf3c5811d1bac3a0b79c
[ "MIT" ]
7
2020-01-22T18:51:10.000Z
2021-03-03T10:41:32.000Z
examples/taxi_service.py
sash-ko/simobility
97317c488cc22d1d7c9ebf3c5811d1bac3a0b79c
[ "MIT" ]
5
2020-01-27T19:37:27.000Z
2022-03-16T14:24:14.000Z
""" Implementation of taxi service that operates with following logic: 1. Service find a list of candidate taxies for one booking 2. It sends requests to all candidate taxies 3. The first taxi driver that accepts the request takes the job """ from typing import List, Tuple import random from collections import defau...
30.025862
81
0.659489
from typing import List, Tuple import random from collections import defaultdict from simobility.core import Vehicle from simobility.core import Booking from simobility.core.tools import basic_booking_itinerary class TaxiService: def __init__(self, clock, taxi_drivers, dispatcher): self.clock = clock ...
true
true
f756a780cf1d8a64b3b16ed3e191ee4411861458
444
py
Python
moodle/core/calendar/calendar_export_token.py
Hardikris/moodlepy
8f5cb0cb4c2297e10f48396de681f6bb250f7751
[ "MIT" ]
null
null
null
moodle/core/calendar/calendar_export_token.py
Hardikris/moodlepy
8f5cb0cb4c2297e10f48396de681f6bb250f7751
[ "MIT" ]
null
null
null
moodle/core/calendar/calendar_export_token.py
Hardikris/moodlepy
8f5cb0cb4c2297e10f48396de681f6bb250f7751
[ "MIT" ]
null
null
null
from moodle import MoodleWarning from typing import List from moodle.attr import dataclass, field @dataclass class CalendarExportToken: """Auth token for exporting a calendar. token (str): The calendar permanent access token for calendar export. warnings (List[MoodleWarning]): list of MoodleWarning ""...
24.666667
73
0.72973
from moodle import MoodleWarning from typing import List from moodle.attr import dataclass, field @dataclass class CalendarExportToken: token: str warnings: List[MoodleWarning] = field(factory=list) def __str__(self): return self.token
true
true
f756a8532b8edb8d1770b5bd603da4df07ed6008
111
py
Python
call_def_to_main.py
MotiMatika/lemida_atsmit
53baca5a7d76a1dc9723e6d7f11bb784efffdcd4
[ "MIT" ]
null
null
null
call_def_to_main.py
MotiMatika/lemida_atsmit
53baca5a7d76a1dc9723e6d7f11bb784efffdcd4
[ "MIT" ]
null
null
null
call_def_to_main.py
MotiMatika/lemida_atsmit
53baca5a7d76a1dc9723e6d7f11bb784efffdcd4
[ "MIT" ]
null
null
null
def sum_num(x,y): sum = x+y return sum def div_num(x,y): div = x/y return div
5.55
17
0.468468
def sum_num(x,y): sum = x+y return sum def div_num(x,y): div = x/y return div
true
true
f756ab2f736018bc700c5f0602b1fe3824ba90c9
3,788
py
Python
contrib/macdeploy/custom_dsstore.py
cryptcoin-dev/cryptcoin
d9ee1250d07190014c89d0474430634bc2c7441c
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
cryptcoin-dev/cryptcoin
d9ee1250d07190014c89d0474430634bc2c7441c
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
cryptcoin-dev/cryptcoin
d9ee1250d07190014c89d0474430634bc2c7441c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
62.098361
1,817
0.728353
from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv[1] package_name_ns = sys.argv[2] ds = DSStore.open(output_file, 'w+') ds['.']['bwsp'] = { 'ShowStatusBar': False, 'WindowBounds': b'{{300, 2...
true
true
f756ac5c6b832e6cd84cba4cfcda14af24f64d7b
5,781
py
Python
room_booking_project/room_booking/views.py
alsanuz/room_booking_app
12acc8fc0e5d9a3abe23eca1ea1d4ee88e732ccf
[ "Unlicense" ]
null
null
null
room_booking_project/room_booking/views.py
alsanuz/room_booking_app
12acc8fc0e5d9a3abe23eca1ea1d4ee88e732ccf
[ "Unlicense" ]
null
null
null
room_booking_project/room_booking/views.py
alsanuz/room_booking_app
12acc8fc0e5d9a3abe23eca1ea1d4ee88e732ccf
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.contrib import messages from django.db.models import Q from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy from django.utils.translation import...
34.825301
99
0.640374
from __future__ import unicode_literals from datetime import datetime from django.contrib import messages from django.db.models import Q from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy from django.utils.translation import gettext as _ from djang...
true
true
f756adea102f08c296cb822bc4eb3289e6cb4262
5,661
py
Python
compliance_checker/tests/test_suite.py
DanielJMaher/compliance-checker
944220a4a7bd0e945d7b4e468ffb524af5eca5b2
[ "Apache-2.0" ]
null
null
null
compliance_checker/tests/test_suite.py
DanielJMaher/compliance-checker
944220a4a7bd0e945d7b4e468ffb524af5eca5b2
[ "Apache-2.0" ]
1
2017-12-04T10:43:20.000Z
2017-12-11T17:21:03.000Z
compliance_checker/tests/test_suite.py
DanielJMaher/compliance-checker
944220a4a7bd0e945d7b4e468ffb524af5eca5b2
[ "Apache-2.0" ]
null
null
null
from pkg_resources import resource_filename from compliance_checker.suite import CheckSuite from compliance_checker.base import Result, BaseCheck import numpy as np import unittest import os static_files = { '2dim' : resource_filename('compliance_checker', 'tests/data/2dim-grid.nc'), 'bad...
42.246269
109
0.624448
from pkg_resources import resource_filename from compliance_checker.suite import CheckSuite from compliance_checker.base import Result, BaseCheck import numpy as np import unittest import os static_files = { '2dim' : resource_filename('compliance_checker', 'tests/data/2dim-grid.nc'), 'bad...
true
true
f756ae227653519520f0bd98b581c55b1c370119
2,358
py
Python
config/settings/local.py
Gilbishkosma/linkeep
fe981c2361a8372bb738218ad189982d38defdd9
[ "MIT" ]
null
null
null
config/settings/local.py
Gilbishkosma/linkeep
fe981c2361a8372bb738218ad189982d38defdd9
[ "MIT" ]
null
null
null
config/settings/local.py
Gilbishkosma/linkeep
fe981c2361a8372bb738218ad189982d38defdd9
[ "MIT" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY...
39.966102
97
0.586938
from .base import * from .base import env DEBUG = True SECRET_KEY = env( "DJANGO_SECRET_KEY", default="ZJsn3zIjfJYO4FD9eNxyA42pkkodLMHcMXHJQ4sIZpMFaluMCk9lAYeczJS0CxGM", ) ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"] CACHES = { "default": { "BACKEND": "django.core.cache.backends.locmem.L...
true
true
f756ae3d4c2ff24bc22fec99aab63375b164b183
5,959
py
Python
LungBoundaryCrop.py
gyungchan2110/ImageUtils
618d032122d6eadeec4afc9fc6c6906fa71f0ff6
[ "MIT" ]
null
null
null
LungBoundaryCrop.py
gyungchan2110/ImageUtils
618d032122d6eadeec4afc9fc6c6906fa71f0ff6
[ "MIT" ]
null
null
null
LungBoundaryCrop.py
gyungchan2110/ImageUtils
618d032122d6eadeec4afc9fc6c6906fa71f0ff6
[ "MIT" ]
null
null
null
# In[] import cv2 import numpy as np import os from operator import eq import random import matplotlib.pyplot as plt from skimage import io import shutil os.environ["CUDA_VISIBLE_DEVICES"]="0" imgBase = "D:/[Data]/[Cardiomegaly]/1_ChestPA_Labeled_Baeksongyi/[PNG]_2_Generated_Data(2k)/Generated_Data_20180327_151...
38.445161
175
0.667226
import cv2 import numpy as np import os from operator import eq import random import matplotlib.pyplot as plt from skimage import io import shutil os.environ["CUDA_VISIBLE_DEVICES"]="0" imgBase = "D:/[Data]/[Cardiomegaly]/1_ChestPA_Labeled_Baeksongyi/[PNG]_2_Generated_Data(2k)/Generated_Data_20180327_151800_2Cl...
true
true
f756afe2f7b5112c4abcd60fb81c53970e3949f8
4,447
py
Python
Twitter_Analysis/data_collector.py
GisaKaze/Python-Quarantine-Projects
29fabcb7e4046e6f3e9a19403e6d2490fe4b9fc4
[ "MIT" ]
269
2020-03-24T11:52:17.000Z
2022-03-30T17:13:27.000Z
Twitter_Analysis/data_collector.py
GisaKaze/Python-Quarantine-Projects
29fabcb7e4046e6f3e9a19403e6d2490fe4b9fc4
[ "MIT" ]
11
2020-03-25T10:51:32.000Z
2022-01-15T19:29:42.000Z
Twitter_Analysis/data_collector.py
GisaKaze/Python-Quarantine-Projects
29fabcb7e4046e6f3e9a19403e6d2490fe4b9fc4
[ "MIT" ]
119
2020-03-24T12:20:12.000Z
2022-01-26T20:18:00.000Z
import sqlite3 import json from tqdm import tqdm from text_analysis import senti_score,sentiment_analyzer data=[] with open('tweets.txt','r') as f: raw_data=f.readlines() for i in raw_data: if len(i)>1: data.append(i) ##################################################################################...
41.175926
242
0.561727
import sqlite3 import json from tqdm import tqdm from text_analysis import senti_score,sentiment_analyzer data=[] with open('tweets.txt','r') as f: raw_data=f.readlines() for i in raw_data: if len(i)>1: data.append(i) def data_injester(id,created_at,usr_name,dp_name,location,verified_acc,protected_...
true
true
f756b0c338af4df0f1a4d036900343a034dcf2a4
111
py
Python
grand_geckos/database/__init__.py
imsofi/codejam-grand-geckos
55aabf5fe127ee9618c1faa2fe8cc02af8054b80
[ "0BSD" ]
5
2021-07-10T02:57:10.000Z
2021-08-02T20:20:10.000Z
grand_geckos/database/__init__.py
imsofi/codejam-grand-geckos
55aabf5fe127ee9618c1faa2fe8cc02af8054b80
[ "0BSD" ]
12
2021-07-09T22:06:22.000Z
2021-07-16T20:27:42.000Z
grand_geckos/database/__init__.py
imsofi/codejam-grand-geckos
55aabf5fe127ee9618c1faa2fe8cc02af8054b80
[ "0BSD" ]
6
2021-07-09T20:55:04.000Z
2021-08-30T19:40:34.000Z
from .DBWorker import DatabaseWorker from .models import Base Base.metadata.create_all(DatabaseWorker.engine)
22.2
47
0.846847
from .DBWorker import DatabaseWorker from .models import Base Base.metadata.create_all(DatabaseWorker.engine)
true
true
f756b17c10d51b7b8bc5a4ff3d5b7de57359aa73
1,812
py
Python
saleor/order/migrations/0084_auto_20200522_0522.py
fairhopeweb/saleor
9ac6c22652d46ba65a5b894da5f1ba5bec48c019
[ "CC-BY-4.0" ]
15,337
2015-01-12T02:11:52.000Z
2021-10-05T19:19:29.000Z
saleor/order/migrations/0084_auto_20200522_0522.py
fairhopeweb/saleor
9ac6c22652d46ba65a5b894da5f1ba5bec48c019
[ "CC-BY-4.0" ]
7,486
2015-02-11T10:52:13.000Z
2021-10-06T09:37:15.000Z
saleor/order/migrations/0084_auto_20200522_0522.py
aminziadna/saleor
2e78fb5bcf8b83a6278af02551a104cfa555a1fb
[ "CC-BY-4.0" ]
5,864
2015-01-16T14:52:54.000Z
2021-10-05T23:01:15.000Z
# Generated by Django 3.0.6 on 2020-05-22 10:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("order", "0083_merge_20200421_0529"), ] operations = [ migrations.AlterField( model_name="orderevent", name="type", ...
40.266667
83
0.512141
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("order", "0083_merge_20200421_0529"), ] operations = [ migrations.AlterField( model_name="orderevent", name="type", field=models.CharField( ...
true
true